This commit is contained in:
liuyp 2024-05-22 22:24:54 +08:00
commit 5f0260e364
8 changed files with 105 additions and 1638 deletions

View File

@ -44,7 +44,7 @@
this.svalue = newVal;
},
svalue(newVal, oldVal) {
this.$emit("input", this.svalue);
// this.$emit("input", this.svalue);
},
parentCode(newVal) {
this.queryData();

View File

@ -29,11 +29,6 @@
type: String,
required: false
},
isInitiated:{
type: [Boolean,String],
required: false,
default:false
}
},
data() {
@ -43,36 +38,33 @@
};
},
watch: {
value(newVal) {
this.svalue = newVal;
},
svalue(newVal, oldVal) {
this.$emit("input", this.svalue);
},
countryCode(newVal, oldVal) {
this.queryData();
}
},
created() {
if(this.isInitiated || this.svalue!=null){
this.queryData();
}
this.queryData();
},
methods: {
onChange() {
this.$emit("input", this.svalue);
this.$emit("onChange");
this.$emit("onChange",this.svalue);
},
queryData() {
this.optionItems =[];
if(this.countryCode==null && this.svalue==null){
return;
}
let queryParams = {countryCode:this.countryCode,regionType:1};
let queryParams = {
pageNum:1,
pageSize:50,
countryCode:this.countryCode,
regionCode:this.svalue,
regionType:1
};
console.log(queryParams);
listSimpleEmisRegion(queryParams).then(response => {
this.optionItems = response.rows;
console.log(response);
});
},

View File

@ -419,7 +419,7 @@ export default {
customerNameEn: null,
phone: null,
mobile: null,
customerType: this.customerType,
customerType: '1',
settledType: '1',
userType: null,
company: null,

View File

@ -7,8 +7,8 @@
<el-input v-model="form.customerCode" placeholder="自动生成" disabled />
</el-form-item>
</el-col> -->
<el-col :span="16">
<el-form-item label="客户名称" prop="company">
<el-col :span="10">
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="" />
</el-form-item>
</el-col>
@ -18,6 +18,9 @@
</el-form-item>
</el-col>
<el-col :span="6">
</el-col>
<el-col :span="8">
<el-form-item label="联系人" prop="customerName">
<el-input v-model="form.contact" placeholder="" />
@ -76,7 +79,14 @@
</el-col>
<el-col :span="8">
<el-form-item label="首次签约日期" prop="firstSigningDay">
<el-input v-model="form.firstSigningDay" placeholder="" />
<el-date-picker
style="width: 100%;"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="form.firstSigningDay"
type="date"
placeholder="首次签约日期"
></el-date-picker>
</el-form-item>
</el-col>
@ -357,7 +367,7 @@ export default {
simpleName: null,
phone: null,
mobile: null,
customerType: null,
customerType: '2',
settledType: '2',
userType: null,
company: null,
@ -415,13 +425,14 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
this.form.company=this.form.customerName;
updateEmisCustomerUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$emit("on-changed");
});
} else {
addEmisCustomerUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess("新增成功");
this.$emit("on-changed");
});
}

View File

@ -117,7 +117,7 @@
</el-table-column> -->
<el-table-column :label="$t('客户名称')" align="left" prop="company" width="180" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.company}}</div>
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.customerName}}</div>
</template>
</el-table-column>

File diff suppressed because it is too large Load Diff

View File

