From 964faa1077a89713910063c39ebe08fac4e4c56e Mon Sep 17 00:00:00 2001 From: Houjie <714924425@qq.com> Date: 星期四, 24 七月 2025 17:44:18 +0800 Subject: [PATCH] 企业维修适配修改 --- pages/baoZhou/baoZhou.vue | 222 +++++++++++++++++++++--------------------------------- 1 files changed, 87 insertions(+), 135 deletions(-) diff --git a/pages/baoZhou/baoZhou.vue b/pages/baoZhou/baoZhou.vue index 87e81cb..39afdc5 100644 --- a/pages/baoZhou/baoZhou.vue +++ b/pages/baoZhou/baoZhou.vue @@ -2,7 +2,12 @@ <view class="container"> <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> <block slot="backText">杩斿洖</block> - <block slot="content">鍛ㄤ繚</block> + <block slot="content">寰呭懆淇�</block> + <block slot="right"> + <view @click="search"> + <image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" /> + </view> + </block> </cu-custom> <view style="width: 100%;"> @@ -11,11 +16,13 @@ <!-- 鍩虹琛ㄥ崟鏍¢獙 --> <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> <uni-group title="" top="0"> - <uni-forms-item name="numbers" label="棰嗘枡鐢宠鍗曞彿:"> - <uni-easyinput type="text" v-model="formData.num" placeholder="璇疯緭鍏ラ鏂欑敵璇峰崟鍙锋绱�" /> + <uni-forms-item name="orderNum" label="宸ュ崟鍙�:"> + <uni-easyinput type="text" v-model="formData.orderNum" placeholder="璇疯緭鍏ラ鏂欑敵璇峰崟鍙锋绱�" /> </uni-forms-item> - <uni-forms-item name="name" label="棰嗘枡浜у搧:"> - <uni-easyinput v-model="formData.partNumNameModel" placeholder="璇疯緭鍏ラ鏂欎骇鍝�" /> + <uni-forms-item name="name" label="鎶芥鏍囪:"> + <uni-data-select v-model="formData.InspectionFlagName" + :localdata="formData.randomInspectionFlagList" + @change="changehandlingInspectionFlag" placeholder="璇烽�夋嫨" /> </uni-forms-item> </uni-group> </uni-forms> @@ -53,6 +60,15 @@ {{item.equipmentCode}} </view> </view> + <!-- <view class="flex"> + <view class="flex-sub text-light bg-white padding-xs margin-xs radius">鎶芥鏍囪:</view> + <view v-if="item.randomInspectionFlag =='1'" class="flex-sub bg-white padding-xs margin-xs radius text-right"> + 宸叉娊妫� + </view> + <view v-else class="flex-sub bg-white padding-xs margin-xs radius text-right"> + 鏈娊妫� + </view> + </view> --> <view class="flex"> <view class="flex-sub text-light bg-white padding-xs margin-xs radius">鍛ㄤ繚鏃ユ湡:</view> <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> @@ -63,10 +79,7 @@ <view class="flex-sub text-light bg-white padding-xs margin-xs radius">鎿嶄綔:</view> <view class="flex-sub bg-blue padding-xs margin-xs radius text-sm text-center" @click.stop="handleStartWork(item)" hover-class="is-hover">棰嗗彇</view> - </view> - - </uni-card> </view> @@ -83,16 +96,27 @@ return { type: 'top', scrollLeft: 0, + formData: { - num: '', - partNumNameModel: '' + + orderNum: '', + InspectionFlagName: '', + randomInspectionFlagList: [{ + text: "鍚�", + value: '0' + }, + { + text: "鏄�", + value: '1' + } + ] }, NavBarColor: this.NavBarColor, activeColor: '#5277A6', url: { - stallList: "/eam/weekMaintenanceOrder/list", collect: "eam/weekMaintenanceOrder/collect" + }, upOption: { @@ -117,7 +141,8 @@ announcement1: [], msg1Count: 0, msg2Count: 0, - msg1Title: "" + msg1Title: "", + equipmentId:'' } }, computed: { @@ -138,9 +163,20 @@ this.mescroll.resetUpScroll() } }, - - created() {}, + onLoad: function(options) { + this.equipmentId = options.equipmentId ? + decodeURIComponent(options.equipmentId) : + ''; + }, + created() { + + }, methods: { + + + changehandlingInspectionFlag(e) { + this.formData.InspectionFlagName = e; + }, /** * 棰嗗彇 */ @@ -149,7 +185,7 @@ this.$tip.loading(); this.$http.get(this.url.collect, { params: { - id: item.id, + id: item.id, }, }).then(res => { console.log(res) @@ -200,7 +236,8 @@ pageSize: page.size, order: 'desc', column: 'createTime', - maintenanceStatus: 'WAIT_MAINTENANCE' + maintenanceStatus: 'WAIT_MAINTENANCE', + equipmentId: this.equipmentId || '' }, }).then(res => { @@ -230,8 +267,8 @@ resetTask() { - this.formData.num = '' - this.formData.partNumNameModel = '' + this.formData.orderNum = '' + this.formData.randomInspectionFlag = '' this.$refs.popup.close(); this.mescroll.resetUpScroll() @@ -239,127 +276,42 @@ /* 妫�绱� */ getSera() { this.$refs.popup.close(); - let keyword = this.TabCur this.msgList = []; - if (keyword == 0) { - this.$http.get(this.url.stallList, { - params: { - pageNo: 1, - pageSize: 999, - order: "desc", - column: "createTime", - num: '*' + this.formData.num + '*', - partNumNameModel: '*' + this.formData.partNumNameModel + '*', - status: 'published' + this.$http.get(this.url.stallList, { + params: { + pageNo: 1, + pageSize: 999, + order: "desc", + column: "createTime", + maintenanceStatus: 'WAIT_MAINTENANCE', + orderNum: this.formData.orderNum, + randomInspectionFlag: this.formData.InspectionFlagName + } + }).then(res => { + //鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��; + this.announcement1 = res.data.result.records + this.mescroll.endSuccess(this.announcement1.length); + console.log("url", res) + //璁剧疆鍒楄〃鏁版嵁 + if (res.data.success) { + console.log("res", res.data) + this.msg1Count = res.data.result.total + this.msg1Title = "閫氱煡(" + res.data.result.total + ")"; + for (let annItem of this.announcement1) { + this.msgList.push(annItem) } - }).then(res => { - //鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��; + } + if (page.num == 1) { + this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃 + this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹� + } - this.announcement1 = res.data.result.records - this.mescroll.endSuccess(this.announcement1.length); - console.log("url", res) - //璁剧疆鍒楄〃鏁版嵁 - if (res.data.success) { - console.log("res", res.data) - this.msg1Count = res.data.result.total - this.msg1Title = "閫氱煡(" + res.data.result.total + ")"; - for (let annItem of this.announcement1) { - this.msgList.push(annItem) - } - } - if (page.num == 1) { - this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃 - this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹� - } - - }).catch(() => { - //鑱旂綉澶辫触, 缁撴潫鍔犺浇 - this.mescroll.endErr(); - }) - - } else if (keyword == 1) { - this.$http.get(this.url.stallList, { - params: { - pageNo: 1, - pageSize: 999, - order: "desc", - column: "createTime", - status: 'training', - num: '*' + this.formData.num + '*', - partNumNameModel: '*' + this.formData.partNumNameModel + '*' - - } - }).then(res => { - //鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��; - - this.announcement1 = res.data.result.records - this.mescroll.endSuccess(this.announcement1.length); - console.log("url", res) - //璁剧疆鍒楄〃鏁版嵁 - if (res.data.success) { - console.log("res", res.data) - this.msg1Count = res.data.result.total - this.msg2Title = "閫氱煡(" + res.data.result.total + ")"; - for (let annItem of this.announcement1) { - this.msgList.push(annItem) - } - } - if (page.num == 1) { - this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃 - this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹� - } - - }).catch(() => { - //鑱旂綉澶辫触, 缁撴潫鍔犺浇 - this.mescroll.endErr(); - }) - - } else if (keyword == 2) { - this.$http.get(this.url.stallList, { - params: { - pageNo: 1, - pageSize: 999, - order: "desc", - column: "createTime", - status: 'completed', - num: '*' + this.formData.num + '*', - partNumNameModel: '*' + this.formData.partNumNameModel + '*' - - } - }).then(res => { - //鑱旂綉鎴愬姛鐨勫洖璋�,闅愯棌涓嬫媺鍒锋柊鍜屼笂鎷夊姞杞界殑鐘舵��; - - this.announcement1 = res.data.result.records - this.mescroll.endSuccess(this.announcement1.length); - console.log("url", res) - //璁剧疆鍒楄〃鏁版嵁 - if (res.data.success) { - console.log("res", res.data) - this.msg3Count = res.data.result.total - this.msg1Title = "閫氱煡(" + res.data.result.total + ")"; - for (let annItem of this.announcement1) { - this.msgList.push(annItem) - } - } - if (page.num == 1) { - this.msgList = []; //濡傛灉鏄涓�椤甸渶鎵嬪姩鍒剁┖鍒楄〃 - this.msgList = this.msgList.concat(this.announcement1); //杩藉姞鏂版暟鎹� - } - - }).catch(() => { - //鑱旂綉澶辫触, 缁撴潫鍔犺浇 - this.mescroll.endErr(); - }) - - } - - - - - + }).catch(() => { + //鑱旂綉澶辫触, 缁撴潫鍔犺浇 + this.mescroll.endErr(); + }) }, - mescrollInit(mescroll) { console.log('mescrollInit') @@ -388,7 +340,7 @@ } .popupView { - margin-top: 85px; + margin-top: 45px; height: auto; } </style> \ No newline at end of file -- Gitblit v1.9.3