|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
- <div class="jg-page-wrap onlinePayOrderList-wrap">
|
|
|
+ <div class="jg-page-wrap salesManagementList-wrap">
|
|
|
<a-card size="small" :bordered="false" class="table-page-search-wrapper">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div ref="tableSearch">
|
|
|
<a-form layout="inline" @keyup.enter.native="searchForm">
|
|
|
<a-row type="flex" justify="start" :gutter="15">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :span="6">
|
|
|
<a-form-item label="创建时间">
|
|
|
<rangeDate
|
|
|
- id="onlinePayOrderList-creatdate"
|
|
|
+ id="salesManagementList-creatdate"
|
|
|
:allowClear="isByCustQuery"
|
|
|
:hasDisabledAreaTime="false"
|
|
|
ref="rangeDate"
|
|
@@ -16,32 +16,33 @@
|
|
|
@change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :span="6">
|
|
|
<a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}" :required="isByCustQuery">
|
|
|
- <custList id="onlinePayOrderList-custList" ref="custList" @change="custChange"></custList>
|
|
|
+ <custList id="salesManagementList-custList" ref="custList" @change="custChange"></custList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="销售单号">
|
|
|
- <a-input id="onlinePayOrderList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="单据来源">
|
|
|
- <v-select
|
|
|
- style="width: 100%;"
|
|
|
- v-model="queryParam.sourceType"
|
|
|
- ref="sourceType"
|
|
|
- id="onlinePayOrderList-sourceType"
|
|
|
- code="SALES_SOURCE"
|
|
|
- placeholder="请选择单据来源"
|
|
|
- allowClear></v-select>
|
|
|
+ <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="业务状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.billStatus"
|
|
|
+ @change="setIsHomeNav($route.name, null)"
|
|
|
+ ref="billStatus"
|
|
|
+ id="salesManagementList-billStatus"
|
|
|
+ code="SALES_BILL_STATUS"
|
|
|
+ :notIn="['WAIT_SUBMIT','SUPERIOR_CHANGE']"
|
|
|
+ placeholder="请选择业务状态"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="出库时间">
|
|
|
- <rangeDate id="onlinePayOrderList-outWareTime" ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
|
|
|
+ <rangeDate id="salesManagementList-outWareTime" ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -51,54 +52,58 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="采购单号">
|
|
|
- <a-input id="onlinePayOrderList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
|
|
|
+ <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="业务状态">
|
|
|
+ <a-form-item label="财务状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.billStatus"
|
|
|
- @change="setIsHomeNav($route.name, null)"
|
|
|
- ref="billStatus"
|
|
|
- id="onlinePayOrderList-billStatus"
|
|
|
- code="SALES_BILL_STATUS"
|
|
|
- placeholder="请选择业务状态"
|
|
|
- allowClear></v-select>
|
|
|
+ v-model="queryParam.financialStatus"
|
|
|
+ ref="financialStatus"
|
|
|
+ id="salesManagementList-financialStatus"
|
|
|
+ code="FINANCIAL_ONLINE_RECEIVE_STATUS"
|
|
|
+ placeholder="请选择财务状态"
|
|
|
+ allowClear></v-select>s
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="审核时间">
|
|
|
- <rangeDate id="onlinePayOrderList-auditTime" ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
|
|
|
+ <rangeDate id="salesManagementList-auditTime" ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="取消时间">
|
|
|
+ <rangeDate id="salesManagementList-cancelTime" ref="cancelRangeDate" v-model="cancelTime" @change="cancelDateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="收款方式">
|
|
|
<v-select
|
|
|
code="SETTLE_STYLE"
|
|
|
- id="onlinePayOrderList-settleStyleSn"
|
|
|
+ id="salesManagementList-settleStyleSn"
|
|
|
v-model="queryParam.settleStyleSn"
|
|
|
allowClear
|
|
|
placeholder="请选择收款方式"
|
|
|
></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="6">
|
|
|
- <a-form-model-item label="铺货出库">
|
|
|
- <v-select code="FLAG" id="onlinePayOrderList-distributionFlag" v-model="queryParam.distributionFlag" allowClear placeholder="请选择是否铺货出库"></v-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="财务状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.financialStatus"
|
|
|
- ref="financialStatus"
|
|
|
- id="onlinePayOrderList-financialStatus"
|
|
|
- code="FINANCIAL_RECEIVE_STATUS"
|
|
|
- placeholder="请选择财务状态"
|
|
|
- allowClear></v-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
</template>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-button id="salesManagementList-search" type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
|
|
|
+ <a-button id="salesManagementList-reset" style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ v-if="$hasPermissions('B_salesExport')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleExport"
|
|
|
+ :disabled="disabled"
|
|
|
+ :loading="exportLoading"
|
|
|
+ id="salesManagementList-export">导出</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px" id="salesManagementList-advanced">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
+ </a>
|
|
|
+ </a-col>
|
|
|
<a-col :span="24" style="display:flex;align-items: center;">
|
|
|
<div style="text-align:left;width:50%;">
|
|
|
<a-checkbox v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
|
|
@@ -108,7 +113,7 @@
|
|
|
</template>
|
|
|
<a-icon type="question-circle" />
|
|
|
</a-popover>
|
|
|
- <a-checkbox id="sales-custQuery" style="margin-left:10px;" v-model="isByCustQuery">包括废弃单</a-checkbox>
|
|
|
+ <a-checkbox id="sales-custQuery" style="margin-left:10px;" v-model="isAbandonOrder" @change="handleAbandonOrder">包括废弃单</a-checkbox>
|
|
|
<a-popover placement="right">
|
|
|
<template slot="content">
|
|
|
废弃单:指【已取消】和【审核不通过】状态的订单
|
|
@@ -116,22 +121,6 @@
|
|
|
<a-icon type="question-circle" />
|
|
|
</a-popover>
|
|
|
</div>
|
|
|
- <div style="text-align:left;margin-left: -120px;width:50%;">
|
|
|
- <a-button id="onlinePayOrderList-search" type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
|
|
|
- <a-button id="onlinePayOrderList-reset" style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- v-if="$hasPermissions('B_salesExport')"
|
|
|
- class="button-warning"
|
|
|
- @click="handleExport"
|
|
|
- :disabled="disabled"
|
|
|
- :loading="exportLoading"
|
|
|
- id="onlinePayOrderList-export">导出</a-button>
|
|
|
- <a @click="advanced=!advanced" style="margin-left: 5px" id="onlinePayOrderList-advanced">
|
|
|
- {{ advanced ? '收起' : '展开' }}
|
|
|
- <a-icon :type="advanced ? 'up' : 'down'"/>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -148,13 +137,11 @@
|
|
|
总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
|
|
|
总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
|
|
|
总售价:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>;
|
|
|
- 已收款金额:<strong>{{ totalData&&(totalData.discountAmount || totalData.discountAmount==0) ? toThousands(totalData.discountAmount) : '--' }}</strong>;
|
|
|
- 退款中金额:<strong>{{ totalData&&(totalData.discountedAmount || totalData.discountedAmount==0) ? toThousands(totalData.discountedAmount) : '--' }}</strong>;
|
|
|
- 已退款金额:<strong>{{ totalData&&(totalData.discountedAmount || totalData.discountedAmount==0) ? toThousands(totalData.discountedAmount) : '--' }}</strong>;
|
|
|
+ 已收款金额:<strong>{{ totalData&&(totalData.paymentAmount || totalData.paymentAmount==0) ? toThousands(totalData.paymentAmount) : '--' }}</strong>;
|
|
|
+ 退款中金额:<strong>{{ totalData&&(totalData.refundingAmount || totalData.refundingAmount==0) ? toThousands(totalData.refundingAmount) : '--' }}</strong>;
|
|
|
+ 已退款金额:<strong>{{ totalData&&(totalData.refundedAmount || totalData.refundedAmount==0) ? toThousands(totalData.refundedAmount) : '--' }}</strong>;
|
|
|
</div>
|
|
|
<div class="action-buttons">
|
|
|
- <a-button id="onlinePayOrderList-add0" type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)"><a-icon type="plus" /> 新增(零售)</a-button>
|
|
|
- <a-button id="onlinePayOrderList-add1" type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)"><a-icon type="plus" /> 新增(铺货)</a-button>
|
|
|
<hideCellMenus placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -173,10 +160,15 @@
|
|
|
bordered>
|
|
|
<!-- 销售单号 -->
|
|
|
<template slot="salesBillNo" slot-scope="text, record">
|
|
|
- <span class="table-td-link" :id="'onlinePayOrderList-detail-'+record.id" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
+ <span class="table-td-link" :id="'salesManagementList-detail-'+record.id" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
<span v-else>{{ record.salesBillNo }}</span>
|
|
|
<a-badge count="改" :number-style="{ zoom:'80%',marginLeft:'5px' }" v-if="record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
|
|
|
</template>
|
|
|
+ <!-- 取消时间 -->
|
|
|
+ <template slot="cancelTime" slot-scope="text, record">
|
|
|
+ <span v-if="record.billStatus==='AUDIT_REJECT'">{{ record.auditDate }}</span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
<!-- 审核icon -->
|
|
|
<template slot="audit" slot-scope="text, record">
|
|
|
<stateIcon :title="record.billStatusDictValue" v-if="record.billStatus!='AUDIT_REJECT'" :state="record.billStatus == 'WAIT_OUT_WAREHOUSE'||record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
@@ -192,14 +184,13 @@
|
|
|
</template>
|
|
|
<!-- 收款icon -->
|
|
|
<template slot="financial" slot-scope="text, record">
|
|
|
- <stateIcon :title="record.financialStatusDictValue" :state="record.financialStatus == 'FINISH'?'1':'2'"></stateIcon>
|
|
|
+ <stateIcon :title="record.financialStatusDictValue" :state="record.financialStatus == 'REFUNDING'?'3':'4'"></stateIcon>
|
|
|
</template>
|
|
|
<!-- 操作按钮 -->
|
|
|
- <!-- sourceType SALES自建 CHILD_PURCHASE下级创建 DEALER_PURCHASE省仓订单 XPRH_PURCHASE货架促销 TEMPORARY_DISPATCHING数字货架 -->
|
|
|
<!-- billStatus WAIT_SUBMIT待提交 WAIT_AUDIT待审核 AUDIT_REJECT审核不通过 WAIT_OUT_WAREHOUSE待出库 FINISH已完结 SUPERIOR_CHANGE上级改单 CANCEL已取消 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
|
- :id="'onlinePayOrderList-audit-'+record.id"
|
|
|
+ :id="'salesManagementList-audit-'+record.id"
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
@@ -207,19 +198,17 @@
|
|
|
@click="handleEexamine(record)"
|
|
|
>审核</a-button>
|
|
|
<a-button
|
|
|
- :id="'onlinePayOrderList-outStock-'+record.id"
|
|
|
+ :id="'salesManagementList-outStock-'+record.id"
|
|
|
size="small"
|
|
|
type="link"
|
|
|
v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_salesStockOut')"
|
|
|
class="button-primary"
|
|
|
@click="handleSend(record)"
|
|
|
>出库</a-button>
|
|
|
- <span v-if="false">--</span>
|
|
|
+ <span v-if="record.billStatus != 'WAIT_AUDIT' && record.billStatus != 'WAIT_OUT_WAREHOUSE'">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
- <!-- 选择客户弹框 -->
|
|
|
- <choose-custom-modal :show="openModal" :distributionFlag="distributionFlag" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
|
|
|
<!-- 审核 -->
|
|
|
<auditModal :openModal="visibleAudit" :spinning="spinningAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
|
|
|
</a-card>
|
|
@@ -229,19 +218,19 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import getDate from '@/libs/getDate.js'
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
+// 组件
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-// import chooseCustomModal from './chooseCustomModal.vue'
|
|
|
import auditModal from '@/views/common/auditModal.vue'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import custList from '@/views/common/custList.vue'
|
|
|
-import { downloadExcel } from '@/libs/JGPrint.js'
|
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
import hideCellMenus from '@/views/common/hideCellMenus'
|
|
|
// 接口
|
|
|
-import { salesList, salesDel, salesWriteAudit, salesWriteStockOut, salesCount, salesExport } from '@/api/sales'
|
|
|
+import { salesList, salesWriteAudit, salesWriteStockOut, salesCount, salesExport } from '@/api/sales'
|
|
|
import moment from 'moment'
|
|
|
export default {
|
|
|
- name: 'OnlinePayOrder',
|
|
|
+ name: 'SalesList',
|
|
|
components: { STable, VSelect, rangeDate, auditModal, custList, stateIcon, hideCellMenus },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
@@ -251,17 +240,14 @@ export default {
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false, // 导出loading
|
|
|
- openModal: false, // 选择客户弹框是否显示
|
|
|
isByCustQuery: false, // 是否按客户查询
|
|
|
- showKhgx: false, // 显示客户关系
|
|
|
- showDiscount: false, // 显示折后总售价
|
|
|
- showCell: false, // 显示下拉选项
|
|
|
time: [ // 创建时间
|
|
|
getDate.getMonthDays(3).starttime,
|
|
|
getDate.getMonthDays(3).endtime
|
|
|
],
|
|
|
auditTime: [], // 审核时间
|
|
|
outWareTime: [], // 出库时间
|
|
|
+ cancelTime: [], // 取消时间
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
beginDate: getDate.getMonthDays(3).starttime, // 开始创建时间
|
|
@@ -278,9 +264,10 @@ export default {
|
|
|
settleStyleSn: undefined, // 收款方式
|
|
|
billStatus: undefined, // 业务状态
|
|
|
financialStatus: undefined, // 财务状态
|
|
|
- sourceType: undefined, // 单据来源
|
|
|
- distributionFlag: undefined, // 铺货出库
|
|
|
- buyerRelationType: undefined // 客户关系
|
|
|
+ buyerRelationType: undefined, // 客户关系
|
|
|
+ onlinePayFlag: 1, // 线上订单
|
|
|
+ cancelStartDate: undefined,
|
|
|
+ cancelEndDate: undefined
|
|
|
},
|
|
|
totalData: { // 统计数据
|
|
|
totalAmount: 0, // 总销价
|
|
@@ -288,11 +275,12 @@ export default {
|
|
|
totalQty: 0, // 总数量
|
|
|
totalRecord: 0 // 总条数
|
|
|
},
|
|
|
- selType: '0', // 0零售 1铺货
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
+ // 是否包含废弃单
|
|
|
+ this.queryParam.disuseStateList = this.isAbandonOrder ? ['CANCEL', 'AUDIT_REJECT '] : undefined
|
|
|
// 查询总计
|
|
|
salesCount(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
this.totalData = res.data
|
|
@@ -315,8 +303,8 @@ export default {
|
|
|
visibleAudit: false, // 审核弹框
|
|
|
auditInfo: null, // 审核信息
|
|
|
spinningAudit: false, // 审核操作loading
|
|
|
- distributionFlag: '0', // 是否铺货
|
|
|
- colsArr: [
|
|
|
+ isAbandonOrder: false, // 包含废弃单
|
|
|
+ colsArr: [// 需要显示的列
|
|
|
{
|
|
|
title: '客户关系',
|
|
|
key: 'buyerRelationTypeDictValue',
|
|
@@ -325,17 +313,18 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '取消时间',
|
|
|
- key: 'totalUnpushedQty',
|
|
|
+ key: 'cancelTime',
|
|
|
disabled: false,
|
|
|
checked: false
|
|
|
},
|
|
|
{
|
|
|
title: '退款时间',
|
|
|
- key: 'totalUnpushedAmount',
|
|
|
+ key: 'refundData',
|
|
|
disabled: false,
|
|
|
checked: false
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ showCell: []// 已选要显示的列
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -344,40 +333,32 @@ export default {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
|
|
|
{ title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: this.showDiscount ? '6%' : '9%', align: 'center' },
|
|
|
- { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: this.showDiscount ? '12%' : '15%', customRender: function (text) { return text || '--' } },
|
|
|
- // { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '6%', align: 'center' },
|
|
|
+ { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- // { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- // { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
{ title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '取消时间', dataIndex: 'auditDate1', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '退款时间', dataIndex: 'auditDate2', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '取消时间', dataIndex: 'cancelTime', width: '8%', align: 'center', scopedSlots: { customRender: 'cancelTime' } },
|
|
|
+ { title: '退款时间', dataIndex: 'refundData', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '审核', scopedSlots: { customRender: 'audit' }, width: '2%', align: 'center' },
|
|
|
- { title: '急件', scopedSlots: { customRender: 'oosFlag' }, width: '2%', align: 'center' },
|
|
|
- { title: '出库', scopedSlots: { customRender: 'waitOut' }, width: '2%', align: 'center' },
|
|
|
- { title: '收款', scopedSlots: { customRender: 'financial' }, width: '2%', align: 'center' },
|
|
|
- // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
+ { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
|
+ { title: '急件', scopedSlots: { customRender: 'oosFlag' }, width: '3%', align: 'center' },
|
|
|
+ { title: '出库', scopedSlots: { customRender: 'waitOut' }, width: '3%', align: 'center' },
|
|
|
+ { title: '收款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
]
|
|
|
- if (this.showKhgx) {
|
|
|
- arr.splice(4, 0, { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } })
|
|
|
- }
|
|
|
- // 显示折扣
|
|
|
- if (this.showDiscount) {
|
|
|
- const dx = this.showKhgx ? 1 : 0
|
|
|
- arr.splice(7 + dx, 0, { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- arr.splice(8 + dx, 0, { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- }
|
|
|
- return arr
|
|
|
+ return arr.filter(item => !this.showCell.includes(item.dataIndex))
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 包含废弃单
|
|
|
+ handleAbandonOrder () {
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ },
|
|
|
// 选择创建时间
|
|
|
dateChange (date) {
|
|
|
this.queryParam.beginDate = date[0]
|
|
@@ -395,6 +376,12 @@ export default {
|
|
|
this.queryParam.outWarehouseBeginDate = date[0]
|
|
|
this.queryParam.outWarehouseEndDate = date[1]
|
|
|
},
|
|
|
+ // 取消时间
|
|
|
+ cancelDateChange (date) {
|
|
|
+ this.cancelTime = date
|
|
|
+ this.queryParam.cancelStartDate = date[0]
|
|
|
+ this.queryParam.cancelEndDate = date[1]
|
|
|
+ },
|
|
|
// 选择客户
|
|
|
custChange (v, row) {
|
|
|
console.log(v, row)
|
|
@@ -406,11 +393,6 @@ export default {
|
|
|
this.queryParam.buyerSn = undefined
|
|
|
}
|
|
|
},
|
|
|
- // 打开新增弹框
|
|
|
- handleAdd (flag) {
|
|
|
- this.openModal = true
|
|
|
- this.distributionFlag = flag
|
|
|
- },
|
|
|
// 打开审核弹框
|
|
|
handleEexamine (row) {
|
|
|
this.auditInfo = row
|
|
@@ -462,40 +444,10 @@ export default {
|
|
|
handleDetail (row) {
|
|
|
this.$router.push({ name: 'onlinePayOrderDetail', params: { sn: row.salesBillSn } })
|
|
|
},
|
|
|
- // 编辑
|
|
|
- handleEdit (row) {
|
|
|
- this.$router.push({ name: 'salesNewEdit', params: { id: row.id, sn: row.salesBillSn, priceType: row.priceType } })
|
|
|
- },
|
|
|
// 选择客户成功
|
|
|
chooseCustomOk (data) {
|
|
|
this.$router.push({ name: 'salesNewAdd', params: { id: data.id, sn: data.salesBillSn, priceType: data.priceType } })
|
|
|
},
|
|
|
- // 删除
|
|
|
- handleDel (row, type) {
|
|
|
- const _this = this
|
|
|
- let content = '确认要删除吗?'
|
|
|
- if (type == 'cancel') {
|
|
|
- content = '确认要取消吗?'
|
|
|
- }
|
|
|
- this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: <div><div style='font-size:16px;margin-bottom:10px;'>{content}</div><div>销售单号:{row.salesBillNo}</div><div>客户名称:{row.buyerNameCurrent}</div></div>,
|
|
|
- centered: true,
|
|
|
- closable: true,
|
|
|
- onOk () {
|
|
|
- _this.spinning = true
|
|
|
- salesDel({ id: row.id, mainFlag: 1 }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- _this.$message.success(res.message)
|
|
|
- _this.$refs.table.refresh()
|
|
|
- _this.spinning = false
|
|
|
- } else {
|
|
|
- _this.spinning = false
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 查询列表
|
|
|
searchForm (flag) {
|
|
|
// 是否按客户查询
|
|
@@ -534,9 +486,11 @@ export default {
|
|
|
this.queryParam.outWarehouseEndDate = ''
|
|
|
this.auditTime = []
|
|
|
this.outWareTime = []
|
|
|
+ this.cancelTime = []
|
|
|
if (this.advanced) {
|
|
|
this.$refs.auditRangeDate.resetDate('')
|
|
|
this.$refs.outWareRangeDate.resetDate('')
|
|
|
+ this.$refs.cancelRangeDate.resetDate('')
|
|
|
}
|
|
|
this.queryParam.buyerNameCurrent = undefined
|
|
|
this.queryParam.buyerSn = undefined
|
|
@@ -546,9 +500,10 @@ export default {
|
|
|
this.queryParam.settleStyleSn = undefined
|
|
|
this.queryParam.billStatus = undefined
|
|
|
this.queryParam.financialStatus = undefined
|
|
|
- this.queryParam.sourceType = undefined
|
|
|
- this.queryParam.distributionFlag = undefined
|
|
|
this.queryParam.buyerRelationType = undefined
|
|
|
+ this.queryParam.cancelStartDate = undefined
|
|
|
+ this.queryParam.cancelEndDate = undefined
|
|
|
+ this.queryParam.onlinePayFlag = 1
|
|
|
|
|
|
this.$refs.custList.resetForm()
|
|
|
if (!flag) {
|
|
@@ -560,7 +515,6 @@ export default {
|
|
|
handleExport () {
|
|
|
const _this = this
|
|
|
const params = this.queryParam
|
|
|
- params.showDiscountAmountFlag = this.showDiscount ? 1 : 0
|
|
|
this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
salesExport(params).then(res => {
|
|
@@ -577,7 +531,7 @@ export default {
|
|
|
})
|
|
|
reader.readAsText(res)
|
|
|
} else {
|
|
|
- downloadExcel(res, '销售线上订单')
|
|
|
+ downloadExcel(res, '销售列表')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -601,11 +555,6 @@ export default {
|
|
|
|
|
|
// 从首页进入,判断式新建还式待办查询
|
|
|
if (isHomeNav) {
|
|
|
- // 新增
|
|
|
- if (isHomeNav.type == 'new') {
|
|
|
- this.resetSearchForm()
|
|
|
- this.openModal = true
|
|
|
- }
|
|
|
// 待办
|
|
|
if (isHomeNav.type == 'todo') {
|
|
|
this.resetData(true)
|