Bläddra i källkod

1、床网报价弹簧新增识别代号
2、软床报价新增业务修改列

MY 1 månad sedan
förälder
incheckning
89c5334a16

+ 19 - 5
JLHHJSvr/DataStore/web_bednet_mx.xml

@@ -38,12 +38,26 @@
 		From u_bednetmx
 		left outer join (
 			SELECT u_spring.springid,
-			left(rtrim(cast(u_spring.line_diameter as char(10))),4) + '/'+
-			left(rtrim(cast(u_spring.height as char(10))),4) + '/'+
-			left(rtrim(cast(u_spring.caliber  as char(10))),4) + '/'+
-			left(rtrim(cast(u_spring.center_diameter  as char(10))),4) + '/'+
-			left(rtrim(cast(u_spring.cyclenum  as char(10))),4)   as name
+			CASE
+				WHEN springname <> '' THEN springname
+				WHEN u_springtype.springtypecode <> '' THEN 
+					rtrim(u_springtype.springtypecode)  + '/'+
+					left(rtrim(cast(u_spring.height_original as char(10))),2) + '/'+
+					left(rtrim(cast(u_spring.height as char(10))),2) + '/'+
+					left(rtrim(cast(u_spring.caliber  as char(10))),4) + '/'+
+					left(rtrim(cast(u_spring.center_diameter  as char(10))),3) + '/'+
+					left(rtrim(cast(u_spring.cyclenum  as char(10))),1) + '/'+
+					left(rtrim(cast(u_spring.line_diameter as char(10))),3) + '-'+
+					left(rtrim(cast(u_spring.hardness as char(10))),5)
+				ELSE 
+					left(rtrim(cast(u_spring.line_diameter as char(10))),4) + '/'+
+					left(rtrim(cast(u_spring.height as char(10))),4) + '/'+
+					left(rtrim(cast(u_spring.caliber  as char(10))),4) + '/'+
+					left(rtrim(cast(u_spring.center_diameter  as char(10))),4) + '/'+
+					left(rtrim(cast(u_spring.cyclenum  as char(10))),4) 
+				END as name
 		FROM u_spring
+		INNER JOIN u_springtype ON u_springtype.springtypeid = u_spring.springtypeid
 		) vv_spring on vv_spring.springid = u_bednetmx.springid
 		left outer join (
 			SELECT u_spring.springid,

+ 24 - 23
JLHHJSvr/DataStore/web_bednet_mx_spring.xml

@@ -1,29 +1,30 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <select>
 	<selectstr>
-		SELECT
-			bednetmx_partid,
-			u_bednetmx_spring.bednetmxid,
-			u_bednetmx_spring.springid,
-			ISNULL(vv_spring.name, '') as springname,
-			u_bednetmx_spring.spring_qty_width,
-			u_bednetmx_spring.spring_qty_length,
-			u_bednetmx_spring.fabrics1_mtrl_cost,
-			u_bednetmx_spring.spring_mtrl_cost,
-			u_bednetmx_spring.spring_mtrl_cost_replace_formula,
-			u_bednetmx_spring.spring_weight_replace_formula
-		From u_bednetmx_spring
-
-		left outer join u_bednetmx on u_bednetmx.bednetmxid = u_bednetmx_spring.bednetmxid
-		left outer join (
-		SELECT u_spring.springid,
-		left(rtrim(cast(u_spring.line_diameter as char(10))),4) + '/'+
-		left(rtrim(cast(u_spring.height as char(10))),4) + '/'+
-		left(rtrim(cast(u_spring.caliber  as char(10))),4) + '/'+
-		left(rtrim(cast(u_spring.center_diameter  as char(10))),4) + '/'+
-		left(rtrim(cast(u_spring.cyclenum  as char(10))),4)   as name
-		FROM u_spring
-		) vv_spring on vv_spring.springid = u_bednetmx_spring.springid
+SELECT bednetmx_partid
+	,u_bednetmx_spring.bednetmxid
+	,u_bednetmx_spring.springid
+	,ISNULL(vv_spring.name, '') AS springname
+	,u_bednetmx_spring.spring_qty_width
+	,u_bednetmx_spring.spring_qty_length
+	,u_bednetmx_spring.fabrics1_mtrl_cost
+	,u_bednetmx_spring.spring_mtrl_cost
+	,u_bednetmx_spring.spring_mtrl_cost_replace_formula
+	,u_bednetmx_spring.spring_weight_replace_formula
+FROM u_bednetmx_spring
+LEFT JOIN u_bednetmx ON u_bednetmx.bednetmxid = u_bednetmx_spring.bednetmxid
+LEFT JOIN (
+	SELECT u_spring.springid
+		,CASE 
+			WHEN springname <> ''
+				THEN springname
+			WHEN u_springtype.springtypecode <> ''
+				THEN rtrim(u_springtype.springtypecode) + '/' + left(rtrim(cast(u_spring.height_original AS CHAR(10))), 2) + '/' + left(rtrim(cast(u_spring.height AS CHAR(10))), 2) + '/' + left(rtrim(cast(u_spring.caliber AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.center_diameter AS CHAR(10))), 3) + '/' + left(rtrim(cast(u_spring.cyclenum AS CHAR(10))), 1) + '/' + left(rtrim(cast(u_spring.line_diameter AS CHAR(10))), 3) + '-' + left(rtrim(cast(u_spring.hardness AS CHAR(10))), 5)
+			ELSE left(rtrim(cast(u_spring.line_diameter AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.height AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.caliber AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.center_diameter AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.cyclenum AS CHAR(10))), 4)
+			END AS name
+	FROM u_spring
+	INNER JOIN u_springtype ON u_springtype.springtypeid = u_spring.springtypeid
+	) vv_spring ON vv_spring.springid = u_bednetmx_spring.springid
 	</selectstr>
 	<where>
 		<when notnull="@arg_bednetmxid">

+ 71 - 31
JLHWEB/src/views/quote/softbedQuote/hooks/index.tsx

@@ -846,36 +846,36 @@ export const useHooks = (t?: any) => {
       title: "行号",
       width: 50
     },
-    // {
-    //   field: "allow_edit",
-    //   title: "业务修改",
-    //   width: 88,
-    //   align: "center",
-    //   datatype: "checkbox",
-    //   visiable: false,
-    //   editRender: {},
-    //   editColRender: (scope: any) => {
-    //     const { row } = scope;
-    //     const { _mainData } = state.LjDetailRef;
-    //     if (Number(row.allow_edit) == 0) {
-    //       row.allow_edit = 0;
-    //     }
-
-    //     const _disabled = !row.allow_edit && !_mainData.is_template;
-
-    //     return (
-    //       <>
-    //         <el-checkbox
-    //           v-model={row.allow_edit}
-    //           true-value={1}
-    //           false-value={0}
-    //           class="vxe-edit-col-middle"
-    //           disabled={_disabled}
-    //         ></el-checkbox>
-    //       </>
-    //     );
-    //   }
-    // },
+    {
+      field: "allow_edit",
+      title: "业务修改",
+      width: 88,
+      align: "center",
+      datatype: "checkbox",
+      visiable: false,
+      editRender: {},
+      editColRender: (scope: any) => {
+        const { row } = scope;
+        const { _mainData } = state.LjDetailRef;
+        if (Number(row.allow_edit) == 0) {
+          row.allow_edit = 0;
+        }
+
+        const _disabled = !row.allow_edit && !_mainData.is_template;
+
+        return (
+          <>
+            <el-checkbox
+              v-model={row.allow_edit}
+              true-value={1}
+              false-value={0}
+              class="vxe-edit-col-middle"
+              disabled={_disabled}
+            ></el-checkbox>
+          </>
+        );
+      }
+    },
     {
       field: "pzname",
       title: "部件选配项",
@@ -1124,6 +1124,36 @@ export const useHooks = (t?: any) => {
       title: "行号",
       width: 50
     },
+    {
+      field: "allow_edit",
+      title: "业务修改",
+      width: 88,
+      align: "center",
+      datatype: "checkbox",
+      visiable: false,
+      editRender: {},
+      editColRender: (scope: any) => {
+        const { row } = scope;
+        const { _mainData } = state.LjDetailRef;
+        if (Number(row.allow_edit) == 0) {
+          row.allow_edit = 0;
+        }
+
+        const _disabled = !row.allow_edit && !_mainData.is_template;
+
+        return (
+          <>
+            <el-checkbox
+              v-model={row.allow_edit}
+              true-value={1}
+              false-value={0}
+              class="vxe-edit-col-middle"
+              disabled={_disabled}
+            ></el-checkbox>
+          </>
+        );
+      }
+    },
     {
       field: "parts_type",
       title: "配件",
@@ -1980,7 +2010,17 @@ export const useHooks = (t?: any) => {
   };
 
   const toDelMx = (tableRef: any) => {
-    const { $table } = getCurrentRecords(tableRef);
+    const { $table, curRecords } = getCurrentRecords(tableRef);
+    const { _mainData } = state.LjDetailRef;
+    for (const row of curRecords) {
+      if (!row.allow_edit && !_mainData.is_template) {
+        ElMessage({
+          type: "warning",
+          message: `非可编辑行,无法删除!`
+        });
+        return;
+      }
+    }
     ElMessageBox.confirm(`是否确定要删除明细吗?`, "询问", {
       confirmButtonText: t("common.delText"),
       cancelButtonText: "否",