|
@@ -1,17 +1,22 @@
|
|
|
<template>
|
|
|
<basic-container>
|
|
|
- <avue-crud style="height: 200px;" :option="option" :table-loading="loading" :data="assemblyForm.preContainersList" :page.sync="page"
|
|
|
- :permission="permissionList" :before-open="beforeOpen" v-model="form"
|
|
|
- :cell-style="{ padding: '0px', textAlign: 'center' }" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
|
|
|
- @row-del="rowDel" @selection-change="selectionChange" @refresh-change="refreshChange"
|
|
|
- @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.1)"
|
|
|
+ <avue-crud style="height: 200px;" :option="option" :table-loading="loading"
|
|
|
+ :data="assemblyForm.preContainersList" :page.sync="page" :permission="permissionList"
|
|
|
+ :before-open="beforeOpen" v-model="form" :cell-style="{ padding: '0px', textAlign: 'center' }" ref="crud"
|
|
|
+ @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @selection-change="selectionChange"
|
|
|
+ @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.1)"
|
|
|
@saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.1)">
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="primary" size="small" :disabled="seeDisabled" @click.stop="addfun">新 增</el-button>
|
|
|
- <el-button type="danger" size="small" plain :disabled="seeDisabled||assemblyForm.preContainersList.length==0" @click.stop="handleDelete">一键删除
|
|
|
+ <el-button type="danger" size="small" plain
|
|
|
+ :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
|
|
|
+ @click.stop="handleDelete">一键删除
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="small" :disabled="seeDisabled||assemblyForm.preContainersList.length==0" @click="batchSavefun">一键保存</el-button>
|
|
|
- <el-button type="info" plain size="small" :disabled="seeDisabled||assemblyForm.preContainersList.length==0" @click="onclickEdit">一键编辑
|
|
|
+ <el-button type="primary" size="small"
|
|
|
+ :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
|
|
|
+ @click="batchSavefun">一键保存</el-button>
|
|
|
+ <el-button type="info" plain size="small"
|
|
|
+ :disabled="seeDisabled || assemblyForm.preContainersList.length == 0" @click="onclickEdit">一键编辑
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
@@ -404,7 +409,13 @@ export default {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
+ let numberSum = 0
|
|
|
+ let grossWeightSum = 0
|
|
|
+ let measurementSum = 0
|
|
|
for (let item of this.assemblyForm.preContainersList) {
|
|
|
+ numberSum += Number(item.number)
|
|
|
+ grossWeightSum += Number(item.grossWeight)
|
|
|
+ measurementSum += Number(item.measurement)
|
|
|
if (!item.cntrTypeCode) {
|
|
|
this.$message.warning('请选择尺码箱型')
|
|
|
return;
|
|
@@ -415,6 +426,7 @@ export default {
|
|
|
}
|
|
|
item.pid = this.assemblyForm.id
|
|
|
}
|
|
|
+ if (numberSum != this.assemblyForm.quantity) return this.$message.error('箱型所有的件数不等于总件数')
|
|
|
this.$confirm("批量保存后,需要重新配箱,确认继续?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -464,7 +476,7 @@ export default {
|
|
|
containersEqualDistributionfun(type) {
|
|
|
containersEqualDistribution({
|
|
|
pid: this.assemblyForm.id,
|
|
|
- type:type,
|
|
|
+ type: type,
|
|
|
waitingBox: this.assemblyForm.waitingBoxList[0]
|
|
|
}).then(res => {
|
|
|
if (res.data.data instanceof Array) {
|
|
@@ -478,8 +490,8 @@ export default {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
- message: '<span style="color:red">注意!!!件数不能平均分 ,请手工配箱,或者修改件数.</span>\n'+
|
|
|
- '<table border="1">\n' +
|
|
|
+ message: '<span style="color:red">注意!!!件数不能平均分 ,请手工配箱,或者修改件数.</span>\n' +
|
|
|
+ '<table border="1">\n' +
|
|
|
' <thead>\n' +
|
|
|
' <tr>\n' +
|
|
|
' <th></th>\n' +
|