|
@@ -20,7 +20,7 @@ $(document).ready(() => {
|
|
|
const unit = gcl.unit !== undefined && gcl.unit !== null ? gcl.unit : '';
|
|
|
const quantity = gcl.quantity !== null && gcl.quantity !== undefined ? (unit !== '' ? roundnum(gcl.quantity, findDecimal(gcl.unit)) : gcl.quantity) : 0;
|
|
|
const unit_price = gcl.unit_price !== null && gcl.unit_price !== undefined ? gcl.unit_price : 0;
|
|
|
- listHtml += '<tr data-lid="' + list_index + '" data-gcl="' + (list_index-1) + '" data-index="' + list_index + '" data-detail="">' +
|
|
|
+ listHtml += '<tr data-lid="' + list_index + '" data-gcl="' + (list_index-1) + '" data-index="' + list_index + '" data-bwmx="">' +
|
|
|
'<td>' + list_index + '</td>' +
|
|
|
'<td>' + gcl.b_code + '</td>' +
|
|
|
'<td>' + gcl.name + '</td>' +
|
|
@@ -36,7 +36,7 @@ $(document).ready(() => {
|
|
|
const unit = db.unit !== undefined && db.unit !== null ? db.unit : '';
|
|
|
const quantity = db.quantity !== null && db.quantity !== undefined ? (unit !== '' ? roundnum(db.quantity, findDecimal(db.unit)) : db.quantity) : 0;
|
|
|
const unit_price = db.unit_price !== null && db.unit_price !== undefined ? db.unit_price : 0;
|
|
|
- listHtml += '<tr data-lid="' + db.id + '" data-index="' + list_index + '" data-detail="">' +
|
|
|
+ listHtml += '<tr data-lid="' + db.id + '" data-index="' + list_index + '" data-bwmx="">' +
|
|
|
'<td>' + list_index + '</td>' +
|
|
|
'<td>' + db.code + '</td>' +
|
|
|
'<td>' + db.name + '</td>' +
|
|
@@ -130,7 +130,7 @@ $(document).ready(() => {
|
|
|
for (const [index, cl] of changeList.entries()) {
|
|
|
const clInfo = cl.split(';');
|
|
|
if (clInfo[0] === '' || clInfo[1] === '' || clInfo[3] === '' || clInfo[4] === '' || clInfo[5] === '') {
|
|
|
- toastr.error('变更清单第' + (index+1) + '行未完整填写数据(变更详情可空)');
|
|
|
+ toastr.error('变更清单第' + (index+1) + '行未完整填写数据(变更部位、变更详情可空)');
|
|
|
returnFlag = true;
|
|
|
}
|
|
|
}
|
|
@@ -257,7 +257,7 @@ $(document).ready(() => {
|
|
|
// 清单选中和移除
|
|
|
$('body').on('click', '#table-list-select tr', function () {
|
|
|
const isCheck = $(this).hasClass('table-success') ? true : false;
|
|
|
- const data_detail = $(this).attr('data-detail').split('$#$');
|
|
|
+ const data_bwmx = $(this).attr('data-bwmx').split('$#$');
|
|
|
const isDeal = $(this).data('gcl') !== undefined ? true : false;
|
|
|
let codeHtml = '<tr quantity="0"><td colspan="4"></td><td><input type="checkbox"></td></tr>';
|
|
|
if (isDeal) {
|
|
@@ -266,7 +266,7 @@ $(document).ready(() => {
|
|
|
for (const leaf of gcl.leafXmjs) {
|
|
|
const quantity = leaf.quantity !== undefined ? leaf.quantity : 0;
|
|
|
const bwmx = leaf.bwmx !== undefined ? leaf.bwmx : '';
|
|
|
- const isChecked = data_detail.indexOf(leaf.code + '_' + bwmx + ';' + quantity) !== -1 && isCheck ? 'checked' : '';
|
|
|
+ const isChecked = data_bwmx.indexOf(leaf.code + '_' + bwmx + ';' + quantity) !== -1 && isCheck ? 'checked' : '';
|
|
|
codeHtml += '<tr quantity="' + quantity + '"><td>' + leaf.code + '</td>' +
|
|
|
'<td>' + leaf.jldy + '</td>' +
|
|
|
'<td>' + bwmx + '</td>' +
|
|
@@ -291,35 +291,35 @@ $(document).ready(() => {
|
|
|
// 左边表单传值并添加class
|
|
|
$('#table-list-select tr[data-index="' + index + '"]').addClass('table-success');
|
|
|
// 去除部分data-detail值
|
|
|
- let data_detail = [];
|
|
|
+ let data_bwmx = [];
|
|
|
$('#code-list input:checked').each(function () {
|
|
|
const tr = $(this).parents('tr');
|
|
|
const length = tr.children('td').length;
|
|
|
- const detail = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
|
|
|
+ const bwmx = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
|
|
|
const quantity = tr.attr('quantity');
|
|
|
- const de_qu = detail + ';' + quantity;
|
|
|
- data_detail.push(de_qu);
|
|
|
+ const de_qu = bwmx + ';' + quantity;
|
|
|
+ data_bwmx.push(de_qu);
|
|
|
});
|
|
|
- data_detail = data_detail.join('$#$');
|
|
|
- $('#table-list-select tr[data-index="' + index + '"]').attr('data-detail', data_detail);
|
|
|
+ data_bwmx = data_bwmx.join('$#$');
|
|
|
+ $('#table-list-select tr[data-index="' + index + '"]').attr('data-bwmx', data_bwmx);
|
|
|
} else {
|
|
|
// 判断还有无选中项目节编号
|
|
|
if ($('#code-list input').is(':checked')) {
|
|
|
// 去除部分data-detail值
|
|
|
- let data_detail = [];
|
|
|
+ let data_bwmx = [];
|
|
|
$('#code-list input:checked').each(function () {
|
|
|
const tr = $(this).parents('tr');
|
|
|
const length = tr.children('td').length;
|
|
|
- const detail = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
|
|
|
+ const bwmx = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
|
|
|
const quantity = tr.attr('quantity');
|
|
|
- const de_qu = detail + ';' + quantity;
|
|
|
- data_detail.push(de_qu);
|
|
|
+ const de_qu = bwmx + ';' + quantity;
|
|
|
+ data_bwmx.push(de_qu);
|
|
|
});
|
|
|
- data_detail = data_detail.join('$#$');
|
|
|
- $('#table-list-select tr[data-index="' + index + '"]').attr('data-detail', data_detail);
|
|
|
+ data_bwmx = data_bwmx.join('$#$');
|
|
|
+ $('#table-list-select tr[data-index="' + index + '"]').attr('data-bwmx', data_bwmx);
|
|
|
} else {
|
|
|
$('#table-list-select tr[data-index="' + index + '"]').removeClass('table-success');
|
|
|
- $('#table-list-select tr[data-index="' + index + '"]').attr('data-detail', '');
|
|
|
+ $('#table-list-select tr[data-index="' + index + '"]').attr('data-bwmx', '');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -375,22 +375,24 @@ $(document).ready(() => {
|
|
|
case 0:
|
|
|
case 1:
|
|
|
case 2:
|
|
|
- case 4:
|
|
|
+ case 3:
|
|
|
+ case 5:
|
|
|
tr.children('td[data-site="' + site + '"]').children('input').val($(this).val());
|
|
|
break;
|
|
|
- case 5:
|
|
|
- case 7:
|
|
|
+ case 6:
|
|
|
+ case 8:
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
const code = $.trim(tr.children('td[data-site="0"]').children('input').val()) || $.trim(tr.children('td[data-site="0"]').text());
|
|
|
const name = $.trim(tr.children('td[data-site="1"]').children('input').val()) || $.trim(tr.children('td[data-site="1"]').text());
|
|
|
- const unit = $.trim(tr.children('td[data-site="3"]').children('select').val()) || $.trim(tr.children('td[data-site="3"]').text());
|
|
|
- const price = (tr.children('td[data-site="4"]').children('input').val() != '-' ? tr.children('td[data-site="4"]').children('input').val() : '') || tr.children('td[data-site="4"]').text();
|
|
|
- const oamount = (tr.children('td[data-site="5"]').children('input').val() != '-' ? tr.children('td[data-site="5"]').children('input').val() : '') || tr.children('td[data-site="5"]').text();
|
|
|
- const scnum = tr.children('td[data-site="7"]').children('input').val() != '-' ? tr.children('td[data-site="7"]').children('input').val() : '';
|
|
|
- const detail = $.trim(tr.children('td[data-site="2"]').children('input').val());
|
|
|
- const trlist = [code,name,unit,price,oamount,scnum,detail];
|
|
|
+ const bwmx = $.trim(tr.children('td[data-site="2"]').children('input').val()) || $.trim(tr.children('td[data-site="2"]').text());
|
|
|
+ const unit = $.trim(tr.children('td[data-site="4"]').children('select').val()) || $.trim(tr.children('td[data-site="4"]').text());
|
|
|
+ const price = (tr.children('td[data-site="5"]').children('input').val() != '-' ? tr.children('td[data-site="5"]').children('input').val() : '') || tr.children('td[data-site="5"]').text();
|
|
|
+ const oamount = (tr.children('td[data-site="6"]').children('input').val() != '-' ? tr.children('td[data-site="6"]').children('input').val() : '') || tr.children('td[data-site="6"]').text();
|
|
|
+ const scnum = tr.children('td[data-site="8"]').children('input').val() != '-' ? tr.children('td[data-site="8"]').children('input').val() : '';
|
|
|
+ const detail = $.trim(tr.children('td[data-site="3"]').children('input').val());
|
|
|
+ const trlist = [code,name,bwmx,unit,price,oamount,scnum,detail];
|
|
|
if (isWhite) {
|
|
|
let changelist = $('#change-whitelist').val().split('^_^');
|
|
|
trlist.push(0);
|
|
@@ -402,8 +404,8 @@ $(document).ready(() => {
|
|
|
changelist.splice(index, 1, trlist.join(';'));
|
|
|
$('#change-list').val(changelist.join('^_^'));
|
|
|
}
|
|
|
- tr.children('td[data-site="6"]').text(price != '' && oamount != '' ? roundnum(parseFloat(price).mul(parseFloat(oamount)),totalPriceUnit) : '');
|
|
|
- tr.children('td[data-site="8"]').text(price != '' && scnum != '' ? roundnum(parseFloat(price).mul(parseFloat(scnum)),totalPriceUnit) : '');
|
|
|
+ tr.children('td[data-site="7"]').text(price != '' && oamount != '' ? roundnum(parseFloat(price).mul(parseFloat(oamount)),totalPriceUnit) : '');
|
|
|
+ tr.children('td[data-site="9"]').text(price != '' && scnum != '' ? roundnum(parseFloat(price).mul(parseFloat(scnum)),totalPriceUnit) : '');
|
|
|
totalamount(totalPriceUnit);
|
|
|
});
|
|
|
|
|
@@ -413,26 +415,27 @@ $(document).ready(() => {
|
|
|
const tr = $('#list tr[data-lid="' + index + '"]');
|
|
|
const code = $.trim(tr.children('td[data-site="0"]').children('input').val());
|
|
|
const name = $.trim(tr.children('td[data-site="1"]').children('input').val());
|
|
|
+ const bwmx = $.trim(tr.children('td[data-site="2"]').children('input').val());
|
|
|
const unit = $(this).val();
|
|
|
- const price = tr.children('td[data-site="4"]').children('input').val() != '-' ? tr.children('td[data-site="4"]').children('input').val() : '';
|
|
|
- let oamount = tr.children('td[data-site="5"]').children('input').val() != '-' ? tr.children('td[data-site="5"]').children('input').val() : '';
|
|
|
- let scnum = tr.children('td[data-site="7"]').children('input').val() != '-' ? tr.children('td[data-site="7"]').children('input').val() : '';
|
|
|
- const detail = $.trim(tr.children('td[data-site="2"]').children('input').val());
|
|
|
+ const price = tr.children('td[data-site="5"]').children('input').val() != '-' ? tr.children('td[data-site="5"]').children('input').val() : '';
|
|
|
+ let oamount = tr.children('td[data-site="6"]').children('input').val() != '-' ? tr.children('td[data-site="6"]').children('input').val() : '';
|
|
|
+ let scnum = tr.children('td[data-site="8"]').children('input').val() != '-' ? tr.children('td[data-site="8"]').children('input').val() : '';
|
|
|
+ const detail = $.trim(tr.children('td[data-site="3"]').children('input').val());
|
|
|
|
|
|
// 根据单位更新数量位数和合计
|
|
|
const numdecimal = findDecimal(unit);
|
|
|
oamount = roundnum(oamount, numdecimal);
|
|
|
scnum = roundnum(scnum, numdecimal);
|
|
|
- tr.children('td[data-site="5"]').children('input').val(oamount);
|
|
|
- tr.children('td[data-site="5"]').children('input').attr('onkeyup','RegNum(this,event,'+ numdecimal +')');
|
|
|
- tr.children('td[data-site="7"]').children('input').val(scnum);
|
|
|
- tr.children('td[data-site="7"]').children('input').attr('onkeyup','RegNum(this,event,'+ numdecimal +')');
|
|
|
- const trlist = [code,name,unit,price,oamount,scnum,detail,0];
|
|
|
+ tr.children('td[data-site="6"]').children('input').val(oamount);
|
|
|
+ tr.children('td[data-site="6"]').children('input').attr('onkeyup','RegNum(this,event,'+ numdecimal +')');
|
|
|
+ tr.children('td[data-site="8"]').children('input').val(scnum);
|
|
|
+ tr.children('td[data-site="8"]').children('input').attr('onkeyup','RegNum(this,event,'+ numdecimal +')');
|
|
|
+ const trlist = [code,name,bwmx,unit,price,oamount,scnum,detail,0];
|
|
|
let changelist = $('#change-whitelist').val().split('^_^');
|
|
|
changelist.splice(index, 1, trlist.join(';'));
|
|
|
$('#change-whitelist').val(changelist.join('^_^'));
|
|
|
- tr.children('td[data-site="6"]').text(price != '' && oamount != '' ? roundnum(parseFloat(price).mul(parseFloat(oamount)),totalPriceUnit) : '');
|
|
|
- tr.children('td[data-site="8"]').text(price != '' && scnum != '' ? roundnum(parseFloat(price).mul(parseFloat(scnum)),totalPriceUnit) : '');
|
|
|
+ tr.children('td[data-site="7"]').text(price != '' && oamount != '' ? roundnum(parseFloat(price).mul(parseFloat(oamount)),totalPriceUnit) : '');
|
|
|
+ tr.children('td[data-site="9"]').text(price != '' && scnum != '' ? roundnum(parseFloat(price).mul(parseFloat(scnum)),totalPriceUnit) : '');
|
|
|
totalamount(totalPriceUnit);
|
|
|
});
|
|
|
|
|
@@ -495,11 +498,11 @@ function maketablelist(status){
|
|
|
// let detail = $(this).attr('data-detail') != 0 ? $(this).attr('data-detail').split('_')[1] : '';
|
|
|
let lid = $(this).data('lid');
|
|
|
// 原清单和数量改变
|
|
|
- let data_detail = $(this).attr('data-detail').split('$#$');
|
|
|
- for (const d of data_detail) {
|
|
|
- const oamount = d.split(';')[1];
|
|
|
- let detail = d.split(';')[0] != 0 ? d.split(';')[0].split('_')[1] : '';
|
|
|
- let trlist = [code, name, unit, price, oamount, scnum, detail, lid];
|
|
|
+ let data_bwmx = $(this).attr('data-bwmx').split('$#$');
|
|
|
+ for (const b of data_bwmx) {
|
|
|
+ const oamount = b.split(';')[1];
|
|
|
+ let bwmx = b.split(';')[0] != 0 ? b.split(';')[0].split('_')[1] : '';
|
|
|
+ let trlist = [code, name, bwmx, unit, price, oamount, scnum, '', lid];
|
|
|
radionList.push(trlist.join(';'));
|
|
|
}
|
|
|
});
|
|
@@ -512,12 +515,13 @@ function maketablelist(status){
|
|
|
const radionArray = radion.split(';');
|
|
|
let code = radionArray[0];
|
|
|
let name = radionArray[1];
|
|
|
- let unit = radionArray[2];
|
|
|
- let price = radionArray[3];
|
|
|
- let oamount = radionArray[4];
|
|
|
- let scnum = radionArray[5];
|
|
|
- let detail = radionArray[6];
|
|
|
- let lid = radionArray[7];
|
|
|
+ let bwmx = radionArray[2];
|
|
|
+ let unit = radionArray[3];
|
|
|
+ let price = radionArray[4];
|
|
|
+ let oamount = radionArray[5];
|
|
|
+ let scnum = radionArray[6];
|
|
|
+ let detail = radionArray[7];
|
|
|
+ let lid = radionArray[8];
|
|
|
let sctotal = scnum !== '' && scnum !== '-' ? roundnum(parseFloat(price).mul(parseFloat(scnum)),decimal) : '';
|
|
|
|
|
|
// 根据单位获取数量的位数,并得出
|
|
@@ -526,13 +530,14 @@ function maketablelist(status){
|
|
|
html += '<tr class="clist clid" data-lid="' + lid + '_' + index + '" data-index="' + index + '">' +
|
|
|
'<td data-site="0">'+ code +'</td>' +
|
|
|
'<td data-site="1">'+ name +'</td>' +
|
|
|
- '<td data-site="2"><input class="form-control input-sm" type="text" placeholder="变更详情" value="' + detail + '"></td>' +
|
|
|
- '<td data-site="3">'+ unit +'</td>' +
|
|
|
- '<td data-site="4">'+ roundnum(price, updecimal) +'</td>' +
|
|
|
- '<td data-site="5">'+ roundnum(oamount, numdecimal) +'</td>' +
|
|
|
- '<td data-site="6">'+ roundnum(parseFloat(price).mul(parseFloat(oamount)),decimal) +'</td>' +
|
|
|
- '<td data-site="7"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ numdecimal +')" placeholder="请输入变更数量" value="'+ (scnum != '-' ? roundnum(scnum, numdecimal) : '') +'"></td>' +
|
|
|
- '<td data-site="8">'+ sctotal +'</td>'+
|
|
|
+ '<td data-site="2">'+ bwmx +'</td>' +
|
|
|
+ '<td data-site="3"><input class="form-control input-sm" type="text" placeholder="变更详情" value="' + detail + '"></td>' +
|
|
|
+ '<td data-site="4">'+ unit +'</td>' +
|
|
|
+ '<td data-site="5">'+ roundnum(price, updecimal) +'</td>' +
|
|
|
+ '<td data-site="6">'+ roundnum(oamount, numdecimal) +'</td>' +
|
|
|
+ '<td data-site="7">'+ roundnum(parseFloat(price).mul(parseFloat(oamount)),decimal) +'</td>' +
|
|
|
+ '<td data-site="8"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ numdecimal +')" placeholder="请输入变更数量" value="'+ (scnum != '-' ? roundnum(scnum, numdecimal) : '') +'"></td>' +
|
|
|
+ '<td data-site="9">'+ sctotal +'</td>'+
|
|
|
deteletr +'</tr>';
|
|
|
index ++;
|
|
|
}
|
|
@@ -542,7 +547,7 @@ function maketablelist(status){
|
|
|
let radionWhiteList = $('#change-whitelist').val() !== '' ? $('#change-whitelist').val().split('^_^') : [];
|
|
|
//判断是否添加空白清单
|
|
|
if(status == 'addwhite'){
|
|
|
- let trlist = ['','',changeUnits.m.unit,makedecimalzero(decimal),makedecimalzero(findDecimal(changeUnits.m.unit)),makedecimalzero(findDecimal(changeUnits.m.unit)),'',0];
|
|
|
+ let trlist = ['','','',changeUnits.m.unit,makedecimalzero(decimal),makedecimalzero(findDecimal(changeUnits.m.unit)),makedecimalzero(findDecimal(changeUnits.m.unit)),'',0];
|
|
|
radionWhiteList.push(trlist.join(';'));
|
|
|
}
|
|
|
|
|
@@ -550,11 +555,12 @@ function maketablelist(status){
|
|
|
const radionArray = rw.split(';');
|
|
|
let code = radionArray[0];
|
|
|
let name = radionArray[1];
|
|
|
- let unit = radionArray[2];
|
|
|
- let price = radionArray[3];
|
|
|
- let oamount = radionArray[4];
|
|
|
- let scnum = radionArray[5];
|
|
|
- let detail = radionArray[6];
|
|
|
+ let bwmx = radionArray[2];
|
|
|
+ let unit = radionArray[3];
|
|
|
+ let price = radionArray[4];
|
|
|
+ let oamount = radionArray[5];
|
|
|
+ let scnum = radionArray[6];
|
|
|
+ let detail = radionArray[7];
|
|
|
let ototal = price != '' && oamount != '' ? roundnum(parseFloat(price).mul(parseFloat(oamount)),decimal) : '';
|
|
|
let sctotal = price != '' && scnum != '' ? roundnum(parseFloat(price).mul(parseFloat(scnum)),decimal) : '';
|
|
|
|
|
@@ -571,15 +577,16 @@ function maketablelist(status){
|
|
|
let numdecimal = findDecimal(unit);
|
|
|
|
|
|
html += '<tr class="clist" data-lid="' + whiteIndex + '" data-index="' + whiteIndex + '">' +
|
|
|
- '<td data-site="0"><input class="form-control input-sm" type="text" value="'+ code +'" placeholder="请输入清单编号"></td>' +
|
|
|
- '<td data-site="1"><input class="form-control input-sm" type="text" value="'+ name +'" placeholder="请输入名称"></td>' +
|
|
|
- '<td data-site="2"><input class="form-control input-sm" type="text" value="'+ detail +'" placeholder="变更详情"></td>' +
|
|
|
- '<td data-site="3"><select class="form-control input-sm">'+ optionlist +'</select></td>' +
|
|
|
- '<td data-site="4"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ updecimal +')" value="'+ roundnum(price, updecimal) +'" placeholder="请输入单价"></td>' +
|
|
|
- '<td data-site="5"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ numdecimal +')" value="'+ roundnum(oamount, numdecimal) +'" placeholder="请输入数量"></td>' +
|
|
|
- '<td data-site="6">'+ ototal +'</td>' +
|
|
|
- '<td data-site="7"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ numdecimal +')" value="'+ roundnum(scnum, numdecimal) +'" placeholder="请输入变更数量"></td>' +
|
|
|
- '<td data-site="8">'+ sctotal +'</td>'+
|
|
|
+ '<td data-site="0"><input class="form-control input-sm" type="text" value="'+ code +'" placeholder="清单编号"></td>' +
|
|
|
+ '<td data-site="1"><input class="form-control input-sm" type="text" value="'+ name +'" placeholder="名称"></td>' +
|
|
|
+ '<td data-site="2"><input class="form-control input-sm" type="text" value="'+ bwmx +'" placeholder="变更部位"></td>' +
|
|
|
+ '<td data-site="3"><input class="form-control input-sm" type="text" value="'+ detail +'" placeholder="变更详情"></td>' +
|
|
|
+ '<td data-site="4"><select class="form-control input-sm">'+ optionlist +'</select></td>' +
|
|
|
+ '<td data-site="5"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ updecimal +')" value="'+ roundnum(price, updecimal) +'" placeholder="请输入单价"></td>' +
|
|
|
+ '<td data-site="6"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ numdecimal +')" value="'+ roundnum(oamount, numdecimal) +'" placeholder="请输入数量"></td>' +
|
|
|
+ '<td data-site="7">'+ ototal +'</td>' +
|
|
|
+ '<td data-site="8"><input class="form-control input-sm" type="text" onkeyup="RegNum(this,event,'+ numdecimal +')" value="'+ roundnum(scnum, numdecimal) +'" placeholder="请输入变更数量"></td>' +
|
|
|
+ '<td data-site="9">'+ sctotal +'</td>'+
|
|
|
deteletr +'</tr>';
|
|
|
whiteIndex ++;
|
|
|
}
|
|
@@ -591,18 +598,18 @@ function maketablelist(status){
|
|
|
table = $('#tablelist').removeAttr('width').DataTable({
|
|
|
columnDefs: [
|
|
|
{ className: 'allwidth1', width: 100, targets: 0 },
|
|
|
- { className: 'allwidth2', width: 150, targets: [1,2] },
|
|
|
- { className: 'allwidth4', width: 40, targets: 9 },
|
|
|
- { className: 'allwidth5', width: 60, targets: 3 },
|
|
|
+ { className: 'allwidth2', width: 150, targets: [1,2,3] },
|
|
|
+ { className: 'allwidth4', width: 40, targets: 10 },
|
|
|
+ { className: 'allwidth5', width: 60, targets: 4 },
|
|
|
{ className: 'allwidth3',width: 80, targets: '_all' }
|
|
|
],
|
|
|
fixedColumns: {
|
|
|
- leftColumns: 5
|
|
|
+ leftColumns: 6
|
|
|
}
|
|
|
});
|
|
|
// 判断是否显示变更详情
|
|
|
if (!$('.change-detail-checkbox').is(':checked')) {
|
|
|
- const column = table.column(2);
|
|
|
+ const column = table.column(3);
|
|
|
column.visible(!column.visible());
|
|
|
}
|
|
|
totalamount(decimal);
|
|
@@ -615,9 +622,9 @@ function totalamount(decimal){
|
|
|
let ctotalnum = 0;
|
|
|
let ototalnum = 0;
|
|
|
$('.clist').each(function(){
|
|
|
- let ctotal = $(this).children('td[data-site="8"]').text();
|
|
|
+ let ctotal = $(this).children('td[data-site="9"]').text();
|
|
|
ctotalnum = ctotal != '' ? parseFloat(ctotalnum).add(parseFloat(ctotal)) : parseFloat(ctotalnum);
|
|
|
- let ototal = $(this).children('td[data-site="6"]').text();
|
|
|
+ let ototal = $(this).children('td[data-site="7"]').text();
|
|
|
ototalnum = ototal != '' ? parseFloat(ototalnum).add(parseFloat(ototal)) : parseFloat(ototalnum);
|
|
|
});
|
|
|
$('.ctatalamount').eq(1).text(ctotalnum != 0 ? roundnum(ctotalnum,decimal) : zero);
|