采购单附件上传

This commit is contained in:
砂糖
2025-08-04 09:54:01 +08:00
parent 6c3509e85a
commit e34be19bfa
3 changed files with 52 additions and 7 deletions

View File

@@ -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();
}
},

View File

@@ -86,6 +86,12 @@
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleAccessory(scope.row)"
>附件</el-button>
<el-button
size="mini"
type="text"
@@ -248,6 +254,10 @@
@confirm="onAddConfirm"
/>
</el-drawer>
<el-dialog title="附件查看" :visible.sync="accessoryOpen" width="800px" append-to-body>
<FileUpload v-model="accessory" @success="handleAccessorySuccess" />
</el-dialog>
</div>
</template>
@@ -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();
});
}
}
};

View File

@@ -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;
})