| | |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | :disabled="create" |
| | | @click="CreatehandleUpdate" |
| | | >生成</el-button> |
| | | </el-col> |
| | |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | create: false, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | move: true, |
| | |
| | | console.log('this.single1111',this.single) |
| | | console.log('selecion',selection) |
| | | this.ids = selection.map(item => item.id) |
| | | const statusList = selection.map(item => item.orderStatus) |
| | | console.log('statusList',statusList) |
| | | console.log('statusList.filter( x => x !== "1").length',statusList.filter( x => x !== "1").length) |
| | | if (statusList.filter( x => x !== "1").length >0){ |
| | | this.create = true |
| | | } else { |
| | | this.create = false |
| | | } |
| | | if (selection.length >1){ |
| | | this.single = false |
| | | this.multiple = true |
| | |
| | | this.titleName = "添加生产订单"; |
| | | }, |
| | | /** 同步按钮操作 */ |
| | | CreatehandleUpdate(Row) { |
| | | this.initWorkshop(); |
| | | this.reset(); |
| | | const id = Row.id || this.ids |
| | | getProductionOrdes(id).then(response => { |
| | | console.log(response.data) |
| | | console.log(response.data.productCode) |
| | | this.materialQueryParams.materialCode = response.data.productCode; |
| | | listMaterial(this.materialQueryParams).then(response => { |
| | | this.markNo = response.rows[0].mark |
| | | this.form.typeL = response.rows[0].typeL; |
| | | CreatehandleUpdate() { |
| | | console.log('this.ids',this.ids) |
| | | if (this.ids.length === 0){ |
| | | this.$message.error('请勾选数据'); |
| | | }else { |
| | | this.initWorkshop(); |
| | | this.reset(); |
| | | const id = this.ids |
| | | getProductionOrdes(id).then(response => { |
| | | console.log(response.data) |
| | | console.log(response.data.productCode) |
| | | this.materialQueryParams.materialCode = response.data.productCode; |
| | | listMaterial(this.materialQueryParams).then(response => { |
| | | this.markNo = response.rows[0].mark |
| | | this.form.typeL = response.rows[0].typeL; |
| | | }); |
| | | this.form = response.data; |
| | | this.form.idNums=id; |
| | | this.Createopen = true; |
| | | this.titleName = "生成箱体条码"; |
| | | // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1); |
| | | }); |
| | | this.form = response.data; |
| | | this.form.idNums=id; |
| | | this.Createopen = true; |
| | | this.titleName = "生成箱体条码"; |
| | | // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | }, `productionOrde_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | goToPage() { |
| | | this.showDetailFlag=true |
| | | console.log('this.showDetailFlag',this.showDetailFlag) |
| | | //更新实际生产日期 |
| | | //updateOrderInfo(this.singleSelect) |
| | | if (this.ids.length === 0){ |
| | | this.$message.error('请勾选数据'); |
| | | }else { |
| | | this.showDetailFlag=true |
| | | console.log('this.showDetailFlag',this.showDetailFlag) |
| | | //更新实际生产日期 |
| | | //updateOrderInfo(this.singleSelect) |
| | | } |
| | | |
| | | }, |
| | | } |
| | | }; |