瀏覽代碼

档案管理,查看外部文件链接相关

MaiXinRong 4 年之前
父節點
當前提交
9c05d0b51b

+ 3 - 2
app/lib/bills_pos_convert.js

@@ -69,7 +69,7 @@ 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']);
+            'code', 'name', 'unit', 'dgn_qty1', 'dgn_qty2', 'drawing_code', 'postil', 'memo', 'gxby_status', 'dagl_status', 'dagl_url']);
         return xmj;
     }
     // v1
@@ -125,7 +125,8 @@ class BillsPosConvert {
             for (const p of pos) {
                 const posUnit = xmj.unitTree.addNode({pos_name: p.name,
                     b_code: null, name: '', unit: null, unit_price: null,
-                    gxby_status: p.gxby_status, dagl_status: p.dagl_status});
+                    gxby_status: p.gxby_status, dagl_status: p.dagl_status, dagl_url: p.dagl_url});
+                if (p.dagl_status > 0) console.log(posUnit);
                 if (p.drawing_code && posUnit.drawing_code.indexOf(p.drawing_code) < 0)
                     posUnit.drawing_code.push(p.drawing_code);
                 if (p.memo) posUnit.memo.push(p.memo);

+ 4 - 4
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -1856,7 +1856,7 @@ const SpreadJsObj = {
                 const [col, img] = this.getActiveImage(options.sheet, options.row, options.col);
 
                 const indent = col.indent ? col.indent : 10;
-                if (style.hAlign === spreadNS.HorizontalAlign.right) {
+                if (style.hAlign === spreadNS.HorizontalAlign.right || col.imgAlign === spreadNS.HorizontalAlign.right) {
                     if (img) {
                         if (style.backColor) {
                             canvas.save();
@@ -1958,7 +1958,7 @@ const SpreadJsObj = {
 
                 const halfX = img.width / 2, halfY = img.height / 2;
                 const indent = col.indent ? col.indent : 10;
-                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                const centerX = (hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right || col.imgAlign === spreadNS.HorizontalAlign.right)
                     ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
                     : hitinfo.cellRect.x + indent + halfX;
                 const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
@@ -1975,7 +1975,7 @@ const SpreadJsObj = {
 
                 const halfX = img.width / 2, halfY = img.height / 2;
                 const indent = col.indent ? col.indent : 10;
-                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                const centerX = (hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right || col.imgAlign === spreadNS.HorizontalAlign.right)
                     ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
                     : hitinfo.cellRect.x + indent + halfX;
                 const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;
@@ -1998,7 +1998,7 @@ const SpreadJsObj = {
 
                 const halfX = img.width / 2, halfY = img.height / 2;
                 const indent = col.indent ? col.indent : 10;
-                const centerX = hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right
+                const centerX = (hitinfo.cellStyle.hAlign === spreadNS.HorizontalAlign.right || col.imgAlign === spreadNS.HorizontalAlign.right)
                     ? hitinfo.cellRect.x + hitinfo.cellRect.width - indent -halfX
                     : hitinfo.cellRect.x + indent + halfX;
                 const centerY = hitinfo.cellRect.y + hitinfo.cellRect.height / 2;

+ 37 - 9
app/public/js/stage.js

@@ -561,13 +561,18 @@ $(document).ready(() => {
     };
     const ratioCol = ledgerSpreadSetting.cols.find(x => {return x.field === 'end_gather_percent' || x.field === 'end_correct_percent'});
     ratioCol.field = tenderInfo.display.stage.correct ? 'end_correct_percent' : 'end_gather_percent';
-    ledgerSpreadSetting.imageClick = function (data) {
-        if (data.children && data.children.length > 0 || data.lock) return;
+    ledgerSpreadSetting.imageClick = function (data, hitinfo) {
+        const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+        if (col.field === 'dagl') {
+            data.dagl_url && window.open(data.dagl_url);
+        } else if (col.field === 'qc_qty') {
+            if (data.children && data.children.length > 0 || data.lock) return;
 
-        const nodePos = stagePos.getLedgerPos(data.id);
-        if (nodePos && nodePos.length > 0) return;
+            const nodePos = stagePos.getLedgerPos(data.id);
+            if (nodePos && nodePos.length > 0) return;
 
-        changesObj.loadChanges({bills: data});
+            changesObj.loadChanges({bills: data});
+        }
     };
     ledgerSpreadSetting.dgnUpFields = ['deal_dgn_qty1', 'deal_dgn_qty2', 'c_dgn_qty1', 'c_dgn_qty2'];
     ledgerSpreadSetting.getColor = function (sheet, data, row, col, defaultColor) {
@@ -610,6 +615,15 @@ $(document).ready(() => {
     sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
     sjsSettingObj.setPropValue(ledgerSpreadSetting, ['gxby'], 'getValue', getGxbyText);
     sjsSettingObj.setPropValue(ledgerSpreadSetting, ['dagl'], 'getValue', getDaglText);
+    const lDaglCol = _.find(ledgerSpreadSetting.cols, {field: 'dagl'});
+    if (lDaglCol) {
+        lDaglCol.getValue = getDaglText;
+        lDaglCol.cellType = 'activeImageBtn';
+        lDaglCol.normalImg = '#rela-file-icon';
+        lDaglCol.indent = 5;
+        lDaglCol.imgAlign = 2;
+        lDaglCol.showImage = function (data) { return data && data.dagl_url; }
+    }
     if (thousandth) sjsSettingObj.setTpThousandthFormat(ledgerSpreadSetting);
     ledgerSpreadSetting.headColWidth = [50];
     ledgerSpreadSetting.rowHeader = [
@@ -662,10 +676,15 @@ $(document).ready(() => {
     spCol.showImage = function (data) {
         return data !== undefined && data !== null;
     };
-    posSpreadSetting.imageClick = function (data) {
-        const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
-        if (node.lock) return;
-        changesObj.loadChanges({bills: node, pos: data});
+    posSpreadSetting.imageClick = function (data, hitinfo) {
+        const col = hitinfo.sheet.zh_setting.cols[hitinfo.col];
+        if (col.field === 'dagl') {
+            data.dagl_url && window.open(data.dagl_url);
+        } else if (col.field === 'qc_qty') {
+            const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
+            if (node.lock) return;
+            changesObj.loadChanges({bills: node, pos: data});
+        }
     };
     posSpreadSetting.getColor = function (sheet, data, row, col, defaultColor) {
         if (data) {
@@ -689,6 +708,15 @@ $(document).ready(() => {
     if (thousandth) sjsSettingObj.setTpThousandthFormat(posSpreadSetting);
     sjsSettingObj.setPropValue(posSpreadSetting, ['gxby'], 'getValue', getGxbyText);
     sjsSettingObj.setPropValue(posSpreadSetting, ['dagl'], 'getValue', getDaglText);
+    const pDaglCol = _.find(posSpreadSetting.cols, {field: 'dagl'});
+    if (pDaglCol) {
+        pDaglCol.getValue = getDaglText;
+        pDaglCol.cellType = 'activeImageBtn';
+        pDaglCol.normalImg = '#rela-file-icon';
+        pDaglCol.indent = 5;
+        pDaglCol.imgAlign = 2;
+        pDaglCol.showImage = function (data) { return data && data.dagl_url; }
+    }
     SpreadJsObj.initSheet(spSpread.getActiveSheet(), posSpreadSetting);
 
     const billsTag = $.billsTag({

+ 4 - 4
app/service/ledger_revise.js

@@ -99,11 +99,11 @@ module.exports = app => {
                 '  (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, gxby_status, dagl_status)' +
+                '     sgfh_expr, sjcl_expr, qtcl_expr, gxby_status, dagl_status, dagl_url)' +
                 '  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, gxby_status, dagl_status' +
+                '      sgfh_expr, sjcl_expr, qtcl_expr, gxby_status, dagl_status, dagl_url' +
                 '  From ' + this.ctx.service.ledger.tableName +
                 '  Where `tender_id` = ?';
             const sqlParam = [tid];
@@ -114,10 +114,10 @@ module.exports = app => {
             const sql = 'Insert Into ' + this.ctx.service.revisePos.tableName +
                 '  (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)' +
+                '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty, gxby_status, dagl_status, dagl_url)' +
                 '  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' +
+                '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty, gxby_status, dagl_status, dagl_url' +
                 '  From ' + this.ctx.service.pos.tableName +
                 '  Where `tid` = ?';
             const sqlParam = [tid];

+ 3 - 3
app/service/pos.js

@@ -27,7 +27,7 @@ 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', 'gxby_status'],
+                    'dagl_status', 'dagl_url', 'gxby_status'],
                 order: [['porder', 'ASC']],
             });
         }
@@ -35,7 +35,7 @@ module.exports = app => {
         async getPosDataWithAddStageOrder(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.real_qty, p.gxby_status, p.dagl_status' +
+                '    p.sgfh_expr, p.sjcl_expr, p.qtcl_expr, p.real_qty, p.gxby_status, p.dagl_status, p.dagl_url' +
                 '  FROM ' + this.tableName + ' p ' +
                 '  LEFT JOIN ' + this.ctx.service.stage.tableName + ' s' +
                 '  ON p.add_stage = s.id'
@@ -47,7 +47,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, gxby_status' +
+                    '    dagl_status, p.dagl_url, gxby_status' +
                     '  FROM ' + this.tableName +
                     '  WHERE id in (' + this.ctx.helper.getInArrStrSqlFilter(ids) + ')';
                 return await this.db.query(sql, []);

+ 4 - 4
app/service/revise_audit.js

@@ -300,11 +300,11 @@ module.exports = app => {
                 '  (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, gxby_status, dagl_status)' +
+                '     sgfh_expr, sjcl_expr, qtcl_expr, gxby_status, dagl_status, dagl_url)' +
                 '  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, gxby_status, dagl_status' +
+                '      sgfh_expr, sjcl_expr, qtcl_expr, gxby_status, dagl_status, dagl_url' +
                 '  From ' +
                 this.ctx.service.reviseBills.tableName +
                 '  Where `tender_id` = ?';
@@ -315,10 +315,10 @@ module.exports = app => {
                 this.ctx.service.pos.tableName +
                 '  (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)' +
+                '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty, gxby_status, dagl_status, dagl_url)' +
                 '  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' +
+                '     sgfh_expr, sjcl_expr, qtcl_expr, real_qty, gxby_status, dagl_status, dagl_url' +
                 '  From ' +
                 this.ctx.service.revisePos.tableName +
                 '  Where `tid` = ?';

+ 36 - 2
app/view/stage/bwtz.ejs

@@ -105,6 +105,10 @@
         </div>
     </div>
 </div>
+<div style="display: none">
+    <img src="/public/images/file_clip.png" id="rela-file-icon">
+    <img src="/public/images/file_clip_hover.png" id="rela-file-hover">
+</div>
 <script>
     const thirdParty = JSON.parse('<%- JSON.stringify(thirdParty) %>');
     function getGxbyText(data) {
@@ -119,6 +123,24 @@
         });
         return def ? def.name : '';
     }
+    function getColor (sheet, data, row, col, defaultColor) {
+        if (!data) return defaultColor;
+        if (col.field === 'gxby') {
+            const def = thirdParty.gxby.find(function (x) {
+                return x.value === data.gxby_status;
+            });
+            return (def && def.color) ? def.color : defaultColor;
+        } else if (col.field === 'dagl') {
+            const def = thirdParty.dagl.find(function (x) {
+                return x.value === data.dagl_status;
+            });
+            return (def && def.color) ? def.color : defaultColor;
+        }
+        return defaultColor;
+    }
+    function imageClick (data, hitinfo) {
+        data && data.dagl_url && window.open(data.dagl_url);
+    }
     const xmjSpreadSetting = {
         cols: [
             {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
@@ -148,7 +170,11 @@
             {title: '交工状态', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getGxbyText},
             <% } %>
             <% if (ctx.session.sessionProject.dagl) { %>
-            {title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getDaglText},
+            {
+                title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@',
+                readOnly: true, getValue: getDaglText, cellType: 'activeImageBtn', normalImg: '#rela-file-icon', indent: 5,
+                imgAlign: 2, showImage: function (data) { return data && data.dagl_url }
+            },
             <% } %>
         ],
         emptyRows: 0,
@@ -162,6 +188,8 @@
             key: 'stage-bwtz-xmj',
             colWidth: true,
         },
+        getColor,
+        imageClick,
     };
     const unitSpreadSetting = {
         cols: [
@@ -204,7 +232,11 @@
             {title: '交工状态', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getGxbyText},
             <% } %>
             <% if (ctx.session.sessionProject.dagl) { %>
-            {title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getDaglText},
+            {
+                title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@',
+                readOnly: true, getValue: getDaglText, cellType: 'activeImageBtn', normalImg: '#rela-file-icon', indent: 5,
+                imgAlign: 2, showImage: function (data) { return data && data.dagl_url }
+            },
             <% } %>
         ],
         emptyRows: 0,
@@ -218,6 +250,8 @@
             key: 'stage-bwtz-unit',
             colWidth: true,
         },
+        getColor,
+        imageClick,
     };
     const decimal = <%- ctx.tender.info.decimal.tp %>;
     const thousandth = <%- ctx.tender.info.display.thousandth %>;

+ 2 - 0
app/view/stage/index.ejs

@@ -579,6 +579,8 @@
     <div style="display: none">
         <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />
         <img src="/public/images/icon-ok.png" id="icon-ok" />
+        <img src="/public/images/file_clip.png" id="rela-file-icon">
+        <img src="/public/images/file_clip_hover.png" id="rela-file-hover">
     </div>
 </div>
 <script src="/public/js/moment/moment.min.js"></script>

+ 12 - 42
sql/update.sql

@@ -1,47 +1,16 @@
-ALTER TABLE `zh_change` ADD `tp_decimal` TINYINT(3) NULL DEFAULT NULL COMMENT '金额位数' AFTER `sin_time`;
-
-ALTER TABLE `zh_tender_info`
-ADD COLUMN `bid_info`  varchar(200) NULL AFTER `tech_param`;
-
---
---
-
-CREATE TABLE `zh_ledger_cooperation` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `ledger_id` int(11) NOT NULL COMMENT '台账id',
-  `user_id` int(11) NOT NULL COMMENT '审批人id',
-  `pwd` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '密码',
-  `sign_path` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '电子签名地址',
-  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否调用',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='台账多人协同表';
-
-
-CREATE UNIQUE INDEX `idx_tid_sid_rid`  ON `zh_rpt_custom_define` (tid, sid, rid) COMMENT '电子签名数据索引' ALGORITHM DEFAULT LOCK DEFAULT;
-
-ALTER TABLE `zh_change_audit_list` ADD `xmj_dwgc` varchar(255) NULL DEFAULT NULL COMMENT '单位工程' AFTER `xmj_jldy`;
-ALTER TABLE `zh_change_audit_list` ADD `xmj_fbgc` varchar(255) NULL DEFAULT NULL COMMENT '分部工程' AFTER `xmj_dwgc`;
-ALTER TABLE `zh_change_audit_list` ADD `xmj_fxgc` varchar(255) NULL DEFAULT NULL COMMENT '分项工程' AFTER `xmj_fbgc`;
-
-CREATE TABLE `zh_ledger_tag` (
-  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
-  `pid` int(11) NOT NULL COMMENT '项目id',
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `sid` int(11) NOT NULL DEFAULT '-1' COMMENT '期id(台账为-1)',
-  `sorder` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '第几期(台账为-1)',
-  `uid` int(11) NOT NULL DEFAULT '-1' COMMENT '添加用户id',
-  `lid` varchar(36) CHARACTER SET ascii NOT NULL DEFAULT '-1' COMMENT '关联台账id(zh_ledger表中的id)',
-  `share` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否共享给其他参与人',
-  `color` varchar(7) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT '书签颜色',
-  `comment` text COLLATE utf8_unicode_ci COMMENT '批注',
-  `create_time` datetime DEFAULT NULL,
-  `modify_time` datetime DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
 ALTER TABLE `zh_project` ADD `rpt_authority` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '主管部门(报表显示)' AFTER `page_path`;
 ALTER TABLE `zh_project` ADD `rpt_items` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '建设项目类别(报表显示)' AFTER `rpt_authority`;
 ALTER TABLE `zh_project` ADD `rpt_level` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '级别(报表显示)' AFTER `rpt_items`;
 ALTER TABLE `zh_project` ADD `rpt_nature` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '建设性质(报表显示)' AFTER `rpt_level`;
+
+ALTER TABLE `zh_ledger`
+ADD COLUMN `dagl_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '档案管理-查看链接'AFTER `dagl_status`;
+
+ALTER TABLE `zh_pos`
+ADD COLUMN `dagl_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '档案管理-查看链接'AFTER `dagl_status`;
+
+ALTER TABLE `zh_revise_bills`
+ADD COLUMN `dagl_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '档案管理-查看链接'AFTER `dagl_status`;
+
+ALTER TABLE `zh_revise_pos`
+ADD COLUMN `dagl_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '档案管理-查看链接'AFTER `dagl_status`;

+ 42 - 0
sql/update20201229.sql

@@ -0,0 +1,42 @@
+ALTER TABLE `zh_change` ADD `tp_decimal` TINYINT(3) NULL DEFAULT NULL COMMENT '金额位数' AFTER `sin_time`;
+
+ALTER TABLE `zh_tender_info`
+ADD COLUMN `bid_info`  varchar(200) NULL AFTER `tech_param`;
+
+--
+-- 表的结构 `zh_ledger_cooperation`
+--
+
+CREATE TABLE `zh_ledger_cooperation` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `ledger_id` int(11) NOT NULL COMMENT '台账id',
+  `user_id` int(11) NOT NULL COMMENT '审批人id',
+  `pwd` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '密码',
+  `sign_path` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '电子签名地址',
+  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否调用',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='台账多人协同表';
+
+
+CREATE UNIQUE INDEX `idx_tid_sid_rid`  ON `zh_rpt_custom_define` (tid, sid, rid) COMMENT '电子签名数据索引' ALGORITHM DEFAULT LOCK DEFAULT;
+
+ALTER TABLE `zh_change_audit_list` ADD `xmj_dwgc` varchar(255) NULL DEFAULT NULL COMMENT '单位工程' AFTER `xmj_jldy`;
+ALTER TABLE `zh_change_audit_list` ADD `xmj_fbgc` varchar(255) NULL DEFAULT NULL COMMENT '分部工程' AFTER `xmj_dwgc`;
+ALTER TABLE `zh_change_audit_list` ADD `xmj_fxgc` varchar(255) NULL DEFAULT NULL COMMENT '分项工程' AFTER `xmj_fbgc`;
+
+CREATE TABLE `zh_ledger_tag` (
+  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `pid` int(11) NOT NULL COMMENT '项目id',
+  `tid` int(11) NOT NULL COMMENT '标段id',
+  `sid` int(11) NOT NULL DEFAULT '-1' COMMENT '期id(台账为-1)',
+  `sorder` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '第几期(台账为-1)',
+  `uid` int(11) NOT NULL DEFAULT '-1' COMMENT '添加用户id',
+  `lid` varchar(36) CHARACTER SET ascii NOT NULL DEFAULT '-1' COMMENT '关联台账id(zh_ledger表中的id)',
+  `share` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否共享给其他参与人',
+  `color` varchar(7) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT '书签颜色',
+  `comment` text COLLATE utf8_unicode_ci COMMENT '批注',
+  `create_time` datetime DEFAULT NULL,
+  `modify_time` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;