|
@@ -1,200 +1,218 @@
|
|
|
<template>
|
|
|
- <a-card size="small" :bordered="false" class="provinceTypeSalesDetailsList-wrap">
|
|
|
- <!-- 搜索条件 -->
|
|
|
- <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="调拨开单日期">
|
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="调拨单号">
|
|
|
- <a-input id="bulkWarehousingOrderList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入销售单号"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品编码">
|
|
|
- <a-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <template v-if="advanced">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="所在区域">
|
|
|
- <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
|
|
|
- <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
+ <a-card size="small" :bordered="false" class="allocationDetailsList-wrap">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form-model
|
|
|
+ id="allocationDetailsList-form"
|
|
|
+ ref="ruleForm"
|
|
|
+ :model="queryParam"
|
|
|
+ :rules="rules"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ @keyup.enter.native="handleSearch" >
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="7" :sm="24">
|
|
|
+ <a-form-model-item label="调拨开单日期" prop="time">
|
|
|
+ <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="省份">
|
|
|
- <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择省份" allowClear >
|
|
|
- <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
+ <a-form-model-item label="调拨单号">
|
|
|
+ <a-input id="allocationDetailsList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="排序">
|
|
|
- <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择排序" allowClear >
|
|
|
- <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
+ <a-input id="allocationDetailsList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码"/>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="操作员">
|
|
|
- <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择操作员" allowClear >
|
|
|
- <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
+ <template v-if="advanced">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="所在区域">
|
|
|
+ <!-- <a-select id="allocationDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select> -->
|
|
|
+ <subarea id="allocationDetailsList-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="省份">
|
|
|
+ <a-select id="allocationDetailsList-state" v-model="queryParam.state" placeholder="请选择省份" allowClear >
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="排序">
|
|
|
+ <a-select id="allocationDetailsList-state" v-model="queryParam.state" placeholder="请选择排序" allowClear >
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="操作员">
|
|
|
+ <a-select id="allocationDetailsList-state" v-model="queryParam.state" placeholder="请选择操作员" allowClear >
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
+ <a-input id="allocationDetailsList-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-input id="allocationDetailsList-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="allocationDetailsList-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-select
|
|
|
+ placeholder="请选择"
|
|
|
+ id="allocationDetailsList-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-item label="品牌">
|
|
|
+ <a-select
|
|
|
+ placeholder="请选择"
|
|
|
+ id="allocationDetailsList-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"
|
|
|
+ expand-trigger="hover"
|
|
|
+ change-on-select
|
|
|
+ :options="productTypeList"
|
|
|
+ :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
|
+ id="allocationDetailsList-productType"
|
|
|
+ placeholder="请选择产品分类"
|
|
|
+ allowClear
|
|
|
+ v-model="productType" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </template>
|
|
|
+ <a-col :md="7" :sm="24" style="margin-top: 3px;">
|
|
|
+ <a-button
|
|
|
+ style="margin-bottom: 18px;"
|
|
|
+ type="primary"
|
|
|
+ class="button-warning"
|
|
|
+ size="small"
|
|
|
+ @click="handleStock"
|
|
|
+ id="allocationDetailsList-stockDate">盘点区间日期</a-button>
|
|
|
+ <a-button style="margin: 0 0 18px 8px" type="primary" @click="handleSearch" :disabled="disabled" id="allocationDetailsList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="allocationDetailsList-reset">重置</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品名称">
|
|
|
- <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-row>
|
|
|
+ </a-form-model>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ :scroll="{ x: 2960 }"
|
|
|
+ bordered>
|
|
|
+ <template slot="footer" slot-scope="currentPageData">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ 总数量:263320
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="客户名称">
|
|
|
- <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入客户名称"/>
|
|
|
- </a-form-item>
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ 总进价:1,827,311.38
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品品牌">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="productPricingList-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 :md="4" :sm="24">
|
|
|
+ 总毛利:1187.11
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="客户级别">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="productPricingList-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 :md="4" :sm="24">
|
|
|
+ 总售价:2,233,739.75
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="品牌类别">
|
|
|
- <v-select code="BRAND_TYPE" id="productBrandList-brandType" v-model="queryParam.brandType" allowClear placeholder="请选择品牌分类"></v-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="二级分类">
|
|
|
- <a-select
|
|
|
- placeholder="请选择"
|
|
|
- id="productPricingList-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-select
|
|
|
- placeholder="请选择"
|
|
|
- id="productPricingList-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-checkbox @change="onChange"></a-checkbox>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </template>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productPricingList-refresh">查询</a-button>
|
|
|
- <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productPricingList-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>
|
|
|
- </div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ x: 2960 }"
|
|
|
- bordered>
|
|
|
- <template slot="footer" slot-scope="currentPageData">
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 总数量:263320
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 总进价:1,827,311.38
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 总毛利:1187.11
|
|
|
- </a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
- 总售价:2,233,739.75
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
+ </a-row>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import reportData from '@/libs/reportData'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
|
|
|
-// import { allocateTypeAllList } from '@/api/allocateType'
|
|
|
+import subarea from '@/views/common/subarea.js'
|
|
|
+import { productBrandQuery } from '@/api/productBrand'
|
|
|
+import { productTypeQuery } from '@/api/productType'
|
|
|
+import { allocateReportDetailList, allocateReportDetailCount } from '@/api/allocateReport'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, rangeDate },
|
|
|
+ components: { STable, VSelect, rangeDate, subarea },
|
|
|
data () {
|
|
|
return {
|
|
|
+ spinning: false,
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
+ time: [],
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
|
targetName: '', // 调往对象
|
|
|
allocateTypeSn: undefined, // 调拨类型
|
|
|
state: undefined, // 业务状态
|
|
|
- allocateNo: '' // 调拨单号
|
|
|
+ allocateNo: '', // 调拨单号
|
|
|
+ productBrandSn: undefined, // 产品品牌
|
|
|
+ productTypeSn1: '', // 产品一级分类
|
|
|
+ productTypeSn2: '', // 产品二级分类
|
|
|
+ productTypeSn3: '' // 产品三级分类
|
|
|
+ },
|
|
|
+ productType: [],
|
|
|
+ labelCol: { span: 8 },
|
|
|
+ wrapperCol: { span: 16 },
|
|
|
+ rules: {
|
|
|
+ 'time': [{ required: true, message: '请选择调拨开单日期', trigger: 'change' }]
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false,
|
|
|
- checkVal: '',
|
|
|
- reportData: reportData.reportDataList,
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
|
- { title: '区域', dataIndex: 'data1', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '调拨单号', dataIndex: 'data2', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '调拨开单日期', dataIndex: 'data3', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '区域', dataIndex: 'subareaNames', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调拨单号', dataIndex: 'allocateNo', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调拨开单日期', dataIndex: 'allocateDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '省份', dataIndex: 'data4', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '客户名称', dataIndex: 'data5', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, ellipsis: true },
|
|
|
{ title: '客户类型', dataIndex: 'data6', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -216,63 +234,112 @@ export default {
|
|
|
// 加载数据方法 必须为 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: reportData.allocationDetailsList,
|
|
|
- count: 10
|
|
|
- }
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
+ delete params.time
|
|
|
+ this.spinning = true
|
|
|
+ return allocateReportDetailList(params).then(res => {
|
|
|
+ // 总计
|
|
|
+ this.getCount(params)
|
|
|
+ const data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = i + 1
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
}
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
+ this.disabled = false
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
})
|
|
|
},
|
|
|
allocateTypeList: [], // 调拨类型
|
|
|
- openModal: false // 新增编辑 弹框
|
|
|
+ productBrandList: [], // 品牌下拉数据
|
|
|
+ productTypeList: [], // 分类下拉数据
|
|
|
+ totalData: null // 合计
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleFooterShow (currentPageData) {
|
|
|
- console.log(currentPageData, '[=currentPageData]')
|
|
|
+ // 盘点库存日期
|
|
|
+ handleStock () {
|
|
|
+
|
|
|
},
|
|
|
// 创建时间 change
|
|
|
dateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
+ this.queryParam.time = date
|
|
|
+ this.queryParam.beginDate = date[0] || ''
|
|
|
+ this.queryParam.endDate = date[1] || ''
|
|
|
},
|
|
|
- // 选择盘点日期
|
|
|
- onChange (e) {
|
|
|
- console.log(e)
|
|
|
- // this.checkVal
|
|
|
+ // 合计
|
|
|
+ getCount (params) {
|
|
|
+ allocateReportDetailCount(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.totalData = res.data
|
|
|
+ } else {
|
|
|
+ this.totalData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查询
|
|
|
+ handleSearch () {
|
|
|
+ const _this = this
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ _this.$refs.table.refresh(true)
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.$refs.rangeDate.resetDate()
|
|
|
+ this.queryParam.time = []
|
|
|
this.queryParam.beginDate = ''
|
|
|
this.queryParam.endDate = ''
|
|
|
this.queryParam.targetName = ''
|
|
|
this.queryParam.allocateTypeSn = undefined
|
|
|
this.queryParam.state = undefined
|
|
|
this.queryParam.allocateNo = ''
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
+ this.totalData = null
|
|
|
+ this.$refs.table.clearTable()
|
|
|
+ },
|
|
|
+ filterOption (input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
+ },
|
|
|
+ // 产品分类 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 () {
|
|
|
+ productBrandQuery({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productBrandList = res.data
|
|
|
+ } else {
|
|
|
+ this.productBrandList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 产品分类 列表
|
|
|
+ getProductType () {
|
|
|
+ productTypeQuery({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productTypeList = res.data
|
|
|
+ } else {
|
|
|
+ this.productTypeList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
- next(vm => {})
|
|
|
+ next(vm => {
|
|
|
+ vm.getProductBrand()
|
|
|
+ vm.getProductType()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|