Kaynağa Gözat

Merge branch 'develop_yh11' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh11

# Conflicts:
#	public/version.json
lilei 2 yıl önce
ebeveyn
işleme
5d53bd4ad6

+ 1 - 2
public/version.json

@@ -1,5 +1,4 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
-  "vendorJsVersion": "",
-  "version": 1675125839091
+  "version": 1675125874010
 }

+ 63 - 3
src/api/reportData.js

@@ -27,7 +27,7 @@ export const reportSparePartsReturnExport = params => {
     responseType: 'blob'
   })
 }
- 
+
 // 散件退货明细--分页
 export const reportSparePartsReturnDetailPageList = (params) => {
   const url = `report/reportSparePartsReturnDetail/reportPage/${params.pageNo}/${params.pageSize}`
@@ -747,7 +747,7 @@ export const reportStockImportDetailCount = (params) => {
     method: 'post'
   })
 }
-export const reportStockImportDetailExport  = (params) => {
+export const reportStockImportDetailExport = (params) => {
   const url = `/report/reportStockImportDetail/export `
   return axios({
     url: url,
@@ -870,4 +870,64 @@ export const reportAllocLinkageOutDetailExport = params => {
     method: 'post',
     responseType: 'blob'
   })
-}
+}
+
+// 采购退货报表-分页列表
+export const purchaseReturnList = (params) => {
+  const url = `/report/purchaseReturn/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 采购退货报表-列表合计
+export const purchaseReturnQueryCount = (params) => {
+  return axios({
+    url: '/report/purchaseReturn/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 采购退货报表-导出
+export const purchaseReturnExport = params => {
+  return axios.request({
+    url: `/report/purchaseReturn/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 采购明细退货报表-分页列表
+export const purchaseReturnDetailList = (params) => {
+  const url = `/report/purchaseReturnDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 采购明细退货报表-列表合计
+export const purchaseReturnDetailQueryCount = (params) => {
+  return axios({
+    url: '/report/purchaseReturnDetail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 采购明细退货报表-导出
+export const purchaseReturnDetailExport = params => {
+  return axios.request({
+    url: `/report/purchaseReturnDetail/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 4 - 4
src/config/router.config.js

@@ -2260,8 +2260,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             meta: {
               title: '采购退货报表',
-              icon: 'profile'
-              // permission: 'M_purchaseReturnReportList'
+              icon: 'profile',
+              permission: 'M_purchaseReturnReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2272,8 +2272,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '采购退货报表列表',
                   icon: 'profile',
-                  hidden: true
-                  // permission: 'M_purchaseReturnReportList'
+                  hidden: true,
+                  permission: 'M_purchaseReturnReportList'
                 }
               }
             ]

+ 74 - 48
src/views/reportData/purchaseReturnReport/purchaseReturnDetail.vue

@@ -19,33 +19,38 @@
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-model-item label="采购退货单号" prop="no">
-              <a-input v-model.trim="queryParam.no" allowClear placeholder="请输入采购退货单号"/>
+            <a-form-model-item label="采购退货单号" prop="purchaseReturnNo">
+              <a-input v-model.trim="queryParam.purchaseReturnNo" allowClear placeholder="请输入采购退货单号"/>
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-model-item label="供应商" prop="name">
-              <supplier
-                id="bulkReturnGoodsList-supplierSn"
+            <a-form-model-item label="供应商" prop="returnTargetSn">
+              <a-select
+                id="purchaseReturnOrderList-returnTargetSn"
                 placeholder="请选择供应商"
-                v-model="queryParam.supplierSn"
-              ></supplier>
+                allowClear
+                v-model="queryParam.returnTargetSn"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in supplierList" :pyCode="item.pyCode" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn">{{ item.purchaseTargetName }}</a-select-option>
+              </a-select>
             </a-form-model-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品编码">
-                <a-input id="salesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+                <a-input id="salesDetailReportList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品名称">
-                <a-input id="salesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+                <a-input id="salesDetailReportList-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品品牌">
-                <ProductBrand id="purchaseReceiptDetailList-productBrandSn" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+                <ProductBrand id="purchaseReceiptDetailList-productBrandSn" v-model="queryParam.returnTargetSn"></ProductBrand>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -64,7 +69,7 @@
               @click="handleExport"
               :disabled="disabled"
               :loading="exportLoading"
-              v-if="$hasPermissions('B_purchaseReceiptReportExport')"
+              v-if="$hasPermissions('B_purchaseReturnReportExport')"
               id="purchaseReceiptDetailList-export">导出</a-button>
             <a @click="advanced=!advanced" style="margin-left: 5px">
               {{ advanced ? '收起' : '展开' }}
@@ -77,7 +82,7 @@
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
-        产品总数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
           退货总成本:<strong>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? '¥'+toThousands(totalData.totalAmount) : '--' }}</strong>;
         </div>
