Преглед изворни кода

1、床垫报价-新增选择布料时显示"幅宽"和"克重"列【157】
2、床垫报价-新增多个包装方式物料编码选择【150#】
3、床垫报价-修复管理员权限看不到不含税出厂价【148#】

MY пре 1 месец
родитељ
комит
1fb6e7fb28

+ 12 - 0
JLHHJSvr/Com/Model/u_mattress_formula.cs

@@ -73,6 +73,18 @@ namespace JLHHJSvr.Com.Model
         /// 工艺说明
         /// </summary>
         public string gydscrp { get; set; }
+        /// <summary>
+        /// 默认压包物料id
+        /// </summary>
+        public int? default_mtrlid0 { get; set; }
+        /// <summary>
+        /// 默认卷包物料id
+        /// </summary>
+        public int? default_mtrlid1 { get; set; }
+        /// <summary>
+        /// 默认国内物料id
+        /// </summary>
+        public int? default_mtrlid2 { get; set; }
 
     }
 }

+ 0 - 3
JLHHJSvr/DataStore/web_configure_codemxlist.xml

@@ -35,9 +35,6 @@ INNER JOIN u_configure_code ON u_configure_codemx.pzid = u_configure_code.pzid
 	<when notnull="@typeid">
 		u_configure_code.typeid = @typeid 
 	</when>
-	<when notnull="@keyword">
-		u_configure_codemx.pzcodemx LIKE '%'+ @keyword + '%' OR u_configure_codemx.namemx LIKE '%'+ @keyword + '%'
-	</when>
   </where>
   <orderstr>
   </orderstr>

+ 6 - 0
JLHHJSvr/DataStore/web_mattress_formulalist.xml

@@ -17,6 +17,9 @@ SELECT formulaid
 	,useformula
 	,gydscrp
 	,mtrltype
+	,default_mtrlid0
+	,default_mtrlid1
+	,default_mtrlid2
 FROM u_mattress_formula
   </selectstr>
   <where>
@@ -57,6 +60,9 @@ FROM u_mattress_formula
     <field field="if_packtype1" datatype="checkbox">卷包</field>
     <field field="if_packtype2" datatype="checkbox">国内</field>
     <field field="default_mtrlid" mapper="mtrl_price">默认物料</field>
+    <field field="default_mtrlid0" mapper="mtrl_price">默认压包物料</field>
+    <field field="default_mtrlid1" mapper="mtrl_price">默认卷包物料</field>
+    <field field="default_mtrlid2" mapper="mtrl_price">默认国内物料</field>
     <field field="mtrltype" mapper="mtrltypeid">物料类别</field>
     <field field="createby">登记人</field>
     <field field="createtime" datatype="datetime">登记时间</field>

+ 6 - 1
JLHHJSvr/Excutor/GetErpMtrlPriceListExcutor.cs

@@ -39,10 +39,15 @@ namespace JLHHJSvr.Excutor
                 //
                 whereList.Add("u_mtrldef.flag = 2");
                 //
-                if(request.mtrltypeids != null && request.mtrltypeids.Count > 0)
+                if (request.mtrltypeids != null && request.mtrltypeids.Count > 0)
                 {
                     whereList.Add($"u_mtrldef.mtrltypeid IN {ListEx.getString(request.mtrltypeids)}");
                 }
