|
@@ -90,7 +90,7 @@ $(document).ready(() => {
|
|
|
{title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 120, formatter: '@', readOnly: 'readOnly.isEdit'},
|
|
|
{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.isEdit', cellType: 'unit', comboItems: changeUnits},
|
|
|
+ {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: 'readOnly.isEdit', cellType: 'unit', comboItems: changeUnits, comboEdit: true},
|
|
|
{title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number', readOnly: 'readOnly.isEdit', getValue: 'getValue.unit_price'},
|
|
|
{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'},
|
|
@@ -322,6 +322,7 @@ $(document).ready(() => {
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
+
|
|
|
if (colSetting.type === 'Number') {
|
|
|
if (isNaN(validText)) {
|
|
|
toastMessageUniq(getPasteHint(hint.numberExpr, hintRow));
|
|
@@ -334,17 +335,18 @@ $(document).ready(() => {
|
|
|
validText = ZhCalc.round(validText, findDecimal(sortData[curRow].unit)) || 0;
|
|
|
}
|
|
|
}
|
|
|
+ let unitdecimal = validText;
|
|
|
if (colSetting.field === 'unit') {
|
|
|
//粘贴内容要为下拉列表里所有的单位,不然为空
|
|
|
if (changeUnits.indexOf(validText) === -1) {
|
|
|
- validText = '';
|
|
|
+ unitdecimal = '';
|
|
|
}
|
|
|
- cLData.camount = ZhCalc.round(sortData[curRow].camount, findDecimal(validText)) || 0;
|
|
|
- cLData.oamount = ZhCalc.round(sortData[curRow].oamount, findDecimal(validText)) || 0;
|
|
|
+ cLData.camount = ZhCalc.round(sortData[curRow].camount, findDecimal(unitdecimal)) || 0;
|
|
|
+ cLData.oamount = ZhCalc.round(sortData[curRow].oamount, findDecimal(unitdecimal)) || 0;
|
|
|
}
|
|
|
cLData[colSetting.field] = validText;
|
|
|
sortData[curRow][colSetting.field] = validText;
|
|
|
- cLData.spamount = ZhCalc.round(sortData[curRow].camount, findDecimal(validText)) || 0;
|
|
|
+ cLData.spamount = ZhCalc.round(sortData[curRow].camount, findDecimal(unitdecimal)) || 0;
|
|
|
}
|
|
|
if (bPaste) {
|
|
|
data.push(cLData);
|