@ -297,7 +297,7 @@
<el-form-item label="国家地区" prop="reciever.province">
<div style="display:inline-flex">
<country-picker2 v-model="form.reciever.country" ></country-picker2>
<ProvincePicker2 v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px"></ProvincePicker2>
<ProvincePicker2 v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px" @onChange="handleCalcDestSite" ></ProvincePicker2>
<city-picker2 v-model="form.reciever.city" :parentCode="form.reciever.province" style="margin-left:5px"></city-picker2>
<district-picker2 v-model="form.reciever.county" :parentCode="form.reciever.city" style="margin-left:5px"></district-picker2>
</div>
@ -360,7 +360,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="实际重量" prop="billWeight" label-width="70px">
<el-input v-model="form.billWeight" @blur="reCalcSettlementWeight" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
<el-input v-model="form.billWeight" @blur="handleCalcSettlementWeight" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
<span slot="suffix">(kg)</span>
</el-input>
</el-form-item>
@ -397,17 +397,22 @@
</el-table-column>
<el-table-column prop="length" label="长(cm)" align="center" width="60">
<template slot-scope="scope">
<el-input v-model="scope.row.length" @input="(val)=>handleCalcVolume(val,scope.row)" size="mini" placeholder=""></el-input>
<el-input v-model="scope.row.length" @blur="(val)=>handleCalcVolume(scope.row)" size="mini" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column prop="width" label="宽(cm)" align="center" width="60">
<template slot-scope="scope">
<el-input v-model="scope.row.width" @input="(val)=>handleCalcVolume(val,scope.row)" size="mini" placeholder=""></el-input>
<el-input v-model="scope.row.width" @blur="(val)=>handleCalcVolume(scope.row)" size="mini" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column prop="height" label="高(cm)" align="center" width="60">
<template slot-scope="scope">
<el-input v-model="scope.row.height" @input="(val)=>handleCalcVolume(val,scope.row)" size="mini" placeholder=""></el-input>
<el-input v-model="scope.row.height" @blur="(val)=>handleCalcVolume(scope.row)" size="mini" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column prop="cargoQty" label="件数" align="center" width="60">
<template slot-scope="scope">
<el-input v-model="scope.row.cargoQty" @blur="(val)=>handleCargoQtyChange(scope.row)" size="mini" placeholder=""></el-input>
</template>
</el-table-column>
<el-table-column prop="volume" label="体积(m³)" align="center" width="80">
@ -415,11 +420,6 @@
<el-input v-model="scope.row.volume" size="mini" placeholder="" disabled></el-input>
</template>
</el-table-column>
<el-table-column prop="cargoQty" label="件数" align="center" width="60">
<template slot-scope="scope">
<el-input v-model="scope.row.cargoQty" @blur="(val)=>handleCargoQtyChange(val,scope.row)" @keyup.enter.native="(val)=>handleCargoQtyChange(val,scope.row)" size="mini" placeholder=""></el-input>
</template>
</el-table-column>
<!-- @input="(val)=>handleCalcQty(val,scope.row)" -->
<!-- <el-table-column prop="goodsName" label="描述" align="center" width="60">
@ -462,7 +462,7 @@
<el-col :span="12">
<el-form-item label="总体积" prop="totalVolume" label-width="70px" >
<div style="">
<el-input v-model="form.totalVolume" style="text-align: right;width: 120px" placeholder="体积" >
<el-input v-model="form.totalVolume" @input="handleCalcVolumeWeight" style="text-align: right;width: 120px" placeholder="体积" >
<span slot="suffix">(m³)</span>
</el-input>
</div>
@ -472,7 +472,7 @@
<el-col :span="12">
<el-form-item label="体积重量" prop="volumeWeight" label-width="70px">
<el-input v-model="form.volumeWeight" placeholder="" disabled>
<el-input v-model="form.volumeWeight" @input="calcBillFee" placeholder="" disabled>
<span slot="suffix">(kg)</span>
</el-input>
</el-form-item>
@ -480,7 +480,7 @@
<el-col :span="12">
<el-form-item label="结算重量" prop="settlementWeight" label-width="70px">
<el-input v-model="form.settlementWeight" placeholder="" disabled >
<el-input v-model="form.settlementWeight" @input="calcBillFee" placeholder="" disabled >
<span slot="suffix">(kg)</span>
</el-input>
</el-form-item>
@ -598,20 +598,20 @@
<el-table-column prop="initialWeightFee" label="首重费" align="center" width="60">
<template slot-scope="scope">
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.initialWeightFee" @input="(val)=>handleCalcFeeItem(val,scope.row)" size="mini" placeholder=""></el-input>
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.initialWeightFee" @input="(val)=>handleCalcFeeItem(scope.row)" size="mini" placeholder=""></el-input>
<div v-else> {{scope.row.initialWeightFee}} </div>
</template>
</el-table-column>
<el-table-column prop="addWeightPrice" label="续重单价" align="center" width="70">
<template slot-scope="scope">
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.addWeightPrice" @input="(val)=>handleCalcFeeItem(val,scope.row)" size="mini" placeholder=""></el-input>
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.addWeightPrice" @input="(val)=>handleCalcFeeItem(scope.row)" size="mini" placeholder=""></el-input>
<div v-else> {{scope.row.addWeightPrice}} </div>
</template>
</el-table-column>
<el-table-column prop="realFee" label="实收" align="center" width="50">
<template slot-scope="scope">
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.realFee" @input="(val)=>handleCalcFeeItem(val,scope.row)" size="mini" placeholder=""></el-input>
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.realFee" @input="(val)=>handleCalcFeeItem(scope.row)" size="mini" placeholder=""></el-input>
<div v-else> {{scope.row.realFee}} </div>
</template>
</el-table-column>
@ -862,6 +862,9 @@ data() {
billCode: [
{ required: true, message: "运单号不能为空", trigger: ["blur",'change'] }
],
destinationCountry: [
{ required: true, message: "目的国不能为空", trigger: ["blur",'change'] }
],
reciever:{
name: [
{ required: true, message: "收货人名不能为空", trigger: "blur" }
@ -869,9 +872,6 @@ data() {
phone: [
{ required: true, message: "收货人手机号不能为空", trigger: "blur" }
],
destinationCountry: [
{ required: true, message: "目的国不能为空", trigger: ["blur",'change'] }
],
country: [
{ required: true, message: "收货人国家不能为空", trigger: ["blur",'change'] }
],
@ -993,51 +993,9 @@ data() {
}
};
},
computed:{
},
computed: {
},
watch: {
"form.reciever.province":{
handler (newValue, oldValue) {
// this.isNeedSave=true;
this.calcDestSite();
},
immediate: false,
deep: true,
},
"form.totalVolume":{
handler (newValue, oldValue) {
this.reCalcVolumeWeight();
},
deep: true
},
"form.volumeWeight":{
handler (newValue, oldValue) {
this.reCalcSettlementWeight();
},
immediate: false,
deep: true
},
"form.billWeight":{
handler (newValue, oldValue) {
this.reCalcSettlementWeight();
},
immediate: false,
deep: true
},
"form.calcFeeType":{
handler (newValue, oldValue) {
this.calcBillFee();
},
immediate: false,
deep: true
},
"form.settlementWeight":{
handler (newValue, oldValue) {
this.calcBillFee();
},
immediate: false,
deep: true
},
"form.parcelQty":{
handler (newValue, oldValue) {
this.handleGenSubbill();
@ -1061,12 +1019,7 @@ computed:{
},
},
activated(){
},
mouted(){
},
updated(){
},
created() {
this.billCode=this.$route.query.billCode;
this.action=this.$route.query.action;
@ -1252,16 +1205,13 @@ methods: {
lpadZero(val,len) {
return (new Array(len + 1).join('0') + val).slice(-len);
},
handleGenSubbill(value){
handleGenSubbill(){
if(this.form.blGenSubbill==1 && this.form.parcelQty > 0 && this.form.billCode){
let billSubCodeStr="";
for(let i=1;i<=this.form.parcelQty;i++){
for(let i=1;i<=this.form.parcelQty&&i<50;i++){
let subBillCode = this.form.billCode+""+this.lpadZero(i,4);
billSubCodeStr=billSubCodeStr+subBillCode+","
// console.log(billSubCodeStr);
}
// let billSubCodeStr = this.form.billCode+"["+this.lpadZero(1,3)+"-"+this.lpadZero(this.form.parcelQty,3)+"]";
// console.log(billSubCodeStr);
this.form.billCodeSub=billSubCodeStr;
}else{
this.form.billCodeSub=null;
@ -1293,6 +1243,7 @@ methods: {
this.form.sendSiteCode=this.$store.getters.ownerSiteCode;
this.form.sendSiteName=this.$store.getters.ownerSiteName;
this.form.customsEclaration='1';
this.form.customsClear='1';
// this.form.pickupMethod='2';
@ -1495,12 +1446,12 @@ methods: {
},
// 计算目的站点
calcDestSite(){
handleCalcDestSite(){
// 初始化不计算
if(!this.isNeedSave){
return;
}
// if(!this.isNeedSave){
// return;
// }
console.log("1111=>"+this.form.reciever.province)
let queryParams = {
province:this.form.reciever.province
};
@ -1518,27 +1469,30 @@ methods: {
});
}
},
handleCalcVolume(val,row){
handleCalcVolume(row){
// 初始化不计算
if(!this.isNeedSave){
return;
}
let totalVolume=0.0;
if(row!=null){
let volume=parseFloat(row.length)*parseFloat(row.width)*parseFloat(row.height)*parseFloat(row.cargoQty);
row.volume=parseFloat((volume/1000000).toFixed(5));
let singleVolume=parseFloat(row.length)*parseFloat(row.width)*parseFloat(row.height);
let singleTotalVolume=singleVolume*parseFloat(row.cargoQty);
row.volume=parseFloat( (singleTotalVolume/1000000).toFixed(5) );
}
let totalVolume=0.0;
this.form.cargoList.forEach(item=>{
totalVolume=totalVolume+item.volume;
});
this.form.totalVolume = parseFloat(totalVolume.toFixed(5));
this.handleCalcVolumeWeight();
},
handleCalcFeeItem(val,row){
handleCalcFeeItem(row){
if(row!=null){
@ -1558,7 +1512,7 @@ methods: {
this.form.freight = totalFee;
},
// 计算体积重量
reCalcVolumeWeight(){
handleCalcVolumeWeight(){
// 初始化不计算
if(!this.isNeedSave){
return;
@ -1574,12 +1528,15 @@ methods: {
calcVolumeWeight(postData).then(response => {
this.form.volumeWeight = response.data.volumeWeight;
// 计算结算重量
this.handleCalcSettlementWeight();
});
}
},
// 计算计算重量
reCalcSettlementWeight(){
// 计算结算重量
handleCalcSettlementWeight(){
// 初始化不计算
if(!this.isNeedSave){
return;
@ -1589,24 +1546,26 @@ methods: {
&& this.form.volumeWeight
&& this.form.productType
){
setTimeout(()=>{
let postData={
productType: this.form.productType,
volumeWeight: this.form.volumeWeight,
billWeight: this.form.billWeight,
}
// setTimeout(()=>{
// },1000);
calcSetteldWeight(postData).then(response => {
this.form.settlementWeight = response.data.settlementWeight;
this.form.feeWeight = this.form.settlementWeight ;
});
},1000);
let postData={
productType: this.form.productType,
volumeWeight: this.form.volumeWeight,
billWeight: this.form.billWeight,
}
calcSetteldWeight(postData).then(response => {
this.form.settlementWeight = response.data.settlementWeight;
this.form.feeWeight = this.form.settlementWeight ;
// 计算费用
this.calcBillFee();
});
}
},
calcBillFee(){
console.log("11111=>"+this.isNeedSave)
// 初始化不计算
if(!this.isNeedSave){
return;
@ -1738,8 +1697,7 @@ methods: {
this.form.cargoList=[];
}
},
handleCargoQtyChange(val,row){
console.log(row);
handleCargoQtyChange(row){
this.handleInitGenGoods();
this.handleCalcVolume(row);

View File

@ -260,20 +260,17 @@
<el-table-column :label="$t('进仓单号')" align="center" prop="warehouseInNo" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('发货日期')" align="center" prop="sendDate" min-width="100" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="发货信息" align="center" > -->
<!-- <el-table-column :label="$t('运单编号')" align="center" prop="billCode" width="120" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/waybillManagement/waybillEntry?billCode=' + scope.row.billCode" class="link-type">
<span>{{ scope.row.billCode }}</span>
</router-link>
</template>
</el-table-column> -->
<el-table-column :label="$t('收件业务员')" align="center" prop="salesmen" min-width="100" :show-overflow-tooltip="true"/>
<!-- <el-table-column :label="$t('运单状态')" align="center" prop="waybillStatus" width="100" >
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('销售回款人')" align="center" prop="payee" min-width="100" />
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" min-width="100" />
<el-table-column :label="$t('操作员')" align="center" prop="operateEmployeeName" min-width="100" />
<el-table-column :label="$t('收件业务员')" align="center" prop="takePieceEmployeeName" min-width="100" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('运单状态')" align="center" prop="waybillStatus" width="100" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_waybill_status" :value="scope.row.waybillStatus"/>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column :label="$t('起始国')" align="center" prop="sendCountryName" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('目的国')" align="center" prop="receiveCountryName" width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('线路')" align="center" prop="transLineTypeName" min-width="80" :show-overflow-tooltip="true"/>
@ -287,10 +284,8 @@
</el-table-column>
<!-- </el-table-column> -->
<!-- <el-table-column label="寄件信息" align="center" > -->
<el-table-column :label="$t('寄件客户')" align="center" prop="sendCompany" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件网点')" align="center" prop="sendSiteName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件人')" align="center" prop="sendName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件手机')" align="center" prop="sendMobile" min-width="80" :show-overflow-tooltip="true"/>
@ -405,7 +400,8 @@
<el-table-column :label="$t('打印人')" align="center" prop="printManName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('打印站点')" align="center" prop="printSiteName" min-width="80" :show-overflow-tooltip="true"/>
<!-- </el-table-column> -->
<el-table-column :label="$t('订单备注')" align="center" prop="remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('录单备注')" align="center" prop="remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('数据来源')" align="center" prop="dataFrom" min-width="80" />
</XdTable>
@ -432,7 +428,9 @@ import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
export default {
name: "WaybillIsPrinted",
components: { elDateAdvPicker,emisWaybillForm,CountryPicker0,CountryPicker1 },
dicts: ['emis_waybill_status','emis_declare_mode','emis_customs_clear','emis_payment_type'
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
'emis_calc_fee_type','emis_print_type'
],
data() {
return {