@@ -171,6 +171,10 @@
+
+ {{ $t('始发网点') }}:
+
+
{{ $t('主单剩余') }}:{{ totalAvailablePag.mainHasCnt }}
@@ -521,6 +525,16 @@
+
+
+ 是否为虚拟单
+
+
+
+
+
+
+
@@ -863,6 +877,7 @@ import ExchangeRatePanel from '@/views/emis/EmisBaseTools/ExchangeRatePanel.vue'
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
+import MasterBillCodePicker from '@/views/emis/EmisBaseTools/MasterBillCodePicker.vue';
// import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
@@ -909,12 +924,21 @@ components: {
DistrictPicker2,
ExchangeRatePanel,
SeaSiteSimplePicker0,
- SeaSiteSimplePicker1
+ SeaSiteSimplePicker1,
+ MasterBillCodePicker,
},
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','sys_currency_type'],
data() {
+ //校验关联主单线路
+ var checkmasterProductType = (rule, value, callback) => {
+ if (this.masterBillProductType && this.masterBillProductType != this.form.productType) {
+ callback(new Error('主单和虚拟单线路不一致'));// 关联主单和运单线路不一致
+ } else {
+ callback();
+ }
+ }
return {
activeNames:['1','2','3','4'],
exchangeRate:null,
@@ -1026,6 +1050,10 @@ data() {
packType: [
{ required: true, message: "包装类型不能为空",trigger: ["blur",'change'] }
],
+ //自定义校验
+ masterBillCode:[
+ {validator: checkmasterProductType, trigger: ['blur', 'change']}
+ ],
dispatchMethod: [
{ required: true, message: "派件方式不能为空", trigger: ["blur",'change'] }
],
@@ -1056,6 +1084,10 @@ data() {
sendSiteCode: [
{ required: true, message: "发件网点代码不能为空", trigger: ["blur",'change'] }
],
+ //始发网点
+ startSiteCode: [
+ { required: true, message: "始发网点代码不能为空", trigger: ["blur",'change'] }
+ ],
// sendDate: [
// { required: true, message: "发货时间不能为空", trigger: "blur" }
// ],
@@ -1096,6 +1128,13 @@ data() {
};
},
computed: {
+ masterBillSearchParams() {
+ return {
+ transLineType: this.form.transLine,
+ productType: this.form.productType,
+ sendSiteCode: this.form.sendSiteCode
+ }
+ }
},
watch: {
@@ -1610,8 +1649,10 @@ methods: {
// this.form.sendDate = parseTime(new Date());
this.form.sendSiteCode=this.$store.getters.ownerSiteCode;
this.form.sendSiteName=this.$store.getters.ownerSiteName;
-
-
+ this.form.startSiteCode = this.$store.getters.ownerSiteCode;
+ this.form.startSiteName = this.$store.getters.ownerSiteName;
+ this.form = {...this.form}
+
this.form.customsEclaration='1';
this.form.customsClear='1';
// this.form.pickupMethod='2';
@@ -1764,6 +1805,14 @@ methods: {
this.resetForm("form");
},
onProductChange(item,transType){
+ //非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单
+ if(!['002','012','014'].includes(item[0])){
+ this.form.masterBillCode = null;
+ this.form.blVirtual = null;
+ }
+ if(item[0]!=='002' && this.form.remark && this.form.remark!==null){
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
if(item!=null && item.length==2){
this.form.transLine=item[0];
this.form.productType=item[1];
@@ -1777,15 +1826,28 @@ methods: {
if(!item){
this.form.sendSiteCode = null;
this.form.sendSiteName = null;
+ this.form.startSiteCode = null;
+ this.form.startSiteName = null;
return;
}
this.form.sendSiteCode=item.siteCode;
this.form.sendSiteName=item.siteName;
+ this.form.startSiteCode=item.siteCode;
+ this.form.startSiteName=item.siteName;
this.initGetTotalAvailablePag(this.form.sendSiteCode);
this.calcBillFee();
+ },
+ onStartSiteSelect(item){
+ if(!item){
+ this.form.startSiteCode = null;
+ this.form.startSiteName = null;
+ return;
+ }
+ this.form.startSiteCode=item.siteCode;
+ this.form.startSiteName=item.siteName;
},
/** 提交按钮 */
submitForm() {
@@ -2376,6 +2438,45 @@ methods: {
this.form.billCode=""
}
},
+ //获取虚拟运单关联主单
+ onMasterBillCodeChange(val) {
+ if (val) {
+ this.form.masterBillCode = val.value;
+ this.masterBillProductType = val.productType;
+ if (this.form.transLine === '002') {
+ if (this.form.remark==null || this.form.remark.trim() === '') {
+ //生成备注
+ this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`;
+ } else {
+ if (this.form.remark.indexOf('该单为虚拟单:对应主单为') > -1) {
+ //替换主单号
+ this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value);
+ } else {
+ //判断结尾是不是逗号
+ if(!this.form.remark.endsWith(',')){
+ this.form.remark = this.form.remark +',';
+ }
+ this.form.remark =this.form.remark + '该单为虚拟单:对应主单为' + val.value;
+ }
+ }
+ } else {
+ //删除备注中虚拟单部分
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
+ }else{
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
+ },
+ //虚拟单变化
+ handleVirtualChange(){
+ if(this.form.blVirtual!=='1'){
+ this.form.masterBillCode =null;
+ //删除备注中虚拟单内容
+ if(this.form.remark && this.form.remark.trim()!=''){
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
+ }
+ }
}
};
diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue
index fb908e1b..9771e996 100644
--- a/src/views/emis/emisWaybill/waybillModify.vue
+++ b/src/views/emis/emisWaybill/waybillModify.vue
@@ -1641,7 +1641,7 @@ methods: {
this.form.sendSiteName=this.$store.getters.ownerSiteName;
this.form.startSiteCode = this.$store.getters.ownerSiteCode;
this.form.startSiteName = this.$store.getters.ownerSiteName;
-
+ this.form = {...this.form}
this.form.customsEclaration='1';
this.form.customsClear='1';
@@ -1797,11 +1797,13 @@ methods: {
this.resetForm("form");
},
onProductChange(item,transType){
- //非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单
- if(item !==null && item[0]!=='012' && item[0]!=='002' && item[0] !== '014'){
- this.form.remark=null;
- this.form.masterBillCode=null;
- this.form.blVirtual=null;
+ //非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单
+ if(!['002','012','014'].includes(item[0])){
+ this.form.masterBillCode = null;
+ this.form.blVirtual = null;
+ }
+ if(item[0]!=='002' && this.form.remark && this.form.remark!==null){
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
}
if(item!=null && item.length==2){
this.form.transLine=item[0];
@@ -2441,24 +2443,39 @@ methods: {
if (val) {
this.form.masterBillCode = val.value;
this.masterBillProductType = val.productType;
- //生成备注
- if (val && this.form.remark && this.form.remark.trim() !== '') {
- this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value);
+ if (this.form.transLine === '002') {
+ if (this.form.remark==null || this.form.remark.trim() === '') {
+ //生成备注
+ this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`;
+ } else {
+ if (this.form.remark.indexOf('该单为虚拟单:对应主单为') > -1) {
+ //替换主单号
+ this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value);
+ } else {
+ //判断结尾是不是逗号
+ if(!this.form.remark.endsWith(',')){
+ this.form.remark = this.form.remark +',';
+ }
+ this.form.remark =this.form.remark + '该单为虚拟单:对应主单为' + val.value;
+ }
+ }
} else {
- this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`;
+ //删除备注中虚拟单部分
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
}
- } else {
- //清空
- this.form.masterBillCode = null;
- this.masterBillProductType = null;
- this.form.remark = null;
- }
+ }else {
+ //删除备注中虚拟单部分
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
},
//虚拟单变化
handleVirtualChange(){
if(this.form.blVirtual!=='1'){
- this.form.remark = null;
this.form.masterBillCode =null;
+ //删除备注中虚拟单内容
+ if(this.form.remark && this.form.remark.trim()!=''){
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
}
}
}
@@ -2529,13 +2546,13 @@ methods: {
// .el-input-number--mini {
// width: 100%;
// line-height: 26px;
- // }
-
- .el-input-number {
- width: 100%!important;
- }
-
- .el-input-number.is-without-controls .el-input__inner {
+ // }
+
+ .el-input-number {
+ width: 100% !important;
+ }
+
+ .el-input-number.is-without-controls .el-input__inner {
height: 28px;
line-height: 28px;
border: none;
@@ -2543,13 +2560,14 @@ methods: {
font-size: 10px;
padding: 0px;
text-align: center;
+ }
}
-}
-
+
.el-collapse-item__content {
- padding-bottom: 0px;
+ padding-bottom: 0px;
}
- .el-collapse-item__header{
+
+ .el-collapse-item__header {
pointer-events: none;
}
diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue
index 16b93be6..d06da126 100644
--- a/src/views/emis/emisWaybill/waybillRecord.vue
+++ b/src/views/emis/emisWaybill/waybillRecord.vue
@@ -1803,10 +1803,12 @@ methods: {
},
onProductChange(item,transType){
//非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单
- if(item !==null && item[0]!=='012' && item[0]!=='002' && item[0] !== '014'){
- this.form.remark=null;
- this.form.masterBillCode=null;
- this.form.blVirtual=null;
+ if(item && !['002','012','014'].includes(item[0])){
+ this.form.masterBillCode = null;
+ this.form.blVirtual = null;
+ }
+ if(item && item[0]!=='002' && this.form.remark && this.form.remark!==null){
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
}
if(item!=null && item.length==2){
this.form.transLine=item[0];
@@ -2428,26 +2430,44 @@ methods: {
this.form.billCode=""
}
},
- //获取虚拟运单关联主单
+ //获取虚拟运单关联主单
onMasterBillCodeChange(val) {
if (val) {
this.form.masterBillCode = val.value;
this.masterBillProductType = val.productType;
- // this.masterBillProductType = '242011';
- //生成备注
- this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`;
- } else {
- //清空
- this.form.masterBillCode = null;
- this.masterBillProductType = null;
- this.form.remark = null;
- }
+ if (this.form.transLine === '002') {
+ if (this.form.remark==null || this.form.remark.trim() === '') {
+ //生成备注
+ this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`;
+ } else {
+ if (this.form.remark.indexOf('该单为虚拟单:对应主单为') > -1) {
+ //替换主单号
+ this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value);
+ } else {
+ //判断结尾是不是逗号
+ if(!this.form.remark.endsWith(',')){
+ this.form.remark = this.form.remark +',';
+ }
+ this.form.remark =this.form.remark + '该单为虚拟单:对应主单为' + val.value;
+ }
+ }
+ } else {
+ //删除备注中虚拟单部分
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
+ }else {
+ //删除备注中虚拟单部分
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
},
//虚拟单变化
handleVirtualChange(){
if(this.form.blVirtual!=='1'){
- this.form.remark = null;
this.form.masterBillCode =null;
+ //删除备注中虚拟单内容
+ if(this.form.remark && this.form.remark.trim()!=''){
+ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
+ }
}
}
}
diff --git a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue
index b839e104..4fe2002d 100644
--- a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue
+++ b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue
@@ -2113,7 +2113,7 @@ export default {
onMasterBillCodeChange(val) {
if (val) {
this.masterBillProductType = val.productType;
- //调整虚拟单备注 把此单为虚拟单之后的单号替换
+ //调整虚拟单备注 把该单为虚拟单之后的单号替换
if (this.form.remark && this.form.remark.trim() !== ''
) {
this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value);;