Преглед изворни кода

详情页,回告,搜索

1018653686@qq.com пре 1 година
родитељ
комит
271d932453
2 измењених фајлова са 102 додато и 18 уклоњено
  1. 56 16
      src/views/WDLY/jd/backOrder/index.vue
  2. 46 2
      src/views/WDLY/jd/order/index.vue

+ 56 - 16
src/views/WDLY/jd/backOrder/index.vue

@@ -11,9 +11,11 @@
                     select: select,
                 }"
                 :action-list="[]"
-                @get-list="getList">
+                @get-list="getList"
+                @moreSearch="() => (queryDialogVisible = true)"
+        >
         </byTable>
-
+        <!--详情-->
         <el-dialog z-index="1100" title="退货单详情" v-if="dialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
             <el-descriptions title="基础信息" />
             <el-form label-width="auto" :rules="rules">
@@ -136,6 +138,24 @@
                 <el-button @click="dialogVisible = false" size="large">取 消</el-button>
             </template>
         </el-dialog>
+
+        <!--高级搜索-->
+        <el-dialog
+                :title="'高级检索'"
+                v-model="queryDialogVisible"
+                width="500px"
+                destroy-on-close
+        >
+            <el-form :model="sourceList.pagination" label-width="100px" label-position="top" >
+                <el-form-item label="退货单号">
+                    <el-input v-model="sourceList.pagination.returnId" placeholder="请输入退货单号" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <el-button @click="handleReset" size="large">重置</el-button>
+                <el-button @click="handleQuery" type="primary" size="large">搜索</el-button>
+            </template>
+        </el-dialog>
     </div>
 </template>
 
@@ -148,7 +168,7 @@ const { proxy } = getCurrentInstance();
 
 const router = useRouter();
 const loading = ref(false);
-const blessingTypeList = ref([]);
+const returnStates = ref([]);
 const submitLoading = ref(false);
 const sourceList = ref({
     data: [],
@@ -162,13 +182,15 @@ const sourceList = ref({
 let rules = ref({
 });
 let dialogVisible = ref(false);
+let queryDialogVisible = ref(false);
+
 let modalType = ref("add");
 const selectConfig = computed(() => {
     return [
         {
-            label: "单状态",
-            prop: "blessingType",
-            data: blessingTypeList.value
+            label: "退货单状态",
+            prop: "returnStateName",
+            data: returnStates.value
         },
     ]});
 
@@ -321,16 +343,16 @@ const formOption = reactive({
 
 
 const getDictlist = async () => {
-    // proxy
-    //     .getDictOne([
-    //         "blessing_type"
-    //     ])
-    //     .then((res) => {
-    //         blessingTypeList.value = res["blessing_type"].map((x) => ({
-    //             label: x.dictValue,
-    //             value: x.dictKey,
-    //         }));
-    //     });
+    proxy
+        .getDictOne([
+            "jd_return_states"
+        ])
+        .then((res) => {
+            returnStates.value = res["jd_return_states"].map((x) => ({
+                label: x.dictValue,
+                value: x.dictValue,
+            }));
+        });
 };
 
 const getList = async (req) => {
@@ -389,6 +411,24 @@ const confirmBusinessStatus = (row) => {
 }
 
 
+//高级搜索
+const handleReset = () => {
+    sourceList.value.pagination = {
+        pageNum: sourceList.value.pagination.pageNum,
+        pageSize: sourceList.value.pagination.pageSize,
+        arr: [],
+    };
+    handleQuery();
+};
+
+const handleQuery = () => {
+    if (sourceList.value.pagination.arr && sourceList.value.pagination.arr.length > 1) {
+        sourceList.value.pagination.purchaseStartTime = sourceList.value.pagination.arr[0];
+        sourceList.value.pagination.purchaseEndTime = sourceList.value.pagination.arr[1];
+    }
+    queryDialogVisible.value = false;
+    getList();
+};
 
 getDictlist()
 getList()

+ 46 - 2
src/views/WDLY/jd/order/index.vue

@@ -306,6 +306,9 @@ const { proxy } = getCurrentInstance();
 const router = useRouter();
 const loading = ref(false);
 const deliveryCenter = ref([]);
+const confirmState = ref([]);
+const orderState = ref([]);
+
 const blessingTypeList = ref([]);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -333,7 +336,40 @@ const selectConfig = computed(() => {
         {
             label: "订单状态",
             prop: "blessingType",
-            data: blessingTypeList.value
+            data: orderState.value
+        },
+        {
+            label: "回告状态",
+            prop: "blessingType",
+            data: confirmState.value
+        },
+        {
+            label: "是否确认",
+            prop: "businessStatus",
+            data: [
+                {
+                    label: "未确认",
+                    value: "0",
+                },
+                {
+                    label: "已确认",
+                    value: "1",
+                },
+            ],
+        },
+        {
+            label: "是否可回告",
+            prop: "isCanConfirm",
+            data: [
+                {
+                    label: "可回告",
+                    value: true,
+                },
+                {
+                    label: "不可回告",
+                    value: false,
+                },
+            ],
         },
     ]});
 
@@ -537,11 +573,19 @@ const formConfig = computed(() => {
 });
 
 const getDictlist = async () => {
-    proxy.getDictOne(["delivery_center"]).then((res) => {
+    proxy.getDictOne(["delivery_center", "confirmState", "OrderState"]).then((res) => {
         deliveryCenter.value = res["delivery_center"].map((x) => ({
             label: x.dictValue,
             value: x.dictKey,
         }));
+        confirmState.value = res["confirmState"].map((x) => ({
+            label: x.dictValue,
+            value: x.dictKey,
+        }));
+        orderState.value = res["OrderState"].map((x) => ({
+            label: x.dictValue,
+            value: x.dictKey,
+        }));
     });
 };