MaiXinRong преди 6 месеца
родител
ревизия
59cdfa84a6

+ 4 - 2
app/public/js/file_detail.js

@@ -70,6 +70,7 @@ $(document).ready(function() {
                     tree_pid: x.tree_pid,
                     name: x.name + (x.total_file_count > 0 ? `(${x.total_file_count})` : ''),
                     spid: x.spid,
+                    tips: x.tips || '',
                 };
                 if (x.is_fixed) result.isParent = true;
                 if (x.is_folder || x.is_fixed) result.open = self.expandCache.indexOf(result.id) >= 0;
@@ -476,7 +477,7 @@ $(document).ready(function() {
         treeId: 'filing',
         view: {
             selectedMulti: false,
-            showTitle: false,
+            showTitle: true,
         },
         data: {
             simpleData: {
@@ -484,7 +485,8 @@ $(document).ready(function() {
                 pIdKey: 'tree_pid',
                 rootPId: '-1',
                 enable: true,
-            }
+            },
+            key: { title: 'tips' },
         },
         edit: {
             enable: true,

+ 11 - 1
app/public/js/filing_template.js

@@ -279,6 +279,7 @@ $(document).ready(function() {
                 cols: [
                     { title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 250, formatter: '@', readOnly: true, cellType: 'tree' },
                     { title: '固定', colSpan: '1', rowSpan: '1', field: 'is_fixed', hAlign: 1, width: 50, cellType: 'checkbox' },
+                    { title: '提示', colSpan: '1', rowSpan: '1', field: 'tips', hAlign: 0, width: 280, formatter: '@', wordWrap: 1 },
                 ],
                 emptyRows: 0,
                 headRows: 1,
@@ -343,6 +344,13 @@ $(document).ready(function() {
                 }
                 SpreadJsObj.reLoadRowsData(info.sheet, row);
             });
+            this.spread.bind(spreadNS.Events.EditEnded, function(e, info) {
+                if (!info.sheet.zh_setting) return;
+                const col = info.sheet.zh_setting.cols[info.col];
+                const node = SpreadJsObj.getSelectObject(info.sheet);
+                node[col.field] = trimInvalidChar(info.editingText);
+                SpreadJsObj.reLoadRowData(info.sheet, info.row)
+            });
             $(`#${setting.modal}-ok`).click(function() {
                 try {
                     const data = self.getMultiUpdateData();
@@ -369,7 +377,7 @@ $(document).ready(function() {
                         if (!fixedParent) throw `【${node.name}】查询不到固定信息`;
                         filing_type = fixedParent.source_filing_type;
                     }
-                    data.push({ id: node.id, is_fixed: node.is_fixed, filing_type, tree_order: i + 1 });
+                    data.push({ id: node.id, is_fixed: node.is_fixed, filing_type, tree_order: i + 1, tips: node.tips || '' });
                     if (node.children) getUpdateData(node.children);
                 }
             };
@@ -392,6 +400,7 @@ $(document).ready(function() {
                     name: node.name,
                     is_fixed: node.is_fixed,
                     filing_type: node.filing_type,
+                    tips: node.tips,
                 });
             }
             return data;
@@ -412,6 +421,7 @@ $(document).ready(function() {
                 name: node.name,
                 is_fixed: node.is_fixed,
                 filing_type: node.filing_type,
+                tips: node.tips,
             }});
             const blob = new Blob([JSON.stringify(exportData, '', '')], { type: 'application/text'});
             const template = templateList.find(x => { return x.id === sourceTree.nodes[0].temp_id });

+ 1 - 1
app/service/file.js

@@ -107,7 +107,7 @@ module.exports = app => {
                         id: this.uuid.v4(), spid: filing.spid, filing_id: filing.id, filing_type: filing.filing_type,
                         user_id: user.id, user_name: user.name, user_company: user.company, user_role: user.role,
                         filename: x.filename, fileext: x.fileext, filesize: x.filesize, filepath: x.filepath,
-                        is_rela: 1, rela_info: x.rela_info,
+                        is_rela: 1, rela_info: JSON.stringify(x.rela_info),
                     };
                 });
                 await conn.insert(this.tableName, insertData);

+ 1 - 1
app/service/filing.js

@@ -93,7 +93,7 @@ module.exports = app => {
                 const newData = {
                     id: f.newId, tree_pid : parent ? parent.newId : rootId, tree_level: f.tree_level, tree_order: f.tree_order,
                     spid, add_user_id: this.ctx.session.sessionUser.accountId, is_fixed: f.is_fixed,
-                    filing_type: f.filing_type, name: f.name,
+                    filing_type: f.filing_type, name: f.name, tips: f.tips,
                 };
                 insertData.push(newData);
             }

+ 2 - 2
app/service/filing_template.js

@@ -233,7 +233,7 @@ module.exports = app => {
                 insertData.push({
                     id: this.uuid.v4(), temp_id: templateId, add_user_id: this.ctx.session.sessionUser.accountId,
                     tree_pid: parent ? parent.id : rootId, tree_level: parent ? parent.tree_level + 1 : 1, tree_order: d.tree_order,
-                    name: d.name, filing_type: d.filing_type, is_fixed: parent ? d.is_fixed : 1, org_id: d.id,
+                    name: d.name, tips: d.tips, filing_type: d.filing_type, is_fixed: parent ? d.is_fixed : 1, org_id: d.id,
                 });
             }
             insertData.forEach(x => { delete x.org_id; });
@@ -255,7 +255,7 @@ module.exports = app => {
 
             const sourceData = await this.getData(templateId);
 
-            const validFields = ['id', 'is_fixed', 'name', 'filing_type', 'tree_order'];
+            const validFields = ['id', 'is_fixed', 'name', 'filing_type', 'tree_order', 'tips'];
             const updateData = [];
             for (const d of data) {
                 if (!d.id) throw '提交数据格式错误';

+ 1 - 1
app/view/file/template_modal.ejs

@@ -1,6 +1,6 @@
 <% include ../shares/select_file_modal.ejs %>
 <div class="modal fade" id="multi-set" data-backdrop="static">
-    <div class="modal-dialog" role="document">
+    <div class="modal-dialog modal-lg" role="document">
         <div class="modal-content">
             <div class="modal-header">
                 <h5 class="modal-title" id="tender-select-title">更多配置</h5>

+ 3 - 1
app/view/ledger/explode_modal.ejs

@@ -64,7 +64,9 @@
                 <div class="btn-group ml-auto">
                     <a href="" data-toggle="dropdown" title="文件类型说明"><i class="fa fa-question-circle"></i></a>
                     <div class="dropdown-menu bg-dark">
-                        <a class="dropdown-item text-light" href="#">1、yup/ybpx文件:纵横在线云计价大司空导出的项目或者标段文件。</a>
+                        <a class="dropdown-item text-light" href="#">1、yup/ybpx文件:纵横在线云计价大司空导出的项目或者标段文件</a>
+                        <a class="dropdown-item text-light in-3" href="#">yup为一个分段对应一个台账。</a>
+                        <a class="dropdown-item text-light in-3" href="#">ybpx为合并所有分段为一个台账。</a>
                         <a class="dropdown-item text-light" href="#">2、在线计价文件:绑定纵横在线云计价大司空账号,获取账号下的项目文件。</a>
                     </div>
                 </div>

+ 2 - 2
app/view/tender/detail_modal.ejs

@@ -2197,8 +2197,8 @@
         const prop = {
             over_range_check: {
                 field: $('[name=oc-field]:checked').val(),
-                billsWithPos: percent,
-                percent: $('[name=oc-bp]:checked').val(),
+                billsWithPos: $('[name=oc-bp]:checked').val(),
+                percent: percent,
             }
         }
         const tenderId = window.location.pathname.split('/')[2];

+ 8 - 3
sql/update.sql

@@ -11,11 +11,11 @@ ALTER TABLE `zh_sub_project_info`
 ADD COLUMN `proj_intro` text NULL COMMENT '项目概述' AFTER `project_id`,
 ADD COLUMN `proj_cur_status` text NULL COMMENT '当前状态' AFTER `proj_intro`,
 ADD COLUMN `proj_status` varchar(20) NOT NULL DEFAULT '' COMMENT '建设状态' AFTER `proj_level`,
-ADD COLUMN `lx_tp` decimal(24, 8) NOT NULL COMMENT '立项-金额' AFTER `lx_code`,
+ADD COLUMN `lx_tp` decimal(24, 8) NOT NULL DEFAULT 0 COMMENT '立项-金额' AFTER `lx_code`,
 ADD COLUMN `lx_memo` text NULL COMMENT '立项-备注' AFTER `lx_tp`,
 ADD COLUMN `cb_tp` decimal(24, 8) NOT NULL DEFAULT 0 COMMENT '初步-金额' AFTER `cb_code`,
 ADD COLUMN `cb_memo` text NULL COMMENT '初步-备注' AFTER `cb_tp`,
-ADD COLUMN `sg_tp` decimal(24, 8) NOT NULL COMMENT '施工许可批复-金额' AFTER `sg_code`,
+ADD COLUMN `sg_tp` decimal(24, 8) NOT NULL DEFAULT 0 COMMENT '施工许可批复-金额' AFTER `sg_code`,
 ADD COLUMN `sg_memo` text NULL COMMENT '施工许可批复-备注' AFTER `sg_tp`,
 ADD COLUMN `sgt_department` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '施工图-部门' AFTER `gcl_quantity`,
 ADD COLUMN `sgt_date` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '施工图-日期' AFTER `sgt_department`,
@@ -85,7 +85,7 @@ CREATE TABLE `zh_sub_project_file`  (
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
 
-ALTER TABLE `calculation`.`zh_tender_info`
+ALTER TABLE `zh_tender_info`
 ADD COLUMN `over_range_check` varchar(255) NOT NULL DEFAULT '' AFTER `s_type`;
 
 ALTER TABLE `zh_material_audit`
@@ -95,6 +95,11 @@ ADD COLUMN `audit_order`  tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批
 ALTER TABLE `zh_material`
 ADD COLUMN `final_auditor_str` varchar(50) NOT NULL DEFAULT '' COMMENT '终审人相关';
 
+ALTER TABLE `zh_filing_template`
+ADD COLUMN `tips` varchar(1000) NOT NULL DEFAULT '' COMMENT '提示' AFTER `filing_type`;
+ALTER TABLE `zh_filing`
+ADD COLUMN `tips` varchar(1000) NOT NULL DEFAULT '' COMMENT '提示' AFTER `file_count`;
+
 ------------------------------------
 -- 表数据
 ------------------------------------