common/http.api.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/product/report/components/saveForm.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/product/report/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/product/report/seachPersonnelNo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
common/http.api.js
@@ -507,7 +507,9 @@ cancelReporting: { // åæ¶æ¥å·¥ç¡®è®¤ cancelDTAOfWorkApplication: (params = {}) => vm.$u.get('/mes/product/cancelDTAOfWorkApplication', params), selInputPartInfoPDA: (params = {}) => vm.$u.get('/mes/stock/selInputPartInfoPDA',params), selInputPartInfoPDA: (params = {}) => vm.$u.get('/mes/stock/selInputPartInfoPDA', params), fuzzyQuery: (params = {}) => vm.$u.get('mes/applyPart/fuzzyQuery', params), getStockNoPageByWorkstationId: (params = {}) => vm.$u.get('/mes/stock/getStockNoPageByWorkstationId', params), }, // 车é´è®¢åä¸å WorkshopOrderIssued: { pages.json
@@ -792,6 +792,15 @@ "navigationBarBackgroundColor": "#3281FF" } }, // ææå表 { "path": "pages/product/report/seachPersonnelNo", "style": { "navigationStyle": "custom", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#3281FF" } }, // åæ¶æ¥å·¥ { "path": "pages/product/cancelReport/index", pages/product/report/components/saveForm.vue
@@ -1,34 +1,23 @@ <template> <view> <u-modal v-model="show" ref="uModal" title="" :show-cancel-button="true" @confirm="confirm" @cancel="cancel" :async-close="true" :loading="loading" > <view class="packing-registration-param"> <scroll-view scroll-y="true" style=" <view> <u-modal v-model="show" ref="uModal" title="" :show-cancel-button="true" @confirm="confirm" @cancel="cancel" :async-close="true"> <view class="packing-registration-param"> <scroll-view scroll-y="true" style=" height: 100%; transform: translateZ(0); -webkit-font-smoothing: antialiased; " > <view class="packing-registration-param-view"> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¹å·</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.outBatchNo" /> </view> </view> <view class="packing-registration-param-item param-extra"> "> <view class="packing-registration-param-view"> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¹å·</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.outBatchNo" /> </view> </view> <!-- <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æææ¹æ¬¡</text> </view> @@ -39,372 +28,346 @@ disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">é¿åº¦</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.overallLength" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">åºä½</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.proposedLocation" disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">çå·</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.reelNumber" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">çé</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.reelWeight" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¯é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.grossWeight" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">åé</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.netWeight" disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> </view> --> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">é¿åº¦</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.overallLength" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">åºä½</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.proposedLocation" disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">çå·</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.reelNumber" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">çé</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.reelWeight" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¯é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.grossWeight" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">åé</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.netWeight" disabled /> </view> </view> <!-- <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">åºæ</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.waste" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">å·¥åº</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.name" disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æåå¤å¾æµéå¼</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.outerDiameter" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">éç«çµå</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.voltage" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">转é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.speed" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">å¤é¨æ°å</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.pressure" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one item-two">ç产é度</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.productionSpeed" /> </view> </view> </view> </scroll-view> </view> </u-modal> <u-modal v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true" @confirm="confirmTl" @cancel="cancelTl" > <view class="packing-registration-param"> <view class="packing-registration-param-view"> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¹å·</text> </view> <view class="packing-registration-param-item-right"> <text class="item-one item-two">{{ </view> --> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">å·¥åº</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.name" disabled /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æåå¤å¾æµéå¼</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.outerDiameter" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">éç«çµå</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.voltage" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">转é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.speed" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">å¤é¨æ°å</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.pressure" /> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one item-two">ç产é度</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="form.productionSpeed" /> </view> </view> </view> </scroll-view> </view> </u-modal> <u-modal v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true" @confirm="confirmTl" @cancel="cancelTl"> <view class="packing-registration-param"> <view class="packing-registration-param-view"> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¹å·</text> </view> <view class="packing-registration-param-item-right"> <text class="item-one item-two">{{ detailedList.ifsBatchNo }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">é¶ä»¶æè¿°</text> </view> <view class="packing-registration-param-item-right"> <text class="item-one item-two">{{ detailedList.partName }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ°é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="detailedList.suppliedQuantity" /> </view> </view> </view> </view> </u-modal> </view> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">é¶ä»¶æè¿°</text> </view> <view class="packing-registration-param-item-right"> <text class="item-one item-two">{{ detailedList.partName }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ°é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="detailedList.suppliedQuantity" /> </view> </view> </view> </view> </u-modal> </view> </template> <script> export default { props: { operationTaskList: { type: Object, required: true, default: () => ({}), }, dutyId: { type: Number, required: true, default: "", }, }, data() { return { showModal: false, detailedList: {}, show: false, form: {}, ifsBatchNo: [], productInputList: [], loading: false, }; }, watch: { "form.grossWeight"(val) { if (val === "") { this.form.netWeight = ""; } else if (this.form.reelWeight) { this.form.netWeight = parseFloat(val) - parseFloat(this.form.reelWeight); } }, "form.reelWeight"(val) { if (this.form.grossWeight && val) { this.form.netWeight = parseFloat(this.form.grossWeight) - parseFloat(val); } }, }, methods: { confirm() { if (this.loading) return; // if (!this.form.outerDiameter) { // this.$u.toast("请è¾å ¥æåå¤å¾æµéå¼"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.voltage) { // this.$u.toast("请è¾å ¥éç«çµå"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.speed) { // this.$u.toast("请è¾å ¥è½¬é"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.pressure) { // this.$u.toast("请è¾å ¥å¤é¨æ°å"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.productionSpeed) { // this.$u.toast("请è¾å ¥ç产é度"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } if (!this.form.outBatchNo) { this.$u.toast("请è¾å ¥æ¹å·"); this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ return; } if (Number(this.form.netWeight) == 0) { this.$u.toast("åéä¸ä¸º0"); this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ return; } if (!this.form.waste) { this.$u.toast("请è¾å ¥åºæ"); this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ return; } if (this.form.productInputList.length == 0) { this.$u.toast("æææ¹æ¬¡ä¸è½ä¸ºç©ºï¼è¯·æ«ç ææ"); this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ return; } this.operationTaskList.operationTaskId = this.operationTaskList.id; this.form.operationTaskId = this.operationTaskList.id; this.form.status = this.operationTaskList.status; this.form.Persons = this.operationTaskList.Persons; this.form.productStaffIds = this.operationTaskList.productStaffIds; this.form.productStaffs = this.operationTaskList.productStaffs; this.form.dutyRecordId = this.dutyId; this.operationTaskList.productOutputList = []; // å建ä¸ä¸ªç©ºæ°ç» this.operationTaskList.productOutputList.push(this.form); // åæ°ç»ä¸æ·»å å ç´ console.log("this.operationTaskList", this.operationTaskList); this.loading = true; this.$u.api.workReporting .submitPDA(this.operationTaskList) .then((res) => { this.$emit("update",this.operationTaskList); this.$refs.uModal.cancel(); }) .finally(() => { this.loading = false; this.$refs.uModal.clearLoading(); }); }, cancel() { this.show = false; this.form = {}; this.ifsBatchNo = []; this.productInputList = []; }, cancelTl() { this.showModal = false; this.detailedList = {}; }, updateArray(arr, newObj) { // æ¥æ¾æ°ç»ä¸æ¯å¦æç¸åç id let index = arr.findIndex(item => item.ifsBatchNo === newObj.ifsBatchNo); if (index !== -1) { // 妿æ¾å°ç¸å id çå¯¹è±¡ï¼æ¿æ¢åæå¯¹è±¡ arr[index] = newObj; } else { // å¦ææ²¡ææ¾å°ç¸å id ç对象ï¼ç´æ¥æ¨å ¥æ°å¯¹è±¡ arr.push(newObj); } return arr; }, confirmTl() { let ifsBatchNoArr = []; let updatedArrayList = this.updateArray(this.productInputList, this.detailedList); console.log("updatedArrayList", updatedArrayList); // this.productInputList.push(updatedArrayList); this.$set(this.form, "productInputList", this.productInputList); export default { props: { operationTaskList: { type: Object, required: true, default: () => ({}), }, dutyId: { type: Number, required: true, default: "", }, }, data() { return { showModal: false, detailedList: {}, show: false, form: {}, ifsBatchNo: [], productInputList: [], // loading: false, }; }, watch: { "form.grossWeight"(val) { if (val === "") { this.form.netWeight = ""; } else if (this.form.reelWeight) { this.form.netWeight = parseFloat(val) - parseFloat(this.form.reelWeight); } }, "form.reelWeight"(val) { if (this.form.grossWeight && val) { this.form.netWeight = parseFloat(this.form.grossWeight) - parseFloat(val); } }, }, methods: { confirm() { // if (this.loading) return; // if (!this.form.outerDiameter) { // this.$u.toast("请è¾å ¥æåå¤å¾æµéå¼"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.voltage) { // this.$u.toast("请è¾å ¥éç«çµå"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.speed) { // this.$u.toast("请è¾å ¥è½¬é"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.pressure) { // this.$u.toast("请è¾å ¥å¤é¨æ°å"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (!this.form.productionSpeed) { // this.$u.toast("请è¾å ¥ç产é度"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } if (!this.form.outBatchNo) { this.$u.toast("请è¾å ¥æ¹å·"); this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ return; } if (Number(this.form.netWeight) == 0) { this.$u.toast("åéä¸ä¸º0"); this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ return; } // if (!this.form.waste) { // this.$u.toast("请è¾å ¥åºæ"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // if (this.form.productInputList.length == 0) { // this.$u.toast("æææ¹æ¬¡ä¸è½ä¸ºç©ºï¼è¯·æ«ç ææ"); // this.$refs.uModal.clearLoading(); // æ¸ é¤å è½½ç¶æ // return; // } // this.operationTaskList.operationTaskId = this.operationTaskList.id; // this.form.operationTaskId = this.operationTaskList.id; // this.form.status = this.operationTaskList.status; // this.form.Persons = this.operationTaskList.Persons; // this.form.productStaffIds = this.operationTaskList.productStaffIds; // this.form.productStaffs = this.operationTaskList.productStaffs; // this.form.dutyRecordId = this.dutyId; // this.operationTaskList.productOutputList = []; // å建ä¸ä¸ªç©ºæ°ç» // this.operationTaskList.productOutputList.push(this.form); // åæ°ç»ä¸æ·»å å ç´ // console.log("this.operationTaskList", this.operationTaskList); // this.loading = true; // this.$u.api.workReporting // .submitPDA(this.operationTaskList) // .then((res) => { // this.$emit("update",this.operationTaskList); // this.$refs.uModal.cancel(); // }) // .finally(() => { // this.loading = false; // this.$refs.uModal.clearLoading(); // }); this.$emit("update", this.form); this.$refs.uModal.clearLoading(); this.$refs.uModal.cancel(); }, cancel() { this.show = false; this.form = {}; this.ifsBatchNo = []; this.productInputList = []; }, cancelTl() { this.showModal = false; this.detailedList = {}; }, updateArray(arr, newObj) { // æ¥æ¾æ°ç»ä¸æ¯å¦æç¸åç id let index = arr.findIndex(item => item.ifsBatchNo === newObj.ifsBatchNo); this.productInputList.forEach((item) => { ifsBatchNoArr.push(item.ifsBatchNo) }) console.log("ifsBatchNoArr", ifsBatchNoArr); // this.ifsBatchNo.push(ifsBatchNoArr); this.$set(this.form, "ifsBatchNoArr", ifsBatchNoArr); console.log("this.form", this.form); this.showModal = false; this.detailedList = {}; }, open(val) { this.show = true; this.form = val.data; }, // åæ¾æ«ç çä¿¡æ¯-æ¥å·¥å saveForm(val) { this.$u.api.cancelReporting .selInputPartInfoPDA({ outBatchNo: val.BN, partNo: val.PN, moOn: this.operationTaskList.moOn, }) .then((res) => { const list = { suppliedQuantity: res.data.suppliedQuantity, ifsBatchNo: res.data.ifsBatchNo, partNo: res.data.partNo, partName: res.data.partName, locationNo: res.data.locationNo, ifsLineItemNo: res.data.ifsLineItemNo, serialNo: res.data.serialNo, engChgLevel: res.data.engChgLevel, ifsWdr: res.data.waivDevRejNo, activitySeq: res.data.activitySeq, }; this.detailedList = list; this.showModal = true; }); }, }, }; if (index !== -1) { // 妿æ¾å°ç¸å id çå¯¹è±¡ï¼æ¿æ¢åæå¯¹è±¡ arr[index] = newObj; } else { // å¦ææ²¡ææ¾å°ç¸å id ç对象ï¼ç´æ¥æ¨å ¥æ°å¯¹è±¡ arr.push(newObj); } return arr; }, confirmTl() { let ifsBatchNoArr = []; let updatedArrayList = this.updateArray(this.productInputList, this.detailedList); console.log("updatedArrayList", updatedArrayList); // this.productInputList.push(updatedArrayList); this.$set(this.form, "productInputList", this.productInputList); this.productInputList.forEach((item) => { ifsBatchNoArr.push(item.ifsBatchNo) }) console.log("ifsBatchNoArr", ifsBatchNoArr); // this.ifsBatchNo.push(ifsBatchNoArr); this.$set(this.form, "ifsBatchNoArr", ifsBatchNoArr); console.log("this.form", this.form); this.showModal = false; this.detailedList = {}; }, open(val) { this.show = true; this.form = val.data; }, // åæ¾æ«ç çä¿¡æ¯-æ¥å·¥å saveForm(val) { this.$u.api.cancelReporting .selInputPartInfoPDA({ outBatchNo: val.BN, partNo: val.PN, moOn: this.operationTaskList.moOn, }) .then((res) => { const list = { suppliedQuantity: res.data.suppliedQuantity, ifsBatchNo: res.data.ifsBatchNo, partNo: res.data.partNo, partName: res.data.partName, locationNo: res.data.locationNo, ifsLineItemNo: res.data.ifsLineItemNo, serialNo: res.data.serialNo, engChgLevel: res.data.engChgLevel, ifsWdr: res.data.waivDevRejNo, activitySeq: res.data.activitySeq, }; this.detailedList = list; this.showModal = true; }); }, }, }; </script> <style lang="scss" scoped> ::v-deep .u-model__title { padding-top: 0 !important; } ::v-deep .u-model__title { padding-top: 0 !important; } ::v-deep .u-input__input { text-align: right !important; } @import "../index.scss"; ::v-deep .u-input__input { text-align: right !important; } @import "../index.scss"; </style> pages/product/report/index.vue
@@ -23,40 +23,48 @@ <u-form-item label="é¶ä»¶æè¿°" :border-bottom="false" prop="partName" style="font-size:small"> <u-input v-model="form.partName" placeholder="" disabled /> </u-form-item> <u-form-item label="æ¹é大å°" :border-bottom="false" prop="qtyRequired" style="font-size:small"> <!-- <u-form-item label="æ¹é大å°" :border-bottom="false" prop="qtyRequired" style="font-size:small"> <u-input v-model="form.qtyRequired" placeholder="" disabled /> </u-form-item> <u-form-item label="å©ä½æ°é" :border-bottom="false" prop="Jianqtyfinished" style="font-size:small"> <u-input v-model="form.Jianqtyfinished" placeholder="" disabled /> </u-form-item> --> <u-form-item label="ææäº§é" :border-bottom="false" prop="FeedInputProductionVolume" style="font-size:small"> <u-input v-model="form.FeedInputProductionVolume" type="select" placeholder="è¯·å¡«åææäº§é" @click="FeedInputProductionVolumeCLick" /> </u-form-item> <u-form-item label="æ±æ¥äº§é" :border-bottom="false" prop="reportProductionVolume" style="font-size:small"> <u-input v-model="form.reportProductionVolume" type="select" placeholder="è¯·å¡«åæ±æ¥äº§é" @click="reportProductionVolumeCLick" /> </u-form-item> <u-form-item label="åºä½" :border-bottom="false" prop="proposedLocation" style="font-size:small"> <u-input v-model="form.proposedLocation" placeholder="" disabled /> </u-form-item> <u-form-item label="æ¥å·¥ç±»å" label-width="90px" prop="productType" style="font-size:small"> <!-- <u-form-item label="æ¥å·¥ç±»å" label-width="90px" prop="productType" style="font-size:small"> <u-radio-group v-model="form.productType" :disabled="subdisabled"> <u-radio name="dep"><span style="font-size:small">䏿ºæ¥å·¥</span></u-radio> <u-radio name="ndep"><span style="font-size:small">æªä¸æºæ¥å·¥</span></u-radio> </u-radio-group> </u-form-item> <u-form-item label="æ¥æ¶é¶ä»¶" label-width="90px" prop="receive" style="font-size:small"> </u-form-item> --> <!-- <u-form-item label="æ¥æ¶é¶ä»¶" label-width="90px" prop="receive" style="font-size:small"> <u-radio-group v-model="form.receive" :disabled="subdisabled"> <u-radio name="mo"><span style="font-size:small">车é´è®¢å</span></u-radio> <u-radio name="part"><span style="font-size:small">æ¿ä»£é¶ä»¶</span></u-radio> </u-radio-group> </u-form-item> </u-form-item> --> <u-form-item label="ç©æ" label-width="90px" prop="materialCost" style="font-size:small"> <u-radio-group v-model="form.materialCost" :disabled="true"> <u-radio name="åå²"><span style="font-size:small">åå²</span></u-radio> <u-radio name="ææ"><span style="font-size:small">ææ</span></u-radio> </u-radio-group> </u-form-item> <u-form-item label="ç®åç©ææ£æ¥" label-width="90px" prop="simplifyMaterials" style="font-size:small"> <!-- <u-form-item label="ç®åç©ææ£æ¥" label-width="90px" prop="simplifyMaterials" style="font-size:small"> <u-radio-group v-model="form.simplifyMaterials" :disabled="subdisabled || simplifyDisabled" @change="radioChange"> <u-radio name="true"><span style="font-size:small">æ¯</span></u-radio> <u-radio name="false"><span style="font-size:small">å¦</span></u-radio> </u-radio-group> </u-form-item> </u-form-item> --> <u-form-item label="æ¥å·¥æ¹å¼" label-width="90px" prop="status" style="font-size:small"> <u-radio-group v-model="form.status" :disabled="subdisabled" @change="handleReportTypeChange"> <u-radio name="false"><span style="font-size:small">æçç»æ¥å·¥</span></u-radio> @@ -210,8 +218,10 @@ moOn: "", partNo: "", partName: "", qtyRequired: "", Jianqtyfinished: "", // qtyRequired: "", // Jianqtyfinished: "", FeedInputProductionVolume: null, //ææäº§é reportProductionVolume: null, //æ±æ¥äº§é proposedLocation: "", productType: "dep", receive: "mo", @@ -222,7 +232,10 @@ Persons: '', productStaffIds: [], productStaffs: [] }, reportProductionVolumelist: {}, FeedInputProductionVolumeList: [], //ææäº§é personList: [], canSelectPerson: false, rules: { @@ -266,6 +279,17 @@ message: "è¯·éæ©äººå", trigger: ["change"], }, ], reportProductionVolume: [{ required: true, message: "请è¾å ¥æ±æ¥äº§é", trigger: ["change"], }, ], // FeedInputProductionVolume: [{ // required: true, // message: "请è¾å ¥ææäº§é", // trigger: ["change"], // }, ], }, showSave: false, operationTaskId: "", @@ -286,15 +310,30 @@ mask: true, title: "å è½½ä¸", }); // å¤çæäº¤é»è¾ this.form.operationTaskId = this.form.id; this.reportProductionVolumelist.operationTaskId = this.form.id; this.reportProductionVolumelist.status = this.form.status; this.reportProductionVolumelist.Persons = this.form.Persons; this.reportProductionVolumelist.productStaffIds = this.form.productStaffIds; this.reportProductionVolumelist.productStaffs = this.form.productStaffs; this.reportProductionVolumelist.productInputList = Object.keys(this.FeedInputProductionVolumeList).length === 0 ? null : this.FeedInputProductionVolumeList; this.reportProductionVolumelist.dutyRecordId = this.dutyId; this.form.productOutputList = []; // å建ä¸ä¸ªç©ºæ°ç» this.form.productOutputList.push(this.reportProductionVolumelist); // åæ°ç»ä¸æ·»å å ç´ console.log("this.form", this.form); this.$u.api.workReporting .operationTask({ id: this.form.id, }) .submitPDA(this.form) .then((res) => { res.data.name = this.form.name; this.$refs.saveForm.open(res); uni.hideLoading(); this.subdisabled = true; this.$u.toast("æäº¤æå"); this.InventoryReceiptList.unshift(this.form.productOutputList[0]); this.reportProductionVolumelist = {}, this.FeedInputProductionVolumeList = [], //ææäº§é this.form.FeedInputProductionVolume = null, //ææäº§é this.form.reportProductionVolume = null, //æ±æ¥äº§é console.log("this.InventoryReceiptList", this.InventoryReceiptList); }) .finally(() => { }); } else { // å¯ä»¥è·åå ·ä½çéè¯¯ä¿¡æ¯ @@ -322,10 +361,10 @@ // æ«ææ¥å·¥åäºç»´ç that.CopperReportingWork(codeInfo); } if (codeInfo.BN) { // æ«ææ¥å·¥åäºç»´ç that.$refs.saveForm.saveForm(codeInfo); } // if (codeInfo.BN) { // // æ«ææ¥å·¥åäºç»´ç // that.$refs.saveForm.saveForm(codeInfo); // } } }); }, @@ -341,6 +380,48 @@ } }, methods: { // ææäº§é FeedInputProductionVolumeCLick() { if (this.form.taskNo === "") { uni.showToast({ title: "è¯·å æ«ç ", icon: "none", }); return; } if (this.simplifyDisabled) { uni.showToast({ title: "å岿 éææ", icon: "none", }); return; } uni.navigateTo({ url: "/pages/product/report/seachPersonnelNo?moOn=" + this.form.moOn + "&workstationId=" + this.form.workstationId, }); }, // æ±æ¥äº§é reportProductionVolumeCLick() { if (this.form.taskNo === "") { uni.showToast({ title: "è¯·å æ«ç ", icon: "none", }); return; } // å¤çæäº¤é»è¾ this.$u.api.workReporting .operationTask({ id: this.form.id, }) .then((res) => { res.data.name = this.form.name; this.$refs.saveForm.open(res); uni.hideLoading(); }); }, // å¤çæ¥å·¥æ¹å¼åæ´ handleReportTypeChange() { // 忢æ¥å·¥æ¹å¼æ¶æ¸ 空人ååç§° @@ -416,8 +497,8 @@ copperList.productStaffIds = this.form.productStaffIds; copperList.productStaffs = this.form.productStaffs; this.form.productOutputList = []; this.form.operationTaskId = this.form.id; this.form.dutyRecordId = this.dutyId; this.form.operationTaskId = this.form.id; this.form.dutyRecordId = this.dutyId; this.form.productOutputList.push(copperList); console.log('this.form', this.form) this.$u.api.workReporting.submitPDA(this.form).then((res) => { @@ -460,7 +541,7 @@ }, confirmModle() { console.log("ç¹å»ç¡®è®¤åè·ååæ¶æ¥å·¥è®°å½"); console.log("ç¹å»ç¡®è®¤åè·ååæ¶æ¥å·¥è®°å½",this.detailedList); // å¤ç确认é»è¾ this.$u.api.cancelReporting .cancelDTAOfWorkApplication({ @@ -469,7 +550,7 @@ }) .then((res) => { console.log("res", res); this.detailedList.splice(this.index, 1) this.InventoryReceiptList.splice(this.index, 1) this.showModal = false; // this.getHandelList(); this.$u.toast("åæ¶æ¥å·¥æå"); @@ -479,7 +560,7 @@ this.showModal = false; // å ³éå¼¹çª }, // åæ¶æ¥å·¥ cancelReport(item,index) { cancelReport(item, index) { let that = this; that.index = index; uni.showModal({ @@ -516,9 +597,11 @@ // } // }, handleUpdate(val) { this.subdisabled = true; this.reportProductionVolumelist = val this.form.reportProductionVolume = val.outBatchNo; // this.subdisabled = true; // this.getHandelList(); this.InventoryReceiptList.unshift(val); // this.InventoryReceiptList.unshift(val); }, // æå¼å¼¹æ¡--åé¢è¿éè¦ç嬿«ç æªæ«ç ç»æï¼èµå¼ç»æ¥å·¥åå·å段ï¼ç¶åæå¼å¼¹æ¡éæ©è®¢åå·çæä½ open() { @@ -543,6 +626,14 @@ setNo(val) { this.form.moOn = val.moNo; }, setFeedInputProductionVolume(val) { console.log('val', val) this.FeedInputProductionVolumeList = val; const values = this.FeedInputProductionVolumeList.map((item) => item.ifsBatchNo) console.log('values', values) this.form.FeedInputProductionVolume = values.join('ï¼') }, // åæ¾æ«ç çä¿¡æ¯-æ¥å·¥å saveForm(val) { this.form = { @@ -554,8 +645,8 @@ moOn: val.moOn, partNo: val.partNo, partName: val.partName, qtyRequired: val.qtyRequired, Jianqtyfinished: val.qtyRequired - val.qtyFinished, // qtyRequired: val.qtyRequired, // Jianqtyfinished: val.qtyRequired - val.qtyFinished, proposedLocation: val.proposedLocation, productType: "dep", receive: "mo", pages/product/report/seachPersonnelNo.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,558 @@ <template> <view class="page"> <view class="finishProductIn-locno-bg" /> <u-navbar title="ææå表" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000" /> <view class="finishProductIn-locno-search"> <u-search v-model="keywords" shape="square" bg-color="rgba(250,252,255,0.36)" :show-action="false" placeholder="å¯ä»¥è¾å ¥æ¹æ¬¡å·è¿è¡ææ" @clear="search" @custom="search" @search="search" @input="search" @focus="showRecommendations"> </u-search> <!-- æ¨¡ç³æ¥è¯¢æ¨èå表 --> <view v-if="recommendations.length > 0" class="recommendation-list"> <view class="recommendation-item" v-for="item in recommendations" :key="item.ifsBatchNo" @click="selectRecommendation(item)"> <view class="recommendation-line"> <text class="recommendation-label">æ¹å·:</text> <text class="recommendation-value">{{ item.ifsBatchNo }}</text> </view> <!-- <view class="recommendation-line"> <text class="recommendation-label">é¶ä»¶æè¿°:</text> <text class="recommendation-value">{{ item.partName }}</text> </view> <view class="recommendation-line"> <text class="recommendation-label">æ°é:</text> <text class="recommendation-value">{{ item.suppliedQuantity }}</text> </view> --> </view> </view> </view> <view class="wrap"> <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true"> <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false"> <view class="content" v-for="(item, index) in list" :key="item.moNo" :index="index"> <view class="content-header"> <view class="content-header-title">{{ index + 1 }}</view> </view> <view class="content-body"> <view class="row-list"> <view class="_label"> <view class="_label-icon-1"> </view> <view class="_label-name">æ¹å·:</view> </view> <view class="_content"> {{ item.ifsBatchNo }} </view> </view> <view class="row-list"> <view class="_label"> <view class="_label-icon-2"> </view> <view class="_label-name">é¶ä»¶æè¿°:</view> </view> <view class="_content"> {{ item.partName }} </view> </view> <view class="row-list"> <view class="_label"> <view class="_label-icon-3"> </view> <view class="_label-name">æ°é:</view> </view> <view class="_content"> {{ item.suppliedQuantity }} </view> </view> </view> </view> </u-cell-group> </scroll-view> <u-modal v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true" @confirm="confirmTl" @cancel="cancelTl"> <view class="packing-registration-param"> <view class="packing-registration-param-view"> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ¹å·</text> </view> <view class="packing-registration-param-item-right"> <text class="item-one item-two">{{ detailedList.ifsBatchNo }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">é¶ä»¶æè¿°</text> </view> <view class="packing-registration-param-item-right"> <text class="item-one item-two">{{ detailedList.partName }}</text> </view> </view> <view class="packing-registration-param-item param-extra"> <view class="packing-registration-param-item-left"> <text class="item-one">æ°é</text> </view> <view class="packing-registration-param-item-right"> <u-input class="item-one item-two" v-model="detailedList.suppliedQuantity" /> </view> </view> </view> </view> </u-modal> </view> <view class="finishProductIn-locno-search"> <u-button type="primary" class="bottom-button" @click="selectNo">æäº¤</u-button> </view> </view> </template> <script> import content_bg from "@/static/custom/finishProductIn/locNoBg.png"; export default { data() { return { background: { backgroundImage: `url(${content_bg})`, backgroundAttachment: "fixed", backgroundSize: "100% auto", backgroundRepeat: "no-repeat", }, keywords: "", list: [], detailedList: {}, showModal: false, ifsBatchNo: [], productInputList: [], recommendations: [], // æ¨èåè¡¨æ°æ® moOn: "", workstationId: "", }; }, onLoad() { // this.getlist(); }, onShow() { let that = this; uni.$off("scan"); // æ¯æ¬¡è¿æ¥å ç§»é¤å ¨å±èªå®ä¹äºä»¶çå¬å¨ uni.$on("scan", function(data) { //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é if (data.code) { let codeInfo = JSON.parse(data.code); if (codeInfo) { that.codeInfoId = codeInfo.id; // æ«ææ¥å·¥åäºç»´ç that.saveForm(codeInfo); } } }); }, onLoad(option) { console.log(option.moOn); // è¾åº: value1 this.moOn = option.moOn; this.workstationId = option.workstationId; }, methods: { // æ¾ç¤ºæ¨èå表 showRecommendations() { // å½è¾å ¥æ¡è·å¾ç¦ç¹ä¸ä¸ºç©ºæ¶ï¼æ¾ç¤ºé»è®¤æ¨è // if (!this.keywords.trim()) { // this.loadDefaultRecommendations(); // } }, // // å è½½é»è®¤æ¨è // loadDefaultRecommendations() { // // è°ç¨APIè·åé»è®¤æ¨èæ°æ® // this.$u.api.cancelReporting // .fuzzyQuery() // .then((res) => { // console.log('é»è®¤æ¨èç»æ:', res.data); // this.recommendations = res.data || []; // }) // .catch((err) => { // console.error('è·åé»è®¤æ¨è失败:', err); // this.recommendations = []; // }); // }, // éæ©æ¨è项 selectRecommendation(item) { console.log('éæ©æ¨è项:', item); console.log('éæ©æ¨è项:', this.moOn); // this.$u.api.cancelReporting // .selInputPartInfoPDA({ // outBatchNo: item.lotBatchNo, // partNo: item.partNo, // moOn: this.moOn, // }) // .then((res) => { // const list = { // suppliedQuantity: res.data.suppliedQuantity, // ifsBatchNo: res.data.ifsBatchNo, // partNo: res.data.partNo, // partName: res.data.partName, // locationNo: res.data.locationNo, // ifsLineItemNo: res.data.ifsLineItemNo, // serialNo: res.data.serialNo, // engChgLevel: res.data.engChgLevel, // ifsWdr: res.data.waivDevRejNo, // activitySeq: res.data.activitySeq, // }; // this.detailedList = list; // this.showModal = true; // // æ¸ ç©ºè¾å ¥æ¡åæ¨èå表 // this.keywords = ''; // this.recommendations = []; // }); this.detailedList = item; this.detailedList.suppliedQuantity = item.availableStockQuantity; this.showModal = true; // æ¸ ç©ºè¾å ¥æ¡åæ¨èå表 this.keywords = ''; this.recommendations = []; }, updateArray(arr, newObj) { // æ¥æ¾æ°ç»ä¸æ¯å¦æç¸åç id let index = arr.findIndex(item => item.ifsBatchNo === newObj.ifsBatchNo); if (index !== -1) { // 妿æ¾å°ç¸å id çå¯¹è±¡ï¼æ¿æ¢åæå¯¹è±¡ arr[index] = newObj; } else { // å¦ææ²¡ææ¾å°ç¸å id ç对象ï¼ç´æ¥æ¨å ¥æ°å¯¹è±¡ arr.push(newObj); } return arr; }, confirmTl() { let updatedArrayList = this.updateArray(this.list, this.detailedList); this.list =updatedArrayList; this.showModal = false; this.detailedList = {}; }, cancelTl() { this.showModal = false; this.detailedList = {}; }, search(value) { if (value) { this.$u.api.cancelReporting .getStockNoPageByWorkstationId({ ifsBatchNo: value, workstationId: this.workstationId, }) .then((res) => { console.log('æ¨¡ç³æ¥è¯¢ç»æ:', res.data); // 妿è¿åçæ¯æ°ç»ï¼åä½ä¸ºæ¨èå表 if (Array.isArray(res.data)) { this.recommendations = res.data; // å¦æåªæä¸ä¸ªç»æï¼ç´æ¥éä¸ if (res.data.length === 1) { this.selectRecommendation(res.data[0]); } } else { // 妿è¿åçæ¯åä¸ªå¯¹è±¡ï¼æ·»å å°æ¨èå表 this.recommendations = [res.data]; // this.selectRecommendation(res.data); } }); } else { // æ¸ ç©ºæ¨èå表 this.recommendations = []; } }, // åæ¾æ«ç çä¿¡æ¯-æ¥å·¥å saveForm(val) { this.$u.api.cancelReporting .selInputPartInfoPDA({ outBatchNo: val.BN, partNo: val.PN, moOn: this.moOn, }) .then((res) => { const list = { suppliedQuantity: res.data.suppliedQuantity, ifsBatchNo: res.data.ifsBatchNo, partNo: res.data.partNo, partName: res.data.partName, locationNo: res.data.locationNo, ifsLineItemNo: res.data.ifsLineItemNo, serialNo: res.data.serialNo, engChgLevel: res.data.engChgLevel, ifsWdr: res.data.waivDevRejNo, activitySeq: res.data.activitySeq, }; this.detailedList = list; this.showModal = true; }); }, selectNo() { this.refreshLastPage(this.list); }, //å·æ°ä¸ä¸ä¸ªé¡µé¢ refreshLastPage(no) { // åç¥ A.vue æ´æ°æ°æ® // è·å页颿 let pages = getCurrentPages(); // è·åä¸ä¸é¡µæ let prevPage = pages[pages.length - 2]; // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) prevPage.$vm.setFeedInputProductionVolume(no); // è¿åä¸ä¸é¡µ uni.navigateBack({ delta: 1, }); }, }, }; </script> <style lang="scss"> .packing-registration-param { padding: 40rpx 30rpx 10rpx 30rpx; height: 350px; overflow: hidden; .packing-registration-param-title { display: flex; flex-direction: row; align-items: center; margin-bottom: 30rpx; .title-label { margin-left: 14rpx; font-size: 34rpx; font-weight: bold; color: #283e65; } } .packing-registration-param-view { height: 177rpx; background-color: #fff; border-radius: 10rpx; padding: 0rpx 23rpx; margin-bottom: 30rpx; .packing-registration-param-item { height: 90rpx; border: 1px solid #adc8e4; line-height: 90rpx; display: flex; justify-content: space-between; border: none; .packing-registration-param-item-left { .item-one { word-break: break-all; font-size: small; color: #060505; } } .packing-registration-param-item-right { display: flex; justify-content: space-between; .item-one { font-size: small; color: #060505; margin-right: 6rpx; word-break: break-all; } .item-two { font-size: small; color: #060505; margin-right: 6rpx; } .item-three { font-size: 30rpx; color: #214ded; margin-right: 6rpx; } } } .param-extra { border-bottom: 1px solid #ededed; } } } .finishProductIn-locno-bg { background-color: #f6f9ff; background-image: url("~@/static/custom/finishProductIn/locNoBg.png"); // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); padding: 0 20rpx; background-attachment: fixed; background-size: 100% auto; background-repeat: no-repeat; position: fixed; top: 0; bottom: 0; width: 100%; z-index: -1; } /* æ¨èåè¡¨æ ·å¼ */ .recommendation-list { margin: 10rpx 30rpx; background-color: #ffffff; border-radius: 10rpx; padding: 10rpx; box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); z-index: 999; position: relative; } .recommendation-item { padding: 20rpx; margin-bottom: 10rpx; background-color: #f5f9ff; border-radius: 8rpx; cursor: pointer; transition: background-color 0.3s; } .recommendation-item:hover { background-color: #e6f0ff; } .recommendation-line { display: flex; justify-content: space-between; margin-bottom: 8rpx; } .recommendation-label { font-size: 28rpx; color: #666666; } .recommendation-value { font-size: 28rpx; color: #333333; text-align: right; } .finishProductIn-locno-search { padding: 40rpx 30rpx 20rpx 30rpx; } .wrap .finishProductIn-locno-scroll-list { height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); width: 100%; } .finishProductIn-locno-scroll-list-group { ::v-deep .u-cell-item-box { background-color: rgba(250, 252, 255, 0.36) !important; padding: 0rpx 30rpx; } .content { font-size: 12px; background-color: #ffffff; box-sizing: border-box; border-radius: 10rpx; margin: 0rpx 0rpx 16rpx; padding: 20rpx 8rpx; box-shadow: none; display: flex; align-items: center; white-space: normal; .content-header { width: 40rpx; height: 90rpx; display: flex; align-items: center; overflow-wrap: break-word; .content-header-icon { background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); background-size: 100% auto; background-repeat: no-repeat; height: 28rpx; width: 28rpx; } .content-header-title { width: 40rpx; // margin-left: 11rpx; font-size: 26rpx; color: #333333; } } .content-body { flex: 1; background: #f5f9ff; border-radius: 10rpx; padding: 0rpx 23rpx; .row-list { height: 60rpx; display: flex; flex-direction: row; padding: 0px; align-items: center; } .row-list ._label { display: flex; flex: 0.8; color: #909399; align-items: center; ._label-icon-1 { background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png"); background-size: 100% auto; background-repeat: no-repeat; height: 26rpx; width: 26rpx; } ._label-icon-2 { background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png"); background-size: 100% auto; background-repeat: no-repeat; height: 26rpx; width: 26rpx; } ._label-icon-3 { background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png"); background-size: 100% auto; background-repeat: no-repeat; height: 26rpx; width: 26rpx; } ._label-name { margin-left: 11rpx; font-size: small; font-weight: 500; color: #666666; } } .row-list ._content { flex: 1.5; text-align: right; color: #909399; font-size: small; } .row-list .s1 { color: #d35651; } } } } </style>