Procházet zdrojové kódy

批量导入新增选项

MaiXinRong před 2 roky
rodič
revize
5389605132

+ 4 - 3
app/public/js/shares/batch_import.js

@@ -128,8 +128,8 @@ const BatchImportStageGcl = function (setting) {
                 $('#bi-download-error').hide();
             }
         },
-        importStageGcl: async function (node, cover) {
-            const updateData = { lid: node.lid, type: 'stage', cover, tenders: [] };
+        importStageGcl: async function (node, cover, ignore) {
+            const updateData = { lid: node.lid, type: 'stage', cover, ignore, tenders: [] };
             for (const tender of node.children) {
                 updateData.tenders.push({ tid: tender.tid, name: tender.name, stageCount: tender.stageCount, stage: tender.stage });
             }
@@ -152,6 +152,7 @@ const BatchImportStageGcl = function (setting) {
             biObj.batching = true;
             this.beforeBatchImport();
             const cover = $('#bi-cover')[0].checked;
+            const ignore = $('#bi-ignore')[0].checked;
             for (const node of this.batchTree.children) {
                 if (!node.selected) continue;
 
@@ -162,7 +163,7 @@ const BatchImportStageGcl = function (setting) {
                     try {
                         node.status = '开始导入';
                         SpreadJsObj.reLoadRowData(biObj.sheet, row);
-                        await biObj.importStageGcl(node, cover);
+                        await biObj.importStageGcl(node, cover, ignore);
                         node.status = '导入完成';
                     } catch(err) {
                         console.log(err);

+ 4 - 0
app/view/shares/batch_import_modal.ejs

@@ -15,6 +15,10 @@
                                 <input class="form-check-input" type="checkbox" id="bi-cover">
                                 <label class="form-check-label" for="bi-cover">覆盖数据</label>
                             </div>
+                            <div class="form-check form-check-inline">
+                                <input class="form-check-input" type="checkbox" id="bi-ignore">
+                                <label class="form-check-label" for="bi-ignore">以本标段清单为准</label>
+                            </div>
                         </div>
                         <div class="ml-auto">
                             <button class="btn btn-sm btn-primary" id="bi-start">导入</button>

+ 1 - 1
app/view/shares/tender_select_modal.ejs

@@ -25,7 +25,7 @@
                             </div>
                             <div class="form-check form-check-inline">
                                 <input class="form-check-input" type="checkbox" id="ts-ignore">
-                                <label class="form-check-label" for="ts-ignore">忽略找不到的清单</label>
+                                <label class="form-check-label" for="ts-ignore">以本标段清单为准</label>
                             </div>
                         </div>
                     </div>