From 33ad9bff8eb0e6be50efbaab76ae71c76b6e218b Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 21 八月 2025 14:17:33 +0800
Subject: [PATCH] PDA报工页面投料产量和汇报产量放到主页面,调整逻辑,接口联调,取消报工页面逻辑梳理,接口联调
---
pages/product/report/components/saveForm.vue | 721 ++++++++++++++---------------
pages.json | 9
pages/product/report/index.vue | 148 ++++-
common/http.api.js | 3
pages/product/report/seachPersonnelNo.vue | 552 +++++++++++++++++++++++
5 files changed, 1,024 insertions(+), 409 deletions(-)
diff --git a/common/http.api.js b/common/http.api.js
index c040bf7..2f91a18 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -507,7 +507,8 @@
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),
},
// 杞﹂棿璁㈠崟涓嬪彂
WorkshopOrderIssued: {
diff --git a/pages.json b/pages.json
index f12e773..593e4f6 100644
--- a/pages.json
+++ b/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",
diff --git a/pages/product/report/components/saveForm.vue b/pages/product/report/components/saveForm.vue
index ec1c7f5..e611d2e 100644
--- a/pages/product/report/components/saveForm.vue
+++ b/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>
\ No newline at end of file
diff --git a/pages/product/report/index.vue b/pages/product/report/index.vue
index 6129956..ac3a2e4 100644
--- a/pages/product/report/index.vue
+++ b/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,47 @@
}
},
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,
+
+ });
+ },
+ // 姹囨姤浜ч噺
+ 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 +496,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 +540,7 @@
},
confirmModle() {
- console.log("鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰�");
+ console.log("鐐瑰嚮纭鍚庤幏鍙栧彇娑堟姤宸ヨ褰�",this.detailedList);
// 澶勭悊纭閫昏緫
this.$u.api.cancelReporting
.cancelDTAOfWorkApplication({
@@ -469,7 +549,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 +559,7 @@
this.showModal = false; // 鍏抽棴寮圭獥
},
// 鍙栨秷鎶ュ伐
- cancelReport(item,index) {
+ cancelReport(item, index) {
let that = this;
that.index = index;
uni.showModal({
@@ -516,9 +596,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 +625,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 +644,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",
diff --git a/pages/product/report/seachPersonnelNo.vue b/pages/product/report/seachPersonnelNo.vue
new file mode 100644
index 0000000..93ceea5
--- /dev/null
+++ b/pages/product/report/seachPersonnelNo.vue
@@ -0,0 +1,552 @@
+<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.lotBatchNo"
+ @click="selectRecommendation(item)">
+ <view class="recommendation-line">
+ <text class="recommendation-label">鎵瑰彿:</text>
+ <text class="recommendation-value">{{ item.lotBatchNo }}</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: "",
+ };
+ },
+ onLoad() {
+ // this.getlist();
+ },
+ onShow() {
+ let that = this;
+ uni.$off("scan"); // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
+ uni.$on("scan", function(data) {
+ //鎵爜鎴愬姛鍚庣殑鍥炶皟锛屼綘鍙互鍐欒嚜宸辩殑閫昏緫浠g爜鍦ㄨ繖閲�
+ 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;
+ },
+ 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.ifsBatchNo = item.lotBatchNo;
+ // this.showModal = true;
+ },
+
+ 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
+ .fuzzyQuery({
+ lotBatchNo: value,
+ })
+ .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>
\ No newline at end of file
--
Gitblit v1.9.3