Browse Source

奖罚金、其他,新增类型列

MaiXinRong 5 years ago
parent
commit
a03c79fe13

+ 1 - 0
app/public/js/se_bonus.js

@@ -43,6 +43,7 @@ $(document).ready(() => {
     const spreadSetting = {
         cols: [
             {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 235, formatter: '@', readOnly: isPre, },
+            {title: '类型', colSpan: '1', rowSpan: '1', field: 'b_type', hAlign: 0, width: 40, formatter: '@', readOnly: isPre, },
             {title: '金额', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 100, type: 'Number', readOnly: isPre, },
             {
                 title: '时间', colSpan: '1', rowSpan: '1', field: 'real_time', hAlign: 2, width: 150, readOnly: true,

+ 1 - 0
app/public/js/se_other.js

@@ -16,6 +16,7 @@ $(document).ready(() => {
     const otherSpreadSetting = {
         cols: [
             {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 235, formatter: '@'},
+            {title: '类型', colSpan: '1', rowSpan: '1', field: 'o_type', hAlign: 0, width: 40, formatter: '@'},
             {title: '金额', colSpan: '1', rowSpan: '1', field: 'total_price', hAlign: 2, width: 100, type: 'Number'},
             {title: '本期金额', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 100, type: 'Number'},
             {title: '截止本期金额', colSpan: '1', rowSpan: '1', field: 'end_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},

+ 2 - 1
app/service/stage_bonus.js

@@ -65,6 +65,7 @@ module.exports = app => {
                     name: d.name,
                     order: d.order,
                 };
+                nd.b_type = d.b_type ? d.b_type : null;
                 nd.tp = d.tp ? this.ctx.helper.round(d.to, this.ctx.tender.info.decimal.tp) : 0;
                 nd.code = d.code ? d.code: null;
                 nd.proof = d.proof ? d.proof : null;
@@ -100,6 +101,7 @@ module.exports = app => {
 
                 const nd = {id: od.id};
                 if (d.name !== undefined) nd.name = d.name;
+                if (d.b_type !== undefined) nd.b_type = d.b_type;
                 if (d.tp !== undefined) nd.tp = this.ctx.helper.round(d.tp, this.ctx.tender.info.decimal.tp);
                 if (d.code !== undefined) nd.code = d.code;
                 if (d.proof !== undefined) nd.proof = d.proof;
@@ -108,7 +110,6 @@ module.exports = app => {
                 if (d.order !== undefined) nd.order = d.order;
                 if (d.doc_co !== undefined) nd.doc_co = d.doc_co;
                 uDatas.push(nd);
-                console.log(nd);
             }
             if (uDatas.length > 0) {
                 await this.db.updateRows(this.tableName, uDatas);

+ 2 - 0
app/service/stage_other.js

@@ -67,6 +67,7 @@ module.exports = app => {
                 nd.name = d.name;
                 nd.order = d.order;
 
+                if (d.o_type) nd.o_type = d.o_type;
                 if (d.total_price) nd.total_price = this.ctx.helper.round(d.total_price, this.ctx.tender.info.decimal.tp);
                 if (d.tp) nd.tp = this.ctx.helper.round(d.tp, this.ctx.tender.info.decimal.tp);
                 if (d.real_time) nd.real_time = d.real_time;
@@ -104,6 +105,7 @@ module.exports = app => {
                     nd.name = d.name;
                 }
                 if (d.order !== undefined) nd.order = d.order;
+                if (d.o_type !== undefined) nd.o_type = d.o_type;
                 if (d.total_price !== undefined) {
                     if (od.pre_used) throw '往期已使用,不可修改金额';
                     nd.total_price = this.ctx.helper.round(d.total_price, this.ctx.tender.info.decimal.tp);

+ 2 - 0
builder_report_index_define.js

@@ -76,6 +76,7 @@ const stage_bonus = {
         { name: '排序', field: 'order', type: dataType.int },
         { name: '编号', field: 'code', type: dataType.str},
         { name: '发文单位', field: 'doc_co', type: dataType.str},
+        { name: '类型', field: 'b_type', type: dataType.str },
     ],
 };
 const stage_other = {
@@ -102,6 +103,7 @@ const stage_other = {
         { name: '排序', field: 'order', type: dataType.int },
         { name: '往期是否已用', field: 'pre_used', type: dataType.int },
         { name: '截止上期-金额', field: 'pre_tp', type: dataType.currency, tag: { type: 'tp' } },
+        { name: '类型', field: 'o_type', type: dataType.str },
     ],
 };
 // 变更令

+ 8 - 0
sql/update.sql

@@ -1 +1,9 @@
 ALTER TABLE `zh_tender_info` ADD `pay_account` VARCHAR(5000) NULL DEFAULT NULL COMMENT '付款账号' AFTER `chapter`;
+
+ALTER TABLE `zh_stage_bonus`
+ADD COLUMN `b_type`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '类型' AFTER `name`;
+
+ALTER TABLE `zh_stage_other`
+ADD COLUMN `o_type`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '类型' AFTER `name`;
+
+