Merge branch 'master' of http://git.xdadan.com/tanex/emis-frontend
This commit is contained in:
commit
0a19a2d307
@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import emitter from 'element-ui/src/mixins/emitter';
|
import emitter from 'element-ui/src/mixins/emitter';
|
||||||
import { listEmisCustomerAddress } from "@/api/emis/emisCustomerAddress";
|
import { listSimpleEmisCustomerAddress } from "@/api/emis/emisCustomerAddress";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CustomerAddressSimplePicker",
|
name: "CustomerAddressSimplePicker",
|
||||||
@ -62,6 +62,9 @@ export default {
|
|||||||
addressType:{
|
addressType:{
|
||||||
type:[String,Number]
|
type:[String,Number]
|
||||||
},
|
},
|
||||||
|
countryCode:{
|
||||||
|
type:[String]
|
||||||
|
},
|
||||||
isInitiated:{
|
isInitiated:{
|
||||||
type: [Boolean,String],
|
type: [Boolean,String],
|
||||||
required: false,
|
required: false,
|
||||||
@ -95,6 +98,7 @@ export default {
|
|||||||
pageNum:1,
|
pageNum:1,
|
||||||
pageSize:5,
|
pageSize:5,
|
||||||
addressType: this.addressType,
|
addressType: this.addressType,
|
||||||
|
country:this.countryCode,
|
||||||
searchValue:null,
|
searchValue:null,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -104,6 +108,10 @@ export default {
|
|||||||
this.svalue = newVal;
|
this.svalue = newVal;
|
||||||
this.slable = this.svalue;
|
this.slable = this.svalue;
|
||||||
},
|
},
|
||||||
|
countryCode(){
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.createdId = String(new Date().getTime()) // 给个随机id 判断是否clickoutside
|
this.createdId = String(new Date().getTime()) // 给个随机id 判断是否clickoutside
|
||||||
@ -181,8 +189,9 @@ export default {
|
|||||||
|
|
||||||
// 首次执行
|
// 首次执行
|
||||||
// this.queryParams.empCode = this.firstFlag?this.value:null;
|
// this.queryParams.empCode = this.firstFlag?this.value:null;
|
||||||
|
console.log(this.queryParams);
|
||||||
|
|
||||||
listEmisCustomerAddress(this.queryParams).then(response => {
|
listSimpleEmisCustomerAddress(this.queryParams).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.dataList = response.rows;
|
this.dataList = response.rows;
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
style="width:100%"
|
style="width:100%"
|
||||||
allow-create
|
allow-create
|
||||||
@change="onChange">
|
@change="onChange">
|
||||||
<el-option v-for="item in filterData" :key="item.goodsCode" :label="item.goodsName" :value="item.goodsCode">
|
<el-option v-for="item in filterData" :key="item.goodsName" :label="item.goodsName" :value="item.goodsName">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-checkbox-group v-model="svalue">
|
<!-- <el-checkbox-group v-model="svalue">
|
||||||
@ -38,6 +38,10 @@
|
|||||||
placeholder:{
|
placeholder:{
|
||||||
type: [String],
|
type: [String],
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
goodsList:{
|
||||||
|
type: [Array],
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -82,7 +86,7 @@
|
|||||||
let itemData=this.filterMap[item];
|
let itemData=this.filterMap[item];
|
||||||
if(itemData!=null){
|
if(itemData!=null){
|
||||||
selData.push(itemData)
|
selData.push(itemData)
|
||||||
selCodeStr=selCodeStr+itemData.goodsCode+",";
|
selCodeStr=selCodeStr+itemData.goodsName+",";
|
||||||
selNameStr=selNameStr+itemData.goodsName+",";
|
selNameStr=selNameStr+itemData.goodsName+",";
|
||||||
}else{
|
}else{
|
||||||
// if( this.$refs.selectRef.createdLabel!=null ){
|
// if( this.$refs.selectRef.createdLabel!=null ){
|
||||||
@ -91,7 +95,7 @@
|
|||||||
goodsName:item,
|
goodsName:item,
|
||||||
}
|
}
|
||||||
selData.push(itemData)
|
selData.push(itemData)
|
||||||
selCodeStr=selCodeStr+itemData.goodsCode+",";
|
selCodeStr=selCodeStr+itemData.goodsName+",";
|
||||||
selNameStr=selNameStr+itemData.goodsName+",";
|
selNameStr=selNameStr+itemData.goodsName+",";
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
@ -119,7 +123,7 @@
|
|||||||
listSimpleEmisGoods(this.queryParams).then(response => {
|
listSimpleEmisGoods(this.queryParams).then(response => {
|
||||||
this.filterData= response.rows
|
this.filterData= response.rows
|
||||||
this.filterData.forEach(item => {
|
this.filterData.forEach(item => {
|
||||||
this.filterMap[item.goodsCode]=item;
|
this.filterMap[item.id]=item;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,12 +9,12 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item label="客户名称" prop="company">
|
<el-form-item label="客户名称" prop="company">
|
||||||
<el-input v-model="form.company" placeholder="" />
|
<el-input v-model="form.customerName" placeholder="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="寄件人" prop="customerName">
|
<el-form-item label="联系人" prop="customerName">
|
||||||
<el-input v-model="form.customerName" placeholder="" />
|
<el-input v-model="form.contact" placeholder="" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|||||||
@ -120,12 +120,8 @@
|
|||||||
|
|
||||||
<el-table-column :label="$t('月结卡号')" align="center" prop="monthlyPayCode" min-width="100" />
|
<el-table-column :label="$t('月结卡号')" align="center" prop="monthlyPayCode" min-width="100" />
|
||||||
|
|
||||||
<el-table-column :label="$t('寄件人')" align="left" prop="customerName" width="120" :show-overflow-tooltip="true" >
|
<el-table-column :label="$t('联系人')" align="left" prop="contact" width="120" :show-overflow-tooltip="true" />
|
||||||
<template slot-scope="scope">
|
<el-table-column :label="$t('电话')" align="center" prop="phone" width="100" />
|
||||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.customerName}}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('手机号码')" align="center" prop="phone" width="100" />
|
|
||||||
|
|
||||||
<!-- <el-table-column :label="$t('英文简称')" align="center" prop="customerNameEn" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('英文简称')" align="center" prop="customerNameEn" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('手机号')" align="center" prop="mobile" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('手机号')" align="center" prop="mobile" min-width="100" /> -->
|
||||||
@ -153,7 +149,7 @@
|
|||||||
<!-- <el-table-column :label="$t('城市')" align="center" prop="city" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('城市')" align="center" prop="city" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('区县')" align="center" prop="county" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('区县')" align="center" prop="county" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('镇')" align="center" prop="town" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('镇')" align="center" prop="town" min-width="100" /> -->
|
||||||
<el-table-column :label="$t('地址')" align="center" prop="address" min-width="100" show-overflow-tooltip="true" />
|
<el-table-column :label="$t('地址')" align="center" prop="address" min-width="100" :show-overflow-tooltip="true" />
|
||||||
<!-- <el-table-column :label="$t('email')" align="center" prop="email" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('email')" align="center" prop="email" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('发件国')" align="center" prop="sendCountry" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('发件国')" align="center" prop="sendCountry" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('发件省')" align="center" prop="sendProvince" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('发件省')" align="center" prop="sendProvince" min-width="100" /> -->
|
||||||
@ -163,7 +159,7 @@
|
|||||||
<!-- <el-table-column :label="$t('邮编')" align="center" prop="postCode" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('邮编')" align="center" prop="postCode" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('启用状态')" align="center" prop="status" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('启用状态')" align="center" prop="status" min-width="100" /> -->
|
||||||
<!-- <el-table-column :label="$t('真实姓名')" align="center" prop="realName" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('真实姓名')" align="center" prop="realName" min-width="100" /> -->
|
||||||
<el-table-column :label="$t('业务网点范围')" align="center" prop="bizSiteName" min-width="150" show-overflow-tooltip="true"/>
|
<el-table-column :label="$t('业务网点范围')" align="center" prop="bizSiteName" min-width="150" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column :label="$t('回款联系人')" align="center" prop="payeeName" min-width="100" />
|
<el-table-column :label="$t('回款联系人')" align="center" prop="payeeName" min-width="100" />
|
||||||
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmenName" min-width="100" />
|
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmenName" min-width="100" />
|
||||||
<el-table-column :label="$t('开通oms')" align="center" prop="blOpenOms" min-width="100" >
|
<el-table-column :label="$t('开通oms')" align="center" prop="blOpenOms" min-width="100" >
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
<el-input v-model="form.sendDate" placeholder="" readonly="" disabled />
|
<el-input v-model="form.sendDate" placeholder="" readonly="" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-form-item label="运单号" prop="billCode" >
|
<el-form-item label="运单号" prop="billCode" >
|
||||||
<div style="display:inline-flex">
|
<div style="display:inline-flex">
|
||||||
@ -62,11 +63,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="寄件网点" prop="sendSiteName">
|
|
||||||
<el-input v-model="form.sendSiteName" placeholder="寄件网点" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="取件方式" prop="pickupMethod">
|
<el-form-item label="取件方式" prop="pickupMethod">
|
||||||
<el-select v-model="form.pickupMethod" placeholder="请选择">
|
<el-select v-model="form.pickupMethod" placeholder="请选择">
|
||||||
@ -104,20 +101,36 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12">
|
<el-col :span="6">
|
||||||
<div style="display:flex;padding-left: 30px;">
|
<el-form-item label="寄件网点" prop="sendSiteName">
|
||||||
|
<el-input v-model="form.sendSiteName" placeholder="寄件网点" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-checkbox-group v-model="form.printTypeCheckList">
|
<el-col :span="18">
|
||||||
|
<el-form-item label="打印选项:" prop="sendSiteName">
|
||||||
|
<el-checkbox-group v-model="printTypeCheckList">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-for="dict in dict.type.emis_print_type"
|
v-for="dict in dict.type.emis_print_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
>
|
>
|
||||||
<span style="font-size:10px" >{{dict.label}}</span>
|
<span style="font-size:13px" >{{dict.label}}</span>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</el-form-item>
|
||||||
</el-col> -->
|
<!-- <div style="display:flex;padding-left: 30px;">
|
||||||
|
<el-checkbox-group v-model="printTypeCheckList">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="dict in dict.type.emis_print_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
>
|
||||||
|
<span style="font-size:13px" >{{dict.label}}</span>
|
||||||
|
</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div> -->
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<!-- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}">
|
<!-- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}">
|
||||||
<el-form-item label="寄件客户" prop="customerCode">
|
<el-form-item label="寄件客户" prop="customerCode">
|
||||||
@ -232,7 +245,7 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="收件人" prop="reciever.name">
|
<el-form-item label="收件人" prop="reciever.name">
|
||||||
<CustomerAddressSimplePicker1 addressType="2" v-model="form.reciever.name" @onChange="onChangeSelectReceiver"></CustomerAddressSimplePicker1>
|
<CustomerAddressSimplePicker1 addressType="2" :countryCode="form.reciever.country" v-model="form.reciever.name" @onChange="onChangeSelectReceiver"></CustomerAddressSimplePicker1>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -315,46 +328,42 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
max-height="300px"
|
max-height="300px"
|
||||||
@cell-mouse-enter="handleGoodsCellEnter"
|
|
||||||
@cell-mouse-leave="handleGoodsCellLeave"
|
|
||||||
>
|
>
|
||||||
<!-- @cell-mouse-enter="handleCellEnter"
|
|
||||||
@cell-mouse-leave="handleCellLeave" -->
|
|
||||||
|
|
||||||
<el-table-column label="序号" align="center" width="50">
|
<el-table-column label="操作" align="center" width="50">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.$index+1 }} </span>
|
<span class="icon iconfont"
|
||||||
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
||||||
|
@click="()=>deleteGoodsItem(scope.row)"></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
||||||
<!-- v-if="scope.row.isEdit" -->
|
|
||||||
<!-- <div v-else class="txt">{{scope.row.goodsName}}</div> -->
|
|
||||||
|
|
||||||
<el-table-column prop="length" label="长(cm)" align="center" width="60">
|
<el-table-column prop="length" label="长(cm)" align="center" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.length" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.length" @input="(val)=>handleCalcVolume(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="width" label="宽(cm)" align="center" width="60">
|
<el-table-column prop="width" label="宽(cm)" align="center" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.width" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.width" @input="(val)=>handleCalcVolume(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="height" label="高(cm)" align="center" width="60">
|
<el-table-column prop="height" label="高(cm)" align="center" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.height" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.height" @input="(val)=>handleCalcVolume(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="volume" label="体积(m³)" align="center" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.volume" size="mini" placeholder="" disabled></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="cargoQty" label="件数" align="center" width="60">
|
<el-table-column prop="cargoQty" label="件数" align="center" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.cargoQty" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.cargoQty" @input="(val)=>handleCalcQty(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="volumn" label="体积(m³)" align="center" width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.volumn" size="mini" placeholder="" disabled></el-input>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="goodsName" label="描述" align="center" min-width="100">
|
<el-table-column prop="goodsName" label="描述" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.goodsName" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.goodsName" size="mini" placeholder=""></el-input>
|
||||||
@ -367,18 +376,12 @@
|
|||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="实际重量" prop="billWeight" label-width="70px">
|
<el-form-item label="实际重量" prop="billWeight" label-width="70px">
|
||||||
<el-input v-model="form.billWeight" @blur="calcSettlementWeightByRemote()" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
|
<el-input v-model="form.billWeight" @blur="reCalcSettlementWeight" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
|
||||||
<span slot="suffix">(kg)</span>
|
<span slot="suffix">(kg)</span>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="总件数" prop="parcelQty">
|
|
||||||
<el-input v-model="form.parcelQty" style="text-align: right;" placeholder="请输入件数" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="总体积" prop="totalVolume" label-width="70px" >
|
<el-form-item label="总体积" prop="totalVolume" label-width="70px" >
|
||||||
<!-- <div style="display:inline-flex">
|
<!-- <div style="display:inline-flex">
|
||||||
<el-input v-model="form.length" style="width:100px" placeholder="长" >
|
<el-input v-model="form.length" style="width:100px" placeholder="长" >
|
||||||
@ -392,12 +395,18 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div style="">
|
<div style="">
|
||||||
<el-input v-model="form.totalVolume" @blur="calcSettlementWeightByRemote()" style="text-align: right;width: 120px" placeholder="体积" >
|
<el-input v-model="form.totalVolume" style="text-align: right;width: 120px" placeholder="体积" >
|
||||||
<span slot="suffix">(m³)</span>
|
<span slot="suffix">(m³)</span>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="总件数" prop="parcelQty" label-width="70px">
|
||||||
|
<el-input v-model="form.parcelQty" style="text-align: right;" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="体积重量" prop="volumeWeight" label-width="70px">
|
<el-form-item label="体积重量" prop="volumeWeight" label-width="70px">
|
||||||
<el-input v-model="form.volumeWeight" placeholder="" disabled>
|
<el-input v-model="form.volumeWeight" placeholder="" disabled>
|
||||||
@ -437,14 +446,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="生成子单" prop="blGenSubbill" label-width="70px">
|
<el-form-item label="生成子单" prop="blGenSubbill" label-width="70px">
|
||||||
<el-radio-group v-model="form.blGenSubbille">
|
<el-radio-group v-model="form.blGenSubbill" @change="onGenSubbill">
|
||||||
<el-radio label="1">是</el-radio>
|
<el-radio :key="1" :label="1">是</el-radio>
|
||||||
<el-radio label="0">否</el-radio>
|
<el-radio :key="0" :label="0">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="form.blGenSubbille==1">
|
<el-col :span="24" v-if="form.blGenSubbill==1">
|
||||||
<el-form-item label="子单号" prop="billCodeSub" label-width="70px">
|
<el-form-item label="子单号" prop="billCodeSub" label-width="70px">
|
||||||
<el-input v-model="form.billCodeSub" type="textarea" placeholder="" disabled />
|
<el-input v-model="form.billCodeSub" type="textarea" placeholder="" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -471,7 +480,20 @@
|
|||||||
<el-col :span="12" >
|
<el-col :span="12" >
|
||||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;padding: 0px 15px;">
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;padding: 0px 15px;">
|
||||||
|
|
||||||
<el-col :span="24"><div style="font-weight:600">费用明细</div></el-col>
|
<el-col :span="24">
|
||||||
|
<el-form-item label="计费方式" prop="calcFeeType" label-width="70px">
|
||||||
|
<!-- <el-input v-model="form.calcFeeType" placeholder="请输入计费方式" /> -->
|
||||||
|
<el-radio-group v-model="form.calcFeeType" >
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.emis_calc_fee_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="" prop="goodsType" label-width="0px">
|
<el-form-item label="" prop="goodsType" label-width="0px">
|
||||||
<el-table
|
<el-table
|
||||||
@ -492,31 +514,18 @@
|
|||||||
max-height="300px"
|
max-height="300px"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<!-- @cell-mouse-enter="handleCellEnter"
|
|
||||||
@cell-mouse-leave="handleCellLeave" -->
|
|
||||||
<!--
|
|
||||||
<el-table-column label="序号" align="center" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.$index+1 }} </span>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<!-- v-if="scope.row.isEdit" -->
|
|
||||||
<!-- <div v-else class="txt">{{scope.row.goodsName}}</div> -->
|
|
||||||
<!--
|
|
||||||
"feeCode": "费用类型 eg:1001",
|
|
||||||
"feeName": "费用名称:保险费",
|
|
||||||
"fee": 10,
|
|
||||||
"currency": "币种 CNY",
|
|
||||||
"quoteId": "报价ID",
|
|
||||||
"orderNum": "序号: 1",
|
|
||||||
"calcExp": "计算公式",
|
|
||||||
"addWeightPrice": "续重",
|
|
||||||
"remark": "费用条码描述" -->
|
|
||||||
|
|
||||||
<el-table-column prop="length" label="收费项" align="center" min-width="100">
|
<el-table-column label="操作" align="center" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="icon iconfont"
|
||||||
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
||||||
|
v-if="scope.row.blAutoGen==0"
|
||||||
|
@click="()=>deleteFeeItem(scope.row)"></span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="feeName" label="收费项" align="center" width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.feeName }}</span>
|
<span style="font-weight:600;color:red">{{ scope.row.feeName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="fee" label="应收" align="center" width="50">
|
<el-table-column prop="fee" label="应收" align="center" width="50">
|
||||||
@ -524,30 +533,61 @@
|
|||||||
<span>{{ scope.row.fee }}</span>
|
<span>{{ scope.row.fee }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="initWeight" label="首重费" align="center" width="60">
|
|
||||||
|
<el-table-column prop="initialWeightFee" label="首重费" align="center" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.initWeight" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.initialWeightFee" @input="(val)=>handleCalcFeeItem(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="addWeightPrice" label="续重单价" align="center" min-width="80">
|
<el-table-column prop="addWeightPrice" label="续重单价" align="center" width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.addWeightPrice" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.addWeightPrice" @input="(val)=>handleCalcFeeItem(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="realFee" label="实收" align="center" width="50">
|
<el-table-column prop="realFee" label="实收" align="center" width="50">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.realFee" size="mini" placeholder=""></el-input>
|
<el-input v-model="scope.row.realFee" @input="(val)=>handleCalcFeeItem(val,scope.row)" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" align="center" min-width="50">
|
<el-table-column prop="remark" label="描述" align="center" min-width="50">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div> (计算说明:{{scope.row.calcExp}},续重单价:{{scope.row.addWeightPrice}}) }} </div>
|
<el-input v-model="scope.row.remark" size="mini" placeholder=""></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div>
|
||||||
|
<el-popover
|
||||||
|
trigger="click"
|
||||||
|
ref="popoverFeeRef"
|
||||||
|
placement="top"
|
||||||
|
:width="400"
|
||||||
|
effect="light"
|
||||||
|
:show-arrow="false"
|
||||||
|
>
|
||||||
|
<feeItemForm :triggerCount="triggerCount" :feeList="this.form.feeItems" @on-changed="onFeeItemChange" @on-cancel="onFeeItemChange"></feeItemForm>
|
||||||
|
<el-button
|
||||||
|
slot="reference"
|
||||||
|
style="padding: 0px;font-size: 12px;"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleAddFee"
|
||||||
|
>增加自定义费用</el-button>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="总运费" prop="freight" label-width="70px">
|
||||||
|
<el-input v-model="form.freight" placeholder="" >
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="费用备注" prop="feeRemaker" label-width="70px">
|
||||||
|
<el-input v-model="form.feeRemaker" type="textarea" placeholder="" >
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="付款方式" prop="paymentType" label-width="70px">
|
<el-form-item label="付款方式" prop="paymentType" label-width="70px">
|
||||||
<el-select v-model="form.paymentType" placeholder="请选择">
|
<el-select v-model="form.paymentType" placeholder="请选择">
|
||||||
@ -579,30 +619,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="计费方式" prop="calcFeeType" label-width="70px">
|
|
||||||
<!-- <el-input v-model="form.calcFeeType" placeholder="请输入计费方式" /> -->
|
|
||||||
<el-radio-group v-model="form.calcFeeType" >
|
|
||||||
<el-radio
|
|
||||||
v-for="dict in dict.type.emis_calc_fee_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.value"
|
|
||||||
>{{dict.label}}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="总运费" prop="freight" label-width="70px">
|
|
||||||
<el-input v-model="form.freight" placeholder="" >
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="费用备注" prop="feeRemaker" label-width="70px">
|
|
||||||
<el-input v-model="form.feeRemaker" type="textarea" placeholder="" >
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -624,6 +643,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -670,6 +694,8 @@ import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAc
|
|||||||
import WarehouseInNoPicker from '@/views/emis/EmisBaseTools/WarehouseInNoPicker.vue';
|
import WarehouseInNoPicker from '@/views/emis/EmisBaseTools/WarehouseInNoPicker.vue';
|
||||||
|
|
||||||
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
||||||
|
import feeItemForm from './feeItemForm.vue';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -680,6 +706,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
components: {
|
components: {
|
||||||
|
feeItemForm,
|
||||||
TransProductCasPicker,
|
TransProductCasPicker,
|
||||||
WarehouseInNoPicker,
|
WarehouseInNoPicker,
|
||||||
EmisMonthpayAccountPicker,
|
EmisMonthpayAccountPicker,
|
||||||
@ -722,6 +749,9 @@ data() {
|
|||||||
addressType:null,
|
addressType:null,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
|
isInit:true,
|
||||||
|
triggerCount:0,
|
||||||
|
printTypeCheckList:['1','2','5'],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
timer:null,
|
timer:null,
|
||||||
@ -852,67 +882,27 @@ data() {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"billCode": {
|
|
||||||
handler (newValue, oldValue) {
|
|
||||||
// this.id = newValue;
|
|
||||||
// this.initData();
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
"form.transLine":{
|
|
||||||
handler (newValue, oldValue) {
|
|
||||||
this.calcDestSite();
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
"form.reciever.province":{
|
"form.reciever.province":{
|
||||||
handler (newValue, oldValue) {
|
handler (newValue, oldValue) {
|
||||||
console.log("==>"+newValue)
|
this.calcDestSite();
|
||||||
this.calcDestSite();
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
"form.length":{
|
|
||||||
handler (newValue, oldValue) {
|
|
||||||
this.calcVolume();
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
"form.width":{
|
|
||||||
handler (newValue, oldValue) {
|
|
||||||
this.calcVolume();
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
"form.height":{
|
|
||||||
handler (newValue, oldValue) {
|
|
||||||
this.calcVolume();
|
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
"form.totalVolume":{
|
"form.totalVolume":{
|
||||||
handler (newValue, oldValue) {
|
handler (newValue, oldValue) {
|
||||||
if(newValue!= oldValue){
|
this.reCalcVolumeWeight();
|
||||||
this.calcVolumeWeightByTotalVolume();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
"form.volumeWeight":{
|
"form.volumeWeight":{
|
||||||
handler (newValue, oldValue) {
|
handler (newValue, oldValue) {
|
||||||
if(newValue!= oldValue){
|
this.reCalcSettlementWeight();
|
||||||
this.calcSettlementWeightByRemote();
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
"form.billWeight":{
|
"form.billWeight":{
|
||||||
handler (newValue, oldValue) {
|
handler (newValue, oldValue) {
|
||||||
if(newValue!= oldValue){
|
this.reCalcSettlementWeight();
|
||||||
this.calcSettlementWeightByRemote();
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
@ -936,8 +926,69 @@ mouted(){
|
|||||||
created() {
|
created() {
|
||||||
this.billCode=this.$route.query.billCode;
|
this.billCode=this.$route.query.billCode;
|
||||||
this.initData();
|
this.initData();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleAddFee(){
|
||||||
|
this.triggerCount++;
|
||||||
|
},
|
||||||
|
onFeeItemChange(item){
|
||||||
|
this.$refs.popoverFeeRef.doClose();
|
||||||
|
if(item!=null){
|
||||||
|
let newItem=Object.assign({},item)
|
||||||
|
this.form.feeItems.push(newItem);
|
||||||
|
this.handleCalcFeeItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
deleteFeeItem(row){
|
||||||
|
if(row.blAutoGen==1){
|
||||||
|
this.$message('不允许删除!')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
let newList = this.form.feeItems.filter(item => item.feeCode !== row.feeCode);
|
||||||
|
this.form.feeItems=newList;
|
||||||
|
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
deleteGoodsItem(row){
|
||||||
|
this.$confirm('确定删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
let newList = this.form.cargoList.filter(item => item.goodsName !== row.goodsName);
|
||||||
|
|
||||||
|
this.form.cargoList=newList;
|
||||||
|
this.handleCalcQty();
|
||||||
|
this.handleCalcVolume();
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
lpadZero(val,len) {
|
||||||
|
return (new Array(len + 1).join('0') + val).slice(-len);
|
||||||
|
},
|
||||||
|
onGenSubbill(value){
|
||||||
|
if(value==1 && this.form.parcelQty>0 && this.form.billCode){
|
||||||
|
let billSubCodeStr="";
|
||||||
|
for(let i=1;i<this.form.parcelQty;i++){
|
||||||
|
let subBillCode = this.form.billCode+""+this.lpadZero(i,3);
|
||||||
|
billSubCodeStr=billSubCodeStr+subBillCode+";"
|
||||||
|
}
|
||||||
|
this.form.billCodeSub=billSubCodeStr;
|
||||||
|
}else{
|
||||||
|
this.form.billCodeSub=null;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
openCollapse(index){
|
openCollapse(index){
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -955,11 +1006,31 @@ methods: {
|
|||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.form.productTypeSelArr=[this.form.transLine,this.form.productType];
|
this.form.productTypeSelArr=[this.form.transLine,this.form.productType];
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
|
this.isInit=false;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
// console.log(this.dict.type.emis_declare_mode[0]);
|
||||||
|
|
||||||
|
// this.form.customsEclaration = this.dict.type.emis_declare_mode[0].value;
|
||||||
|
this.form.customsEclaration='1';
|
||||||
|
this.form.customsClear='1';
|
||||||
|
this.form.pickupMethod='2';
|
||||||
|
this.form.dispatchMethod='1';
|
||||||
|
// this.form.billWeight=1.0;
|
||||||
|
// this.form.totalVolume=0.0;
|
||||||
|
this.form.parcelQty=1;
|
||||||
|
this.form.packType='2';
|
||||||
|
this.form.blOverWeight='0';
|
||||||
|
this.form.blGenSubbill=0;
|
||||||
|
this.form.paymentType='1';
|
||||||
|
this.form.calcFeeType='1';
|
||||||
|
this.form.blMessage='1'
|
||||||
|
|
||||||
|
this.isInit=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
@ -969,6 +1040,7 @@ methods: {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.$emit("on-cancel");
|
this.$emit("on-cancel");
|
||||||
},
|
},
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
@ -1057,7 +1129,8 @@ methods: {
|
|||||||
operateEmployeeCode: null,
|
operateEmployeeCode: null,
|
||||||
blMessage: null,
|
blMessage: null,
|
||||||
blAcceptMessage: null,
|
blAcceptMessage: null,
|
||||||
meterType:null
|
meterType:null,
|
||||||
|
blGenSubbill:null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -1122,6 +1195,11 @@ methods: {
|
|||||||
},
|
},
|
||||||
// 计算目的站点
|
// 计算目的站点
|
||||||
calcDestSite(){
|
calcDestSite(){
|
||||||
|
// 初始化不计算
|
||||||
|
if(this.isInit){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let queryParams = {
|
let queryParams = {
|
||||||
lineCode:this.form.transLine,
|
lineCode:this.form.transLine,
|
||||||
province:this.form.reciever.province
|
province:this.form.reciever.province
|
||||||
@ -1140,50 +1218,92 @@ methods: {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 计算体积
|
handleCalcVolume(val,row){
|
||||||
calcVolume(){
|
// 初始化不计算
|
||||||
if(this.form.length && this.form.width && this.form.height){
|
if(this.isInit){
|
||||||
let totalVolume=parseFloat(this.form.length)*parseFloat(this.form.width)*parseFloat(this.form.height);
|
return;
|
||||||
this.form.totalVolume = totalVolume/1000000;
|
|
||||||
this.calcVolumeWeightByTotalVolume();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let totalVolume=0.0;
|
||||||
|
if(row!=null){
|
||||||
|
let volume=parseFloat(row.length)*parseFloat(row.width)*parseFloat(row.height);
|
||||||
|
row.volume=parseFloat((volume/1000000).toFixed(5));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.cargoList.forEach(item=>{
|
||||||
|
totalVolume=totalVolume+item.volume;
|
||||||
|
});
|
||||||
|
this.form.totalVolume = totalVolume;
|
||||||
|
|
||||||
|
},
|
||||||
|
handleCalcQty(val,row){
|
||||||
|
let totalCargoQty=0;
|
||||||
|
this.form.cargoList.forEach(item=>{
|
||||||
|
totalCargoQty=totalCargoQty+parseInt(item.cargoQty);
|
||||||
|
});
|
||||||
|
this.form.parcelQty = totalCargoQty;
|
||||||
|
},
|
||||||
|
handleCalcFeeItem(val,row){
|
||||||
|
let totalFee=0;
|
||||||
|
this.form.feeItems.forEach(item=>{
|
||||||
|
totalFee=totalFee+parseInt(item.realFee);
|
||||||
|
});
|
||||||
|
this.form.freight = totalFee;
|
||||||
},
|
},
|
||||||
// 计算体积重量
|
// 计算体积重量
|
||||||
calcVolumeWeightByTotalVolume(){
|
reCalcVolumeWeight(){
|
||||||
let postData={
|
// 初始化不计算
|
||||||
productType: this.form.productType,
|
if(this.isInit){
|
||||||
totalVolume: this.form.totalVolume,
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( this.form.totalVolume
|
||||||
|
&& this.form.productType
|
||||||
|
){
|
||||||
|
let postData={
|
||||||
|
productType: this.form.productType,
|
||||||
|
totalVolume: this.form.totalVolume,
|
||||||
}
|
}
|
||||||
|
|
||||||
calcVolumeWeight(postData).then(response => {
|
calcVolumeWeight(postData).then(response => {
|
||||||
this.form.volumeWeight = response.data.volumeWeight;
|
this.form.volumeWeight = response.data.volumeWeight;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 计算计算重量
|
// 计算计算重量
|
||||||
calcSettlementWeightByRemote(){
|
reCalcSettlementWeight(){
|
||||||
|
// 初始化不计算
|
||||||
|
if(this.isInit){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(this.form.billWeight
|
if(this.form.billWeight
|
||||||
&& this.form.totalVolume
|
&& this.form.volumeWeight
|
||||||
&& this.form.productType
|
&& this.form.productType
|
||||||
){
|
){
|
||||||
let postData={
|
setTimeout(()=>{
|
||||||
productType: this.form.productType,
|
let postData={
|
||||||
volumeWeight: this.form.volumeWeight,
|
productType: this.form.productType,
|
||||||
billWeight: this.form.billWeight,
|
volumeWeight: this.form.volumeWeight,
|
||||||
}
|
billWeight: this.form.billWeight,
|
||||||
// console.log(postData);
|
}
|
||||||
calcSetteldWeight(postData).then(response => {
|
|
||||||
console.log(response);
|
calcSetteldWeight(postData).then(response => {
|
||||||
this.form.settlementWeight = response.data.settlementWeight;
|
this.form.settlementWeight = response.data.settlementWeight;
|
||||||
this.form.feeWeight = this.form.settlementWeight ;
|
this.form.feeWeight = this.form.settlementWeight ;
|
||||||
});
|
});
|
||||||
|
},1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
calcBillFee(){
|
calcBillFee(){
|
||||||
|
// 初始化不计算
|
||||||
|
if(this.isInit){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(this.form.settlementWeight
|
if(this.form.settlementWeight
|
||||||
&& this.form.totalVolume
|
|
||||||
&& this.form.productType
|
&& this.form.productType
|
||||||
&& this.form.sendSiteCode
|
&& this.form.sendSiteCode
|
||||||
&& this.form.dispatchUnderlingSiteCode
|
&& this.form.dispatchUnderlingSiteCode
|
||||||
@ -1195,17 +1315,27 @@ methods: {
|
|||||||
custNo: this.form.custNo,
|
custNo: this.form.custNo,
|
||||||
calcFeeType: this.form.calcFeeType,
|
calcFeeType: this.form.calcFeeType,
|
||||||
settlementWeight: this.form.settlementWeight,
|
settlementWeight: this.form.settlementWeight,
|
||||||
totalVolume: this.form.totalVolume,
|
|
||||||
sendSiteCode: this.form.sendSiteCode,
|
sendSiteCode: this.form.sendSiteCode,
|
||||||
dispatchUnderlingSiteCode: this.form.dispatchUnderlingSiteCode,
|
dispatchUnderlingSiteCode: this.form.dispatchUnderlingSiteCode,
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(postData);
|
|
||||||
calcWaybillFee(postData).then(response => {
|
calcWaybillFee(postData).then(response => {
|
||||||
console.log(response);
|
let newFeeList=response.data.feeList;
|
||||||
this.form.freight = response.data.totalFee;
|
let newFeeMap = new Map();
|
||||||
this.form.feeItems = response.data.feeList ;
|
newFeeList.forEach(item=>{
|
||||||
|
newFeeMap[item.feeCode]=item;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
let custFeeList = [];
|
||||||
|
this.form.feeItems.forEach(item=>{
|
||||||
|
if(item.blAutoGen!='1' && !(item.feeCode in newFeeMap)){
|
||||||
|
custFeeList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.form.feeItems = newFeeList.concat(custFeeList);
|
||||||
|
this.handleCalcFeeItem();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1218,20 +1348,50 @@ methods: {
|
|||||||
this.form.dispatchSite= item.siteName;
|
this.form.dispatchSite= item.siteName;
|
||||||
},
|
},
|
||||||
onGoodsChange(goodsList,goodsInfo){
|
onGoodsChange(goodsList,goodsInfo){
|
||||||
this.form.goodsInfo = goodsInfo;
|
|
||||||
this.form.cargoList = [];
|
|
||||||
if(goodsList!=null && goodsList.length>0) {
|
if(goodsList!=null && goodsList.length>0) {
|
||||||
|
// 旧map
|
||||||
|
let nameOldMap = new Map();
|
||||||
|
if(this.form.cargoList!=null&& this.form.cargoList.length>0){
|
||||||
|
this.form.cargoList.forEach(item=>{
|
||||||
|
nameOldMap[item.goodsName]=item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新map
|
||||||
|
let nameNewMap = new Map();
|
||||||
goodsList.forEach(item=>{
|
goodsList.forEach(item=>{
|
||||||
let cargo={
|
nameNewMap[item.goodsName]=item;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 添加没有的
|
||||||
|
goodsList.forEach(item=>{
|
||||||
|
if(!(item.goodsName in nameOldMap)){
|
||||||
|
let cargo={
|
||||||
"goodsCode": item.goodsCode,
|
"goodsCode": item.goodsCode,
|
||||||
"goodsName": item.goodsName,
|
"goodsName": item.goodsName,
|
||||||
"cargoQty": 1,
|
"cargoQty": 1,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"width": 0,
|
"width": 0,
|
||||||
"height": 0,
|
"height": 0,
|
||||||
|
"volume": 0,
|
||||||
|
}
|
||||||
|
this.form.cargoList.push(cargo);
|
||||||
}
|
}
|
||||||
this.form.cargoList.push(cargo)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let goodsInfo='';
|
||||||
|
|
||||||
|
if(this.form.cargoList!=null&& this.form.cargoList.length>0){
|
||||||
|
this.form.cargoList.forEach(item=>{
|
||||||
|
goodsInfo=goodsInfo+item.goodsName+",";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.goodsInfo = goodsInfo;
|
||||||
|
|
||||||
|
this.handleCalcQty();
|
||||||
|
this.handleCalcVolume();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showLocalTime(){
|
showLocalTime(){
|
||||||
@ -1279,16 +1439,6 @@ methods: {
|
|||||||
font-size: 12px!important;
|
font-size: 12px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .el-form-item{
|
|
||||||
// margin-bottom: 8px !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.form-row-group-panel{
|
|
||||||
// margin-right: 5px;
|
|
||||||
// padding: 8px;
|
|
||||||
// border-right: 1px solid #ededed;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.platform-auto-complete {
|
.platform-auto-complete {
|
||||||
.el-autocomplete-suggestion__wrap {
|
.el-autocomplete-suggestion__wrap {
|
||||||
|
|||||||
161
src/views/emis/emisWaybill/feeItemForm.vue
Normal file
161
src/views/emis/emisWaybill/feeItemForm.vue
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding:8px">
|
||||||
|
<el-form ref="form" :model="form" size="mini" :rules="rules" label-width="60px">
|
||||||
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('费用')" prop="realFee" >
|
||||||
|
<el-select v-model="form.feeCode" placeholder="费用"
|
||||||
|
style="width:100%"
|
||||||
|
@change="feeChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in feeTypeList"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value+'-'+dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('实收')" prop="realFee" >
|
||||||
|
<el-input v-model="form.realFee" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="$t('首重费')" prop="initialWeightFee" >
|
||||||
|
<el-input v-model="form.initialWeightFee" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="$t('续重单价')" prop="addWeightPrice" >
|
||||||
|
<el-input v-model="form.addWeightPrice" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="$t('备注')" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center;margin-bottom: 10px;">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listEmisWaybillFeeitem, getEmisWaybillFeeitem, delEmisWaybillFeeitem, addEmisWaybillFeeitem, updateEmisWaybillFeeitem } from "@/api/emis/emisWaybillFeeitem";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "emisWaybillFeeitemForm",
|
||||||
|
props:{
|
||||||
|
id:{
|
||||||
|
type:Number
|
||||||
|
},
|
||||||
|
feeList:{
|
||||||
|
type:Array
|
||||||
|
},
|
||||||
|
triggerCount:{
|
||||||
|
type:Number
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: { },
|
||||||
|
dicts: ['emis_fee_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
emisWaybillFeeitemOptions: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
feeTypeList: [],
|
||||||
|
feeMap:null,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
feeCode: [
|
||||||
|
{ required: true, message: "费用类型必填", trigger: ["change","blur"] }
|
||||||
|
],
|
||||||
|
realFee: [
|
||||||
|
{ required: true, message: "费用不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"id": {
|
||||||
|
handler (newValue, oldValue) {
|
||||||
|
this.id = newValue;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
triggerCount(newVal){
|
||||||
|
this.initData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
feeChange(value){
|
||||||
|
let obj = {};
|
||||||
|
obj = this.feeTypeList.find((item)=>{
|
||||||
|
return item.value === value;
|
||||||
|
});
|
||||||
|
this.form.feeName=obj.label;
|
||||||
|
},
|
||||||
|
initData() {
|
||||||
|
this.reset();
|
||||||
|
this.feeTypeList=[];
|
||||||
|
this.feeMap = new Map();
|
||||||
|
this.feeList.forEach(item => {
|
||||||
|
this.feeMap[item.feeCode]=item;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.dict.type.emis_fee_type.forEach(item => {
|
||||||
|
if(!(item.value in this.feeMap)){
|
||||||
|
this.feeTypeList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.reset();
|
||||||
|
this.$emit("on-cancel");
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
feeCode: null,
|
||||||
|
feeName: null,
|
||||||
|
fee: null,
|
||||||
|
realFee: null,
|
||||||
|
currency: null,
|
||||||
|
initialWeightFee: 0,
|
||||||
|
addWeightPrice: 0,
|
||||||
|
blAutoGen: 0,
|
||||||
|
orderNum: 0,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.fee=this.form.realFee;
|
||||||
|
this.$emit("on-changed",this.form);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user