MY преди 5 месеца
родител
ревизия
dc39a9fd01

+ 2 - 0
JLHWEB/src/languages/modules/zh-cn/menu.json

@@ -151,10 +151,12 @@
   "mattressQuoteDetail": "床垫报价详情",
   "mattressQuoteEdit": "修改床垫报价",
   "mattressQuoteAdd": "新建床垫报价",
+  "mattressQuoteCopy": "复制床垫报价",
   "bednetQuote": "床网报价",
   "bednetQuoteDetail": "床网报价详情",
   "bednetQuoteEdit": "修改床网报价",
   "bednetQuoteAdd": "新建床网报价",
+  "bednetQuoteCopy": "复制床网报价",
   "user": "用户权限",
   "bednetvar": "变量定义",
   "semifinprodQuote": "半成品报价",

+ 1 - 1
JLHWEB/src/routers/modules/bednetQtuoteRouter.ts

@@ -100,7 +100,7 @@ export const bednetQtuoteRouter: Menu.MenuOptions[] = [
       },
       {
         path: "/bednetQuote/copy",
-        name: "bednetQuoteEdit",
+        name: "bednetQuoteCopy",
         component: "/quote/bednetQuote/detail",
         meta: {
           icon: "iconuser-01",

+ 1 - 1
JLHWEB/src/routers/modules/mattressQtuoteRouter.ts

@@ -100,7 +100,7 @@ export const mattressQtuoteRouter: Menu.MenuOptions[] = [
       },
       {
         path: "/mattressQuote/copy",
-        name: "mattressQuoteEdit",
+        name: "mattressQuoteCopy",
         component: "/quote/mattressQuote/detail",
         meta: {
           icon: "iconuser-01",

+ 4 - 0
JLHWEB/src/views/quote/bednetQuote/detail.vue

@@ -373,6 +373,10 @@ const orderDefaultAction: detailAction[] = [
 
         let spring = vxeTableMxSpringRef.value?.element.getTableData().fullData ?? [];
 
+        if (orderStatus.value == "copy") {
+          bednet.copy_id = bednet.bednetid;
+        }
+
         let _param_mf = {
           bednet,
           bednetMx,

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

@@ -2237,17 +2237,8 @@ export const useHooks = (t?: any) => {
   const wf_cmp_cb = async () => {
     const { _mainData, enumMap, baseformRef } = state.LjDetailRef;
 
-    //清除运算结果
-    wf_clear();
-
     await wf_factory_profitrate();
 
-    wf_get_moneyrate_discount();
-
-    wf_cmp_update_mtrl();
-
-    wf_check_dianceng_ifright();
-
     // 佣金
     if (_mainData?.commission == 0 || !_mainData.commission) {
       _mainData.commission = 1;
@@ -2275,178 +2266,6 @@ export const useHooks = (t?: any) => {
       throw new Error("部门利润率不能为0!");
     }
     return true;
-
-    // let _data = {
-    //   ls_mattress_width: _mainData.mattress_width,
-    //   ls_mattress_length: _mainData.mattress_length,
-    //   ls_mattress_height: _mainData.mattress_height,
-    //   ls_packqty: _mainData.packqty,
-    //   ls_diameter: _mainData.diameter,
-    //   ls_woodpallettype: _mainData.woodpallettype,
-    //   ls_if_m_wbutao_way: _mainData.if_m_wbutao_way ?? "0",
-    //   ls_if_db_wbutao_way: _mainData.if_db_wbutao_wa ?? "0",
-    //   ls_s_cover_qty: _mainData.s_cover_qty ?? "0",
-    //   ls_z_cover_qty: _mainData.z_cover_qty ?? "0",
-    //   ls_x_cover_qty: _mainData.x_cover_qty ?? "0",
-    //   ls_s_m_cover_qty: _mainData.s_m_cover_qty ?? "0",
-    //   ls_z_m_cover_qty: _mainData.z_m_cover_qty ?? "0",
-    //   ls_x_m_cover_qty: _mainData.x_m_cover_qty ?? "0",
-    //   ls_if_m_chai: _mainData.if_m_chai ?? "0",
-    //   ls_if_z_chai: _mainData.if_z_chai ?? "0",
-    //   ls_if_d_chai: _mainData.if_d_chai ?? "0"
-    // };
-
-    // state.fabricMxTabList.map(t => {
-    //   if (t.ref && state[t.ref]) {
-    //     let { fullData } = state[t.ref].element.getTableData();
-    //     fullData.map(item => {
-    //       if ((!item.mtrlid || Number(item.mtrlid) == 0) && Number(item.formulakind) != 31) {
-    //         let ls_Expression = item.formula;
-    //         let ls_Use_Expression = item.useformula;
-
-    //         let _mxData = {
-    //           ls_price: item.price,
-    //           ls_gram_weight: item.gram_weight,
-    //           ls_cloth_width: item.cloth_width,
-    //           ls_if_inputqty: item.if_inputqty,
-    //           ls_qty: item.qty,
-    //           ls_thickness: item.thickness,
-    //           ls_shrinkage: Number(item.shrinkage) == 0 ? "1" : item.shrinkage,
-    //           ls_if_areaprice: item.if_areaprice,
-    //           ls_mtrlname: item.mtrlname ?? "null"
-    //         };
-
-    //         ls_Expression = wf_replace_height_big_side(ls_Expression, item.chastr);
-    //         ls_Use_Expression = wf_replace_height_big_side(ls_Use_Expression, item.chastr);
-
-    //         ls_Expression = wf_replace_height_small_side(ls_Expression, item.chastr);
-    //         ls_Use_Expression = wf_replace_height_small_side(ls_Use_Expression, item.chastr);
-
-    //         ls_Expression = wf_replace_height_v_side(ls_Expression, item.chastr);
-    //         ls_Use_Expression = wf_replace_height_v_side(ls_Use_Expression, item.chastr);
-
-    //         // 替换布料幅宽start
-    //         let ls_bl_cloth_width = "";
-    //         let _formulakind = Number(item.formulakind);
-    //         // 大侧
-    //         if (t.name == "tabpage_10" && t.type.includes(_formulakind)) {
-    //           ls_bl_cloth_width = wf_replace_cloth_width(item, fullData, 2);
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //           }
-    //         }
-
-    //         //小侧
-    //         if (t.name == "tabpage_11" && t.type.includes(_formulakind)) {
-    //           ls_bl_cloth_width = wf_replace_cloth_width(item, fullData, 3);
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //           }
-    //         }
-
-    //         //V侧
-    //         if (t.name == "tabpage_12" && t.type.includes(_formulakind)) {
-    //           ls_bl_cloth_width = wf_replace_cloth_width(item, fullData, 4);
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //           }
-    //         }
-
-    //         //面裥绵
-    //         if (t.name == "tabpage_8" && t.type.includes(_formulakind)) {
-    //           ls_bl_cloth_width = wf_replace_cloth_width(item, fullData, 0);
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //           }
-    //         }
-
-    //         //底裥绵
-    //         if (t.name == "tabpage_9" && t.type.includes(_formulakind)) {
-    //           ls_bl_cloth_width = wf_replace_cloth_width(item, fullData, 1);
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布料幅宽】", ls_bl_cloth_width);
-    //           }
-    //         }
-    //         //替换布料幅宽end
-
-    //         //替换布套高star
-    //         let ls_bl_bt_height = "";
-    //         // 内布套
-    //         let tabpage_14 = state.otherMxTabList.find(t => t.name == "tabpage_14");
-    //         if (tabpage_14.type.includes(_formulakind)) {
-    //           ls_bl_bt_height = "";
-
-    //           let { fullData: mlData } = state[t.ref].element.getTableData();
-    //           fullData.find(itm => {
-    //             if (itm.formulakind == 101) {
-    //               ls_bl_bt_height = formatFixedNumber({ val: itm.thickness }, 4);
-    //               return t;
-    //             }
-    //           });
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布套高】", ls_bl_bt_height);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布套高】", ls_bl_bt_height);
-    //           }
-    //         }
-    //         // 外布套
-    //         let tabpage_15 = state.otherMxTabList.find(t => t.name == "tabpage_15");
-    //         if (tabpage_15.type.includes(_formulakind)) {
-    //           ls_bl_bt_height = "";
-
-    //           let { fullData: mlData } = state[t.ref].element.getTableData();
-    //           fullData.find(itm => {
-    //             if (itm.formulakind == 101) {
-    //               ls_bl_bt_height = formatFixedNumber({ val: itm.thickness }, 4);
-    //               return t;
-    //             }
-    //           });
-
-    //           if (Number(ls_bl_cloth_width) > 0) {
-    //             ls_Expression = ls_Expression.replaceAll("【布套高】", ls_bl_bt_height);
-    //             ls_Use_Expression = ls_Use_Expression.replaceAll("【布套高】", ls_bl_bt_height);
-    //           }
-    //         }
-    //         //替换布套高end
-
-    //         //计算裥绵收缩率
-    //         if ([50, 0, 40, 60, 70, 80].includes(_formulakind)) {
-    //           //...
-    //         }
-
-    //         console.log("fullData item :>> ", item, item.formula);
-    //         console.log("fullData item useformula :>> ", item.useformula);
-    //         summaryMxData.value = summaryMxData.value.map(itm => {
-    //           if (itm.field == "costamt") {
-    //             itm.formula = ls_Expression;
-    //           } else if (itm.field == "useqty") {
-    //             itm.formula = ls_Use_Expression;
-    //           }
-    //           return itm;
-    //         });
-
-    //         let result = formulaPartsFormula(summaryMxData.value, fieldMxParams.value, { ..._data, ..._mxData });
-    //         console.log(
-    //           "fabricMxTabList formula result :>> ",
-    //           summaryMxData.value,
-    //           fieldMxParams.value,
-    //           { ..._data, ..._mxData },
-    //           result
-    //         );
-    //       }
-    //     });
-    //   }
-    // });
   };
 
   /**