|
@@ -24,6 +24,31 @@
|
|
|
<a-input id="allocationOrderTotalList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="客户名称">
|
|
|
+ <dealerSubareaScopeList ref="custList" id="allocationOrderTotalList-buyerSn" :itemSn="queryParam.buyerSn" @change="custChange"></dealerSubareaScopeList>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="客户类型">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.dealerType"
|
|
|
+ id="allocationOrderTotalList-dealerType"
|
|
|
+ code="Flag"
|
|
|
+ placeholder="请选择客户类型"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="费用/调拨类型">
|
|
|
+ <AllocateType id="allocationOrderTotalList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
|
|
|
+ <a-form-model-item label="客服">
|
|
|
+ <customerService ref="customerName" id="allocationOrderTotalList-customerName" v-model="queryParam.bizUserSn"></customerService>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="操作员">
|
|
|
<a-select
|
|
@@ -38,16 +63,6 @@
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="费用/调拨类型">
|
|
|
- <AllocateType id="allocationDetailsList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
|
|
|
- <a-form-model-item label="客服">
|
|
|
- <customerService ref="customerName" id="allocationDetailsList-customerName" v-model="queryParam.bizUserSn"></customerService>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
<a-col :md="isShowCustomerSearch?6:24" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':''}">
|
|
|
<!-- <a-button
|
|
|
type="primary"
|
|
@@ -76,6 +91,10 @@
|
|
|
bordered
|
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
|
:scroll="{ y: tableHeight - 20 }">
|
|
|
+ <template slot="productType" slot-scope="text, record">
|
|
|
+ <span v-if="record.productTypeName1">{{ record.productTypeName1 }}{{ record.productTypeName2?'>'+record.productTypeName2:'' }}{{ record.productTypeName3?'>'+record.productTypeName3:'' }}</span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
<template slot="footer">
|
|
|
<table>
|
|
|
<tr>
|
|
@@ -83,6 +102,7 @@
|
|
|
<td style="width:15%"></td>
|
|
|
<td style="width:20%"></td>
|
|
|
<td style="width:12%;text-align: center;">总数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</td>
|
|
|
+ <td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_salesPrice')">总售价:{{ (totalData && (totalData.totalPrice || totalData.totalPrice==0)) ? toThousands(totalData.totalPrice) : '--' }}</span></td>
|
|
|
<td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_costPrice')">总成本价:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</span></td>
|
|
|
<td style="width:12%;text-align: right;"><span v-if="$hasPermissions('M_allocationOrderTotalList_costPrice')">总毛利:{{ (totalData && (totalData.totalGrossProfit || totalData.totalGrossProfit==0)) ? toThousands(totalData.totalGrossProfit) : '--' }}</span></td>
|
|
|
<td style="width:14%"></td>
|
|
@@ -103,6 +123,7 @@ import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import AllocateType from '@/views/common/allocateType.js'
|
|
|
import customerService from '@/views/common/customerService'
|
|
|
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
// 接口
|
|
|
import { allocateTypeAllList } from '@/api/allocateType'
|
|
|
import { userQueryList } from '@/api/power-user'
|
|
@@ -110,7 +131,7 @@ import { allocateReportList, allocateReportCount } from '@/api/allocateReport'
|
|
|
export default {
|
|
|
name: 'AllocationOrderTotalList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, rangeDate, AllocateType, customerService },
|
|
|
+ components: { STable, VSelect, rangeDate, AllocateType, customerService, dealerSubareaScopeList },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -131,7 +152,9 @@ export default {
|
|
|
costTypeSn: undefined, // 费用类型
|
|
|
allocateCategory: undefined, // 调拨类型1
|
|
|
allocateTypeSn: undefined, // 调拨类型2
|
|
|
- bizUserSn: undefined// 客服
|
|
|
+ bizUserSn: undefined, // 客服
|
|
|
+ buyerSn: undefined, // 客户名称
|
|
|
+ dealerType: undefined// 客户类型
|
|
|
},
|
|
|
allocateTypeList: [], // 调拨类型
|
|
|
allocateTypeVal: [], // 已选费用/调拨类型
|
|
@@ -171,17 +194,26 @@ export default {
|
|
|
columns () {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
|
- { title: '调拨单号', dataIndex: 'allocateNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '调拨开单日期', dataIndex: 'allocateDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '调拨单号', dataIndex: 'allocateNo', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调拨开单日期', dataIndex: 'allocateDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '客户名称', dataIndex: 'targetName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '调拨数量', dataIndex: 'totalQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '客户类型', dataIndex: 'targetTypeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '费用类型', dataIndex: 'costTypeName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '调拨类型', dataIndex: 'allocateSortName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '费用归属品牌', dataIndex: 'productBrandName', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '费用归属品类', dataIndex: 'productTypeName1', width: '15%', align: 'center', scopedSlots: { customRender: 'productType' } },
|
|
|
+ { title: '调拨数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '成本价', dataIndex: 'totalCost', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '毛利', dataIndex: 'totalGrossProfit', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '操作员', dataIndex: 'creatorName', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
+ { title: '操作员', dataIndex: 'creatorName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
]
|
|
|
+ if (this.$hasPermissions('M_allocationOrderTotalList_salesPrice')) { // 成本价权限
|
|
|
+ arr.splice(10, 0, { title: '售价', dataIndex: 'totalPrice', width: '11%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
+ }
|
|
|
if (this.$hasPermissions('M_allocationOrderTotalList_costPrice')) { // 成本价权限
|
|
|
- arr.splice(4, 0, { title: '成本价', dataIndex: 'totalCost', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.splice(5, 0, { title: '毛利', dataIndex: 'totalGrossProfit', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
+ arr.splice(11, 0, { title: '成本价', dataIndex: 'totalCost', width: '11%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
+ arr.splice(12, 0, { title: '毛利', dataIndex: 'totalGrossProfit', width: '11%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -198,6 +230,10 @@ export default {
|
|
|
handleStock () {
|
|
|
this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')
|
|
|
},
|
|
|
+ // 客户名称
|
|
|
+ custChange (obj) {
|
|
|
+ this.queryParam.buyerSn = obj.key
|
|
|
+ },
|
|
|
// 调拨开单日期 change
|
|
|
dateChange (date) {
|
|
|
if (date[0] && date[1]) {
|
|
@@ -245,10 +281,13 @@ export default {
|
|
|
this.queryParam.allocateCategory = undefined
|
|
|
this.queryParam.allocateTypeSn = undefined
|
|
|
this.queryParam.bizUserSn = undefined
|
|
|
+ this.queryParam.buyerSn = undefined
|
|
|
+ this.queryParam.dealerType = undefined
|
|
|
this.allocateTypeVal = []
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.totalData = null
|
|
|
this.$refs.table.clearTable()
|
|
|
+ this.$refs.custList.resetForm()
|
|
|
},
|
|
|
// 调拨类型
|
|
|
getAllocateTypeAllList () {
|