| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="包装容器数量" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HMouldQty" :min="0" style="width: 90px;" |
| | | controls-position="right"></el-input-number> |
| | | </template> |
| | | <template slot-scope="scope">{{ scope.row.HMouldQty }}</template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="物料数量" width="120"> |
| | | <template slot-scope="scope"> |
| | |
| | | this.editData[this.zbIndex].HMouldHeight = deptRow.高度 |
| | | this.editData[this.zbIndex].HMouldFoldHeight = deptRow.折叠高度 |
| | | this.editData[this.zbIndex].HSNP = deptRow.容器包装产品数量 |
| | | this.editData[this.zbIndex].HVolume = (this.editData[this.zbIndex].HMouldLength * this.editData[this.zbIndex].HMouldWidth * this.editData[this.zbIndex].HMouldHeight).toFixed(2)-0 |
| | | this.editData[this.zbIndex].HVolume = (this.editData[this.zbIndex].HMouldLength * this.editData[this.zbIndex].HMouldWidth * this.editData[this.zbIndex].HMouldHeight).toFixed(2) - 0 |
| | | this.form.HTotalVolume = 0 |
| | | this.editData.map(item => { |
| | | console.log(item.HVolume) |
| | | this.form.HTotalVolume=item.HVolume + this.form.HTotalVolume |
| | | this.form.HTotalVolume = item.HVolume + this.form.HTotalVolume |
| | | }) |
| | | |
| | | this.editData[this.zbIndex].HMouldQty = Math.ceil(this.editData[this.zbIndex].HQty / this.editData[this.zbIndex].HSNP) |
| | | this.gyMaterialPackingRelationShow = false |
| | | this.openData = false |
| | | } |
| | |
| | | //#endregion |
| | | checkTotalQtyExceed(selRow) { |
| | | var tableData = this.editData |
| | | console.log(tableData) |
| | | if (!tableData || tableData.length === 0) return; |
| | | var sourceQtyMap = {}; |
| | | var currentQtyMap = {}; |
| | |
| | | }); |
| | | } |
| | | } |
| | | console.log(exceedSources) |
| | | |
| | | if (exceedSources.length > 0) { |
| | | var message = '物料数量之和超过源单数量:'; |
| | | exceedSources.forEach(function (item, index) { |
| | |
| | | this.$modal.msgError(message); |
| | | return true; // 表示有超出 |
| | | } |
| | | |
| | | this.editData[selRow.index-1].HMouldQty = Math.ceil(selRow.HQty / this.editData[selRow.index-1].HSNP) |
| | | return false; // 表示没有超出 |
| | | }, |
| | | //#region 附件上传相关方法 |