|
@@ -22,25 +22,22 @@ $(function () {
|
|
|
level: 'level',
|
|
|
rootId: -1,
|
|
|
fullPath: 'full_path',
|
|
|
- calcFields: ['total_price']
|
|
|
//treeCacheKey: 'ledger_bills_fold' + '_' + getTenderId(),
|
|
|
// markFoldKey: 'bills-fold',
|
|
|
// markFoldSubKey: window.location.pathname.split('/')[2],
|
|
|
};
|
|
|
- treeSetting.calcFun = function (node) {
|
|
|
- node.dgn_price = ZhCalc.round(ZhCalc.div(node.total_price, node.dgn_qty1), 2);
|
|
|
- };
|
|
|
- const ledgerTree = createNewPathTree('base', treeSetting);
|
|
|
+ const ledgerTree = createNewPathTree('filter', treeSetting);
|
|
|
+
|
|
|
+ const static_cols = [
|
|
|
+ {title: '编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
|
|
|
+ {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
|
|
|
+ {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
+ {title: '经济指标', colSpan: '1', rowSpan: '2', field: 'dgn_price', hAlign: 2, width: 60, type: 'Number', readOnly: true},
|
|
|
+ {title: '总设计|工程量', colSpan: '2|1', rowSpan: '1|1', field: 'dgn_qty1', hAlign: 2, width: 70, type: 'Number', readOnly: true},
|
|
|
+ {title: '|金额(万元)', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 70, type: 'Number', readOnly: true},
|
|
|
+ ];
|
|
|
|
|
|
const ledgerSpreadSetting = {
|
|
|
- cols: [
|
|
|
- {title: '编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
|
|
|
- {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
|
|
|
- {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
- {title: '经济指标', colSpan: '1', rowSpan: '2', field: 'dgn_price', hAlign: 2, width: 60, type: 'Number', readOnly: true},
|
|
|
- {title: '总设计|工程量', colSpan: '2|1', rowSpan: '1|1', field: 'dgn_qty1', hAlign: 2, width: 70, type: 'Number', readOnly: true},
|
|
|
- {title: '|金额(万元)', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 70, type: 'Number', readOnly: true},
|
|
|
- ],
|
|
|
emptyRows: 0,
|
|
|
headRows: 2,
|
|
|
headRowHeight: [25, 25],
|
|
@@ -53,21 +50,80 @@ $(function () {
|
|
|
colWidth: true,
|
|
|
}
|
|
|
};
|
|
|
+ const monthsCols = [];
|
|
|
+ if(scheduleMonth.length > 0) {
|
|
|
+ for (const sm of scheduleMonth) {
|
|
|
+ const readOnly = sm.sj_gcl !== null || sm.sj_tp !== null;
|
|
|
+ const yearmonth = sm.yearmonth.split('-')[0] + '年' + parseInt(sm.yearmonth.split('-')[1]) + '月';
|
|
|
+ const cols = {title: yearmonth + '|计划工程量', colSpan: '2|1', rowSpan: '1|1', field: sm.yearmonth+'_gcl', hAlign: 2, width: 90, type: 'Number', readOnly: readOnly ? readOnly : 'readOnly.gcl'};
|
|
|
+ const cols2 = {title: '|计划金额(万元)', colSpan: '|1', rowSpan: '|1', field: sm.yearmonth+'_tp', hAlign: 2, width: 90, type: 'Number', readOnly: readOnly ? readOnly : 'readOnly.tp'};
|
|
|
+ monthsCols.push(cols);
|
|
|
+ monthsCols.push(cols2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const spreadHeaderCols = static_cols.concat(monthsCols);
|
|
|
+ ledgerSpreadSetting.cols = spreadHeaderCols;
|
|
|
+
|
|
|
+ const ledgerCol = {
|
|
|
+ readOnly: {
|
|
|
+ tp: function (data) {
|
|
|
+ let flag = data.is_leaf;
|
|
|
+ if (data.is_leaf) {
|
|
|
+ flag = schedule && schedule.mode === mode.tp;
|
|
|
+ }
|
|
|
+ return !flag;
|
|
|
+ },
|
|
|
+ gcl: function (data) {
|
|
|
+ let flag = data.is_leaf;
|
|
|
+ if (data.is_leaf) {
|
|
|
+ flag = schedule && schedule.mode === mode.gcl;
|
|
|
+ }
|
|
|
+ return !flag;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
|
|
|
sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
|
|
|
if (thousandth) sjsSettingObj.setTpThousandthFormat(ledgerSpreadSetting);
|
|
|
+ SpreadJsObj.initSpreadSettingEvents(ledgerSpreadSetting, ledgerCol);
|
|
|
SpreadJsObj.initSheet(ledgerSpread.getActiveSheet(), ledgerSpreadSetting);
|
|
|
SpreadJsObj.selChangedRefreshBackColor(ledgerSpread.getActiveSheet());
|
|
|
|
|
|
postData('/tender/' + getTenderId() + '/schedule/ledger/load', {}, function (data) {
|
|
|
- console.log(data, selectedLedgerList);
|
|
|
- const treeData = [];
|
|
|
- for(const sl of selectedLedgerList) {
|
|
|
- const one = _.find(data, { 'ledger_id' : sl });
|
|
|
- treeData.push(one);
|
|
|
+ // let treeData = [];
|
|
|
+ // for(const sl of selectedLedgerList) {
|
|
|
+ // const one = _.find(data, { 'ledger_id' : sl });
|
|
|
+ // treeData.push(one);
|
|
|
+ // }
|
|
|
+ // treeData = setLeafData(treeData);
|
|
|
+ // console.log(treeData);
|
|
|
+ // let treeData = data;
|
|
|
+ const baseLedgerTree = createNewPathTree('base', {
|
|
|
+ id: 'ledger_id',
|
|
|
+ pid: 'ledger_pid',
|
|
|
+ order: 'order',
|
|
|
+ level: 'level',
|
|
|
+ rootId: -1,
|
|
|
+ fullPath: 'full_path',
|
|
|
+ calcFields: ['total_price'],
|
|
|
+ calcFun: function (node) {
|
|
|
+ node.dgn_price = ZhCalc.round(ZhCalc.div(node.total_price, node.dgn_qty1), 2);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ baseLedgerTree.loadDatas(data);
|
|
|
+ treeCalc.calculateAll(baseLedgerTree);
|
|
|
+ for (const d of baseLedgerTree.nodes) {
|
|
|
+ if (!d.b_code) {
|
|
|
+ const one = _.find(selectedLedgerList, function (item) {
|
|
|
+ return item === d.ledger_id;
|
|
|
+ });
|
|
|
+ if(one) {
|
|
|
+ ledgerTree.addData(d, ['ledger_id', 'ledger_pid', 'order', 'level', 'tender_id', 'full_path',
|
|
|
+ 'code', 'name', 'unit', 'dgn_qty1', 'dgn_qty2', 'dgn_price', 'quantity', 'total_price']);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- ledgerTree.loadDatas(treeData);
|
|
|
- treeCalc.calculateAll(ledgerTree);
|
|
|
+ ledgerTree.sortTreeNode(true);
|
|
|
// console.log(ledgerTree);
|
|
|
SpreadJsObj.loadSheetData(ledgerSpread.getActiveSheet(), SpreadJsObj.DataType.Tree, ledgerTree);
|
|
|
}, null, true);
|
|
@@ -122,7 +178,148 @@ $(function () {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ editEnded: function (e, info) {
|
|
|
+ if (info.sheet.zh_setting) {
|
|
|
+ const select = SpreadJsObj.getSelectObject(info.sheet);
|
|
|
+ const col = info.sheet.zh_setting.cols[info.col];
|
|
|
+ const validText = is_numeric(info.editingText) ? parseFloat(info.editingText) : (info.editingText ? trimInvalidChar(info.editingText) : null);
|
|
|
+ const orgValue = select[col.field];
|
|
|
+ if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (isNaN(validText)) {
|
|
|
+ toastr.error('不能输入其它非数字类型字符');
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const yearmonth = col.field.split('_')[0];
|
|
|
+ const mode = col.field.split('_')[1];
|
|
|
+ let plan_gcl = 0;
|
|
|
+ let plan_tp = 0;
|
|
|
+ // 判断输入位数,提示
|
|
|
+ if (mode === 'tp') {
|
|
|
+ const reg = new RegExp('^([-]?)\\d+(\\.\\d{0,'+ parseInt(tenderInfo.decimal.tp) +'})?$');
|
|
|
+ console.log(reg);
|
|
|
+ console.log(reg.test(validText));
|
|
|
+ if (validText !== null && (!reg.test(validText))) {
|
|
|
+ toastr.error('输入金额小数位数不能大于' + tenderInfo.decimal.tp + '位');
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ plan_gcl = select.dgn_price && select.dgn_price !== 0 ? ZhCalc.round(ZhCalc.div(validText, select.dgn_price), tenderInfo.decimal.up) : 0;
|
|
|
+ plan_tp = validText;
|
|
|
+ select[yearmonth + '_gcl'] = plan_gcl;
|
|
|
+ } else {
|
|
|
+ const reg = new RegExp('^([-]?)\\d+(\\.\\d{0,'+ parseInt(tenderInfo.decimal.up) +'})?$');
|
|
|
+ if (validText !== null && (!reg.test(validText))) {
|
|
|
+ toastr.error('输入工程量小数位数不能大于' + tenderInfo.decimal.up + '位');
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ plan_gcl = validText;
|
|
|
+ plan_tp = select.dgn_price && select.dgn_price !== 0 ? ZhCalc.round(ZhCalc.mul(validText, select.dgn_price), tenderInfo.decimal.tp) : 0;
|
|
|
+ select[yearmonth + '_tp'] = plan_tp;
|
|
|
+ }
|
|
|
+ select[col.field] = validText;
|
|
|
+ const updateData = {
|
|
|
+ lid: select.ledger_id,
|
|
|
+ yearmonth,
|
|
|
+ plan_gcl,
|
|
|
+ plan_tp,
|
|
|
+ };
|
|
|
+ console.log(updateData);
|
|
|
+ // postData(window.location.pathname + '/save', {type: 'mode', postData: updateData}, function (result) {
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deletePress: function (sheet) {
|
|
|
+ return;
|
|
|
+ },
|
|
|
+ clipboardPasted(e, info) {
|
|
|
+ const hint = {
|
|
|
+ cellError: {type: 'error', msg: '粘贴内容超出了表格范围'},
|
|
|
+ numberExpr: {type: 'error', msg: '不能粘贴其它非数字类型字符'},
|
|
|
+ numberCan: {type: 'error', msg: '请粘贴大于0并且小于3位小数的浮点数'},
|
|
|
+ };
|
|
|
+ const range = info.cellRange;
|
|
|
+ const sortData = info.sheet.zh_data || [];
|
|
|
+ if (info.cellRange.row + info.cellRange.rowCount > sortData.length) {
|
|
|
+ toastMessageUniq(hint.cellError);
|
|
|
+ SpreadJsObj.reLoadSheetHeader(materialMonthSpread.getActiveSheet());
|
|
|
+ SpreadJsObj.reLoadSheetData(materialMonthSpread.getActiveSheet());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (sortData.length > 0 && range.col + range.colCount > 4 + months.length) {
|
|
|
+ toastMessageUniq(hint.cellError);
|
|
|
+ SpreadJsObj.reLoadSheetHeader(materialMonthSpread.getActiveSheet());
|
|
|
+ SpreadJsObj.reLoadSheetData(materialMonthSpread.getActiveSheet());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const data = [];
|
|
|
+ for (let iRow = 0; iRow < range.rowCount; iRow++) {
|
|
|
+ let bPaste = true;
|
|
|
+ const curRow = range.row + iRow;
|
|
|
+ const materialMonthData = sortData[curRow];
|
|
|
+ const hintRow = range.rowCount > 1 ? curRow : '';
|
|
|
+ let sameCol = 0;
|
|
|
+ for (let iCol = 0; iCol < range.colCount; iCol++) {
|
|
|
+ const curCol = range.col + iCol;
|
|
|
+ const colSetting = info.sheet.zh_setting.cols[curCol];
|
|
|
+ if (!colSetting) continue;
|
|
|
+
|
|
|
+ let validText = info.sheet.getText(curRow, curCol);
|
|
|
+ validText = is_numeric(validText) ? parseFloat(validText) : (validText ? trimInvalidChar(validText) : null);
|
|
|
+ const orgValue = sortData[curRow][colSetting.field];
|
|
|
+ if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
|
|
|
+ sameCol++;
|
|
|
+ if (range.colCount === sameCol) {
|
|
|
+ bPaste = false;
|
|
|
+ }
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ const num = parseFloat(validText);
|
|
|
+ if (isNaN(validText)) {
|
|
|
+ toastMessageUniq(getPasteHint(hint.numberExpr, hintRow));
|
|
|
+ bPaste = false;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (validText !== null && (num < 0 || !/^\d+(\.\d{1,3})?$/.test(num))) {
|
|
|
+ toastMessageUniq(getPasteHint(hint.numberCan, hintRow));
|
|
|
+ bPaste = false;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ materialMonthData[colSetting.field] = validText;
|
|
|
+ sortData[curRow][colSetting.field] = validText;
|
|
|
+ }
|
|
|
+ if (bPaste) {
|
|
|
+ data.push(materialMonthData);
|
|
|
+ } else {
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, curRow);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (data.length === 0) {
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.cellRange.row, info.cellRange.rowCount);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // // 更新至服务器
|
|
|
+ // postData(window.location.pathname + '/month/save', { type:'paste', updateData: data }, function (result) {
|
|
|
+ // SpreadJsObj.reLoadSheetData(materialMonthSpread.getActiveSheet());
|
|
|
+ // materialBillsData = result.materialBillsData;
|
|
|
+ // SpreadJsObj.loadSheetData(materialSpread.getActiveSheet(), SpreadJsObj.DataType.Data, materialBillsData);
|
|
|
+ // m_tp = result.m_tp;
|
|
|
+ // resetTpTable();
|
|
|
+ // }, function () {
|
|
|
+ // SpreadJsObj.reLoadRowData(info.sheet, info.cellRange.row, info.cellRange.rowCount);
|
|
|
+ // return;
|
|
|
+ // });
|
|
|
+ },
|
|
|
};
|
|
|
+
|
|
|
+ ledgerSpread.bind(spreadNS.Events.EditEnded, ledgerSpreadObj.editEnded);
|
|
|
+ SpreadJsObj.addDeleteBind(ledgerSpread, ledgerSpreadObj.deletePress);
|
|
|
+
|
|
|
// 进度计算方式选择
|
|
|
$('.mode-select').on('click', function () {
|
|
|
const _self = $(this);
|
|
@@ -132,6 +329,113 @@ $(function () {
|
|
|
$('#mode-tips').show();
|
|
|
$('#mode-cancel').show();
|
|
|
$('#mode').modal('hide');
|
|
|
+ schedule.mode = _self.data('mode');
|
|
|
+ SpreadJsObj.reLoadSheetData(ledgerSpread.getActiveSheet());
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ // 月份添加
|
|
|
+ $('#add-month').click(function () {
|
|
|
+ const range = $('#month-range').val();
|
|
|
+ if(range === '') {
|
|
|
+ toastr.error('请选择计划周期时间');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const addMonthList = [];
|
|
|
+ const cycle = range.split(' ~ ');
|
|
|
+ if(cycle.length === 1) {
|
|
|
+ addMonthList.push(cycle[0]);
|
|
|
+ } else {
|
|
|
+ // 多个月份
|
|
|
+ const back_year = parseInt(cycle[1].split('-')[0]);
|
|
|
+ const back_month = parseInt(cycle[1].split('-')[1]);
|
|
|
+ const front_year = parseInt(cycle[0].split('-')[0]);
|
|
|
+ const front_month = parseInt(cycle[0].split('-')[1]);
|
|
|
+ if(back_year > front_year) {
|
|
|
+ const num = getDistanceMonth(cycle[0], cycle[1]);
|
|
|
+ let j = 1;
|
|
|
+ for (let i = 0; i <= num; i++) {
|
|
|
+ if(front_month + i > 12*j) {
|
|
|
+ j = j + 1;
|
|
|
+ }
|
|
|
+ const m = (front_month + i)%12 === 0 ? 12 : (front_month + i)%12;
|
|
|
+ addMonthList.push((front_year + (j-1)) + '-' + (m < 10 ? '0' + m : m));
|
|
|
+ }
|
|
|
+ } else if (back_year === front_year) {
|
|
|
+ // 小于1年并没有跨年
|
|
|
+ for (let i = front_month; i <= back_month; i++) {
|
|
|
+ addMonthList.push(back_year + '-' + (i < 10 ? '0' + i : i));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 判断是否已添加本月份
|
|
|
+ if (addMonthList.length > 0) {
|
|
|
+ const hadmonth = [];
|
|
|
+ for (const m of addMonthList) {
|
|
|
+ const one = _.find(scheduleMonth, { yearmonth: m });
|
|
|
+ console.log(one, m);
|
|
|
+ if (one) {
|
|
|
+ hadmonth.push(m);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (hadmonth.length > 0) {
|
|
|
+ let html = '';
|
|
|
+ for (const hm of hadmonth) {
|
|
|
+ html += `<div class="alert alert-danger">${hm} 已创建</div>`;
|
|
|
+ }
|
|
|
+ $('#add-month-error-list').html(html);
|
|
|
+ $('#add-month-error-list').show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ toastr.error('请选择计划周期时间');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $('#add-month-error-list').html('');
|
|
|
+ $('#add-month-error-list').hide();
|
|
|
+ const _self = $(this);
|
|
|
+ postData(window.location.pathname + '/save', {type: 'addmonth', postData: addMonthList}, function (result) {
|
|
|
+ _self.addClass('disabled').attr('disabled', true);
|
|
|
+ toastr.success('新增成功');
|
|
|
+ setTimeout(function () {
|
|
|
+ window.location.reload();
|
|
|
+ }, 500)
|
|
|
+
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#month-table input[type="checkbox"]').click(function () {
|
|
|
+ const selectedMonth = [];
|
|
|
+ $('#month-table input:checkbox:checked').each(function () {
|
|
|
+ selectedMonth.push('「' + $(this).parents('td').siblings('td').text() + '」');
|
|
|
+ });
|
|
|
+ if(selectedMonth.length > 0) {
|
|
|
+ $('#del-month-list').text(selectedMonth.join(''));
|
|
|
+ $('#del-month-list').parent().show();
|
|
|
+ $('#del-month').removeAttr('disabled');
|
|
|
+ } else {
|
|
|
+ $('#del-month-list').parent().hide();
|
|
|
+ $('#del-month').attr('disabled', true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#del-month').click(function () {
|
|
|
+ const selectedMonth = [];
|
|
|
+ $('#month-table input:checkbox:checked').each(function () {
|
|
|
+ selectedMonth.push($(this).parents('td').siblings().text());
|
|
|
+ });
|
|
|
+ if (selectedMonth.length === 0) {
|
|
|
+ toastr.error('请选择删除的计划周期');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const _self = $(this);
|
|
|
+ postData(window.location.pathname + '/save', {type: 'delmonth', postData: selectedMonth}, function (result) {
|
|
|
+ _self.addClass('disabled').attr('disabled', true);
|
|
|
+ toastr.success('删除成功');
|
|
|
+ setTimeout(function () {
|
|
|
+ window.location.reload();
|
|
|
+ }, 500)
|
|
|
+
|
|
|
})
|
|
|
});
|
|
|
|
|
@@ -153,3 +457,37 @@ $(function () {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+// 月份间隔
|
|
|
+function getDistanceMonth(startTime,endTime){
|
|
|
+ startTime = new Date(startTime);
|
|
|
+ endTime = new Date(endTime);
|
|
|
+ var dateToMonth = 0;
|
|
|
+ var startDate=startTime.getDate() + startTime.getHours()/24 + startTime.getMinutes()/24/60;
|
|
|
+ var endDate=endTime.getDate() +endTime.getHours()/24 + endTime.getMinutes()/24/60;
|
|
|
+ if(endDate >= startDate){
|
|
|
+ dateToMonth = 0;
|
|
|
+ }else{
|
|
|
+ dateToMonth = -1;
|
|
|
+ }
|
|
|
+ let yearToMonth = (endTime.getYear() - startTime.getYear()) * 12;
|
|
|
+ let monthToMonth = endTime.getMonth() - startTime.getMonth();
|
|
|
+ return yearToMonth + monthToMonth + dateToMonth;
|
|
|
+}
|
|
|
+function setLeafData(tree) {
|
|
|
+ const newtree = [];
|
|
|
+ for (const t of tree) {
|
|
|
+ const child = _.find(tree, { 'ledger_pid': t.ledger_id });
|
|
|
+ if (!child && !t.is_leaf) {
|
|
|
+ t.is_leaf = true;
|
|
|
+ }
|
|
|
+ newtree.push(t);
|
|
|
+ }
|
|
|
+ return newtree;
|
|
|
+}
|
|
|
+const is_numeric = (value) => {
|
|
|
+ if (typeof(value) === 'object') {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return !Number.isNaN(Number(value)) && value.toString().trim() !== '';
|
|
|
+ }
|
|
|
+};
|