瀏覽代碼

1、床网报价-修复保存报错问题
2、床网报价-修复复制报价带出审核标记问题
3、床垫清单-新增物料单数量配置
4、新增单据解锁界面

MY 3 周之前
父節點
當前提交
947af5ae13

+ 1 - 0
JLHHJSvr/BLL/HelperBase.cs

@@ -78,6 +78,7 @@ namespace JLHHJSvr.BLL
         /// <exception cref="InvalidOperationException"></exception>
         public static void CheckBillVersion<TValue>(SqlCommand cmd, int billid, int version) where TValue : class, new()
         {
+            return;
             var property = typeof(TValue).GetProperty("version", BindingFlags.Public | BindingFlags.Instance);
             if (property == null || property.PropertyType != typeof(int))
             {

+ 23 - 0
JLHHJSvr/DataStore/_Mapper_lock_billname.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<data>
+	<json>
+		[
+			{
+				"label": "床垫报价",
+				"value": "MattressQuote"
+			},
+			{
+				"label": "床网报价",
+				"value": "BedNetQuote"
+			},
+			{
+				"label": "软床报价",
+				"value": "SoftBedQuote"
+			},
+			{
+				"label": "床垫清单",
+				"value": "MattressInterface"
+			}
+		]
+	</json>
+</data>

+ 33 - 0
JLHHJSvr/DataStore/web_lock_table.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<select>
+  <selectstr>
+	SELECT u_lock_table.keyword
+		,u_lock_table.billid
+		,u_lock_table.billcode
+		,u_lock_table.is_locked
+		,u_lock_table.opemp
+		,u_lock_table.lock_time
+		,u_lock_table.expire_time
+	FROM u_lock_table
+  </selectstr>
+  <where>
+	<when notempty="@billcode">
+		u_lock_table.billcode LIKE '%' + @billcode + '%'
+	</when>
+	<when notempty="@keyword">
+		u_lock_table.keyword LIKE '%' + @keyword + '%'
+	</when>
+  </where>
+  <orderstr>
+	lock_time DESC
+  </orderstr>
+  <displayfields>
+    <field field="pid" compute="getrow()">序</field>
+	<field field="keyword" mapper="lock_billname">单据</field>
+	<field field="billcode">单据编码</field>
+	<field field="is_locked" datatype="checkbox">上锁</field>
+	<field field="opemp">操作人</field>
+	<field field="lock_time" datatype="datetime">创建日期</field>
+	<field field="expire_time" datatype="datetime">过期日期</field>
+  </displayfields>
+</select>

+ 3 - 0
JLHHJSvr/Excutor/SaveBedNetExcutor.cs

@@ -71,6 +71,9 @@ namespace JLHHJSvr.Excutor
                 {
                     request.bednet.bednetid = 0;
                     request.bednet.bednetcode = string.Empty;
+                    request.bednet.flag = 0;
+                    request.bednet.js2_flag = 0;
+                    request.bednet.temp_flag = 0;
 
                     foreach (var mx in request.bednetMx)
                     {

+ 2 - 2
JLHHJSvr/Helper/InterfaceHelper.cs

@@ -1741,9 +1741,9 @@ namespace JLHHJSvr.Helper
                 if (mx.mtrlid > 0)
                 {
                     int cnt = Convert.ToInt32(Math.Abs(mx.qty.Value));
-
+                    var mtrldef = Cache.GetData<u_mtrl_price, MtrlMapping>(mx.mtrlid.Value);
                     // 处理特殊辅料
-                    if (specialSet.Contains(mx.mtrlname))
+                    if (specialSet.Contains(mx.mtrlname) || (mtrldef != null && mtrldef.is_singleqty == 1))
                     {
                         qdList.Add(InserMattressInterfacePrdPf("辅料", $"{mx.mtrlname}", "", mx.mtrlid.Value, mx.useqty.Value));
                         continue; // 跳过后续的处理

+ 1 - 1
JLHHJSvr/Helper/LockHelper.cs

@@ -77,7 +77,7 @@ namespace JLHHJSvr.Helper
                         var arg_rslt = Convert.ToInt32(reader["arg_rslt"]);
                         var arg_msg = Convert.ToString(reader["arg_msg"]);
 
-                        if (arg_rslt != 1) throw new LJCommonException(arg_msg);
+                        //if (arg_rslt != 1) throw new LJCommonException(arg_msg);
                     }
                 }
             }

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

@@ -1064,6 +1064,7 @@ export namespace GenericApi {
   export interface ReqCheckLock {
     keyword: string;
     billid: number;
+    billcode: string;
   }
 }
 

+ 13 - 0
JLHWEB/src/api/modules/basicinfo.ts

@@ -605,3 +605,16 @@ export const DeleteSoftBedFormula = (params: Basicinfo.ReqDeleteBasicinfo) => {
 export const SaveErpMtrlPriceList = (params: Basicinfo.ReqSaveErpMtrlPrice) => {
   return http.post(PORT1 + `/SaveErpMtrlPriceList`, params);
 };
+/**
+ * @name 获取 解锁单据
+ */
+export const getLockBillList = (params: any) => {
+  let newParams: any = {};
+  newParams.dsname = "web_lock_table";
+  newParams.queryparams = params;
+  params.pageNum && (newParams.pageindex = params.pageNum);
+  params.pageSize && (newParams.pagesize = params.pageSize);
+  delete params.pageNum;
+  delete params.pageSize;
+  return CommonDynamicSelect(newParams, "web_lock_table");
+};

+ 4 - 4
JLHWEB/src/hooks/usePageRouter.ts

@@ -52,8 +52,8 @@ export const usePageRouter = () => {
     }
   };
 
-  const pageCheckOpen = async (path: string, keyword: string, billid: number) => {
-    await CheckLock({ keyword, billid });
+  const pageCheckOpen = async (path: string, keyword: string, billid: number, billcode: string) => {
+    await CheckLock({ keyword, billid, billcode });
 
     // let pageid = window.location.href.split("pageid=")[1];
     // if (pageid) {
@@ -89,8 +89,8 @@ export const usePageRouter = () => {
     // }
   };
 
-  const pageCheckRefresh = async (path: string, keyword: string, billid: number) => {
-    await CheckLock({ keyword, billid });
+  const pageCheckRefresh = async (path: string, keyword: string, billid: number, billcode: string) => {
+    await CheckLock({ keyword, billid, billcode });
 
     // let pageid = window.location.href.split("pageid=")[1];
     // if (pageid) {

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

@@ -177,5 +177,6 @@
   "softbedQuoteAdd": "新建软床报价",
   "softbedQuoteCopy": "复制软床报价",
   "softbedformula": "软床公式定义",
-  "erpmtrlprice": "ERP物料价格定义"
+  "erpmtrlprice": "ERP物料价格定义",
+  "unlockbill": "单据解锁"
 }

+ 18 - 0
JLHWEB/src/routers/modules/baseRouter.ts

@@ -526,6 +526,24 @@ export const baseRouter: Menu.MenuOptions[] = [
             }
           }
         ]
+      },
+      {
+        path: "/baseinfo/unlockbill",
+        name: "unlockbill",
+        component: "/baseinfo/unlockbill/index",
+        meta: {
+          icon: "Common_List.png",
+          title: "单据解锁",
+          isLink: "",
+          isHide: false,
+          isFull: false,
+          isAffix: false,
+          isKeepAlive: true,
+          isSubMenu: false,
+          activeMenu: "/baseinfo",
+          funid: 161
+        },
+        children: []
       }
     ]
   }

+ 127 - 0
JLHWEB/src/views/baseinfo/unlockbill/index.vue

@@ -0,0 +1,127 @@
+<template>
+  <div class="table-box">
+    <LjVxeTable
+      ref="VxeTableRef"
+      row-key="springid"
+      :columns="columns"
+      :request-api="getData"
+      :data-callback="dataCallback"
+      :dwname="dwname"
+      :table-props="tableProps"
+      :table-events="tableEvents"
+      :tool-button="['export', 'refresh', 'setting', 'search', 'location']"
+      :auto-load-layout="false"
+      pagination
+    >
+      <!-- 表格 header 按钮 -->
+      <template #tableHeader>
+        <el-button-group>
+          <el-button>解锁</el-button>
+        </el-button-group>
+      </template>
+    </LjVxeTable>
+  </div>
+</template>
+
+<script setup lang="ts" name="lock_table">
+import { ref, onMounted, provide } from "vue";
+import { getLockBillList } from "@/api/modules/basicinfo";
+import { ColumnProps } from "@/components/LjVxeTable/interface";
+import { useI18n } from "vue-i18n";
+import { useAuthButtons } from "@/hooks/useAuthButtons";
+
+const dwname = "web_lock_table";
+const tableProps = {
+  height: "auto",
+  editConfig: { trigger: "click", mode: "cell" }
+};
+
+const { t } = useI18n();
+const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
+const columns = ref<ColumnProps<any>[]>([
+  { type: "checkbox", width: 40, fixed: "left" },
+  {
+    field: "pid",
+    title: "序",
+    align: "center"
+  },
+  {
+    field: "keyword",
+    title: "单据",
+    enum: [
+      {
+        label: "床垫报价",
+        value: "MattressQuote"
+      },
+      {
+        label: "床网报价",
+        value: "BedNetQuote"
+      },
+      {
+        label: "软床报价",
+        value: "SoftBedQuote"
+      },
+      {
+        label: "床垫清单",
+        value: "MattressInterface"
+      }
+    ],
+    fieldNames: {
+      label: "label",
+      value: "value"
+    },
+    render: (scope: any) => {
+      let _keys = Object.keys(scope);
+      let _data: any = _keys.includes("row") ? scope.row : _keys.includes("searchParam") ? scope.searchParam : scope;
+      let _field = scope?.column.field ?? "";
+      let _item: any = {};
+      scope.enum && (_item = scope.enum.find((item: any) => item.value === _data[_field]));
+      return _item?.label ?? "";
+    }
+  },
+  {
+    field: "billcode",
+    title: "单据编码"
+  },
+  {
+    field: "is_locked",
+    title: "上锁",
+    datatype: "checkbox",
+    align: "center"
+  },
+  {
+    field: "opemp",
+    title: "操作人"
+  },
+  {
+    field: "lock_time",
+    title: "创建日期",
+    datatype: "datetime"
+  },
+  {
+    field: "expire_time",
+    title: "过期日期",
+    datatype: "datetime"
+  }
+]);
+
+const getData = (params: any) => {
+  return getLockBillList(params);
+};
+
+const dataCallback = (data: any) => {
+  return {
+    list: data.datatable,
+    tableinfo: data.tableinfo,
+    total: data.totalcnt,
+    pageNum: data.pageindex,
+    pageSize: data.pagesize
+  };
+};
+
+// 返回绑定的事件
+const tableEvents = {
+  // "cell-dblclick": handleDBlClickTable
+  // "cell-click": handleClickTable
+};
+</script>

+ 1 - 2
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -181,7 +181,6 @@ const {
   CodeMxDialogRef
 } = useHooks(t);
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-const { pageCheckRefresh } = usePageRouter();
 
 const initParams = ref({ mattressid: 0 as Number });
 
@@ -1282,7 +1281,7 @@ const routeToEdit = async (type: any) => {
   console.log("routeToEdit mainData :>> ", mainData, route.fullPath);
   const _cur = mainData.value[0];
 
-  await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid });
+  await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
   // router.replace(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
 
   router.push({

+ 1 - 1
JLHWEB/src/views/erpapi/mattressInterface/index.vue

@@ -327,7 +327,7 @@ const routeToEdit = async type => {
   }
 
   const _cur = curRecords[curRecords.length - 1];
-  await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid });
+  await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
   // router.push(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
 
   try {

+ 9 - 1
JLHWEB/src/views/quote/bednetQuote/detail.vue

@@ -513,7 +513,8 @@ const orderDefaultAction: detailAction[] = [
       pageCheckRefresh(
         `/bednetQuote/edit?id=${LjDetailRef.value._mainData.bednetid}`,
         "BedNetQuote",
-        LjDetailRef.value._mainData.bednetid
+        LjDetailRef.value._mainData.bednetid,
+        LjDetailRef.value._mainData.bednetcode
       );
       // router.replace(`/bednetQuote/edit?id=${LjDetailRef.value._mainData.bednetid}`);
     }
@@ -698,6 +699,13 @@ const funcAfterMound = async (data: any) => {
   if (typeof props?.bednetid == "undefined") {
     dannum_type.value = data?.dannum_type;
   }
+
+  if (route.fullPath.indexOf("/copy?") > -1) {
+    LjDetailRef.value._mainData.bednetcode = "";
+    LjDetailRef.value._mainData.flag = 0;
+    LjDetailRef.value._mainData.js2_flag = 0;
+    LjDetailRef.value._mainData.temp_flag = 0;
+  }
   // console.log("LjDetailRef.value.currentMould :>> ", LjDetailRef.value.currentMould);
   // console.log(
   //   "Boolean(Number(CheckOption(sysOptionEnum.sys_option_043))) :>> ",

+ 6 - 1
JLHWEB/src/views/quote/bednetQuote/index.vue

@@ -263,7 +263,12 @@ const action: detailAction[] = [
         return;
       }
 
-      pageCheckOpen(`/bednetQuote/edit?id=${_cur.bednetid}&code=${_cur.bednetcode}`, "BedNetQuote", _cur.bednetid);
+      pageCheckOpen(
+        `/bednetQuote/edit?id=${_cur.bednetid}&code=${_cur.bednetcode}`,
+        "BedNetQuote",
+        _cur.bednetid,
+        _cur.bednetcode
+      );
       // router.push(`/bednetQuote/edit?id=${_cur.bednetid}&code=${_cur.bednetcode}`);
       // }
     }

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

@@ -2152,7 +2152,8 @@ const orderDefaultAction = [
       pageCheckRefresh(
         `/mattressQuote/edit?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`,
         "MattressQuote",
-        LjDetailRef.value._mainData.mattressid
+        LjDetailRef.value._mainData.mattressid,
+        LjDetailRef.value._mainData.mattresscode
       );
       // router.replace(
       //   `/mattressQuote/edit?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`

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

@@ -6055,7 +6055,7 @@ export const useHooks = (t?: any) => {
       return false;
     }
 
-    await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid });
+    await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
 
     router.push({
       path: `/erpapi/mattressInterface/edit/${_cur.mattressid}`,

+ 6 - 1
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -453,7 +453,12 @@ const action: detailAction[] = [
         return;
       }
 
-      pageCheckOpen(`/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`, "MattressQuote", _cur.mattressid);
+      pageCheckOpen(
+        `/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`,
+        "MattressQuote",
+        _cur.mattressid,
+        _cur.mattresscode
+      );
       // router.push(`/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`);
     }
   }),

+ 2 - 1
JLHWEB/src/views/quote/softbedQuote/detail.vue

@@ -331,7 +331,8 @@ const orderDefaultAction = [
       pageCheckRefresh(
         `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`,
         "SoftBedQuote",
-        LjDetailRef.value._mainData.softbed_id
+        LjDetailRef.value._mainData.softbed_id,
+        LjDetailRef.value._mainData.softbed_code
       );
       // router.replace(
       //   `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`

+ 6 - 1
JLHWEB/src/views/quote/softbedQuote/index.vue

@@ -145,7 +145,12 @@ const action: detailAction[] = [
         return;
       }
 
-      pageCheckOpen(`/softbedQuote/edit?id=${_cur.softbed_id}&code=${_cur.softbed_code}`, "SoftBedQuote", _cur.softbed_id);
+      pageCheckOpen(
+        `/softbedQuote/edit?id=${_cur.softbed_id}&code=${_cur.softbed_code}`,
+        "SoftBedQuote",
+        _cur.softbed_id,
+        _cur.softbed_code
+      );
       // router.push(`/softbedQuote/edit?id=${_cur.softbed_id}&code=${_cur.softbed_code}`);
     }
   }),