diff --git a/src/views/emis/emisTmsSiteBatch/BigBatchGroupMgnt.vue b/src/views/emis/emisTmsSiteBatch/BigBatchGroupMgnt.vue
index b446568c..e4eb7ee8 100644
--- a/src/views/emis/emisTmsSiteBatch/BigBatchGroupMgnt.vue
+++ b/src/views/emis/emisTmsSiteBatch/BigBatchGroupMgnt.vue
@@ -6,11 +6,11 @@
-
-
+
+
-
+
@@ -62,7 +62,6 @@ export default {
this.batchId=batchId;
this.openViewForm=true;
this.activeTab='batchView';
-
},
onSelectBill(item) {
let old=this.billTabs.find(mItem=>mItem.settleBillNo==item.settleBillNo);
diff --git a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue
index 03493a16..78c2f552 100644
--- a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue
+++ b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue
@@ -4,17 +4,17 @@
-
-
+
+
+
+
+
+
-
+
@@ -706,26 +706,25 @@ export default {
created() {
this.initData();
},
- mounted() {
- const end = new Date()
- const start = new Date()
- start.setHours(0,0,0,0)
- end.setHours(23,59,59,0)
- this.dateTimeRange=[start,end];
- // this.activeName="third";
- },
methods: {
- initData() {
+ async initData() {
if(this.batchId !=null) {
this.showBatchInfo(this.batchId);
this.coPackType = "edit";
}else{
this.reset();
+
this.coData.startSiteCode=this.$store.getters.ownerSiteCode;
this.coData.batchType='1';
this.coPackType = "add";
+
+ let resPack = await getTmsGroupBatchNo();
+ this.coData.batchNo = resPack.data;
+
+ this.coData.batchDate=parseTime(new Date());
+
}
},
// 表单重置
@@ -772,18 +771,13 @@ export default {
this.$modal.msgError(response && response.msg || "未知错误");
return;
}
- let resData = response.data;
- let time = {};
- // if(resData.transType == 2){
- // time.airTime = resData.etd;
- // }else if(resData.transType == 4){
- // time.shipTime = resData.etd;
- // }else{
+ // let resData = response.data;
+ // let time = {};
+ // time.carTime = resData.etd;
+ // this.coData = {...resData, ...{batchDate:resData.createTime}, ...time};
- // }
+ this.coData = {...response.data};
- time.carTime = resData.etd;
- this.coData = {...resData, ...{batchDate:resData.createTime}, ...time};
this.emisCoPackDetail=[];
let resList = await listEmisTmsSiteBatchDtl({batchNo: resData.batchNo});
@@ -1033,12 +1027,6 @@ export default {
// 新增
if(this.coPackType == "add")
{
- let resPack = await getTmsGroupBatchNo();
- if(!resPack || resPack.code != 200){
- this.$modal.msgError(resPack && resPack.msg || "未知错误");
- return;
- }
- this.coData.batchNo = resPack.data;
let response = await addEmisTmsSiteBatch(this.coData);
if(!response || response.code != 200){
@@ -1048,16 +1036,15 @@ export default {
for(let i = 0; i< this.emisCoPackDetail.length;i++){
let packDetail = {
- batchNo:resPack.data,
+ batchNo:this.coData.batchNo,
billCode: this.emisCoPackDetail[i].billCode,
scanDate: this.emisCoPackDetail[i].scanDate,
scanStatus: this.emisCoPackDetail[i].scanStatus,
groupStatus: "1",//已组批次
scanMan: this.emisCoPackDetail[i].scanMan,
scanSite: this.emisCoPackDetail[i].scanSite,
- createBy: this.$store.getters.empCode,
- createTime: parseTime(new Date())
};
+
let response = await addEmisTmsSiteBatchDtl(packDetail);
if(!response || response.code != 200){
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
@@ -1070,7 +1057,7 @@ export default {
for(let lr = 0; lr < 3; lr++){
for(let ll = 0; ll < 6; ll++){
let batchLoadingData = {
- batchNo: resPack.data,
+ batchNo: this.coData.batchNo,
posNo:lr+":"+ll+":1",
row: lr,
col: ll,
@@ -1370,8 +1357,8 @@ export default {
})
this.coData.totalWaybillQty=this.emisCoPackDetail.length;
this.coData.totalParcelQty=totalParcelQty;
- this.coData.totalWeight=totalWeight;
- this.coData.totalVolume=parseFloat(totalVolume.toFixed(5));
+ this.coData.totalWeight=totalWeight.toFixed(2);
+ this.coData.totalVolume=totalVolume.toFixed(4);
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
diff --git a/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue b/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
index 8cd38759..0c4848af 100644
--- a/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
+++ b/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
@@ -397,12 +397,14 @@ export default {
handleAdd() {
this.$emit("onCreate");
},
- async handleDelete(){
- for(let i = 0; i< this.ids.length;i++){
- await delEmisTmsSiteBatch(this.ids[i]);
- }
- this.$modal.msgSuccess('操作成功');
- this.getList();
+ handleDelete(row){
+ const ids = row.id || this.ids;
+ this.$modal.confirm('是否确认删除').then(function() {
+ return delEmisTmsSiteBatch(ids);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("删除成功");
+ }).catch(() => {});
},
handleDown(){
diff --git a/src/views/emis/emisTmsSiteBatch/panel/ExpressBatchEditForm.vue b/src/views/emis/emisTmsSiteBatch/panel/ExpressBatchEditForm.vue
index d22bf830..f46b5fa6 100644
--- a/src/views/emis/emisTmsSiteBatch/panel/ExpressBatchEditForm.vue
+++ b/src/views/emis/emisTmsSiteBatch/panel/ExpressBatchEditForm.vue
@@ -658,20 +658,18 @@ export default {
},
};
},
+ watch: {
+ batchId(newVal,oldVal) {
+ this.initData();
+ },
+
+ },
created() {
this.initData();
},
- mounted() {
- const end = new Date()
- const start = new Date()
- start.setHours(0,0,0,0)
- end.setHours(23,59,59,0)
- this.dateTimeRange=[start,end];
- },
+
methods: {
-
initData() {
-
if(this.batchId !=null) {
this.showBatchInfo(this.batchId);
this.coPackType = "edit";
@@ -681,7 +679,6 @@ export default {
this.coData.startSiteCode=this.$store.getters.ownerSiteCode;
this.coData.batchType='1';
this.coData.transType='1';
-
this.coPackType = "add";
}