diff --git a/klp-ui/src/components/FileUpload/index.vue b/klp-ui/src/components/FileUpload/index.vue
index 0583419f..a597bc2b 100644
--- a/klp-ui/src/components/FileUpload/index.vue
+++ b/klp-ui/src/components/FileUpload/index.vue
@@ -185,6 +185,7 @@ export default {
this.uploadList = [];
this.number = 0;
this.$emit("input", this.listToString(this.fileList));
+ this.$emit("success", this.fileList);
this.$modal.closeLoading();
}
},
diff --git a/klp-ui/src/views/wms/purchasePlan/index.vue b/klp-ui/src/views/wms/purchasePlan/index.vue
index 85190229..cc432943 100644
--- a/klp-ui/src/views/wms/purchasePlan/index.vue
+++ b/klp-ui/src/views/wms/purchasePlan/index.vue
@@ -86,6 +86,12 @@
+ 附件
+
+
+
+
@@ -259,6 +269,7 @@ import PurchasePlanDetail from "./panels/detail.vue";
import { EOrderStatus } from "../../../utils/enums";
import UserSelect from '@/components/KLPService/UserSelect'
import Transfer from './panels/transfer.vue'
+import FileUpload from '@/components/FileUpload'
export default {
name: "PurchasePlan",
@@ -267,6 +278,7 @@ export default {
PurchasePlanDetail,
UserSelect,
Transfer,
+ FileUpload,
},
dicts: ['order_status'],
data() {
@@ -339,6 +351,8 @@ export default {
],
},
addDrawerOpen: false,
+ accessory: '',
+ accessoryOpen: false,
};
},
mounted() {
@@ -511,6 +525,19 @@ export default {
onAddConfirm() {
this.addDrawerOpen = false;
this.getList();
+ },
+ handleAccessory(row) {
+ this.accessoryOpen = true;
+ this.accessory = row.accessory;
+ },
+ handleAccessorySuccess(fileList) {
+ updatePurchasePlan({
+ planId: this.accessory.planId,
+ accessory: fileList.map(item => item.ossId).join(',')
+ }).then(response => {
+ this.$modal.msgSuccess("附件上传成功");
+ this.getList();
+ });
}
}
};
diff --git a/klp-ui/src/views/wms/purchasePlan/panels/qualityCerticate.vue b/klp-ui/src/views/wms/purchasePlan/panels/qualityCerticate.vue
index 4223c70a..3576776f 100644
--- a/klp-ui/src/views/wms/purchasePlan/panels/qualityCerticate.vue
+++ b/klp-ui/src/views/wms/purchasePlan/panels/qualityCerticate.vue
@@ -118,6 +118,25 @@ const so = {
vm.oldResult = bomItemRes.rows;
return bomItemRes.rows;
}
+ },
+ compare: {
+ loading: '正在比较新旧质保单',
+ handler: async (vm) => {
+ // 先检查新旧result是否一致
+ if (vm.oldResult.length !== vm.newResult.length) {
+ vm.resultDiff = true;
+ return;
+ }
+ // 比较新旧result是否一致
+ for (let i = 0; i < vm.oldResult.length; i++) {
+ if (vm.oldResult[i].attrKey !== vm.newResult[i].attrKey || vm.oldResult[i].attrValue !== vm.newResult[i].attrValue) {
+ vm.resultDiff = true;
+ return;
+ }
+ }
+ vm.resultDiff = false;
+ return false;
+ }
}
}
@@ -180,18 +199,16 @@ export default {
},
methods: {
handleOcr() {
- this.loadingMethod('ocr', (res) => {
- this.loadingMethod('old').then(() => {
- this.handleCompareResult()
- this.active = 2;
- })
+ this.loadingMethod('ocr', async (res) => {
+ await this.loadingMethod('old')
+ await this.loadingMethod('compare')
+ this.active = 2;
})
},
handleModel() {
this.loadingMethod('model', async (res) => {
await this.loadingMethod('old')
- console.log(this);
- this.handleCompareResult()
+ await this.loadingMethod('compare')
this.active = 2;
})