Ver código fonte

店内调出报表

lilei 3 anos atrás
pai
commit
9c26b26e1e

+ 59 - 0
src/api/reportData.js

@@ -1,4 +1,63 @@
 import { axios } from '@/utils/request'
+
+// 店内调出-分页列表
+export const reportStoreCallOutPageList = (params) => {
+  const url = `report/reportStoreCallOut/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出-列表合计
+export const reportStoreCallOutListTotal = (params) => {
+  return axios({
+    url: 'report/reportStoreCallOut/reportCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出-报表导出
+export const reportStoreCallOutExport = params => {
+  return axios.request({
+    url: `/report/reportStoreCallOut/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 店内调出明细-分页列表
+export const reportStoreCallOutDetailList = (params) => {
+  const url = `report/reportStoreCallOut/reportDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出明细-列表合计
+export const reportStoreCallOutDetailTotal = (params) => {
+  return axios({
+    url: 'report/reportStoreCallOut/reportDetailCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出明细-报表导出
+export const reportStoreCallOutDetailExport = params => {
+  return axios.request({
+    url: `/report/reportStoreCallOut/detailExport`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
 // 连锁收发存报表-分页列表
 export const linkageReportPageList = (params) => {
   const url = `report/reportStockPutOut/linkageReportPage/${params.pageNo}/${params.pageSize}`

+ 31 - 35
src/views/reportData/storeTransferOutReport/detailList.vue

@@ -18,35 +18,35 @@
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+          <a-col :md="4" :sm="24">
             <a-form-model-item label="店内调出单号">
-              <a-input id="storeTransOutReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入店内调出单号"/>
+              <a-input id="storeTransOutReport-storeCallOutNo" v-model.trim="queryParam.storeCallOutNo" allowClear placeholder="请输入店内调出单号"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+          <a-col :md="4" :sm="24">
             <a-form-item label="调往对象">
               <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
             </a-form-item>
           </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨类型">
+              <a-select id="sstoreTransOutReport-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
+                <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <template v-if="advanced">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="调拨类型">
-                <a-select id="sstoreTransOutReport-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
-                  <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-model-item label="产品编码">
                 <a-input id="storeTransOutDetailReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-model-item label="产品名称">
                 <a-input id="storeTransOutDetailReport-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="产品品牌">
                 <ProductBrand id="storeTransOutDetailReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
               </a-form-item>
@@ -80,8 +80,8 @@
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
-        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
-        调出总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</strong>;
+        调出总成本:<strong>{{ (totalData && (totalData.outCost || totalData.outCost==0)) ? '¥'+totalData.outCost : '--' }}</strong>;
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -107,7 +107,7 @@ import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import supplier from '@/views/common/supplier'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
-import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
+import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
   mixins: [commonMixin],
@@ -122,9 +122,6 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        salesTargetName: '',
-        sparePartsPutTypeSn: undefined,
-        supplierSn: undefined,
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
@@ -133,9 +130,10 @@ export default {
           code: '', //  产品编码
           name: '' //  产品名称
         },
+        callOutType: undefined,
         productType: undefined,
-        salesBillNo: '',
-        salesManName: ''
+        storeCallOutNo: '',
+        putPersonName: ''
       },
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -144,15 +142,15 @@ export default {
       exportLoading: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '店内调出单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨类型', dataIndex: 'storeCallOutTypeSn', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'productQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'productCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'salesAuditDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '数量', dataIndex: 'outQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -160,8 +158,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         delete params.time
-        delete params.warehouseCascade
-        return reportSalesBillDetailList(params).then(res => {
+        return reportStoreCallOutDetailList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -184,7 +181,7 @@ export default {
   methods: {
     // 合计
     getCount (params) {
-      reportSalesBillDetailCount(params).then(res => {
+      reportStoreCallOutDetailTotal(params).then(res => {
         if (res.status == 200) {
           this.totalData = res.data
         } else {
@@ -215,10 +212,9 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesBillNo = ''
-      this.queryParam.salesTargetName = ''
-      this.queryParam.sparePartsPutTypeSn = undefined
-      this.queryParam.supplierSn = undefined
+      this.queryParam.storeCallOutNo = ''
+      this.queryParam.callOutType = undefined
+      this.queryParam.putPersonName = ''
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''
@@ -237,8 +233,8 @@ export default {
           const params = _this.queryParam
           _this.exportLoading = true
           _this.spinning = true
-          reportSalesBillDetailExport(params).then(res => {
-            downloadExcel(res, '散件入库明细报表')
+          reportStoreCallOutDetailExport(params).then(res => {
+            downloadExcel(res, '店内调出明细报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 29 - 42
src/views/reportData/storeTransferOutReport/list.vue

@@ -18,25 +18,23 @@
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+          <a-col :md="4" :sm="24">
             <a-form-model-item label="店内调出单号">
-              <a-input id="storeTransOutReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入店内调出单号"/>
+              <a-input id="storeTransOutReport-storeCallOutNo" v-model.trim="queryParam.storeCallOutNo" allowClear placeholder="请输入店内调出单号"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+          <a-col :md="4" :sm="24">
             <a-form-item label="调往对象">
               <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
             </a-form-item>
           </a-col>
-          <template v-if="advanced">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="调拨类型">
-                <a-select id="sstoreTransOutReport-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
-                  <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-          </template>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨类型">
+              <a-select id="sstoreTransOutReport-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
+                <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="handleSearch" :disabled="disabled" id="storeTransOutReport-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeTransOutReport-reset">重置</a-button>
@@ -49,10 +47,6 @@
               v-if="$hasPermissions('B_salesReportExport')"
               class="button-warning"
               id="storeTransOutReport-export-btn">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
           </a-col>
         </a-row>
       </a-form-model>
@@ -60,9 +54,9 @@
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
-        总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
-        产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
-        调出总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>;
+        总单数:<strong>{{ (totalData && (totalData.productTotalCategory || totalData.productTotalCategory==0)) ? totalData.productTotalCategory : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
+        调出总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -85,7 +79,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
-import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
+import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
   mixins: [commonMixin],
@@ -101,9 +95,8 @@ export default {
         beginDate: '',
         endDate: '',
         putPersonName: '',
-        storeCallOutTypeSn: undefined, //  省
-        salesBillNo: '',
-        salesManName: ''
+        callOutType: undefined,
+        storeCallOutNo: ''
       },
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -112,13 +105,13 @@ export default {
       exportLoading: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '店内调出单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨类型', dataIndex: 'storeCallOutTypeSn', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'salesAuditDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -126,7 +119,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         delete params.time
-        return reportSalesBillList(params).then(res => {
+        return reportStoreCallOutPageList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -149,7 +142,7 @@ export default {
   methods: {
     // 合计
     getCount (params) {
-      reportSalesBillCount(params).then(res => {
+      reportStoreCallOutListTotal(params).then(res => {
         if (res.status == 200) {
           this.totalData = res.data
         } else {
@@ -180,14 +173,9 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesTargetName = ''
-      this.queryParam.salesTargetType = undefined
-      this.queryParam.provinceSn = undefined
-      this.queryParam.citySn = undefined
-      this.queryParam.countySn = undefined
-      this.queryParam.settleStyleSn = undefined
-      this.queryParam.salesBillNo = ''
-      this.queryParam.salesManName = ''
+      this.queryParam.putPersonName = ''
+      this.queryParam.storeCallOutNo = ''
+      this.queryParam.callOutType = undefined
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.$refs.table.clearTable()
@@ -200,8 +188,8 @@ export default {
           const params = _this.queryParam
           _this.exportLoading = true
           _this.spinning = true
-          reportSalesBillExport(params).then(res => {
-            downloadExcel(res, '销售报表')
+          reportStoreCallOutExport(params).then(res => {
+            downloadExcel(res, '店内调出报表')
             _this.exportLoading = false
             _this.spinning = false
           })
@@ -222,7 +210,6 @@ export default {
       })
     },
     pageInit () {
-      this.getArea('province')
       this.getStoreCallOutTypeAllList()
     }
   },