chenrui 1 ano atrás
pai
commit
1bf0fe97ba

+ 13 - 3
src/views/salesManagement/salesOrderWarehouse/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称">
-                <a-input id="salesOrderWarehouseList-buyerSn" v-model.trim="queryParam.buyerSn" allowClear placeholder="请输入客户名称"/>
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesManagementList-buyerName" @change="custChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -83,6 +83,8 @@
         </template>
       </s-table>
     </a-spin>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
   </a-card>
 </template>
 
@@ -92,14 +94,16 @@ import moment from 'moment'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import Area from '@/views/common/area.js'
+import reportModal from '@/views/common/reportModal.vue'
 import { STable, VSelect } from '@/components'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import { queryPageForWarehouse, queryCountForWarehouse, exportForWarehouse } from '@/api/sales'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   name: 'SalesOrderWarehouseList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, Area, chooseWarehouse },
+  components: { STable, VSelect, rangeDate, Area, chooseWarehouse, reportModal, dealerSubareaScopeList },
   data () {
     return {
       spinning: false,
@@ -121,6 +125,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       loading: false,
       totalData: null,
+      showExport: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -164,6 +169,9 @@ export default {
     }
   },
   methods: {
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
     // 获取总数量
     getCount (params) {
       queryCountForWarehouse(params).then(res => {
@@ -179,9 +187,10 @@ export default {
       const _this = this
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(exportForWarehouse, _this.queryParam, '销售单仓库明细', function () {
+      hdExportExcel(exportForWarehouse, _this.queryParam, '仓库销售单明细', function () {
         _this.exportLoading = false
         _this.spinning = false
+        _this.showExport = true
       })
     },
     //  时间  change
@@ -192,6 +201,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
+      this.$refs.dealerSubareaScopeList.resetForm()
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = ''