|
@@ -139,6 +139,7 @@ $(document).ready(() => {
|
|
|
gclGatherData = gclGatherModel.gatherGclData();
|
|
|
console.log(gclGatherData);
|
|
|
const hadBillsidList = _.uniq(_.map(materialListData, 'gcl_id'));
|
|
|
+ console.log(hadBillsidList);
|
|
|
// 对比清单设置和调差清单,还要和台账对比,显示已选清单列表 不同则更新到清单设置页中
|
|
|
const pushData = [];
|
|
|
const updateData = [];
|
|
@@ -164,15 +165,14 @@ $(document).ready(() => {
|
|
|
// 更新had_bills值
|
|
|
if (mc.had_bills === 1) {
|
|
|
if (_.indexOf(hadBillsidList, gcl.leafXmjs ? gcl.leafXmjs[0].gcl_id : null) === -1) {
|
|
|
- updateData.push({ id: mc.id, had_bills: 0 });
|
|
|
+ updateData.push({ id: mc.id, mid: materialID, had_bills: 0 });
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
setChecklistData(pushData, removeData, updateData, true);
|
|
|
});
|
|
|
function setChecklistData(pushData, removeData, updateData = [], sendmsg = false) {
|
|
|
- if (pushData.length > 0 || removeData.length > 0) {
|
|
|
+ if (pushData.length > 0 || removeData.length > 0 || updateData.length > 0) {
|
|
|
postData(window.location.pathname + '/save', { type: 'resetChecklist', pushData, removeData, updateData }, function (result2) {
|
|
|
if (sendmsg && pushData.length > 0) {
|
|
|
toastr.success('已同步并添加到调差清单数据至本页中');
|