lilei 3 lat temu
rodzic
commit
c6161fb454

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

@@ -1875,31 +1875,31 @@ export const asyncRouterMap = [
               }
             ]
           },
-          // {
-          //   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/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',
@@ -1974,32 +1974,32 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            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'
+                }
+              }
+            ]
           }
-          // {
-          //   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

+ 444 - 3
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -1,8 +1,449 @@
 <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="日期">
+              <rangeDate ref="rangeDate" />
+            </a-form-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>
+          <template v-if="advanced">
+            <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>
+            <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>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1170 }"
+      bordered>
+    </s-table>
+  </a-card>
 </template>
 
 <script>
+import { STable, VSelect } from '@/components'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import rangeDate from '@/views/common/rangeDate.vue'
+// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+// import { allocateTypeAllList } from '@/api/allocateType'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        targetName: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      rules: {},
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码',
+          dataIndex: 'code',
+          width: 250,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 6
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '产品名称',
+          dataIndex: 'name',
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          },
+          ellipsis: true },
+        { title: '品牌',
+          dataIndex: 'brand',
+          align: 'center',
+          width: 200,
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '三级类别',
+          dataIndex: 'productLeve',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '原厂编码',
+          dataIndex: 'origCode',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '单位',
+          dataIndex: 'unit',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '期初数量', dataIndex: 'sqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '期初单价(¥)', dataIndex: 'sprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '期初金额(¥)', dataIndex: 'samount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入数量', dataIndex: 'srqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入单价(¥)', dataIndex: 'srprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入金额(¥)', dataIndex: 'sramount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出数量', dataIndex: 'fcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出单价(¥)', dataIndex: 'fcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出金额(¥)', dataIndex: 'fcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存数量', dataIndex: 'dcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存单价(¥)', dataIndex: 'dcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存金额(¥)', dataIndex: 'dcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } }
+      ],
+      // 加载数据方法 必须为 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: '0000 1110 V003 / 000 1110 V004',
+                name: '广州非品牌 空调滤清器',
+                brand: '非品牌',
+                productLeve: '空调滤清器',
+                origCode: '',
+                unit: '个',
+                sqty: '18',
+                sprice: '4.72',
+                samount: '85.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: '18',
+                dcprice: '4.72',
+                dcamount: '85.00'
+              },
+              { id: '2',
+                code: '0000015',
+                name: '辅助单位测试',
+                brand: '雪企',
+                productLeve: '雪种油',
+                origCode: '',
+                unit: '升',
+                sqty: '24',
+                sprice: '32.71',
+                samount: '785.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 24,
+                dcprice: '32.71',
+                dcamount: '785.00'
+              },
+              { id: '3',
+                code: '0000015',
+                name: '辅助单位',
+                brand: '阿尔派',
+                productLeve: '电喇叭',
+                origCode: '',
+                unit: '个',
+                sqty: '16',
+                sprice: '120.00',
+                samount: '1920.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 16,
+                dcprice: '120.00',
+                dcamount: '1920.00'
+              },
+              { id: '4',
+                code: '0000015',
+                name: '辅助单位',
+                brand: '阿尔派',
+                productLeve: '电喇叭',
+                origCode: '',
+                unit: '个',
+                sqty: '11',
+                sprice: '120.00',
+                samount: '1320.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 11,
+                dcprice: '120.00',
+                dcamount: '1320.00'
+              },
+              { id: '5',
+                code: '00089',
+                name: 'SOFT99车蜡 氟素镀膜 白色车身用 防水保护效果持久',
+                brand: 'SOFT99',
+                productLeve: '车蜡',
+                origCode: '',
+                unit: '瓶',
+                sqty: '32',
+                sprice: '34.38',
+                samount: '1100.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 32,
+                dcprice: '34.38',
+                dcamount: '1100.00'
+              },
+              { id: '6',
+                code: '合计',
+                name: '合计',
+                brand: '合计',
+                productLeve: '合计',
+                origCode: '合计',
+                unit: '合计',
+                sqty: '2208',
+                sprice: '',
+                samount: '48254.44',
+                srqty: 18,
+                srprice: '',
+                sramount: '135.00',
+                fcqty: '0',
+                fcprice: '0.00',
+                fcamount: '0.00',
+                dcqty: 2226,
+                dcprice: '',
+                dcamount: '48389.00'
+              }
+            ],
+            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: [] //  调拨类型
+    }
+  },
+  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)
+    },
+    //  产品分类  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>
-
-<style>
-</style>

+ 429 - 3
src/views/reportData/receivedSendStorageReport/list.vue

@@ -1,8 +1,434 @@
 <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-item label="日期">
+              <rangeDate ref="rangeDate" />
+            </a-form-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-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>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1170 }"
+      bordered>
+    </s-table>
+  </a-card>
 </template>
 
 <script>
