lxf há 1 ano atrás
pai
commit
016784e433

+ 13 - 11
src/views/group/order/abnormal/index.vue

@@ -111,17 +111,19 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "删除",
-              type: "danger",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickDelete(row);
-            },
-          },
+          row.status == 0 || row.status == 10 || row.status == 20
+            ? {
+                attrs: {
+                  label: "删除",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickDelete(row);
+                },
+              }
+            : {},
         ];
       },
     },

+ 27 - 10
src/views/group/order/already-removed/index.vue

@@ -15,9 +15,6 @@
             <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
           </div>
         </template>
-        <template #exceptionTypeDetail="{ item }">
-          <div>{{ item.exceptionTypeDetail }}</div>
-        </template>
       </byTable>
     </el-card>
   </div>
@@ -25,6 +22,7 @@
 
 <script setup>
 import byTable from "@/components/byTable/index";
+import { ElMessage } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
@@ -67,28 +65,24 @@ const config = computed(() => {
       attrs: {
         label: "事业部",
         prop: "departmentName",
-        width: 140,
       },
     },
     {
       attrs: {
         label: "订单号",
         slot: "code",
-        width: 220,
       },
     },
     {
       attrs: {
         label: "万里牛单号",
         prop: "wlnCode",
-        width: 180,
       },
     },
     {
       attrs: {
         label: "订单状态",
         prop: "status",
-        width: 140,
       },
       render(val) {
         return proxy.dictKeyValue(val, proxy.useUserStore().allDict["order_status"]);
@@ -96,9 +90,25 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "异常明细",
-        slot: "exceptionTypeDetail",
-        "min-width": 240,
+        label: "操作",
+        width: 100,
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "重新同步",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickSynchronization(row);
+            },
+          },
+        ];
       },
     },
   ];
@@ -150,6 +160,13 @@ const clickCode = (row) => {
     },
   });
 };
+const clickSynchronization = (row) => {
+  ElMessage({ message: "万里牛订单同步中", type: "warning" });
+  proxy.post("/orderHandle/resynchronization", { wlnCode: row.wlnCode }).then(() => {
+    ElMessage({ message: "万里牛订单同步完成", type: "success" });
+    getList();
+  });
+};
 </script>
 
 <style lang="scss" scoped>