diff --git a/config/status.js b/config/status.js index 25d272f..98d1e4f 100644 --- a/config/status.js +++ b/config/status.js @@ -10,6 +10,10 @@ export const tabList = { name: "待接单", key: "101,205", }, + { + name: "确认方案", + key: "301", + }, { name: "待确认", key: "405", @@ -23,10 +27,7 @@ export const tabList = { key: "102,300,400", }, - { - name: "确认方案", - key: "301", - }, + { name: "维修中", key: "103,404", @@ -112,7 +113,7 @@ export const tabList = { }, { name: "已驳回", - key: "102,300,400", + key: "102,400", }, { name: "维修完成", diff --git a/pages/submission/records.vue b/pages/submission/records.vue index 975ba4a..0741f96 100644 --- a/pages/submission/records.vue +++ b/pages/submission/records.vue @@ -24,7 +24,7 @@ {{ item.fillingTime }} - {{ item.reportUnit ? item.reportUnit : '单位' }} + {{ item.reportUnitName ? item.reportUnitName : '单位' }} 单号:{{ item.requirementCode }} @@ -70,8 +70,8 @@ - 接单 + 接单 确认付款 - 审批 @@ -97,9 +97,10 @@ type="primary" @click="openModel(item, 'turn')">驳回 提交 - 维修完成 + 维修完成 @@ -230,9 +231,9 @@ export default { }, dataTypes() { this.tabList = tabList[this.$store.state.dataType] - + if (this.requirementCode != '') { - this.current = this.tabList.length-1 + this.current = this.tabList.length - 1 } return this.$store.state.dataType @@ -261,7 +262,7 @@ export default { }, onShow() { - + this.$nextTick(() => { this.getMesseageTotal() if (this.type == '') { @@ -270,14 +271,14 @@ export default { if (this.requirementCode != '') { this.searchInfo.requirementCode = this.requirementCode } else { - if(this.searchInfo.statusSearch == ''){ + if (this.searchInfo.statusSearch == '') { this.searchInfo.statusSearch = this.tabList[0].key == '9999' ? '' : this.tabList[0].key - }else{ + } else { this.searchInfo.statusSearch = this.tabList[0].key == '9999' ? '' : this.searchInfo.statusSearch } - + } - + this.getType() this.getRecordsList() }); @@ -290,7 +291,7 @@ export default { let query = { current: this.page.currentPage, //页数 size: this.page.pageSize, //条数 - dataType:this.userInfo.role_id=='1123598816738675201'?'': this.dataTypes,//数据权限 + dataType: this.userInfo.role_id == '1123598816738675201' ? '' : this.dataTypes,//数据权限 ...this.searchInfo } this.$u.api.getWorkOrderRecords(query).then(res => { diff --git a/pages/submission/recordsdetails.vue b/pages/submission/recordsdetails.vue index 32b5feb..10b08cf 100644 --- a/pages/submission/recordsdetails.vue +++ b/pages/submission/recordsdetails.vue @@ -40,7 +40,7 @@ + v-if="!(detailForm.status == 101||detailForm.status == 100 || detailForm.status == 201 || detailForm.status == 401)"> 维修详情 维修人: @@ -58,6 +58,14 @@ 处理方法: {{ detailForm.processMethod }} + + 人工费: + {{ detailForm.laborCost?detailForm.laborCost:'-' }}元 + + + 差旅费: + {{ detailForm.travelExpense?detailForm.travelExpense:'-' }}元 + 维修材料: diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue index dd7a23d..c335e1b 100644 --- a/pages/submission/sendOrders.vue +++ b/pages/submission/sendOrders.vue @@ -2,7 +2,6 @@ 提报信息 - @@ -34,9 +33,9 @@ - + + v-if="(dataTypes == 4 || dataTypes == 2) && (detailForm.status == 201 || detailForm.status == 101 || detailForm.status == 400 || detailForm.status == 205)"> 派单信息 @@ -90,6 +89,7 @@ + 维修人员驳回 @@ -110,7 +110,7 @@ + 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)"> 维修详情 @@ -119,7 +119,7 @@ - + @@ -134,6 +134,14 @@ :disabled="optionDisabled" :class="optionDisabled ? 'sp-new-input-diabled' : ''" :height="120" /> + + + + + + + + + + + + + + + 主管审批 @@ -220,7 +237,7 @@ + v-if="dataTypes == 2 && (detailForm.status == 101 || detailForm.status == 400 || detailForm.status == 205)"> 取消 确定派单 @@ -242,6 +259,12 @@ 取消 提交 + + + 取消 + 维修完成 + @@ -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 => { diff --git a/utils/website.js b/utils/website.js index 3d8117f..214b69c 100644 --- a/utils/website.js +++ b/utils/website.js @@ -6,8 +6,8 @@ export default { // baseUrl:'http://192.168.0.118:80', //李庆坤 // baseUrl:'http://192.168.1.103:10001', //李涛 // baseUrl:'http://192.168.1.12:80', //李涛 - baseUrl:'http://192.168.0.108:10001', //李庆坤 - // baseUrl:'http://124.221.142.15:8088/api',//远程测试地址 + // baseUrl:'http://192.168.0.108:10001', //李庆坤 + baseUrl:'http://124.221.142.15:8088/api',//远程测试地址 indexTitle: "科研医疗建筑运维平台", clientId: "saber", // 客户端id clientSecret: "saber_secret", // 客户端密钥