运单录入
This commit is contained in:
parent
acda1e88f6
commit
9e26344c27
@ -242,3 +242,12 @@ export function delEmisWaybill(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
//获取关联主单列表
|
||||
export function getMasterEmisWaybills(query) {
|
||||
return request({
|
||||
url: '/emis/emisWaybill/getMasterEmisWaybills',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -11,7 +11,7 @@
|
||||
if ( typeof window !== 'undefined' && 'Worker' in window && navigator.appVersion.indexOf('MSIE 10') === -1 ) {
|
||||
|
||||
var PdfjsWorker = require('worker-loader!pdfjs-dist/es5/build/pdf.worker.js');
|
||||
PDFJS.GlobalWorkerOptions.workerPort = new PdfjsWorker();
|
||||
PDFJS.GlobalWorkerOptions.workerPort = PdfjsWorker;
|
||||
}
|
||||
|
||||
var component = componentFactory(pdfjsWrapper(PDFJS));
|
||||
|
||||
111
src/views/emis/EmisBaseTools/MasterBillCodePicker.vue
Normal file
111
src/views/emis/EmisBaseTools/MasterBillCodePicker.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<el-select
|
||||
:loading="loading"
|
||||
filterable
|
||||
clearable
|
||||
ref="selectRef"
|
||||
remote
|
||||
:remote-method="queryData"
|
||||
v-model="svalue"
|
||||
:placeholder="placeholder"
|
||||
style="width: 100%"
|
||||
@focus="onFocus"
|
||||
@change="onChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in filterData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMasterEmisWaybills } from "@/api/emis/emisWaybill";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: [String],
|
||||
required: false,
|
||||
},
|
||||
placeholder: {
|
||||
type: [String],
|
||||
required: false,
|
||||
},
|
||||
transLineType: {
|
||||
type: [String],
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
svalue: [],
|
||||
// 搜索后的数据
|
||||
filterData: [],
|
||||
filterMap: new Map(),
|
||||
loading: false,
|
||||
queryParams: {
|
||||
transLineType: null,
|
||||
billCode: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryData();
|
||||
},
|
||||
methods: {
|
||||
onFocus(val) {
|
||||
this.optionItems = [];
|
||||
this.queryData();
|
||||
},
|
||||
onChange(val) {
|
||||
//通过value获取到transLineType
|
||||
let valObject = this.filterData.find((item) => item.value == val);
|
||||
//子组件值传到父组件
|
||||
this.$emit("onMasterBillCodeChange", valObject);
|
||||
},
|
||||
|
||||
queryData(val) {
|
||||
this.queryParams.transLineType = this.transLineType;
|
||||
// this.queryParams.transLineType = "CN-VN"; //测试
|
||||
this.queryParams.billCode = val;
|
||||
getMasterEmisWaybills(this.queryParams).then((response) => {
|
||||
this.filterData = response.rows.map((item) => {
|
||||
return {
|
||||
label: item.billCode,
|
||||
value: item.billCode,
|
||||
// transLineType: item.transLineType,
|
||||
productType: item.productType
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-s-thead {
|
||||
width: 100%;
|
||||
color: rgb(177 47 41);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #e6e3e3;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.el-data {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
padding: 5px;
|
||||
border-bottom: 1px solid #e6e3e3;
|
||||
}
|
||||
</style>
|
||||
@ -508,7 +508,7 @@
|
||||
<el-form-item label="" prop="blOverWeight">
|
||||
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blOverWeight" :true-label="'1'" :false-label="'0'" ><span style="font-size:10px">是否超重</span></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.blOverWeight==1">
|
||||
<el-form-item :label="$t('超重件数')" prop="overWeightNumber" label-width="70px">
|
||||
<el-input :disabled="!form.blOverWeight" v-model="form.overWeightNumber" placeholder="" />
|
||||
@ -523,12 +523,26 @@
|
||||
|
||||
</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'" ><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'">
|
||||
<el-form-item :label="$t('关联主单')" prop="masterBillCode" label-width="70px">
|
||||
<MasterBillCodePicker v-model="form.masterBillCode" :transLineType="form.transLine" @onMasterBillCodeChange="onMasterBillCodeChange"></MasterBillCodePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="form.transLine==='012' || form.transLine=='002' || form.transLine === '014'">
|
||||
<el-form-item :label="$t('虚拟单备注')" prop="virtualRemark" label-width="70px">
|
||||
<el-input type="textarea" v-model="form.virtualRemark"></el-input>
|
||||
</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 />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('进仓单')" prop="warehouseInNo" label-width="70px">
|
||||
<WarehouseInNoPicker v-model="form.warehouseInNo"></WarehouseInNoPicker>
|
||||
@ -867,7 +881,7 @@ import ExchangeRatePanel from '@/views/emis/EmisBaseTools/ExchangeRatePanel.vue'
|
||||
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
||||
|
||||
// import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
||||
|
||||
import MasterBillCodePicker from '@/views/emis/EmisBaseTools/MasterBillCodePicker.vue';
|
||||
import feeItemForm from './feeItemForm.vue';
|
||||
|
||||
import TanexPrinterPanel from '@/views/emis/EmisBaseTools/TanexPrinterPanel.vue';
|
||||
@ -911,12 +925,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,
|
||||
@ -939,8 +962,8 @@ data() {
|
||||
printerStatus:0,
|
||||
|
||||
origBillCode:null,
|
||||
|
||||
|
||||
//关联主单 产品类型
|
||||
masterBillProductType:null,
|
||||
|
||||
// 可用面单数
|
||||
totalAvailablePag:{
|
||||
@ -1030,6 +1053,10 @@ data() {
|
||||
packType: [
|
||||
{ required: true, message: "包装类型不能为空",trigger: ["blur",'change'] }
|
||||
],
|
||||
//自定义校验
|
||||
masterBillCode:[
|
||||
{validator: checkmasterProductType, trigger: ['blur', 'change']}
|
||||
],
|
||||
dispatchMethod: [
|
||||
{ required: true, message: "派件方式不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
@ -1754,11 +1781,19 @@ methods: {
|
||||
departurePort:null,
|
||||
destinationPort:null,
|
||||
boxQuantity:null,
|
||||
carryType:null
|
||||
carryType:null,
|
||||
blVirtual:null,
|
||||
masterBillCode:null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
onProductChange(item,transType){
|
||||
//非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单
|
||||
if(item !==null && item[0]!=='012' && item[0]!=='002' && item[0] !== '014'){
|
||||
this.form.virtualRemark=null;
|
||||
this.form.masterBillCode=null;
|
||||
this.form.blVirtual=null;
|
||||
}
|
||||
if(item!=null && item.length==2){
|
||||
this.form.transLine=item[0];
|
||||
this.form.productType=item[1];
|
||||
@ -2366,6 +2401,18 @@ methods: {
|
||||
this.form.billCode=""
|
||||
}
|
||||
},
|
||||
//获取虚拟运单关联主单
|
||||
onMasterBillCodeChange(val) {
|
||||
if (val) {
|
||||
this.form.masterBillCode = val.value;
|
||||
this.masterBillProductType = val.productType;
|
||||
// this.masterBillProductType = '242011';
|
||||
} else {
|
||||
//清空
|
||||
this.form.masterBillCode = null;
|
||||
this.masterBillProductType = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user