md
This commit is contained in:
parent
bdf4810ac4
commit
d488b7fb68
@ -62,22 +62,18 @@
|
||||
},
|
||||
methods: {
|
||||
onFocus(){
|
||||
this.isFistInit=false;
|
||||
this.searchProdCode=null;
|
||||
},
|
||||
onBlur(val){
|
||||
this.$emit("input", this.svalue);
|
||||
this.dispatch('ElFormItem', 'el.form.blur', [this.svalue]);
|
||||
this.dispatch('ElFormItem', 'el.form.blur');
|
||||
},
|
||||
onChange() {
|
||||
this.$emit("input", this.svalue);
|
||||
let itemData ={};
|
||||
this.optionItems.forEach(item=>{
|
||||
if(item.prodCode === this.svalue){
|
||||
itemData = item;
|
||||
}
|
||||
});
|
||||
let itemData = this.optionItems.find(item=>item.prodCode == this.svalue);
|
||||
this.$emit("onChange",itemData);
|
||||
this.dispatch('ElFormItem', 'el.form.change', [this.svalue]);
|
||||
this.dispatch('ElFormItem', 'el.form.change');
|
||||
},
|
||||
queryData() {
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="产品类型" prop="productType">
|
||||
<!-- :transLineCode="form.transLineType" -->
|
||||
<TransProductPicker placeholder="产品类型" v-model="form.productType" :transLineCode="form.transLineType"></TransProductPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -69,7 +70,7 @@
|
||||
<div slot="description">
|
||||
<!-- <span><dict-tag :options="dict.type.emis_biz_shipping_method" :value="item.transType"/></span> -->
|
||||
<span> 【{{item.destSiteName}}】</span>
|
||||
<span>{{ dict.type.emis_biz_shipping_method.find(obj=>obj.value==item.transType).label }}</span>
|
||||
<span>{{ getTransTypeLable(item.transType) }}</span>
|
||||
<span> {{item.estCostDay}}天</span>
|
||||
</div>
|
||||
</el-step>
|
||||
@ -119,8 +120,8 @@ export default {
|
||||
loading: true,
|
||||
// 表单参数
|
||||
form: {},
|
||||
stepsLabel:[],
|
||||
stepsDesc:[],
|
||||
// stepsLabel:[],
|
||||
// stepsDesc:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
@ -155,6 +156,13 @@ export default {
|
||||
this.form.status="1";
|
||||
}
|
||||
},
|
||||
getTransTypeLable(value){
|
||||
// item.transType
|
||||
let item=this.dict.type.emis_biz_shipping_method.find(obj=>obj.value==value);
|
||||
if(item){
|
||||
return item.label;
|
||||
}
|
||||
},
|
||||
onStepChange(){
|
||||
|
||||
},
|
||||
@ -195,7 +203,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
addEmisTmsTransPlan(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@
|
||||
<div >{{scope.row.transLineTypeName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('产品类型')" align="center" prop="productType" min-width="100" />
|
||||
<el-table-column :label="$t('产品类型')" align="center" prop="productTypeName" min-width="100" />
|
||||
<el-table-column :label="$t('国家')" align="center" prop="transLineTypeName1" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<div >{{scope.row.fromCountryName}}---{{ scope.row.countryName }}</div>
|
||||
|
||||
@ -223,8 +223,6 @@ export default {
|
||||
let queryParams={
|
||||
planId:this.planId,
|
||||
}
|
||||
console.log("======>");
|
||||
console.log(queryParams);
|
||||
|
||||
listEmisTmsTransPlanDtl(queryParams).then(response => {
|
||||
this.emisTmsTransPlanDtlList = response.rows;
|
||||
@ -283,41 +281,22 @@ export default {
|
||||
this.form.orderNum=orderNum;
|
||||
if(orderNum>1){
|
||||
// 获取上一条数据
|
||||
const [lastData]= this.emisTmsTransPlanDtlList.slice(-1);
|
||||
console.log(lastData);
|
||||
this.form.startSiteCode=lastData.destSiteCode;
|
||||
this.form.destSiteCode=null;
|
||||
this.form.transType=lastData.transType;
|
||||
this.form.estCostDay=1;
|
||||
// const [lastData]= this.emisTmsTransPlanDtlList.slice(-1);
|
||||
// console.log(lastData);
|
||||
// this.form.startSiteCode=lastData.destSiteCode;
|
||||
// this.form.destSiteCode=null;
|
||||
// this.form.transType=lastData.transType;
|
||||
// this.form.estCostDay=1;
|
||||
}
|
||||
|
||||
},
|
||||
handleCopy(row){
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "复制节点";
|
||||
console.log(row)
|
||||
const orderNum=this.emisTmsTransPlanDtlList.length+1;
|
||||
if(orderNum>1){
|
||||
// 获取上一条数据
|
||||
let newData =Object.assign({}, row);
|
||||
console.log(newData)
|
||||
this.form=newData;
|
||||
this.form.orderNum=orderNum;
|
||||
// this.form.startWeight=newData.endWeight;
|
||||
// this.form.endWeight='';
|
||||
// this.form.initialWeight=0;
|
||||
// this.form.additionalWeight=0;
|
||||
// this.form.calculateExpression=newData.calculateExpression;
|
||||
}
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
|
||||
if(this.quoteId != null && !this.isCopy){
|
||||
this.handleUpdateByQuoteId(row);
|
||||
if(this.planId != null){
|
||||
this.handleUpdateByPlanId(row);
|
||||
}else{
|
||||
this.currentRow = row;
|
||||
this.form = row;
|
||||
@ -326,7 +305,7 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "修改节点";
|
||||
},
|
||||
handleUpdateByQuoteId(row){
|
||||
handleUpdateByPlanId(row){
|
||||
this.loading = true;
|
||||
getEmisTmsTransPlanDtl(row.id).then(response => {
|
||||
this.form = response.data;
|
||||
@ -351,21 +330,11 @@ export default {
|
||||
},
|
||||
submitFormByPlanId(){
|
||||
if (this.form.id != null) {
|
||||
console.log("=======1");
|
||||
console.log(this.form);
|
||||
|
||||
updateEmisTmsTransPlanDtl(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.$emit("on-changed");
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
console.log("=======2");
|
||||
console.log(this.form);
|
||||
|
||||
addEmisTmsTransPlanDtl(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("添加成功");
|
||||
// this.$emit("on-changed");
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
@ -381,7 +350,9 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row,index,list) {
|
||||
if(this.quoteId != null && !this.isCopy){
|
||||
console.log(this.planId);
|
||||
|
||||
if(this.planId != null ){
|
||||
this.handleDeletePlanId(row);
|
||||
}else{
|
||||
this.handleDeleteByNew(row,index,list);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user