|  | @@ -3509,7 +3509,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              }, 100);
 |  |              }, 100);
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
													
														
															|  |      })('a[name=showLevel]', billsSheet);
 |  |      })('a[name=showLevel]', billsSheet);
 | 
												
													
														
															|  | -
 |  | 
 | 
												
													
														
															|  | 
 |  | +if (openRevise) {
 | 
												
													
														
															|  |      const dataChecker = DataChecker({
 |  |      const dataChecker = DataChecker({
 | 
												
													
														
															|  |          checkUrl: window.location.pathname + '/check',
 |  |          checkUrl: window.location.pathname + '/check',
 | 
												
													
														
															|  |          completeData: function (data) {
 |  |          completeData: function (data) {
 | 
												
											
												
													
														
															|  | @@ -3545,7 +3545,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |          let compilationList = [];
 |  |          let compilationList = [];
 | 
												
													
														
															|  |          $('#get-dsk-btn').click(function () {
 |  |          $('#get-dsk-btn').click(function () {
 | 
												
													
														
															|  |              // 判断是否已绑定dsk用户
 |  |              // 判断是否已绑定dsk用户
 | 
												
													
														
															|  | -            postData('/profile/dsk/api', { type: 'hadbind' }, function (result) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +            postData('/profile/dsk/api', {type: 'hadbind'}, function (result) {
 | 
												
													
														
															|  |                  if (result === 1) {
 |  |                  if (result === 1) {
 | 
												
													
														
															|  |                      $('#error-dsk .modal-body').find('h5').eq(0).show();
 |  |                      $('#error-dsk .modal-body').find('h5').eq(0).show();
 | 
												
													
														
															|  |                      $('#error-dsk .modal-body').find('h5').eq(1).hide();
 |  |                      $('#error-dsk .modal-body').find('h5').eq(1).hide();
 | 
												
											
												
													
														
															|  | @@ -3557,7 +3557,11 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                      $('#error-dsk').modal('show');
 |  |                      $('#error-dsk').modal('show');
 | 
												
													
														
															|  |                      $('#error-dsk .modal-footer').find('a').eq(0).text('绑定账号');
 |  |                      $('#error-dsk .modal-footer').find('a').eq(0).text('绑定账号');
 | 
												
													
														
															|  |                  } else {
 |  |                  } else {
 | 
												
													
														
															|  | -                    postData('/profile/dsk/api', { type: 'compilation', getProject: 1, compilationId: getLocalCache(dskCompilation) }, function (result) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    postData('/profile/dsk/api', {
 | 
												
													
														
															|  | 
 |  | +                        type: 'compilation',
 | 
												
													
														
															|  | 
 |  | +                        getProject: 1,
 | 
												
													
														
															|  | 
 |  | +                        compilationId: getLocalCache(dskCompilation)
 | 
												
													
														
															|  | 
 |  | +                    }, function (result) {
 | 
												
													
														
															|  |                          let html = '';
 |  |                          let html = '';
 | 
												
													
														
															|  |                          for (const data of result.compilation) {
 |  |                          for (const data of result.compilation) {
 | 
												
													
														
															|  |                              html += `<option value="${data.ID}" ${result.select_compilation === data.ID ? 'selected' : ''}>${data.name}</option>`;
 |  |                              html += `<option value="${data.ID}" ${result.select_compilation === data.ID ? 'selected' : ''}>${data.name}</option>`;
 | 
												
											
												
													
														
															|  | @@ -3574,7 +3578,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              })
 |  |              })
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
													
														
															|  |          $('#get-dsk-bills-btn').click(function () {
 |  |          $('#get-dsk-bills-btn').click(function () {
 | 
												
													
														
															|  | -            const projectInfo = _.find(dskProjects, { pid: dskAccountData.select_project ? dskAccountData.select_project : null });
 |  | 
 | 
												
													
														
															|  | 
 |  | +            const projectInfo = _.find(dskProjects, {pid: dskAccountData.select_project ? dskAccountData.select_project : null});
 | 
												
													
														
															|  |              changeDskProjectTree(projectInfo, dskAccountData.select_tree ? dskAccountData.select_tree : null);
 |  |              changeDskProjectTree(projectInfo, dskAccountData.select_tree ? dskAccountData.select_tree : null);
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
													
														
															|  |  
 |  |  
 | 
												
											
												
													
														
															|  | @@ -3598,6 +3602,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              grArray: dskProjects ? dskProjects : [],
 |  |              grArray: dskProjects ? dskProjects : [],
 | 
												
													
														
															|  |              orgSelect: null,
 |  |              orgSelect: null,
 | 
												
													
														
															|  |          };
 |  |          };
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |          function makeDskProjectSjsHtml(datas) {
 |  |          function makeDskProjectSjsHtml(datas) {
 | 
												
													
														
															|  |              if (!dp) {
 |  |              if (!dp) {
 | 
												
													
														
															|  |                  initDskProjectTree();
 |  |                  initDskProjectTree();
 | 
												
											
												
													
														
															|  | @@ -3612,13 +3617,19 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                  $('#show-project-0').hide();
 |  |                  $('#show-project-0').hide();
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |          const dskProjectSpreadObj = {
 |  |          const dskProjectSpreadObj = {
 | 
												
													
														
															|  |              _addTender: function (tender) {
 |  |              _addTender: function (tender) {
 | 
												
													
														
															|  |                  const gr = gsObj.grArray.find(function (x) {
 |  |                  const gr = gsObj.grArray.find(function (x) {
 | 
												
													
														
															|  |                      return x.pid === tender.pid;
 |  |                      return x.pid === tender.pid;
 | 
												
													
														
															|  |                  });
 |  |                  });
 | 
												
													
														
															|  |                  const c_id = getLocalCache(dskCompilation);
 |  |                  const c_id = getLocalCache(dskCompilation);
 | 
												
													
														
															|  | -                const t = {pid: tender.pid, name: tender.name, compilationId: c_id, compilationName: _.find(compilationList, { ID: c_id }).name };
 |  | 
 | 
												
													
														
															|  | 
 |  | +                const t = {
 | 
												
													
														
															|  | 
 |  | +                    pid: tender.pid,
 | 
												
													
														
															|  | 
 |  | +                    name: tender.name,
 | 
												
													
														
															|  | 
 |  | +                    compilationId: c_id,
 | 
												
													
														
															|  | 
 |  | +                    compilationName: _.find(compilationList, {ID: c_id}).name
 | 
												
													
														
															|  | 
 |  | +                };
 | 
												
													
														
															|  |                  if (!gr) gsObj.grArray.push(t);
 |  |                  if (!gr) gsObj.grArray.push(t);
 | 
												
													
														
															|  |                  return t;
 |  |                  return t;
 | 
												
													
														
															|  |              },
 |  |              },
 | 
												
											
												
													
														
															|  | @@ -3634,7 +3645,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              refreshSourceTree: function () {
 |  |              refreshSourceTree: function () {
 | 
												
													
														
															|  |                  const c_id = getLocalCache(dskCompilation);
 |  |                  const c_id = getLocalCache(dskCompilation);
 | 
												
													
														
															|  |                  if (c_id) {
 |  |                  if (c_id) {
 | 
												
													
														
															|  | -                    postData('/profile/dsk/api', { type: 'project', compilationId: c_id }, function (result) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    postData('/profile/dsk/api', {type: 'project', compilationId: c_id}, function (result) {
 | 
												
													
														
															|  |                          makeDskProjectSjsHtml(result);
 |  |                          makeDskProjectSjsHtml(result);
 | 
												
													
														
															|  |                      });
 |  |                      });
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
											
												
													
														
															|  | @@ -3651,7 +3662,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                      const posterity = gsObj.tenderSourceTree.getPosterity(node);
 |  |                      const posterity = gsObj.tenderSourceTree.getPosterity(node);
 | 
												
													
														
															|  |                      for (const p of posterity) {
 |  |                      for (const p of posterity) {
 | 
												
													
														
															|  |                          p.selected = node.selected;
 |  |                          p.selected = node.selected;
 | 
												
													
														
															|  | -                        if ((!p.children || p.children.length === 0) && p.type === 2){
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        if ((!p.children || p.children.length === 0) && p.type === 2) {
 | 
												
													
														
															|  |                              if (p.selected) {
 |  |                              if (p.selected) {
 | 
												
													
														
															|  |                                  dskProjectSpreadObj._addTender(p);
 |  |                                  dskProjectSpreadObj._addTender(p);
 | 
												
													
														
															|  |                              } else {
 |  |                              } else {
 | 
												
											
												
													
														
															|  | @@ -3695,8 +3706,25 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              gsObj.gsSheet = gsSpread.getActiveSheet();
 |  |              gsObj.gsSheet = gsSpread.getActiveSheet();
 | 
												
													
														
															|  |              const gsSpreadSetting = {
 |  |              const gsSpreadSetting = {
 | 
												
													
														
															|  |                  cols: [
 |  |                  cols: [
 | 
												
													
														
															|  | -                    {title: '选择', field: 'selected', hAlign: 1, width: 40, formatter: '@', cellType: 'checkbox', readOnly: true,},
 |  | 
 | 
												
													
														
															|  | -                    {title: '名称', field: 'name', hAlign: 0, width: 400, formatter: '@', readOnly: true, folderCell: true, cellType: 'tree'},
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    {
 | 
												
													
														
															|  | 
 |  | +                        title: '选择',
 | 
												
													
														
															|  | 
 |  | +                        field: 'selected',
 | 
												
													
														
															|  | 
 |  | +                        hAlign: 1,
 | 
												
													
														
															|  | 
 |  | +                        width: 40,
 | 
												
													
														
															|  | 
 |  | +                        formatter: '@',
 | 
												
													
														
															|  | 
 |  | +                        cellType: 'checkbox',
 | 
												
													
														
															|  | 
 |  | +                        readOnly: true,
 | 
												
													
														
															|  | 
 |  | +                    },
 | 
												
													
														
															|  | 
 |  | +                    {
 | 
												
													
														
															|  | 
 |  | +                        title: '名称',
 | 
												
													
														
															|  | 
 |  | +                        field: 'name',
 | 
												
													
														
															|  | 
 |  | +                        hAlign: 0,
 | 
												
													
														
															|  | 
 |  | +                        width: 400,
 | 
												
													
														
															|  | 
 |  | +                        formatter: '@',
 | 
												
													
														
															|  | 
 |  | +                        readOnly: true,
 | 
												
													
														
															|  | 
 |  | +                        folderCell: true,
 | 
												
													
														
															|  | 
 |  | +                        cellType: 'tree'
 | 
												
													
														
															|  | 
 |  | +                    },
 | 
												
													
														
															|  |                  ],
 |  |                  ],
 | 
												
													
														
															|  |                  emptyRows: 0,
 |  |                  emptyRows: 0,
 | 
												
													
														
															|  |                  headRows: 1,
 |  |                  headRows: 1,
 | 
												
											
												
													
														
															|  | @@ -3714,8 +3742,28 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              gsObj.grSheet = grSpread.getActiveSheet();
 |  |              gsObj.grSheet = grSpread.getActiveSheet();
 | 
												
													
														
															|  |              const grSpreadSetting = {
 |  |              const grSpreadSetting = {
 | 
												
													
														
															|  |                  cols: [
 |  |                  cols: [
 | 
												
													
														
															|  | -                    {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 250, formatter: '@', readOnly: true, cellType: 'ellipsisAutoTip', scrollHeightClass: '.modal-height-500'},
 |  | 
 | 
												
													
														
															|  | -                    {title: '所属编办', colSpan: '1', rowSpan: '1', field: 'compilationName', hAlign: 0, width: 150, formatter: '@', readOnly: true},
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    {
 | 
												
													
														
															|  | 
 |  | +                        title: '名称',
 | 
												
													
														
															|  | 
 |  | +                        colSpan: '1',
 | 
												
													
														
															|  | 
 |  | +                        rowSpan: '1',
 | 
												
													
														
															|  | 
 |  | +                        field: 'name',
 | 
												
													
														
															|  | 
 |  | +                        hAlign: 0,
 | 
												
													
														
															|  | 
 |  | +                        width: 250,
 | 
												
													
														
															|  | 
 |  | +                        formatter: '@',
 | 
												
													
														
															|  | 
 |  | +                        readOnly: true,
 | 
												
													
														
															|  | 
 |  | +                        cellType: 'ellipsisAutoTip',
 | 
												
													
														
															|  | 
 |  | +                        scrollHeightClass: '.modal-height-500'
 | 
												
													
														
															|  | 
 |  | +                    },
 | 
												
													
														
															|  | 
 |  | +                    {
 | 
												
													
														
															|  | 
 |  | +                        title: '所属编办',
 | 
												
													
														
															|  | 
 |  | +                        colSpan: '1',
 | 
												
													
														
															|  | 
 |  | +                        rowSpan: '1',
 | 
												
													
														
															|  | 
 |  | +                        field: 'compilationName',
 | 
												
													
														
															|  | 
 |  | +                        hAlign: 0,
 | 
												
													
														
															|  | 
 |  | +                        width: 150,
 | 
												
													
														
															|  | 
 |  | +                        formatter: '@',
 | 
												
													
														
															|  | 
 |  | +                        readOnly: true
 | 
												
													
														
															|  | 
 |  | +                    },
 | 
												
													
														
															|  |                  ],
 |  |                  ],
 | 
												
													
														
															|  |                  emptyRows: 0,
 |  |                  emptyRows: 0,
 | 
												
													
														
															|  |                  headRows: 1,
 |  |                  headRows: 1,
 | 
												
											
												
													
														
															|  | @@ -3773,8 +3821,8 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              const tenderTree = createNewPathTree('gather', treeSetting);
 |  |              const tenderTree = createNewPathTree('gather', treeSetting);
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |              function setChildrenNode(node, files, tenders) {
 |  |              function setChildrenNode(node, files, tenders) {
 | 
												
													
														
															|  | -                const children = _.filter(files, { parentID: node.pid });
 |  | 
 | 
												
													
														
															|  | -                const tenderChildren = _.filter(tenders, { parentID: node.pid });
 |  | 
 | 
												
													
														
															|  | 
 |  | +                const children = _.filter(files, {parentID: node.pid});
 | 
												
													
														
															|  | 
 |  | +                const tenderChildren = _.filter(tenders, {parentID: node.pid});
 | 
												
													
														
															|  |                  const checkChildren = _.orderBy([...children, ...tenderChildren], ['seq', 'asc']);
 |  |                  const checkChildren = _.orderBy([...children, ...tenderChildren], ['seq', 'asc']);
 | 
												
													
														
															|  |                  for (const c of checkChildren) {
 |  |                  for (const c of checkChildren) {
 | 
												
													
														
															|  |                      // if (c.type === 1 && _.filter(files, { parentID: c.ID }).length === 0 && _.filter(tenders, { parentID: c.ID }).length === 0) {
 |  |                      // if (c.type === 1 && _.filter(files, { parentID: c.ID }).length === 0 && _.filter(tenders, { parentID: c.ID }).length === 0) {
 | 
												
											
												
													
														
															|  | @@ -3786,19 +3834,19 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                          parentID: c.parentID,
 |  |                          parentID: c.parentID,
 | 
												
													
														
															|  |                          name: c.name,
 |  |                          name: c.name,
 | 
												
													
														
															|  |                          type: c.type,
 |  |                          type: c.type,
 | 
												
													
														
															|  | -                        selected: _.findIndex(gsObj.grArray, { pid: c.ID }) >= 0
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        selected: _.findIndex(gsObj.grArray, {pid: c.ID}) >= 0
 | 
												
													
														
															|  |                      };
 |  |                      };
 | 
												
													
														
															|  |                      tenderTree.addNode(child, node);
 |  |                      tenderTree.addNode(child, node);
 | 
												
													
														
															|  |                      if (c.type === 1) setChildrenNode(child, files, tenders);
 |  |                      if (c.type === 1) setChildrenNode(child, files, tenders);
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -            function convert (projects) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +            function convert(projects) {
 | 
												
													
														
															|  |                  tenderTree.clearDatas();
 |  |                  tenderTree.clearDatas();
 | 
												
													
														
															|  |                  const result = filterFolders(projects);
 |  |                  const result = filterFolders(projects);
 | 
												
													
														
															|  | -                const topLevel = _.orderBy(_.filter(result, { parentID: '-1' }), ['seq', 'asc']);
 |  | 
 | 
												
													
														
															|  | -                const files = _.filter(result, { type: 1 });
 |  | 
 | 
												
													
														
															|  | -                const tenders = _.filter(result, { type: 2 });
 |  | 
 | 
												
													
														
															|  | 
 |  | +                const topLevel = _.orderBy(_.filter(result, {parentID: '-1'}), ['seq', 'asc']);
 | 
												
													
														
															|  | 
 |  | +                const files = _.filter(result, {type: 1});
 | 
												
													
														
															|  | 
 |  | +                const tenders = _.filter(result, {type: 2});
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |                  for (const t of topLevel) {
 |  |                  for (const t of topLevel) {
 | 
												
													
														
															|  |                      const node = {
 |  |                      const node = {
 | 
												
											
												
													
														
															|  | @@ -3806,7 +3854,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                          parentID: t.parentID,
 |  |                          parentID: t.parentID,
 | 
												
													
														
															|  |                          name: t.name,
 |  |                          name: t.name,
 | 
												
													
														
															|  |                          type: t.type,
 |  |                          type: t.type,
 | 
												
													
														
															|  | -                        selected: t.type === 2 ? _.findIndex(gsObj.grArray, { pid: t.ID }) >= 0 : false,
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        selected: t.type === 2 ? _.findIndex(gsObj.grArray, {pid: t.ID}) >= 0 : false,
 | 
												
													
														
															|  |                      };
 |  |                      };
 | 
												
													
														
															|  |                      tenderTree.addNode(node, null);
 |  |                      tenderTree.addNode(node, null);
 | 
												
													
														
															|  |                      if (t.type === 1) setChildrenNode(node, files, tenders);
 |  |                      if (t.type === 1) setChildrenNode(node, files, tenders);
 | 
												
											
												
													
														
															|  | @@ -3814,7 +3862,8 @@ $(document).ready(() => {
 | 
												
													
														
															|  |                  tenderTree.sortTreeNode(true);
 |  |                  tenderTree.sortTreeNode(true);
 | 
												
													
														
															|  |                  return tenderTree;
 |  |                  return tenderTree;
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  | -            return { tenderTree, convert }
 |  | 
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +            return {tenderTree, convert}
 | 
												
													
														
															|  |          })();
 |  |          })();
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |          function filterFolders(data) {
 |  |          function filterFolders(data) {
 | 
												
											
												
													
														
															|  | @@ -3864,7 +3913,11 @@ $(document).ready(() => {
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |          $('#set-dsk-project').click(function () {
 |  |          $('#set-dsk-project').click(function () {
 | 
												
													
														
															|  | -            postData('/profile/dsk/api', { type: 'save_projects', tid: window.location.pathname.split('/')[2], project_list: gsObj.grArray }, function (result) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +            postData('/profile/dsk/api', {
 | 
												
													
														
															|  | 
 |  | +                type: 'save_projects',
 | 
												
													
														
															|  | 
 |  | +                tid: window.location.pathname.split('/')[2],
 | 
												
													
														
															|  | 
 |  | +                project_list: gsObj.grArray
 | 
												
													
														
															|  | 
 |  | +            }, function (result) {
 | 
												
													
														
															|  |                  // dskAccountData.select_project = result;
 |  |                  // dskAccountData.select_project = result;
 | 
												
													
														
															|  |                  dskProjects = gsObj.grArray;
 |  |                  dskProjects = gsObj.grArray;
 | 
												
													
														
															|  |                  if (!dskAccountData.select_project || dskAccountData.select_project !== result) {
 |  |                  if (!dskAccountData.select_project || dskAccountData.select_project !== result) {
 | 
												
											
												
													
														
															|  | @@ -3888,6 +3941,7 @@ $(document).ready(() => {
 | 
												
													
														
															|  |              $('#change-dsk-project').html(html);
 |  |              $('#change-dsk-project').html(html);
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  | 
 |  | +}
 | 
												
													
														
															|  |  });
 |  |  });
 | 
												
													
														
															|  |  // 编号排序,多重判断
 |  |  // 编号排序,多重判断
 | 
												
													
														
															|  |  function sortByCode(a, b, code = 'b_code') {
 |  |  function sortByCode(a, b, code = 'b_code') {
 |