采购单附件上传
This commit is contained in:
@@ -185,6 +185,7 @@ export default {
|
|||||||
this.uploadList = [];
|
this.uploadList = [];
|
||||||
this.number = 0;
|
this.number = 0;
|
||||||
this.$emit("input", this.listToString(this.fileList));
|
this.$emit("input", this.listToString(this.fileList));
|
||||||
|
this.$emit("success", this.fileList);
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -86,6 +86,12 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-document"
|
||||||
|
@click="handleAccessory(scope.row)"
|
||||||
|
>附件</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -248,6 +254,10 @@
|
|||||||
@confirm="onAddConfirm"
|
@confirm="onAddConfirm"
|
||||||
/>
|
/>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
|
<el-dialog title="附件查看" :visible.sync="accessoryOpen" width="800px" append-to-body>
|
||||||
|
<FileUpload v-model="accessory" @success="handleAccessorySuccess" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -259,6 +269,7 @@ import PurchasePlanDetail from "./panels/detail.vue";
|
|||||||
import { EOrderStatus } from "../../../utils/enums";
|
import { EOrderStatus } from "../../../utils/enums";
|
||||||
import UserSelect from '@/components/KLPService/UserSelect'
|
import UserSelect from '@/components/KLPService/UserSelect'
|
||||||
import Transfer from './panels/transfer.vue'
|
import Transfer from './panels/transfer.vue'
|
||||||
|
import FileUpload from '@/components/FileUpload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PurchasePlan",
|
name: "PurchasePlan",
|
||||||
@@ -267,6 +278,7 @@ export default {
|
|||||||
PurchasePlanDetail,
|
PurchasePlanDetail,
|
||||||
UserSelect,
|
UserSelect,
|
||||||
Transfer,
|
Transfer,
|
||||||
|
FileUpload,
|
||||||
},
|
},
|
||||||
dicts: ['order_status'],
|
dicts: ['order_status'],
|
||||||
data() {
|
data() {
|
||||||
@@ -339,6 +351,8 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
addDrawerOpen: false,
|
addDrawerOpen: false,
|
||||||
|
accessory: '',
|
||||||
|
accessoryOpen: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -511,6 +525,19 @@ export default {
|
|||||||
onAddConfirm() {
|
onAddConfirm() {
|
||||||
this.addDrawerOpen = false;
|
this.addDrawerOpen = false;
|
||||||
this.getList();
|
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();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -118,6 +118,25 @@ const so = {
|
|||||||
vm.oldResult = bomItemRes.rows;
|
vm.oldResult = bomItemRes.rows;
|
||||||
return 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: {
|
methods: {
|
||||||
handleOcr() {
|
handleOcr() {
|
||||||
this.loadingMethod('ocr', (res) => {
|
this.loadingMethod('ocr', async (res) => {
|
||||||
this.loadingMethod('old').then(() => {
|
await this.loadingMethod('old')
|
||||||
this.handleCompareResult()
|
await this.loadingMethod('compare')
|
||||||
this.active = 2;
|
this.active = 2;
|
||||||
})
|
})
|
||||||
})
|
|
||||||
},
|
},
|
||||||
handleModel() {
|
handleModel() {
|
||||||
this.loadingMethod('model', async (res) => {
|
this.loadingMethod('model', async (res) => {
|
||||||
await this.loadingMethod('old')
|
await this.loadingMethod('old')
|
||||||
console.log(this);
|
await this.loadingMethod('compare')
|
||||||
this.handleCompareResult()
|
|
||||||
this.active = 2;
|
this.active = 2;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user