浏览代码

JLHWEB:1、修复批量复制测试

JohnnyChan 4 天之前
父节点
当前提交
56ae039239

+ 1 - 0
JLHWEB/src/api/interface/index.ts

@@ -1297,6 +1297,7 @@ export namespace Mattress {
     isPz?: number;
     isCheck?: number;
     isEdit?: number;
+    configcodetype?: number;
   }
   export interface ResRefreshMattressInterface {
     mxList: any[];

+ 1 - 1
JLHWEB/src/styles/element.scss

@@ -371,7 +371,7 @@
 .col--filter {
   &:not(.is--filter-active) {
     .vxe-cell--filter {
-      // display: none;
+      display: none;
       opacity: 0;
     }
   }

+ 2 - 0
JLHWEB/src/styles/var/vxe-variable.scss

@@ -162,4 +162,6 @@
   --vxe-primary-lighten-color: var(--lj-color-primary-400);
 
   --vxe-ui-table-row-line-height: 12px;
+  // --vxe-ui-table-column-padding-mini: 3px;
+  // --vxe-ui-table-row-height-mini: 28px;
 }

+ 20 - 10
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -204,23 +204,23 @@ const qdAction = [
       const $table = QdTableRef.value.element;
 
       const { visibleData } = $table.getTableData();
-
-      console.log("qdAction _cur :>> ", _cur);
+      let _data = [];
 
       if (visibleData) {
-        let _val = visibleData[_cur.rowIndex][_cur.field];
-        visibleData.map((o, idx) => {
+        let _val = visibleData[_cur.rowIndex];
+        _data = visibleData.map((o, idx) => {
           if (o.useqty > 0 && idx > _cur.rowIndex) {
-            o[_cur.field] = _val;
+            o[_cur.field] = _val[_cur.field];
             if (_cur.field == "wrkgrpid1") {
-              o.wrkgrpcode1 = visibleData[_cur.rowIndex].wrkgrpcode1;
+              o.wrkgrpcode1 = _val.wrkgrpcode1;
             } else if (_cur.field == "wrkgrpid2") {
-              o.wrkgrpcode2 = visibleData[_cur.rowIndex].wrkgrpcode2;
+              o.wrkgrpcode2 = _val.wrkgrpcode2;
             }
           }
+          return o;
         });
 
-        $table.reloadData(visibleData);
+        $table.reloadData(_data);
         resetMergeCellsQd();
       }
     }
@@ -255,6 +255,10 @@ const orderDefaultAction = [
         }).then(async () => {
           loadingStatus.save = true;
           try {
+            // const { visibleData } = QdTableRef.value.element.getTableData();
+            // console.log(" mattressQDList.value :>> ", mattressQDList.value);
+            // console.log("QdTableRef visibleData :>> ", visibleData);
+
             const res = await SaveMattressInterface({
               mattress: LjDetailRef.value?._mainData,
               interfaceList: mattressYWList.value,
@@ -299,7 +303,7 @@ const orderDefaultAction = [
         return !orderStatus.value || editType.value == 3;
       },
       clickFunc: item => {
-        RefreshMattressInterfaceList(LjDetailRef.value?._mainData.mattressid, 1);
+        RefreshMattressInterfaceList(LjDetailRef.value?._mainData.mattressid, 1, LjDetailRef.value?._mainData.erp_configcodetype);
       }
     }),
     buttonDefault({
@@ -318,8 +322,14 @@ const orderDefaultAction = [
       limited: () => {
         return !orderStatus.value || editType.value != 1;
       },
+      disabledTextCallBack: (data: any) => {
+        if (data.yw_flag == 1) {
+          return "已业务补充审核,无法操作";
+        }
+        return "";
+      },
       clickFunc: item => {
-        RefreshMattressInterfaceList(LjDetailRef.value?._mainData.mattressid, 0);
+        RefreshMattressInterfaceList(LjDetailRef.value?._mainData.mattressid, 0, LjDetailRef.value?._mainData.erp_configcodetype);
       }
     })
   ],

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

@@ -496,14 +496,14 @@ export const useHooks = (t?: any) => {
       title: "新物料编码",
       basicinfo: {
         el: "input",
-        props: {
-          clearable: true,
-          onClick: (scope: any) => {
-            console.log("columns_detail scope :>> ", scope);
-            // fModelChoseMtrl()
-          }
-        },
-        editable: ALLOW_EDIT_STATE,
+        // props: {
+        //   clearable: true,
+        //   onClick: (scope: any) => {
+        //     console.log("columns_detail scope :>> ", scope);
+        //     // fModelChoseMtrl()
+        //   }
+        // },
+        // editable: ALLOW_EDIT_STATE,
         group: "单据信息",
         order: 1,
         span: 1
@@ -656,11 +656,13 @@ export const useHooks = (t?: any) => {
     },
     {
       field: "erp_pzcode",
-      title: "ERP配置编码"
+      title: "ERP配置编码",
+      width: 100
     },
     {
       field: "erp_pzname",
-      title: "ERP配置名称"
+      title: "ERP配置名称",
+      width: 120
     },
     {
       field: "bj_inputtype",
@@ -679,24 +681,25 @@ export const useHooks = (t?: any) => {
           value: 2,
           label: "带出"
         }
-      ]
-      // editRender: {
-      //   name: "$select",
-      //   options: [
-      //     {
-      //       value: 0,
-      //       label: "选择"
-      //     },
-      //     {
-      //       value: 1,
-      //       label: "录入"
-      //     },
-      //     {
-      //       value: 2,
-      //       label: "带出"
-      //     }
-      //   ]
-      // }
+      ],
+      editRender: {
+        name: "$select",
+        enabled: false,
+        options: [
+          {
+            value: 0,
+            label: "选择"
+          },
+          {
+            value: 1,
+            label: "录入"
+          },
+          {
+            value: 2,
+            label: "带出"
+          }
+        ]
+      }
     },
     {
       field: "bj_namemx",
@@ -706,7 +709,7 @@ export const useHooks = (t?: any) => {
       editColRender: (scope: any) => {
         const { $table, column, row, status } = scope;
 
-        console.log("bj_namemx scope :>> ", scope);
+        // console.log("bj_namemx scope :>> ", scope);
         let params = {
           pzid: row.erp_pzid
         };
@@ -877,23 +880,30 @@ export const useHooks = (t?: any) => {
     {
       field: "printid",
       title: "排序",
-      width: 80
+      width: 80,
+      fixed: "left"
     },
     {
       field: "itemname",
-      title: "项目"
+      title: "项目",
+      width: 100,
+      fixed: "left"
     },
     {
       field: "bj_pzname",
-      title: "二级项目"
+      title: "二级项目",
+      fixed: "left"
     },
     {
       field: "bj_pzname_mx",
-      title: "明细项目"
+      title: "明细项目",
+      width: 100,
+      fixed: "left"
     },
     {
       field: "bj_pzname_mx_mx",
-      title: "二级明细项目"
+      title: "二级明细项目",
+      fixed: "left"
     },
     {
       field: "erp_mtrlcode",
@@ -909,8 +919,8 @@ export const useHooks = (t?: any) => {
         autoFocus: "input"
       },
       editColRender: (scope: any) => {
-        console.log("mtrlname hooks render scope :>> ", scope);
-        console.log("mtrlname hooks render LjDetailRef.value._mainData :>> ", state.LjDetailRef);
+        // console.log("mtrlname hooks render scope :>> ", scope);
+        // console.log("mtrlname hooks render LjDetailRef.value._mainData :>> ", state.LjDetailRef);
         const { $table, column, row, status } = scope;
         let field = column.field;
         let _label = column.title;
@@ -1054,7 +1064,7 @@ export const useHooks = (t?: any) => {
         autoFocus: "input"
       },
       editColRender: (scope: any) => {
-        console.log("formulakind editColRender scope :>> ", scope);
+        // console.log("formulakind editColRender scope :>> ", scope);
         return (
           <el-select v-model={scope.row.wrkgrpid} filterable onChange={val => rModelSetWrkgrp1(val, scope.row)}>
             {{
@@ -1100,7 +1110,7 @@ export const useHooks = (t?: any) => {
         autoFocus: "input"
       },
       editColRender: (scope: any) => {
-        console.log("formulakind editColRender scope :>> ", scope);
+        // console.log("formulakind editColRender scope :>> ", scope);
         return (
           <el-select v-model={scope.row.wrkgrpid2} filterable onChange={val => rModelSetWrkgrp2(val, scope.row)}>
             {{
@@ -1491,7 +1501,7 @@ export const useHooks = (t?: any) => {
       const $table = state.QdTableRef.element;
       if ($table) {
         let mergeCells = autoMergeCells($table, ["itemname", "bj_pzname", "bj_pzname_mx_mx"]);
-        console.log("autoMergeCells mergeCells :>> ", mergeCells);
+        // console.log("autoMergeCells mergeCells :>> ", mergeCells);
         $table.setMergeCells(mergeCells);
       }
     });
@@ -1514,8 +1524,8 @@ export const useHooks = (t?: any) => {
    * 获取产品配置,产品清单
    * @param mattressid 床垫ID
    */
-  const RefreshMattressInterfaceList = async (mattressid: number, isPz: number) => {
-    let res = await RefreshMattressInterface({ mattressid, isPz });
+  const RefreshMattressInterfaceList = async (mattressid: number, isPz: number, configcodetype: number = 0) => {
+    let res = await RefreshMattressInterface({ mattressid, isPz, configcodetype });
     state.mattressYWList = res.mxList;
 
     resetMergeCells();