소스 검색

JLHWEB: 1、修复检测床垫清单检测清单必填逻辑;2、修复床网报价公式显示逻辑;3、修复床垫报价特殊工艺保存错误问题

JohnnyChan 2 달 전
부모
커밋
d511f68c0d

+ 37 - 27
JLHWEB/src/components/LjDetail/components/ButtonGroup.vue

@@ -168,40 +168,46 @@ const buttonItemRender = (item: any) => {
       } else if (item.hasOwnProperty("disabledTextCallBack")) {
         let disabled = Boolean(btnDisabledTxt);
         return (
-          <el-tooltip
-            class="box-item"
-            disabled={!disabled}
-            effect="dark"
-            content={btnDisabledTxt}
-            placement="top"
-            enterable={false}
-            hide-after={0}
-          >
+          <>
+            <el-tooltip
+              class="box-item"
+              disabled={!disabled}
+              effect="dark"
+              content={btnDisabledTxt}
+              placement="top"
+              enterable={false}
+              hide-after={0}
+            >
+              <el-button
+                {...btnAttr}
+                class={{ "is-disabled": disabled }}
+                disabled={disabled}
+                loading={_loading}
+                onClick={item.clickFunc}
+                v-slots={iconRender}
+                size={props.assemblySize}
+              >
+                {item.label}
+              </el-button>
+            </el-tooltip>
+            {item?.divider && <el-divider direction="vertical" />}
+          </>
+        );
+      } else {
+        return (
+          <>
             <el-button
+              size={props.assemblySize}
               {...btnAttr}
-              class={{ "is-disabled": disabled }}
-              disabled={disabled}
+              disabled={_loading}
               loading={_loading}
               onClick={item.clickFunc}
               v-slots={iconRender}
-              size={props.assemblySize}
             >
               {item.label}
             </el-button>
-          </el-tooltip>
-        );
-      } else {
-        return (
-          <el-button
-            size={props.assemblySize}
-            {...btnAttr}
-            disabled={_loading}
-            loading={_loading}
-            onClick={item.clickFunc}
-            v-slots={iconRender}
-          >
-            {item.label}
-          </el-button>
+            {item?.divider && <el-divider direction="vertical" />}
+          </>
         );
       }
     }
@@ -518,7 +524,8 @@ onDeactivated(() => {
 }
 .detail-menu__btn-group {
   display: inline-flex;
-  & > * {
+  align-items: center;
+  & > *:not(.el-divider) {
     border: none;
 
     .el-button {
@@ -528,5 +535,8 @@ onDeactivated(() => {
   & > .el-dropdown *:focus-visible {
     outline: unset;
   }
+  .el-divider {
+    margin: 0;
+  }
 }
 </style>

+ 4 - 0
JLHWEB/src/components/LjDetail/interface/index.ts

@@ -84,6 +84,10 @@ export type detailAction = {
    * @description 分组 可额外多套一层detailAction[],注意:detailAction[]不能与detailAction同一层
    */
   groupAction?: detailAction[];
+  /**
+   * @argument 是否显示分割线
+   */
+  divider?: boolean;
   /**
    * @argument 其他属性
    */

+ 1 - 1
JLHWEB/src/views/erpapi/mattressInterface/hooks/index.tsx

@@ -94,7 +94,7 @@ export const useHooks = (t?: any) => {
           console.log("visibleData :>> ", visibleData);
           try {
             visibleData.map((o, idx) => {
-              if (!o.erp_mtrlid && o.actual_useqty <= 0) {
+              if (!o.erp_mtrlid && o.actual_useqty > 0) {
                 state.QdTableRef.scrollTo(o, "erp_mtrlid");
                 throw new Error(`第${idx + 1}行:产品补充未填入L1物料信息,请先选择L1物料修改`);
               }

+ 2 - 2
JLHWEB/src/views/quote/bednetQuote/components/AllFormula.vue

@@ -202,7 +202,7 @@ const isMxFormulas = computed(() => {
   if (springArr.length > 0) {
     arr = arr.map((item: any) => {
       if (item.label == "【弹簧材料总成本】") {
-        item.children = springArr;
+        item.mxformula = springArr;
       }
       return item;
     });
@@ -215,7 +215,7 @@ const isWeigthFormulas = computed(() => {
   if (wireArr.length > 0) {
     arr = arr.map((item: any) => {
       if (item.label == "【钢丝重量】") {
-        item.children = wireArr;
+        item.mxformula = wireArr;
       }
       return item;
     });

+ 2 - 2
JLHWEB/src/views/quote/bednetQuote/components/FormulaGroup.vue

@@ -30,8 +30,8 @@
       </div>
     </div>
     <div class="flx-1 overflow-auto">
-      <template v-if="item?.children">
-        <FormulaItem v-for="(itm, index) in item?.children" :data="itm" :fields="fields" :formula="data" :key="index" />
+      <template v-if="item?.mxformula">
+        <FormulaItem v-for="(itm, index) in item?.mxformula" :data="itm" :fields="fields" :formula="data" :key="index" />
       </template>
       <template v-else>
         <FormulaItem :data="item" :fields="fields" :formula="data" />

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

@@ -12,6 +12,14 @@
     :if-layout-editable="false"
     :default-columns-value="defaultColumnsValue"
   >
+    <template #rightBtn>
+      <el-select v-model="dannum_type" placeholder="大小单" style="width: 80px">
+        <el-option label="散单" :value="1" />
+        <el-option label="小单" :value="4" />
+        <el-option label="标准" :value="2" />
+        <el-option label="大单" :value="3" />
+      </el-select>
+    </template>
     <template #headerSuffix>
       <Statistic :data="cmpFormulaReplace" :precision="2" @click="gotoShowFormula" />
     </template>
@@ -418,6 +426,12 @@ const orderDefaultAction: detailAction[] = [
           bednet.copy_id = bednet.bednetid;
         }
 
+        // 当在床垫报价打开床网时,检查两则部门是否一致,不一致时,相当于复制床网报价,
+        if (initParams.value.deptid && initParams.value.deptid != bednet.deptid) {
+          bednet.copy_id = bednet.bednetid;
+          bednet.deptid = initParams.value.deptid;
+        }
+
         let _param_mf = {
           bednet,
           bednetMx,
@@ -649,6 +663,7 @@ onMounted(async () => {
     // 直接读取
     orderStatus.value = props.state;
     initParams.value.arg_bednetid = props.bednetid;
+    props?.deptid && (initParams.value.deptid = props?.deptid);
     initParamsMx.value.arg_deptid = props?.deptid;
     initParamsMx.value.arg_bednetid = props.bednetid;
     defaultColumnsValue.value.deptid = props?.deptid;
@@ -666,6 +681,9 @@ onMounted(async () => {
  */
 const funcAfterMound = async (data: any) => {
   console.log("onMounted detail sale start!!!! :>> ", !orderStatus.value, data);
+  if (typeof props?.bednetid == "undefined") {
+    dannum_type.value = data?.dannum_type;
+  }
   // console.log("LjDetailRef.value.currentMould :>> ", LjDetailRef.value.currentMould);
   // console.log(
   //   "Boolean(Number(CheckOption(sysOptionEnum.sys_option_043))) :>> ",

+ 19 - 0
JLHWEB/src/views/quote/bednetQuote/hooks/index.tsx

@@ -766,6 +766,9 @@ export const useHooks = (t?: any, props?: any) => {
         //   filterable: true,
         //   clearable: false
         // },
+        editvisible: (scope: any) => {
+          return !state.initParams?.deptid || state.initParams?.deptid == scope.searchParam.deptid;
+        },
         order: 1,
         group: "单据信息"
       }
@@ -1587,6 +1590,18 @@ export const useHooks = (t?: any, props?: any) => {
           );
         }
       }
+    },
+    {
+      title: "是否备货",
+      field: "if_stock_up",
+      basicinfo: {
+        el: "checkbox",
+        editable: ALLOW_EDIT_STATE,
+        props: {
+          trueValue: 1,
+          falseValue: 0
+        }
+      }
     }
   ];
 
@@ -2417,6 +2432,10 @@ export const useHooks = (t?: any, props?: any) => {
     bednet.if_jb = Number(bednet.if_jb);
     bednet.flag = Number(bednet.flag);
 
+    if (state.initParams?.deptid > 0 && state.initParams?.deptid != bednet.deptid) {
+      bednet.deptid = state.initParams.deptid;
+    }
+
     let _params: any = {
       dannum_type: state.dannum_type,
       bednet: bednet,

+ 1 - 1
JLHWEB/src/views/quote/mattressQuote/components/Statistic.vue

@@ -167,7 +167,7 @@ watch(
 
 const handleClick = (item: any) => {
   if (userInfo.usermode === 0) {
-    emit("click", item);
+    emit("click", item.type);
   }
 };
 </script>

+ 5 - 2
JLHWEB/src/views/quote/mattressQuote/detail.vue

@@ -2375,6 +2375,7 @@ const autoLoadExtraData = (tableRef?: any, targetRef?: any) => {
           mattressid: _mattressId,
           mattressmxid: 0,
           extraid: o.extraid,
+          extramxid: o.extramxid,
           // extratypename: "",
           extraname: o.extramxname,
           price: o.price,
@@ -2778,6 +2779,7 @@ const handleEditBednetMx = () => {
           drawerTitle.value = "修改床网报价";
           bednetDrawerProps.deptid = LjDetailRef.value._mainData.deptid;
           bednetDrawerProps.bednetid = records.mtrlid;
+          bednetDrawerProps.dannum_type = LjDetailRef.value._mainData.dannum_type;
           bednetDrawerProps.state = "edit";
           bednetDrawerProps.onlyView = false;
           LjDrawerRef.value.show(true);
@@ -2800,7 +2802,7 @@ const autoBednetSave = async (res: any) => {
     if (idx > -1) {
       visibleData[idx].mtrlid = _res.bednetid;
       visibleData[idx].mtrlname = _mtrlname;
-      visibleData[idx].price = _res.nottax_factory_cost;
+      visibleData[idx].price = _res.total_cost;
       visibleData[idx].qty = 1;
 
       await $table.reloadData(visibleData);
@@ -2820,7 +2822,7 @@ const autoBednetSave = async (res: any) => {
         thickness: 0,
         mtrlid: _res.bednetid,
         mtrlname: _mtrlname,
-        price: _res.nottax_factory_cost,
+        price: _res.total_cost,
         qty: 1
       };
 
@@ -2940,6 +2942,7 @@ const handleCellDblClick_bednet = ({ row, rowIndex, $rowIndex, column, columnInd
     // bednetDrawerProps.deptid = LjDetailRef.value._mainData.deptid;
     bednetDrawerProps.dannum_type = LjDetailRef.value._mainData.dannum_type;
     bednetDrawerProps.bednetid = row.mtrlid;
+    bednetDrawerProps.deptid = LjDetailRef.value._mainData.deptid;
     bednetDrawerProps.state = "";
     bednetDrawerProps.onlyView = true;
     LjDrawerRef.value.show(true);

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

@@ -1824,6 +1824,7 @@ export const useHooks = (t?: any) => {
           mattressid: state.LjDetailRef._mainData.mattressid,
           mattressmxid: 0,
           extraid: row?.extraid ?? 0,
+          extramxid: row?.extramxid ?? 0,
           extraname: "",
           price: "",
           qty: 1,
@@ -4723,7 +4724,7 @@ export const useHooks = (t?: any) => {
               >
                 {{
                   reference: () => {
-                    return <ElButton type="danger" plain circle disabled={oItem.extrainputtype == 2} icon={Minus} />;
+                    return <ElButton type="danger" plain circle disabled={oItem.inputtype == 2} icon={Minus} />;
                   }
                 }}
               </ElPopconfirm>
@@ -4863,6 +4864,13 @@ export const useHooks = (t?: any) => {
       field: "delmx",
       width: 80,
       render: (scope: any) => {
+        let oItem = state.additionalCostsMxData.find(o => o.extraid == scope.row.extraid);
+        if (!oItem) {
+          oItem = {
+            inputtype: 1
+          };
+        }
+
         if (state.orderStatus) {
           return (
             <>
@@ -4876,7 +4884,7 @@ export const useHooks = (t?: any) => {
               >
                 {{
                   reference: () => {
-                    return <ElButton type="danger" plain circle icon={Minus} />;
+                    return <ElButton type="danger" plain circle disabled={oItem.inputtype == 2} icon={Minus} />;
                   }
                 }}
               </ElPopconfirm>