|
@@ -8,7 +8,6 @@
|
|
class="form-model-con"
|
|
class="form-model-con"
|
|
layout="inline"
|
|
layout="inline"
|
|
:model="queryParam"
|
|
:model="queryParam"
|
|
- :rules="rules"
|
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
@keyup.enter.native="handleSearch" >
|
|
@keyup.enter.native="handleSearch" >
|
|
@@ -20,7 +19,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="客户名称">
|
|
<a-form-model-item label="客户名称">
|
|
- <custList id="salesReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
|
|
|
|
|
|
+ <custList id="salesReportList-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -47,12 +46,12 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="业务员">
|
|
<a-form-model-item label="业务员">
|
|
- <a-input id="salesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
|
|
|
|
|
|
+ <a-input id="salesReportList-manName" v-model.trim="queryParam.manName" allowClear placeholder="请输入业务员"/>
|
|
</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-form-model-item label="单号">
|
|
- <a-input id="salesReportList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入单号"/>
|
|
|
|
|
|
+ <a-input id="salesReportList-billNo" v-model.trim="queryParam.billNo" allowClear placeholder="请输入单号"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -61,8 +60,11 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="出库时间">
|
|
|
|
- <rangeDate id="salesReportList-outWareTime" ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
|
|
|
|
|
|
+ <a-form-item label="单据类型">
|
|
|
|
+ <a-select id="salesReportList-billType" v-model="queryParam.billType" allowClear placeholder="请选择单据类型">
|
|
|
|
+ <a-select-option value="SALES_BILL">销售</a-select-option>
|
|
|
|
+ <a-select-option value="SALES_RETURN">销售退货</a-select-option>
|
|
|
|
+ </a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -106,7 +108,7 @@
|
|
<!-- 合计 -->
|
|
<!-- 合计 -->
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<div class="ftext" slot="message">
|
|
<div class="ftext" slot="message">
|
|
- 总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
|
|
|
|
|
|
+ 总单数:<strong>{{ (totalData && (totalData.totalRecord || totalData.totalRecord==0)) ? totalData.totalRecord : '--' }}</strong>;
|
|
产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
|
|
产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
|
|
<div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
|
|
<div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
|
|
总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</strong>;
|
|
总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</strong>;
|
|
@@ -144,7 +146,7 @@ import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import custType from '@/views/common/custType.js'
|
|
import custType from '@/views/common/custType.js'
|
|
import AreaList from '@/views/common/areaList.js'
|
|
import AreaList from '@/views/common/areaList.js'
|
|
import custList from '@/views/common/custList.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
-import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
|
|
|
|
|
|
+import { reportSalesProfitList, reportSalesProfitCount, reportSalesProfitExport } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDate, custList, AreaList, custType },
|
|
components: { STable, VSelect, rangeDate, custList, AreaList, custType },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -160,26 +162,21 @@ export default {
|
|
createEndDate: '', // 创建结束时间
|
|
createEndDate: '', // 创建结束时间
|
|
beginDate: '', // 审核开始时间
|
|
beginDate: '', // 审核开始时间
|
|
endDate: '', // 审核结束时间
|
|
endDate: '', // 审核结束时间
|
|
- outWarehouseBeginDate: '', // 出库开始时间
|
|
|
|
- outWarehouseEndDate: '', // 出库结束时间
|
|
|
|
- buyerNameCurrent: undefined, // 客户名称
|
|
|
|
- buyerSnCurrent: undefined, // 客户sn
|
|
|
|
|
|
+ buyerName: undefined, // 客户名称
|
|
|
|
+ buyerSn: undefined, // 客户sn
|
|
salesTargetType: undefined, // 客户类型
|
|
salesTargetType: undefined, // 客户类型
|
|
provinceSn: undefined, // 省
|
|
provinceSn: undefined, // 省
|
|
citySn: undefined, // 市
|
|
citySn: undefined, // 市
|
|
countySn: undefined, // 区
|
|
countySn: undefined, // 区
|
|
- settleStyleSn: undefined,
|
|
|
|
- salesBillNo: '', // 销售单号
|
|
|
|
- salesManName: '', // 销售人员
|
|
|
|
|
|
+ settleStyleSn: undefined, // 收款方式
|
|
|
|
+ billNo: '', // 单号
|
|
|
|
+ manName: '', // 销售人员
|
|
|
|
+ billType: undefined, // 单据类型
|
|
customerRelationType: undefined, // 客户关系
|
|
customerRelationType: undefined, // 客户关系
|
|
urgentBillStatus: undefined // 急件状态
|
|
urgentBillStatus: undefined // 急件状态
|
|
},
|
|
},
|
|
creatTime: [], // 创建时间
|
|
creatTime: [], // 创建时间
|
|
time: [], // 审核时间
|
|
time: [], // 审核时间
|
|
- outWareTime: [], // 出库时间
|
|
|
|
- rules: {
|
|
|
|
- 'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
|
|
|
|
- },
|
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -188,7 +185,7 @@ export default {
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
this.spinning = true
|
|
this.spinning = true
|
|
delete params.time
|
|
delete params.time
|
|
- return reportSalesBillList(params).then(res => {
|
|
|
|
|
|
+ return reportSalesProfitList(params).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -217,9 +214,9 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
- { title: '销售单号', dataIndex: 'salesBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '单号', dataIndex: 'billNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '急件', dataIndex: 'urgentBillStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '急件', dataIndex: 'urgentBillStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '客户名称', dataIndex: 'salesTargetName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -228,8 +225,8 @@ export default {
|
|
{ title: '折扣金额', dataIndex: 'discountAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折扣金额', dataIndex: 'discountAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后总售价', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后总售价', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
// { title: '毛利', dataIndex: 'totalProfit', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '毛利', dataIndex: 'totalProfit', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '业务员', dataIndex: 'salesManName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '审核时间', dataIndex: 'salesAuditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '业务员', dataIndex: 'manName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '审核时间', dataIndex: 'auditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
arr.splice(7, 0, { title: '总成本', dataIndex: 'totalCost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(7, 0, { title: '总成本', dataIndex: 'totalCost', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
@@ -247,7 +244,7 @@ export default {
|
|
},
|
|
},
|
|
// 合计
|
|
// 合计
|
|
getCount (params) {
|
|
getCount (params) {
|
|
- reportSalesBillCount(params).then(res => {
|
|
|
|
|
|
+ reportSalesProfitCount(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.totalData = res.data
|
|
this.totalData = res.data
|
|
} else {
|
|
} else {
|
|
@@ -267,12 +264,6 @@ export default {
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.beginDate = date[0] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
this.queryParam.endDate = date[1] || ''
|
|
},
|
|
},
|
|
- // 出库时间
|
|
|
|
- outWareDateChange (date) {
|
|
|
|
- this.outWareTime = date
|
|
|
|
- this.queryParam.outWarehouseBeginDate = date[0]
|
|
|
|
- this.queryParam.outWarehouseEndDate = date[1]
|
|
|
|
- },
|
|
|
|
// 查询
|
|
// 查询
|
|
handleSearch () {
|
|
handleSearch () {
|
|
let hasVal = false
|
|
let hasVal = false
|
|
@@ -291,11 +282,11 @@ export default {
|
|
// 客户名称
|
|
// 客户名称
|
|
custSatelliteChange (v, row) {
|
|
custSatelliteChange (v, row) {
|
|
if (row && row.customerSn) {
|
|
if (row && row.customerSn) {
|
|
- this.queryParam.buyerSnCurrent = row.customerSn
|
|
|
|
- this.queryParam.buyerNameCurrent = undefined
|
|
|
|
|
|
+ this.queryParam.buyerSn = row.customerSn
|
|
|
|
+ this.queryParam.buyerName = undefined
|
|
} else {
|
|
} else {
|
|
- this.queryParam.buyerNameCurrent = v
|
|
|
|
- this.queryParam.buyerSnCurrent = undefined
|
|
|
|
|
|
+ this.queryParam.buyerName = v
|
|
|
|
+ this.queryParam.buyerSn = undefined
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
@@ -304,8 +295,8 @@ export default {
|
|
this.creatTime = []
|
|
this.creatTime = []
|
|
this.queryParam.createBeginDate = ''
|
|
this.queryParam.createBeginDate = ''
|
|
this.queryParam.createEndDate = ''
|
|
this.queryParam.createEndDate = ''
|
|
- this.queryParam.buyerNameCurrent = undefined
|
|
|
|
- this.queryParam.buyerSnCurrent = undefined
|
|
|
|
|
|
+ this.queryParam.buyerName = undefined
|
|
|
|
+ this.queryParam.buyerSn = undefined
|
|
this.queryParam.salesTargetType = undefined
|
|
this.queryParam.salesTargetType = undefined
|
|
this.queryParam.provinceSn = undefined
|
|
this.queryParam.provinceSn = undefined
|
|
this.queryParam.citySn = undefined
|
|
this.queryParam.citySn = undefined
|
|
@@ -313,8 +304,9 @@ export default {
|
|
|
|
|
|
this.queryParam.settleStyleSn = undefined
|
|
this.queryParam.settleStyleSn = undefined
|
|
this.queryParam.showCost = undefined
|
|
this.queryParam.showCost = undefined
|
|
- this.queryParam.salesBillNo = ''
|
|
|
|
- this.queryParam.salesManName = ''
|
|
|
|
|
|
+ this.queryParam.billNo = ''
|
|
|
|
+ this.queryParam.manName = ''
|
|
|
|
+ this.queryParam.billType = undefined
|
|
this.queryParam.customerRelationType = undefined// 客户关系
|
|
this.queryParam.customerRelationType = undefined// 客户关系
|
|
this.queryParam.urgentBillStatus = undefined // 急件状态
|
|
this.queryParam.urgentBillStatus = undefined // 急件状态
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
@@ -324,10 +316,6 @@ export default {
|
|
this.time = []
|
|
this.time = []
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.endDate = ''
|
|
this.queryParam.endDate = ''
|
|
- this.$refs.outWareRangeDate.resetDate('')
|
|
|
|
- this.outWareTime = []
|
|
|
|
- this.queryParam.outWarehouseBeginDate = ''
|
|
|
|
- this.queryParam.outWarehouseEndDate = ''
|
|
|
|
this.$refs.custSatelliteList.resetForm()
|
|
this.$refs.custSatelliteList.resetForm()
|
|
this.$refs.areaList.clearData()
|
|
this.$refs.areaList.clearData()
|
|
}
|
|
}
|
|
@@ -348,7 +336,7 @@ export default {
|
|
params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
|
|
_this.exportLoading = true
|
|
_this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- reportSalesBillExport(params).then(res => {
|
|
|
|
|
|
+ reportSalesProfitExport(params).then(res => {
|
|
downloadExcel(res, '销售报表')
|
|
downloadExcel(res, '销售报表')
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|