Procházet zdrojové kódy

Merge branch 'deploy_0804' of jianguan-web/jg-ocs-html into master

陈瑞 před 3 roky
rodič
revize
19f5b6cbf4
28 změnil soubory, kde provedl 507 přidání a 436 odebrání
  1. 30 2
      src/api/reportData.js
  2. 2 2
      src/api/spareParts.js
  3. 61 25
      src/config/router.config.js
  4. 2 2
      src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue
  5. 33 2
      src/views/purchasingManagement/bulkWarehousingOrder/edit.vue
  6. 15 30
      src/views/reportData/actualSalesReport/list.vue
  7. 16 30
      src/views/reportData/allocationDetails/list.vue
  8. 5 1
      src/views/reportData/allocationOrderTotal/list.vue
  9. 15 30
      src/views/reportData/billingReturnReport/list.vue
  10. 5 1
      src/views/reportData/districtTypeSalesDetails/list.vue
  11. 5 1
      src/views/reportData/hPriceDifferenceDetailReport/list.vue
  12. 5 1
      src/views/reportData/nationalCustomerCostStatistics/list.vue
  13. 10 28
      src/views/reportData/priceDifferenceDetailReport/list.vue
  14. 5 1
      src/views/reportData/provinceTypeSalesDetails/list.vue
  15. 5 1
      src/views/reportData/regionalPromotionCostStatistics/list.vue
  16. 15 30
      src/views/reportData/returnSlipReport/list.vue
  17. 15 30
      src/views/reportData/salesAmountReport/list.vue
  18. 19 10
      src/views/reportData/salesDetails/list.vue
  19. 17 8
      src/views/reportData/salesOrderTotal/list.vue
  20. 18 8
      src/views/reportData/salesPresentation/list.vue
  21. 15 30
      src/views/reportData/salesReturnDetailReport/list.vue
  22. 15 30
      src/views/reportData/salesReturnReport/list.vue
  23. 17 32
      src/views/reportData/salesReturnsReport/list.vue
  24. 15 30
      src/views/reportData/salesSlipReport/list.vue
  25. 60 45
      src/views/reportData/warehousingOrder/list.vue
  26. 36 14
      src/views/reportData/warehousingOrderDetail/list.vue
  27. 40 3
      src/views/salesManagement/salesQuery/edit.vue
  28. 11 9
      src/views/salesManagement/salesQuery/list.vue

+ 30 - 2
src/api/reportData.js

@@ -280,6 +280,34 @@ export const reportSalesBillExport = (params) => {
   })
 }
 //  入库单报表
+export const reportStockPutList = (params) => {
+  const url = `/report/reportStockPut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  入库单报表  合计
+export const reportStockPutCount = (params) => {
+  return axios({
+    url: '/report/reportStockPut/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 入库单报表 导出
+export const reportStockPutExport = (params) => {
+  return axios({
+    url: '/report/reportStockPut/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+//  入库单明细报表
 export const reportStockPutDetailList = (params) => {
   const url = `/report/reportStockPut/detail/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -290,7 +318,7 @@ export const reportStockPutDetailList = (params) => {
     method: 'post'
   })
 }
-//  入库单报表  合计
+//  入库单明细报表  合计
 export const reportStockPutDetailCount = (params) => {
   return axios({
     url: '/report/reportStockPut/detail/queryCount',
@@ -298,7 +326,7 @@ export const reportStockPutDetailCount = (params) => {
     method: 'post'
   })
 }
-// 入库单报表 导出
+// 入库单明细报表 导出
 export const reportStockPutDetailExport = (params) => {
   return axios({
     url: '/report/reportStockPut/detail/exportExcel',

+ 2 - 2
src/api/spareParts.js

@@ -41,7 +41,7 @@ export const sparePartsDeleteDetail = (params) => {
 
 // 分页列表明细
 export const sparePartsDetailList = (params) => {
-  const url = `/spareParts/queryDetailPage/${params.sn}/${params.pageNo}/${params.pageSize}`
+  const url = `/spareParts/queryDetailPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -54,7 +54,7 @@ export const sparePartsDetailList = (params) => {
 // 分页列表明细合计
 export const sparePartsPageCount = (params) => {
   return axios({
-    url: `/spareParts/queryDetailPageCount/${params.sn}`,
+    url: `/spareParts/queryDetailPageCount`,
     data: params,
     method: 'post'
   })

+ 61 - 25
src/config/router.config.js

@@ -600,6 +600,42 @@ export const asyncRouterMap = [
               }
             ]
           },
+          // {
+          //   path: '/inventoryManagement/inventoryCheck',
+          //   redirect: '/inventoryManagement/inventoryCheck/list',
+          //   name: 'inventoryCheck',
+          //   component: BlankLayout,
+          //   meta: {
+          //     title: '库存盘点',
+          //     icon: 'monitor'
+          //     // permission: 'M_inventoryCheckList'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'inventoryCheckList',
+          //       component: () => import(/* webpackChunkName: "inventoryManagement" */ '@/views/inventoryManagement/inventoryCheck/list.vue'),
+          //       meta: {
+          //         title: '库存盘点列表',
+          //         icon: 'monitor',
+          //         hidden: true
+          //         // permission: 'M_inventoryCheckList'
+          //       }
+          //     },
+          //     {
+          //       path: 'detail/:sn',
+          //       name: 'inventoryCheckDetail',
+          //       component: () => import(/* webpackChunkName: "inventoryManagement" */ '@/views/inventoryManagement/inventoryCheck/detail.vue'),
+          //       meta: {
+          //         title: '库存盘点详情',
+          //         icon: 'monitor',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     }
+          //   ]
+          // },
           {
             path: '/inventoryManagement/inventoryWarning',
             name: 'inventoryWarningList',
@@ -1125,31 +1161,31 @@ export const asyncRouterMap = [
               }
             ]
           },
-          // {
-          //   path: '/reportData/warehousingOrder',
-          //   redirect: '/reportData/warehousingOrder/list',
-          //   name: 'warehousingOrder',
-          //   component: BlankLayout,
-          //   meta: {
-          //     title: '入库单报表',
-          //     icon: 'profile'
-          //     // permission: 'M_warehousingOrderList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'warehousingOrderList',
-          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/warehousingOrder/list.vue'),
-          //       meta: {
-          //         title: '入库单报表列表',
-          //         icon: 'profile',
-          //         hidden: true
-          //         // permission: 'M_warehousingOrderList'
-          //       }
-          //     }
-          //   ]
-          // },
+          {
+            path: '/reportData/warehousingOrder',
+            redirect: '/reportData/warehousingOrder/list',
+            name: 'warehousingOrder',
+            component: BlankLayout,
+            meta: {
+              title: '入库单报表',
+              icon: 'profile',
+              permission: 'M_warehousingOrderList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'warehousingOrderList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/warehousingOrder/list.vue'),
+                meta: {
+                  title: '入库单报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_warehousingOrderList'
+                }
+              }
+            ]
+          },
           {
             path: '/reportData/warehousingOrderDetail',
             redirect: '/reportData/warehousingOrderDetail/list',

+ 2 - 2
src/views/purchasingManagement/bulkWarehousingOrder/detailModal.vue

@@ -84,7 +84,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return sparePartsDetailList(Object.assign(parameter, { sn: this.itemSn })).then(res => {
+        return sparePartsDetailList(Object.assign(parameter, { sparePartsSn: this.itemSn })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -92,7 +92,7 @@ export default {
             // 小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
             data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
           }
-          this.getDetailCount(Object.assign(parameter, { sn: this.itemSn }))
+          this.getDetailCount(Object.assign(parameter, { sparePartsSn: this.itemSn }))
           return data
         })
       },

+ 33 - 2
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -36,6 +36,27 @@
             入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
           </div>
         </a-alert>
+        <!-- 筛选条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="allocateBillEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
+                  <a-input id="allocateBillEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
         <!-- 列表 -->
         <s-table
           class="sTable"
@@ -91,6 +112,10 @@ export default {
   data () {
     return {
       spinning: false,
+      queryParam: {
+        productCode: '',
+        productName: ''
+      },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -104,7 +129,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return sparePartsDetailList(Object.assign(parameter, { sn: this.$route.params.sn })).then(res => {
+        return sparePartsDetailList(Object.assign(parameter, this.queryParam, { sparePartsSn: this.$route.params.sn })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -112,7 +137,7 @@ export default {
             // 小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
             data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
           }
-          this.getDetailCount(Object.assign(parameter, { sn: this.$route.params.sn }))
+          this.getDetailCount(Object.assign(parameter, { sparePartsSn: this.$route.params.sn }))
           return data
         })
       },
@@ -155,6 +180,12 @@ export default {
         }
       })
     },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.$refs.table.refresh(true)
+    },
     // 导入产品
     hanldeOk (obj) {
       sparePartsDetailBatchInsert(obj).then(res => {

+ 15 - 30
src/views/reportData/actualSalesReport/list.vue

@@ -135,13 +135,13 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { salesBillRealAmountQueryPageList, salesBillRealReportCount } from '@/api/salesBillReport'
 import { actualSalesExport } from '@/api/reportData'
 export default {
@@ -376,39 +376,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      actualSalesExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(actualSalesExport, params, '实售销售报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '实售销售报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 总计
     getCount (params) {
       salesBillRealReportCount(params).then(res => {
@@ -431,7 +412,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 16 - 30
src/views/reportData/allocationDetails/list.vue

@@ -158,7 +158,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -168,6 +167,7 @@ import { productTypeQuery } from '@/api/productType'
 import { getArea } from '@/api/data'
 import { allocateTypeAllList } from '@/api/allocateType'
 import ProductBrand from '@/views/common/productBrand.js'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { userQueryList } from '@/api/power-user'
 import { allocateReportDetailList, allocateReportDetailCount, allocateReportDetailExport } from '@/api/allocateReport'
 export default {
@@ -279,7 +279,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
@@ -336,39 +340,21 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      allocateReportDetailExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(allocateReportDetailExport, params, '调拨明细报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          console.log('error submit!!')
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '调拨明细报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''

+ 5 - 1
src/views/reportData/allocationOrderTotal/list.vue

@@ -168,7 +168,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 15 - 30
src/views/reportData/billingReturnReport/list.vue

@@ -135,13 +135,13 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { salesReportReturnList, salesReportReturnCount, billingReturnExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, custList, subarea, rangeDate },
@@ -377,39 +377,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      billingReturnExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(billingReturnExport, params, '开单退货报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '开单退货报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 总计
     getCount (params) {
       salesReportReturnCount(params).then(res => {
@@ -432,7 +413,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 5 - 1
src/views/reportData/districtTypeSalesDetails/list.vue

@@ -130,7 +130,11 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 5 - 1
src/views/reportData/hPriceDifferenceDetailReport/list.vue

@@ -229,7 +229,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 5 - 1
src/views/reportData/nationalCustomerCostStatistics/list.vue

@@ -394,7 +394,11 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 10 - 28
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -89,6 +89,7 @@ import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { reportRebateReportList, reportRebateCount, reportRebateExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, custList },
@@ -221,39 +222,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      reportRebateExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportRebateExport, params, '差价明细报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '差价明细报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     pageInit () {
       this.getArea('province')
     }

+ 5 - 1
src/views/reportData/provinceTypeSalesDetails/list.vue

@@ -146,7 +146,11 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 5 - 1
src/views/reportData/regionalPromotionCostStatistics/list.vue

@@ -149,7 +149,11 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 15 - 30
src/views/reportData/returnSlipReport/list.vue

@@ -140,13 +140,13 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { salesReportReturnBillList, salesReportReturnBillCount, returnSlipExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, custList, subarea, rangeDate },
@@ -383,39 +383,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      returnSlipExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(returnSlipExport, params, '开单退货单报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '开单退货单报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 总计
     getCount (params) {
       salesReportReturnBillCount(params).then(res => {
@@ -438,7 +419,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 15 - 30
src/views/reportData/salesAmountReport/list.vue

@@ -135,13 +135,13 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { salesBillReportGroupByBuyerList, salesBillReportCount } from '@/api/salesBillReport'
 import { salesAmountExport } from '@/api/reportData'
 export default {
@@ -377,39 +377,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      salesAmountExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(salesAmountExport, params, '开单销售报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '开单销售报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 总计
     getCount (params) {
       salesBillReportCount(params).then(res => {
@@ -432,7 +413,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 19 - 10
src/views/reportData/salesDetails/list.vue

@@ -114,9 +114,9 @@
                 @click="handleStock"
                 id="salesDetailsList-stockDate">盘点区间日期</a-button>
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailsList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesDetailsList-reset">重置</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailsList-reset">重置</a-button>
               <a-button
-                style="margin-left: 10px"
+                style="margin-left: 5px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
@@ -248,7 +248,6 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        delete params.time
         return reportSalesBillDetailList(params).then(res => {
           this.getCount(params)
           const data = res.data
@@ -296,7 +295,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
@@ -334,12 +337,18 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      this.spinning = true
-      hdExportExcel(reportSalesBillDetailExport, params, '销售明细(开单统计)报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportSalesBillDetailExport, params, '销售明细(开单统计)报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     filterOption (input, option) {

+ 17 - 8
src/views/reportData/salesOrderTotal/list.vue

@@ -202,7 +202,6 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        delete params.time
         return reportSalesBillList(params).then(res => {
           this.getCount(params)
           const data = res.data
@@ -247,7 +246,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
@@ -276,12 +279,18 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      this.spinning = true
-      hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportSalesBillExport, params, '销售(开单统计)报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     filterOption (input, option) {

+ 18 - 8
src/views/reportData/salesPresentation/list.vue

@@ -374,13 +374,19 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      delete params.time
-      this.exportLoading = true
-      this.spinning = true
-      hdExportExcel(reportDispatchReportExport, params, '销售交单报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          delete params.time
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportDispatchReportExport, params, '销售交单报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     // 总计
@@ -405,7 +411,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 15 - 30
src/views/reportData/salesReturnDetailReport/list.vue

@@ -180,7 +180,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDateTime from '@/views/common/rangeDateTime.vue'
@@ -190,6 +189,7 @@ import { getArea } from '@/api/data'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesReturnDetailList, reportSalesReturnDetailCount, reportSalesReturnDetailExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDateTime, custList, subarea, ProductBrand },
@@ -309,7 +309,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
@@ -347,39 +351,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      reportSalesReturnDetailExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportSalesReturnDetailExport, params, '销售退货明细报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '销售退货明细报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0

+ 15 - 30
src/views/reportData/salesReturnReport/list.vue

@@ -135,13 +135,13 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { salesReportReturnRebateList, salesReportReturnRebateCount, salesReturnExport } from '@/api/reportData'
 
 export default {
@@ -378,39 +378,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      salesReturnExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(salesReturnExport, params, '实售退货报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '实售退货报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 总计
     getCount (params) {
       salesReportReturnRebateCount(params).then(res => {
@@ -433,7 +414,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },

+ 17 - 32
src/views/reportData/salesReturnsReport/list.vue

@@ -80,9 +80,9 @@
                 @click="handleStock"
                 id="salesReturnsReportList-stockDate">盘点区间日期</a-button>
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnsReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnsReportList-reset">重置</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnsReportList-reset">重置</a-button>
               <a-button
-                style="margin-left: 10px"
+                style="margin-left: 5px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
@@ -143,8 +143,8 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import custList from '@/views/common/custList.vue'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { reportSalesReturnList, reportSalesReturnCount, salesReturnsExport } from '@/api/reportData'
-import moment from 'moment'
 export default {
   components: { STable, VSelect, rangeDate, subarea, custList },
   data () {
@@ -218,39 +218,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      salesReturnsExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(salesReturnsExport, params, '销售退货单报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '销售退货单报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 盘点库存日期
     handleStock () {
       this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
@@ -277,7 +258,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 15 - 30
src/views/reportData/salesSlipReport/list.vue

@@ -140,13 +140,13 @@
 </template>
 
 <script>
-import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
+import { hdExportExcel } from '@/libs/exportExcel'
 import { salesBillReportList, salesBillReportCount } from '@/api/salesBillReport'
 import { salesSlipExport } from '@/api/reportData'
 export default {
@@ -384,39 +384,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      _this.spinning = true
-      salesSlipExport(params).then(res => {
-        this.exportLoading = false
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(salesSlipExport, params, '开单销售单报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
           })
-          reader.readAsText(res)
         } else {
-          this.download(res)
+          return false
         }
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '开单销售单报表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     // 总计
     getCount (params) {
       salesBillReportCount(params).then(res => {
@@ -439,7 +420,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },

+ 60 - 45
src/views/reportData/warehousingOrder/list.vue

@@ -19,20 +19,33 @@
             </a-col>
             <a-col :md="5" :sm="24">
               <a-form-model-item label="入库单号">
-                <a-input id="warehousingOrderList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入退货单号"/>
+                <a-input id="warehousingOrderList-stockPutNo" v-model.trim="queryParam.stockPutNo" allowClear placeholder="请输入退货单号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="5" :sm="24">
               <a-form-model-item label="入库类型">
                 <v-select
-                  v-model="queryParam.dealerLevel"
-                  ref="dealerLevel"
-                  id="warehousingOrderList-dealerLevel"
-                  code="PUT_STOCK_TYPE"
+                  v-model="queryParam.putBizType"
+                  ref="putBizType"
+                  id="warehousingOrderList-putBizType"
+                  code="PUT_STOCK_TYPE_REPORT"
                   placeholder="请选择入库类型"
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
+            <template v-if="advanced">
+              <a-col :md="8" :sm="24">
+                <a-form-model-item label="散件入库子类型">
+                  <v-select
+                    v-model="queryParam.sparePartsType"
+                    ref="sparePartsType"
+                    id="warehousingOrderList-sparePartsType"
+                    code="SPARE_PARTS_TYPE"
+                    placeholder="请选择散件入库子类型"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
             <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
@@ -49,17 +62,13 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
+                v-if="$hasPermissions('B_warehousingOrderExport')"
                 id="warehousingOrderList-export">导出</a-button>
-<!--              <a-button
-                style="margin-left: 5px"
-                type="primary"
-                class="button-warning"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                v-if="$hasPermissions('B_salesOrderTotalExport')"
-                id="warehousingOrderList-export">导出</a-button>
- -->            </a-col>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
           </a-row>
         </a-form-model>
       </div>
@@ -76,10 +85,10 @@
         <template slot="footer">
           <a-row :gutter="15">
             <a-col :md="4" :sm="24">
-              总数量:{{ (totalData && (totalData.totalPutQty || totalData.totalPutQty==0)) ? totalData.totalPutQty : '--' }}
+              总数量:{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}
             </a-col>
             <a-col :md="4" :sm="24">
-              总金额:{{ (totalData && (totalData.totalPutAmount || totalData.totalPutAmount==0)) ? totalData.totalPutAmount : '--' }}
+              总金额:{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? totalData.productTotalCost : '--' }}
             </a-col>
           </a-row>
         </template>
@@ -92,23 +101,21 @@
 import { STable, VSelect } from '@/components'
 import rangeDateTime from '@/views/common/rangeDateTime.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
-import { reportStockPutDetailList, reportStockPutDetailCount, reportStockPutDetailExport } from '@/api/reportData'
+import { reportStockPutList, reportStockPutCount, reportStockPutExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDateTime },
   data () {
     return {
       spinning: false,
+      advanced: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         time: [],
         beginDate: '',
         endDate: '',
-        salesBillNo: '',
-        dealerName: '',
-        dealerLevel: undefined,
-        creatorId: undefined,
-        subareaSn: undefined,
-        dealerProvinceSn: undefined
+        stockPutNo: '',
+        putBizType: undefined,
+        sparePartsType: undefined
       },
       rules: {
         'time': [{ required: true, message: '请选择完成日期', trigger: 'change' }]
@@ -116,12 +123,13 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '入库单号', dataIndex: 'salesBillNo', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库开单日期', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商名称', dataIndex: 'dealerName', width: '27%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '入库数量', dataIndex: 'totalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库金额', dataIndex: 'totalRealSaleAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库类型', dataIndex: 'operatorName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '入库单号', dataIndex: 'stockPutNo', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库开单日期', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'supplierName', width: '22%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '入库数量', dataIndex: 'productTotalQty', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库金额', dataIndex: 'productTotalCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -129,7 +137,7 @@ export default {
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
         delete params.time
-        return reportStockPutDetailList(params).then(res => {
+        return reportStockPutList(params).then(res => {
           this.getCount(params)
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -151,7 +159,7 @@ export default {
     },
     // 总计
     getCount (params) {
-      reportStockPutDetailCount(params).then(res => {
+      reportStockPutCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -171,7 +179,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
@@ -181,12 +193,9 @@ export default {
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesBillNo = ''
-      this.queryParam.dealerName = ''
-      this.queryParam.dealerLevel = undefined
-      this.queryParam.creatorId = undefined
-      this.queryParam.subareaSn = undefined
-      this.queryParam.dealerProvinceSn = undefined
+      this.queryParam.stockPutNo = ''
+      this.queryParam.putBizType = undefined
+      this.queryParam.sparePartsType = undefined
       this.totalData = null
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
@@ -194,12 +203,18 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      this.spinning = true
-      hdExportExcel(reportStockPutDetailExport, params, '入库单报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportStockPutExport, params, '入库单报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     filterOption (input, option) {

+ 36 - 14
src/views/reportData/warehousingOrderDetail/list.vue

@@ -28,15 +28,26 @@
                   v-model="queryParam.putBizType"
                   ref="putBizType"
                   id="warehousingOrderDetailList-putBizType"
-                  code="PUT_STOCK_TYPE"
+                  code="PUT_STOCK_TYPE_REPORT"
                   placeholder="请选择入库类型"
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="7" :sm="24">
-                <a-form-model-item label="供应商">
-                  <a-input id="warehousingOrderDetailList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商"/>
+                <a-form-model-item label="散件入库子类型">
+                  <v-select
+                    v-model="queryParam.sparePartsType"
+                    ref="sparePartsType"
+                    id="warehousingOrderDetailList-sparePartsType"
+                    code="SPARE_PARTS_TYPE"
+                    placeholder="请选择散件入库子类型"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="5" :sm="24">
+                <a-form-model-item label="单位名称">
+                  <a-input id="warehousingOrderDetailList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入单位名称"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="5" :sm="24">
@@ -44,7 +55,7 @@
                   <a-input id="warehousingOrderDetailList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品编码">
                   <a-input id="warehousingOrderDetailList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
                 </a-form-model-item>
@@ -129,16 +140,17 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
-        { title: '入库单号', dataIndex: 'stockPutNo', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库单号', dataIndex: 'stockPutNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库开单日期', dataIndex: 'openBillTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商名称', dataIndex: 'supplierName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品名称', dataIndex: 'productName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位名称', dataIndex: 'supplierName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'productCode', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库数量', dataIndex: 'putQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '进价', dataIndex: 'putCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库金额', dataIndex: 'putAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '散件入库子类型', dataIndex: 'sparePartsTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '完成日期', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -189,7 +201,11 @@ export default {
     },
     //  创建时间  change
     dateChange (date) {
-      this.queryParam.time = date
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
@@ -211,12 +227,18 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      const params = this.queryParam
-      this.exportLoading = true
-      this.spinning = true
-      hdExportExcel(reportStockPutDetailExport, params, '入库明细报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportStockPutDetailExport, params, '入库单明细报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     filterOption (input, option) {

+ 40 - 3
src/views/salesManagement/salesQuery/edit.vue

@@ -42,11 +42,36 @@
                 总数量:<strong>{{ detailData&&(detailData.totalCommonQty || detailData.totalCommonQty==0) ? detailData.totalCommonQty : '--' }}</strong>;
               </div>
               <div style="position: absolute;right: 0;top: -3px;">
-                <!-- <a-button size="small" type="primary" class="button-info" id="salesEdit-import-btn" @click="openGuideModal=true">导入产品</a-button> -->
+                <a-button size="small" type="primary" class="button-info" id="salesEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
               </div>
             </div>
           </div>
         </a-alert>
+        <!-- 筛选条件 -->
+        <a-row :gutter="15">
+          <a-col :span="24">
+            <div class="table-page-search-wrapper">
+              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+                <a-row :gutter="15">
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品编码" prop="productCode">
+                      <a-input id="salesEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品名称" prop="productName">
+                      <a-input id="salesEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
+                  </a-col>
+                </a-row>
+              </a-form>
+            </div>
+          </a-col>
+        </a-row>
         <!-- 已选配件列表 -->
         <s-table
           class="sTable"
@@ -178,6 +203,7 @@ export default {
       spinning: false,
       salesBillSn: null, // 销售单sn
       disabled: false, //  查询、重置按钮是否可操作
+      chooseDisabled: false,
       isInster: false, // 是否正在添加产品
       delLoading: false,
       newActive: false, // 选择促销品
@@ -205,7 +231,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.productForm.salesBillSn = this.$route.params.sn
-        return salesDetailStockList(Object.assign(parameter, this.productForm)).then(res => {
+        return salesDetailStockList(Object.assign(parameter, this.productForm, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -218,7 +244,11 @@ export default {
           return data
         })
       },
-      openGuideModal: false //  导入产品引导
+      openGuideModal: false, //  导入产品引导
+      queryParam: {
+        productCode: '',
+        productName: ''
+      }
     }
   },
   methods: {
@@ -244,8 +274,15 @@ export default {
         record.qty = record.qtyBackups
       }
     },
+    chooseResetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.$refs.table.refresh(true)
+    },
     //  重置
     resetSearchForm (flag) {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
       this.$refs.table.refresh(!!flag)
       this.getPromoacActiveList()
       this.getOrderDetail(false)

+ 11 - 9
src/views/salesManagement/salesQuery/list.vue

@@ -296,25 +296,27 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '10%', align: 'center' },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交时间', dataIndex: 'submitDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
         { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已下推数量', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已发货数量', dataIndex: 'totalDispatchQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'detailPrintTimes', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
       if (this.showCancelNum) {
-        arr.splice(9, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-        arr.splice(10, 0, { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(10, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(11, 0, { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }