采购单附件上传
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user