|
@@ -404,7 +404,7 @@ $(document).ready(() => {
|
|
const isCheck = $(this).hasClass('table-success') ? true : false;
|
|
const isCheck = $(this).hasClass('table-success') ? true : false;
|
|
const data_bwmx = $(this).attr('data-bwmx').split('$#$');
|
|
const data_bwmx = $(this).attr('data-bwmx').split('$#$');
|
|
const isDeal = $(this).data('gcl') !== undefined ? true : false;
|
|
const isDeal = $(this).data('gcl') !== undefined ? true : false;
|
|
- let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'" gcl_id="0"><td colspan="7" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox"></td></tr>';
|
|
|
|
|
|
+ let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'" gcl_id=""><td colspan="7" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox"></td></tr>';
|
|
if (isDeal) {
|
|
if (isDeal) {
|
|
const lid = $(this).data('lid');
|
|
const lid = $(this).data('lid');
|
|
let gcl = _.find(gclGatherData, function (item) {
|
|
let gcl = _.find(gclGatherData, function (item) {
|
|
@@ -416,9 +416,9 @@ $(document).ready(() => {
|
|
codeHtml = '';
|
|
codeHtml = '';
|
|
for (const leaf of gcl.leafXmjs) {
|
|
for (const leaf of gcl.leafXmjs) {
|
|
const quantity = leaf.quantity !== undefined && leaf.quantity !== null ? leaf.quantity : 0;
|
|
const quantity = leaf.quantity !== undefined && leaf.quantity !== null ? leaf.quantity : 0;
|
|
- const gcl_id = leaf.gcl_id ? leaf.gcl_id : '0';
|
|
|
|
|
|
+ const gcl_id = leaf.gcl_id ? leaf.gcl_id : '';
|
|
const bwmx = leaf.bwmx !== undefined ? leaf.bwmx : '';
|
|
const bwmx = leaf.bwmx !== undefined ? leaf.bwmx : '';
|
|
- const isChecked = data_bwmx.indexOf(leaf.code + '!_!' + (leaf.jldy ? leaf.jldy : '') + '!_!' + (leaf.gcl_id ? leaf.gcl_id : '0') + '!_!' + (bwmx !== '' ? bwmx : leaf.jldy ? leaf.jldy : '') + '*;*' + quantity) !== -1 && isCheck ? 'checked' : '';
|
|
|
|
|
|
+ const isChecked = data_bwmx.indexOf(leaf.code + '!_!' + (leaf.jldy ? leaf.jldy : '') + '!_!' + (leaf.gcl_id ? leaf.gcl_id : '') + '!_!' + (bwmx !== '' ? bwmx : leaf.jldy ? leaf.jldy : '') + '*;*' + quantity) !== -1 && isCheck ? 'checked' : '';
|
|
codeHtml += '<tr quantity="' + quantity + '" gcl_id="' + gcl_id + '"><td>' + leaf.code + '</td>' +
|
|
codeHtml += '<tr quantity="' + quantity + '" gcl_id="' + gcl_id + '"><td>' + leaf.code + '</td>' +
|
|
'<td>' + (leaf.jldy ? leaf.jldy: '') + '</td>' +
|
|
'<td>' + (leaf.jldy ? leaf.jldy: '') + '</td>' +
|
|
'<td>' + (leaf.dwgc ? leaf.dwgc : '') + '</td>' +
|
|
'<td>' + (leaf.dwgc ? leaf.dwgc : '') + '</td>' +
|
|
@@ -430,7 +430,7 @@ $(document).ready(() => {
|
|
'></td></tr>';
|
|
'></td></tr>';
|
|
}
|
|
}
|
|
} else if (!isDeal && isCheck) {
|
|
} else if (!isDeal && isCheck) {
|
|
- codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'" gcl_id="0"><td colspan="7" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox" checked></td></tr>';
|
|
|
|
|
|
+ codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'" gcl_id=""><td colspan="7" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox" checked></td></tr>';
|
|
}
|
|
}
|
|
$('#code-list').attr('data-index', $(this).children('td').eq(0).text());
|
|
$('#code-list').attr('data-index', $(this).children('td').eq(0).text());
|
|
$('#code-input').val('');
|
|
$('#code-input').val('');
|
|
@@ -539,7 +539,7 @@ $(document).ready(() => {
|
|
const lid = $(this).parents('tr').data('lid');
|
|
const lid = $(this).parents('tr').data('lid');
|
|
const xmj_code = $(this).parents('tr').data('xmjcode') || '';
|
|
const xmj_code = $(this).parents('tr').data('xmjcode') || '';
|
|
const xmj_jldy = $(this).parents('tr').data('xmjjldy') || '';
|
|
const xmj_jldy = $(this).parents('tr').data('xmjjldy') || '';
|
|
- const gcl_id = $(this).parents('tr').data('gclid') || '0';
|
|
|
|
|
|
+ const gcl_id = $(this).parents('tr').data('gclid') || '';
|
|
const isWhite = !isNaN(lid) ? true : false;
|
|
const isWhite = !isNaN(lid) ? true : false;
|
|
const tr = $('#list tr[data-lid="' + lid + '"]').eq(0);
|
|
const tr = $('#list tr[data-lid="' + lid + '"]').eq(0);
|
|
const site = parseInt($(this).parents('td').data('site'));
|
|
const site = parseInt($(this).parents('td').data('site'));
|
|
@@ -609,7 +609,7 @@ $(document).ready(() => {
|
|
tr.children('td[data-site="6"]').children('input').attr('onkeyup','RegNum(this,event,'+ numdecimal +')');
|
|
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').val(scnum);
|
|
tr.children('td[data-site="8"]').children('input').attr('onkeyup','RegNum(this,event,'+ numdecimal +')');
|
|
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,'',''];
|
|
|
|
|
|
+ const trlist = [code,name,bwmx,unit,price,oamount,scnum,detail,0,'','',''];
|
|
let changelist = $('#change-whitelist').val().split('^_^');
|
|
let changelist = $('#change-whitelist').val().split('^_^');
|
|
changelist.splice(index, 1, trlist.join('*;*'));
|
|
changelist.splice(index, 1, trlist.join('*;*'));
|
|
$('#change-whitelist').val(changelist.join('^_^'));
|
|
$('#change-whitelist').val(changelist.join('^_^'));
|
|
@@ -726,7 +726,7 @@ function tableDataRemake(changeListData) {
|
|
});
|
|
});
|
|
console.log(leafInfo);
|
|
console.log(leafInfo);
|
|
if (leafInfo) {
|
|
if (leafInfo) {
|
|
- pushbwmx = leafInfo.code + '!_!' + (leafInfo.jldy !== undefined ? leafInfo.jldy : '') + '!_!' + (leafInfo.gcl_id ? leafInfo.gcl_id : '0') + '!_!' + (leafInfo.bwmx !== undefined ? leafInfo.bwmx : '') + '*;*' + (leafInfo.quantity !== null ? leafInfo.quantity : 0);
|
|
|
|
|
|
+ pushbwmx = leafInfo.code + '!_!' + (leafInfo.jldy !== undefined ? leafInfo.jldy : '') + '!_!' + (leafInfo.gcl_id ? leafInfo.gcl_id : '') + '!_!' + (leafInfo.bwmx !== undefined ? leafInfo.bwmx : '') + '*;*' + (leafInfo.quantity !== null ? leafInfo.quantity : 0);
|
|
} else {
|
|
} else {
|
|
toastr.warning('台账清单列表已不存在'+ clinfo[0] +',已更新变更清单列表');
|
|
toastr.warning('台账清单列表已不存在'+ clinfo[0] +',已更新变更清单列表');
|
|
changeList.splice(index, 1);
|
|
changeList.splice(index, 1);
|
|
@@ -751,7 +751,7 @@ function tableDataRemake(changeListData) {
|
|
return (item.bwmx === undefined || item.bwmx === clinfo[2] || item.jldy === clinfo[2]) && (item.quantity !== null ? item.quantity === parseFloat(clinfo[5]) : 0 === parseFloat(clinfo[5]));
|
|
return (item.bwmx === undefined || item.bwmx === clinfo[2] || item.jldy === clinfo[2]) && (item.quantity !== null ? item.quantity === parseFloat(clinfo[5]) : 0 === parseFloat(clinfo[5]));
|
|
});
|
|
});
|
|
if (leafInfo) {
|
|
if (leafInfo) {
|
|
- pushbwmx = leafInfo.code + '!_!' + (leafInfo.jldy !== undefined ? leafInfo.jldy : '') + '!_!' + (leafInfo.gcl_id ? leafInfo.gcl_id : '0') + '!_!' + (leafInfo.bwmx !== undefined ? leafInfo.bwmx : (leafInfo.jldy ? leafInfo.jldy : '')) + '*;*' + (leafInfo.quantity !== null ? leafInfo.quantity : 0);
|
|
|
|
|
|
+ pushbwmx = leafInfo.code + '!_!' + (leafInfo.jldy !== undefined ? leafInfo.jldy : '') + '!_!' + (leafInfo.gcl_id ? leafInfo.gcl_id : '') + '!_!' + (leafInfo.bwmx !== undefined ? leafInfo.bwmx : (leafInfo.jldy ? leafInfo.jldy : '')) + '*;*' + (leafInfo.quantity !== null ? leafInfo.quantity : 0);
|
|
} else {
|
|
} else {
|
|
toastr.warning('台账清单列表已不存在'+ clinfo[0] +',已更新变更清单列表');
|
|
toastr.warning('台账清单列表已不存在'+ clinfo[0] +',已更新变更清单列表');
|
|
changeList.splice(index, 1);
|
|
changeList.splice(index, 1);
|
|
@@ -903,7 +903,7 @@ function maketablelist(status){
|
|
let bwmx = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[3] : '';
|
|
let bwmx = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[3] : '';
|
|
let xmj_code = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[0] : '';
|
|
let xmj_code = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[0] : '';
|
|
let xmj_jldy = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[1] : '';
|
|
let xmj_jldy = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[1] : '';
|
|
- let gcl_id = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[2] : '0';
|
|
|
|
|
|
+ let gcl_id = b.split('*;*')[0] != 0 ? b.split('*;*')[0].split('!_!')[2] : '';
|
|
let trlist = [code, name, bwmx, unit, price, oamount, scnum, '', lid, xmj_code, xmj_jldy, gcl_id];
|
|
let trlist = [code, name, bwmx, unit, price, oamount, scnum, '', lid, xmj_code, xmj_jldy, gcl_id];
|
|
const radionInfo = radionList.find(function (item) {
|
|
const radionInfo = radionList.find(function (item) {
|
|
const info = item.split('*;*');
|
|
const info = item.split('*;*');
|
|
@@ -959,7 +959,7 @@ function maketablelist(status){
|
|
let radionWhiteList = $('#change-whitelist').val() !== '' ? $('#change-whitelist').val().split('^_^') : [];
|
|
let radionWhiteList = $('#change-whitelist').val() !== '' ? $('#change-whitelist').val().split('^_^') : [];
|
|
//判断是否添加空白清单
|
|
//判断是否添加空白清单
|
|
if(status == 'addwhite'){
|
|
if(status == 'addwhite'){
|
|
- let trlist = ['','','','','',makedecimalzero(findDecimal(3)),makedecimalzero(findDecimal(3)),'',0, '', '', '0'];
|
|
|
|
|
|
+ let trlist = ['','','','','',makedecimalzero(findDecimal(3)),makedecimalzero(findDecimal(3)),'',0, '', '', ''];
|
|
radionWhiteList.push(trlist.join('*;*'));
|
|
radionWhiteList.push(trlist.join('*;*'));
|
|
}
|
|
}
|
|
|
|
|