| | |
| | | ref="customerOrderTable" |
| | | > |
| | | <template #toolbar> |
| | | <el-dropdown |
| | | <!-- <el-dropdown |
| | | v-if="permissions.customerorder_state_change" |
| | | @command="handleCommand" |
| | | > |
| | |
| | | {{ item.label }} |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </el-dropdown> --> |
| | | <el-dropdown |
| | | v-if="permissions.customerorder_doc_relate" |
| | | @command="documentHandle" |
| | |
| | | > |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="permissions.customerorder_push_otc" |
| | | style="margin-left:10px;" |
| | | type="primary" |
| | | @click="pushOtc" |
| | | >推送ERP</el-button |
| | | > |
| | | <el-button |
| | | > --> |
| | | <!-- <el-button |
| | | style="margin-left:10px;" |
| | | type="primary" |
| | | @click="importOutPutBatch" |
| | | >导入产出批次</el-button |
| | | > |
| | | > --> |
| | | <el-button |
| | | style="margin-left:10px;" |
| | | type="primary" |
| | |
| | | ], |
| | | toolbar: [], |
| | | operator: [ |
| | | { |
| | | text: '订单说明', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.openCustomerOrder |
| | | }, |
| | | { |
| | | text: '查看库存', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.stockHandle |
| | | }, |
| | | { |
| | | text: '箱码信息导出', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.packageExportHandle |
| | | }, |
| | | // { |
| | | // text: '订单说明', |
| | | // type: 'text', |
| | | // size: 'small', |
| | | // fun: this.openCustomerOrder |
| | | // }, |
| | | // { |
| | | // text: '查看库存', |
| | | // type: 'text', |
| | | // size: 'small', |
| | | // fun: this.stockHandle |
| | | // }, |
| | | // { |
| | | // text: '箱码信息导出', |
| | | // type: 'text', |
| | | // size: 'small', |
| | | // fun: this.packageExportHandle |
| | | // }, |
| | | { |
| | | text: '作废', |
| | | type: 'text', |
| | |
| | | permitArr: [] |
| | | }) |
| | | } |
| | | if (this.permissions.customerorder_ifs_line) { |
| | | this.table.toolbar.push({ |
| | | text: '获取ERP行号', |
| | | type: 'primary', |
| | | fun: this.pullIfsLineNo, |
| | | disabled: false, |
| | | permitArr: [], |
| | | loading: false |
| | | }) |
| | | } |
| | | // if (this.permissions.customerorder_ifs_line) { |
| | | // this.table.toolbar.push({ |
| | | // text: '获取ERP行号', |
| | | // type: 'primary', |
| | | // fun: this.pullIfsLineNo, |
| | | // disabled: false, |
| | | // permitArr: [], |
| | | // loading: false |
| | | // }) |
| | | // } |
| | | if (this.permissions.customerorder_submit_oa) { |
| | | this.table.toolbar.push({ |
| | | text: '提交审核', |
| | | type: 'primary', |
| | | fun: this.auditCustomerOrder, |
| | | disabled: false, |
| | | permitArr: [], |
| | | loading: false |
| | | }) |
| | | // this.table.toolbar.push({ |
| | | // text: '提交审核', |
| | | // type: 'primary', |
| | | // fun: this.auditCustomerOrder, |
| | | // disabled: false, |
| | | // permitArr: [], |
| | | // loading: false |
| | | // }) |
| | | } |
| | | if (this.permissions.customerorder_set_salesparts) { |
| | | this.table.toolbar.push({ |
| | |
| | | prop: 'coState', |
| | | searchInfoType: 'select', |
| | | // propVal: '01partUnCheck' |
| | | propVal: '02technologyUnCheck' |
| | | // propVal: '02technologyUnCheck' |
| | | }) |
| | | ) |
| | | this.$refs.customerOrderTable.setQueryParam(queryParam) |
| | |
| | | }, |
| | | // 创建主生产计划 |
| | | masterPlanHandle() { |
| | | console.log(this.multipleSelection); |
| | | if (this.multipleSelection && this.multipleSelection.length > 0) { |
| | | if (this.judgeCoState(this.multipleSelection)) { |
| | | // 判断一下剩余数量是否大于0 |
| | | for (let i = 0, len = this.multipleSelection.length; i < len; i++) { |
| | | if ( |
| | | this.multipleSelection[i].buyQtyDue - |
| | | this.multipleSelection[i].requireNumber <= |
| | | 0 |
| | | ) { |
| | | this.$message.error('请选库存数量大于已下发数量的销售订单') |
| | | return |
| | | } |
| | | // if ( |
| | | // this.multipleSelection[i].buyQtyDue - |
| | | // this.multipleSelection[i].requireNumber <= |
| | | // 0 |
| | | // ) { |
| | | // this.$message.error('请选库存数量大于已下发数量的销售订单') |
| | | // return |
| | | // } |
| | | if ( |
| | | !( |
| | | this.multipleSelection[i].isAudit != null && |