Browse Source

新增自定义备注列相关

MaiXinRong 3 years ago
parent
commit
14b889a0ff

+ 9 - 0
app/const/setting.js

@@ -29,6 +29,14 @@ const loginWay = {
     extraPsw: 1, // 副密码登录
 };
 
+const sjsRela = {
+    ledgerCol: [
+        { field: 'ex_memo1', name: '备注1', show: 0, alias: '', hint: '该列显示于名称之前' },
+        { field: 'ex_memo2', name: '备注2', show: 0, alias: '', hint: '该列显示于备注之后' },
+        { field: 'ex_memo3', name: '备注3', show: 0, alias: '', hint: '该列显示于备注之后' },
+    ]
+};
+
 module.exports = {
     cType: {
         key: cType,
@@ -36,4 +44,5 @@ module.exports = {
     },
     listPath,
     loginWay,
+    sjsRela,
 };

+ 17 - 1
app/const/spread.js

@@ -23,6 +23,7 @@ const withCl = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
@@ -38,7 +39,9 @@ const withCl = {
             {title: '台账小计|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
-            {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'}
+            {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            {title: 'ex_memo2', colSpan: '1', rowSpan: '2', field: 'ex_memo2', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            {title: 'ex_memo3', colSpan: '1', rowSpan: '2', field: 'ex_memo3', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
         ],
         emptyRows: 3,
         headRows: 2,
@@ -50,12 +53,15 @@ const withCl = {
     pos: {
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 230, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@'},
             {title: '台账数量|设计量', colSpan: '4|1', rowSpan: '1|1', field: 'sgfh_qty', hAlign: 2, width: 100, type: 'Number'},
             {title: '|设计错漏增减', colSpan: '|1', rowSpan: '|1', field: 'sjcl_qty', hAlign: 2, width: 100, type: 'Number'},
             {title: '|其他错漏增减', colSpan: '|1', rowSpan: '|1', field: 'qtcl_qty', hAlign: 2, width: 100, type: 'Number'},
             {title: '|小计', colSpan: '|1', rowSpan: '|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '图册号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
+            {title: 'ex_memo2', colSpan: '1', rowSpan: '2', field: 'ex_memo2', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            {title: 'ex_memo3', colSpan: '1', rowSpan: '2', field: 'ex_memo3', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
         ],
         emptyRows: 3,
         headRows: 2,
@@ -71,6 +77,7 @@ const withoutCl = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
@@ -92,6 +99,7 @@ const withoutCl = {
     pos: {
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 230, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@'},
             {title: '设计量', colSpan: '1', rowSpan: '1', field: 'sgfh_qty', hAlign: 2, width: 120, type: 'Number'},
             {title: '图册号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
@@ -110,6 +118,7 @@ const withClGcl = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
@@ -142,6 +151,7 @@ const withoutClGcl = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
@@ -169,6 +179,7 @@ const stageTz = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@', readOnly: true},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
@@ -210,6 +221,7 @@ const stageTz = {
     pos: {
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 180, formatter: '@', readOnly: true},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@', readOnly: true},
             {title: '台账数量', colSpan: '1', rowSpan: '2', field: 'quantity', hAlign: 2, width: 60, formatter: '@', readOnly: true},
             {title: '现场实际数量', colSpan: '1', rowSpan: '2', field: 'real_qty', hAlign: 2, width: 60, type: 'Number'},
@@ -239,6 +251,7 @@ const stageCl = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@', readOnly: true},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
@@ -281,6 +294,7 @@ const stageCl = {
     pos: {
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 180, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@'},
             {title: '台账数量|施工图复核', colSpan: '4|1', rowSpan: '1|1', field: 'sgfh_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '|设计错漏增减', colSpan: '1', rowSpan: '|1', field: 'sjcl_qty', hAlign: 2, width: 60, type: 'Number'},
@@ -314,6 +328,7 @@ const stageNoCl = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@', readOnly: true},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
@@ -357,6 +372,7 @@ const stageNoCl = {
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 180, formatter: '@'},
             {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@'},
+            {title: 'ex_memo1', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '设计量', colSpan: '1', rowSpan: '2', field: 'sgfh_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '现场实际数量', colSpan: '1', rowSpan: '2', field: 'real_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '预计变更数量', colSpan: '1', rowSpan: '2', field: 'estimate_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},

+ 2 - 0
app/controller/ledger_audit_controller.js

@@ -69,6 +69,8 @@ module.exports = app => {
                     measureType,
                 };
                 const [ledgerSpread, posSpread] = this._getSpreadSetting();
+                const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
+                this.ctx.helper.refreshSpreadShow(sjsRela.ledgerCol, [ledgerSpread, posSpread]);
 
                 const curAuditor = await ctx.service.ledgerAudit.getCurAuditor(ctx.tender.id, ctx.tender.data.ledger_times);
                 if (!curAuditor && (ctx.tender.data.ledger_status !== auditConst.status.checkNo && ctx.tender.data.ledger_status !== auditConst.status.checked)) {

+ 8 - 1
app/controller/ledger_controller.js

@@ -119,6 +119,7 @@ module.exports = app => {
             if (!tender.info.display.ledger.dgnQty) {
                 removeFieldCols(ledger, spreadConst.filterCols.dgnCols);
             }
+
             return [ledger, pos];
         }
 
@@ -131,7 +132,9 @@ module.exports = app => {
         async explode(ctx) {
             try {
                 const tender = ctx.tender;
-                const [ledgerSpread, posSpread] = this._getSpreadSetting();
+                const [ledgerSpread, posSpread] = await this._getSpreadSetting();
+                const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
+                this.ctx.helper.refreshSpreadShow(sjsRela.ledgerCol, [ledgerSpread, posSpread]);
                 const times = tender.data.ledger_status === auditConst.status.checkNo ? tender.data.ledger_times - 1 : tender.data.ledger_times;
 
                 const curAuditor = await ctx.service.ledgerAudit.getCurAuditor(tender.id, tender.data.ledger_times);
@@ -669,9 +672,13 @@ module.exports = app => {
          */
         async bwtz(ctx) {
             try {
+                const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
                 const renderData = {
                     tender: ctx.tender.data,
                     jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.ledger.bwtz),
+                    ex_memo1: sjsRela.ledgerCol.find(x => { return x.field === 'ex_memo1'; }),
+                    ex_memo2: sjsRela.ledgerCol.find(x => { return x.field === 'ex_memo2'; }),
+                    ex_memo3: sjsRela.ledgerCol.find(x => { return x.field === 'ex_memo3'; }),
                 };
                 await this.layout('ledger/bwtz.ejs', renderData);
             } catch (err) {

+ 4 - 0
app/controller/revise_controller.js

@@ -265,6 +265,8 @@ module.exports = app => {
             //     ? JSON.parse(await fs.readFileSync(this.ctx.app.config.filePath + revise.pos_file, 'utf8'))
             //     : await ctx.service.revisePos.getData(ctx.tender.id);
             const [ledgerSpread, posSpread] = this._getSpreadSetting(revise);
+            const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
+            this.ctx.helper.refreshSpreadShow(sjsRela.ledgerCol, [ledgerSpread, posSpread]);
             const [stdBills, stdChapters] = await this.ctx.service.valuation.getValuationStdList(
                 ctx.tender.data.valuation, ctx.tender.data.measure_type);
             const curAuditor = await ctx.service.reviseAudit.getCurAuditor(revise.id, revise.times);
@@ -489,6 +491,8 @@ module.exports = app => {
                 // const reviseBills = await ctx.service.ledger.getData(ctx.tender.id);
                 // const revisePos = await ctx.service.pos.getPosData({tid: ctx.tender.id});
                 const [ledgerSpread, posSpread] = this._getSpreadSetting(revise);
+                const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
+                this.ctx.helper.refreshSpreadShow(sjsRela.ledgerCol, [ledgerSpread, posSpread]);
                 ledgerSpread.readOnly = true;
                 posSpread.readOnly = true;
                 const historyRevise = await ctx.service.ledgerRevise.getAllReviseList(ctx.tender.id);

+ 14 - 2
app/controller/setting_controller.js

@@ -647,7 +647,8 @@ module.exports = app => {
                     throw '没有访问权限';
                 }
                 const showList = await ctx.service.settingShow.getList(projectData.page_path);
-                const renderData = { projectData, showList };
+                const sjsRela = await ctx.service.project.getSjsRela(projectId);
+                const renderData = { projectData, showList, sjsRela };
                 await this.layout('setting/show.ejs', renderData);
             } catch (error) {
                 this.log(error);
@@ -675,6 +676,18 @@ module.exports = app => {
             }
         }
 
+        async showSjsUpdate(ctx) {
+            try {
+                const projectId = ctx.session.sessionProject.id;
+                const data = JSON.parse(ctx.request.body.data);
+                const result = await ctx.service.project.updateSjsRela(projectId, data.sub, data.field, data.key, data.value);
+                ctx.body = { err: 0, msg: '', data: result };
+            } catch (err) {
+                this.log(err);
+                this.ajaxErrorBody(error, '保存数据失败');
+            }
+        }
+
         async logs(ctx) {
             try {
                 // 获取项目数据
@@ -815,7 +828,6 @@ module.exports = app => {
                 if (ctx.session.sessionUser.is_admin === 0) throw '没有访问权限';
 
                 const data = JSON.parse(ctx.request.body.data);
-                console.log(data);
                 if (!data.type || data.status === undefined) throw '提交数据错误';
 
                 const responseData = { err: 0, msg: '', data: null };

+ 6 - 0
app/controller/stage_controller.js

@@ -181,6 +181,8 @@ module.exports = app => {
                 await this._getStageAuditViewData(ctx);
                 const renderData = await this._getDefaultRenderData(ctx);
                 [renderData.ledgerSpread, renderData.posSpread] = this._getSpreadSetting();
+                const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
+                this.ctx.helper.refreshSpreadShow(sjsRela.ledgerCol, [renderData.ledgerSpread, renderData.posSpread]);
                 renderData.changeConst = changeConst;
                 renderData.jsFiles = this.app.jsFiles.common.concat(this.app.jsFiles.stage.index);
                 renderData.whiteList = this.ctx.app.config.multipart.whitelist;
@@ -1263,6 +1265,10 @@ module.exports = app => {
                 await this._getStageAuditViewData(ctx);
                 const renderData = await this._getDefaultRenderData(ctx);
                 renderData.jsFiles = this.app.jsFiles.common.concat(this.app.jsFiles.stage.bwtz);
+                const sjsRela = await this.ctx.service.project.getSjsRela(ctx.session.sessionProject.id);
+                renderData.ex_memo1 = sjsRela.ledgerCol.find(x => { return x.field === 'ex_memo1'; });
+                renderData.ex_memo2 = sjsRela.ledgerCol.find(x => { return x.field === 'ex_memo2'; });
+                renderData.ex_memo3 = sjsRela.ledgerCol.find(x => { return x.field === 'ex_memo3'; });
                 await this.layout('stage/bwtz.ejs', renderData, 'stage/audit_modal.ejs');
             } catch (err) {
                 this.log(err);

+ 23 - 0
app/extend/helper.js

@@ -1362,4 +1362,27 @@ module.exports = {
             });
         });
     },
+
+    refreshSpreadShow(sjsRela, sjsSetting) {
+        function removeFieldCols(setting, cols) {
+            _.remove(setting.cols, function(c) {
+                return cols.indexOf(c.field) > -1;
+            });
+        }
+        const sjsSettings = sjsSetting instanceof Array ? sjsSetting : [sjsSetting];
+        for (const field of sjsRela) {
+            if (field.show) {
+                for (const ss of sjsSetting) {
+                    const lCol = ss.cols.find(x => {
+                        return x.field === field.field;
+                    });
+                    if (lCol) lCol.title = field.alias || field.name;
+                }
+            } else {
+                for (const ss of sjsSetting) {
+                    removeFieldCols(ss, [field.field]);
+                }
+            }
+        }
+    }
 };

+ 17 - 1
app/lib/bills_pos_convert.js

@@ -69,7 +69,8 @@ class BillsPosConvert {
 
     _convertXmj(data) {
         const xmj = this.resultTree.addData(data, ['ledger_id', 'ledger_pid', 'order', 'level', 'tender_id', 'full_path',
-            'code', 'name', 'unit', 'dgn_qty1', 'dgn_qty2', 'drawing_code', 'postil', 'memo', 'gxby_status', 'dagl_status', 'dagl_url']);
+            'code', 'name', 'unit', 'dgn_qty1', 'dgn_qty2', 'drawing_code', 'postil', 'memo', 'gxby_status', 'dagl_status', 'dagl_url',
+            'ex_memo1', 'ex_memo2', 'ex_memo3']);
         return xmj;
     }
     // v1
@@ -130,6 +131,9 @@ class BillsPosConvert {
                     posUnit.drawing_code.push(p.drawing_code);
                 if (p.memo) posUnit.memo.push(p.memo);
                 if (p.postil) posUnit.postil.push(p.postil);
+                if (p.ex_memo1) posUnit.ex_memo1.push(p.ex_memo1);
+                if (p.ex_memo2) posUnit.ex_memo2.push(p.ex_memo2);
+                if (p.ex_memo3) posUnit.ex_memo3.push(p.ex_memo3);
 
                 const gclUnit = xmj.unitTree.addNode({pos_name: '',
                     b_code: node.b_code, name: node.name, unit: node.unit, unit_price: node.unit_price
@@ -138,6 +142,9 @@ class BillsPosConvert {
                     gclUnit.drawing_code.push(node.drawing_code);
                 if (node.memo) gclUnit.memo.push(node.memo);
                 if (node.postil) gclUnit.postil.push(node.postil);
+                if (node.ex_memo1) gclUnit.ex_memo1.push(node.ex_memo1);
+                if (node.ex_memo2) gclUnit.ex_memo2.push(node.ex_memo2);
+                if (node.ex_memo3) gclUnit.ex_memo3.push(node.ex_memo3);
 
                 //loadField(gclUnit, p, baseCalcFields);
                 this._loadPosCalcFields(gclUnit, p);
@@ -157,6 +164,9 @@ class BillsPosConvert {
                 unit.drawing_code.push(node.drawing_code);
             if (node.memo) unit.memo.push(node.memo);
             if (node.postil) unit.postil.push(node.postil);
+            if (node.ex_memo1) unit.ex_memo1.push(node.ex_memo1);
+            if (node.ex_memo2) unit.ex_memo2.push(node.ex_memo2);
+            if (node.ex_memo3) unit.ex_memo3.push(node.ex_memo3);
 
             this._loadBillsCalcFields(unit, node);
             if (!unit.changes) unit.changes = [];
@@ -261,6 +271,12 @@ class BillsPosConvert {
                 node.drawing_code_merge = node.drawing_code.join(mergeChar);
             if (node.memo && node.memo.length > 0)
                 node.memo_merge = node.memo.join(mergeChar);
+            if (node.ex_memo1 && node.ex_memo1.length > 0)
+                node.ex_memo1_merge = node.ex_memo1.join(mergeChar);
+            if (node.ex_memo2 && node.ex_memo2.length > 0)
+                node.ex_memo2_merge = node.ex_memo2.join(mergeChar);
+            if (node.ex_memo3 && node.ex_memo3.length > 0)
+                node.ex_memo3_merge = node.ex_memo3.join(mergeChar);
             if (node.postil && node.postil.length > 0)
                 node.postil_merge = node.postil.join(mergeChar);
         }

+ 3 - 1
app/lib/ledger.js

@@ -354,7 +354,6 @@ class filterTree extends baseTree {
 }
 
 class filterGatherTree extends baseTree {
-
     clearDatas() {
         this.items = {};
         this.nodes = [];
@@ -378,6 +377,9 @@ class filterGatherTree extends baseTree {
         item = data;
         item.drawing_code = [];
         item.memo = [];
+        item.ex_memo1 = [];
+        item.ex_memo2 = [];
+        item.ex_memo3 = [];
         item.postil = [];
         item[this.setting.id] = this.newId;
         const keyName = itemsPre + item[this.setting.id];

+ 13 - 10
app/public/js/stage.js

@@ -917,7 +917,7 @@ $(document).ready(() => {
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);
                         return;
                     }
-                } else if (col.field !== 'postil' && col.field !== 'memo') {
+                } else if (['postil', 'memo', 'ex_memo1', 'ex_memo2', 'ex_memo3'].indexOf(col.field) === -1) {
                     if (node.children && node.children.length > 0) {
                         toastr.error('清单父项不可计量');
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);
@@ -932,7 +932,7 @@ $(document).ready(() => {
                     }
                 }
 
-                if (col.field === 'memo') {
+                if (['memo', 'ex_memo1', 'ex_memo2', 'ex_memo3'].indexOf(col.field) >= 0) {
                     updateData.main = {
                         id: node.id
                     };
@@ -1024,7 +1024,7 @@ $(document).ready(() => {
                                     dgnData[colSetting.field] = 0;
                                     filterDgn = false;
                                 }
-                            } else if (colSetting.field === 'memo') {
+                            } else if (['memo', 'ex_memo1', 'ex_memo2', 'ex_memo3'].indexOf(colSetting.field) >= 0) {
                                 mainData[colSetting.field] = null;
                                 filterMain = false;
                             } else {
@@ -1063,11 +1063,10 @@ $(document).ready(() => {
             if (info.sheet.zh_setting) {
                 const setting = info.sheet.zh_setting;
                 const range = info.cellRange;
-                const stageField = ['contract_qty', 'contract_tp', 'qc_qty', 'postil'];
+                const validField = ['contract_qty', 'contract_tp', 'qc_qty', 'postil'].concat(['memo', 'ex_memo1', 'ex_memo2', 'ex_memo3'], setting.dgnUpFields);
                 for (let iCol = range.col; iCol < range.col + range.colCount; iCol++) {
                     const col = info.sheet.zh_setting.cols[iCol];
-                    if ((stageField.indexOf(col.field) === -1) && setting.dgnUpFields.indexOf(col.field) === -1
-                        && col.field !== 'memo') {
+                    if ((validField.indexOf(col.field) === -1)) {
                         toastr.error('不可修改此数据');
                         info.cancel = true;
                         return;
@@ -1098,7 +1097,7 @@ $(document).ready(() => {
 
                         if (setting.dgnUpFields.indexOf(col.field) !== -1) {
                             if (node.b_code && node.b_code !== '') continue;
-                        } else if (col.field !== 'postil') {
+                        } else if (['postil', 'memo', 'ex_memo1', 'ex_memo2', 'ex_memo3'].indexOf(col.field) === -1) {
                             if (node.children && node.children.length > 0) continue;
                             const nodePos = stagePos.getLedgerPos(node.id);
                             if (nodePos && nodePos.length > 0) continue;
@@ -1118,8 +1117,8 @@ $(document).ready(() => {
                                     toastMessageUniq(pasteHint.invalidExpr);
                                 }
                             }
-                        } else if (col.field === 'memo') {
-                            mainData.memo = text;
+                        } else if (['memo', 'ex_memo1', 'ex_memo2', 'ex_memo3'].indexOf(col.field) >= 0) {
+                            mainData[col.field] = text;
                             filterMain = false;
                         } else {
                             if (col.type === 'Number') {
@@ -1667,6 +1666,10 @@ $(document).ready(() => {
                     }
                 } else if (!posData) {
                     toastr.warning('新增计量单元请先输入名称');
+                } else if (['ex_memo1', 'ex_memo2', 'ex_memo3'].indexOf(col.field) >= 0) {
+                    data.updateType = 'update';
+                    data.updateData = {pid: posData.id, lid: posData.lid};
+                    data.updateData[col.field] = newText;
                 } else {
                     data.updateType = 'update';
                     data.updateData = {pid: posData.id, lid: posData.lid};
@@ -1730,7 +1733,7 @@ $(document).ready(() => {
             if (info.sheet.zh_setting) {
                 const sortData = info.sheet.zh_data;
                 const range = info.cellRange;
-                const validField = ['contract_qty', 'qc_qty', 'postil', 'real_qty'];
+                const validField = ['contract_qty', 'qc_qty', 'postil', 'real_qty', 'ex_memo1', 'ex_memo2', 'ex_memo3'];
                 if (!checkTzMeasureType()) {
                     validField.push('name', 'sgfh_qty', 'sjcl_qty', 'qtcl_qty', 'position', 'drawing_code');
                 }

+ 1 - 0
app/router.js

@@ -76,6 +76,7 @@ module.exports = app => {
     // 显示设置
     app.get('/setting/show', sessionAuth, 'settingController.show');
     app.post('/setting/show/update', sessionAuth, 'settingController.showListUpdate');
+    app.post('/setting/show/update-sjs', sessionAuth, 'settingController.showSjsUpdate');
 
     // 标段自定义类别
     app.get('/setting/category', sessionAuth, 'settingController.category');

+ 4 - 4
app/service/ledger_revise.js

@@ -100,12 +100,12 @@ module.exports = app => {
                 '     quantity, total_price, unit_price, drawing_code, memo, dgn_qty1, dgn_qty2, deal_qty, deal_tp,' +
                 '     sgfh_qty, sgfh_tp, sjcl_qty, sjcl_tp, qtcl_qty, qtcl_tp, node_type, crid, tender_id, is_tp,' +
                 '     sgfh_expr, sjcl_expr, qtcl_expr, check_calc,' +
-                '     gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit)' +
+                '     gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit, ex_memo1, ex_memo2, ex_memo3)' +
                 '  Select id, code, b_code, name, unit, source, remark, ledger_id, ledger_pid, level, `order`, full_path, is_leaf,' +
                 '      quantity, total_price, unit_price, drawing_code, memo, dgn_qty1, dgn_qty2, deal_qty, deal_tp,' +
                 '      sgfh_qty, sgfh_tp, sjcl_qty, sjcl_tp, qtcl_qty, qtcl_tp, node_type, crid, tender_id, is_tp,' +
                 '      sgfh_expr, sjcl_expr, qtcl_expr, 0,' +
-                '      gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit' +
+                '      gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit, ex_memo1, ex_memo2, ex_memo3' +
                 '  From ' + this.ctx.service.ledger.tableName +
                 '  Where `tender_id` = ?';
             const sqlParam = [tid];
@@ -117,11 +117,11 @@ module.exports = app => {
                 '  (id, tid, lid, name, drawing_code, quantity, add_stage, add_times, add_user,' +
                 '     sgfh_qty, sjcl_qty, qtcl_qty, crid, in_time, porder, position,' +
                 '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty,' +
-                '     gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit)' +
+                '     gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit, ex_memo1, ex_memo2, ex_memo3)' +
                 '  Select id, tid, lid, name, drawing_code, quantity, add_stage, add_times, add_user,' +
                 '     sgfh_qty, sjcl_qty, qtcl_qty, crid, in_time, porder, position,' +
                 '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty,' +
-                '     gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit' +
+                '     gxby_status, dagl_status, dagl_url, gxby_limit, dagl_limit, ex_memo1, ex_memo2, ex_memo3' +
                 '  From ' + this.ctx.service.pos.tableName +
                 '  Where `tid` = ?';
             const sqlParam = [tid];

+ 4 - 3
app/service/pos.js

@@ -29,7 +29,8 @@ module.exports = app => {
                 where: condition,
                 columns: ['id', 'tid', 'lid', 'name', 'quantity', 'position', 'drawing_code', 'sgfh_qty', 'sjcl_qty',
                     'qtcl_qty', 'in_time', 'porder', 'add_stage', 'sgfh_expr', 'sjcl_expr', 'qtcl_expr', 'real_qty',
-                    'dagl_status', 'dagl_url', 'gxby_status', 'gxby_limit', 'dagl_limit', 'dagl_status'],
+                    'dagl_status', 'dagl_url', 'gxby_status', 'gxby_limit', 'dagl_limit', 'dagl_status',
+                    'ex_memo1', 'ex_memo2', 'ex_memo3'],
                 order: [['porder', 'ASC']],
             });
         }
@@ -38,7 +39,7 @@ module.exports = app => {
             const sql = 'SELECT p.id, p.tid, p.lid, p.name, p.quantity, p.position, p.drawing_code,' +
                 '    p.sgfh_qty, p.sjcl_qty, p.qtcl_qty, p.porder, p.add_stage, p.add_times, p.add_user, s.order As add_stage_order,' +
                 '    p.sgfh_expr, p.sjcl_expr, p.qtcl_expr, p.real_qty, p.gxby_status, p.dagl_status, p.dagl_url,' +
-                '    p.gxby_limit, p.dagl_limit' +
+                '    p.gxby_limit, p.dagl_limit, p.ex_memo1, p.ex_memo2, p.ex_memo3' +
                 '  FROM ' + this.tableName + ' p ' +
                 '  LEFT JOIN ' + this.ctx.service.stage.tableName + ' s' +
                 '  ON p.add_stage = s.id'
@@ -50,7 +51,7 @@ module.exports = app => {
             if (ids instanceof Array && ids.length > 0) {
                 const sql = 'SELECT id, tid, lid, name, quantity, position, drawing_code,' +
                     '    sgfh_qty, sjcl_qty, qtcl_qty, add_stage, add_times, add_user, sgfh_expr, sjcl_expr, qtcl_expr, real_qty,' +
-                    '    dagl_status, dagl_url, gxby_status, gxby_limit, dagl_limit' +
+                    '    dagl_status, dagl_url, gxby_status, gxby_limit, dagl_limit, ex_memo1, ex_memo2, ex_memo3' +
                     '  FROM ' + this.tableName +
                     '  WHERE id in (' + this.ctx.helper.getInArrStrSqlFilter(ids) + ')';
                 return await this.db.query(sql, []);

+ 18 - 0
app/service/project.js

@@ -12,6 +12,7 @@ const defaultFunRela = {
     banOver: false,
     imType: imType.zl.value,
 };
+const sjsRelaConst = require('../const/setting').sjsRela;
 
 module.exports = app => {
 
@@ -171,6 +172,23 @@ module.exports = app => {
             });
             return result.affectedRows === 1;
         }
+
+        async getSjsRela(id) {
+            const projectData = await this.db.get(this.tableName, { id });
+            const result = projectData.sjs_rela ? JSON.parse(projectData.sjs_rela) : {};
+            this.ctx.helper._.defaults(result, sjsRelaConst);
+            return result;
+        }
+
+        async updateSjsRela(id, sub, field, key, value) {
+            const sjsRela = await this.getSjsRela(id);
+            if (!sjsRela[sub]) throw '数据异常';
+            const sjsField = sjsRela[sub].find(x => { return x.field === field; });
+            if (!sjsField) throw '数据异常';
+            sjsField[key] = value;
+            await this.db.update(this.tableName, { id: id, sjs_rela: JSON.stringify(sjsRela) });
+            return sjsField;
+        }
     }
 
     return Project;

+ 8 - 4
app/service/revise_audit.js

@@ -311,12 +311,14 @@ module.exports = app => {
                 '     quantity, total_price, unit_price, drawing_code, memo, dgn_qty1, dgn_qty2, deal_qty, deal_tp,' +
                 '     sgfh_qty, sgfh_tp, sjcl_qty, sjcl_tp, qtcl_qty, qtcl_tp, node_type, crid, tender_id, is_tp,' +
                 '     sgfh_expr, sjcl_expr, qtcl_expr, check_calc,' +
-                '     gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit)' +
+                '     gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit,' +
+                '     ex_memo1, ex_memo2, ex_memo3)' +
                 '  Select id, code, b_code, name, unit, source, remark, ledger_id, ledger_pid, level, `order`, full_path, is_leaf,' +
                 '      quantity, total_price, unit_price, drawing_code, memo, dgn_qty1, dgn_qty2, deal_qty, deal_tp,' +
                 '      sgfh_qty, sgfh_tp, sjcl_qty, sjcl_tp, qtcl_qty, qtcl_tp, node_type, crid, tender_id, is_tp, ' +
                 '      sgfh_expr, sjcl_expr, qtcl_expr, check_calc,' +
-                '      gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit' +
+                '      gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit,' +
+                '      ex_memo1, ex_memo2, ex_memo3' +
                 '  From ' +
                 this.ctx.service.reviseBills.tableName +
                 '  Where `tender_id` = ?';
@@ -328,11 +330,13 @@ module.exports = app => {
                 '  (id, tid, lid, name, drawing_code, quantity, add_stage, add_times, add_user,' +
                 '     sgfh_qty, sjcl_qty, qtcl_qty, crid, porder, position, ' +
                 '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty,' +
-                '     gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit)' +
+                '     gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit,' +
+                '     ex_memo1, ex_memo2, ex_memo3)' +
                 '  Select id, tid, lid, name, drawing_code, quantity, add_stage, add_times, add_user,' +
                 '     sgfh_qty, sjcl_qty, qtcl_qty, crid, porder, position,' +
                 '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty,' +
-                '     gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit' +
+                '     gxby_status, dagl_status, dagl_url, gxby_limit,  dagl_limit,' +
+                '     ex_memo1, ex_memo2, ex_memo3' +
                 '  From ' +
                 this.ctx.service.revisePos.tableName +
                 '  Where `tid` = ?';

+ 1 - 1
app/service/revise_pos.js

@@ -26,7 +26,7 @@ module.exports = app => {
         async getPosData(condition) {
             const sql = 'SELECT p.id, p.tid, p.lid, p.name, p.quantity, p.position, p.drawing_code, p.sgfh_qty, ' +
                 '    p.sjcl_qty, p.qtcl_qty, p.porder, p.add_stage, p.add_times, p.add_user, s.order As add_stage_order,' +
-                '    p.sgfh_expr, p.sjcl_expr, p.qtcl_expr ' +
+                '    p.sgfh_expr, p.sjcl_expr, p.qtcl_expr, p.ex_memo1, p.ex_memo2, p.ex_memo3 ' +
                 '  FROM ' + this.tableName + ' p ' +
                 '  LEFT JOIN ' + this.ctx.service.stage.tableName + ' s' +
                 '  ON add_stage = s.id'

+ 4 - 0
app/service/stage_pos.js

@@ -271,6 +271,7 @@ module.exports = app => {
                 if (d.name !== undefined || d.drawing_code !== undefined || d.position !== undefined
                     || d.sgfh_qty !== undefined || d.qtcl_qty !== undefined || d.sjcl_qty !== undefined
                     || d.real_qty !== undefined
+                    || d.ex_memo1 !== undefined || d.ex_memo2 !== undefined || d.ex_memo3 !== undefined
                 ) {
                     const op = this._.find(orgPos, {id: d.pid});
                     if (op.add_stage !== this.ctx.stage.id && (
@@ -293,6 +294,9 @@ module.exports = app => {
                     }
                     if (d.drawing_code !== undefined) p.drawing_code = d.drawing_code;
                     if (d.real_qty !== undefined) p.real_qty = this.ctx.helper.round(d.real_qty, precision.value);
+                    if (d.ex_memo1 !== undefined) p.ex_memo1 = d.ex_memo1;
+                    if (d.ex_memo2 !== undefined) p.ex_memo2 = d.ex_memo2;
+                    if (d.ex_memo3 !== undefined) p.ex_memo3 = d.ex_memo3;
                     updatePos.push(p);
                 }
 

+ 19 - 1
app/view/ledger/bwtz.ejs

@@ -95,6 +95,9 @@
     const xmjSpreadSetting = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
+            <% if (ex_memo1.show) { %>
+            {title: '<%- ex_memo1.alias || ex_memo1.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', cellType: 'unit'},
             <% if (ctx.tender.info.display.ledger.dgnQty) { %>
@@ -104,7 +107,13 @@
             <% } %>
             {title: '台账金额', colSpan: '1', rowSpan: '2', field: 'total_price', hAlign: 2, width: 100, type: 'Number'},
             {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 100, formatter: '@'},
-            {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 120, formatter: '@', cellType: 'ellipsisAutoTip'}
+            {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 120, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% if (ex_memo2.show) { %>
+            {title: '<%- ex_memo2.alias || ex_memo2.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo2', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
+            <% if (ex_memo3.show) { %>
+            {title: '<%- ex_memo3.alias || ex_memo3.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo3', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
         ],
         emptyRows: 0,
         headRows: 2,
@@ -122,6 +131,9 @@
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 120, formatter: '@', cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
+            <% if (ex_memo1.show) { %>
+                {title: '<%- ex_memo1.alias || ex_memo1.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo1_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
             {
                 title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@',
                 getValue: function (data) {
@@ -134,6 +146,12 @@
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 80, type: 'Number'},
             {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code_merge', hAlign: 0, width: 100, formatter: '@'},
             {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo_merge', hAlign: 0, width: 120, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% if (ex_memo2.show) { %>
+            {title: '<%- ex_memo2.alias || ex_memo2.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo2_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
+            <% if (ex_memo3.show) { %>
+            {title: '<%- ex_memo3.alias || ex_memo3.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo3_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
         ],
         emptyRows: 0,
         headRows: 2,

+ 42 - 1
app/view/setting/show.ejs

@@ -34,6 +34,31 @@
                                 </ul>
                             </div>
                         </div>
+                        <div class="form-group">
+                            <legend>台账列显示</legend>
+                            <table class="table table-hover table-bordered">
+                                <thead><tr><th>名称</th><th>是否显示</th><th>别名</th><th></th></tr></thead>
+                                <tbody id="ledger_col_list">
+                                <% for (const sl of sjsRela.ledgerCol) { %>
+                                <tr>
+                                    <td><%- sl.name %></td>
+                                    <td>
+                                        <div class="form-check form-check-inline">
+                                            <input class="form-check-input" type="checkbox" id="inlineCheckbox-<%- sl.field %>" <% if (sl.show) { %>checked<% } %> onchange="updateColShow('ledgerCol', '<%- sl.field %>', this);">
+                                            <label class="form-check-label" for="inlineCheckbox-<%- sl.field %>"></label>
+                                        </div>
+                                    </td>
+                                    <td>
+                                        <div class="input-group input-group-sm" style="width:90px">
+                                            <input type="text" class="form-control" value="<%- sl.alias %>" onchange="updateColAlias('ledgerCol', '<%- sl.field%>', this);">
+                                        </div>
+                                    </td>
+                                    <td><span class="form-control-sm text-warning"><%- sl.hint || '' %></span></td>
+                                </tr>
+                                <% } %>
+                                </tbody>
+                            </table>
+                        </div>
                     </div>
                 </div>
             </div>
@@ -45,5 +70,21 @@
     $(function () {
         autoFlashHeight();
     })
-      const showList = JSON.parse('<%- JSON.stringify(showList) %>');
+    const showList = JSON.parse('<%- JSON.stringify(showList) %>');
+    const updateColShow = function (sub, field, obj) {
+        const data = { sub, field, key: 'show', value: obj.checked };
+        postData('show/update-sjs', data, function() {
+            obj.setAttribute('value', obj.checked);
+        }, function () {
+            obj.checked = obj.getAttribute('value') === true;
+        });
+    };
+    const updateColAlias = function (sub, field, obj) {
+        const data = { sub, field, key: 'alias', value: obj.value };
+        postData('show/update-sjs', data, function() {
+            obj.setAttribute('org', obj.value);
+        }, function () {
+            obj.value = obj.getAttribute('org');
+        });
+    };
 </script>

+ 18 - 0
app/view/stage/bwtz.ejs

@@ -142,6 +142,9 @@
     const xmjSpreadSetting = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
+            <% if (ex_memo1.show) { %>
+            {title: '<%- ex_memo1.alias || ex_memo1.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', cellType: 'unit'},
             <% if (ctx.tender.info.display.ledger.dgnQty) { %>
@@ -164,6 +167,12 @@
             {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
             {title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% if (ex_memo2.show) { %>
+            {title: '<%- ex_memo2.alias || ex_memo2.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo2', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
+            <% if (ex_memo3.show) { %>
+            {title: '<%- ex_memo3.alias || ex_memo3.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo3', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
             <% if (ctx.session.sessionProject.gxby) { %>
             {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getGxbyText},
             <% } %>
@@ -193,6 +202,9 @@
         cols: [
             {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 120, formatter: '@', cellType: 'tree'},
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
+            <% if (ex_memo1.show) { %>
+            {title: '<%- ex_memo1.alias || ex_memo1.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo1_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
             {
                 title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@',
                 getValue: function (data) {
@@ -226,6 +238,12 @@
             {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code_merge', hAlign: 0, width: 80, formatter: '@'},
             {title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
             {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% if (ex_memo2.show) { %>
+            {title: '<%- ex_memo2.alias || ex_memo2.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo2_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
+            <% if (ex_memo3.show) { %>
+            {title: '<%- ex_memo3.alias || ex_memo3.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo3_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            <% } %>
             <% if (ctx.session.sessionProject.gxby) { %>
             {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getGxbyText},
             <% } %>

+ 302 - 0
sql/update.sql

@@ -0,0 +1,302 @@
+ALTER TABLE `zh_ledger_0`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_1`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_2`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_3`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_4`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_5`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_6`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_7`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_8`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_ledger_9`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_0`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_1`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_2`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_3`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_4`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_5`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_6`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_7`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_8`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_bills_9`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `check_calc`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_0`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_1`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_2`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_3`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_4`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_5`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_6`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_7`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_8`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_9`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_10`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_11`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_12`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_13`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_14`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_15`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_16`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_17`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_18`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_pos_19`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_0`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_1`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_2`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_3`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_4`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_5`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_6`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_7`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_8`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_9`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_10`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_11`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_12`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_13`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_14`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_15`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_16`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_17`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_18`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_revise_pos_19`
+ADD COLUMN `ex_memo1`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注1' AFTER `dagl_url`,
+ADD COLUMN `ex_memo2`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注2' AFTER `ex_memo1`,
+ADD COLUMN `ex_memo3`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注3' AFTER `ex_memo2`;
+
+ALTER TABLE `zh_project`
+ADD COLUMN `sjs_rela`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'sjs相关配置' AFTER `fun_rela`;