|
@@ -1,103 +1,105 @@
|
|
<template>
|
|
<template>
|
|
<a-card size="small" :bordered="false" class="sendStorageReportList-wrap">
|
|
<a-card size="small" :bordered="false" class="sendStorageReportList-wrap">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
- <div class="table-page-search-wrapper">
|
|
|
|
- <a-form-model
|
|
|
|
- id="sendStorageReportList-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="sendStorageReportList-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-model-item label="日期" prop="date">
|
|
|
|
- <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="产品编码">
|
|
|
|
- <a-input id="sendStorageReportList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <template v-if="advanced">
|
|
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <a-form-model
|
|
|
|
+ id="sendStorageReportList-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-col :md="6" :sm="24">
|
|
- <a-form-model-item label="产品名称">
|
|
|
|
- <a-input id="sendStorageReportList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="产品品牌">
|
|
|
|
|
|
+ <a-form-model-item label="连锁店" prop="targetName">
|
|
<a-select
|
|
<a-select
|
|
- placeholder="请选择产品品牌"
|
|
|
|
- id="sendStorageReportList-productBrandSn"
|
|
|
|
|
|
+ placeholder="请选择连锁店"
|
|
|
|
+ id="sendStorageReportList-targetName"
|
|
allowClear
|
|
allowClear
|
|
- v-model="queryParam.productBrandSn"
|
|
|
|
|
|
+ v-model="queryParam.targetName"
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
option-filter-prop="children"
|
|
option-filter-prop="children"
|
|
:filter-option="filterOption">
|
|
:filter-option="filterOption">
|
|
- <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-model-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="sendStorageReportList-productType"
|
|
|
|
- placeholder="请选择产品分类"
|
|
|
|
- allowClear />
|
|
|
|
|
|
+ <a-form-model-item label="日期" prop="date">
|
|
|
|
+ <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
|
+ <a-input id="sendStorageReportList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- </template>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-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"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- :rowKey="(record) => record.id"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :scroll="{ x: 2390 }"
|
|
|
|
- bordered>
|
|
|
|
- <template slot="footer" slot-scope="currentPageData">
|
|
|
|
- <span>
|
|
|
|
- 合计: 期初数量:{{ totalData.beginQty || '--' }} 期初金额:{{ totalData.beginAmount || '--' }} 收入数量:{{ totalData.putQty || '--' }} 收入金额:{{ totalData.putAmount || '--' }} 发出数量:{{ totalData.outQty || '--' }} 发出金额:{{ totalData.outAmount || '--' }} 结算数量:{{ totalData.endQty || '--' }} 结算金额:{{ totalData.endAmount || '--' }}
|
|
|
|
- </span>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
|
|
+ <template v-if="advanced">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
|
+ <a-input id="sendStorageReportList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品品牌">
|
|
|
|
+ <a-select
|
|
|
|
+ placeholder="请选择产品品牌"
|
|
|
|
+ id="sendStorageReportList-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-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-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="sendStorageReportList-productType"
|
|
|
|
+ placeholder="请选择产品分类"
|
|
|
|
+ allowClear />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ </template>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-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"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ x: 2390 }"
|
|
|
|
+ bordered>
|
|
|
|
+ <template slot="footer" slot-scope="currentPageData">
|
|
|
|
+ <span>
|
|
|
|
+ 合计: 期初数量:{{ totalData.beginQty || '--' }} 期初金额:{{ totalData.beginAmount || '--' }} 收入数量:{{ totalData.putQty || '--' }} 收入金额:{{ totalData.putAmount || '--' }} 发出数量:{{ totalData.outQty || '--' }} 发出金额:{{ totalData.outAmount || '--' }} 结算数量:{{ totalData.endQty || '--' }} 结算金额:{{ totalData.endAmount || '--' }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-spin>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -111,6 +113,7 @@ export default {
|
|
components: { STable, VSelect, rangeDate },
|
|
components: { STable, VSelect, rangeDate },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ spinning: false,
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
@@ -208,6 +211,7 @@ export default {
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
if (this.queryParam.beginDate && this.queryParam.targetName) {
|
|
if (this.queryParam.beginDate && this.queryParam.targetName) {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
|
|
+ this.spinning = true
|
|
const params = {
|
|
const params = {
|
|
beginDate: this.queryParam.beginDate,
|
|
beginDate: this.queryParam.beginDate,
|
|
endDate: this.queryParam.endDate,
|
|
endDate: this.queryParam.endDate,
|
|
@@ -229,6 +233,7 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
+ this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|