chenrui 3 tahun lalu
induk
melakukan
dc7b3862ca

+ 8 - 0
src/api/reportStock.js

@@ -30,6 +30,14 @@ export const reportStockDetailList = (params) => {
     method: 'post'
   })
 }
+//  连锁库存总表  详情  合计
+export const reportStockDetailCount = (params) => {
+  return axios({
+    url: '/report/reportStock/reportDetailCount',
+    data: params,
+    method: 'post'
+  })
+}
 //  库存总入报表
 export const reportStockPutList = (params) => {
   return axios({

+ 6 - 5
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -172,9 +172,6 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         if (this.queryParam.beginDate && this.queryParam.dealerSn) {
-          if (params.dealerSn == 'all') {
-            params.dealerSn = ''
-          }
           return linkageReportPageList(params).then(res => {
             // 总计
             this.getCount(params)
@@ -293,9 +290,13 @@ export default {
         const all = [{ dealerName: '全部', dealerSn: 'all' }]
         if (res.status == 200) {
           const data = res.data || []
-          this.linkageGroupData = [...all, ...data]
+          if (data.length > 0) {
+            this.linkageGroupData = [...all, ...data]
+          } else {
+            this.linkageGroupData = []
+          }
         } else {
-          this.linkageGroupData = all
+          this.linkageGroupData = []
         }
       })
     }

+ 7 - 6
src/views/reportData/chainSalesDetailReport/list.vue

@@ -234,7 +234,7 @@ export default {
         { title: '客户名称', dataIndex: 'salesTargetName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收款方式', dataIndex: 'settleStyleName', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: 220, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'productQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '成本', dataIndex: 'productCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
@@ -249,9 +249,6 @@ export default {
         this.spinning = true
         delete params.time
         delete params.warehouseCascade
-        if (params.dealerSn == 'all') {
-          params.dealerSn = ''
-        }
         return reportSalesBillDetailList(params).then(res => {
           // 总计
           this.getCount(params)
@@ -394,9 +391,13 @@ export default {
         const all = [{ dealerName: '全部', dealerSn: 'all' }]
         if (res.status == 200) {
           const data = res.data || []
-          this.linkageGroupData = [...all, ...data]
+          if (data.length > 0) {
+            this.linkageGroupData = [...all, ...data]
+          } else {
+            this.linkageGroupData = []
+          }
         } else {
-          this.linkageGroupData = all
+          this.linkageGroupData = []
         }
       })
     },

+ 6 - 5
src/views/reportData/chainSalesReport/list.vue

@@ -182,9 +182,6 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         delete params.time
-        if (params.dealerSn == 'all') {
-          params.dealerSn = ''
-        }
         return reportSalesBillList(params).then(res => {
           // 总计
           this.getCount(params)
@@ -287,9 +284,13 @@ export default {
         const all = [{ dealerName: '全部', dealerSn: 'all' }]
         if (res.status == 200) {
           const data = res.data || []
-          this.linkageGroupData = [...all, ...data]
+          if (data.length > 0) {
+            this.linkageGroupData = [...all, ...data]
+          } else {
+            this.linkageGroupData = []
+          }
         } else {
-          this.linkageGroupData = all
+          this.linkageGroupData = []
         }
       })
     },

+ 8 - 4
src/views/reportData/chainStockReport/detailModal.vue

@@ -40,7 +40,7 @@
 
 <script>
 import { STable } from '@/components'
-import { reportStockDetailList, reportStockCount } from '@/api/reportStock'
+import { reportStockDetailList, reportStockDetailCount } from '@/api/reportStock'
 export default {
   name: 'InventoryQueryDetailModal',
   components: { STable },
@@ -52,6 +52,10 @@ export default {
     productSn: {
       type: [Number, String],
       default: ''
+    },
+    stockSn: {
+      type: [Number, String],
+      default: ''
     }
   },
   computed: {
@@ -77,7 +81,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        const params = Object.assign(parameter, { productSn: this.productSn })
+        const params = Object.assign(parameter, { productSn: this.productSn, stockSn: this.stockSn })
         return reportStockDetailList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -95,7 +99,7 @@ export default {
   methods: {
     // 合计
     getCount (param) {
-      reportStockCount(param).then(res => {
+      reportStockDetailCount(param).then(res => {
         if (res.status == 200 && res.data) {
           this.currentStock = res.data
         } else {
@@ -123,7 +127,7 @@ export default {
   .chainStockReportDetail-modal{
     .btn-cont {
       text-align: center;
-      margin: 5px 0 10px;
+      margin: 10px 0 10px;
     }
   }
 </style>

+ 10 - 6
src/views/reportData/chainStockReport/list.vue

@@ -115,7 +115,7 @@
       </s-table>
     </a-spin>
     <!-- 详情 -->
-    <chain-stock-report-detail-modal :openModal="openModal" :productSn="productSn" @close="closeModal" />
+    <chain-stock-report-detail-modal :openModal="openModal" :productSn="productSn" :stockSn="stockSn" @close="closeModal" />
   </a-card>
 </template>
 
@@ -165,9 +165,6 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         if (params.dealerSn) {
-          if (params.dealerSn == 'all') {
-            params.dealerSn = ''
-          }
           return reportStockList(params).then(res => {
             // 总计
             this.getCount(params)
@@ -203,6 +200,7 @@ export default {
       allocateTypeList: [], //  调拨类型
       totalData: null, //  合计
       productSn: '',
+      stockSn: '',
       openModal: false //  弹框
     }
   },
@@ -247,11 +245,13 @@ export default {
     //  详情
     goDetail (row) {
       this.productSn = row.productSn
+      this.stockSn = row.stockSn
       this.openModal = true
     },
     //  关闭弹框
     closeModal () {
       this.productSn = ''
+      this.stockSn = ''
       this.openModal = false
     },
     //  产品分类  change
@@ -291,9 +291,13 @@ export default {
         const all = [{ dealerName: '全部', dealerSn: 'all' }]
         if (res.status == 200) {
           const data = res.data || []
-          this.linkageGroupData = [...all, ...data]
+          if (data.length > 0) {
+            this.linkageGroupData = [...all, ...data]
+          } else {
+            this.linkageGroupData = []
+          }
         } else {
-          this.linkageGroupData = all
+          this.linkageGroupData = []
         }
       })
     }