|
|
|
|
@ -2,7 +2,6 @@ |
|
|
|
|
<view class="page-css"> |
|
|
|
|
<view class="repair_detail"> |
|
|
|
|
<view class="repair_title">提报信息</view> |
|
|
|
|
<!-- <iframe src="http://111.34.85.148:9008/jeewms/loginController.do?login" frameborder="0" ref="refed" width="100%" height="500px"></iframe> --> |
|
|
|
|
|
|
|
|
|
<u-form labelPosition="left" :rules="rules" ref="repairDetailsForm" :model="repairDetails" |
|
|
|
|
:label-width="200" class="repair_form"> |
|
|
|
|
@ -34,9 +33,9 @@ |
|
|
|
|
</u-form-item> |
|
|
|
|
</u-form> |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修人员 接单展示--> |
|
|
|
|
<!-- 客服派单 维修人员 接单展示--> |
|
|
|
|
<view class="repair_detail" |
|
|
|
|
v-if="(dataTypes == 4 || dataTypes == 2) && (detailForm.status == 201 || detailForm.status == 101 || detailForm.status == 400)"> |
|
|
|
|
v-if="(dataTypes == 4 || dataTypes == 2) && (detailForm.status == 201 || detailForm.status == 101 || detailForm.status == 400 || detailForm.status == 205)"> |
|
|
|
|
<view class="repair_title">派单信息</view> |
|
|
|
|
<u-form labelPosition="left" :rules="sendRules" ref="sendOrderForm" :model="sendOrder" :label-width="200" |
|
|
|
|
class="repair_form"> |
|
|
|
|
@ -90,6 +89,7 @@ |
|
|
|
|
</u-form-item> |
|
|
|
|
</u-form> |
|
|
|
|
</view> |
|
|
|
|
<!-- 驳回状态展示 --> |
|
|
|
|
<view class="repair_detail" |
|
|
|
|
v-if="detailForm.status == 400 || detailForm.status == 300 || detailForm.status == 102"> |
|
|
|
|
<view class="repair_title" v-if="detailForm.status == 400">维修人员驳回</view> |
|
|
|
|
@ -110,7 +110,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修详情 待提交维修方案 展示 --> |
|
|
|
|
<view class="repair_detail" |
|
|
|
|
v-if="(dataTypes == 4 && (detailForm.status == 401 || detailForm.status == 300 || detailForm.status == 105)) || (dataTypes == 3 && (detailForm.status == 402 || detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 301)"> |
|
|
|
|
v-if="(dataTypes == 4 && (detailForm.status == 401 || detailForm.status == 300 || detailForm.status == 105)) || (dataTypes == 3 && (detailForm.status == 402 || detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 301 || detailForm.status == 103)"> |
|
|
|
|
<view class="repair_title">维修详情</view> |
|
|
|
|
<u-form labelPosition="left" :rules="repairInfoRules" ref="repairInfoForm" :model="repairInfo" |
|
|
|
|
:label-width="140" class="repair_form"> |
|
|
|
|
@ -119,7 +119,7 @@ |
|
|
|
|
<u-input v-model="detailForm.repairPersonName" :border="true" placeholder="" :disabled="true" |
|
|
|
|
class="sp-new-input-diabled" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false" :required="true"> |
|
|
|
|
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false" :required="false"> |
|
|
|
|
<u-input v-model="deviceData.name" :border="true" placeholder="" :disabled="optionDisabled" |
|
|
|
|
:class="optionDisabled ? 'sp-new-input-diabled' : ''" type="select" |
|
|
|
|
@click="deviceShow = true" /> |
|
|
|
|
@ -134,6 +134,14 @@ |
|
|
|
|
:disabled="optionDisabled" :class="optionDisabled ? 'sp-new-input-diabled' : ''" |
|
|
|
|
:height="120" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="人工费:" prop="laborCost" :border-bottom="false" :required="false"> |
|
|
|
|
<u-input v-model="repairInfo.laborCost" :border="true" placeholder="请输入" :disabled="optionDisabled" |
|
|
|
|
:class="optionDisabled ? 'sp-new-input-diabled' : ''" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="差旅费:" prop="travelExpense" :border-bottom="false" :required="false"> |
|
|
|
|
<u-input v-model="repairInfo.travelExpense" :border="true" placeholder="请输入" |
|
|
|
|
:disabled="optionDisabled" :class="optionDisabled ? 'sp-new-input-diabled' : ''" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="是否申领物料:" prop="isMaterial" :border-bottom="false" :label-width="200" |
|
|
|
|
:required="true"> |
|
|
|
|
<uni-data-checkbox :disabled="optionDisabled" v-model="repairInfo.isMaterial" |
|
|
|
|
@ -177,6 +185,15 @@ |
|
|
|
|
</u-form> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<!-- 维修完成 上传图片 --> |
|
|
|
|
<view class="repair_detail" v-if="(detailForm.status == 103)"> |
|
|
|
|
<u-form labelPosition="left" ref="sendOrderForm" :model="detailForm" :label-width="200" class="repair_form"> |
|
|
|
|
<u-form-item label="维修完成图片:" prop="completeImgList" :border-bottom="false"> |
|
|
|
|
<betone-upload :type="'images'" v-model="detailForm.completeImgList" @changeFile="changePic"> |
|
|
|
|
</betone-upload> |
|
|
|
|
</u-form-item> |
|
|
|
|
</u-form> |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修负责人 审批 --> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 3 && (detailForm.status == 402 || detailForm.status == 102)"> |
|
|
|
|
<view class="repair_title">主管审批</view> |
|
|
|
|
@ -220,7 +237,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 客服派单--> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" |
|
|
|
|
v-if="dataTypes == 2 && (detailForm.status == 101 || detailForm.status == 400)"> |
|
|
|
|
v-if="dataTypes == 2 && (detailForm.status == 101 || detailForm.status == 400 || detailForm.status == 205)"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="sendOrderSubmit()">确定派单</u-button> |
|
|
|
|
</view> |
|
|
|
|
@ -242,6 +259,12 @@ |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="customerSubmit()">提交</u-button> |
|
|
|
|
</view> |
|
|
|
|
<!-- 客户 维修完成 --> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" |
|
|
|
|
v-if="dataTypes == 4 && detailForm.status == 103"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="repairComplete()">维修完成</u-button> |
|
|
|
|
</view> |
|
|
|
|
<!-- 选择维修人员 --> |
|
|
|
|
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true" |
|
|
|
|
value-name="id" title="选择维修人员"></u-select> |
|
|
|
|
@ -319,7 +342,7 @@ export default { |
|
|
|
|
return this.$store.state.dataType == 2 ? false : true |
|
|
|
|
}, |
|
|
|
|
optionDisabled() { |
|
|
|
|
return (this.$store.state.dataType == 3 && (this.detailForm.status == 402 || this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 301) ? true : false |
|
|
|
|
return (this.$store.state.dataType == 3 && (this.detailForm.status == 402 || this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 301) || (this.$store.state.dataType == 4 && this.detailForm.status == 103) ? true : false |
|
|
|
|
}, |
|
|
|
|
optionPiceDisabled() { |
|
|
|
|
return (this.$store.state.dataType == 3 && (this.detailForm.status == 402 || this.detailForm.status == 102)) ? false : true |
|
|
|
|
@ -455,7 +478,8 @@ export default { |
|
|
|
|
repairTypeData: { |
|
|
|
|
name: '', |
|
|
|
|
key: '', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
completeImgList: [],//维修完成图片上传列表 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
@ -523,6 +547,8 @@ export default { |
|
|
|
|
this.deviceData.repairPerson = '' |
|
|
|
|
this.deviceData.name = '' |
|
|
|
|
} |
|
|
|
|
this.detailForm.laborCost = this.detailForm.status |
|
|
|
|
this.detailForm.travelExpense = this.detailForm.travelExpense |
|
|
|
|
|
|
|
|
|
// 维修类型 |
|
|
|
|
let type_ = this.repairTypeList.filter(v => v.dictKey == this.detailForm.repairType) |
|
|
|
|
@ -534,6 +560,40 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 修改图片 |
|
|
|
|
changePic(file, index) { |
|
|
|
|
this.completeImgList = file |
|
|
|
|
}, |
|
|
|
|
// 维修完成 |
|
|
|
|
repairComplete() { |
|
|
|
|
let query = { |
|
|
|
|
id: this.detailForm.id, |
|
|
|
|
repairType: this.detailForm.repairType |
|
|
|
|
} |
|
|
|
|
// 维修完成图片 |
|
|
|
|
let query1 = { |
|
|
|
|
id: this.detailForm.id, |
|
|
|
|
} |
|
|
|
|
if (this.completeImgList.length > 0) { |
|
|
|
|
query1.completeImgList = JSON.stringify(this.completeImgList) |
|
|
|
|
} |
|
|
|
|
this.$u.api.workOrderupdate(query1).then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
this.$u.api.urgentRepairConfirm(query).then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
uni.showToast({ title: "操作成功", icon: "none" }); |
|
|
|
|
// this.repairConfirmShow = false |
|
|
|
|
// this.getRecordsList() |
|
|
|
|
uni.navigateBack({ |
|
|
|
|
delta: 1 // 默认值是1,表示回退一个页面 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 维修人员 |
|
|
|
|
getRepairPersons() { |
|
|
|
|
@ -727,10 +787,10 @@ export default { |
|
|
|
|
uni.showToast({ title: "申领数量不能为0", icon: "none" }); |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
if (this.deviceData.name == '') { |
|
|
|
|
uni.showToast({ title: "请选择设备", icon: "none" }); |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
// if (this.deviceData.name == '') { |
|
|
|
|
// uni.showToast({ title: "请选择设备", icon: "none" }); |
|
|
|
|
// return false |
|
|
|
|
// } |
|
|
|
|
let data = [] |
|
|
|
|
if (this.repairInfo.isMaterial == 1) { |
|
|
|
|
this.sendOrder.materialsData.map(item => { |
|
|
|
|
@ -744,6 +804,7 @@ export default { |
|
|
|
|
materialCount: item.goodsNum,//领用数量 |
|
|
|
|
orderId: this.detailForm.id, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
@ -756,6 +817,8 @@ export default { |
|
|
|
|
deviceId: this.deviceData.repairPerson, |
|
|
|
|
deviceName: this.deviceData.name, |
|
|
|
|
repairType: this.detailForm.repairType, |
|
|
|
|
laborCost: this.repairInfo.laborCost, |
|
|
|
|
travelExpense: this.repairInfo.travelExpense |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// 紧急维修 |
|
|
|
|
@ -771,7 +834,10 @@ export default { |
|
|
|
|
let query1 = { |
|
|
|
|
id: this.detailForm.id, |
|
|
|
|
deviceId: this.deviceData.repairPerson, |
|
|
|
|
deviceName: this.deviceData.name |
|
|
|
|
deviceName: this.deviceData.name, |
|
|
|
|
repairType: this.detailForm.repairType, |
|
|
|
|
laborCost: this.detailForm.laborCost, |
|
|
|
|
travelExpense: this.detailForm.travelExpense |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.$u.api.servicemanSubmit(query1).then(res => { |
|
|
|
|
|