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

修复空运必填校验

parent 4672ab19
......@@ -261,7 +261,7 @@
<el-form-item :label="$t('运输方式')">
<dict-selector :clearable="true" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" @change="changeTransport" v-model="form.transportId" />
</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-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>
......@@ -569,7 +569,7 @@ export default {
rules: {
transportId: [{ 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: {
......@@ -1022,29 +1022,35 @@ export default {
this.shopForm.prodTitleZh = list[0].prodTitleZh
},*/
haddleAdd(){
let that = this
if(!that.form.transportId){
that.$message.error(this.$t("请选择运输方式"));
return
}
if(!that.form.destWarehouseId){
that.$message.error(this.$t("请选择目的仓库"));
return
}
// if(!this.form.channelId){
// this.$modal.msgError("请选择出货渠道");
// }
var params = {
dstWarehouseId: that.form.destWarehouseId,
parentOrderId: that.orderData.orderId,
parentOrderNo: that.orderData.orderNo,
transportId: that.form.transportId,
channelId:that.form.channelId
}
createSplit(params).then(res=>{
that.getList()
this.$refs.formSplit.validate(valid => {
console.log({valid})
if (!valid) {
return;
}
let that = this
if(!that.form.transportId){
that.$message.error(this.$t("请选择运输方式"));
return
}
if(!that.form.destWarehouseId){
that.$message.error(this.$t("请选择目的仓库"));
return
}
// if(!this.form.channelId){
// this.$modal.msgError("请选择出货渠道");
// }
var params = {
dstWarehouseId: that.form.destWarehouseId,
parentOrderId: that.orderData.orderId,
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(){
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