|
@@ -1347,22 +1347,22 @@ $(document).ready(() => {
|
|
|
const select = _.find(materialChecklistData, { b_code: t.b_code, name: t.name, unit: t.unit, unit_price: t.unit_price ? parseFloat(t.unit_price) : null });
|
|
|
console.log(select, datas, mbList);
|
|
|
if (select) {
|
|
|
- await postData(window.location.pathname + '/save', {type: 'adds', checklist: { id: select.id, had_bills: 1 }, postData: {xmjs: datas, mbIds: mbList, export: true}}, function (result) {
|
|
|
- // materialListData = result;
|
|
|
- select.had_bills = 1;
|
|
|
- gclList = result;
|
|
|
- stopProgress($('#list-progress'));
|
|
|
- if (i+1 === tree.length) {
|
|
|
- toastr.success('导入成功');
|
|
|
- setTimeout(function () { $('#okedit').modal('hide') }, 2000);
|
|
|
- showSjsData();
|
|
|
- }
|
|
|
+ const result = await postDataAsync(window.location.pathname + '/save', {type: 'adds', checklist: { id: select.id, had_bills: 1 }, postData: {xmjs: datas, mbIds: mbList, export: true}});
|
|
|
+ // materialListData = result;
|
|
|
+ select.had_bills = 1;
|
|
|
+ gclList = result;
|
|
|
+ stopProgress($('#list-progress'));
|
|
|
+ if (i+1 === tree.length) {
|
|
|
+ toastr.success('导入成功');
|
|
|
+ setTimeout(function () { $('#okedit').modal('hide') }, 2000);
|
|
|
+ showSjsData();
|
|
|
+ }
|
|
|
|
|
|
- }, function () {
|
|
|
- stop = true;
|
|
|
- clearInterval(interval);
|
|
|
- setTimeout(function () { $('#okedit').modal('hide') }, 1000);
|
|
|
- });
|
|
|
+ // }, function () {
|
|
|
+ // stop = true;
|
|
|
+ // clearInterval(interval);
|
|
|
+ // setTimeout(function () { $('#okedit').modal('hide') }, 1000);
|
|
|
+ // });
|
|
|
} else {
|
|
|
stopProgress($('#list-progress'));
|
|
|
}
|