xiaodai2022 2 years ago
parent
commit
9d68b3be62

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


+ 2 - 0
src/apis/service/youzan/othTransferOrderLog/index.js

@@ -11,4 +11,6 @@ export default {
     http("youzan/yz_check_status", data, "post", params),
   // 重新转单
   retry: (data, params) => http("youzan/yz_order_retry", data, "post", params),
+   // 重新转单
+   delete: (data, params) => http("youzan/yz_order_delete", data, "post", params),
 };

+ 7 - 2
src/views/youzan/othTransferOrderLog/columns.js

@@ -1,9 +1,14 @@
 //列表
 const columns = [
+  {
+    type: "selection",
+    fixed: "left",
+    _noset_: true,
+    width: "50px",
+  },
   {
     type: "expand",
     _slot_: "expand",
-    fixed: "left",
     _noset_: true,
   },
   {
@@ -25,7 +30,7 @@ const columns = [
     prop: "pay_type",
     label: "支付类型",
     _slot_: "pay_type",
-    width: "100px",
+    width: "140px",
   },
   {
     prop: "status",

+ 65 - 6
src/views/youzan/othTransferOrderLog/index.vue

@@ -21,7 +21,7 @@
           searchList();
         "
       >
-        <template #table-header="{}">
+        <template #table-header="{ selection }">
           <div style="width: 100%">
             <el-row style="padding: 0 0 10px 80px">
               <el-col :span="4" style="width: 140px">
@@ -100,6 +100,20 @@
                   </el-select>
                 </el-input>
               </el-col>
+              <el-col
+                :span="3"
+                class="fr"
+                style="width: 90px; padding: 0 0 0 10px"
+                v-if="powers.some((i) => i == '006')"
+              >
+                <el-button
+                  type="danger"
+                  :size="searchSize"
+                  @click="deleteItem(selection)"
+                >
+                  批量删除
+                </el-button>
+              </el-col>
             </el-row>
           </div>
         </template>
@@ -236,7 +250,7 @@ export default {
   },
   mounted() {
     if (this.$route.query.back) {
-      const { sinput = '', size, page, ...rest } = JSON.parse(this.$route.query.back)
+      const { sinput = "", size, page, ...rest } = JSON.parse(this.$route.query.back);
       this.sinput = sinput;
       this.parmValue = rest;
       this.pageInfo.curr = page;
@@ -280,6 +294,49 @@ export default {
         await this.searchList();
       }
     },
+    async deleteItem(list) {
+      if (list.length == 0) {
+        this.$message.warning("至少选择一条数据!");
+        return;
+      }
+      let isok = false;
+      let ids = [];
+      list.forEach((item) => {
+        ids.push(item.id);
+        if (item.status + "" !== "8") {
+          isok = true;
+        }
+      });
+      if (isok) {
+        this.$message.warning("只能选择转单失败的数据!");
+        return;
+      }
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: ids,
+          };
+          const { code, data, message } = await asyncRequest.delete(model);
+          if (code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (code >= 100 && code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
     //点击详情
     getRouter(toRouter, queryId) {
       if (toRouter && queryId) {
@@ -294,10 +351,12 @@ export default {
         // this.parmValue.sinput = this.sinput;
         //
         let routerModel = {
-          options: JSON.parse(JSON.stringify({
-            ...this.parmValue,
-            sinput: this.sinput
-          })),
+          options: JSON.parse(
+            JSON.stringify({
+              ...this.parmValue,
+              sinput: this.sinput,
+            })
+          ),
           router: this.$route.path,
         };
         model.preModel = JSON.stringify(routerModel);

Some files were not shown because too many files changed in this diff