|
@@ -1,8 +1,8 @@
|
|
<template>
|
|
<template>
|
|
- <a-card size="small" :bordered="false" class="salesOrderTotalList-wrap">
|
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <a-card size="small" :bordered="false" class="salesOrderTotalList-wrap searchBottomSpace">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
- <div class="table-page-search-wrapper">
|
|
|
|
|
|
+ <div class="table-page-search-wrapper" ref="tableSearch">
|
|
<a-form-model
|
|
<a-form-model
|
|
id="salesOrderTotalList-form"
|
|
id="salesOrderTotalList-form"
|
|
ref="ruleForm"
|
|
ref="ruleForm"
|
|
@@ -17,14 +17,22 @@
|
|
<rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
<rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="5" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="销售单号">
|
|
<a-form-model-item label="销售单号">
|
|
- <a-input id="salesOrderTotalList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ id="salesOrderTotalList-salesBillNo"
|
|
|
|
+ v-model.trim="queryParam.salesBillNo"
|
|
|
|
+ allowClear
|
|
|
|
+ placeholder="请输入销售单号" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="5" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="客户名称">
|
|
<a-form-model-item label="客户名称">
|
|
- <a-input id="salesOrderTotalList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ id="salesOrderTotalList-dealerName"
|
|
|
|
+ v-model.trim="queryParam.dealerName"
|
|
|
|
+ allowClear
|
|
|
|
+ placeholder="请输入客户名称" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
@@ -49,30 +57,46 @@
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
option-filter-prop="children"
|
|
option-filter-prop="children"
|
|
:filter-option="filterOption">
|
|
:filter-option="filterOption">
|
|
- <a-select-option v-for="item in operatorList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option
|
|
|
|
+ v-for="item in operatorList"
|
|
|
|
+ :key="item.sn"
|
|
|
|
+ :value="item.sn">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="5" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="所在区域">
|
|
<a-form-model-item label="所在区域">
|
|
<subarea id="salesOrderTotalList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
|
|
<subarea id="salesOrderTotalList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="5" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="地区" prop="dealerProvinceSn">
|
|
<a-form-model-item label="地区" prop="dealerProvinceSn">
|
|
- <Area id="salesOrderTotalList-shippingAddrProvinceSn" defValKey="id" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
|
|
|
|
|
|
+ <Area
|
|
|
|
+ id="salesOrderTotalList-shippingAddrProvinceSn"
|
|
|
|
+ defValKey="id"
|
|
|
|
+ v-model="queryParam.dealerProvinceSn"
|
|
|
|
+ placeholder="请选择省"></Area>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
- <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button
|
|
<a-button
|
|
type="primary"
|
|
type="primary"
|
|
class="button-info"
|
|
class="button-info"
|
|
size="small"
|
|
size="small"
|
|
@click="handleStock"
|
|
@click="handleStock"
|
|
id="salesOrderTotalList-stockDate">盘点区间日期</a-button>
|
|
id="salesOrderTotalList-stockDate">盘点区间日期</a-button>
|
|
- <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesOrderTotalList-refresh">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesOrderTotalList-reset">重置</a-button>
|
|
|
|
|
|
+ <a-button
|
|
|
|
+ style="margin-left: 5px"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="handleSearch"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ id="salesOrderTotalList-refresh">查询</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ style="margin-left: 8px"
|
|
|
|
+ @click="resetSearchForm"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ id="salesOrderTotalList-reset">重置</a-button>
|
|
<a-button
|
|
<a-button
|
|
style="margin-left: 10px"
|
|
style="margin-left: 10px"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -84,60 +108,106 @@
|
|
id="salesOrderTotalList-export">导出</a-button>
|
|
id="salesOrderTotalList-export">导出</a-button>
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'" />
|
|
</a>
|
|
</a>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</div>
|
|
</div>
|
|
- <!-- 列表 -->
|
|
|
|
- <s-table
|
|
|
|
- class="sTable"
|
|
|
|
- ref="table"
|
|
|
|
- size="small"
|
|
|
|
- :rowKey="(record) => record.salesBillNo"
|
|
|
|
- rowKeyName="salesBillNo"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="loadData"
|
|
|
|
- :scroll="{ x: 1990 }"
|
|
|
|
- :defaultLoadData="false"
|
|
|
|
- bordered>
|
|
|
|
- <template slot="footer">
|
|
|
|
- <a-row :gutter="15">
|
|
|
|
- <a-col :md="4" :sm="24">数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">实售价:{{ (totalData && (totalData.totalRealSaleAmount || totalData.totalRealSaleAmount==0)) ? toThousands(totalData.totalRealSaleAmount) : '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">开单价:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_costPrice')">成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_costPrice')&&$hasPermissions('M_salesOrderTotalList_salesPrice')">毛利:{{ (totalData && (totalData.grossProfit || totalData.grossProfit==0)) ? toThousands(totalData.grossProfit) : '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">返利:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</a-col>
|
|
|
|
- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">优惠金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
|
|
|
|
- <!-- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折扣金额:{{ (totalData && (totalData.totalDiscountAmount || totalData.totalDiscountAmount==0)) ? toThousands(totalData.totalDiscountAmount) : '--' }}</a-col>
|
|
|
|
|
|
+ </a-card>
|
|
|
|
+ <a-card size="small" :bordered="false">
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable"
|
|
|
|
+ ref="table"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.salesBillNo"
|
|
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
|
|
+ rowKeyName="salesBillNo"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ x: 1990, y: tableHeight-32 }"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ bordered>
|
|
|
|
+ <template slot="footer">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24">数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24"
|
|
|
|
+ v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">实售价:{{ (totalData && (totalData.totalRealSaleAmount || totalData.totalRealSaleAmount==0)) ? toThousands(totalData.totalRealSaleAmount) : '--' }}</a-col>
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24"
|
|
|
|
+ v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">开单价:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24"
|
|
|
|
+ v-if="$hasPermissions('M_salesOrderTotalList_costPrice')">成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24"
|
|
|
|
+ v-if="$hasPermissions('M_salesOrderTotalList_costPrice')&&$hasPermissions('M_salesOrderTotalList_salesPrice')">毛利:{{ (totalData && (totalData.grossProfit || totalData.grossProfit==0)) ? toThousands(totalData.grossProfit) : '--' }}</a-col>
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24"
|
|
|
|
+ v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">返利:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</a-col>
|
|
|
|
+ <a-col
|
|
|
|
+ :md="4"
|
|
|
|
+ :sm="24"
|
|
|
|
+ v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">优惠金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
|
|
|
|
+ <!-- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折扣金额:{{ (totalData && (totalData.totalDiscountAmount || totalData.totalDiscountAmount==0)) ? toThousands(totalData.totalDiscountAmount) : '--' }}</a-col>
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折后金额:{{ (totalData && (totalData.totalDiscountedAmount || totalData.totalDiscountedAmount==0)) ? toThousands(totalData.totalDiscountedAmount) : '--' }}</a-col> -->
|
|
<a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折后金额:{{ (totalData && (totalData.totalDiscountedAmount || totalData.totalDiscountedAmount==0)) ? toThousands(totalData.totalDiscountedAmount) : '--' }}</a-col> -->
|
|
- </a-row>
|
|
|
|
- </template>
|
|
|
|
- </s-table>
|
|
|
|
- </a-spin>
|
|
|
|
- <!-- 导出提示框 -->
|
|
|
|
- <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
|
- </a-card>
|
|
|
|
|
|
+ </a-row>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-spin>
|
|
|
|
+ <!-- 导出提示框 -->
|
|
|
|
+ <reportModal :visible="showExport" @close="showExport=false"></reportModal>
|
|
|
|
+ </a-card>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { commonMixin } from '@/utils/mixin'
|
|
|
|
|
|
+import {
|
|
|
|
+ commonMixin
|
|
|
|
+} from '@/utils/mixin'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
|
|
+import {
|
|
|
|
+ STable,
|
|
|
|
+ VSelect
|
|
|
|
+} from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import custList from '@/views/common/custList.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
import Area from '@/views/common/area.js'
|
|
import Area from '@/views/common/area.js'
|
|
-import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
|
-import { userQueryList } from '@/api/power-user'
|
|
|
|
-import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
|
|
|
|
|
|
+import {
|
|
|
|
+ hdExportExcel
|
|
|
|
+} from '@/libs/exportExcel'
|
|
|
|
+import {
|
|
|
|
+ userQueryList
|
|
|
|
+} from '@/api/power-user'
|
|
|
|
+import {
|
|
|
|
+ reportSalesBillList,
|
|
|
|
+ reportSalesBillCount,
|
|
|
|
+ reportSalesBillExport
|
|
|
|
+} from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
name: 'SalesOrderTotalList',
|
|
name: 'SalesOrderTotalList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, rangeDate, custList, subarea, reportModal, Area },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ STable,
|
|
|
|
+ VSelect,
|
|
|
|
+ rangeDate,
|
|
|
|
+ custList,
|
|
|
|
+ subarea,
|
|
|
|
+ reportModal,
|
|
|
|
+ Area
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -162,7 +232,11 @@ export default {
|
|
dealerProvinceSn: undefined
|
|
dealerProvinceSn: undefined
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- 'time': [{ required: true, message: '请选择销售日期', trigger: 'change' }]
|
|
|
|
|
|
+ 'time': [{
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请选择销售日期',
|
|
|
|
+ trigger: 'change'
|
|
|
|
+ }]
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
@@ -194,16 +268,91 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
columns () {
|
|
columns () {
|
|
const _this = this
|
|
const _this = this
|
|
- const arr = [
|
|
|
|
- { title: '销售单号', dataIndex: 'salesBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '开单日期', dataIndex: 'createDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售日期', dataIndex: 'auditDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '客户名称', dataIndex: 'dealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '总数量', dataIndex: 'totalQty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '数量(促)', dataIndex: 'giftQty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ const arr = [{
|
|
|
|
+ title: '销售单号',
|
|
|
|
+ dataIndex: 'salesBillNo',
|
|
|
|
+ width: 160,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '开单日期',
|
|
|
|
+ dataIndex: 'createDate',
|
|
|
|
+ width: 130,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '销售日期',
|
|
|
|
+ dataIndex: 'auditDate',
|
|
|
|
+ width: 130,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '客户名称',
|
|
|
|
+ dataIndex: 'dealerName',
|
|
|
|
+ width: 120,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ },
|
|
|
|
+ ellipsis: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '客户级别',
|
|
|
|
+ dataIndex: 'dealerLevelDictValue',
|
|
|
|
+ width: 120,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ },
|
|
|
|
+ ellipsis: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '直接绑定客户名称',
|
|
|
|
+ dataIndex: 'directDealerName',
|
|
|
|
+ width: 120,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ },
|
|
|
|
+ ellipsis: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '间接绑定客户名称',
|
|
|
|
+ dataIndex: 'indirectDealerName',
|
|
|
|
+ width: 120,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ },
|
|
|
|
+ ellipsis: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '总数量',
|
|
|
|
+ dataIndex: 'totalQty',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? text : '--')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '数量(促)',
|
|
|
|
+ dataIndex: 'giftQty',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? text : '--')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// { title: '实售价', dataIndex: 'totalRealSaleAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '实售价', dataIndex: 'totalRealSaleAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '开单价', dataIndex: 'totalAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '开单价', dataIndex: 'totalAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
// { title: '成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -219,37 +368,153 @@ export default {
|
|
|
|
|
|
]
|
|
]
|
|
if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
|
|
if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
|
|
- arr.push({ title: '实售价', dataIndex: 'totalRealSaleAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- arr.push({ title: '开单价', dataIndex: 'totalAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '实售价',
|
|
|
|
+ dataIndex: 'totalRealSaleAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '开单价',
|
|
|
|
+ dataIndex: 'totalAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
if (this.$hasPermissions('M_salesOrderTotalList_costPrice')) { // 成本价权限
|
|
if (this.$hasPermissions('M_salesOrderTotalList_costPrice')) { // 成本价权限
|
|
- arr.push({ title: '成本价', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- arr.push({ title: '成本价(促)', dataIndex: 'totalGiftCost', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '成本价',
|
|
|
|
+ dataIndex: 'totalCost',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '成本价(促)',
|
|
|
|
+ dataIndex: 'totalGiftCost',
|
|
|
|
+ width: 90,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
|
|
if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
|
|
- arr.push({ title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '毛利',
|
|
|
|
+ dataIndex: 'grossProfit',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (this.$hasPermissions('M_salesOrderTotalList_provincePrice')) {
|
|
if (this.$hasPermissions('M_salesOrderTotalList_provincePrice')) {
|
|
- arr.push({ title: '省级价', dataIndex: 'totalProvinceAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '省级价',
|
|
|
|
+ dataIndex: 'totalProvinceAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
if (this.$hasPermissions('M_salesOrderTotalList_cityPrice')) {
|
|
if (this.$hasPermissions('M_salesOrderTotalList_cityPrice')) {
|
|
- arr.push({ title: '市级价', dataIndex: 'totalCityAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '市级价',
|
|
|
|
+ dataIndex: 'totalCityAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
if (this.$hasPermissions('M_salesOrderTotalList_specialPrice')) {
|
|
if (this.$hasPermissions('M_salesOrderTotalList_specialPrice')) {
|
|
- arr.push({ title: '特约加盟店价', dataIndex: 'totalSpecialAmount', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '特约加盟店价',
|
|
|
|
+ dataIndex: 'totalSpecialAmount',
|
|
|
|
+ width: 90,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
|
|
if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
|
|
- arr.push({ title: '直接差价', dataIndex: 'directRebateAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- arr.push({ title: '间接差价', dataIndex: 'indirectRebateAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- arr.push({ title: '返利', dataIndex: 'rebateAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- arr.push({ title: '优惠金额', dataIndex: 'discountAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '直接差价',
|
|
|
|
+ dataIndex: 'directRebateAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '间接差价',
|
|
|
|
+ dataIndex: 'indirectRebateAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '返利',
|
|
|
|
+ dataIndex: 'rebateAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '优惠金额',
|
|
|
|
+ dataIndex: 'discountAmount',
|
|
|
|
+ width: 70,
|
|
|
|
+ align: 'right',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return ((text || text == 0) ? _this.toThousands(text) : '--')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
// arr.push({ title: '折扣金额', dataIndex: 'totalDiscountAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
// arr.push({ title: '折扣金额', dataIndex: 'totalDiscountAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
// arr.push({ title: '折后金额', dataIndex: 'totalDiscountedAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
// arr.push({ title: '折后金额', dataIndex: 'totalDiscountedAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
}
|
|
}
|
|
- arr.push({ title: '操作员', dataIndex: 'operatorName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
|
|
|
|
|
|
+ arr.push({
|
|
|
|
+ title: '操作员',
|
|
|
|
+ dataIndex: 'operatorName',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: 'center',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text || '--'
|
|
|
|
+ },
|
|
|
|
+ ellipsis: true
|
|
|
|
+ })
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
+ _this.setTableH()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
|
+ this.setTableH()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 盘点库存日期
|
|
// 盘点库存日期
|
|
handleStock () {
|
|
handleStock () {
|
|
@@ -352,7 +617,15 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|
|
- this.getUserList()
|
|
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.getUserList()
|
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
+ _this.setTableH()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ setTableH () {
|
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 236
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|