浏览代码

补充提交

JohnnyChan 4 天之前
父节点
当前提交
34c2219291
共有 2 个文件被更改,包括 48 次插入41 次删除
  1. 14 14
      JLHWEB/src/views/quote/mattressQuote/hooks/index.tsx
  2. 34 27
      JLHWEB/src/views/quote/mattressQuote/index.vue

+ 14 - 14
JLHWEB/src/views/quote/mattressQuote/hooks/index.tsx

@@ -4280,24 +4280,24 @@ export const useHooks = (t?: any) => {
     {
       title: "弹簧排列个数-宽",
       field: "spring_qty_width",
-      datatype: "integer",
-      editRender: {
-        name: "$input"
-        // props: {
-        //   type: "number"
-        // }
-      }
+      datatype: "integer"
+      // editRender: {
+      //   name: "$input"
+      //   // props: {
+      //   //   type: "number"
+      //   // }
+      // }
     },
     {
       title: "弹簧排列个数-长",
       field: "spring_qty_length",
-      datatype: "integer",
-      editRender: {
-        name: "$input"
-        // props: {
-        //   type: "number"
-        // }
-      }
+      datatype: "integer"
+      // editRender: {
+      //   name: "$input"
+      //   // props: {
+      //   //   type: "number"
+      //   // }
+      // }
     }
   ];
 

+ 34 - 27
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -521,39 +521,46 @@ const action: detailAction[] = [
     loading: () => loadingStatus.showQd,
     power: 72,
     clickFunc: async item => {
-      loadingStatus.showQd = !loadingStatus.showQd;
-      const { curRecords } = getCurrentRecords(vxeTableRef.value);
+      // const { curRecords } = getCurrentRecords(vxeTableRef.value);
 
-      console.log("curRecords :>> ", curRecords);
-      if (!curRecords.length) {
+      const curRecord = vxeTableRef.value.element.getCurrentRecord() ?? null;
+
+      // console.log("curRecords :>> ", curRecords);
+      if (!curRecord) {
         ElMessage.warning(t("business.tips.mattress.records"));
         return;
-      } else if (curRecords.length > 1) {
-        ElMessage.warning(`无法进行多单${t("common.showQuoteList")}`);
-        return;
+        // } else if (curRecords.length > 1) {
+        //   ElMessage.warning(`无法进行多单${t("common.showQuoteList")}`);
+        //   return;
       }
 
-      const res = await GetComputeMattressById({
-        mattressid: curRecords[0].mattressid,
-        check_original: Number(isShowOriginFormulaMattress.value)
-      });
-      const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
-      let _data = {
-        data: res.mattress,
-        mxdata: isQuoteListMxData,
-        enumMap: vxeTableRef.value.enumMap,
-        fabricMx: fabricMxTabList.value,
-        formulakindenum: formulaKindEnum.value,
-        dannum_type: res.mattress.dannum_type,
-        formula: res.formulas, //
-        replace: res.replace, //
-        formula_ori: res.formulas_origin, //
-        formula_bednet: res.formulas_bednet, //
-        differ: res.differ //
-      };
-      QuoteListDrawerRef.value.show(_data);
-
       loadingStatus.showQd = !loadingStatus.showQd;
+      GetComputeMattressById({
+        mattressid: curRecord.mattressid,
+        check_original: Number(isShowOriginFormulaMattress.value)
+      })
+        .then(res => {
+          const isQuoteListMxData = getQuoteListMxData(funcChaifenTabPro(res.mattress, res.mattressMx));
+          let _data = {
+            data: res.mattress,
+            mxdata: isQuoteListMxData,
+            enumMap: vxeTableRef.value.enumMap,
+            fabricMx: fabricMxTabList.value,
+            formulakindenum: formulaKindEnum.value,
+            dannum_type: res.mattress.dannum_type,
+            formula: res.formulas, //
+            replace: res.replace, //
+            formula_ori: res.formulas_origin, //
+            formula_bednet: res.formulas_bednet, //
+            differ: res.differ //
+          };
+          QuoteListDrawerRef.value.show(_data);
+
+          loadingStatus.showQd = !loadingStatus.showQd;
+        })
+        .catch(err => {
+          loadingStatus.showQd = !loadingStatus.showQd;
+        });
     }
   }),
   buttonDefault({