lxf vor 1 Jahr
Ursprung
Commit
12cc52032d

+ 209 - 0
src/views/group/order/abnormal/index.vue

@@ -0,0 +1,209 @@
+<template>
+  <div>
+    <el-card class="box-card">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        :searchConfig="searchConfig"
+        highlight-current-row
+        @get-list="getList"
+        @clickReset="clickReset">
+        <template #code="{ item }">
+          <div>
+            <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
+          </div>
+        </template>
+        <template #exceptionType="{ item }">
+          <div>{{ item.exceptionType }}</div>
+        </template>
+        <template #exceptionTypeDetail="{ item }">
+          <div>{{ item.exceptionTypeDetail }}</div>
+        </template>
+      </byTable>
+    </el-card>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    departmentId: "",
+    code: "",
+    wlnCode: "",
+    exception: "1",
+  },
+});
+const loading = ref(false);
+const searchConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "订单号",
+    },
+    {
+      type: "input",
+      prop: "wlnCode",
+      label: "万里牛单号",
+    },
+    {
+      type: "select",
+      prop: "departmentId",
+      data: departmentList.value,
+      label: "事业部",
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      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"]);
+      },
+    },
+    {
+      attrs: {
+        label: "异常明细",
+        slot: "exceptionTypeDetail",
+        "min-width": 240,
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: 80,
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickDelete(row);
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const getDemandData = () => {
+  proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      departmentList.value = departmentList.value.concat(
+        res.rows.map((item) => {
+          return {
+            dictKey: item.id,
+            dictValue: item.name,
+          };
+        })
+      );
+    }
+  });
+};
+getDemandData();
+const getList = async (req, status) => {
+  if (status) {
+    sourceList.value.pagination = {
+      pageNum: sourceList.value.pagination.pageNum,
+      pageSize: sourceList.value.pagination.pageSize,
+    };
+  } else {
+    sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  }
+  loading.value = true;
+  proxy.post("/orderInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getList();
+const clickReset = () => {
+  getList("", true);
+};
+const clickCode = (row) => {
+  proxy.$router.replace({
+    path: "/order-detail",
+    query: {
+      detailId: row.id,
+      text: "订单详情",
+      random: proxy.random(),
+    },
+  });
+};
+const clickDelete = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.post("/orderInfo/delete", { id: row.id }).then(() => {
+        ElMessage({ message: "删除成功", type: "success" });
+        getList();
+      });
+    })
+    .catch(() => {});
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+:deep(.el-dialog) {
+  margin-top: 10px !important;
+  margin-bottom: 10px !important;
+}
+.select-card {
+  height: calc(100vh - 184px);
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+</style>

+ 1 - 0
src/views/group/order/management/index.vue

@@ -89,6 +89,7 @@ const sourceList = ref({
     wlnCode: "",
     status: "",
     settlementStatus: "",
+    exception: "0",
   },
 });
 const loading = ref(false);

+ 1 - 0
src/views/production/schedule/order-inquiry/index.vue

@@ -38,6 +38,7 @@ const sourceList = ref({
     wlnCode: "",
     status: "",
     settlementStatus: "",
+    exception: "0",
   },
 });
 const loading = ref(false);

+ 1 - 0
src/views/subsidiary/order/management/index.vue

@@ -48,6 +48,7 @@ const sourceList = ref({
     wlnCode: "",
     status: "",
     settlementStatus: "",
+    exception: "0",
   },
 });
 const loading = ref(false);