接单、录单录入、修改录单备注调整
This commit is contained in:
parent
9b52b5f675
commit
1f52f0e485
@ -567,7 +567,7 @@ export default {
|
||||
//拼接remark 和virtualRemark
|
||||
this.orderList.forEach((item,index)=>{
|
||||
if(item.blVirtual ==='是'){
|
||||
item.remark = `${item.remark && item.remark.toString().replace(/\s/g, '').length>0?item.remark+',':''}${item.masterBillCode && item.masterBillCode.toString().replace(/\s/g, '').length>0 ?'此单为虚拟单,对应主单为:'+item.masterBillCode:''}`
|
||||
item.remark = `${item.remark && item.remark.toString().replace(/\s/g, '').length>0?item.remark+',':''}${item.masterBillCode && item.masterBillCode.toString().replace(/\s/g, '').length>0 ?'该单为虚拟单:对应主单为:'+item.masterBillCode:''}`
|
||||
}
|
||||
})
|
||||
this.tmpDataList=[];
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
|
||||
</el-row>
|
||||
<!-- v-if="action=='add' || action=='preAdd'" -->
|
||||
<div style="position: absolute;right: 80px;top: 60px;z-index: 100;">
|
||||
<div style="position: absolute;right: 80px;top: 50px;z-index: 100;">
|
||||
<!-- -->
|
||||
<div style="display:inline-flex;font-size: 15px;font-weight: 700;">
|
||||
|
||||
@ -171,6 +171,10 @@
|
||||
<EmisSiteSimplePicker v-if="$store.getters.ownerSiteCode== '88888'" v-model="form.sendSiteCode" @onChange="onSendSiteSelect" ></EmisSiteSimplePicker>
|
||||
<el-input v-else v-model="form.sendSiteName" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item prop="startSiteCode">
|
||||
<span slot="label" style="color:gray">{{ $t('始发网点') }}:</span>
|
||||
<EmisSiteSimplePicker v-model="form.startSiteCode" @onChange="onStartSiteSelect" ></EmisSiteSimplePicker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="margin-left: 12px;" v-if="totalAvailablePag.mainHasCnt>0">
|
||||
{{ $t('主单剩余') }}:<span>{{ totalAvailablePag.mainHasCnt }}</span>
|
||||
@ -521,6 +525,16 @@
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.transLine==='012' || form.transLine=='002' || form.transLine === '014'">
|
||||
<el-form-item label="" prop="blVirtual">
|
||||
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blVirtual" :true-label="'1'" :false-label="'0'" @change="handleVirtualChange"><span style="font-size:10px">是否为虚拟单</span></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="(form.transLine==='012' || form.transLine=='002' || form.transLine === '014') && form.blVirtual === '1'">
|
||||
<el-form-item :label="$t('关联主单')" prop="masterBillCode" label-width="70px">
|
||||
<MasterBillCodePicker v-model="form.masterBillCode" :searchParams="masterBillSearchParams" @onMasterBillCodeChange="onMasterBillCodeChange"></MasterBillCodePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="form.blGenSubbill==1">
|
||||
<el-form-item :label="$t('子单号')" prop="billCodeSub" label-width="70px">
|
||||
<el-input v-model="form.billCodeSub" rows="5" type="textarea" placeholder="" disabled />
|
||||
@ -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, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user