|
@@ -0,0 +1,277 @@
|
|
|
+<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-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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ <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="品牌类别">
|
|
|
+ <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="default"
|
|
|
+ :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-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'
|
|
|
+export default {
|
|
|
+ components: { STable, VSelect, rangeDate },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ advanced: false, // 高级搜索 展开/关闭
|
|
|
+ tableHeight: 0,
|
|
|
+ queryParam: { // 查询条件
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ targetName: '', // 调往对象
|
|
|
+ allocateTypeSn: undefined, // 调拨类型
|
|
|
+ state: undefined, // 业务状态
|
|
|
+ allocateNo: '' // 调拨单号
|
|
|
+ },
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ exportLoading: false,
|
|
|
+ checkVal: '',
|
|
|
+ reportData: reportData.reportDataList,
|
|
|
+ columns: [
|
|
|
+ { title: '区域', dataIndex: 'data1', width: 200, align: 'center', fixed: 'left', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调拨单号', dataIndex: 'data2', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调拨开单日期', dataIndex: 'data3', 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', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '客户类型', dataIndex: 'data6', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '品牌', dataIndex: 'data7', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '二级类别', dataIndex: 'data8', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '产品名称', dataIndex: 'data9', width: 120, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '产品编码', dataIndex: 'data10', width: 120, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '调拨数量', dataIndex: 'data11', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'data12', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '进价', dataIndex: 'data13', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '售价', dataIndex: 'data14', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '总进价', dataIndex: 'data15', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '毛利', dataIndex: 'data16', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '仓库', dataIndex: 'data17', width: 120, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '仓位', dataIndex: 'data18', width: 120, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '操作员', dataIndex: 'data19', width: 120, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '调拨类型', dataIndex: 'data20', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? 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: reportData.allocationDetailsList,
|
|
|
+ count: 10
|
|
|
+ }
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = i + 1
|
|
|
+ }
|
|
|
+ _this.disabled = false
|
|
|
+ resolve(data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ allocateTypeList: [], // 调拨类型
|
|
|
+ openModal: false // 新增编辑 弹框
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleFooterShow (currentPageData) {
|
|
|
+ console.log(currentPageData, '[=currentPageData]')
|
|
|
+ },
|
|
|
+ // 创建时间 change
|
|
|
+ dateChange (date) {
|
|
|
+ this.queryParam.beginDate = date[0]
|
|
|
+ this.queryParam.endDate = date[1]
|
|
|
+ },
|
|
|
+ // 选择盘点日期
|
|
|
+ onChange (e) {
|
|
|
+ console.log(e)
|
|
|
+ // this.checkVal
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.$refs.rangeDate.resetDate()
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {})
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|