Преглед на файлове

变更清单变更数量表达式功能及修复变更后bug

ellisran преди 1 година
родител
ревизия
78a7d5fd4c

+ 2 - 2
app/controller/change_controller.js

@@ -731,7 +731,7 @@ module.exports = app => {
                                 cl['audit_amount_' + au.uid] = audit_amount[index - 1] ? audit_amount[index - 1] : null;
                             }
                         }
-                        cl.changed_amount = (change.status === audit.flow.status.backnew || change.status === audit.flow.status.checking || change.status === audit.flow.status.checked) && audit_amount !== '' ? audit_amount[audit_amount.length - 1] : cl.camount;
+                        cl.changed_amount = (change.status === audit.flow.status.backnew || change.status === audit.flow.status.checking || change.status === audit.flow.status.checked) ? (audit_amount !== '' ? audit_amount[audit_amount.length - 1] : 0) : cl.camount;
                         // cl.changed_amount = ctx.helper.add(cl.oamount ? parseFloat(cl.oamount) : 0, changed_amount ? parseFloat(changed_amount) : 0);
                     }
                     renderData.changeList = changeList;
@@ -782,7 +782,7 @@ module.exports = app => {
                                 cl['audit_amount_' + au.uid] = au.uid === ctx.session.sessionUser.accountId ? cl.spamount : (audit_amount[index - 1] ? audit_amount[index - 1] : null);
                             }
                         }
-                        cl.changed_amount = (change.status === audit.flow.status.backnew || change.status === audit.flow.status.checking || change.status === audit.flow.status.checked) && audit_amount !== '' ? audit_amount[audit_amount.length - 1] : cl.camount;
+                        cl.changed_amount = (change.status === audit.flow.status.backnew || change.status === audit.flow.status.checking || change.status === audit.flow.status.checked) ? (audit_amount !== '' ? audit_amount[audit_amount.length - 1] : 0) : cl.camount;
                         // cl.changed_amount = ctx.helper.add(cl.oamount ? parseFloat(cl.oamount) : 0, changed_amount ? parseFloat(changed_amount) : 0);
                     }
                     renderData.changeList = changeList;

+ 7 - 0
app/public/js/change_information_approval.js

