diff --git a/src/utils/dateUtils.js b/src/utils/dateUtils.js index 16513ede..00d90ec1 100644 --- a/src/utils/dateUtils.js +++ b/src/utils/dateUtils.js @@ -8,6 +8,12 @@ import dayjs from "dayjs"; // 导入日期js * unit:单位 days、months、yesrs */ export function timeDiffTime(startDate, endDate, unit = "days") { + + if(unit=="days"){ + endDate=timeFormatDay(endDate); + startDate=timeFormatDay(startDate); + } + return dayjs(endDate).diff(startDate, unit); } diff --git a/src/views/emis/emisWaybill/centerWaybillList.vue b/src/views/emis/emisWaybill/centerWaybillList.vue index 8745ae13..f526993c 100644 --- a/src/views/emis/emisWaybill/centerWaybillList.vue +++ b/src/views/emis/emisWaybill/centerWaybillList.vue @@ -362,16 +362,18 @@ @@ -900,8 +902,9 @@ export default { rowKey (row) { return row.id; }, - calcDeliveryTime(startData,endDate){ - return timeDiffTime(startData,endDate) + calcDeliveryTime(endDate,startData){ + let days= timeDiffTime(startData,endDate) + return days; }, //标红table指定行 tableRowClassName({row, rowIndex}) { diff --git a/src/views/emis/emisWaybill/dispatchWaybillList.vue b/src/views/emis/emisWaybill/dispatchWaybillList.vue index 1eab79ea..639b2c84 100644 --- a/src/views/emis/emisWaybill/dispatchWaybillList.vue +++ b/src/views/emis/emisWaybill/dispatchWaybillList.vue @@ -364,16 +364,18 @@ @@ -884,8 +886,9 @@ export default { rowKey (row) { return row.id; }, - calcDeliveryTime(startData,endDate){ - return timeDiffTime(startData,endDate) + calcDeliveryTime(endDate,startData){ + let days= timeDiffTime(startData,endDate) + return days; }, //标红table指定行 tableRowClassName({row, rowIndex}) { diff --git a/src/views/emis/emisWaybill/sendWaybillList.vue b/src/views/emis/emisWaybill/sendWaybillList.vue index 38434b57..724b58e1 100644 --- a/src/views/emis/emisWaybill/sendWaybillList.vue +++ b/src/views/emis/emisWaybill/sendWaybillList.vue @@ -328,25 +328,28 @@ + + @@ -841,8 +844,9 @@ export default { handleCopy(row, event) { clip(row.billCode, event) }, - calcDeliveryTime(startData,endDate){ - return timeDiffTime(startData,endDate) + calcDeliveryTime(endDate,startData){ + let days= timeDiffTime(startData,endDate) + return days; }, onSalemanChange(){ this.queryParams.sendSiteCode=null; diff --git a/src/views/emis/emisWaybill/sendWaybillListNew.vue b/src/views/emis/emisWaybill/sendWaybillListNew.vue index f80f603b..1317c69d 100644 --- a/src/views/emis/emisWaybill/sendWaybillListNew.vue +++ b/src/views/emis/emisWaybill/sendWaybillListNew.vue @@ -337,16 +337,18 @@ @@ -874,8 +876,9 @@ export default { handleCopy(row, event) { clip(row.billCode, event) }, - calcDeliveryTime(startData,endDate){ - return timeDiffTime(startData,endDate) + calcDeliveryTime(endDate,startData){ + let days= timeDiffTime(startData,endDate) + return days; }, onSalemanChange(){ this.queryParams.sendSiteCode=null; diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 44317a75..93b96bb4 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -1067,12 +1067,14 @@ methods: { this.$modal.msgError("输入单号后回车"); return; } + this.form.billCode=this.form.billCode.replace(/\s+/g, ''); this.billCode=this.form.billCode+""; this.initData(); }, onBillCodeChange(){ if(this.form.billCode){ + this.form.billCode=this.form.billCode.replace(/\s+/g, ''); checkWaybillIsExists(this.form.billCode).then(response => { const result = response.data; if(result){ diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index f64f4635..f07b1464 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -1067,12 +1067,14 @@ methods: { this.$modal.msgError("输入单号后回车"); return; } + this.form.billCode=this.form.billCode.replace(/\s+/g, ''); this.billCode=this.form.billCode+""; this.initData(); }, onBillCodeChange(){ if(this.form.billCode){ + this.form.billCode=this.form.billCode.replace(/\s+/g, ''); checkWaybillIsExists(this.form.billCode).then(response => { const result = response.data; if(result){ diff --git a/src/views/emis/emisWaybillAjustApply/emisWaybillAjustApplyForm.vue b/src/views/emis/emisWaybillAjustApply/emisWaybillAjustApplyForm.vue index 0208c66d..d3f63e56 100644 --- a/src/views/emis/emisWaybillAjustApply/emisWaybillAjustApplyForm.vue +++ b/src/views/emis/emisWaybillAjustApply/emisWaybillAjustApplyForm.vue @@ -145,12 +145,17 @@ export default { this.$modal.msgError("输入单号后回车"); return; } + this.form.billCode=this.form.billCode.replace(/\s+/g, ''); let res=await getWaybillDetail(this.form.billCode); if(res.code != 200){ this.$modal.msgError(res.msg); return; } this.billDetail=res.data; + if(this.billDetail.orderStatus=='0'){ + this.$modal.msgError("未接单"); + return; + } this.form.billCode=this.billDetail.billCode;