Browse Source

bug 修复

lilei 3 năm trước cách đây
mục cha
commit
23b7803518

+ 40 - 3
src/views/inventoryManagement/inventoryChecking/makeInventory.vue

@@ -30,7 +30,7 @@
             class="button-warning"
             id="inventoryCheckingDetail-export-btn"
             :disabled="localDataSource.length==0"
-            @click="handlePrint('export')">导出Excel</a-button>
+            @click="handleExport('export')">导出Excel</a-button>
         </template>
       </a-page-header>
       <!-- 基础信息 -->
@@ -164,6 +164,36 @@
     <print-modal :openModal="openPrintModal" :itemData="basicInfoData" :nowType="nowType" @ok="handleOk" @close="openPrintModal=false" />
     <!-- 打印 -->
     <div id="print"></div>
+    <!-- 导出选择弹框 -->
+    <a-modal
+      v-model="exportShow"
+      :footer="null"
+      :maskClosable="false"
+      centered
+      title="导出excel"
+      @cancle="exportShow=false"
+    >
+      <div style="line-height: 48px;padding: 0 30px;">
+        <div>盘点单号:{{ basicInfoData&&basicInfoData.checkWarehouseNo }}</div>
+        <div>盘点类型:{{ (basicInfoData&&basicInfoData.checkTypeDictValue) || '--' }}
+          <span v-if="basicInfoData&&basicInfoData.checkType=='SELECT'">({{ (basicInfoData&&basicInfoData.warehouseFlagDictValue) || '--' }})</span>
+        </div>
+        <div>产品范围:
+          <a-radio-group v-model="productScopeFlag">
+            <a-radio :value="true">
+              所有盘点产品
+            </a-radio>
+            <a-radio :value="false">
+              有盈亏的产品
+            </a-radio>
+          </a-radio-group>
+        </div>
+        <div class="btn-cont" style="text-align: center;padding-top: 40px;">
+          <a-button id="inventoryChecking-export-save" @click="exportShow=false">取消</a-button>
+          <a-button type="primary" id="inventoryChecking-export-back" @click="handlePrint('export')" style="margin-left: 15px;">确定导出</a-button>
+        </div>
+      </div>
+    </a-modal>
   </div>
 </template>
 
@@ -184,6 +214,7 @@ export default {
       spinning: false,
       disabled: false,
       advanced: false,
+      exportShow: false,
       queryParam: {
         productName: '',
         productCode: '',
@@ -220,7 +251,8 @@ export default {
       localDataSource: [],
       openPrintModal: false,
       nowType: null,
-      printerType: 'NEEDLE' //  打印机类型
+      printerType: 'NEEDLE', //  打印机类型
+      productScopeFlag: true
     }
   },
   computed: {
@@ -244,6 +276,7 @@ export default {
   methods: {
     //  重置
     resetSearchForm () {
+      this.productScopeFlag = true
       this.queryParam.productName = ''
       this.queryParam.productCode = ''
       this.queryParam.warehouseSn = undefined
@@ -373,9 +406,13 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    handleExport () {
+      this.exportShow = true
+    },
     // 打印导出
     handlePrint (type) {
       if (type == 'export') {
+        this.exportShow = false
         this.nowType = type
         this.handleOk()
       } else {
@@ -389,7 +426,7 @@ export default {
       let url = checkWarehouseDetailPrint //  打印
       if (this.nowType == 'export') { //  导出
         url = checkWarehouseDetailExport
-        params = { checkWarehouseSn: this.$route.params.sn }
+        params = { checkWarehouseSn: this.$route.params.sn, productScopeFlag: this.productScopeFlag }
       } else { //  打印
         params = JSON.parse(JSON.stringify(objs))
         params.printType = this.printerType