|
@@ -1435,6 +1435,43 @@ $(document).ready(() => {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ // 选中所有新增部位/清单
|
|
|
+ $('#select-all-revise').click(function() {
|
|
|
+ const qtySpr = '*;*', infoSpr = '!_!', recSpr = '$#$';
|
|
|
+ const gclTr = $('#table-list-select tr');
|
|
|
+ for (const tr of gclTr) {
|
|
|
+ const lid = $(tr).data('lid');
|
|
|
+ let gcl = _.find(gclGatherData, function (item) {
|
|
|
+ return item.leafXmjs && item.leafXmjs[0].gcl_id === lid;
|
|
|
+ });
|
|
|
+ if (!gcl) gcl = gclGatherData[$(this).data('gcl')];
|
|
|
+ if (!gcl || !gcl.cid) continue;
|
|
|
+
|
|
|
+ let data_bwmx = $(tr).attr('data-bwmx').split(recSpr);
|
|
|
+ data_bwmx = data_bwmx.filter(x => {
|
|
|
+ const rec = x.split(qtySpr);
|
|
|
+ const info = rec[0].split(infoSpr);
|
|
|
+ if (info.length < 8) return true;
|
|
|
+
|
|
|
+ const leaf = gcl.leafXmjs.find(lx => { return lx.mx_id === info[6]});
|
|
|
+ return !leaf || !leaf.cid;
|
|
|
+ });
|
|
|
+ for (const [index, leaf] of gcl.leafXmjs.entries()) {
|
|
|
+ if (!leaf.cid) continue;
|
|
|
+
|
|
|
+ const bwmx = [leaf.code, leaf.jldy || '', leaf.dwgc || '', leaf.fbgc || '', leaf.fxgc || '', leaf.gcl_id, leaf.mx_id, leaf.bwmx || ''];
|
|
|
+ const de_qu = bwmx.join(infoSpr) + qtySpr + (leaf.quantity || 0);
|
|
|
+ data_bwmx.push(de_qu);
|
|
|
+ }
|
|
|
+ $(tr).attr('data-bwmx', data_bwmx.join(recSpr)).addClass('table-success');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 触发点击当前清单,重载当前全部部位
|
|
|
+ const dataIndex = $('#code-list').attr('data-index');
|
|
|
+ if (dataIndex) {
|
|
|
+ $(`tr[data-index=${dataIndex}]`).trigger('click');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
// 记录变更信息操作
|
|
|
$('body').on('valuechange', '#change_form input[type="text"]', function (e, previous) {
|