+                if (!string.IsNullOrEmpty(request.keyword))
+                {
+                    whereList.Add("u_mtrldef.mtrlcode LIKE @keyword OR u_mtrldef.mtrlname LIKE @keyword");
+                    param.Add("@keyword", $"%{request.keyword}%");
+                }
                 if (!string.IsNullOrEmpty(request.mtrlcode))
                 {
                     whereList.Add("u_mtrldef.mtrlcode LIKE @mtrlcode");

+ 8 - 4
JLHHJSvr/Excutor/SaveMattressFormulaExcutor.cs

@@ -45,6 +45,10 @@ namespace JLHHJSvr.Excutor
 
                 AutoInit.AutoInitS(cmd, request.mattress);
 
+                if (request.mattress.if_packtype0 == 0) request.mattress.default_mtrlid0 = 0;
+                if (request.mattress.if_packtype1 == 0) request.mattress.default_mtrlid1 = 0;
+                if (request.mattress.if_packtype2 == 0) request.mattress.default_mtrlid2 = 0;
+
                 using (cmd.Transaction = con.BeginTransaction())
                 {
                     try
@@ -57,14 +61,14 @@ namespace JLHHJSvr.Excutor
                             request.mattress.createby = tokendata.username;
 
                             var fields = @"formulaid,formulakind,formulatype,sortcode,if_mtrl,formula,usetype,if_packtype0,if_packtype1,if_packtype2,default_mtrlid,
-                                        createtime,createby,useformula,gydscrp,mtrltype";
+                                        createtime,createby,useformula,gydscrp,mtrltype,default_mtrlid0,default_mtrlid1,default_mtrlid2";
                             DbSqlHelper.Insert(cmd, "u_mattress_formula", null, request.mattress, fields);
                         }
                         else
                         {
                             //修改
                             var fields = @"formulakind,formulatype,sortcode,if_mtrl,formula,usetype,if_packtype0,if_packtype1,if_packtype2,default_mtrlid,
-                                        useformula,gydscrp,mtrltype";
+                                        useformula,gydscrp,mtrltype,default_mtrlid0,default_mtrlid1,default_mtrlid2";
                             DbSqlHelper.Update(cmd, "u_mattress_formula", null, request.mattress, "formulaid", fields);
                         }
 
@@ -72,8 +76,8 @@ namespace JLHHJSvr.Excutor
                     }
                     catch (Exception e)
                     {
-                        cmd.Transaction.Rollback();
-                        rslt.ErrMsg = e.ToString();
+                        cmd.Transaction?.Rollback();
+                        rslt.ErrMsg = e.Message;
                     }
                 }
             }

+ 11 - 1
JLHHJSvr/Helper/MattressHelper.cs

@@ -3430,8 +3430,11 @@ namespace JLHHJSvr.Helper
 	                            ,useformula
 	                            ,gydscrp
 	                            ,mtrltype
+	                            ,default_mtrlid0
+	                            ,default_mtrlid1
+	                            ,default_mtrlid2
                             FROM u_mattress_formula";
-             var outFields = "formulaid, formulakind, formulatype, sortcode, if_mtrl, formula, usetype, if_packtype0, if_packtype1, if_packtype2, default_mtrlid, createtime, createby, useformula, gydscrp, mtrltype";
+             var outFields = "formulaid, formulakind, formulatype, sortcode, if_mtrl, formula, usetype, if_packtype0, if_packtype1, if_packtype2, default_mtrlid, createtime, createby, useformula, gydscrp, mtrltype,default_mtrlid0,default_mtrlid1,default_mtrlid2";
              var whereList = new List<string>();
              whereList.Add("u_mattress_formula.formulatype IN (0, 1, 2, 3, 99, 104)");
              whereList.Add("u_mattress_formula.usetype = @usetype");
@@ -3466,6 +3469,13 @@ namespace JLHHJSvr.Helper
                 newDw2.gydscrp = mx.gydscrp;
                 newDw2.default_mtrlid = mx.default_mtrlid;
 
+                if(mx.formulatype == 3)
+                {
+                    if(packtype == 0) newDw2.default_mtrlid = mx.default_mtrlid0;
+                    else if(packtype == 1) newDw2.default_mtrlid = mx.default_mtrlid1;
+                    else if(packtype == 2) newDw2.default_mtrlid = mx.default_mtrlid2;
+                }
+
                 dw_2.Add(newDw2);
             }
 

+ 2 - 1
JLHWEB/src/components/ToastWidget/HistoryPrice/components/Item.vue

@@ -123,6 +123,7 @@ import { formatTime, formatAmount3 } from "@/utils/index";
 import { Calendar } from "@element-plus/icons-vue";
 import { isFilterPrice } from "@/utils/index";
 import { useGlobalStore } from "@/stores/modules/global";
