Commit 0dbc6623 authored by dragondean@qq.com's avatar dragondean@qq.com

打包空值拦截

parent fd455f98
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template> <span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum"> <el-form-item :rules="tableFormRules.cartonsNum" :prop="`table.${$index}.cartonsNum`">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount"> <el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span> <span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input> </el-input>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<span>{{ $t('') }}</span>(cm) <span>{{ $t('') }}</span>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1"> <el-form-item :rules="tableFormRules.boxGauge1" :prop="`table.${$index}.boxGauge1`">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input> <el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<span>{{ $t('') }}</span>(cm) <span>{{ $t('') }}</span>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2"> <el-form-item :rules="tableFormRules.boxGauge2" :prop="`table.${$index}.boxGauge2`">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input> <el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<span>{{ $t('') }}</span>(cm) <span>{{ $t('') }}</span>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3"> <el-form-item :rules="tableFormRules.boxGauge3" :prop="`table.${$index}.boxGauge3`">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input> <el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³) <span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume"> <el-form-item :rules="tableFormRules.volume" :prop="`table.${$index}.volume`">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input> <el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg) <span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight"> <el-form-item :rules="tableFormRules.weight" :prop="`table.${$index}.weight`">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input> <el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -376,13 +376,13 @@ export default { ...@@ -376,13 +376,13 @@ export default {
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}], brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}],
}, },
tableFormRules: { tableFormRules: {
// cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}], cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
// boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}], boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}],
// boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}], boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}],
// boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}], boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}],
// volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}], volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}],
// weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}], weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}],
// // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}] // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
}, },
...@@ -492,9 +492,9 @@ export default { ...@@ -492,9 +492,9 @@ export default {
type: 'warning' type: 'warning'
}) })
} }
this.$refs['form'].validate(valid => {
this.$refs['tableForm'].validate(valid1 => { this.$refs['tableForm'].validate(valid1 => {
if (!valid || !valid1) { console.log("表单校验", valid1)
if (!valid1) {
return return
} }
// 首次入仓、入仓补充 // 首次入仓、入仓补充
...@@ -518,7 +518,6 @@ export default { ...@@ -518,7 +518,6 @@ export default {
} }
}) })
}) })
})
}, },
handleCancelProcessInstance(){ handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', this.$t("取消流程"), { this.$prompt('请输入取消原因?', this.$t("取消流程"), {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment