Compare commits
No commits in common. "d12462d99025517a705e722d3dbc0ed4e59e9798" and "95fa9b7aef848d1941d9353d9a5b0b3012262ad9" have entirely different histories.
d12462d990
...
95fa9b7aef
|
@ -8,7 +8,7 @@
|
||||||
<view class="type">
|
<view class="type">
|
||||||
<view class="li" @click="typeIndexFun(index)" :class="index==typeIndex?'on':''"
|
<view class="li" @click="typeIndexFun(index)" :class="index==typeIndex?'on':''"
|
||||||
v-for="(item,index) in typeData">
|
v-for="(item,index) in typeData">
|
||||||
{{item.name}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -17,25 +17,25 @@
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="cor">*</text>产品名称
|
<text class="cor">*</text>产品名称
|
||||||
</view>
|
</view>
|
||||||
<input class="input" v-model="data.title" type="text" placeholder="请填写产品名称" />
|
<input class="input" type="text" value="全彩LED显示屏" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="cor">*</text>规格型号
|
<text class="cor">*</text>规格型号
|
||||||
</view>
|
</view>
|
||||||
<input class="input" type="text" v-model="data.model" placeholder="请填写产品规格型号" />
|
<input class="input" type="text" value="P2.5" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">产品品牌</view>
|
<view class="title">产品品牌</view>
|
||||||
<input class="input" type="text" v-model="data.brand" value="" placeholder="请输入品牌" />
|
<input class="input" type="text" value="" placeholder="请输入品牌" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="cor">*</text>产品尺寸
|
<text class="cor">*</text>产品尺寸
|
||||||
</view>
|
</view>
|
||||||
<input class="input" type="text" v-model="data.width" placeholder="请填写产品尺寸 宽" />
|
|
||||||
<input class="input" type="text" v-model="data.height" placeholder="请填写产品尺寸 高" />
|
<input class="input" type="text" value="宽:38.5m x 高14.5m" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="supplementTitle">补充信息</view>
|
<view class="supplementTitle">补充信息</view>
|
||||||
|
@ -44,42 +44,37 @@
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="cor">*</text>联系人
|
<text class="cor">*</text>联系人
|
||||||
</view>
|
</view>
|
||||||
<input type="text" class="input" v-model="data.contact_name" placeholder="请填写联系人名称" />
|
<input type="text" class="input" value="王富贵" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text class="cor">*</text>联系电话
|
<text class="cor">*</text>联系电话
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="data.contact_phone" class="input" placeholder="请填写联系电话" />
|
<input type="text" class="input" value="18256666666" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text class="cor">*</text>预约时间
|
<text class="cor">*</text>预约时间
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="data.appointment_time" class="input" @tap="openDatetimePicker"
|
<input type="text" class="input" value="2022-02-16" />
|
||||||
placeholder="请选择预约时间" />
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122">
|
|
||||||
</yy-mm-dd-hh-ss>
|
|
||||||
<view class="li-textarea">
|
<view class="li-textarea">
|
||||||
<view class="title">*详细地址</view>
|
<view class="title">*详细地址</view>
|
||||||
<textarea class="textarea" v-model="data.addres" placeholder="请输入详细地址" />
|
<textarea class="textarea" value="湖南省株洲市荷塘区红旗中路456号五矿二十三冶综合楼" placeholder="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="scene-img">
|
<view class="scene-img">
|
||||||
<view class="title">现场图片</view>
|
<view class="title">现场图片</view>
|
||||||
<view class="img-content">
|
<view class="img-content">
|
||||||
<image v-for="(item,index) in imgsrcArr" class="img" :src="item" :key="index"
|
<image class="img" src="../../static/del/img003.png" mode=""></image>
|
||||||
mode="aspectFill"></image>
|
<image class="img" src="../../static/del/img003.png" mode=""></image>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="iocn-content" @click="chooseImg()">
|
<view class="iocn-content">
|
||||||
<image class="icon" src="../../static/iocn/jia.png" mode=""></image>
|
<image class="icon" src="../../static/iocn/jia.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="submit-button" @click="submitData()" type="default">确认提交</button>
|
<button class="submit-button" type="default">确认提交</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</container-subgroup-two>
|
</container-subgroup-two>
|
||||||
|
@ -92,15 +87,11 @@
|
||||||
<script>
|
<script>
|
||||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||||
import statusNav from '../../components/status-nav.vue';
|
import statusNav from '../../components/status-nav.vue';
|
||||||
import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue';
|
|
||||||
import {
|
|
||||||
uploadImg
|
|
||||||
} from '@/jsFile/public-api.js';
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
statusNav,
|
statusNav,
|
||||||
containerSubgroupTwo,
|
containerSubgroupTwo,
|
||||||
yyMmDdHhSs
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -108,7 +99,7 @@
|
||||||
type_id:1,
|
type_id:1,
|
||||||
title:"",
|
title:"",
|
||||||
brand:"",
|
brand:"",
|
||||||
model: "",
|
model:"型号",
|
||||||
width:"",
|
width:"",
|
||||||
height:"",
|
height:"",
|
||||||
contact_name:"",
|
contact_name:"",
|
||||||
|
@ -117,7 +108,6 @@
|
||||||
addres:"",
|
addres:"",
|
||||||
pictures:"",
|
pictures:"",
|
||||||
},
|
},
|
||||||
imgsrcArr: [],
|
|
||||||
typeIndex: 0,
|
typeIndex: 0,
|
||||||
typeData: [{
|
typeData: [{
|
||||||
title: '巡检',
|
title: '巡检',
|
||||||
|
@ -139,101 +129,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
this.getType()
|
|
||||||
if (op.index != undefined) this.typeIndex = op.index;
|
if (op.index != undefined) this.typeIndex = op.index;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 切换类型
|
|
||||||
typeIndexFun(index) {
|
typeIndexFun(index) {
|
||||||
this.typeIndex = index
|
this.typeIndex = index
|
||||||
this.data.type_id=this.typeData
|
this.data.type_id=this.typeData
|
||||||
},
|
|
||||||
getType() {
|
|
||||||
this.$requst.post('/universal/api.vas/vas_type', this.data).then(res => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
this.typeData = [...res.data]
|
|
||||||
console.log(this.typeData)
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openDatetimePicker() {
|
|
||||||
this.$refs.myPicker.show();
|
|
||||||
},
|
|
||||||
// 获取预约时间
|
|
||||||
handleSubmit(e) {
|
|
||||||
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"}
|
|
||||||
console.log(e)
|
|
||||||
this.data.appointment_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
// 选择图片
|
|
||||||
chooseImg() {
|
|
||||||
uni.chooseImage({
|
|
||||||
count: 2,
|
|
||||||
sourceType: ['album', 'camera'],
|
|
||||||
success: (res) => {
|
|
||||||
this.imgsrcArr = []
|
|
||||||
let imgsrc = res.tempFilePaths;
|
|
||||||
imgsrc.forEach(item => {
|
|
||||||
this.imgsrcArr.push(item);
|
|
||||||
})
|
|
||||||
for (var i = 0; i < res.tempFilePaths.length; i++) {
|
|
||||||
uploadImg({
|
|
||||||
path: res.tempFilePaths[i]
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code) {
|
|
||||||
this.$toolAll.tools.showToast('上传成功');
|
|
||||||
if (!this.data.pictures) {
|
|
||||||
this.data.pictures = res.data.id + ","
|
|
||||||
} else {
|
|
||||||
this.data.pictures += res.data.id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 提交
|
|
||||||
submitData() {
|
|
||||||
if (!this.data.title) {
|
|
||||||
this.$toolAll.tools.showToast("请填写产品名称");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.data.contact_name) {
|
|
||||||
this.$toolAll.tools.showToast("请填写联系人名称");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var reg_tel =
|
|
||||||
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11位手机号码正则
|
|
||||||
|
|
||||||
if (!reg_tel.test(this.data.contact_phone)) {
|
|
||||||
this.$toolAll.tools.showToast("请正确填写联系人电话");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.data.appointment_time) {
|
|
||||||
this.$toolAll.tools.showToast("请选择预约时间");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.data.addres) {
|
|
||||||
this.$toolAll.tools.showToast("请正确填写详细地址");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.data.pictures) {
|
|
||||||
this.$toolAll.tools.showToast("请选择现场图片");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.data.appointment_time = new Date(this.data.appointment_time).getTime()
|
|
||||||
this.$requst.post('/universal/api.vas/vas', this.data).then(res => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
console.log(res)
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -309,11 +210,9 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.appreciationServe-from .li:last-child {
|
.appreciationServe-from .li:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.appreciationServe-from .li .title {
|
.appreciationServe-from .li .title {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
|
@ -29,8 +29,7 @@
|
||||||
</view>
|
</view>
|
||||||
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号" v-else />
|
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号" v-else />
|
||||||
<view class="fault-pictures radius10" @click="chooseImg">
|
<view class="fault-pictures radius10" @click="chooseImg">
|
||||||
<image class="fault-pictures-img" v-if="imgsrcArr.length>=1" :src="imgsrcArr[0]"
|
<image class="fault-pictures-img" v-if="imgsrcArr.length>=1" :src="imgsrcArr[0]" mode="aspectFill"></image>
|
||||||
mode="aspectFill"></image>
|
|
||||||
<view class="fault-pictures-con" v-else>
|
<view class="fault-pictures-con" v-else>
|
||||||
<image class="img" src="../../static/iocn/gz.png" lazy-load mode="aspectFill"></image>
|
<image class="img" src="../../static/iocn/gz.png" lazy-load mode="aspectFill"></image>
|
||||||
<view class="text">添加故障图片</view>
|
<view class="text">添加故障图片</view>
|
||||||
|
@ -39,10 +38,9 @@
|
||||||
<textarea v-model="data.fault_describe" class="fault-description radius10" placeholder="故障情况描述"
|
<textarea v-model="data.fault_describe" class="fault-description radius10" placeholder="故障情况描述"
|
||||||
placeholder-class="fault-description-text" />
|
placeholder-class="fault-description-text" />
|
||||||
<view class="detailed-address inputCss">
|
<view class="detailed-address inputCss">
|
||||||
<input type="text" v-model="data.service_address" class="fon26 width100"
|
<input type="text" v-model="data.address" class="fon26 width100"
|
||||||
placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" />
|
placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" />
|
||||||
<image @click="mapFun()" src="../../static/iocn/map.png" class="map flexs" mode="aspectFill">
|
<image @click="mapFun()" src="../../static/iocn/map.png" class="map flexs" mode="aspectFill"></image>
|
||||||
</image>
|
|
||||||
</view>
|
</view>
|
||||||
<input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名"
|
<input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名"
|
||||||
placeholder-class="inputCss-input" />
|
placeholder-class="inputCss-input" />
|
||||||
|
@ -50,8 +48,7 @@
|
||||||
placeholder-class="inputCss-input" />
|
placeholder-class="inputCss-input" />
|
||||||
<input type="text" class="inputCss" @tap="openDatetimePicker" disabled v-model="data.visit_time"
|
<input type="text" class="inputCss" @tap="openDatetimePicker" disabled v-model="data.visit_time"
|
||||||
placeholder="请选择上门时间" placeholder-class="inputCss-input" />
|
placeholder="请选择上门时间" placeholder-class="inputCss-input" />
|
||||||
<yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122">
|
<yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122"></yy-mm-dd-hh-ss>
|
||||||
</yy-mm-dd-hh-ss>
|
|
||||||
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
|
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -61,9 +58,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue';
|
import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue';
|
||||||
import {
|
import { uploadImg } from '@/jsFile/public-api.js';
|
||||||
uploadImg
|
|
||||||
} from '@/jsFile/public-api.js';
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
yyMmDdHhSs
|
yyMmDdHhSs
|
||||||
|
@ -75,10 +70,11 @@
|
||||||
is_device: 0,
|
is_device: 0,
|
||||||
fault_type: "",
|
fault_type: "",
|
||||||
device_name: "华为LED",
|
device_name: "华为LED",
|
||||||
|
condition: "",
|
||||||
project_number: "",
|
project_number: "",
|
||||||
service_address:"",
|
service_address:"",
|
||||||
|
address: "",
|
||||||
username: "",
|
username: "",
|
||||||
fault_picture: "",
|
|
||||||
fault_describe:"",
|
fault_describe:"",
|
||||||
images:"",
|
images:"",
|
||||||
phone: "",
|
phone: "",
|
||||||
|
@ -147,14 +143,9 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
uploadImg({
|
uploadImg({path:res.tempFilePaths[0]}).then(res=>{
|
||||||
path: res.tempFilePaths[0]
|
|
||||||
}).then(res => {
|
|
||||||
if(res.code) {
|
if(res.code) {
|
||||||
console.log(res.data.id)
|
|
||||||
this.$toolAll.tools.showToast('上传成功');
|
this.$toolAll.tools.showToast('上传成功');
|
||||||
this.data.fault_picture = res.data.id
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -202,11 +193,10 @@
|
||||||
this.$toolAll.tools.showToast("请正确填写您的电话");
|
this.$toolAll.tools.showToast("请正确填写您的电话");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(this.data)
|
|
||||||
this.$requst.post('/universal/api.work_order/repair',this.data).then(res => {
|
this.$requst.post('/universal/api.work_order/repair',this.data).then(res => {
|
||||||
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -219,15 +209,19 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
mapFun() {
|
mapFun() {
|
||||||
const that = this
|
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
const latitude = res.latitude;
|
const latitude = res.latitude;
|
||||||
const longitude = res.longitude;
|
const longitude = res.longitude;
|
||||||
|
console.log(latitude, longitude, 78);
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.data.service_address = res.address
|
console.log(res, 81);
|
||||||
|
console.log('位置名称:' + res.name);
|
||||||
|
console.log('详细地址:' + res.address);
|
||||||
|
console.log('纬度:' + res.latitude);
|
||||||
|
console.log('经度:' + res.longitude);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// uni.openLocation({
|
// uni.openLocation({
|
||||||
|
@ -379,13 +373,11 @@
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fault-pictures-con{
|
.fault-pictures-con{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fault-pictures .img {
|
.fault-pictures .img {
|
||||||
width: 87rpx;
|
width: 87rpx;
|
||||||
margin-bottom: 27rpx;
|
margin-bottom: 27rpx;
|
||||||
|
@ -465,7 +457,6 @@
|
||||||
width: 42rpx;
|
width: 42rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fault-pictures-img{
|
.fault-pictures-img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -242,7 +242,6 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
role: 4, // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
|
||||||
role: uni.getStorageSync('type_id'), // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
role: uni.getStorageSync('type_id'), // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
||||||
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
|
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
|
||||||
messageNumber: 16 ,// 消息数量
|
messageNumber: 16 ,// 消息数量
|
||||||
|
|
|
@ -133,13 +133,9 @@
|
||||||
// 获取工单列表
|
// 获取工单列表
|
||||||
getDatalist(){
|
getDatalist(){
|
||||||
this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => {
|
this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => {
|
||||||
if (res.code==1) {
|
if (res.code) {
|
||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
this.dataList = res.data.data;
|
this.dataList = res.data.data;
|
||||||
console.log(this.dataList,"---------1" )
|
|
||||||
}else{
|
|
||||||
this.dataList = [];
|
|
||||||
console.log(this.dataList,"---------2" )
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue