chenrui 3 éve
szülő
commit
1f442343c5

+ 213 - 0
src/config/router.config.js

@@ -1789,6 +1789,219 @@ export const asyncRouterMap = [
           }
         ]
       },
+      // 报表
+      {
+        path: '/reportData',
+        redirect: '/reportData/chainStockReport',
+        component: PageView,
+        meta: {
+          title: '报表',
+          icon: 'pushpin'
+          // permission: 'M_basicData'
+        },
+        children: [
+          {
+            path: '/reportData/chainStockReport',
+            redirect: '/reportData/chainStockReport/list',
+            name: 'chainStockReport',
+            component: RouteView,
+            meta: {
+              title: '连锁库存总表(天)',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainStockReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainStockReport/list.vue'),
+                meta: {
+                  title: '连锁库存总表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/chainSalesReport',
+            redirect: '/reportData/chainSalesReport/list',
+            name: 'chainSalesReport',
+            component: RouteView,
+            meta: {
+              title: '连锁销售报表(天)',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainSalesReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainSalesReport/list.vue'),
+                meta: {
+                  title: '连锁销售报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/chainSalesDetailReport',
+            redirect: '/reportData/chainSalesDetailReport/list',
+            name: 'chainSalesDetailReport',
+            component: RouteView,
+            meta: {
+              title: '连锁销售明细报表(天)',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainSalesDetailReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainSalesDetailReport/list.vue'),
+                meta: {
+                  title: '连锁销售明细报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/chainReceivedSendStorageReport',
+            redirect: '/reportData/chainReceivedSendStorageReport/list',
+            name: 'chainReceivedSendStorageReport',
+            component: RouteView,
+            meta: {
+              title: '连锁收发存报表',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainReceivedSendStorageReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/chainReceivedSendStorageReport/list.vue'),
+                meta: {
+                  title: '连锁收发存报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/customerReport',
+            redirect: '/reportData/customerReport/list',
+            name: 'customerReport',
+            component: RouteView,
+            meta: {
+              title: '大客户报表(天)',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/customerReport/list.vue'),
+                meta: {
+                  title: '大客户报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/stockIncomeReport',
+            redirect: '/reportData/stockIncomeReport/list',
+            name: 'stockIncomeReport',
+            component: RouteView,
+            meta: {
+              title: '库存总入报表',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'stockIncomeReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/stockIncomeReport/list.vue'),
+                meta: {
+                  title: '库存总入报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/stockExpenditureReport',
+            redirect: '/reportData/stockExpenditureReport/list',
+            name: 'stockExpenditureReport',
+            component: RouteView,
+            meta: {
+              title: '库存总出报表',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'stockExpenditureReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/stockExpenditureReport/list.vue'),
+                meta: {
+                  title: '库存总出报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/receivedSendStorageReport',
+            redirect: '/reportData/receivedSendStorageReport/list',
+            name: 'receivedSendStorageReport',
+            component: RouteView,
+            meta: {
+              title: '收发存报表',
+              icon: 'profile'
+              // permission: 'M_warehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'receivedSendStorageReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/receivedSendStorageReport/list.vue'),
+                meta: {
+                  title: '收发存报表列表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_warehouseList'
+                }
+              }
+            ]
+          }
+        ]
+      },
       // auth
       {
         path: '/auth',

+ 116 - 103
src/views/allocationManagement/chainTransferIn/edit.vue

@@ -1,109 +1,111 @@
 <template>
   <div class="chainTransferInEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="chainTransferInEdit-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="chainTransferInEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra">
-        <a-radio-group key="3" v-model="printerType">
-          <a-radio value="NEEDLE">针式</a-radio>
-          <a-radio value="INK">喷墨</a-radio>
-        </a-radio-group>
-        <a-button key="2" id="chainTransferInEdit-preview-btn" :disabled="loadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
-        <a-button key="1" type="primary" id="chainTransferInEdit-print-btn" :disabled="loadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调入单号">{{ (basicInfoData&&basicInfoData.allocationLinkagePutNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调出对象">{{ (basicInfoData&&basicInfoData.outTenantName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">总款数 <strong>{{ (basicInfoData&&basicInfoData.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (basicInfoData&&basicInfoData.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (basicInfoData&&basicInfoData.productTotalCost) || 0 }}</strong></div>
-    </a-alert>
-    <a-card size="small" :bordered="false" class="chainTransferInEdit-cont">
-      <!-- 筛选条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="getProductList(1)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码" prop="productCode">
-                <a-input id="chainTransferInEdit-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="chainTransferInEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="chainTransferInEdit-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-              <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferInEdit-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInEdit-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 列表 -->
-      <a-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :dataSource="loadData"
-        :scroll="{ x: 1415 }"
-        bordered>
-        <!-- 仓库仓位 -->
-        <template slot="warehouse" slot-scope="text, record, index">
-          <a-cascader
-            @change="e => changeWarehouseCascade(e, record, index)"
-            v-model="record.warehouseCascade"
-            expand-trigger="hover"
-            :allowClear="false"
-            :options="warehouseCascadeData"
-            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
-            id="chainTransferInEdit-warehouseCascade"
-            placeholder="请选择仓库仓位"
-            style="width: 100%;" />
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="chainTransferInEdit-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="chainTransferInEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
-      </a-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="chainTransferInEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleSubmit"
-          style="padding: 0 60px;">提交入库</a-button>
-      </div>
-    </a-affix>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <a-radio-group key="3" v-model="printerType">
+            <a-radio value="NEEDLE">针式</a-radio>
+            <a-radio value="INK">喷墨</a-radio>
+          </a-radio-group>
+          <a-button key="2" id="chainTransferInEdit-preview-btn" :disabled="loadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+          <a-button key="1" type="primary" id="chainTransferInEdit-print-btn" :disabled="loadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调入单号">{{ (basicInfoData&&basicInfoData.allocationLinkagePutNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调出对象">{{ (basicInfoData&&basicInfoData.outTenantName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">总款数 <strong>{{ (basicInfoData&&basicInfoData.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (basicInfoData&&basicInfoData.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (basicInfoData&&basicInfoData.productTotalCost) || 0 }}</strong></div>
+      </a-alert>
+      <a-card size="small" :bordered="false" class="chainTransferInEdit-cont">
+        <!-- 筛选条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="chainTransferInEdit-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="chainTransferInEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    change-on-select
+                    v-model="productType"
+                    expand-trigger="hover"
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="chainTransferInEdit-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferInEdit-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInEdit-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <a-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :dataSource="loadData"
+          :scroll="{ x: 1415 }"
+          bordered>
+          <!-- 仓库仓位 -->
+          <template slot="warehouse" slot-scope="text, record, index">
+            <a-cascader
+              @change="e => changeWarehouseCascade(e, record, index)"
+              v-model="record.warehouseCascade"
+              expand-trigger="hover"
+              :allowClear="false"
+              :options="warehouseCascadeData"
+              :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+              id="chainTransferInEdit-warehouseCascade"
+              placeholder="请选择仓库仓位"
+              style="width: 100%;" />
+          </template>
+        </a-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+          <a-button
+            type="primary"
+            id="chainTransferInEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleSubmit"
+            style="padding: 0 60px;">提交入库</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -119,6 +121,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       queryParam: {
         productCode: '', //  产品编码
         productName: '', //  产品名称
@@ -181,10 +184,14 @@ export default {
     },
     //  提交
     handleSubmit () {
+      this.spinning = true
       allocLinkagePutSubmit({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.handleBack()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -277,10 +284,14 @@ export default {
         warehouseLocationSn: row.warehouseLocationSn,
         warehouseSn: row.warehouseSn
       }
+      this.spinning = true
       allocLinkagePutDetailUpdate(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.getProductList()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -315,7 +326,9 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this
+      _this.spinning = true
       allocLinkagePutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 8 - 0
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/reportData/chainSalesDetailReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/reportData/chainSalesReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 155 - 0
src/views/reportData/chainStockReport/detailModal.vue

@@ -0,0 +1,155 @@
+<template>
+  <a-modal
+    centered
+    class="chainStockReportDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="960">
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">现有库存总数量(个):
+        <strong>
+          <!-- {{ currentStock.currentQty || 0 }} -->207
+        </strong>;现有库存总成本(¥):
+        <strong>
+          <!-- {{ currentStock.putCost || 0 }} -->1550.5
+        </strong>。</div>
+    </a-alert>
+    <!-- 详情 -->
+    <s-table
+      v-if="openModal"
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1580 }"
+      bordered>
+      <!-- 库存数量 -->
+      <template slot="currentQty" slot-scope="text, record">
+        {{ (record.currentQty + record.freezeQty) || 0 }}
+        <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
+      </template>
+    </s-table>
+    <div class="btn-cont">
+      <a-button id="chainStockReportDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import { stockDetailList, stockDetailCount } from '@/api/stock'
+export default {
+  name: 'InventoryQueryDetailModal',
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    modalTit () {
+      return '详情'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库时间', dataIndex: 'putTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '库存数量', scopedSlots: { customRender: 'currentQty' }, width: 180, align: 'center' },
+        { title: '成本单价', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return stockDetailList(Object.assign(parameter, { stockSn: this.itemId })).then(res => {
+        //   const data = res.data
+        //   const no = (data.pageNo - 1) * data.pageSize
+        //   for (var i = 0; i < data.list.length; i++) {
+        //     data.list[i].no = no + i + 1
+        //   }
+        //   this.disabled = false
+        //   // 总计
+        //   this.getTotal(Object.assign(parameter, { stockSn: this.itemId }))
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productCode: 'GA-11078N', productName: '冠牌空气滤清器 丰田新款佳美2.4 12款逸致1.8', productOrigCode: '17807-20040', putTime: '2021-01-28 14:56:11', warehouseName: '默认仓库', warehouseLocationName: '默认仓位', putBizTypeDictValue: '散件入库', currentQty: '207', freezeQty: '', putCost: '1550.50' }
+            ],
+            count: 10
+          }
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = i + 1
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      },
+      currentStock: { // 合计信息
+        currentQty: '',
+        putCost: ''
+      }
+    }
+  },
+  methods: {
+    // 合计
+    getTotal (param) {
+      stockDetailCount(param).then(res => {
+        if (res.status == 200 && res.data) {
+          this.currentStock = res.data
+        } else {
+          this.currentStock = { // 合计信息
+            currentQty: '',
+            putCost: ''
+          }
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .chainStockReportDetail-modal{
+    .btn-cont {
+      text-align: center;
+      margin: 5px 0 10px;
+    }
+  }
+</style>

+ 272 - 0
src/views/reportData/chainStockReport/list.vue

@@ -0,0 +1,272 @@
+<template>
+  <a-card size="small" :bordered="false" class="chainStockReportList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="chainStockReportList-form"
+        ref="ruleForm"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="连锁店" prop="targetName">
+              <a-select
+                placeholder="请选择连锁店"
+                id="chainStockReportList-targetName"
+                allowClear
+                v-model="queryParam.targetName"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in allocateTypeList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码">
+              <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="原厂编码">
+                <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <a-select
+                  placeholder="请选择产品品牌"
+                  id="productInfoList-productBrandSn"
+                  allowClear
+                  v-model="queryParam.productBrandSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  v-model="productType"
+                  expand-trigger="hover"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="productInfoList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">现有库存总数量(个):
+        <strong>
+          <!-- {{ currentStock.currentQty || 0 }} -->207
+        </strong>;现有库存总成本(¥):
+        <strong>
+          <!-- {{ currentStock.putCost || 0 }} -->1550.5
+        </strong>。</div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1170 }"
+      bordered>
+      <!-- 现有库存数量 -->
+      <template slot="currentStockQty" slot-scope="text, record">
+        {{ (record.currentStockQty + record.freezeQty) || 0 }}
+        <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
+      </template>
+      <template slot="currentStockCost" slot-scope="text, record">
+        {{ (Number(record.currentStockCost)*100 + Number(record.freezeCost)*100)/100 || 0 }}
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="chainStockReportList-detail-btn">详情</a-button>
+      </template>
+    </s-table>
+    <!-- 库存详情 -->
+    <chain-stock-report-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import chainStockReportDetailModal from './detailModal.vue'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+// import { allocateTypeAllList } from '@/api/allocateType'
+export default {
+  components: { STable, VSelect, chainStockReportDetailModal },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        targetName: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      rules: {
+        'targetName': [{ required: true, message: '请选择连锁店', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '现有库存数量(个)', dataIndex: 'currentStockQty', scopedSlots: { customRender: 'currentStockQty' }, width: 165, align: 'center', sorter: true },
+        { title: '现有库存成本(¥)', dataIndex: 'currentStockCost', scopedSlots: { customRender: 'currentStockCost' }, width: 165, align: 'center', sorter: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+        //   const data = res.data
+        //   const no = (data.pageNo - 1) * data.pageSize
+        //   for (var i = 0; i < data.list.length; i++) {
+        //     data.list[i].no = no + i + 1
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', code: 'GA-11078N', name: '冠牌空气滤清器 丰田新款佳美2.4 12款逸致1.8', origCode: '17807-20040', currentStockQty: '207', freezeQty: '', currentStockCost: '1550.50', freezeCost: '' }
+            ],
+            count: 10
+          }
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = i + 1
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      },
+      productType: [],
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [], //  分类下拉数据
+      allocateTypeList: [], //  调拨类型
+      itemId: '', //  当前id
+      openModal: false //  弹框
+    }
+  },
+  methods: {
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.targetName = undefined
+      this.queryParam.code = ''
+      this.queryParam.name = ''
+      this.queryParam.origCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    goDetail (row) {
+      this.itemId = row.stockSn
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      dealerProductBrandQuery({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeList({ 'sysFlag': '0' }).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getProductBrand()
+      vm.getProductType()
+    })
+  }
+}
+</script>

+ 8 - 0
src/views/reportData/customerReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/reportData/receivedSendStorageReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/reportData/stockExpenditureReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/reportData/stockIncomeReport/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>