浏览代码

销售合同增加合同类型搜索条件

lxf 1 年之前
父节点
当前提交
3500197ba5
共有 1 个文件被更改,包括 9 次插入47 次删除
  1. 9 47
      src/views/salesMange/saleContract/contract/index.vue

+ 9 - 47
src/views/salesMange/saleContract/contract/index.vue

@@ -308,11 +308,11 @@ const selectConfig = computed(() => {
       prop: "refundStatusNew",
       data: refundStatusNew.value,
     },
-    // {
-    //   label: "归属公司",
-    //   prop: "sellCorporationId",
-    //   data: corporationList.value,
-    // },
+    {
+      label: "合同类型",
+      prop: "contractType",
+      data: contractType.value,
+    },
   ];
 });
 const config = computed(() => {
@@ -324,14 +324,7 @@ const config = computed(() => {
         "min-width": 160,
       },
       render(type) {
-        let text = "";
-        if (corporationList.value && corporationList.value.length > 0) {
-          let data = corporationList.value.filter((item) => item.value == type);
-          if (data && data.length > 0) {
-            text = data[0].label;
-          }
-        }
-        return text;
+        return proxy.dictValueLabel(type, corporationList.value);
       },
     },
     {
@@ -341,14 +334,7 @@ const config = computed(() => {
         width: 120,
       },
       render(type) {
-        let text = "";
-        if (contractType.value && contractType.value.length > 0) {
-          let data = contractType.value.filter((item) => item.value == type);
-          if (data && data.length > 0) {
-            text = data[0].label;
-          }
-        }
-        return text;
+        return proxy.dictValueLabel(type, contractType.value);
       },
     },
     {
@@ -365,14 +351,7 @@ const config = computed(() => {
         "min-width": 180,
       },
       render(type) {
-        let text = "";
-        if (customerList.value && customerList.value.length > 0) {
-          let data = customerList.value.filter((item) => item.value == type);
-          if (data && data.length > 0) {
-            text = data[0].label;
-          }
-        }
-        return text;
+        return proxy.dictValueLabel(type, customerList.value);
       },
     },
     {
@@ -427,14 +406,7 @@ const config = computed(() => {
         width: 120,
       },
       render(type) {
-        let text = "";
-        if (status.value && status.value.length > 0) {
-          let data = status.value.filter((item) => item.value == type);
-          if (data && data.length > 0) {
-            text = data[0].label;
-          }
-        }
-        return text;
+        return proxy.dictValueLabel(type, status.value);
       },
     },
     {
@@ -443,16 +415,6 @@ const config = computed(() => {
         slot: "refundStatusNew",
         width: 120,
       },
-      // render(type) {
-      //   let text = "";
-      //   if (refundStatusNew.value && refundStatusNew.value.length > 0) {
-      //     let data = refundStatusNew.value.filter((item) => item.value == type);
-      //     if (data && data.length > 0) {
-      //       text = data[0].label;
-      //     }
-      //   }
-      //   return text;
-      // },
     },
     {
       attrs: {