@@ -99,15 +104,16 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
+import { STable } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import supplier from '@/views/common/supplier'
-import { reportReceivingBillDetailList, reportReceivingBillDetailCount, reportReceivingBillDetailExport } from '@/api/reportData'
+import { purchaseReturnDetailList, purchaseReturnDetailQueryCount, purchaseReturnDetailExport } from '@/api/reportData'
+import { purchaseTargetList } from '@/api/purchase'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  components: { STable, rangeDate, ProductType, ProductBrand, supplier },
   mixins: [commonMixin],
   data () {
     return {
@@ -117,21 +123,22 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        productEntity: {
-          productBrandSn: undefined,
-          productTypeSn1: undefined,
-          productTypeSn2: undefined,
-          productTypeSn3: undefined,
-          code: '',
-          name: ''
-        }
+        purchaseReturnNo: '',
+        productCode: undefined,
+        productName: undefined,
+        returnTargetSn: undefined,
+        productBrandSn: undefined,
+        productTypeSn1: undefined,
+        productTypeSn2: undefined,
+        productTypeSn3: undefined,
+        showCost: undefined
       },
       productType: [],
       rules: {
-        'time': [{ required: true, message: '请选择财务审核时间', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择出库时间', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作11
-      advanced: true, // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -140,7 +147,7 @@ export default {
         this.$emit('spinning', true)
         delete params.time
         if (params.beginDate) {
-          return reportReceivingBillDetailList(params).then(res => {
+          return purchaseReturnDetailList(params).then(res => {
             let data
             if (res.status == 200) {
               data = res.data
@@ -166,12 +173,13 @@ export default {
             }
             _this.disabled = false
             _this.$emit('spinning', false)
-            _this.$message.info('请选择财务审核时间')
+            _this.$message.info('请选择出库时间')
             resolve(data)
           })
         }
       },
-      totalData: null //  合计
+      totalData: null, //  合计
+      supplierList: null
     }
   },
   computed: {
@@ -179,25 +187,40 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '采购退货单号', dataIndex: 'purchaseBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'receivingBillNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购退货单号', dataIndex: 'purchaseReturnNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'returnTargetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出库时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '出库时间', dataIndex: 'outStockTime', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) { //  售价权限
-        arr.splice(6, 0, { title: '成本', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(6, 0, { title: '成本', dataIndex: 'cost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
   },
   methods: {
-    // 合计
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取供应商数据
+    getSupperList () {
+      purchaseTargetList({}).then(res => {
+        if (res.status == 200) {
+          this.supplierList = res.data
+        } else {
+          this.supplierList = []
+        }
+      })
+    },
+    // 统计
     getCount (params) {
-      reportReceivingBillDetailCount(params).then(res => {
+      purchaseReturnDetailQueryCount(params).then(res => {
         if (res.status == 200) {
           this.totalData = res.data
         } else {
@@ -215,6 +238,7 @@ export default {
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          this.queryParam.showCost = this.$hasPermissions('M_ShowAllCost') ? 1 : 0
           this.$refs.table.refresh(true)
         } else {
           console.log('error submit!!')
@@ -228,12 +252,12 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.productEntity.productBrandSn = undefined
-      this.queryParam.productEntity.productTypeSn1 = ''
-      this.queryParam.productEntity.productTypeSn2 = ''
-      this.queryParam.productEntity.productTypeSn3 = ''
-      this.queryParam.productEntity.code = ''
-      this.queryParam.productEntity.name = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = undefined
+      this.queryParam.productTypeSn2 = undefined
+      this.queryParam.productTypeSn3 = undefined
+      this.queryParam.productCode = undefined
+      this.queryParam.productName = undefined
       this.productType = []
       this.$refs.ruleForm.resetFields()
       this.totalData = null
@@ -241,20 +265,21 @@ export default {
     },
     //  产品分类  change
     changeProductType (val, opt) {
-      this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
     //  导出
     handleExport () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          _this.queryParam.showCost = this.$hasPermissions('M_ShowAllCost') ? 1 : 0
           const params = _this.queryParam
           _this.exportLoading = true
           _this.spinning = true
-          reportReceivingBillDetailExport(params).then(res => {
-            downloadExcel(res, '采购入库明细报表')
+          purchaseReturnDetailExport(params).then(res => {
+            downloadExcel(res, '采购退货明细报表')
             _this.exportLoading = false
             _this.spinning = false
           })
@@ -267,6 +292,7 @@ export default {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.resetSearchForm()
+      this.getSupperList()
     }
   },
   activated () {

+ 64 - 32
src/views/reportData/purchaseReturnReport/purchaseReturnOrder.vue

@@ -13,26 +13,31 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="7" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="出库时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="7" :sm="24">
-            <a-form-model-item label="采购退货单号" prop="no">
-              <a-input v-model.trim="queryParam.no" allowClear placeholder="请输入采购退货单号"/>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="采购退货单号" prop="purchaseReturnNo">
+              <a-input v-model.trim="queryParam.purchaseReturnNo" allowClear placeholder="请输入采购退货单号"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="7" :sm="24">
-            <a-form-model-item label="供应商" prop="name">
-              <supplier
-                id="bulkReturnGoodsList-supplierSn"
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商" prop="returnTargetSn">
+              <a-select
+                id="purchaseReturnOrderList-returnTargetSn"
                 placeholder="请选择供应商"
-                v-model="queryParam.supplierSn"
-              ></supplier>
+                allowClear
+                v-model="queryParam.returnTargetSn"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in supplierList" :pyCode="item.pyCode" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn">{{ item.purchaseTargetName }}</a-select-option>
+              </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :md="3" :sm="24" style="margin-bottom: 10px;">
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="purchaseReturnOrderList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnOrderList-reset">重置</a-button>
             <a-button
@@ -45,16 +50,17 @@
               v-if="$hasPermissions('B_purchaseReturnReportExport')"
               id="purchaseReturnOrderList-export">导出</a-button>
           </a-col>
+
         </a-row>
       </a-form-model>
     </div>
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
-        总单数:<strong>{{ (totalData && (totalData.totalPutCategory || totalData.totalPutCategory==0)) ? totalData.totalPutCategory : '--' }}</strong>;
+        总单数:<strong>{{ dataList?dataList.length :'--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-            退货总成本:<strong>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? '¥'+toThousands(totalData.totalAmount) : '--' }}</strong>;
+          退货总成本:<strong>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? '¥'+toThousands(totalData.totalAmount) : '--' }}</strong>;
         </div>
       </div>
     </a-alert>
@@ -77,10 +83,10 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
-import supplier from '@/views/common/supplier'
-import { reportReceivingBillList, reportReceivingBillCount, reportReceivingBillExport } from '@/api/reportData'
+import { purchaseReturnList, purchaseReturnQueryCount, purchaseReturnExport } from '@/api/reportData'
+import { purchaseTargetList } from '@/api/purchase'
 export default {
-  components: { STable, VSelect, rangeDate, supplier },
+  components: { STable, VSelect, rangeDate },
   mixins: [commonMixin],
   data () {
     return {
@@ -89,11 +95,14 @@ export default {
       queryParam: { //  查询条件
         time: [],
         beginDate: '',
-        endDate: ''
+        endDate: '',
+        purchaseReturnNo: undefined,
+        returnTargetSn: undefined,
+        showCost: undefined
       },
-      productType: [],
+      dataList: null, // 总单数
       rules: {
-        'time': [{ required: true, message: '请选择财务审核时间', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择出库时间', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -104,7 +113,7 @@ export default {
         this.$emit('spinning', true)
         delete params.time
         if (params.beginDate) {
-          return reportReceivingBillList(params).then(res => {
+          return purchaseReturnList(params).then(res => {
             let data
             if (res.status == 200) {
               data = res.data
@@ -117,6 +126,7 @@ export default {
               this.disabled = false
             }
             this.$emit('spinning', false)
+            this.dataList = data.list
             return data
           })
         } else {
@@ -130,36 +140,52 @@ export default {
             }
             _this.disabled = false
             _this.$emit('spinning', false)
-            _this.$message.info('请选择财务审核时间')
+            _this.$message.info('请选择出库时间')
             resolve(data)
           })
         }
       },
-      totalData: null //  合计
+      totalData: null, //  合计
+      supplierList: null
     }
   },
   computed: {
     columns () {
       const _this = this
       const arr = [
-         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '采购退货单号', dataIndex: 'purchaseBillNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'receivingBillNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '款数', dataIndex: 'totalPutCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '采购退货单号', dataIndex: 'purchaseReturnNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'returnTargetName', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '款数', dataIndex: 'totalCategory', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本', dataIndex: 'totalAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出库时间', dataIndex: 'auditTime', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '出库时间', dataIndex: 'outStockTime', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) { //  售价权限
-        arr.splice(4, 0,{ title: '成本', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(4, 0, { title: '成本', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
   },
   methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取供应商数据
+    getSupperList () {
+      purchaseTargetList({}).then(res => {
+        if (res.status == 200) {
+          this.supplierList = res.data
+        } else {
+          this.supplierList = []
+        }
+      })
+    },
     // 合计
     getCount (params) {
-      reportReceivingBillCount(params).then(res => {
+      purchaseReturnQueryCount(params).then(res => {
         if (res.status == 200) {
           this.totalData = res.data
         } else {
@@ -177,6 +203,7 @@ export default {
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          this.queryParam.showCost = this.$hasPermissions('M_ShowAllCost') ? 1 : 0
           this.$refs.table.refresh(true)
         } else {
           console.log('error submit!!')
@@ -190,8 +217,11 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.$refs.ruleForm.resetFields()
+      this.queryParam.purchaseReturnNo = undefined
+      this.queryParam.returnTargetSn = undefined
       this.totalData = null
+      this.dataList = null
+      this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
     //  导出
@@ -199,11 +229,12 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          _this.queryParam.showCost = this.$hasPermissions('M_ShowAllCost') ? 1 : 0
           const params = _this.queryParam
           _this.exportLoading = true
           _this.spinning = true
-          reportReceivingBillExport(params).then(res => {
-            downloadExcel(res, '采购入库单报表')
+          purchaseReturnExport(params).then(res => {
+            downloadExcel(res, '采购退货单报表')
             _this.exportLoading = false
             _this.spinning = false
           })
@@ -216,6 +247,7 @@ export default {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.resetSearchForm()
+      this.getSupperList()
     }
   },
   activated () {