|
@@ -362,6 +362,7 @@ $(document).ready(() => {
|
|
|
|
|
|
// 打开签约清单modal并删除之前的操作
|
|
// 打开签约清单modal并删除之前的操作
|
|
$('#open-list-modal').click(function () {
|
|
$('#open-list-modal').click(function () {
|
|
|
|
+ autoFlashHeight()
|
|
// tableDataRemake(changeListData);
|
|
// tableDataRemake(changeListData);
|
|
});
|
|
});
|
|
|
|
|
|
@@ -372,7 +373,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() +'"><td colspan="4" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox"></td></tr>';
|
|
|
|
|
|
+ let codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><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) {
|
|
@@ -385,16 +386,19 @@ $(document).ready(() => {
|
|
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 bwmx = leaf.bwmx !== undefined ? leaf.bwmx : '';
|
|
const bwmx = leaf.bwmx !== undefined ? leaf.bwmx : '';
|
|
- const isChecked = data_bwmx.indexOf(leaf.code + '_' + bwmx + ';' + quantity) !== -1 && isCheck ? 'checked' : '';
|
|
|
|
|
|
+ const isChecked = data_bwmx.indexOf(leaf.code + '_' + (bwmx !== '' ? bwmx : leaf.jldy !== '' ? leaf.jldy : '') + ';' + quantity) !== -1 && isCheck ? 'checked' : '';
|
|
codeHtml += '<tr quantity="' + quantity + '"><td>' + leaf.code + '</td>' +
|
|
codeHtml += '<tr quantity="' + quantity + '"><td>' + leaf.code + '</td>' +
|
|
'<td>' + leaf.jldy + '</td>' +
|
|
'<td>' + leaf.jldy + '</td>' +
|
|
'<td>' + bwmx + '</td>' +
|
|
'<td>' + bwmx + '</td>' +
|
|
|
|
+ '<td>' + leaf.dwgc + '</td>' +
|
|
|
|
+ '<td>' + leaf.fbgc + '</td>' +
|
|
|
|
+ '<td>' + leaf.fxgc + '</td>' +
|
|
'<td>' + roundnum(quantity, findDecimal(gcl.unit)) + '</td>' +
|
|
'<td>' + roundnum(quantity, findDecimal(gcl.unit)) + '</td>' +
|
|
'<td><input type="checkbox"' + isChecked +
|
|
'<td><input type="checkbox"' + isChecked +
|
|
'></td></tr>';
|
|
'></td></tr>';
|
|
}
|
|
}
|
|
} else if (!isDeal && isCheck) {
|
|
} else if (!isDeal && isCheck) {
|
|
- codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><td colspan="4" class="colspan_1"> </td><td class="colspan_2"><input type="checkbox" checked></td></tr>';
|
|
|
|
|
|
+ codeHtml = '<tr quantity="'+ $(this).children('td').eq(5).text() +'"><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-list').html(codeHtml);
|
|
$('#code-list').html(codeHtml);
|
|
@@ -414,7 +418,7 @@ $(document).ready(() => {
|
|
$('#code-list input:checked').each(function () {
|
|
$('#code-list input:checked').each(function () {
|
|
const tr = $(this).parents('tr');
|
|
const tr = $(this).parents('tr');
|
|
const length = tr.children('td').length;
|
|
const length = tr.children('td').length;
|
|
- const bwmx = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
|
|
|
|
|
|
+ const bwmx = length === 8 ? tr.children('td').eq(0).text() + '_' + (tr.children('td').eq(2).text() !== '' ? tr.children('td').eq(2).text() : tr.children('td').eq(1).text()) : '0';
|
|
const quantity = tr.attr('quantity');
|
|
const quantity = tr.attr('quantity');
|
|
const de_qu = bwmx + ';' + quantity;
|
|
const de_qu = bwmx + ';' + quantity;
|
|
data_bwmx.push(de_qu);
|
|
data_bwmx.push(de_qu);
|
|
@@ -429,7 +433,7 @@ $(document).ready(() => {
|
|
$('#code-list input:checked').each(function () {
|
|
$('#code-list input:checked').each(function () {
|
|
const tr = $(this).parents('tr');
|
|
const tr = $(this).parents('tr');
|
|
const length = tr.children('td').length;
|
|
const length = tr.children('td').length;
|
|
- const bwmx = length === 5 ? tr.children('td').eq(0).text() + '_' + tr.children('td').eq(2).text() : '0';
|
|
|
|
|
|
+ const bwmx = length === 8 ? tr.children('td').eq(0).text() + '_' + (tr.children('td').eq(2).text() !== '' ? tr.children('td').eq(2).text() : tr.children('td').eq(1).text()) : '0';
|
|
const quantity = tr.attr('quantity');
|
|
const quantity = tr.attr('quantity');
|
|
const de_qu = bwmx + ';' + quantity;
|
|
const de_qu = bwmx + ';' + quantity;
|
|
data_bwmx.push(de_qu);
|
|
data_bwmx.push(de_qu);
|