소스 검색

feat: 公路后台清单规则,单价后,新增4列单价,分别为单价1、单价2、单价3、单价4

vian 1 일 전
부모
커밋
1521e0a374

+ 4 - 0
modules/all_models/stdBills_bills.js

@@ -34,6 +34,10 @@ const stdBills_bills = new Schema({
     kind: Number, // 前台里(重构、微前端)BRType: 1: 大项费用、 8:XMJ 4:清单
     erratumRecord: String, // 勘误记录
     unitPrice: Number, // 单价
+    unitPrice1: Number, // 单价1
+    unitPrice2: Number, // 单价2
+    unitPrice3: Number, // 单价3
+    unitPrice4: Number, // 单价4
     isBillBudget: Boolean, // 清单预算标记
     landType: String, // 土地类型
 },

+ 6 - 2
web/maintain/bills_lib/html/qingdan.html

@@ -1121,9 +1121,13 @@
                     sheet.setValue(i, 4, sheetBillsDatas.datasIdx['rowIdx'+ i].ruleText);
                     sheet.setValue(i, 5, sheetBillsDatas.datasIdx['rowIdx'+ i].engineerContent);
                     sheet.setValue(i, 6, sheetBillsDatas.datasIdx['rowIdx'+ i].unitPrice);
+                    sheet.setValue(i, 7, sheetBillsDatas.datasIdx['rowIdx'+ i].unitPrice1);
+                    sheet.setValue(i, 8, sheetBillsDatas.datasIdx['rowIdx'+ i].unitPrice2);
+                    sheet.setValue(i, 9, sheetBillsDatas.datasIdx['rowIdx'+ i].unitPrice3);
+                    sheet.setValue(i, 10, sheetBillsDatas.datasIdx['rowIdx'+ i].unitPrice4);
                     //sheet.setValue(i, 7, sheetBillsDatas.datasIdx['rowIdx'+ i].engineering);
-                    sheet.setValue(i, 7, sheetBillsDatas.datasIdx['rowIdx'+ i].fixedFlag);
-                    sheet.setValue(i, 8, sheetBillsDatas.datasIdx['rowIdx'+ i].landType);
+                    sheet.setValue(i, 11, sheetBillsDatas.datasIdx['rowIdx'+ i].fixedFlag);
+                    sheet.setValue(i, 12, sheetBillsDatas.datasIdx['rowIdx'+ i].landType);
                 }
                 else {
                     sheet.clear(i, 0, 1, sheet.getColumnCount(), GC.Spread.Sheets.SheetArea.viewport,GC.Spread.Sheets.StorageType.data);

+ 68 - 0
web/maintain/bills_lib/scripts/bills_lib_setting.js

@@ -139,6 +139,74 @@ var billsLibSetting = {
       },
       width: 80,
     },
+    {
+      head: {
+        titleNames: ["单价1"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "unitPrice1",
+        vAlign: 1,
+        hAlign: 2,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    {
+      head: {
+        titleNames: ["单价2"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "unitPrice2",
+        vAlign: 1,
+        hAlign: 2,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    {
+      head: {
+        titleNames: ["单价3"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "unitPrice3",
+        vAlign: 1,
+        hAlign: 2,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    {
+      head: {
+        titleNames: ["单价4"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "unitPrice4",
+        vAlign: 1,
+        hAlign: 2,
+        font: "Arial",
+      },
+      width: 80,
+    },
     /* {
             head: {
                 titleNames: ['工程专业'],

+ 13 - 4
web/maintain/bills_lib/scripts/db_controller.js

@@ -752,7 +752,8 @@ var dbController = {
                     alert('工程专业只能输入整数!');
                     return;
                 }
-            } else  */ if (field === "unitPrice") {
+            } else  */
+      if (['unitPrice', 'unitPrice1', 'unitPrice2', 'unitPrice3', 'unitPrice4'].includes(field)) {
         if (isNaN(args.editingText)) {
           args.sheet.setValue(
             args.row,
@@ -1262,7 +1263,7 @@ var tools = {
             if (!isNaN(value) && value % 1 === 0) {
               validData[setting.cols[j].data.field] = value;
             }
-          } else if (setting.cols[j].data.field === "unitPrice") {
+          } else if (['unitPrice', 'unitPrice1', 'unitPrice2', 'unitPrice3', 'unitPrice4'].includes(setting.cols[j].data.field)) {
             if (!isNaN(value)) {
               validData[setting.cols[j].data.field] = value;
             }
@@ -1638,9 +1639,13 @@ var tools = {
           ruleText = sheet.getValue(i, 4),
           engineerContent = sheet.getValue(i, 5),
           unitPrice = sheet.getValue(i, 6),
+          unitPrice1 = sheet.getValue(i, 7),
+          unitPrice2 = sheet.getValue(i, 8),
+          unitPrice3 = sheet.getValue(i, 9),
+          unitPrice4 = sheet.getValue(i, 10),
           // engineering = sheet.getValue(i, 7),
-          fixedFlag = sheet.getValue(i, 7),
-          landType = sheet.getValue(i, 8);
+          fixedFlag = sheet.getValue(i, 11),
+          landType = sheet.getValue(i, 12);
         let data = {
           kind: kind,
           code: code,
@@ -1650,6 +1655,10 @@ var tools = {
           engineerContent,
           landType,
           unitPrice,
+          unitPrice1,
+          unitPrice2,
+          unitPrice3,
+          unitPrice4,
           /* engineering: engineering, */ fixedFlag: fixedFlag,
           rowIdx: i,
         };