Commit 49fef957 authored by dragondean@qq.com's avatar dragondean@qq.com

修复空运必填校验

parent 4672ab19
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
<el-form-item :label="$t('运输方式')"> <el-form-item :label="$t('运输方式')">
<dict-selector :clearable="true" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" @change="changeTransport" v-model="form.transportId" /> <dict-selector :clearable="true" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" @change="changeTransport" v-model="form.transportId" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"> <el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'">
<el-select v-model="form.channelId" :placeholder="$t('请选择出货渠道')" :clearable="true"> <el-select v-model="form.channelId" :placeholder="$t('请选择出货渠道')" :clearable="true">
<el-option :disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" v-for="item in channelData" :key="item.channelId" :label="$l(item, 'name')" :value="item.channelId"/> <el-option :disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'" v-for="item in channelData" :key="item.channelId" :label="$l(item, 'name')" :value="item.channelId"/>
</el-select> </el-select>
...@@ -569,7 +569,7 @@ export default { ...@@ -569,7 +569,7 @@ export default {
rules: { rules: {
transportId: [{ required: true, message: this.$t("请选择运输方式"), trigger: "change" }], transportId: [{ required: true, message: this.$t("请选择运输方式"), trigger: "change" }],
warehouseIds: [{ required: true, message: this.$t("请选择目的仓库"), trigger: "change" }], warehouseIds: [{ required: true, message: this.$t("请选择目的仓库"), trigger: "change" }],
channelId: [{ required: true, message: this.$t("请选择出货渠道"), trigger: "change" }], channelId: [{ required: true, message: this.$t("请选择出货渠道"), trigger: "blur" }],
}, },
// 表单校验 // 表单校验
shopRules: { shopRules: {
...@@ -1022,29 +1022,35 @@ export default { ...@@ -1022,29 +1022,35 @@ export default {
this.shopForm.prodTitleZh = list[0].prodTitleZh this.shopForm.prodTitleZh = list[0].prodTitleZh
},*/ },*/
haddleAdd(){ haddleAdd(){
let that = this this.$refs.formSplit.validate(valid => {
if(!that.form.transportId){ console.log({valid})
that.$message.error(this.$t("请选择运输方式")); if (!valid) {
return return;
} }
if(!that.form.destWarehouseId){ let that = this
that.$message.error(this.$t("请选择目的仓库")); if(!that.form.transportId){
return that.$message.error(this.$t("请选择运输方式"));
} return
// if(!this.form.channelId){ }
// this.$modal.msgError("请选择出货渠道"); if(!that.form.destWarehouseId){
// } that.$message.error(this.$t("请选择目的仓库"));
var params = { return
dstWarehouseId: that.form.destWarehouseId, }
parentOrderId: that.orderData.orderId, // if(!this.form.channelId){
parentOrderNo: that.orderData.orderNo, // this.$modal.msgError("请选择出货渠道");
transportId: that.form.transportId, // }
channelId:that.form.channelId var params = {
} dstWarehouseId: that.form.destWarehouseId,
createSplit(params).then(res=>{ parentOrderId: that.orderData.orderId,
that.getList() parentOrderNo: that.orderData.orderNo,
transportId: that.form.transportId,
channelId:that.form.channelId
}
createSplit(params).then(res=>{
that.getList()
})
that.open = false
}) })
that.open = false
}, },
/*cancel(){ /*cancel(){
this.open = false this.open = false
......
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