|
@@ -64,6 +64,25 @@
|
|
|
@corpFocus="remoteMethod($event,'cntrTypeCode')" >
|
|
|
</search-query>
|
|
|
</template>
|
|
|
+ <template slot="number" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit" style="width: 100%;" v-model="row.number"
|
|
|
+ size="small" autocomplete="off" min="0" @blur="numberBlur(row)"
|
|
|
+ clearable placeholder="请输入件数" ></el-input>
|
|
|
+ <span v-else >{{row.number}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="grossWeight" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit" style="width: 100%;" v-model="row.grossWeight"
|
|
|
+ size="small" autocomplete="off" min="0" @blur="grossWeightBlur(row)"
|
|
|
+ clearable placeholder="请输入毛重" ></el-input>
|
|
|
+ <span v-else >{{row.grossWeight}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="measurement" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit" style="width: 100%;" v-model="row.measurement"
|
|
|
+ size="small" autocomplete="off" min="0" @blur="measurementBlur(row)"
|
|
|
+ clearable placeholder="请输入尺码" ></el-input>
|
|
|
+ <span v-else >{{row.measurement}}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</template>
|
|
@@ -82,7 +101,6 @@ import {
|
|
|
import {bcntrtypesList} from "@/api/iosBasicData/bcntrtypes";
|
|
|
import {containersEqualDistribution} from "@/api/iosBasicData/containers";
|
|
|
import {requiredMessage} from "@/util/messageReminder";
|
|
|
-import {number} from "echarts";
|
|
|
|
|
|
export default {
|
|
|
components: {SearchQuery},
|
|
@@ -159,7 +177,7 @@ import {number} from "echarts";
|
|
|
prop: "number",
|
|
|
type:"number",
|
|
|
width:'120',
|
|
|
- cell:true,
|
|
|
+ // cell:true,
|
|
|
controls:false,
|
|
|
precision:0,
|
|
|
},
|
|
@@ -168,7 +186,7 @@ import {number} from "echarts";
|
|
|
prop: "grossWeight",
|
|
|
width:'120',
|
|
|
type:"number",
|
|
|
- cell:true,
|
|
|
+ // cell:true,
|
|
|
controls:false,
|
|
|
},
|
|
|
{
|
|
@@ -184,7 +202,7 @@ import {number} from "echarts";
|
|
|
prop: "measurement",
|
|
|
width:'120',
|
|
|
type:"number",
|
|
|
- cell:true,
|
|
|
+ // cell:true,
|
|
|
controls:false,
|
|
|
},
|
|
|
{
|
|
@@ -287,6 +305,36 @@ import {number} from "echarts";
|
|
|
this.option = await this.getColumnData(this.getColumnName(309.1), this.optionBack);
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 件数失焦事件
|
|
|
+ numberBlur(row){
|
|
|
+ let quantityNum = 0
|
|
|
+ for (let item of this.assemblyForm.preContainersList) {
|
|
|
+ if (item.number) {
|
|
|
+ quantityNum += Number(item.number)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.assemblyForm.quantity = quantityNum
|
|
|
+ },
|
|
|
+ // 毛重失焦事件
|
|
|
+ grossWeightBlur(row){
|
|
|
+ let grossWeightNum = 0
|
|
|
+ for (let item of this.assemblyForm.preContainersList) {
|
|
|
+ if (item.grossWeight) {
|
|
|
+ grossWeightNum += Number(item.grossWeight)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.assemblyForm.grossWeight = grossWeightNum
|
|
|
+ },
|
|
|
+ // 尺码失焦事件
|
|
|
+ measurementBlur(row){
|
|
|
+ let measurementNum = 0
|
|
|
+ for (let item of this.assemblyForm.preContainersList) {
|
|
|
+ if (item.measurement) {
|
|
|
+ measurementNum += Number(item.measurement)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.assemblyForm.measurement = measurementNum
|
|
|
+ },
|
|
|
// 一键编辑
|
|
|
oneTouchEditefun(){
|
|
|
for (let item of this.assemblyForm.preContainersList) {
|
|
@@ -578,7 +626,13 @@ import {number} from "echarts";
|
|
|
this.rowUpdate(row,index)
|
|
|
// this.$set(row,'$cellEdit',false)
|
|
|
}else {
|
|
|
- this.$set(row,'$cellEdit',true)
|
|
|
+ if (Number(this.assemblyForm.quantity) != Number(this.assemblyForm.waitingBoxList[0].quantity)) {
|
|
|
+ this.$alert('当前数据已经均分箱量,请撤销之后再修改', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ this.$set(row,'$cellEdit',true)
|
|
|
+ }
|
|
|
}
|
|
|
// this.$refs.crud.rowEdit(row,index)
|
|
|
},
|