+import { STable, VSelect } from '@/components'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import rangeDate from '@/views/common/rangeDate.vue'
+// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+// import { allocateTypeAllList } from '@/api/allocateType'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        targetName: undefined,
+        code: '', //  产品编码
+        name: '', //  产品名称
+        origCode: '', //  原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      rules: {},
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码',
+          dataIndex: 'code',
+          width: 250,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 6
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '产品名称',
+          dataIndex: 'name',
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          },
+          ellipsis: true },
+        { title: '品牌',
+          dataIndex: 'brand',
+          align: 'center',
+          width: 200,
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '三级类别',
+          dataIndex: 'productLeve',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '原厂编码',
+          dataIndex: 'origCode',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '单位',
+          dataIndex: 'unit',
+          width: 150,
+          align: 'center',
+          customRender: function (text, row, index) {
+            if (text == '合计') {
+              return {
+                children: <span>{text}</span>,
+                attrs: {
+                  colSpan: 0
+                }
+              }
+            }
+            return text || '--'
+          } },
+        { title: '期初数量', dataIndex: 'sqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '期初单价(¥)', dataIndex: 'sprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '期初金额(¥)', dataIndex: 'samount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入数量', dataIndex: 'srqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入单价(¥)', dataIndex: 'srprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '收入金额(¥)', dataIndex: 'sramount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出数量', dataIndex: 'fcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出单价(¥)', dataIndex: 'fcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '发出金额(¥)', dataIndex: 'fcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存数量', dataIndex: 'dcqty', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存单价(¥)', dataIndex: 'dcprice', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } },
+        { title: '结存金额(¥)', dataIndex: 'dcamount', width: 150, align: 'center', customRender: function (text) { return text == '' ? '--' : text } }
+      ],
+      // 加载数据方法 必须为 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: '0000 1110 V003 / 000 1110 V004',
+                name: '广州非品牌 空调滤清器',
+                brand: '非品牌',
+                productLeve: '空调滤清器',
+                origCode: '',
+                unit: '个',
+                sqty: '8',
+                sprice: '9.00',
+                samount: '72.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '1',
+                fcprice: '9.00',
+                fcamount: '9.00',
+                dcqty: '7',
+                dcprice: '9.00',
+                dcamount: '63.00'
+              },
+              { id: '2',
+                code: '0000015',
+                name: '辅助单位测试',
+                brand: '雪企',
+                productLeve: '雪种油',
+                origCode: '',
+                unit: '升',
+                sqty: '24',
+                sprice: '32.71',
+                samount: '785.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 24,
+                dcprice: '32.71',
+                dcamount: '785.00'
+              },
+              { id: '3',
+                code: 'GA-11073N',
+                name: '冠牌空气滤清器 丰田威驰 吉利金刚 夏利2000',
+                brand: '冠牌',
+                productLeve: '空气滤清器',
+                origCode: '17801-14010',
+                unit: '个',
+                sqty: '106',
+                sprice: '6.48',
+                samount: '687.00',
+                srqty: '21',
+                srprice: '6.62',
+                sramount: '139.00',
+                fcqty: '74',
+                fcprice: '6.52',
+                fcamount: '482.50',
+                dcqty: 53,
+                dcprice: '6.48',
+                dcamount: '343.50'
+              },
+              { id: '4',
+                code: 'GA-11078N',
+                name: '冠牌空气滤清器 丰田新款佳美2.4',
+                brand: '冠牌',
+                productLeve: '空气滤清器',
+                origCode: '17801-20040',
+                unit: '个',
+                sqty: '200',
+                sprice: '7.50',
+                samount: '1500.00',
+                srqty: '7',
+                srprice: '7.21',
+                sramount: '50.50',
+                fcqty: '0',
+                fcprice: '0.00',
+                fcamount: '0.00',
+                dcqty: 207,
+                dcprice: '7.49',
+                dcamount: '1550.50'
+              },
+              { id: '5',
+                code: '00089',
+                name: 'SOFT99车蜡 氟素镀膜 白色车身用 防水保护效果持久',
+                brand: 'SOFT99',
+                productLeve: '车蜡',
+                origCode: '',
+                unit: '瓶',
+                sqty: '32',
+                sprice: '34.38',
+                samount: '1100.00',
+                srqty: '0',
+                srprice: '0',
+                sramount: '0',
+                fcqty: '0',
+                fcprice: '0',
+                fcamount: '0',
+                dcqty: 32,
+                dcprice: '34.38',
+                dcamount: '1100.00'
+              },
+              { id: '6',
+                code: '合计',
+                name: '合计',
+                brand: '合计',
+                productLeve: '合计',
+                origCode: '合计',
+                unit: '合计',
+                sqty: '1870',
+                sprice: '',
+                samount: '18767.94',
+                srqty: 28,
+                srprice: '',
+                sramount: '189.50',
+                fcqty: '77',
+                fcprice: '0.00',
+                fcamount: '515.50',
+                dcqty: 1821,
+                dcprice: '',
+                dcamount: '18441.94'
+              }
+            ],
+            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: [] //  分类下拉数据
+    }
+  },
+  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)
+    },
+    //  产品分类  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>
-
-<style>
-</style>