+import { useUserStore } from "@/stores/modules/user";
 
 interface wigetProps {
   item: any;
@@ -138,7 +139,7 @@ interface wigetProps {
 }
 
 const globalStore = useGlobalStore();
-const isSuper = globalStore.isSuper;
+const isSuper = globalStore.isSuper || useUserStore().userInfo.usermode === 0;
 
 const props = withDefaults(defineProps<wigetProps>(), {
   // item: {},

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

@@ -1553,6 +1553,8 @@
   "u_mtrl_price": {
     "name": "名称",
     "thickness": "厚度",
+    "cloth_width": "幅宽",
+    "gram_weight": "克重",
     "priceunit": "单位",
     "pricelistprice": "单价",
     "dscrp": "备注"

+ 9 - 7
JLHWEB/src/views/baseinfo/configure/hooks/index.tsx

@@ -15,7 +15,7 @@ import {
 } from "@/api/modules/basicinfo";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { useClipboardStore } from "@/stores/modules/copy";
-import MtrldefSelect from "@/views/system/selector/mtrldefNoPrice/select.vue";
+import ErpMtrlPriceSelect from "@/views/system/selector/erpMtrlPrice/select.vue";
 interface defaultState {
   /**
    * @description 单据当前状态
@@ -325,7 +325,7 @@ export const useHooks = (t?: any) => {
           let params = {};
           return (
             <>
-              <MtrldefSelect
+              <ErpMtrlPriceSelect
                 value={row.mtrlid}
                 {...params}
                 clearable
@@ -337,7 +337,7 @@ export const useHooks = (t?: any) => {
                 {{
                   label: () => row.mtrlname
                 }}
-              </MtrldefSelect>
+              </ErpMtrlPriceSelect>
             </>
           );
         }
@@ -747,10 +747,11 @@ export const useHooks = (t?: any) => {
    */
   const rModelSetMtrl = (data: any, item: any) => {
     data.mtrlid = Number(item.mtrlid);
-    data.mtrlname = item.name;
-    // data.mtrlcode = item.mtrlcode;
-    // data.mtrlmode = item.mtrlmode;
-    data.unit = item.priceunit;
+    data.mtrlname = item.mtrlname;
+    data.mtrlcode = item.mtrlcode;
+    data.mtrlmode = item.mtrlmode;
+    data.unit = item.unit;
+    data.price = item.price;
   };
 
   const rModelClearMtrl = (data: any) => {
@@ -759,6 +760,7 @@ export const useHooks = (t?: any) => {
     data.mtrlcode = "";
     data.mtrlmode = "";
     data.unit = "";
+    data.price = 0;
   };
 
   return {

+ 175 - 20
JLHWEB/src/views/baseinfo/mattressformula/hooks/index.tsx

@@ -78,7 +78,7 @@ export const useHooks = (t?: any) => {
       title: "按物料",
       basicinfo: {
         el: "select",
-        order: 7,
+        order: 9,
         span: 3,
         editable: ALLOW_EDIT_STATE,
         rules: [{ required: true }]
@@ -89,7 +89,7 @@ export const useHooks = (t?: any) => {
       title: "公式应用分类",
       basicinfo: {
         el: "select",
-        order: 6,
+        order: 7,
         span: 3,
         editable: ALLOW_EDIT_STATE,
         rules: [{ required: true }]
@@ -100,7 +100,7 @@ export const useHooks = (t?: any) => {
       title: "金额公式",
       basicinfo: {
         el: "input",
-        order: 12,
+        order: 14,
         span: 6,
         editable: ALLOW_EDIT_STATE,
         props: { type: "textarea", rows: 3 }
@@ -111,7 +111,7 @@ export const useHooks = (t?: any) => {
       title: "用量公式",
       basicinfo: {
         el: "input",
-        order: 13,
+        order: 15,
         span: 6,
         editable: ALLOW_EDIT_STATE,
         props: { type: "textarea", rows: 3 }
@@ -122,7 +122,7 @@ export const useHooks = (t?: any) => {
       title: "压包",
       basicinfo: {
         editable: ALLOW_EDIT_STATE,
-        order: 8,
+        order: 10,
         span: 1,
         render: (scope: any) => {
           const { column, searchParam } = scope;
@@ -140,7 +140,7 @@ export const useHooks = (t?: any) => {
       title: "卷包",
       basicinfo: {
         editable: ALLOW_EDIT_STATE,
-        order: 9,
+        order: 11,
         span: 1,
         render: (scope: any) => {
           const { column, searchParam } = scope;
@@ -158,7 +158,7 @@ export const useHooks = (t?: any) => {
       title: "国内",
       basicinfo: {
         editable: ALLOW_EDIT_STATE,
-        order: 10,
+        order: 12,
         span: 1,
         render: (scope: any) => {
           const { column, searchParam } = scope;
@@ -179,6 +179,9 @@ export const useHooks = (t?: any) => {
         order: 4,
         span: 3,
         editable: ALLOW_EDIT_STATE,
+        editvisible: (scope: any) => {
+          return Number(scope.searchParam.formulatype) !== 3;
+        },
         render: (scope: any) => {
           const { column, searchParam: row, status } = scope;
           let field = column.basicinfo?.key ?? column.field;
@@ -194,10 +197,140 @@ export const useHooks = (t?: any) => {
                 value={row.default_mtrlid}
                 {...params}
                 clearable
-                onOpenModal={() => fModelChoseMtrl(row, params, mtrltype)}
-                onSelect={(val: any) => rModelSetMtrl(row, val)}
-                onClear={() => rModelClearMtrl(scope.searchParam)}
-              />
+                onOpenModal={() => fModelChoseMtrl(row, params, mtrltype, 99)}
+                onSelect={(val: any) => rModelSetMtrl(row, val, 99)}
+                onClear={() => rModelClearMtrl(scope.searchParam, 99)}
+              >
+                {{
+                  label: () => scope.searchParam.default_mtrlname
+                }}
+              </MtrldefSelect>
+            </>
+          );
+        }
+      }
+    },
+    {
+      field: "default_mtrlname0",
+      title: "默认压包物料",
+      visible: false,
+      basicinfo: {
+        el: "select",
+        order: 4,
+        span: 3,
+        editable: ALLOW_EDIT_STATE,
+        editvisible: (scope: any) => {
+          return Number(scope.searchParam.formulatype) === 3;
+        },
+        render: (scope: any) => {
+          const { column, searchParam: row, status } = scope;
+          let field = column.basicinfo?.key ?? column.field;
+          let _label = row[field];
+
+          let _disabled = !Number(scope.searchParam.if_packtype0);
+          const mtrltype = row["mtrltype"];
+          let params = {
+            mtrltype
+          };
+          return (
+            <>
+              <MtrldefSelect
+                value={row.default_mtrlid0}
+                {...params}
+                clearable
+                disabled={_disabled}
+                onOpenModal={() => fModelChoseMtrl(row, params, mtrltype, 0)}
+                onSelect={(val: any) => rModelSetMtrl(row, val, 0)}
+                onClear={() => rModelClearMtrl(scope.searchParam, 0)}
+              >
+                {{
+                  label: () => scope.searchParam.default_mtrlname0
+                }}
+              </MtrldefSelect>
+            </>
+          );
+        }
+      }
+    },
+    {
+      field: "default_mtrlname1",
+      title: "默认卷包物料",
+      visible: false,
+      basicinfo: {
+        el: "select",
+        order: 6,
+        span: 3,
+        editable: ALLOW_EDIT_STATE,
+        editvisible: (scope: any) => {
+          return Number(scope.searchParam.formulatype) === 3;
+        },
+        render: (scope: any) => {
+          const { column, searchParam: row, status } = scope;
+          let field = column.basicinfo?.key ?? column.field;
+          let _label = row[field];
+
+          let _disabled = !Number(scope.searchParam.if_packtype1);
+          const mtrltype = row["mtrltype"];
+          let params = {
+            mtrltype
+          };
+          return (
+            <>
+              <MtrldefSelect
+                value={row.default_mtrlid1}
+                {...params}
+                clearable
+                disabled={_disabled}
+                onOpenModal={() => fModelChoseMtrl(row, params, mtrltype, 1)}
+                onSelect={(val: any) => rModelSetMtrl(row, val, 1)}
+                onClear={() => rModelClearMtrl(scope.searchParam, 1)}
+              >
+                {{
+                  label: () => scope.searchParam.default_mtrlname1
+                }}
+              </MtrldefSelect>
+            </>
+          );
+        }
+      }
+    },
+    {
+      field: "default_mtrlname2",
+      title: "默认国内物料",
+      visible: false,
+      basicinfo: {
+        el: "select",
+        order: 8,
+        span: 3,
+        editable: ALLOW_EDIT_STATE,
+        editvisible: (scope: any) => {
+          return Number(scope.searchParam.formulatype) === 3;
+        },
+        render: (scope: any) => {
+          const { column, searchParam: row, status } = scope;
+          let field = column.basicinfo?.key ?? column.field;
+          let _label = row[field];
+
+          let _disabled = !Number(scope.searchParam.if_packtype2);
+          const mtrltype = row["mtrltype"];
+          let params = {
+            mtrltype
+          };
+          return (
+            <>
+              <MtrldefSelect
+                value={row.default_mtrlid2}
+                {...params}
+                clearable
+                disabled={_disabled}
+                onOpenModal={() => fModelChoseMtrl(row, params, mtrltype, 2)}
+                onSelect={(val: any) => rModelSetMtrl(row, val, 2)}
+                onClear={() => rModelClearMtrl(scope.searchParam, 2)}
+              >
+                {{
+                  label: () => scope.searchParam.default_mtrlname2
+                }}
+              </MtrldefSelect>
             </>
           );
         }
@@ -237,7 +370,7 @@ export const useHooks = (t?: any) => {
       title: "工艺说明",
       basicinfo: {
         el: "input",
-        order: 11,
+        order: 13,
         span: 6,
         editable: ALLOW_EDIT_STATE,
         props: { type: "textarea", rows: 3 }
@@ -304,7 +437,7 @@ export const useHooks = (t?: any) => {
    * @param status 当前订单状态
    * @returns Promise
    */
-  const fModelChoseMtrl = (data: any, params: any, label?: string) => {
+  const fModelChoseMtrl = (data: any, params: any, label?: string, type?: number) => {
     return new Promise((resolve, reject) => {
       // if (!ALLOW_EDIT_STATE.includes(status)) return;
 
@@ -318,7 +451,7 @@ export const useHooks = (t?: any) => {
           // submit
           console.log("openCustDialog res", res);
           nextTick(() => {
-            rModelSetMtrl(data, res.value[0]);
+            rModelSetMtrl(data, res.value[0], type);
             resolve(1);
           });
         },
@@ -336,14 +469,36 @@ export const useHooks = (t?: any) => {
    * @param data 当前数据
    * @param item 当前选择的数据
    */
-  const rModelSetMtrl = (data: any, item: any) => {
-    data.default_mtrlid = Number(item.mtrlid);
-    data.default_mtrlname = item.name;
+  const rModelSetMtrl = (data: any, item: any, type?: number) => {
+    if (type === 1) {
+      data.default_mtrlid1 = Number(item.mtrlid);
+      data.default_mtrlname1 = item.name;
+    } else if (type === 2) {
+      data.default_mtrlid2 = Number(item.mtrlid);
+      data.default_mtrlname2 = item.name;
+    } else if (type === 0) {
+      data.default_mtrlid0 = Number(item.mtrlid);
+      data.default_mtrlname0 = item.name;
+    } else {
+      data.default_mtrlid = Number(item.mtrlid);
+      data.default_mtrlname = item.name;
+    }
   };
 
-  const rModelClearMtrl = (data: any) => {
-    data.default_mtrlid = 0;
-    data.default_mtrlname = "";
+  const rModelClearMtrl = (data: any, type?: number) => {
+    if (type === 1) {
+      data.default_mtrlid1 = 0;
+      data.default_mtrlname1 = "";
+    } else if (type === 2) {
+      data.default_mtrlid2 = 0;
+      data.default_mtrlname2 = "";
+    } else if (type === 0) {
+      data.default_mtrlid0 = 0;
+      data.default_mtrlname0 = "";
+    } else {
+      data.default_mtrlid = 0;
+      data.default_mtrlname = "";
+    }
   };
 
   return {

+ 9 - 7
JLHWEB/src/views/quote/softbedQuote/hooks/index.tsx

@@ -1096,13 +1096,15 @@ export const useHooks = (t?: any) => {
             state.configValueOptionsMap[code.pzid].push(...code.codeMxList.filter(t => t.pzid === code.pzid));
 
             // 自动添加标准选配值
-            targetConfig.push(
-              ...code.codeMxList
-                .filter(t => t.ifdft === 1)
-                .map(t => {
-                  return { pzid: t.pzid, selectedId: t.printid, selectedValue: t.namemx };
-                })
-            );
+            if (targetConfig && targetConfig.length <= 0) {
+              targetConfig.push(
+                ...code.codeMxList
+                  .filter(t => t.ifdft === 1)
+                  .map(t => {
+                    return { pzid: t.pzid, selectedId: t.printid, selectedValue: t.namemx };
+                  })
+              );
+            }
           }
         }
       }

+ 1 - 46
JLHWEB/src/views/system/selector/mtrldef/hooks/index.ts

@@ -5,50 +5,5 @@ import { useUserStore } from "@/stores/modules/user";
 
 export const useOutrep = (t: any) => {
   // 表格配置项
-  const columns: ColumnProps<any>[] = [];
-
-  // {
-  //   field: "mtrlname"
-  //   title:"名称",
-  //   },
-  //   {
-  //   field: "thickness"
-  //   title:"厚度",
-  //   },
-  //   {
-  //   field: "priceunit"
-  //   title:"单位",
-  //   },
-  //   {
-  //   field: "pricelistprice"
-  //   title:"单价",
-  //   },
-  //   {
-  //   field: "dscrp"
-  //   title:"备注"
-  //   },
-  //   {
-  //   field: "erp_mtrlcode"
-  //   title:"L1编码",
-  //   },
-  //   {
-  //   field: "erp_mtrlname"
-  //   title:"L1名称",
-  //   },
-  //   {
-  //   field: "erp_mtrlmode"
-  //   title:"L1规格",
-  //   },
-  //   {
-  //   field: "erp_unit"
-  //   title:"L1单位",
-  //   },
-  //   {
-  //   field: "erp_mtrlengname",
-  //   title: "L1英文名称"
-  //   },
-
-  return {
-    columns
-  };
+  
 };

+ 83 - 8
JLHWEB/src/views/system/selector/mtrldef/index.vue

@@ -45,13 +45,10 @@
 
 <script lang="tsx" setup name="SelectorMtrldefDialog">
 import { reactive, toRefs, ref, onMounted, nextTick, inject, watch, computed } from "vue";
-// import LjDialog from "@/components/LjDialog/index.vue";
-// import LjFoldLayoutDouble from "@/components/LjFoldLayoutDouble/index.vue";
 import LjVxeTable from "@/components/LjVxeTable/index.vue";
 // 注意: 需要按需引入使用到的第三方UI组件
 // import { ElDialog, ElButton } from "element-plus";
 
-import { useOutrep } from "./hooks/index";
 import { useI18n } from "vue-i18n";
 import { DwnameEnum } from "@/enums/dwnameEnum";
 import { cloneDeep, pick, defaultsDeep } from "lodash-es";
@@ -62,18 +59,95 @@ import { useAuthButtons } from "@/hooks/useAuthButtons";
 import LjSelector from "@/components/LjSelector/index.vue";
 import { throttle } from "lodash-es";
 import { Search } from "@element-plus/icons-vue";
+import { ColumnProps } from "@/components/LjVxeTable/interface";
 // import variables from "@/styles/js.module.scss";
 
 // const props = withDefaults(defineProps<{}>(), {});
 
 const { t } = useI18n();
-const { columns } = useOutrep(t);
+
+const arg_mtrltype = ref(0);
+const isBuliao = computed(() => {
+  console.log("arg_mtrltype.value === 3 :>>>", arg_mtrltype.value === 3);
+  return arg_mtrltype.value === 3;
+});
+
+const columns: ColumnProps<any>[] = [
+  { type: "radio", width: 50, fixed: "left" },
+  {
+    field: "pid",
+    title: "序"
+  },
+  {
+    field: "mtrlname",
+    title: "名称"
+  },
+  {
+    field: "thickness",
+    title: "厚度",
+    datatype: "number"
+  },
+  {
+    field: "priceunit",
+    title: "单位"
+  },
+  {
+    field: "pricelistprice",
+    title: "单价"
+  },
+  {
+    field: "extra_cost",
+    title: "特殊工艺费用",
+    datatype: "number"
+  },
+  {
+    field: "dscrp",
+    title: "备注"
+  },
+  {
+    field: "erp_mtrlcode",
+    title: "L1编码"
+  },
+  {
+    field: "erp_mtrlname",
+    title: "L1名称"
+  },
+  {
+    field: "erp_mtrlmode",
+    title: "L1规格"
+  },
+  {
+    field: "erp_unit",
+    title: "L1单位"
+  },
+  {
+    field: "erp_mtrlengname",
+    title: "L1英文名称"
+  }
+];
 const selColumns: any = computed(() => {
-  // let selCol: any = { type: "checkbox", width: 50, fixed: "left" };
-  let selCol: any = { type: "radio", width: 50, fixed: "left" };
   let _columns = cloneDeep(columns);
-  // console.log(" _columns.unshift(selCol); :>> ", _columns.unshift(selCol));
-  _columns.unshift(selCol);
+
+  if (isBuliao.value) {
+    let _index = _columns.findIndex((item: any) => item.field === "mtrlname");
+    _columns.splice(
+      _index + 1,
+      0,
+      {
+        field: "gram_weight",
+        title: "克重",
+        visible: isBuliao.value,
+        datatype: "number"
+      },
+      {
+        field: "cloth_width",
+        title: "幅宽",
+        visible: isBuliao.value,
+        datatype: "number"
+      }
+    );
+  }
+
   console.log("_columns :>> ", _columns);
   return _columns;
 });
@@ -301,6 +375,7 @@ const show = (params: any, label?: string) => {
 
   subtitle.value = label ?? getTypename(params.arg_mtrltype);
 
+  arg_mtrltype.value = params.arg_mtrltype;
   console.log("params :>> ", params, label ?? getTypename(params.mtrltype));
 
   console.log("show bfff initParams.value :>> ", initParams.value, params);

+ 16 - 0
JLHWEB/src/views/system/selector/mtrldef/select.vue

@@ -19,6 +19,12 @@
           <div class="table-td pr-4" style="width: 120px; max-width: 120px; min-width: 120px">
             {{ $t("table.u_mtrl_price.name") }}
           </div>
+          <div class="table-td pr-4" style="width: 60px; max-width: 60px; min-width: 60px" v-if="isBuliao">
+            {{ $t("table.u_mtrl_price.cloth_width") }}
+          </div>
+          <div class="table-td pr-4" style="width: 60px; max-width: 60px; min-width: 60px" v-if="isBuliao">
+            {{ $t("table.u_mtrl_price.gram_weight") }}
+          </div>
           <div class="table-td pr-4" style="width: 60px; max-width: 60px; min-width: 60px">
             {{ $t("table.u_mtrl_price.thickness") }}
           </div>
@@ -58,6 +64,12 @@
           >
             {{ item.mtrlname }}
           </div>
+          <div style="width: 60px; max-width: 60px; min-width: 60px" class="table-td pr-4 text-ellipsis-two break-word">
+            {{ Number(item.cloth_width) }}
+          </div>
+          <div style="width: 60px; max-width: 60px; min-width: 60px" class="table-td pr-4 text-ellipsis-two break-word">
+            {{ Number(item.gram_weight) }}
+          </div>
           <div style="width: 60px; max-width: 60px; min-width: 60px" class="table-td pr-4 text-ellipsis-two break-word">
             {{ Number(item.thickness) }}
           </div>
@@ -278,6 +290,10 @@ const handleSelect = (item: any) => {
 const openModal = (e: any) => {
   emit("openModal", e);
 };
+
+const isBuliao = computed(() => {
+  return props.mtrltype === 3;
+});
 </script>
 
 <style lang="scss">