Commit d9111ce4 authored by 邓春圆's avatar 邓春圆

去掉检验

parent f0bd0d76
......@@ -224,18 +224,22 @@
</div>
</div>
</el-form-item>
<packaging-type key-arr="priceStepClearanceList" v-model="form">
<el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button>
</packaging-type>
<p v-if="lineNum">
<span>
复制模板线路价格:{{lineNum}}个
</span>
<span @click="toPriceManager(formCopy, true)" style="color: #0a84ff;cursor: pointer;">
查看《#{{$l(formCopy,'title')}}#》路线价格
</span>
<el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button>
</p>
<el-form-item label-width="150px" label="空运订单重量上限kg">
<el-input-number v-model="form.airWeightLimit" controls-position="right" ></el-input-number>
</el-form-item>
<!-- <packaging-type key-arr="priceStepClearanceList" v-model="form">-->
<!-- <el-button @click="visible = true; open = false;" type="text">选择空运模板</el-button>-->
<!-- </packaging-type>-->
<!-- <p v-if="lineNum">-->
<!-- <span>-->
<!-- 复制模板线路价格:{{lineNum}}个-->
<!-- </span>-->
<!-- <span @click="toPriceManager(formCopy, true)" style="color: #0a84ff;cursor: pointer;">-->
<!-- 查看《#{{$l(formCopy,'title')}}#》路线价格-->
<!-- </span>-->
<!-- <el-button style="font-size: 12px;margin-left: 15px;color: red;" type="text" @click="form.priceStepClearanceList = [];lineNum = 0" >清除路线</el-button>-->
<!-- </p>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
......@@ -415,59 +419,59 @@ export default {
},
methods: {
copyLine(val , bol){
this.formCopy = val;
let copy = ()=>{
if(val.priceStepClearanceList.length === 0) return this.form.priceStepClearanceList = []
this.form.airWeightLimit = val.airWeightLimit;
val.priceStepClearanceList.forEach((item ,index) =>{
if(this.form.priceStepClearanceList[index]){
this.form.priceStepClearanceList[index].clearancePrice = item.clearancePrice
this.form.priceStepClearanceList[index].clearancePriceUnit = item.clearancePriceUnit
this.form.priceStepClearanceList[index].clearanceVolumeUnit = item.clearanceVolumeUnit
this.form.priceStepClearanceList[index].endNum = item.endNum
this.form.priceStepClearanceList[index].startNum = item.startNum
this.form.priceStepClearanceList[index].weightUnit = item.weightUnit
}else {
let p = {
"channelId":undefined,
"clearancePrice":item.clearancePrice,
"clearancePriceUnit":item.clearancePriceUnit,
"clearanceVolumeUnit":item.clearanceVolumeUnit,
"endNum":item.endNum,
"packagingId":undefined,
"startNum":item.startNum,
"weightUnit":item.weightUnit
}
this.form.priceStepClearanceList.push(p)
}
})
}
this.visible = false;
if(bol){
let message = this.$l(this.form,'title') ? `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品#${this.$l(this.form,'title')}#中?` : `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品中?`
this.$confirm(message, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// this.form.priceLineCount = val.id;
this.lineNum = val.priceLineCount;
this.form.productTemplateId = val.id;
this.form.isCopyProductPriceTemplate = true;
copy()
this.open = true;
}).catch(() => {
this.open = true;
});
}else {
this.open = true;
copy()
this.lineNum = 0
this.form.isCopyProductPriceTemplate = false;
}
this.$forceUpdate()
},
// copyLine(val , bol){
// this.formCopy = val;
// let copy = ()=>{
// if(val.priceStepClearanceList.length === 0) return this.form.priceStepClearanceList = []
// this.form.airWeightLimit = val.airWeightLimit;
// val.priceStepClearanceList.forEach((item ,index) =>{
// if(this.form.priceStepClearanceList[index]){
// this.form.priceStepClearanceList[index].clearancePrice = item.clearancePrice
// this.form.priceStepClearanceList[index].clearancePriceUnit = item.clearancePriceUnit
// this.form.priceStepClearanceList[index].clearanceVolumeUnit = item.clearanceVolumeUnit
// this.form.priceStepClearanceList[index].endNum = item.endNum
// this.form.priceStepClearanceList[index].startNum = item.startNum
// this.form.priceStepClearanceList[index].weightUnit = item.weightUnit
// }else {
// let p = {
// "channelId":undefined,
// "clearancePrice":item.clearancePrice,
// "clearancePriceUnit":item.clearancePriceUnit,
// "clearanceVolumeUnit":item.clearanceVolumeUnit,
// "endNum":item.endNum,
// "packagingId":undefined,
// "startNum":item.startNum,
// "weightUnit":item.weightUnit
// }
// this.form.priceStepClearanceList.push(p)
// }
// })
// }
// this.visible = false;
// if(bol){
// let message = this.$l(this.form,'title') ? `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品#${this.$l(this.form,'title')}#中?` : `请确认是否要将#${this.$l(val,'title')}#的所有路线价格复制到当前商品中?`
// this.$confirm(message, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// // this.form.priceLineCount = val.id;
// this.lineNum = val.priceLineCount;
// this.form.productTemplateId = val.id;
// this.form.isCopyProductPriceTemplate = true;
// copy()
// this.open = true;
// }).catch(() => {
// this.open = true;
// });
// }else {
// this.open = true;
// copy()
// this.lineNum = 0
// this.form.isCopyProductPriceTemplate = false;
// }
// this.$forceUpdate()
// },
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
......@@ -556,6 +560,7 @@ export default {
priceStepClearanceList:[],
isCopyProductPriceTemplate:false,
productTemplateId:undefined,
};
this.lineNum = 0
this.resetForm("form");
......@@ -583,6 +588,7 @@ export default {
if (this.queryParams.typeId) {
this.form.typeId = this.queryParams.typeId;
}
this.form.airWeightLimit = this.getDictDatas(this.DICT_TYPE. AIR_COMMODITY_CUSTOM_CLEARANCE)[0]?.value
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -607,6 +613,7 @@ export default {
this.form.couponIds = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
// this.reset()
})
});
},
verify(row){
......@@ -621,15 +628,15 @@ export default {
if(!this.form.airWeightLimit){
return this.$message.warning('请输入空运订单重量上限')
}
if(this.form.priceStepClearanceList.length === 0){
return this.$message.warning('阶梯定价输入不完整!')
}else {
let bol = this.form.priceStepClearanceList.every(this.verify)
if(!bol){
return this.$message.warning('阶梯定价输入不完整!')
}
}
// if(this.form.priceStepClearanceList.length === 0){
// return this.$message.warning('阶梯定价输入不完整!')
// }else {
// let bol = this.form.priceStepClearanceList.every(this.verify)
// if(!bol){
// return this.$message.warning('阶梯定价输入不完整!')
// }
//
// }
//商品特性转字符串
this.form.attrId = this.form.attrArray.join(',');
// 修改的提交
......
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