|
@@ -35,8 +35,9 @@ function limitDecimal(obj) {
|
|
|
}
|
|
|
|
|
|
const invalidFields = {
|
|
|
- parent: ['total_price', 'unit_price'],
|
|
|
+ parent: ['quantity', 'total_price', 'unit_price'],
|
|
|
gcl: ['dgn_qty1', 'dgn_qty2', 'total_price'],
|
|
|
+ xmj: ['quantity', 'unit_price'],
|
|
|
};
|
|
|
$(document).ready(() => {
|
|
|
const copyBlockTag = 'zh.calc.copyBlock';
|
|
@@ -287,14 +288,12 @@ $(document).ready(() => {
|
|
|
}
|
|
|
switch (col.field) {
|
|
|
case 'unit_price':
|
|
|
+ case 'quantity':
|
|
|
info.cancel = (node.children && node.children.length > 0) || !node.b_code;
|
|
|
break;
|
|
|
case 'total_price':
|
|
|
info.cancel = (node.children && node.children.length > 0) || node.b_code;
|
|
|
break;
|
|
|
- case 'quantity':
|
|
|
- info.cancel = (node.children && node.children.length > 0);
|
|
|
- break;
|
|
|
case 'dgn_price':
|
|
|
info.cance = false;
|
|
|
break;
|
|
@@ -362,7 +361,8 @@ $(document).ready(() => {
|
|
|
const hint = {
|
|
|
invalidNum: {type: 'warning', msg: '粘贴的数字非法'},
|
|
|
parent: {type: 'warning', msg: `含有子项,不可粘贴${needGcl ? '数量、单价、' : ''}金额`},
|
|
|
- gcl: {type: 'warning', msg: '工程量清单,不可粘贴项目节数量、金额'}
|
|
|
+ gcl: {type: 'warning', msg: '工程量清单,不可粘贴项目节数量、金额'},
|
|
|
+ xmj: {type: 'warning', msg: '项目节,不可粘贴数量、单价'},
|
|
|
};
|
|
|
const datas = [], filterNodes = [];
|
|
|
|
|
@@ -386,6 +386,10 @@ $(document).ready(() => {
|
|
|
toastMessageUniq(hint.gcl);
|
|
|
continue;
|
|
|
}
|
|
|
+ if (_.isEmpty(node.b_code) && invalidFields.xmj.indexOf(colSetting.field) >= 0) {
|
|
|
+ toastMessageUniq(hint.xmj);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
if (colSetting.type === 'Number') {
|
|
|
if (colSetting.type === 'Number') {
|