| | |
| | | :toolbarMaxLength="4" |
| | | :paramArr="type" |
| | | ref="customerOrderTable" |
| | | :expandRowKeys="expandRowKeys" |
| | | > |
| | | <template #toolbar> |
| | | <el-dropdown |
| | |
| | | @command="documentHandle" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-button> |
| | | <el-button style="padding: 9px 14px;"> |
| | | 工艺文件<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | |
| | | @command="handleCommitCommand" |
| | | style="margin-left: 10px" |
| | | > |
| | | <el-button> |
| | | <el-button style="padding: 9px 14px;"> |
| | | 审核状态改变<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-button |
| | | style="margin-left: 10px" |
| | | style="margin-left: 10px;padding: 9px 14px;" |
| | | type="primary" |
| | | @click="() => (exportDialogVisible = true)" |
| | | >导出台账</el-button |
| | | > |
| | | <el-button |
| | | style="margin-left: 10px;padding: 9px 14px;" |
| | | type="primary" |
| | | v-if="permissions.plan_customerorder_check" |
| | | @click="handleCheck" |
| | | >审核</el-button |
| | | > |
| | | <!-- <el-button |
| | | style="margin-left: 10px" |
| | |
| | | selectTime: null, |
| | | exportTime: null, |
| | | }, |
| | | expandRowKeys: [], |
| | | dataRule: { |
| | | exportTime: [ |
| | | { required: true, message: '导出日期不能为空', trigger: 'change' }, |
| | |
| | | isSearch: true, // 高级查询按钮 |
| | | defaultOrderBy: { column: 'placeOrderDate', direction: 'desc' }, |
| | | cancelRunCreated: true, |
| | | reserveSelection: true,//是否保留之前选择的数据 |
| | | }, |
| | | table: { |
| | | total: 0, |
| | |
| | | // size: 'small', |
| | | // fun: this.packageExportHandle |
| | | // }, |
| | | { |
| | | text: '审核', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.checkHandOrder, |
| | | showFun: (row) => { |
| | | return row.sourceId === '1' |
| | | }, |
| | | show: { |
| | | val: [false], |
| | | key: 'isPass', |
| | | }, |
| | | }, |
| | | // { |
| | | // text: '审核', |
| | | // type: 'text', |
| | | // size: 'small', |
| | | // fun: this.checkHandOrder, |
| | | // showFun: (row) => { |
| | | // return row.sourceId === '1' |
| | | // }, |
| | | // show: { |
| | | // val: [false], |
| | | // key: 'isPass', |
| | | // }, |
| | | // }, |
| | | { |
| | | text: '已关联订单', |
| | | type: 'text', |
| | |
| | | this.getData() |
| | | }, |
| | | |
| | | getData() { |
| | | this.$refs.customerOrderTable.getDataList() |
| | | async getData() { |
| | | await this.$refs.customerOrderTable.getDataList() |
| | | this.$refs.customerOrderTable.toggleRowExpansion() |
| | | }, |
| | | // 获取数据列表去除已完成状态的 |
| | | handleDataList(command) { |
| | |
| | | this.$refs.addSampleForm.init(row ? row.contractNo : null) |
| | | }) |
| | | } |
| | | this.expandRowKeys=[row.id] |
| | | }, |
| | | // 新增样品订单 |
| | | addSampleCustomerOrder() { |
| | |
| | | this.$message.error('请先选择日期') |
| | | } |
| | | }, |
| | | handleCheck(){ |
| | | if (this.multipleSelection.length > 0) { |
| | | for(let i=0 ;i<this.multipleSelection.length;i++){ |
| | | if(this.multipleSelection[i].sourceId==0){ |
| | | this.$message.error('请选择手动输入的销售订单') |
| | | return; |
| | | } |
| | | if(this.multipleSelection[i].isPass){ |
| | | this.$message.error('请选择未审核通过的销售订单') |
| | | return; |
| | | } |
| | | } |
| | | this.$confirm('确认审核通过选中的销售订单吗?', '提示', { |
| | | confirmButtonText: '通过', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | checkHanderOrder(this.multipleSelection) |
| | | .then((res) => { |
| | | if (res.status === 200) { |
| | | this.$message.success('审核通过') |
| | | this.getData() |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error) |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.error('请选择至少一条销售订单') |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |