@@ -30,7 +32,6 @@
-
@@ -193,8 +194,11 @@
-
-
+
+
@@ -255,7 +259,9 @@
-
+
@@ -321,7 +327,7 @@
-
+
@@ -383,22 +389,39 @@
-
+ handleCargoQtyChange(val,scope.row)" @keyup.enter.native="(val)=>handleCargoQtyChange(val,scope.row)" size="mini" placeholder="">
-
+
+
+
deleteGoodsItem(scope.row)">
+ @click="()=>deleteGoodsItem(scope.row,scope.$index)">
+ copyGoodsItem(scope.row,scope.$index)">
@@ -628,29 +651,25 @@
-
+
-
+
-
+
-
-
-
-
@@ -827,6 +846,9 @@ data() {
province: [
{ required: true, message: "省不能为空", trigger: ["blur",'change'] }
],
+ company: [
+ { required: true, message: "发件公司不能为空", trigger: ["blur",'change'] }
+ ],
// city: [
// { required: true, message: "市不能为空", trigger: "blur" }
// ],
@@ -850,6 +872,10 @@ data() {
province: [
{ required: true, message: "寄件省不能为空", trigger: ["blur",'change'] }
],
+ company: [
+ { required: true, message: "发件公司不能为空", trigger: ["blur",'change'] }
+ ],
+
// city: [
// { required: true, message: "寄件市不能为空", trigger: "blur" }
// ],
@@ -917,12 +943,15 @@ data() {
dispatchUnderlingSiteCode: [
{ required: true, message: "目的地网点代码不能为空", trigger: "blur" }
],
- // payee: [
- // { required: true, message: "销售回款人不能为空", trigger: "blur" }
- // ],
- // salesmen: [
- // { required: true, message: "销售联系人不能为空", trigger: "blur" }
- // ],
+ custNo: [
+ { required: true, message: "月结卡号不能为空", trigger: "blur" }
+ ],
+ payee: [
+ { required: true, message: "销售回款人不能为空", trigger: "blur" }
+ ],
+ salesmen: [
+ { required: true, message: "销售联系人不能为空", trigger: "blur" }
+ ],
takePieceEmployeeCode: [
{ required: true, message: "取件员代码不能为空", trigger: ["blur",'change'] }
],
@@ -1049,76 +1078,101 @@ methods: {
this.printerStatusMessage="打印组件已断开!";
},
handleBatchPrint(){
-
- if(this.form.billCode){
- // 重要,设置为true才会把右上角X和取消区分开来
- this.$confirm("确定打印?", "提示", {
- cancelButtonText: "不打印",
- confirmButtonText: "确定打印",
- type: "warning",
- distinguishCancelAndClose: true,
- closeOnClickModal: false
- }).then(() => {
- // 打印主单,子单
- let orderList=[];
- // this.currentSelection.forEach(item=>{
- // orderList.push(item.billCode);
- // });
- // 打印主单
- orderList.push(this.form.billCode);
- let selPrinterName=this.tanexPrinter.getDefaultPrinter();
- let selTplName="探路速运-主单联(通用)";
- this.tanexPrinter.batchPrint(selTplName,selPrinterName,orderList)
+ if(this.printerStatus == 1){
+ if(this.form.billCode){
+ // 重要,设置为true才会把右上角X和取消区分开来
+ this.$confirm("确定打印?", "提示", {
+ cancelButtonText: "不打印",
+ confirmButtonText: "确定打印",
+ type: "warning",
+ distinguishCancelAndClose: true,
+ closeOnClickModal: false
+ }).then(() => {
+ // 打印主单,子单
+ let orderList=[];
+ // this.currentSelection.forEach(item=>{
+ // orderList.push(item.billCode);
+ // });
+ // 打印主单
+ orderList.push(this.form.billCode);
+ let selPrinterName=this.tanexPrinter.getDefaultPrinter();
+ let selTplName="探路速运-主单联(通用)";
+ this.tanexPrinter.batchPrint(selTplName,selPrinterName,orderList)
- // 打印子单
- selTplName="探路速运-子单联(通用)";
+ // 打印子单
+ selTplName="探路速运-子单联(通用)";
- let childOrderList=[]
- orderList=this.form.billCodeSub.split(',');
- orderList.forEach(item=>{
- if(item!=null && item!=''){
- childOrderList.push(item);
- }
- });
- this.tanexPrinter.batchPrint(selTplName,selPrinterName,childOrderList)
+ let childOrderList=[]
+ orderList=this.form.billCodeSub.split(',');
+ orderList.forEach(item=>{
+ if(item!=null && item!=''){
+ childOrderList.push(item);
+ }
+ });
+ this.tanexPrinter.batchPrint(selTplName,selPrinterName,childOrderList)
- }).catch(() => {});
+ }).catch(() => {});
+ }
+ }
+ else{
+ this.$confirm("打印组件未连接,可【返回操作】稍后打印,或【操作下一单】", "提示", {
+ cancelButtonText: "返回操作",
+ confirmButtonText: "操作下一单",
+ type: "warning",
+ distinguishCancelAndClose: true,
+ closeOnClickModal: false
+ }).then(() => {
+ this.reset();
+ });
}
},
async handlePrintPreview(){
- if(this.form.billCode){
- let pdfUrlList=[];
- let selPrinterName=this.tanexPrinter.getDefaultPrinter();
- let selTplName="探路速运-主单联(通用)";
- let url=this.tanexPrinter.getPdfUrl(this.form.billCode,selTplName,selPrinterName);
- pdfUrlList.push(url)
- // 子单url
- if(this.form.billCodeSub){
- selTplName="探路速运-子单联(通用)";
- let orderList=this.form.billCodeSub.split(',');
- orderList.forEach(item=>{
- if(item!=null && item!=''){
- let url=this.tanexPrinter.getPdfUrl(item,selTplName,selPrinterName);
- pdfUrlList.push(url)
- }
+ if(this.printerStatus == 1){
+ if(this.form.billCode){
+ let pdfUrlList=[];
+ let selPrinterName=this.tanexPrinter.getDefaultPrinter();
+ let selTplName="探路速运-主单联(通用)";
+ let url=this.tanexPrinter.getPdfUrl(this.form.billCode,selTplName,selPrinterName);
+ pdfUrlList.push(url)
+ // 子单url
+ if(this.form.billCodeSub){
+ selTplName="探路速运-子单联(通用)";
+ let orderList=this.form.billCodeSub.split(',');
+ orderList.forEach(item=>{
+ if(item!=null && item!=''){
+ let url=this.tanexPrinter.getPdfUrl(item,selTplName,selPrinterName);
+ pdfUrlList.push(url)
+ }
+ });
+ }
+ let pdfUtils=new PdfUtils({});
+ const loadingInstance = this.$loading({
+ text: '正在生成预览...'
+ })
+ pdfUtils.mergePdf2(pdfUrlList, (new Date()).getTime()+".pdf" )
+ .then(url=>{
+ loadingInstance.close();
+ this.pdfUrl=url;
+ this.openPdfView = true;
+ })
+ .catch(error => {
+ });
+ }
+ }
+ else{
+ this.$confirm("打印组件未连接,可【返回操作】稍后打印,或【操作下一单】", "提示", {
+ cancelButtonText: "返回操作",
+ confirmButtonText: "操作下一单",
+ type: "warning",
+ distinguishCancelAndClose: true,
+ closeOnClickModal: false
+ }).then(() => {
+ this.reset();
});
- }
- let pdfUtils=new PdfUtils({});
- const loadingInstance = this.$loading({
- text: '正在生成预览...'
- })
- pdfUtils.mergePdf2(pdfUrlList, (new Date()).getTime()+".pdf" )
- .then(url=>{
- loadingInstance.close();
- this.pdfUrl=url;
- this.openPdfView = true;
- })
- .catch(error => {
- });
}
},
@@ -1155,20 +1209,7 @@ methods: {
})
},
- 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);
},
@@ -1178,10 +1219,10 @@ methods: {
for(let i=1;i<=this.form.parcelQty;i++){
let subBillCode = this.form.billCode+""+this.lpadZero(i,4);
billSubCodeStr=billSubCodeStr+subBillCode+","
- console.log(billSubCodeStr);
+ // console.log(billSubCodeStr);
}
// let billSubCodeStr = this.form.billCode+"["+this.lpadZero(1,3)+"-"+this.lpadZero(this.form.parcelQty,3)+"]";
- console.log(billSubCodeStr);
+ // console.log(billSubCodeStr);
this.form.billCodeSub=billSubCodeStr;
}else{
this.form.billCodeSub=null;
@@ -1193,10 +1234,6 @@ methods: {
},
initData() {
this.reset();
- this.form.sendDate = parseTime(new Date());
- this.form.sendSiteCode=this.$store.getters.ownerSiteCode;
- this.form.sendSiteName=this.$store.getters.ownerSiteName;
- console.log(this.form.sendSiteName)
if(this.billCode !=null) {
this.loading = true;
@@ -1206,12 +1243,16 @@ methods: {
this.loading = false;
this.isNeedSave=true;
+ this.form.printTypeCheckList=[1,5]
});
}else{
- // console.log(this.dict.type.emis_declare_mode[0]);
- // this.form.customsEclaration = this.dict.type.emis_declare_mode[0].value;
+ this.form.sendDate = parseTime(new Date());
+ this.form.sendSiteCode=this.$store.getters.ownerSiteCode;
+ this.form.sendSiteName=this.$store.getters.ownerSiteName;
+ console.log(this.form.sendSiteName)
+
this.form.customsEclaration='1';
this.form.customsClear='1';
// this.form.pickupMethod='2';
@@ -1229,7 +1270,7 @@ methods: {
this.isNeedSave=true;
this.form.printTypeCheckList=[1,5],
- this.handleGenGoods();
+ this.handleInitGenGoods();
}
@@ -1439,7 +1480,7 @@ methods: {
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));
+ row.volume=parseFloat((volume/1000000).toFixed(5))*parseFloat(row.cargoQty);
}
this.form.cargoList.forEach(item=>{
@@ -1448,35 +1489,17 @@ methods: {
this.form.totalVolume = parseFloat(totalVolume.toFixed(5));
},
- handleCalcQty(val,row){
- let totalCargoQty=0;
- let goodsInfo='';
- this.form.cargoList.forEach(item=>{
- totalCargoQty=totalCargoQty+parseInt(item.cargoQty);
- goodsInfo=goodsInfo+item.goodsName+"x"+item.cargoQty+",";
-
- });
-
-
- this.form.parcelQty = totalCargoQty;
-
- this.handleGenSubbill();
- },
handleCalcFeeItem(val,row){
- let childRealFee=0.0;
if(row!=null){
if(row.calcExp){
- let expr=row.calcExp+"";
+ let expr="s+w*d";
expr=expr.replace("s",row.initialWeightFee);
expr=expr.replace("d",row.addWeightPrice);
expr=expr.replace("w",this.form.settlementWeight);
- console.log(expr);
- let childRealFee=parseFloat(eval(expr)).toFixed(2);
- row.realFee=childRealFee;
- console.log(childRealFee);
+ row.realFee=parseFloat(eval(expr)).toFixed(2);
}
}
@@ -1587,53 +1610,26 @@ methods: {
this.form.goodsInfo = selNameStr;
},
- handleGenGoods(){
+ handleInitGenGoods(){
if(this.form.parcelQty>0){
+
+ let currentParcelQty = 0;
+ if(this.form.cargoList){
+ this.form.cargoList=[];
+ }
+
+ this.form.cargoList.forEach(item=>{
+ currentParcelQty = currentParcelQty+parseInt(item.cargoQty);
+ });
+
// 新件数大于
- if(this.form.parcelQty>=this.form.cargoList.length){
- console.log()
- let len=this.form.parcelQty-this.form.cargoList.length;
- for(let i=0;i
currentParcelQty){
+ let len=this.form.parcelQty-currentParcelQty;
+ if(this.form.parcelQty>20){
let cargo={
- "goodsCode": "",
- "goodsName": "",
- "cargoQty": 1,
- "length": 0,
- "width": 0,
- "height": 0,
- "volume": 0,
- }
- this.form.cargoList.push(cargo);
- }
- }
- else{
- let newList=[];
- for(let i=0;i0){
- this.form.cargoList.forEach(item=>{
- nameOldMap[item.goodsName]=item;
- });
- }
-
- if(!(goodsName in nameOldMap)){
- let cargo={
- "goodsCode": goodsName,
- "goodsName": goodsName,
- "cargoQty": 1,
+ "goodsCode": "",
+ "goodsName": "",
+ "cargoQty": len,
"length": 0,
"width": 0,
"height": 0,
@@ -1641,10 +1637,81 @@ methods: {
}
this.form.cargoList.push(cargo);
}
-
- this.handleCalcQty();
- this.handleCalcVolume();
+ else{
+ for(let i=0;i {
+ // let newList = this.form.cargoList.filter(item => item.goodsName !== row.goodsName);
+ // this.form.cargoList=newList;
+ console.log(index);
+ this.form.cargoList.splice(index,1)
+ this.handleCalcVolume();
+ }).catch(() => {
+ })
+ },
+ copyGoodsItem(row,index){
+ let newItem = Object.assign({},row);
+ newItem.cargoQty=1;
+ this.form.cargoList.splice(index+1, 0, newItem);
+ // this.form.cargoList.push(newItem);
+ handleCargoQtyChange();
},
showLocalTime(){
diff --git a/src/views/emis/emisWaybill/emisWaybillRecord.vue b/src/views/emis/emisWaybill/emisWaybillRecord.vue
index b1b7bf83..947edfe6 100644
--- a/src/views/emis/emisWaybill/emisWaybillRecord.vue
+++ b/src/views/emis/emisWaybill/emisWaybillRecord.vue
@@ -7,14 +7,19 @@
{{ $t('发货信息') }}
+
+
-
+
+
+
+
-
+
@@ -27,6 +32,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -805,6 +837,7 @@ data() {
loading: true,
isNeedSave:false,
triggerCount:0,
+ action:null,
// 表单参数
form: {},
timer:null,
@@ -957,6 +990,8 @@ data() {
}
};
},
+computed:{
+ },
watch: {
"form.reciever.province":{
handler (newValue, oldValue) {
@@ -972,13 +1007,13 @@ data() {
},
deep: true
},
- "form.volumeWeight":{
- handler (newValue, oldValue) {
- this.reCalcSettlementWeight();
- },
- immediate: false,
- deep: true
- },
+ // "form.volumeWeight":{
+ // handler (newValue, oldValue) {
+ // this.reCalcSettlementWeight();
+ // },
+ // immediate: false,
+ // deep: true
+ // },
"form.billWeight":{
handler (newValue, oldValue) {
this.reCalcSettlementWeight();
@@ -1031,6 +1066,7 @@ updated(){
},
created() {
this.billCode=this.$route.query.billCode;
+ this.action=this.$route.query.action;
this.initData();
this.initTanexPrinterSdk();
@@ -1230,11 +1266,8 @@ methods: {
},
initData() {
this.reset();
- this.form.sendDate = parseTime(new Date());
- this.form.sendSiteCode=this.$store.getters.ownerSiteCode;
- this.form.sendSiteName=this.$store.getters.ownerSiteName;
- console.log(this.form.sendSiteName)
+ // console.log(this.form.sendSiteName)
if(this.billCode !=null) {
this.loading = true;
getWaybillDetail(this.billCode).then(response => {
@@ -1243,12 +1276,15 @@ methods: {
this.loading = false;
this.isNeedSave=true;
+ this.form.printTypeCheckList=[1,5]
});
}else{
- // console.log(this.dict.type.emis_declare_mode[0]);
- // this.form.customsEclaration = this.dict.type.emis_declare_mode[0].value;
+ this.form.sendDate = parseTime(new Date());
+ 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';
@@ -1553,6 +1589,8 @@ methods: {
},
calcBillFee(){
+ console.log("11111=>"+this.isNeedSave)
+
// 初始化不计算
if(!this.isNeedSave){
return;
@@ -1610,9 +1648,14 @@ methods: {
if(this.form.parcelQty>0){
let currentParcelQty = 0;
+ if(this.form.cargoList){
+ this.form.cargoList=[];
+ }
+
this.form.cargoList.forEach(item=>{
currentParcelQty = currentParcelQty+parseInt(item.cargoQty);
});
+
// 新件数大于
if(this.form.parcelQty>currentParcelQty){
let len=this.form.parcelQty-currentParcelQty;