Browse Source

脚本&sql等

MaiXinRong 2 years ago
parent
commit
1ed7c36011
4 changed files with 17 additions and 12 deletions
  1. 4 0
      app/public/css/main.css
  2. 4 4
      config/web.js
  3. 4 6
      db_script/change.js
  4. 5 2
      sql/update.sql

+ 4 - 0
app/public/css/main.css

@@ -192,6 +192,10 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
 .in-4{padding-left:63px!important}
 .in-5{padding-left:84px!important}
 .in-6{padding-left:105px!important}
+.in-7{padding-left:126px!important}
+.in-8{padding-left:147px!important}
+.in-9{padding-left:168px!important}
+.in-10{padding-left:189px!important}
 /*滚动条*/
 /* 滚动条 */
 /*水平滚动条的样式*/

+ 4 - 4
config/web.js

@@ -60,8 +60,8 @@ const JsFiles = {
                     '/public/js/zh_calc.js',
                     '/public/js/PinYinOrder.bundle.js',
                     '/public/js/shares/tender_list_order.js',
-                    '/public/js/tender_showhide.js',
                     '/public/js/shares/show_level.js',
+                    '/public/js/tender_showhide.js',
                     '/public/js/tender_list.js',
                 ],
                 mergeFile: 'tender_list',
@@ -72,8 +72,8 @@ const JsFiles = {
                     '/public/js/zh_calc.js',
                     '/public/js/PinYinOrder.bundle.js',
                     '/public/js/shares/tender_list_order.js',
-                    '/public/js/tender_showhide.js',
                     '/public/js/shares/show_level.js',
+                    '/public/js/tender_showhide.js',
                     '/public/js/tender_list_info.js',
                 ],
                 mergeFile: 'tender_list_info',
@@ -84,8 +84,8 @@ const JsFiles = {
                     '/public/js/zh_calc.js',
                     '/public/js/PinYinOrder.bundle.js',
                     '/public/js/shares/tender_list_order.js',
-                    '/public/js/tender_showhide.js',
                     '/public/js/shares/show_level.js',
+                    '/public/js/tender_showhide.js',
                     '/public/js/tender_list_progress.js',
                 ],
                 mergeFile: 'tender_list_progress',
@@ -96,8 +96,8 @@ const JsFiles = {
                     '/public/js/zh_calc.js',
                     '/public/js/PinYinOrder.bundle.js',
                     '/public/js/shares/tender_list_order.js',
-                    '/public/js/tender_showhide.js',
                     '/public/js/shares/show_level.js',
+                    '/public/js/tender_showhide.js',
                     '/public/js/tender_list_manage.js',
                 ],
                 mergeFile: 'tender_list_manage',

+ 4 - 6
db_script/change.js

@@ -66,7 +66,7 @@ const checkStagePos = async function (stage, decimal, preStage) {
     for (const sp of stagePos) {
         const filterTimesOrder = stageChange.filter(x => {
             if (x.pid === sp.pid && !x.no_value) {
-                return x.times < sp.times || (x.stimes === sp.times && x.sorder <= sp.order);
+                return x.stimes < sp.times || (x.stimes === sp.times && x.sorder <= sp.order);
             } else {
                 return false;
             }
@@ -124,11 +124,9 @@ const checkStageBills = async function (stage, decimal, preStage) {
     const stageBills = await querySql(`SELECT * From ${billsTable} where sid = ?`, [stage.id]);
     for (const sb of stageBills) {
         const filterTimesOrder = stageChange.filter(x => {
-            if (x.lid === sb.lid && !x.no_value) {
-                return x.times < sb.times || (x.stimes === sb.times && x.sorder <= sb.order);
-            } else {
-                return false;
-            }
+            if (x.no_value) return false;
+            if (x.lid !== sb.lid) return false;
+            return x.stimes < sb.times || (x.stimes === sb.times && x.sorder <= sb.order);
         });
         const filterLatest = BaseUtil.filterLastestData(filterTimesOrder, ['pid', 'cbid'], 'stimes', 'sorder');
         if (filterLatest.length === 0) continue;

+ 5 - 2
sql/update.sql

@@ -84,7 +84,8 @@ CREATE TABLE `zh_revise_price` (
 CREATE TABLE `zh_stage_bills_pc` (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `tid` int(11) unsigned NOT NULL COMMENT '标段id',
-  `sid` int(11) NOT NULL,
+  `sid` int(11) UNSIGNED NOT NULL COMMENT '期id',
+  `sorder` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '第几期'
   `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT '项目节id',
   `org_price` decimal(24,8) NOT NULL DEFAULT 0 COMMENT '原单价',
   `unit_price` decimal(24,8) NOT NULL DEFAULT 0 COMMENT '本期单价',
@@ -524,4 +525,6 @@ CREATE TABLE `zh_glj_lib_list` (
   `remark` varchar(60) DEFAULT '' COMMENT '备注',
   `create_time` int(10) NOT NULL COMMENT '创建时间',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工料机列表数据表';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工料机列表数据表';
+
+INSERT INTO `calculation`.`zh_permission` (`id`, `name`, `controller`, `action`, `pid`, `icon_class`, `create_time`, `isshow`) VALUES ('73', '工料机库', 'glj-lib', 'all', '44', '', '13', '1');