|
|
|
|
@ -2,6 +2,8 @@ |
|
|
|
|
<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"> |
|
|
|
|
<u-form-item label="需求单号:" prop="requirementCode" :border-bottom="false"> |
|
|
|
|
@ -34,7 +36,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修人员 接单展示--> |
|
|
|
|
<view class="repair_detail" |
|
|
|
|
v-if="(dataTypes == 4 || dataTypes == 2) && (detailForm.status == 1 || detailForm.status == 0 || detailForm.status == 100)"> |
|
|
|
|
v-if="(dataTypes == 4 || dataTypes == 2) && (detailForm.status == 201 || detailForm.status == 101 || detailForm.status == 400)"> |
|
|
|
|
<view class="repair_title">派单信息</view> |
|
|
|
|
<u-form labelPosition="left" :rules="sendRules" ref="sendOrderForm" :model="sendOrder" :label-width="200" |
|
|
|
|
class="repair_form"> |
|
|
|
|
@ -63,7 +65,7 @@ |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- 维修人员 待提交维修方案 --> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 4 && (detailForm.status == 2 || detailForm.status == 101)"> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 4 && (detailForm.status == 201 || detailForm.status == 300)"> |
|
|
|
|
<view class="repair_title">处理情况</view> |
|
|
|
|
<u-form labelPosition="left" ref="sendOrderForm" :model="detailForm" :label-width="200" class="repair_form"> |
|
|
|
|
<u-form-item label="接单时间:" prop="dispatchTime" :border-bottom="false"> |
|
|
|
|
@ -81,19 +83,25 @@ |
|
|
|
|
</u-form-item> |
|
|
|
|
</u-form> |
|
|
|
|
</view> |
|
|
|
|
<view class="repair_detail" v-if="detailForm.status == 100 || detailForm.status == 101 || detailForm.status == 102"> |
|
|
|
|
<view class="repair_title" v-if="detailForm.status == 100">维修人员驳回</view> |
|
|
|
|
<view class="repair_title" v-if="detailForm.status == 101">主管驳回</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> |
|
|
|
|
<view class="repair_title" v-if="detailForm.status == 300">主管驳回</view> |
|
|
|
|
<view class="repair_title" v-if="detailForm.status == 102">客户驳回</view> |
|
|
|
|
|
|
|
|
|
<u-form labelPosition="left" ref="sendOrderForm" :model="detailForm" :label-width="200" class="repair_form"> |
|
|
|
|
<u-form-item label="驳回原因:" prop="customerOpinion" :border-bottom="false"> |
|
|
|
|
<u-form-item v-if="detailForm.status == 400" label="驳回原因:" prop="customerOpinion" :border-bottom="false"> |
|
|
|
|
<view>{{ detailForm.repaiRejectReason }}</view> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item v-else label="驳回原因:" prop="customerOpinion" :border-bottom="false"> |
|
|
|
|
<view>{{ detailForm.approveRemark }}</view> |
|
|
|
|
</u-form-item> |
|
|
|
|
<!-- repaiRejectReason --> |
|
|
|
|
|
|
|
|
|
</u-form> |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修详情 待提交维修方案 展示 --> |
|
|
|
|
<view class="repair_detail" |
|
|
|
|
v-if="(dataTypes == 4 && (detailForm.status == 2||detailForm.status == 101)) || (dataTypes == 3 && (detailForm.status == 3||detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4)"> |
|
|
|
|
v-if="(dataTypes == 4 && (detailForm.status == 401||detailForm.status == 300)) || (dataTypes == 3 && (detailForm.status == 402||detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 301)"> |
|
|
|
|
<view class="repair_title">维修详情</view> |
|
|
|
|
<u-form labelPosition="left" :rules="repairInfoRules" ref="repairInfoForm" :model="repairInfo" |
|
|
|
|
:label-width="140" class="repair_form"> |
|
|
|
|
@ -102,9 +110,8 @@ |
|
|
|
|
<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"> |
|
|
|
|
<u-input v-model="detailForm.deviceName" :border="true" placeholder="" :disabled="true" |
|
|
|
|
class="sp-new-input-diabled" /> |
|
|
|
|
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false" :required="true"> |
|
|
|
|
<u-input v-model="deviceData.name" :border="true" placeholder="" :disabled="optionDisabled" :class="optionDisabled ? 'sp-new-input-diabled' : ''" type="select" @click="deviceShow = true" /> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="故障原因:" prop="faultReason" :border-bottom="false" :required="true"> |
|
|
|
|
<u-input v-model="repairInfo.faultReason" :border="true" placeholder="请输入" type="textarea" |
|
|
|
|
@ -143,15 +150,15 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<block |
|
|
|
|
v-if="(dataTypes == 3 && (detailForm.status == 3||detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 4) && repairInfo.isMaterial == 1"> |
|
|
|
|
v-if="(dataTypes == 3 && (detailForm.status == 402||detailForm.status == 102)) || (dataTypes == 1 && detailForm.status == 301) && repairInfo.isMaterial == 1"> |
|
|
|
|
<u-form-item label="总价:" prop="reportPeople" :border-bottom="false"> |
|
|
|
|
<view>{{ approveInfo.totalPrice }}</view> |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="折扣:" prop="reportPeople" :border-bottom="false"> |
|
|
|
|
<!-- <betone-new-input label="" v-model="approveInfo.discount" placeholder="" type="number" |
|
|
|
|
@changevalue="changDiscount" />折 --> |
|
|
|
|
<u-input v-model="approveInfo.discount" :border="true" placeholder="" :disabled="true" |
|
|
|
|
:class="optionDisabled ? 'sp-new-input-diabled' : ''" />折 |
|
|
|
|
<u-input v-model="approveInfo.discount" :border="true" placeholder="" :disabled="optionPiceDisabled" |
|
|
|
|
:class="optionPiceDisabled ? 'sp-new-input-diabled' : ''" @input="changDiscount" type="number"/>折 |
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item label="折扣后的金额:" prop="reportPeople" :border-bottom="false" :label-width="240"> |
|
|
|
|
<view>{{ approveInfo.discountPrice }}</view> |
|
|
|
|
@ -161,7 +168,7 @@ |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<!-- 维修负责人 审批 --> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 3 && (detailForm.status == 3||detailForm.status == 102)"> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 3 && (detailForm.status == 402||detailForm.status == 102)"> |
|
|
|
|
<view class="repair_title">主管审批</view> |
|
|
|
|
<u-form labelPosition="left" ref="repairInfoForm" :model="approveInfo" :label-width="140" |
|
|
|
|
class="repair_form"> |
|
|
|
|
@ -179,13 +186,13 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修人员接单确认--> |
|
|
|
|
<view class="repair-4-btn" style="margin-right: 32rpx;width:100%" |
|
|
|
|
v-if="dataTypes == 4 && detailForm.status == 1"> |
|
|
|
|
v-if="dataTypes == 4 && detailForm.status == 201"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" @click="turnShow = true">驳回</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="repairOrderSubmit()">确认接单</u-button> |
|
|
|
|
</view> |
|
|
|
|
<!-- 客户 审批 确认维修方案 --> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 1 && detailForm.status == 4"> |
|
|
|
|
<view class="repair_detail" v-if="dataTypes == 1 && detailForm.status == 301"> |
|
|
|
|
<view class="repair_title">客户审批</view> |
|
|
|
|
<u-form labelPosition="left" ref="repairInfoForm" :model="clientInfo" :label-width="140" |
|
|
|
|
class="repair_form"> |
|
|
|
|
@ -203,22 +210,22 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 客服派单--> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" |
|
|
|
|
v-if="dataTypes == 2 && (detailForm.status == 0 || detailForm.status == 100)"> |
|
|
|
|
v-if="dataTypes == 2 && (detailForm.status == 101 || detailForm.status == 400)"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="sendOrderSubmit()">确定派单</u-button> |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修人员 提交维修方案 --> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 4 && (detailForm.status == 2||detailForm.status == 101)"> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 4 && (detailForm.status == 401||detailForm.status == 300)"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="servicemanSubmit()">提交</u-button> |
|
|
|
|
</view> |
|
|
|
|
<!-- 维修负责人 审批 --> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 3 && detailForm.status == 102"> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 3 && (detailForm.status == 102||detailForm.status == 402)"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="approveSubmit()">提交</u-button> |
|
|
|
|
</view> |
|
|
|
|
<!-- 客户确认维修方案 --> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 1 && detailForm.status == 4"> |
|
|
|
|
<view class="repair-btn" style="margin-right: 32rpx;width:100%" v-if="dataTypes == 1 && detailForm.status == 301"> |
|
|
|
|
<u-button size="medium" @click="endOrderCancel()">取消</u-button> |
|
|
|
|
<u-button size="medium" type="primary" @click="customerSubmit()">提交</u-button> |
|
|
|
|
</view> |
|
|
|
|
@ -278,6 +285,9 @@ |
|
|
|
|
请确认是否进行接单确认? |
|
|
|
|
</view> |
|
|
|
|
</betone-modal> |
|
|
|
|
<!-- 选择设备 --> |
|
|
|
|
<u-select v-model="deviceShow" :list="deviceList" @confirm="deviceConfirm" :isShowsearch="true" |
|
|
|
|
value-name="id" title="选择设备"></u-select> |
|
|
|
|
<betone-loading ref="BetLoading" /> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
@ -293,8 +303,11 @@ export default { |
|
|
|
|
return this.$store.state.dataType == 2 ? false : true |
|
|
|
|
}, |
|
|
|
|
optionDisabled() { |
|
|
|
|
return (this.$store.state.dataType == 3 && (this.detailForm.status == 3||this.detailForm.status == 102)) || (this.$store.state.dataType == 1 && this.detailForm.status == 4) ? 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) ? true : false |
|
|
|
|
}, |
|
|
|
|
optionPiceDisabled(){ |
|
|
|
|
return (this.$store.state.dataType == 3 && (this.detailForm.status == 402||this.detailForm.status == 102)) ? false : true |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
data() { |
|
|
|
|
@ -414,6 +427,13 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
submitOrderShow: false,//维修人员接单确认 |
|
|
|
|
|
|
|
|
|
deviceShow:false,//选择设备 |
|
|
|
|
deviceData:{ |
|
|
|
|
repairPerson: '',//维修人员 id |
|
|
|
|
name: '',//维修人员名字 |
|
|
|
|
}, |
|
|
|
|
deviceList:[],//设备列表 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
@ -421,6 +441,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
onShow() { |
|
|
|
|
this.getRepairPersons()//获取维修人员列表 |
|
|
|
|
this.getDeviceList() |
|
|
|
|
this.orderId = this.$route.query.id |
|
|
|
|
this.getDtails() |
|
|
|
|
this.userInfo = uni.getStorageSync("userinfo"); |
|
|
|
|
@ -459,12 +480,20 @@ export default { |
|
|
|
|
item.goodsNum = item.materialCount |
|
|
|
|
item.name = item.materialName |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.approveInfo.discount = |
|
|
|
|
|
|
|
|
|
// 获取审批总价 |
|
|
|
|
this.approveInfo.totalPrice = data |
|
|
|
|
this.approveInfo.discount = this.detailForm.discount |
|
|
|
|
this.approveInfo.discountPrice = this.detailForm.discountPrice |
|
|
|
|
this.approveInfo.discount = this.detailForm.discount<0?null:this.detailForm.discount |
|
|
|
|
this.approveInfo.discountPrice = this.detailForm.discountPrice<0?null:this.detailForm.discountPrice |
|
|
|
|
|
|
|
|
|
// 设备名称 |
|
|
|
|
if(this.detailForm.status != 201){ |
|
|
|
|
this.deviceData.repairPerson = this.detailForm.deviceId |
|
|
|
|
this.deviceData.name = this.detailForm.deviceName |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
@ -655,6 +684,10 @@ export default { |
|
|
|
|
uni.showToast({ title: "申领数量不能为0", 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 => { |
|
|
|
|
@ -675,13 +708,16 @@ export default { |
|
|
|
|
faultCause: this.repairInfo.faultReason, |
|
|
|
|
processMethod: this.repairInfo.dealMethods, |
|
|
|
|
isNeedMaterial: this.repairInfo.isMaterial, |
|
|
|
|
materials: data |
|
|
|
|
materials: data, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.$u.api.workOrderupdate(query).then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
|
|
|
|
let query1 = { |
|
|
|
|
id: this.detailForm.id |
|
|
|
|
id: this.detailForm.id, |
|
|
|
|
deviceId:this.deviceData.repairPerson, |
|
|
|
|
deviceName:this.deviceData.name |
|
|
|
|
} |
|
|
|
|
this.$u.api.servicemanSubmit(query1).then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
@ -702,7 +738,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 维修负责人审批 输入折扣 |
|
|
|
|
changDiscount(e) { |
|
|
|
|
this.approveInfo.discountPrice = (e / 10) * this.approveInfo.totalPrice |
|
|
|
|
this.approveInfo.discountPrice = ((e / 10) * this.approveInfo.totalPrice).toFixed(2) |
|
|
|
|
}, |
|
|
|
|
changeApproveResult(e) { |
|
|
|
|
this.approveInfo.approveText = this.approveType[e].text |
|
|
|
|
@ -852,6 +888,26 @@ export default { |
|
|
|
|
}, |
|
|
|
|
repairOrderSubmit() { |
|
|
|
|
this.submitOrderShow = true |
|
|
|
|
}, |
|
|
|
|
// 设备列表 |
|
|
|
|
getDeviceList() { |
|
|
|
|
let query={ |
|
|
|
|
current:1, |
|
|
|
|
size:9999, |
|
|
|
|
} |
|
|
|
|
this.$u.api.getDeviceList(query).then(res => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
let data_ = res.data.records |
|
|
|
|
data_.forEach(i => { |
|
|
|
|
this.deviceList.push({ ...i, label: i.name }) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 选择设备 |
|
|
|
|
deviceConfirm(e){ |
|
|
|
|
this.deviceData.name = e[0].label |
|
|
|
|
this.deviceData.repairPerson = e[0].value |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|