Browse Source

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 3 years ago
parent
commit
28b34b8390

+ 11 - 3
app/controller/profile_controller.js

@@ -103,6 +103,11 @@ module.exports = app => {
                 // 验证数据
                 const passwordRule = ctx.service.projectAccount.rule('modifyPassword');
                 ctx.helper.validate(passwordRule);
+                // 判断新密码的强度
+                const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+                if (!reg.test(newPassword)) {
+                    throw '请设置至少包含数字和字母的新密码';
+                }
 
                 const result = await ctx.service.projectAccount.modifyPassword(accountId, password, newPassword);
                 if (!result) {
@@ -111,6 +116,7 @@ module.exports = app => {
                 this.setMessage('修改密码成功', this.messageType.SUCCESS);
                 ctx.redirect('/logout');
             } catch (error) {
+                ctx.session.postError = error.toString();
                 this.setMessage(error.toString(), this.messageType.ERROR);
                 ctx.redirect(ctx.request.header.referer);
             }
@@ -469,14 +475,16 @@ module.exports = app => {
             const accountData = await ctx.service.projectAccount.getDataByCondition({ id: sessionUser.accountId });
 
             // 获取修改密码的字段规则
-            const passwordRule = ctx.service.projectAccount.rule('modifyPassword');
-            const passwordJsValidator = await this.jsValidator.convert(passwordRule).setSelector('#password-form').build();
+            // const passwordRule = ctx.service.projectAccount.rule('modifyPassword');
+            // const passwordJsValidator = await this.jsValidator.convert(passwordRule).setSelector('#password-form').build();
+
+            // console.log(passwordJsValidator);
 
             // 获取登录日志
             const loginLogging = await ctx.service.loginLogging.getLoginLogs(ctx.session.sessionProject.id, ctx.session.sessionUser.accountId);
             const renderData = {
                 accountData,
-                passwordJsValidator,
+                // passwordJsValidator,
                 loginLogging,
                 loginWay,
             };

+ 11 - 0
app/controller/setting_controller.js

@@ -476,6 +476,11 @@ module.exports = app => {
                 // 获取验证规则
                 const rule = ctx.service.projectAccount.rule('add');
                 ctx.validate(rule);
+                // 判断新密码的强度
+                const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+                if (!reg.test(ctx.request.body.password)) {
+                    throw '请设置至少包含数字和字母的密码';
+                }
                 ctx.request.body.project_id = projectData.id;
                 const result = await ctx.service.projectAccount.save(ctx.request.body);
                 if (!result) {
@@ -486,6 +491,7 @@ module.exports = app => {
                 ctx.redirect('/' + ctx.controllerName + '/user');
             } catch (error) {
                 console.log(error);
+                ctx.session.postError = error.toString();
                 this.setMessage(error.toString(), this.messageType.ERROR);
                 ctx.redirect(ctx.request.header.referer);
             }
@@ -541,6 +547,11 @@ module.exports = app => {
                 if (isNaN(accountId) || accountId <= 0 || password.length < 6) {
                     throw '参数错误';
                 }
+                // 判断新密码的强度
+                const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+                if (!reg.test(password)) {
+                    throw '请设置至少包含数字和字母的密码';
+                }
                 const result = await ctx.service.projectAccount.resetPassword(accountId, password, account);
                 if (!result) {
                     throw '重置密码失败!';

+ 2 - 2
app/public/js/change_information.js

@@ -21,7 +21,7 @@ $(document).ready(() => {
     if (cca !== null && cca !== undefined) {
         $('#customCheck1').prop('checked', cca !== 'false');
     }
-    changeSpreadSheet.setColumnVisible(3,$('#customCheck1').is(':checked'), GC.Spread.Sheets.SheetArea.viewport);
+    changeSpreadSheet.setColumnVisible(2,$('#customCheck1').is(':checked'), GC.Spread.Sheets.SheetArea.viewport);
     // 变更详情展示和隐藏
     $('.change-detail-checkbox').on('click', function (e) {
         if($(e.target).is('label')){
@@ -29,7 +29,7 @@ $(document).ready(() => {
         }
         // // 设置用户项目本地记录展示和隐藏情况
         setLocalCache('change-checkbox-account-'+ accountId, $(this).is(':checked'));
-        changeSpreadSheet.setColumnVisible(3,$(this).is(':checked'), GC.Spread.Sheets.SheetArea.viewport);
+        changeSpreadSheet.setColumnVisible(2,$(this).is(':checked'), GC.Spread.Sheets.SheetArea.viewport);
     });
 
     // 计算最新的变更总额和change的total_price是否一致,不一致则更新

+ 1 - 1
app/public/js/change_information_approval.js

@@ -21,10 +21,10 @@ $(document).ready(() => {
         cols: [
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 80, formatter: '@', readOnly: true},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 120, formatter: '@', readOnly: true},
-            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '变更详情', colSpan: '1', rowSpan: '2', field: 'detail', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.unit_price', readOnly: true},
+            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '原设计|数量', colSpan: '2|1', rowSpan: '1|1', field: 'oamount', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.oamount', readOnly: true},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'oa_tp', hAlign: 2, width: 80, type: 'Number', getValue: 'getValue.oa_tp', readOnly: true},
             {title: '申请变更增(+)减(-)|数量', colSpan: '2|1', rowSpan: '1|1', field: 'camount', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.camount', readOnly: true},

+ 1 - 1
app/public/js/change_information_set.js

@@ -96,10 +96,10 @@ $(document).ready(() => {
         cols: [
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 80, formatter: '@', readOnly: 'readOnly.isEdit2'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 120, formatter: '@', readOnly: 'readOnly.isEdit2'},
-            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@', readOnly: 'readOnly.isEdit'},
             {title: '变更详情', colSpan: '1', rowSpan: '2', field: 'detail', hAlign: 0, width: 120, formatter: '@', readOnly: false},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: 'readOnly.isEdit2', cellType: 'unit', comboItems: changeUnits, comboEdit: true},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number', readOnly: 'readOnly.isEdit2', getValue: 'getValue.unit_price'},
+            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@', readOnly: 'readOnly.isEdit2'},
             {title: '原设计|数量', colSpan: '2|1', rowSpan: '1|1', field: 'oamount', hAlign: 2, width: 60, type: 'Number', readOnly: 'readOnly.isEdit', getValue: 'getValue.oamount'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'oa_tp', hAlign: 2, width: 80, type: 'Number', readOnly: true, getValue: 'getValue.oa_tp'},
             {title: '申请变更增(+)减(-)|数量', colSpan: '2|1', rowSpan: '1|1', field: 'camount', hAlign: 2, width: 60, type: 'Number', readOnly: false, getValue: 'getValue.camount'},

+ 1 - 1
app/public/js/change_information_show.js

@@ -12,10 +12,10 @@ $(document).ready(() => {
         cols: [
             {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 80, formatter: '@'},
             {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 120, formatter: '@'},
-            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@'},
             {title: '变更详情', colSpan: '1', rowSpan: '2', field: 'detail', hAlign: 0, width: 120, formatter: '@'},
             {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@'},
             {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.unit_price'},
+            {title: '变更部位', colSpan: '1', rowSpan: '2', field: 'bwmx', hAlign: 0, width: 120, formatter: '@'},
             {title: '原设计|数量', colSpan: '2|1', rowSpan: '1|1', field: 'oamount', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.oamount'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'oa_tp', hAlign: 2, width: 80, type: 'Number', getValue: 'getValue.oa_tp'},
             {title: '申请变更增(+)减(-)|数量', colSpan: '2|1', rowSpan: '1|1', field: 'camount', hAlign: 2, width: 60, type: 'Number', getValue: 'getValue.camount'},

+ 2 - 2
app/public/js/measure_stage.js

@@ -185,8 +185,8 @@ function checkValidForm() {
     const date = $('#add-qi input[name="date"]').val();
     const period = $('#add-qi input[name="period"]').val();
     const startDate = period.split('~')[0];
-    const endDate = period.split('~')[1];
-    if (startDate.indexOf(date) === -1 && endDate.indexOf(date) === -1) {
+    const endDate = period.split('~')[1] ? period.split('~')[1] : null;
+    if ((startDate.indexOf(date) === -1 && !endDate) || (startDate.indexOf(date) === -1 && endDate && endDate.indexOf(date) === -1)) {
         toastr.error('所选日期与当前月份不匹配,请重新选择');
         $('#add-qi input[name="period"]').parents('.form-group').find('.text-danger').remove();
         $('#add-qi input[name="period"]').parents('.form-group').append('<small class="text-danger">所选日期与当前月份不匹配,请重新选择</small>');

+ 24 - 7
app/public/js/setting.js

@@ -79,6 +79,11 @@ $(document).ready(() => {
             if (!/^[0-9a-zA-Z*~!@&%$^\\(\\)#_\[\]\-\+={}|?'":,<>.`]+$/.test(resetPassword)) {
                 throw '密码只支持英文数字及符号';
             }
+            // 判断新密码的强度
+            const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+            if (!reg.test(resetPassword)) {
+                throw '请设置至少包含数字和字母的密码';
+            }
             const btn = $(this);
             $.ajax({
                 url: '/setting/user/reset/password',
@@ -425,6 +430,11 @@ function checkPasswordForm() {
         if (!/^[0-9a-zA-Z*~!@&%$^\\(\\)#_\[\]\-\+={}|?'":,<>.`]+$/.test(resetPassword)) {
             throw '密码只支持英文数字及符号';
         }
+        // 判断新密码的强度
+        const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+        if (!reg.test(resetPassword)) {
+            throw '请设置至少包含数字和字母的密码';
+        }
     } catch (err) {
         toastr.error(err);
         return false;
@@ -449,6 +459,11 @@ function checkUserForm(status) {
             if (!/^[0-9a-zA-Z*~!@&%$^\\(\\)#_\[\]\-\+={}|?'":,<>.`]+$/.test($('#add-user input[name="password"]').val())) {
                 throw '密码只支持英文数字及符号';
             }
+            // 判断新密码的强度
+            const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+            if (!reg.test($('#add-user input[name="password"]').val())) {
+                throw '请设置至少包含数字和字母的密码';
+            }
             if ($('#add-user input[name="name"]').val() == '') {
                 throw '姓名不能为空';
             }
@@ -513,23 +528,25 @@ function checkUnitForm() {
 }
 
 /**
- * 随机密码
+ * 随机密码(必须包含数字和字母)
  */
 function randPassword() {
-    let result = '';
+    const result = [];
     // 随机6-10位
-    const length = Math.ceil(Math.random() * 2 + 8);
+    const length = Math.ceil(Math.random() * 2 + 6);
     let numberSeed = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
     let stringSeed = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
         'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
         'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
-
+    const numRan = numberSeed[Math.floor((Math.random() * numberSeed.length))];
+    const strRan = stringSeed[Math.floor((Math.random() * stringSeed.length))];
     const randSeed = stringSeed.concat(numberSeed);
     const seedLength = randSeed.length - 1;
     for (let i = 0; i < length; i++) {
         const index = Math.ceil(Math.random() * seedLength);
-        result += randSeed[index];
+        result.push(randSeed[index]);
     }
-
-    return result;
+    result.splice(Math.floor((Math.random() * result.length)), 0, numRan);
+    result.splice(Math.floor((Math.random() * result.length)), 0, strRan);
+    return result.join('');
 }

+ 3 - 3
app/service/project_account.js

@@ -65,8 +65,8 @@ module.exports = app => {
                 case 'modifyPassword':
                     rule = {
                         password: { type: 'password', required: true, min: 6 },
-                        new_password: { type: 'password', required: true, min: 6 },
-                        confirm_password: { type: 'password', required: true, min: 6, compare: 'new_password' },
+                        new_password: { type: 'password', required: true, min: 6, max: 16, format: /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/ },
+                        confirm_password: { type: 'password', required: true, min: 6, max: 16, compare: 'new_password' },
                     };
                     break;
                 case 'bindMobile':
@@ -78,7 +78,7 @@ module.exports = app => {
                 case 'add':
                     rule = {
                         account: { type: 'string', required: true },
-                        password: { type: 'string', required: true, min: 6 },
+                        password: { type: 'string', required: true, min: 6, max: 16, format: /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/ },
                         name: { type: 'string', required: true },
                         company: { type: 'string', required: true },
                         role: { type: 'string', required: true },

+ 2 - 2
app/view/measure/stage_modal.ejs

@@ -142,8 +142,8 @@
         const date = $('#edit-date').val();
         const period = $('#edit-period').val();
         const startDate = period.split('~')[0];
-        const endDate = period.split('~')[1];
-        if (startDate.indexOf(date) === -1 && endDate.indexOf(date) === -1) {
+        const endDate = period.split('~')[1] ? period.split('~')[1] : null;
+        if ((startDate.indexOf(date) === -1 && !endDate) || (startDate.indexOf(date) === -1 && endDate && endDate.indexOf(date) === -1)) {
             toastr.error('所选日期与当前月份不匹配,请重新选择');
             $('#edit-period').parents('.form-group').find('.text-danger').remove();
             $('#edit-period').parents('.form-group').append('<small class="text-danger">所选日期与当前月份不匹配,请重新选择</small>');

+ 46 - 2
app/view/profile/safe.ejs

@@ -9,7 +9,7 @@
         <div class="c-body">
             <div class="sjs-height-0">
                 <div class="row m-0">
-                    <div class="col-5 my-3">
+                    <div class="col-6 my-3">
                         <!--账号安全-->
                         <form action="/profile/password" method="post" id="password-form">
                             <% if(accountData.password !== 'SSO password') { %>
@@ -54,7 +54,51 @@
         </div>
     </div>
 </div>
-<%- passwordJsValidator %>
+<script>
+    $(document).ready(function() {
+        $.validator.addMethod("isSafe", function(value, element) {
+            const safe = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
+            // var safe = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>,.\/]).{6,16}$/;
+            // var safe = /^(?=.*[a-zA-Z])(?=.*\d).{6,16}$/;
+            return this.optional(element) || safe.test(value);
+        }, "请设置至少包含数字和字母的密码");
+        const options = {
+            rules: '',
+            messages: {},
+            errorPlacement: function(error, element) {
+                $(element).addClass('is-invalid');
+                $(element).after(error);
+            },
+            errorClass: "invalid-feedback",
+            errorElement: "div",
+            highlight: false,
+            success: function(element) {
+                $(element).siblings('input').removeClass('is-invalid');
+                $(element).remove();
+            },
+        };
+        options.rules = {
+            password: {
+                required: true,
+                minlength: 6,
+            },
+            new_password: {
+                required: true,
+                minlength: 6,
+                maxlength: 16,
+                isSafe: true,
+            },
+            confirm_password : {
+                required: true,
+                minlength: 6,
+                maxlength: 16,
+                equalTo: '#new_password',
+            },
+        };
+        $("#password-form").validate(options);
+    });
+</script>
+<script src="/public/js/validate.extend.js"></script>
 <script type="text/javascript">
     new Vue({
         el: '#app',

+ 2 - 2
app/view/setting/category.ejs

@@ -28,8 +28,8 @@
     </div>
 </div>
 <script>
-    let cData = JSON.parse('<%- JSON.stringify(categoryData) %>');
-    const cType = JSON.parse('<%- JSON.stringify(categoryType) %>');
+    let cData = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
+    const cType = JSON.parse(unescape('<%- escape(JSON.stringify(categoryType)) %>'));
     let tenders = JSON.parse(unescape('<%- escape(JSON.stringify(tenderData)) %>'));
 </script>
 <script src="/public/js/category.js"></script>

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

@@ -29,7 +29,7 @@
                         <div class="input-group-prepend">
                             <span class="input-group-text" id="basic-addon1">表达式</span>
                         </div>
-                        <input type="text" class="form-control form-control-sm m-0" id="bills-expr" readonly="">
+                        <input type="text" class="form-control form-control-sm m-0" id="bills-expr" readonly="" autocomplete="off">
                     </div>
                 </div>
                 <div class="d-inline-block ml-3">
@@ -96,7 +96,7 @@
                                         <div class="input-group-prepend">
                                             <span class="input-group-text" id="basic-addon1">表达式</span>
                                         </div>
-                                        <input type="text" class="form-control form-control-sm m-0" id="pos-expr" readonly="">
+                                        <input type="text" class="form-control form-control-sm m-0" id="pos-expr" readonly="" autocomplete="off">
                                     </div>
                                 </div>
                             </li>

+ 2 - 2
app/view/stage/modal.ejs

@@ -442,7 +442,7 @@
                     <div class="input-group-prepend">
                         <span class="input-group-text">计量比例</span>
                     </div>
-                    <input class="form-control nospin" type="number" min="1" max="100" id="cbr-ratio">
+                    <input class="form-control nospin" type="number" min="1" max="100" id="cbr-ratio" autocomplete="off">
                     <div class="input-group-append">
                         <span class="input-group-text">%</span>
                     </div>
@@ -514,7 +514,7 @@
             <div class="modal-body">
                 <div class="form-group">
                     <label id="unlock-info">1-2-2  挖方 解锁密码<b class="text-danger">*</b></label>
-                    <input class="form-control form-control-sm is-invalid" type="password" id="unlock-pwd">
+                    <input class="form-control form-control-sm is-invalid" type="password" id="unlock-pwd" autocomplete="new-password">
                     <div class="invalid-feedback">
                         密码错误
                     </div>

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

@@ -1321,8 +1321,8 @@
             cap100sheet.setColumnWidth(1, 200);
             cap100sheet.getRange(0, 0, 2, 1).vAlign(1).backColor('#e4e7ea').locked(true);
             cap100sheet.getRange(0, 1, 2, 1).vAlign(1).hAlign(2).locked(false);
-            cap100sheet.setText(0, 0, '安全生产费');
-            cap100sheet.setText(1, 0, '扬尘污染费');
+            cap100sheet.setText(0, 0, '安全生产费预付款');
+            cap100sheet.setText(1, 0, '扬尘污染费预付款');
             const cap100lineBorder = new spreadNS.LineBorder('#dee2e6', spreadNS.LineStyle.thin);
             cap100sheet.getRange(0, 0, 2, 2).setBorder(cap100lineBorder, {all: true});
             cap100sheet.getRange(0, 0, 2, 2).formatter('@');

+ 0 - 58
sql/update20220416.sql

@@ -1,58 +0,0 @@
-ALTER TABLE `zh_material` ADD `is_new` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否是新建的调差,用于区分清单新建规则' AFTER `in_time`;
-
-ALTER TABLE `zh_change_plan` ADD `expr` TEXT NULL DEFAULT NULL COMMENT '工程量数量计算式' AFTER `memo`;
-
-ALTER TABLE `zh_change_plan_list` ADD `new_up` tinyint(1) NOT NULL DEFAULT '0' COMMENT '新增单价' AFTER `spamount`;
-
-ALTER TABLE `zh_change_plan_list` ADD `ex_memo1` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注1' AFTER `new_up`;
-
-ALTER TABLE `zh_change_plan_list` ADD `ex_memo2` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注2' AFTER `ex_memo1`;
-
-ALTER TABLE `zh_project_account` ADD `stamp_path` VARCHAR(255) NULL DEFAULT NULL COMMENT '用户签章oss地址' AFTER `sign_path`;
-
-ALTER TABLE `zh_advance_pay` ADD `pay_time` DATETIME NULL DEFAULT NULL COMMENT '支付时间' AFTER `end_time`;
-UPDATE `zh_advance_pay` SET `pay_time`= `create_time`;
-
-CREATE TABLE `zh_material_list_gcl`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `tid` int(11) NOT NULL COMMENT '标段id',
-  `mid` int(11) NOT NULL COMMENT '调差id',
-  `order` tinyint(4) NOT NULL COMMENT '添加的历史期',
-  `gcl_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '工程量id',
-  `mb_id` int(11) NOT NULL COMMENT '工料id',
-  `quantity` decimal(30, 8) NULL DEFAULT NULL COMMENT '数目',
-  `expr` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '公式',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '用于新建期时清单关联已使用过的工程量,创建新的工料与清单的联系表';
-
-CREATE TABLE `zh_construction_unit`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `pid` int(11) NOT NULL COMMENT '项目id',
-  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '单位名称',
-  `type` tinyint(2) NOT NULL COMMENT '单位类型',
-  `corporation` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '法人代表',
-  `credit_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '企业信用代码',
-  `tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '电话',
-  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '地址',
-  `region` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '地区',
-  `website` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '网站',
-  `basic` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '备注',
-  `sign_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '签章图片地址',
-  `create_time` datetime NOT NULL COMMENT '创建时间',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '参建单位表';
-
-CREATE TABLE `zh_stage_import_change` (
-  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
-  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
-  `sid` int(11) unsigned NOT NULL COMMENT '期id',
-  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT '台账节点id',
-  `import_lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT '导入的最底层项目节id',
-  `rela_tid` int(11) unsigned NOT NULL COMMENT '关联标段id',
-  `rela_sid` int(11) unsigned NOT NULL COMMENT '关联期id',
-  `rela_lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT '关联台账id',
-  `rela_cid` varchar(36) CHARACTER SET ascii NOT NULL COMMENT '关联变更令id',
-  `rela_cbid` int(11) unsigned NOT NULL COMMENT '关联变更清单id',
-  `rela_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '关联数量',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2278 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;