|
@@ -99,8 +99,8 @@
|
|
|
<!-- <view style="font-size: 30rpx;color: #999;margin-left: 10rpx;">添加图片</view> -->
|
|
|
<view style="margin-top: 20rpx;">
|
|
|
<u-upload
|
|
|
- :fileList="form.maintenanceFiles"
|
|
|
- :disabled="form.status != 3"
|
|
|
+ :fileList="userImgList"
|
|
|
+ disabled
|
|
|
@afterRead="afterRead"
|
|
|
@delete="deletePic"
|
|
|
name="1"
|
|
@@ -181,13 +181,13 @@
|
|
|
<view class="bottombox_name" v-if="form.dispatchingWorkers == 2 && form.status != 1">
|
|
|
<text>{{form.maintenanceWorkerName}}</text>
|
|
|
</view>
|
|
|
- <view class="bottombox_name" @click="pickerShowfun" v-if="form.status == 1 && userInfoRoleName.indexOf('admin') != -1">
|
|
|
+ <view class="bottombox_name" @click="pickerShowfun" v-if="form.dispatchingWorkers == 1 && userInfoRoleName.indexOf('admin') != -1">
|
|
|
<text>{{form.maintenanceWorkerName == null || form.maintenanceWorkerName == '' ? '请选择维修工' : form.maintenanceWorkerName}}</text>
|
|
|
</view>
|
|
|
<view v-if="(form.status == 3 || form.status == 4) && form.dispatchingWorkers == 3" style="color: #FD4B09;">维修费:{{form.maintenanceAmount?form.maintenanceAmount:0}}元</view>
|
|
|
<view class="bottombox_right">
|
|
|
<view class="buttonClass"
|
|
|
- v-if="form.status == 1 && userInfoRoleName.indexOf('admin') != -1"
|
|
|
+ v-if="form.dispatchingWorkers == 1 && userInfoRoleName.indexOf('admin') != -1"
|
|
|
@click="maintenanceDispatchingWorkersfun">确认派工</view>
|
|
|
<view class="buttonClass"
|
|
|
v-if="form.dispatchingWorkers == 2 && userInfoRoleName.indexOf('admin') != -1"
|
|
@@ -212,13 +212,13 @@
|
|
|
</view>
|
|
|
</u-popup> -->
|
|
|
|
|
|
- <u-modal :show="kapianShow" title="项目" :showCancelButton="true" @cancel="kapianCancel" @confirm="kapianConfirm" confirmColor="#FD4B09">
|
|
|
+ <u-modal :show="kapianShow" title="收费项目" :showCancelButton="true" @cancel="kapianCancel" @confirm="kapianConfirm" confirmColor="#FD4B09">
|
|
|
<view style="position: relative;">
|
|
|
<view class="positionSC" @click="maintenanceDe(kapianindex)">删除</view>
|
|
|
<view class="kapianModel">
|
|
|
<text style="color: #FD4B09;font-size: 28rpx;">项目:</text>
|
|
|
<u-input v-model="kapian.costName" disabledColor="#fff" :disabled="form.status != 3"
|
|
|
- border="bottom" confirm-type="next" placeholder="添加项目" ></u-input>
|
|
|
+ border="bottom" confirm-type="next" placeholder="收费项目" ></u-input>
|
|
|
</view>
|
|
|
<view class="kapianModel">
|
|
|
<text style="color: #FD4B09;font-size: 28rpx;">金额:</text>
|
|
@@ -227,6 +227,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-modal>
|
|
|
+ <!-- <u-overlay :show="overlayShow">
|
|
|
+ <view class="warp">
|
|
|
+ <view class="rect" @tap.stop></view>
|
|
|
+ </view>
|
|
|
+ </u-overlay> -->
|
|
|
+
|
|
|
+ <u-loading-page bg-color="#e8e8e8" :loading="overlayShow" loading-text="加载中..." style="z-index: 999;" bgColor="rgba(0,0,0,0.5)"></u-loading-page>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -251,6 +258,7 @@
|
|
|
id:null,
|
|
|
wxStyle: '',
|
|
|
gzStyle: '',
|
|
|
+ overlayShow: false,
|
|
|
form:{
|
|
|
maintenanceFees:[
|
|
|
{
|
|
@@ -276,6 +284,8 @@
|
|
|
userInfoRoleName:[],
|
|
|
// 当前点击费用的下标
|
|
|
kapianindex:null,
|
|
|
+ // 用户图片
|
|
|
+ userImgList: []
|
|
|
}
|
|
|
},
|
|
|
onLoad(e) {
|
|
@@ -310,6 +320,9 @@
|
|
|
}
|
|
|
this.kapianindex = null
|
|
|
this.kapianShow = false;
|
|
|
+
|
|
|
+ this.kapian = {}
|
|
|
+
|
|
|
},
|
|
|
moneyInput() {
|
|
|
var money = 0
|
|
@@ -340,6 +353,7 @@
|
|
|
},
|
|
|
// 撤销派工
|
|
|
maintenanceRevokeDispatchingWorkersfun(){
|
|
|
+ this.overlayShow = true;
|
|
|
maintenanceRevokeDispatchingWorkers(this.form).then(res=>{
|
|
|
if (res.code == 200) {
|
|
|
this.$refs.uToast.show({
|
|
@@ -353,10 +367,13 @@
|
|
|
message: res.msg,
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ this.overlayShow = false;
|
|
|
})
|
|
|
},
|
|
|
// 派工
|
|
|
maintenanceDispatchingWorkersfun(){
|
|
|
+ this.overlayShow = true;
|
|
|
if (!this.form.maintenanceWorkerId) {
|
|
|
return this.$refs.uToast.show({type: 'warning',message: '请选择维修工'})
|
|
|
}
|
|
@@ -378,6 +395,7 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ this.overlayShow = false;
|
|
|
})
|
|
|
},
|
|
|
// 维修工弹窗开启
|
|
@@ -420,6 +438,7 @@
|
|
|
},
|
|
|
// 确认费用
|
|
|
Confirmexpenses(){
|
|
|
+ this.overlayShow = true
|
|
|
let a = true
|
|
|
if (this.form.maintenanceFees.length <= 0) {
|
|
|
return this.$refs.uToast.show({type: 'warning',message: '请添加维修费用'})
|
|
@@ -438,6 +457,11 @@
|
|
|
})
|
|
|
if (a == false) return
|
|
|
|
|
|
+ var imgList = this.form.maintenanceFiles
|
|
|
+ for (let key in imgList) {
|
|
|
+ this.form.maintenanceFiles[key].sort = key + 1
|
|
|
+ }
|
|
|
+
|
|
|
maintenanceConfirm(this.form).then(res=>{
|
|
|
if (res.code == 200) {
|
|
|
this.$refs.uToast.show({
|
|
@@ -454,6 +478,7 @@
|
|
|
message: res.msg,
|
|
|
})
|
|
|
}
|
|
|
+ this.overlayShow = false;
|
|
|
})
|
|
|
|
|
|
}
|
|
@@ -461,6 +486,7 @@
|
|
|
},
|
|
|
// 撤销费用
|
|
|
Revocationfeesfun(){
|
|
|
+ this.overlayShow = true;
|
|
|
maintenancerRvokeConfirmFees(this.form).then(res=>{
|
|
|
if (res.code == 200) {
|
|
|
this.$refs.uToast.show({
|
|
@@ -474,14 +500,18 @@
|
|
|
message: res.msg,
|
|
|
})
|
|
|
}
|
|
|
+ this.overlayShow = false;
|
|
|
})
|
|
|
},
|
|
|
// 确认结算
|
|
|
ConfirmSettlement(){
|
|
|
+ this.overlayShow = true;
|
|
|
+ this.overlayShow = false;
|
|
|
|
|
|
},
|
|
|
// 确认接单接口
|
|
|
receivingOrdersfun(){
|
|
|
+ this.overlayShow = true
|
|
|
maintenanceReceivingOrders(this.form).then(res=>{
|
|
|
console.log(res,180);
|
|
|
if (res.code == 200) {
|
|
@@ -497,6 +527,7 @@
|
|
|
message: res.msg,
|
|
|
})
|
|
|
}
|
|
|
+ this.overlayShow = false
|
|
|
})
|
|
|
},
|
|
|
// 维修设备详情
|
|
@@ -505,13 +536,21 @@
|
|
|
this.form = res.data
|
|
|
|
|
|
|
|
|
-
|
|
|
+ for (let index in this.form.maintenanceFiles) {
|
|
|
+ if(this.form.maintenanceFiles[index].uploadType == 0) {
|
|
|
+ this.userImgList.push(img)
|
|
|
+ this.form.maintenanceFiles.splice(index, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.form.status == 4) {
|
|
|
this.gzStyle = "#fd4b09"
|
|
|
this.wxStyle = ""
|
|
|
} else if (this.form.status == 3 && this.form.dispatchingWorkers == 3) {
|
|
|
this.gzStyle = "#fd4b09"
|
|
|
this.wxStyle = ""
|
|
|
+ } else if (this.form.status == 3 && this.form.dispatchingWorkers == 1) {
|
|
|
+ this.wxStyle = "#fd4b09"
|
|
|
+ this.gzStyle = ""
|
|
|
} else if (this.form.dispatchingWorkers == 2) {
|
|
|
console.log(this.form.status);
|
|
|
this.wxStyle = "#fd4b09"
|
|
@@ -540,6 +579,7 @@
|
|
|
// 图片删除
|
|
|
deletePic(e){
|
|
|
if(e.file.uploadType == 0) return this.$refs.uToast.show({ type: 'warning', message: '请勿删除客户添加的图片',})
|
|
|
+ if(this.form.status != 3) return this.$refs.uToast.show({ type: 'warning', message: '修改数据请撤销费用',})
|
|
|
this.form.maintenanceFiles.splice(e.index,1)
|
|
|
},
|
|
|
// 上传图片
|
|
@@ -611,7 +651,7 @@
|
|
|
padding: 10rpx 15rpx;
|
|
|
border-radius: 12rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.label {
|
|
|
left: 0rpx;
|
|
|
top: 190rpx;
|