From 1f8354d8806d14e1b9f442d5b4f74784048c9e08 Mon Sep 17 00:00:00 2001 From: "LAPTOP-R6EHHS26\\86155" <2217640373@qq.com> Date: Fri, 22 Dec 2023 16:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=B4=E4=BF=AE=E6=8A=A5?= =?UTF-8?q?=E4=BF=AE=E4=B8=8B=E6=8B=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/equipment/Repair/model.ts | 23 ++++++++++ src/pages/equipment/Repair/repairing.vue | 56 ++++++++++++++++++++++-- src/pages/equipment/Repairbx/index.vue | 42 +++++++++++------- src/pages/equipment/Repairbx/model.ts | 11 +++++ src/pages/equipment/index.vue | 21 ++++----- src/pages/shouye/me.vue | 2 +- src/utils/url.ts | 6 +++ 7 files changed, 127 insertions(+), 34 deletions(-) diff --git a/src/pages/equipment/Repair/model.ts b/src/pages/equipment/Repair/model.ts index 06565e9..159d98b 100644 --- a/src/pages/equipment/Repair/model.ts +++ b/src/pages/equipment/Repair/model.ts @@ -55,6 +55,29 @@ export class Repair extends VuexModule { // debugger return { Checklist }; } + //维修原因分析下拉列表 + locList: any = []; + @MutationAction + async getFaultMeasuresList() { + const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultMeasuresList); + const DictListoild: [] = result.data; + const locList = DictListoild.map((item: any) => ({ + label: item.faultSubclass, + value: item.faultSubclass, + })); + return { locList }; + } + locList2: any = []; + @MutationAction + async getFaultDescriptionList() { + const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultDescriptionList); + const DictListoild: [] = result.data; + const locList2 = DictListoild.map((item: any) => ({ + label: item.faultSubclass, + value: item.faultSubclass, + })); + return { locList2 }; + } @MutationAction async rowdatanull() { const rowdata: [] = []; diff --git a/src/pages/equipment/Repair/repairing.vue b/src/pages/equipment/Repair/repairing.vue index 4c6dc06..4ab6732 100644 --- a/src/pages/equipment/Repair/repairing.vue +++ b/src/pages/equipment/Repair/repairing.vue @@ -143,7 +143,7 @@ --> - + - + + + + @@ -239,6 +242,8 @@ export default class ChangePalletNew extends BasePage { cate_name: '巡检记录', }, ]; + moren = '选择原因分析'; + moren2 = '选择维修措施'; current: any = 0; shouciFocus = true; // 详细 @@ -298,6 +303,8 @@ export default class ChangePalletNew extends BasePage { imgformList: any = []; deleteimgList1: any = []; isvalue = false; + workReason: any = {}; + repairMeasures: any = {}; async onReady() { //await this.model.getpalletLocation(); //this.remove = this.model.WlList[0]; @@ -376,6 +383,8 @@ export default class ChangePalletNew extends BasePage { console.log(item); } async onLoad(options) { + await this.model.getFaultMeasuresList(); + await this.model.getFaultDescriptionList(); let str = decodeURIComponent(options.listitem); if (str) { this.detailsinfo = JSON.parse(str); @@ -429,6 +438,14 @@ export default class ChangePalletNew extends BasePage { this.imgList = this.imgList.split(','); } } + async selectProductlocCode(e: any) { + this.workReason = e.pickerName; + // await this.model.getpalletDestination(params); + } + async selectProductlocCode2(e: any) { + this.workReason = e.pickerName; + // await this.model.getpalletDestination(params); + } scrollLeft() { return 222 * (this.imgList.length + 1); } @@ -614,6 +631,7 @@ export default class ChangePalletNew extends BasePage { }); } }); + // if (this.orderNo == '' || this.orderNo.length == 0) { // this.customToast('请输入nficl'); // return; @@ -634,11 +652,26 @@ export default class ChangePalletNew extends BasePage { }); return; } + if (this.workReason.value == '' || this.workReason.value == undefined) { + (this.$refs.uToast as any).show({ + title: '原因分析不能为空', + type: 'default', + }); + return; + } + if (this.repairMeasures.value == '' || this.repairMeasures.value == undefined) { + (this.$refs.uToast as any).show({ + title: '维修措施不能为空', + type: 'default', + }); + return; + } let query = this.detailsinfolist; query.applyList = this.Sparepartlist; query.fileList = this.imgformList.join(','); query.workCost = this.formdata.workCost; - query.workReason = this.formdata.workReason; + query.workReason = this.workReason.value; + query.repairMeasures = this.repairMeasures.value; console.log(query, this.isvalue); await this.model.updateMaintenanceRecords(query); if (this.model.SubmitCode.code == '200') { @@ -646,6 +679,7 @@ export default class ChangePalletNew extends BasePage { title: '成功', type: 'default', }); + this.Clear(); //清除数据 setTimeout(() => { uni.navigateTo({ url: `/pages/equipment/Repair/index?listitem=`, @@ -662,6 +696,17 @@ export default class ChangePalletNew extends BasePage { // return; // } } + Clear() { + this.orderNo = ''; + this.formdata = {}; + this.imgformList = []; + this.workReason = {}; + this.repairMeasures = {}; + // this.shouciFocus = false; + // this.$nextTick(() => { + // this.shouciFocus = true; + // }); + } search(value) { console.log(value); if (value == this.detailsinfolist.equipmentCode) { @@ -1039,11 +1084,14 @@ export default class ChangePalletNew extends BasePage { white-space: nowrap; } .listbottom ::v-deep .uni-input-input { - border: 1px solid black; width: 98%; padding: 10px 5px; box-sizing: border-box; font-weight: 500; + height: 30px; + } + .listbottom1 ::v-deep .uni-input-input { + border: 1px solid black; } ::v-deep .u-form-item { padding: 6px 0; diff --git a/src/pages/equipment/Repairbx/index.vue b/src/pages/equipment/Repairbx/index.vue index 4214493..1db52fd 100644 --- a/src/pages/equipment/Repairbx/index.vue +++ b/src/pages/equipment/Repairbx/index.vue @@ -40,10 +40,10 @@ --> - + - + @@ -100,10 +100,9 @@ import moment from 'moment'; }) export default class ChangePalletNew extends BasePage { params: any = { year: true, month: true, day: true, hour: true, minute: true, second: true }; - endTime: any = {}; model = model; - moren = '选择缓存区'; + moren = '选择故障描述'; shouciFocus = true; zaiciFocus = false; switchListText = [ @@ -148,11 +147,12 @@ export default class ChangePalletNew extends BasePage { isaccord = false; showtime = false; defaulttime: any = ''; + orderDesc: any = {}; async onReady() { this.defaulttime = moment().format('YYYY-MM-DD HH:mm:ss'); console.log(this.defaulttime); // await this.model.getDictList(); - //await this.model.getpalletLocation(); + await this.model.getFaultReasonList(); //this.remove = this.model.WlList[0]; } onShow() { @@ -164,6 +164,9 @@ export default class ChangePalletNew extends BasePage { } } async query() { + this.formdata = {}; + this.imgList = []; + this.orderDesc = {}; if (this.orderNo == '' || this.orderNo.length == 0) { (this.$refs.uToast as any).show({ title: '请扫码条码', @@ -174,12 +177,14 @@ export default class ChangePalletNew extends BasePage { await this.model.queryOrderNo(this.orderNo); //console.log('???',model.orderNoItemList) if (model.orderNoItemList == undefined) { + this.isaccord = false; (this.$refs.uToast as any).show({ title: '该条码未查到数据,请使用正确的条码!', type: 'default', }); } else { if (this.orderNoItemList.productCode == 'EmptyPallet') { + this.isaccord = false; (this.$refs.uToast as any).show({ title: '该条码未查到数据,请使用正确的条码!', type: 'default', @@ -205,6 +210,10 @@ export default class ChangePalletNew extends BasePage { return v.toString(16); }); } + async selectProductlocCode(e: any) { + this.orderDesc = e.pickerName; + // await this.model.getpalletDestination(params); + } timeConfirm(e) { this.orderBreakdownTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.month; this.formdata.orderBreakdownTime = this.orderBreakdownTime; @@ -225,9 +234,9 @@ export default class ChangePalletNew extends BasePage { }); return; } - if (this.formdata.orderDesc == '' || this.formdata.orderDesc == undefined) { + if (this.orderDesc.value == '' || this.orderDesc.value == undefined) { (this.$refs.uToast as any).show({ - title: '请输入故障描述', + title: '故障描述不能为空', type: 'default', }); return; @@ -238,7 +247,7 @@ export default class ChangePalletNew extends BasePage { equipmentCode: this.formdata.equipmentCode, equipmentName: this.formdata.equipmentName, equipmentLocation: this.formdata.equipmentLocation, - orderDesc: this.formdata.orderDesc, + orderDesc: this.orderDesc.value, orderBreakdownTime: this.formdata.orderBreakdownTime, fileList: fileList, orderSource: '手持PDA', @@ -274,15 +283,12 @@ export default class ChangePalletNew extends BasePage { this.orderNo = ''; this.formdata = {}; this.imgList = []; - this.location = ''; - (this.orderBreakdownTime = ''), (this.locationStatus = 1); - this.productCodeList = {}; - this.productCodelocList = {}; - this.shouciFocus = false; + this.orderDesc = {}; + // this.shouciFocus = false; this.model.empty(); - this.$nextTick(() => { - this.shouciFocus = true; - }); + // this.$nextTick(() => { + // this.shouciFocus = true; + // }); } switchChangeFun(e) { //console.log(e); @@ -563,6 +569,10 @@ export default class ChangePalletNew extends BasePage { width: 50%; } .listbottom ::v-deep .uni-input-input { + width: 94%; + padding: 5px; + } + .listbottom1 ::v-deep .uni-input-input { border: 1px solid black; width: 94%; padding: 5px; diff --git a/src/pages/equipment/Repairbx/model.ts b/src/pages/equipment/Repairbx/model.ts index f5d6844..f2ea62f 100644 --- a/src/pages/equipment/Repairbx/model.ts +++ b/src/pages/equipment/Repairbx/model.ts @@ -37,6 +37,17 @@ export class Repairbx extends VuexModule { const equipmentlist = result.rows; return { equipmentlist }; } + locList: any = []; + @MutationAction + async getFaultReasonList() { + const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultReasonList); + const DictListoild: [] = result.data; + const locList = DictListoild.map((item: any) => ({ + label: item.faultSubclass, + value: item.faultSubclass, + })); + return { locList }; + } @MutationAction async rowdatanull() { const rowdata: [] = []; diff --git a/src/pages/equipment/index.vue b/src/pages/equipment/index.vue index 31a823d..026cd71 100644 --- a/src/pages/equipment/index.vue +++ b/src/pages/equipment/index.vue @@ -14,19 +14,7 @@ - + @@ -37,6 +25,7 @@ import { Component } from 'vue-property-decorator'; import { BasePage } from '@/components/base/page'; import { session } from '@/store/modules/session'; +import model from './Repairbx/model'; @Component export default class RawAppointment extends BasePage { childData: any; @@ -51,6 +40,12 @@ export default class RawAppointment extends BasePage { url: `/pages/shouye/index`, }); } + link1(item) { + model.rowdatanull(); + uni.navigateTo({ + url: item.path, + }); + } } diff --git a/src/pages/shouye/me.vue b/src/pages/shouye/me.vue index d2ce627..c104abc 100644 --- a/src/pages/shouye/me.vue +++ b/src/pages/shouye/me.vue @@ -65,7 +65,7 @@ export default class RawHome extends BasePage { model = model; src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg'; today = dayjs().format('YYYY-MM-DD dddd'); - version = '0.0.19'; + version = '0.0.20'; checkversion: any = {}; sessiondata: any = ''; onLoad() { diff --git a/src/utils/url.ts b/src/utils/url.ts index 917fdd5..57b01e6 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -129,6 +129,12 @@ export const url = { updateMaintenanceRecords: qianzhuione + '/device/devicePDA/updateMaintenanceRecords', // 备件list list: qianzhuione + '/device/sparePartsLedger/list', + // 维修详情里的原因分析 + getFaultMeasuresList: qianzhuione + '/device/devicePDA/getFaultMeasuresList', + // 维修详情里的原因分析 + getFaultDescriptionList: qianzhuione + '/device/devicePDA/getFaultDescriptionList', + // 维修详情里的原因分析 + getFaultReasonList: qianzhuione + '/device/devicePDA/getFaultReasonList', }, // 保养 Upkeep: {