@@ -147,7 +147,14 @@ $(document).ready(() => {
             SpreadJsObj.loadSheetData(xmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, xmj);
         },
         selectionChanged: function (e, info) {
+            const sel = info.sheet.getSelections()[0];
+            const col = info.sheet.zh_setting.cols[sel.col];
             const data = SpreadJsObj.getSelectObject(info.sheet);
+            if (col && col.field === 'camount' && data) {
+                $('#camount-expr').val(data.camount_expr ? data.camount_expr : data.camount);
+            } else {
+                $('#camount-expr').val('');
+            }
             changeSpreadObj.resetXmjSpread(data);
         },
         setRowValueAndSum: function (data, row, col) {

+ 294 - 33
app/public/js/change_information_set.js

@@ -176,7 +176,7 @@ $(document).ready(() => {
         },
     };
     // 数字只判断几个值(unit_price, oamount, camount)
-    const numField = ['unit_price', 'oamount', 'camount'];
+    const numField = ['unit_price', 'oamount'];
     const changeSpreadObj = {
         makeSjsFooter: function () {
             // 增加汇总行并设为锁定禁止编辑状态
@@ -393,6 +393,15 @@ $(document).ready(() => {
             }
             SpreadJsObj.loadSheetData(xmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, xmj);
         },
+        editStarting: function (e, info) {
+            const col = info.sheet.zh_setting.cols[info.col];
+            const select = SpreadJsObj.getSelectObject(info.sheet);
+            if (col.field === 'camount') {
+                if (select.camount_expr && select.camount_expr !== '') {
+                    info.sheet.getCell(info.row, info.col).text(select.camount_expr);
+                }
+            }
+        },
         selectionChanged: function (e, info) {
             const sel = info.sheet.getSelections()[0];
             const col = info.sheet.zh_setting.cols[sel.col];
@@ -400,6 +409,11 @@ $(document).ready(() => {
             if (col && col.field === 'del_list' && data && !_.find(changeUsedData, { cbid: data.id })) {
                 changeSpreadObj.del();
             }
+            if (col && col.field === 'camount' && data) {
+                $('#camount-expr').removeAttr('readonly').val(data.camount_expr ? data.camount_expr : data.camount);
+            } else {
+                $('#camount-expr').attr('readonly', true).val('');
+            }
             changeSpreadObj.resetXmjSpread(data);
             changeSpreadObj.refreshActn();
         },
@@ -442,31 +456,44 @@ $(document).ready(() => {
                 if (col.field === 'del_list') {
                     return;
                 }
-                // 未改变值则不提交
                 let validText = is_numeric(info.editingText) && _.indexOf(numField, col.field) !== -1 ? parseFloat(info.editingText) : (info.editingText ? trimInvalidChar(info.editingText) : '');
-                const orgValue = select[col.field];
-                if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
+                let orgValue;
+                if (col.field === 'camount') {
+                    orgValue = validText && validText !== ''
+                        ? (_.toNumber(validText) ? select.camount : select.camount_expr)
+                        : (select.camount_expr && select.camount_expr !== '' ? select.camount_expr : select.camount);
+                } else {
+                    orgValue = select[col.field];
+                }
+                if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === '' || validText === null))) {
                     SpreadJsObj.reLoadRowData(info.sheet, info.row);
                     return;
                 }
+                // // 未改变值则不提交
+                // let validText = is_numeric(info.editingText) && _.indexOf(numField, col.field) !== -1 ? parseFloat(info.editingText) : (info.editingText ? trimInvalidChar(info.editingText) : '');
+                // const orgValue = select[col.field];
+                // if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
+                //     SpreadJsObj.reLoadRowData(info.sheet, info.row);
+                //     return;
+                // }
                 // 判断部分值是否输入的是数字判断和数据计算
-                if (col.type === 'Number') {
-                    if (isNaN(validText)) {
-                        toastr.error('不能输入其它非数字类型字符');
+                if(col.field === 'camount') {
+                    const exprQuantity = {
+                        expr: '',
+                        quantity: 0,
+                    };
+                    const [valid, msg] = changeSpreadObj._checkExpr(validText, exprQuantity);
+                    if (!valid) {
+                        toastr.error(msg);
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);
                         return;
                     }
-                    if (col.field === 'unit_price') {
-                        validText = ZhCalc.round(validText, unitPriceUnit);
-                    } else {
-                        validText = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
+                    if (isNaN(exprQuantity.quantity)) {
+                        toastr.error('不能输入其它非数字类型字符');
+                        SpreadJsObj.reLoadRowData(info.sheet, info.row);
+                        return;
                     }
-                }
-                if (col.field === 'unit') {
-                    select.camount = ZhCalc.round(select.camount, findDecimal(validText)) || 0;
-                    select.oamount = ZhCalc.round(select.oamount, findDecimal(validText)) || 0;
-                }
-                if(col.field === 'camount') {
+                    validText = parseFloat(exprQuantity.quantity);
                     // 判断是否 正数必须大于等于限制值,负数必须小于等于限制值,否则无法更改
                     const usedInfo = _.find(changeUsedData, { cbid: select.id });
                     if (usedInfo && usedInfo.qty >= 0 && validText < usedInfo.qty) {
@@ -479,6 +506,23 @@ $(document).ready(() => {
                         return;
                     }
                     select.spamount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
+                    select.camount_expr = exprQuantity.expr;
+                }
+                if (col.type === 'Number') {
+                    if (isNaN(validText)) {
+                        toastr.error('不能输入其它非数字类型字符');
+                        SpreadJsObj.reLoadRowData(info.sheet, info.row);
+                        return;
+                    }
+                    if (col.field === 'unit_price') {
+                        validText = ZhCalc.round(validText, unitPriceUnit);
+                    } else {
+                        validText = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
+                    }
+                }
+                if (col.field === 'unit') {
+                    select.camount = ZhCalc.round(select.camount, findDecimal(validText)) || 0;
+                    select.oamount = ZhCalc.round(select.oamount, findDecimal(validText)) || 0;
                 }
                 select[col.field] = validText;
                 // console.log(select);
@@ -543,7 +587,14 @@ $(document).ready(() => {
 
                     let validText = info.sheet.getText(curRow, curCol);
                     validText = is_numeric(validText) && _.indexOf(numField, colSetting.field) !== -1 ? parseFloat(validText) : (validText ? trimInvalidChar(validText) : '');
-                    const orgValue = sortData[curRow][colSetting.field];
+                    let orgValue;
+                    if (colSetting.field === 'camount') {
+                        orgValue = validText && validText !== ''
+                            ? (_.toNumber(validText) ? sortData[curRow].camount : sortData[curRow].camount_expr)
+                            : (sortData[curRow].camount_expr && sortData[curRow].camount_expr !== '' ? sortData[curRow].camount_expr : sortData[curRow].camount);
+                    } else {
+                        orgValue = sortData[curRow][colSetting.field];
+                    }
                     if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
                         sameCol++;
                         if (range.colCount === sameCol)  {
@@ -552,6 +603,37 @@ $(document).ready(() => {
                         continue;
                     }
 
+                    if(colSetting.field === 'camount') {
+                        const exprQuantity = {
+                            expr: '',
+                            quantity: 0,
+                        };
+                        const [valid, msg] = changeSpreadObj._checkExpr(validText, exprQuantity);
+                        if (!valid) {
+                            toastMessageUniq(getPasteHint(msg, hintRow));
+                            bPaste = false;
+                            continue;
+                        }
+                        if (isNaN(exprQuantity.quantity)) {
+                            toastMessageUniq(getPasteHint(hint.numberExpr, hintRow));
+                            bPaste = false;
+                            continue;
+                        }
+                        validText = parseFloat(exprQuantity.quantity);
+                        // 判断是否 正数必须大于等于限制值,负数必须小于等于限制值,否则无法更改
+                        const usedInfo = _.find(changeUsedData, { cbid: sortData[curRow].id });
+                        if (usedInfo && usedInfo.qty >= 0 && validText < usedInfo.qty) {
+                            toastr.error(hintRow ? '清单' + (hintRow+1) + '行变更数值必须大于等于已调用值 ' + usedInfo.qty : '清单变更数值必须大于等于已调用值 ' + usedInfo.qty);
+                            bPaste = false;
+                            continue;
+                        } else if (usedInfo && usedInfo.qty < 0 && validText > usedInfo.qty) {
+                            toastr.error(hintRow ? '清单' + (hintRow+1) + '行变更数值必须小于等于已调用值 ' + usedInfo.qty : '清单变更数值必须小于等于已调用值 ' + usedInfo.qty);
+                            bPaste = false;
+                            continue;
+                        }
+                        cLData.camount_expr = exprQuantity.expr;
+                        sortData[curRow].camount_expr = exprQuantity.expr;
+                    }
                     if (colSetting.type === 'Number') {
                         if (isNaN(validText)) {
                             toastMessageUniq(getPasteHint(hint.numberExpr, hintRow));
@@ -563,19 +645,6 @@ $(document).ready(() => {
                         } else {
                             validText = ZhCalc.round(validText, findDecimal(sortData[curRow].unit)) || 0;
                         }
-                        if(colSetting.field === 'camount') {
-                            // 判断是否 正数必须大于等于限制值,负数必须小于等于限制值,否则无法更改
-                            const usedInfo = _.find(changeUsedData, { cbid: sortData[curRow].id });
-                            if (usedInfo && usedInfo.qty >= 0 && validText < usedInfo.qty) {
-                                toastr.error(hintRow ? '清单' + (hintRow+1) + '行变更数值必须大于等于已调用值 ' + usedInfo.qty : '清单变更数值必须大于等于已调用值 ' + usedInfo.qty);
-                                bPaste = false;
-                                continue;
-                            } else if (usedInfo && usedInfo.qty < 0 && validText > usedInfo.qty) {
-                                toastr.error(hintRow ? '清单' + (hintRow+1) + '行变更数值必须小于等于已调用值 ' + usedInfo.qty : '清单变更数值必须小于等于已调用值 ' + usedInfo.qty);
-                                bPaste = false;
-                                continue;
-                            }
-                        }
                     }
                     let unitdecimal = validText;
                     if (colSetting.field === 'unit') {
@@ -618,7 +687,132 @@ $(document).ready(() => {
         valueChanged(e, info) {
             // 防止ctrl+z撤销数据
             SpreadJsObj.reLoadRowData(info.sheet, info.row);
-        }
+        },
+        _checkExprValid(expr) {
+            if (!expr) return [true, null];
+            const param = [];
+            let num = '', base = '';
+            for (let i = 0, iLen = expr.length; i < iLen; i++) {
+                if (/^[\d\.%]+/.test(expr[i])) {
+                    if (base !== '') {
+                        param.push({type: 'base', value: base});
+                        base = '';
+                    }
+                    num = num + expr[i];
+                } else if (expr[i] === '(') {
+                    if (num !== '') {
+                        param.push({type: 'num', value: num});
+                        num = '';
+                    }
+                    if (base !== '') {
+                        param.push({type: 'base', value: base});
+                        base = '';
+                    }
+                    param.push({type: 'left', value: '('});
+                } else if (expr[i] === ')') {
+                    if (num !== '') {
+                        param.push({type: 'num', value: num});
+                        num = '';
+                    }
+                    if (base !== '') {
+                        param.push({type: 'base', value: base});
+                        base = '';
+                    }
+                    param.push({type: 'right', value: ')'});
+                } else if (/^[\+\-*\/]/.test(expr[i])) {
+                    if (num !== '') {
+                        param.push({type: 'num', value: num});
+                        num = '';
+                    }
+                    if (base !== '') {
+                        param.push({type: 'base', value: base});
+                        base = '';
+                    }
+                    param.push({type: 'calc', value: expr[i]});
+                } else {
+                    return [false, '输入的表达式含有非法字符: ' + expr[i]];
+                }
+            }
+            if (num !== '') {
+                param.push({type: 'num', value: num});
+                num = '';
+            }
+            if (base !== '') {
+                param.push({type: 'base', value: base});
+                base = '';
+            }
+            if (param.length === 0) return true;
+            if (param.length > 1) {
+                if (param[0].value === '-') {
+                    param[1].value = '-' + param[1];
+                }
+                param.unshift();
+            }
+            const iLen = param.length;
+            let iLeftCount = 0, iRightCount = 0;
+            for (const [i, p] of param.entries()) {
+                if (p.type === 'calc') {
+                    if (i === 0 || i === iLen - 1)
+                        return [false, '输入的表达式非法:计算符号' + p.value + '前后应有数字'];
+                }
+                if (p.type === 'num') {
+                    num = p.value.replace('%', '');
+                    if (p.value.length - num.length > 1)
+                        return [false, '输入的表达式非法:' + p.value + '不是一个有效的数字'];
+                    num = _.toNumber(num);
+                    if (num === undefined || num === null || _.isNaN(num))
+                        return [false, '输入的表达式非法:' + p.value + '不是一个有效的数字'];
+                    if (i > 0) {
+                        if (param[i - 1].type !== 'calc' && param[i - 1].type !== 'left') {
+                            return [false, '输入的表达式非法:' + p.value + '前应有运算符'];
+                        } else if (param[i - 1].value === '/' && num === 0) {
+                            return [false, '输入的表达式非法:请勿除0'];
+                        }
+                    }
+                }
+                if (p.type === 'base') {
+                    if (i > 0 && (param[i - 1].type === 'num' || param[i - 1].type === 'right'))
+                        return [false, '输入的表达式非法:' + p.value + '前应有运算符'];
+                }
+                if (p.type === 'left') {
+                    iLeftCount += 1;
+                    if (i !== 0 && param[i-1].type !== 'calc')
+                        return [false, '输入的表达式非法:(前应有运算符'];
+                }
+                if (p.type === 'right') {
+                    iRightCount += 1;
+                    if (i !== iLen - 1 && param[i+1].type !== 'calc')
+                        return [false, '输入的表达式非法:)后应有运算符'];
+                    if (iRightCount > iLeftCount)
+                        return [false, '输入的表达式非法:")"前无对应的"("'];
+                }
+            }
+            if (iLeftCount > iRightCount)
+                return [false, '输入的表达式非法:"("后无对应的")"'];
+            return [true, ''];
+        },
+        _checkExpr: function (text, data) {
+            if (text) {
+                const num = _.toNumber(text);
+                if (num) {
+                    data.quantity = num;
+                    data.expr = '';
+                } else {
+                    const expr = $.trim(text).replace('\t', '').replace('=', '').toLowerCase();
+                    const [valid, msg] = this._checkExprValid(expr);
+                    if (!valid) return [valid, msg];
+                    data.expr = expr;
+                    data.quantity = ZhCalc.calcExpr.calcExprStrRpn(expr);
+                    // const ce = new CalcEvalMin();
+                    // data.quantity = ce.eval(expr);
+                    // console.log(data.quantity);
+                }
+            } else {
+                data.quantity = 0;
+                data.expr = '';
+            }
+            return [true, ''];
+        },
     };
 
     const preUrl = window.location.pathname.split('/').slice(0, 4).join('/');
@@ -736,6 +930,7 @@ $(document).ready(() => {
         $('#up-move').click(changeSpreadObj.upMove);
         $('#down-move').click(changeSpreadObj.downMove);
         changeSpread.bind(spreadNS.Events.EditEnded, changeSpreadObj.editEnded);
+        changeSpread.bind(spreadNS.Events.EditStarting, changeSpreadObj.editStarting);
         changeSpread.bind(spreadNS.Events.SelectionChanged, changeSpreadObj.selectionChanged);
         changeSpread.bind(spreadNS.Events.ClipboardPasted, changeSpreadObj.clipboardPasted);
         changeSpread.bind(spreadNS.Events.ValueChanged, changeSpreadObj.valueChanged);
@@ -974,6 +1169,70 @@ $(document).ready(() => {
                 },
             }
         });
+
+        // 表达式判断
+        $('#camount-expr').change(function () {
+            if (this.readOnly) return;
+            let validText = $(this).val();
+            const sel = changeSpreadSheet.getSelections()[0];
+            const row = sel ? sel.row : -1;
+            const col = changeSpreadSheet.zh_setting.cols[sel.col];
+            if (row === -1 || !(col && col.field === 'camount')) return;
+            const select = SpreadJsObj.getSelectObject(changeSpreadSheet);
+            if (!select) return;
+            validText = is_numeric(validText) ? parseFloat(validText) : (validText ? trimInvalidChar(validText) : '');
+            let orgValue = validText && validText !== ''
+                    ? (_.toNumber(validText) ? select.camount : select.camount_expr)
+                    : (select.camount_expr && select.camount_expr !== '' ? select.camount_expr : select.camount);
+            const orgExprValue = _.clone(select.camount_expr);
+            if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === '' || validText === null))) {
+                return;
+            }
+            const exprQuantity = {
+                expr: '',
+                quantity: 0,
+            };
+            const [valid, msg] = changeSpreadObj._checkExpr(validText, exprQuantity);
+            if (!valid) {
+                toastr.error(msg);
+                $(this).val(select.camount_expr ? select.camount_expr : select.camount);
+                return;
+            }
+            if (isNaN(exprQuantity.quantity)) {
+                toastr.error('不能输入其它非数字类型字符');
+                $(this).val(select.camount_expr ? select.camount_expr : select.camount);
+                return;
+            }
+            validText = parseFloat(exprQuantity.quantity);
+            // 判断是否 正数必须大于等于限制值,负数必须小于等于限制值,否则无法更改
+            const usedInfo = _.find(changeUsedData, { cbid: select.id });
+            if (usedInfo && usedInfo.qty >= 0 && validText < usedInfo.qty) {
+                toastr.error('清单变更数值必须大于等于已调用值 ' + usedInfo.qty);
+                $(this).val(select.camount_expr ? select.camount_expr : select.camount);
+                return;
+            } else if (usedInfo && usedInfo.qty < 0  && validText > usedInfo.qty) {
+                toastr.error('清单变更数值必须小于等于已调用值 ' + usedInfo.qty);
+                $(this).val(select.camount_expr ? select.camount_expr : select.camount);
+                return;
+            }
+            select.spamount = ZhCalc.round(validText, findDecimal(select.unit)) || 0;
+            select.camount_expr = exprQuantity.expr;
+            select.camount = validText;
+            // console.log(select);
+            delete select.waitingLoading;
+
+            // 更新至服务器
+            postData(window.location.pathname + '/save', { type:'update', updateData: select }, function (result) {
+                changeList.splice(row, 1, select);
+                SpreadJsObj.reLoadRowData(changeSpreadSheet, row);
+                changeSpreadObj.countSum();
+            }, function () {
+                select.camount = orgValue;
+                select.camount_expr = orgExprValue;
+                select.spamount = orgValue;
+                SpreadJsObj.reLoadRowData(changeSpreadSheet, row);
+            });
+        });
     }
 
     // 清单选中和移除
@@ -986,7 +1245,7 @@ $(document).ready(() => {
         const data_charu = $(this).attr('data-charu') ? $(this).attr('data-charu').split('$#$') : [];
         const isDeal = $(this).data('gcl') !== undefined ? true : false;
         let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'" gcl_id="" mx_id=""><td class="text-center">1</td><td colspan="7" class="colspan_1">&nbsp;</td><td class="colspan_2 text-center"><input type="checkbox"></td></tr>';
-        console.log(isDeal, isCheck);
+        // console.log(isDeal, isCheck);
         if (isDeal) {
             const lid = $(this).data('lid');
             let gcl = _.find(gclGatherData, function (item) {
@@ -1929,6 +2188,7 @@ function remakeChangeSpread(cOrder = changeOrder) {
                 unit_price: price,
                 oamount,
                 camount: scnum,
+                camount_expr: '',
                 detail: '',
                 lid,
                 xmj_code,
@@ -1945,6 +2205,7 @@ function remakeChangeSpread(cOrder = changeOrder) {
             });
             if (radionInfo) {
                 trlist.camount = radionInfo.camount;
+                trlist.camount_expr = radionInfo.camount_expr;
                 trlist.detail = radionInfo.detail;
             }
             newTableList.push(trlist);

+ 7 - 0
app/public/js/change_information_show.js

@@ -121,7 +121,14 @@ $(document).ready(() => {
             SpreadJsObj.loadSheetData(xmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, xmj);
         },
         selectionChanged: function (e, info) {
+            const sel = info.sheet.getSelections()[0];
+            const col = info.sheet.zh_setting.cols[sel.col];
             const data = SpreadJsObj.getSelectObject(info.sheet);
+            if (col && col.field === 'camount' && data) {
+                $('#camount-expr').val(data.camount_expr ? data.camount_expr : data.camount);
+            } else {
+                $('#camount-expr').val('');
+            }
             changeSpreadObj.resetXmjSpread(data);
         },
         setAuditValue: function () {

+ 2 - 0
app/service/change_audit_list.js

@@ -95,6 +95,7 @@ module.exports = app => {
                     unit_price: null,
                     oamount: 0,
                     camount: 0,
+                    camount_expr: '',
                     samount: '',
                     detail: '',
                     spamount: 0,
@@ -157,6 +158,7 @@ module.exports = app => {
                         unit_price: null,
                         oamount: 0,
                         camount: 0,
+                        camount_expr: '',
                         samount: '',
                         detail: '',
                         spamount: 0,

+ 8 - 0
app/view/change/information.ejs

@@ -56,6 +56,14 @@
                         <a href="javascript:void(0)" id="down-move" class="btn btn-sm btn-light text-primary" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
                     </div>
                 <% } %>
+                <div class="d-inline-block">
+                    <div class="input-group input-group-sm ml-2">
+                        <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="camount-expr" readonly="readOnly" autocomplete="off">
+                    </div>
+                </div>
                 <% if (showPlanBtn) { %>
                 <div class="d-inline-block ml-3">
                     <a class="btn btn-sm btn-primary" href="#bgfadb" data-toggle="modal" data-target="#bgfadb">差值对比</a>

+ 1 - 1
app/view/layout/menu.ejs

@@ -27,7 +27,7 @@
             <li><a href="https://doc.zhzdwd.com/docs/yunjiliangAPI/yunjiliangAPI-1ccjk7h426enp" target="_blank" data-toggle="tooltip" data-placement="right" title="" data-original-title="数据接口">API</a></li>
         </ul>
         <ul class="nav nav-pills nav-stacked bg-nav">
-            <li <% if (ctx.controllerName === 'setting') { %>class="active"<% } %>><a href="/setting/info" data-toggle="tooltip" data-placement="right" title="" data-original-title="项目信息"><i class="fa fa-cogs"></i><span>项目信息</span></a></li>
+            <li <% if (ctx.controllerName === 'setting') { %>class="active"<% } %>><a href="/setting/info" data-toggle="tooltip" data-placement="right" title="" data-original-title="项目设置"><i class="fa fa-cogs"></i><span>项目设置</span></a></li>
         </ul>
         <div class="dropup mb-1 ml-1 mr-1">
             <a href="" class="btn btn-sm btn-light p-1 w-100" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">

+ 3 - 0
sql/update.sql

@@ -6,3 +6,6 @@ ADD COLUMN `tp_data` json DEFAULT NULL COMMENT '上报人上报时的金额数
 
 ALTER TABLE `zh_tender`
 ADD COLUMN `material_col_show` json DEFAULT NULL COMMENT '调差列表展示合计控制';
+
+ALTER TABLE `zh_change_audit_list`
+ADD COLUMN `camount_expr` varchar(500) DEFAULT '' COMMENT '变更数量计算式' AFTER `camount`;