5 Commits 5b74d4e6c5 ... 81fae3f5ac

Author SHA1 Message Date
  立航 饭 81fae3f5ac Merge remote-tracking branch 'remotes/xyy/20240824_lyc_batchImportWeight' 4 weeks ago
  lyc d530bfc0e5 fix: 弹窗取消问题 4 weeks ago
  lyc 9b2c4d0ef3 fix: 上传实重修改 4 weeks ago
  lyc 568ea690f1 fix: 批量上传实重数据导出 1 month ago
  lyc 206cee7b1d fix: 修改整体批量导入实重功能 1 month ago
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(() => {
+        })
       })
     },
     // 明细分页-前度