lxf пре 1 година
родитељ
комит
c62e0b6bb4

+ 13 - 3
src/views/group/order/management/add.vue

@@ -1,6 +1,10 @@
 <template>
   <div>
     <el-card class="box-card">
+      <div style="padding: 8px; text-align: center" v-if="formData.data.code || formData.data.wlnCode">
+        <span style="font-size: 18px; font-weight: 700">{{ formData.data.code }} </span>
+        <span style="font-size: 18px; font-weight: 700" v-if="formData.data.wlnCode"> ({{ formData.data.wlnCode }})</span>
+      </div>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #deliveryAddress>
           <div style="width: 100%">
@@ -537,9 +541,15 @@ const submitForm = (status) => {
 const clickCancel = () => {
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);
-  router.replace({
-    path: "/group/order/order-management",
-  });
+  if (route.query && route.query.orderInquiry) {
+    router.replace({
+      path: "/production/schedule/order-inquiry",
+    });
+  } else {
+    router.replace({
+      path: "/group/order/order-management",
+    });
+  }
 };
 onMounted(() => {
   if (route.query && (route.query.id || route.query.detailId)) {

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

@@ -0,0 +1,188 @@
+<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 #address="{ item }">
+          <div>{{ item.province }}, {{ item.city }}, {{ item.county }}, {{ item.detailedAddress }}</div>
+        </template>
+      </byTable>
+    </el-card>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+
+const { proxy } = getCurrentInstance();
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    departmentName: "",
+    code: "",
+    wlnCode: "",
+    status: "",
+    settlementStatus: "",
+  },
+});
+const loading = ref(false);
+const searchConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "订单号",
+    },
+    {
+      type: "input",
+      prop: "wlnCode",
+      label: "万里牛单号",
+    },
+    {
+      type: "input",
+      prop: "departmentName",
+      label: "事业部名称",
+    },
+    {
+      type: "select",
+      prop: "status",
+      dictKey: "order_status",
+      label: "订单状态",
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "事业部",
+        prop: "departmentName",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "订单号",
+        slot: "code",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "万里牛单号",
+        prop: "wlnCode",
+        "min-width": 180,
+      },
+    },
+    {
+      attrs: {
+        label: "快递单号",
+        prop: "expressDeliveryCode",
+        "min-width": 160,
+      },
+    },
+    {
+      attrs: {
+        label: "订单状态",
+        prop: "status",
+        width: 120,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, proxy.useUserStore().allDict["order_status"]);
+      },
+    },
+    {
+      attrs: {
+        label: "交期",
+        prop: "deliveryTime",
+        width: 160,
+        align: "center",
+      },
+    },
+    {
+      attrs: {
+        label: "发货时间",
+        prop: "shippingTime",
+        width: 160,
+        align: "center",
+      },
+    },
+    {
+      attrs: {
+        label: "收货人",
+        prop: "consignee",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "收货人电话",
+        prop: "consigneeNumber",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "收货人地址",
+        slot: "address",
+        "min-width": 220,
+      },
+    },
+  ];
+});
+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: "/addOrder",
+    query: {
+      detailId: row.id,
+      text: "订单详情",
+      random: proxy.random(),
+      orderInquiry: true,
+    },
+  });
+};
+</script>
+
+<style lang="scss" scoped>
+:deep(.el-dialog) {
+  margin-top: 10px !important;
+  margin-bottom: 10px !important;
+}
+</style>