|
@@ -27,140 +27,120 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="审核时间">
|
|
|
+ <a-form-model-item label="审核时间">
|
|
|
<rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="客户名称">
|
|
|
+ <a-form-model-item label="客户名称">
|
|
|
<a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入客户名称"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="客户类型">
|
|
|
- <a-select id="chainStockReportList-targetName" 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-form-model-item label="客户类型">
|
|
|
+ <a-select id="chainStockReportList-customerType" v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型">
|
|
|
+ <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="12" :sm="24">
|
|
|
<a-row>
|
|
|
- <a-form-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
|
|
|
+ <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
|
|
|
<a-col span="7">
|
|
|
- <a-form-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
+ <a-form-model-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
<a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
|
|
|
<a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col span="7" offset="1">
|
|
|
- <a-form-item prop="dealerCitySn" style="margin: 0;">
|
|
|
+ <a-form-model-item prop="dealerCitySn" style="margin: 0;">
|
|
|
<a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
|
|
|
<a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col span="7" offset="1">
|
|
|
- <a-form-item prop="dealerCountySn" style="margin: 0;">
|
|
|
+ <a-form-model-item prop="dealerCountySn" style="margin: 0;">
|
|
|
<a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
|
|
|
<a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-row>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="支付方式">
|
|
|
- <a-select id="chainStockReportList-targetName" 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-form-model-item label="收款方式">
|
|
|
+ <a-select id="chainStockReportList-settleStyleSn" v-model="queryParam.settleStyleSn" allowClear placeholder="请选择收款方式">
|
|
|
+ <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="收款方式">
|
|
|
- <a-select id="chainStockReportList-targetName" 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-form-item label="产品品牌">
|
|
|
+ <a-select
|
|
|
+ placeholder="请选择产品品牌"
|
|
|
+ id="chainStockReportList-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="12" :sm="24">
|
|
|
- <a-row>
|
|
|
- <a-form-item label="产品类别" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
|
|
|
- <a-col span="7">
|
|
|
- <a-form-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择">
|
|
|
- <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col span="7" offset="1">
|
|
|
- <a-form-item prop="dealerCitySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择">
|
|
|
- <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col span="7" offset="1">
|
|
|
- <a-form-item prop="dealerCountySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerCountySn" placeholder="请选择">
|
|
|
- <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-form-item>
|
|
|
- </a-row>
|
|
|
+ <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="productInfoList-productType"
|
|
|
+ placeholder="请选择产品分类"
|
|
|
+ allowClear />
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品编码">
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
<a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品名称">
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
<a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="12" :sm="24">
|
|
|
- <a-row>
|
|
|
- <a-form-item label="仓库仓位" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }">
|
|
|
- <a-col span="7">
|
|
|
- <a-form-item prop="dealerProvinceSn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择">
|
|
|
- <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col span="7" offset="1">
|
|
|
- <a-form-item prop="dealerCitySn" style="margin: 0;">
|
|
|
- <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择">
|
|
|
- <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-form-item>
|
|
|
- </a-row>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="仓库仓位">
|
|
|
+ <a-cascader
|
|
|
+ v-model="queryParam.warehouseCascade"
|
|
|
+ expand-trigger="hover"
|
|
|
+ :allowClear="false"
|
|
|
+ :options="warehouseCascadeData"
|
|
|
+ :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
|
|
|
+ id="chainStockReportList-warehouseCascade"
|
|
|
+ placeholder="请选择仓库仓位"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="单号">
|
|
|
+ <a-form-model-item label="单号">
|
|
|
<a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入单号"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="业务员">
|
|
|
+ <a-form-model-item label="业务员">
|
|
|
<a-input id="chainStockReportList-targetName" v-model.trim="queryParam.code" allowClear placeholder="请输入业务员"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="订单类型">
|
|
|
- <a-select id="chainStockReportList-targetName" 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-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24" style="margin-top: 3px;">
|
|
|
<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">
|
|
@@ -174,6 +154,7 @@
|
|
|
<!-- 合计 -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
<div class="ftext" slot="message">
|
|
|
+ 产品总数量:<strong>45</strong>;
|
|
|
总成本:<strong>¥33.00</strong>;
|
|
|
总售价:<strong>¥48.00</strong>;
|
|
|
总毛利:<strong>¥15.00</strong>。
|
|
@@ -187,7 +168,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1170 }"
|
|
|
+ :scroll="{ x: 1720 }"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
@@ -197,8 +178,11 @@
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { getArea } from '@/api/data'
|
|
|
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
|
|
|
-// import { allocateTypeAllList } from '@/api/allocateType'
|
|
|
+import { custTypeFindAllList } from '@/api/custType'
|
|
|
+import { settleStyleFindAllList } from '@/api/customer'
|
|
|
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
|
+import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
|
+import { warehouseCascadeList } from '@/api/warehouse'
|
|
|
export default {
|
|
|
components: { STable, VSelect, rangeDate },
|
|
|
data () {
|
|
@@ -228,17 +212,15 @@ export default {
|
|
|
{ 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: 'orderType', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '支付方式', dataIndex: 'payType', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '收款方式', dataIndex: 'currentStockCost', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品编码', dataIndex: 'proCode', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'proName', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '单位', dataIndex: 'unit', width: 165, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '数量', dataIndex: 'totalQty', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '成本', dataIndex: 'totalCost', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
- { title: '售价', dataIndex: 'totalAmount', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
- { title: '毛利', dataIndex: 'totalMl', width: 165, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
- { title: '审核时间', dataIndex: 'auditDate', width: 165, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '收款方式', dataIndex: 'currentStockCost', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'proCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'proName', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '成本', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '毛利', dataIndex: 'totalMl', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '审核时间', dataIndex: 'auditDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -272,7 +254,13 @@ export default {
|
|
|
addrProvinceList: [], // 省下拉
|
|
|
addrCityList: [], // 市下拉
|
|
|
addrDistrictList: [], // 区下拉
|
|
|
- allocateTypeList: [] // 调拨类型
|
|
|
+ allocateTypeList: [], // 调拨类型
|
|
|
+ custTypeList: [], // 客户类型 下拉数据
|
|
|
+ settleStyleList: [], // 收款方式 下拉数据
|
|
|
+ productBrandList: [], // 品牌下拉数据
|
|
|
+ productType: [],
|
|
|
+ productTypeList: [], // 分类下拉数据
|
|
|
+ warehouseCascadeData: [] // 仓库仓位
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -310,6 +298,72 @@ export default {
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
)
|
|
|
},
|
|
|
+ // 获取客户类型列表
|
|
|
+ getCustTypeList () {
|
|
|
+ const _this = this
|
|
|
+ custTypeFindAllList().then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.custTypeList = res.data || []
|
|
|
+ } else {
|
|
|
+ _this.custTypeList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 收款方式
|
|
|
+ getSettleStyleList () {
|
|
|
+ settleStyleFindAllList().then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.settleStyleList = res.data
|
|
|
+ } else {
|
|
|
+ this.settleStyleList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 产品品牌 列表
|
|
|
+ getProductBrand () {
|
|
|
+ dealerProductBrandQuery({ 'sysFlag': '0' }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productBrandList = res.data
|
|
|
+ } else {
|
|
|
+ this.productBrandList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 产品分类 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] : ''
|
|
|
+ },
|
|
|
+ // 产品分类 列表
|
|
|
+ getProductType () {
|
|
|
+ dealerProductTypeList({ 'sysFlag': '0' }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productTypeList = res.data
|
|
|
+ } else {
|
|
|
+ this.productTypeList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 仓库仓位 级联 列表
|
|
|
+ getWarehouseCascade () {
|
|
|
+ const _this = this
|
|
|
+ warehouseCascadeList({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ res.data.map(item => {
|
|
|
+ item.sn = item.warehouseSn
|
|
|
+ if (item.warehouseLocationList) {
|
|
|
+ item.warehouseLocationList.map(subItem => {
|
|
|
+ subItem.sn = subItem.warehouseLocationSn
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.warehouseCascadeData = res.data
|
|
|
+ } else {
|
|
|
+ this.warehouseCascadeData = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取城市列表
|
|
|
getCityList (val) {
|
|
|
this.addrCityList = []
|
|
@@ -356,6 +410,11 @@ export default {
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.getArea('province')
|
|
|
+ vm.getCustTypeList()
|
|
|
+ vm.getSettleStyleList()
|
|
|
+ vm.getProductBrand()
|
|
|
+ vm.getProductType()
|
|
|
+ vm.getWarehouseCascade()
|
|
|
})
|
|
|
}
|
|
|
}
|