Browse Source

Merge remote-tracking branch 'remotes/xyy/20240824_lyc_batchImportWeight'

# Conflicts:
#	src/api/order.js
#	src/views/orders/batchImportWeight.vue
立航 饭 2 months ago
parent
commit
81fae3f5ac
2 changed files with 83 additions and 21 deletions
  1. 67 0
      src/api/order.js
  2. 16 21
      src/views/orders/batchImportWeight.vue

+ 67 - 0
src/api/order.js

@@ -254,3 +254,70 @@ export function AddScanform(data) {
 
 
 
+
+/**
+ *
+ * @param {*} data
+ * @returns
+ */
+export function _GetNewFee(data) {
+  return request({
+    url: '/order/GetNewFee',
+    method: 'post',
+    data
+  })
+}
+
+
+/**
+ * 保存列表结果
+ * @param {*} data
+ * @returns
+ */
+export function _SaveNewFee(data) {
+  return request({
+    url: '/order/SaveNewFee',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 保存列表结果后显示的数据
+ * @param {*} data
+ * @returns
+ */
+export function _GetCustomerWeightSupplementary(data) {
+  return request({
+    url: '/order/GetCustomerWeightSupplementary',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 查询明细分页数据
+ * @param {*} groupId
+ * @returns
+ */
+export function _GetDetail(groupId) {
+  return request({
+    url: '/order/GetDetail',
+    method: 'get',
+    params: { groupId }
+  })
+}
+
+/**
+ * 上传费用
+ * @param {*} data
+ * @returns
+ */
+export function _UpdateSupplementaryGroup(GroupId) {
+  return request({
+    url: '/order/UpdateSupplementaryGroup',
+    method: 'post',
+    params: { GroupId }
+  })
+}
+

+ 16 - 21
src/views/orders/batchImportWeight.vue

@@ -165,12 +165,12 @@
       width="380px"
       custom-class="saveNewFee-form"
       :visible.sync="useSystemDialogVisible"
-      :before-close="closeSaveNewFee">
+      :before-close="closeSaveNewFeeVisible">
       <div>
         <el-checkbox v-model="saveNewFeeParams.useSystem" label="是否使用系统运费"></el-checkbox>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="closeSaveNewFee">取 消</el-button>
+        <el-button @click="closeSaveNewFeeVisible">取 消</el-button>
         <el-button type="primary" @click="okSaveNewFee" :loading="saveNewFeeLoading">确 定</el-button>
       </span>
     </el-dialog>
@@ -392,7 +392,7 @@ export default {
         const TrackingNumber = arrItem[0];
         const ActiveWeight = arrItem[1];
         const Fee = arrItem[2];
-        if (TrackingNumber && ActiveWeight && Fee) {
+        if (TrackingNumber && ActiveWeight && Number(Fee) >= 0 ) {
           result.push({
             TrackingNumber,
             ActiveWeight,
@@ -595,8 +595,11 @@ export default {
       // ]
       // this.countingNum.totalNum = this.batchListSource.length
     },
-    closeSaveNewFee() {
+    closeSaveNewFeeVisible() {
       this.useSystemDialogVisible = false
+    },
+    closeSaveNewFee() {
+      this.closeSaveNewFeeVisible()
       this.saveNewFeeParams.useSystem = false
       this.saveNewFeeParams.fileName = ''
     },
@@ -636,23 +639,15 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
-        beforeClose: (action, instance, done) => {
-          if (action === 'confirm') {
-            instance.confirmButtonLoading = true;
-            _UpdateSupplementaryGroup(row.Id).then(() => {
-              this.$message({
-                type: 'success',
-                message: '操作成功'
-              });
-              done();
-              that.initSaveNewFeeList()
-            }).finally(() => {
-              instance.confirmButtonLoading = false;
-            })
-          } else {
-            done();
-          }
-        }
+      }).then(() => {
+        _UpdateSupplementaryGroup(row.Id).then(() => {
+          this.$message({
+            type: 'success',
+            message: '操作成功'
+          });
+          that.initSaveNewFeeList()
+        }).finally(() => {
+        })
       })
     },
     // 明细分页-前度