123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485 |
- <template>
- <div class="salesDetail-wrap">
- <a-spin :spinning="spinning" tip="Loading...">
- <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
- <template slot="subTitle" v-if="!bizSn">
- <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
- </template>
- <template slot="extra">
- <a-button
- key="1"
- type="primary"
- class="button-info"
- id="salesDetail-xs-print-btn"
- v-if="$hasPermissions('B_salesPrint')"
- :disabled="localDataSource.length==0"
- @click="handlePrint('SALES_BILL')">销售打印</a-button>
- <a-button
- key="2"
- type="default"
- class="button-info"
- id="salesDetail-xsfl-print-btn"
- v-if="$hasPermissions('B_salesTypePrint')"
- :disabled="localDataSource.length==0"
- @click="handlePrint('SALES_BILL_TYPE')">销售分类打印</a-button>
- <a-divider type="vertical" />
- <a-button
- key="3"
- type="primary"
- class="button-info"
- id="salesDetail-export-btn"
- v-if="$hasPermissions('B_salesDetailExport')"
- :disabled="localDataSource.length==0"
- @click="handlePrint('export')">导出Excel</a-button>
- <a-button
- key="4"
- type="default"
- class="button-info"
- id="salesDetail-export-btn"
- v-if="$hasPermissions('B_salesTypeExport')"
- :disabled="localDataSource.length==0"
- @click="handlePrint('typeExport')">销售分类导出</a-button>
- </template>
- </a-page-header>
- <!-- 基础信息 -->
- <a-card size="small" :bordered="false" class="salesDetail-cont">
- <a-collapse :activeKey="['1']">
- <a-collapse-panel key="1" header="基础信息">
- <a-descriptions size="small" :column="3">
- <a-descriptions-item label="销售单号" :span="2">
- {{ detailData&&detailData.salesBillNo || '--' }}
- <span v-if="detailData&&detailData.salesBillNoSource">(原:{{ detailData&&detailData.salesBillNoSource || '--' }})</span>
- </a-descriptions-item>
- <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
- <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress }}</a-descriptions-item>
- <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
- <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
- <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
- <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
- <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
- <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
- <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
- </a-descriptions>
- </a-collapse-panel>
- </a-collapse>
- </a-card>
- <a-card size="small" :bordered="false" class="pages-wrap">
- <!-- alert -->
- <a-alert type="info" style="margin-bottom: 10px;">
- <div slot="message">
- <div style="display: flex;justify-content: space-between;align-items: center;">
- <div>
- 总销售数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
- 已取消数量:<strong>{{ detailData&&(detailData.totalCancelQty || detailData.totalCancelQty==0) ? detailData.totalCancelQty : '--' }}</strong>;
- 已下推数量:<strong>{{ detailData&&(detailData.totalPushedQty || detailData.totalPushedQty==0) ? detailData.totalPushedQty : '--' }}</strong>;
- 待下推数量:<strong>{{ detailData&&(detailData.totalUnpushedQty || detailData.totalUnpushedQty==0) ? detailData.totalUnpushedQty : '--' }}</strong>;
- 已发货数量:<strong>{{ detailData&&(detailData.totalDispatchQty || detailData.totalDispatchQty==0) ? detailData.totalDispatchQty : '--' }}</strong>;
- 待发货数量:<strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;<br/>
- <span v-if="$hasPermissions('B_isShowPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowCost')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowCost')">总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? detailData.grossProfit : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? detailData.totalCancelAmount : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? detailData.totalPushedAmount : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? detailData.totalUnpushedAmount : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? detailData.totalDispatchAmount : '--' }}</strong>;</span>
- <span v-if="$hasPermissions('B_isShowPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? detailData.totalUndispatchAmount : '--' }}</strong>;</span>
- <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? detailData.totalCityAmount : '--' }}</strong>;</span>
- </div>
- <div>
- <a-button v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
- <a-checkbox v-model="isCityPrice" v-if="$hasPermissions('B_isShowPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
- </div>
- </div>
- </div>
- </a-alert>
- <!-- 列表 -->
- <s-table
- class="sTable"
- ref="table"
- size="small"
- :rowKey="(record) => record.id"
- :columns="columns"
- :data="loadData"
- :defaultLoadData="false"
- :showPagination="false"
- bordered>
- <!-- 产品编码 -->
- <template slot="productCode" slot-scope="text, record">
- <div v-if="(record.promotionFlag == 1) || (Number(record.stockQty) < Number(record.unpushedQty)) && (detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesAudit'))">
- <span>{{ text }}</span>
- <a-badge count="促" :number-style="{ backgroundColor: '#f90' }" v-if="record.promotionFlag == 1"></a-badge>
- <!-- 可审核时才可显示“缺”货产品 -->
- <a-badge count="缺" v-if="(Number(record.stockQty) < Number(record.unpushedQty)) && (detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesAudit'))">
- </a-badge>
- </div>
- <span v-if="!(record.promotionFlag == 1 || ((Number(record.stockQty) < Number(record.unpushedQty)) && (detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesAudit'))))">{{ text }}</span>
- </template>
- <!-- 当前库存 -->
- <template slot="stockQty" slot-scope="text, record">
- <div v-if="record.stockQty || record.stockQty==0">
- <p style="margin: 0;" v-if="Number(record.stockQty) < Number(record.unpushedQty)">{{ record.stockQty }}(<span class="redStyle">缺{{ Number(record.unpushedQty) - Number(record.stockQty) }}</span>)</p>
- <p style="margin: 0;" v-else>{{ record.stockQty }}</p>
- </div>
- <span v-else>--</span>
- </template>
- </s-table>
- </a-card>
- </a-spin>
- <div class="affix-cont">
- <a-button
- size="large"
- style="width: 100px;"
- :disabled="spinning"
- type="primary"
- class="button-info"
- id="salesDetail-audit-btn"
- v-if="detailData&&detailData.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
- @click="handleAudit()"
- >
- 审核
- </a-button>
- <a-button
- type="default"
- :disabled="spinning"
- class="button-info"
- size="large"
- style="width: 100px;margin: 0 20px;"
- id="salesDetail-edit-btn"
- v-if="detailData&&detailData.salesBillSource != 'PURCHASE' && (detailData.billStatus == 'WAIT_SUBMIT' || detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
- @click="handleEdit()"
- >
- 编辑
- </a-button>
- <a-button
- size="large"
- style="width: 100px;margin: 0 20px;"
- :disabled="spinning"
- type="default"
- class="button-info"
- id="salesDetail-edit-btn"
- v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')"
- @click="handleEdit()"
- >
- 改单
- </a-button>
- <a-button
- size="large"
- style="width: 100px;"
- :disabled="spinning"
- type="primary"
- class="button-success"
- id="salesDetail-batchAudit-btn"
- v-if="detailData&&detailData.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
- @click="handleAudit('batch')"
- >
- 一键审核
- </a-button>
- </div>
- <!-- 打印导出 -->
- <print-modal :openModal="openModal" :itemData="detailData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
- <!-- 审核 -->
- <auditModal
- :openModal="visibleAudit"
- :content="auditText"
- :spinning="spinningAudit"
- @close="visibleAudit=false"
- @ok="auditOrder('AUDIT_PASS')"
- @fail="auditOrder('AUDIT_REJECT')" />
- <!-- 审核加下推 -->
- <dsModal ref="dsModal" title="销售单一键审核" :openModal="showDsModal" @close="showDsModal=false" @ok="handleOnceAudit" />
- <!-- 缺货明细 -->
- <stockOutDetail :openModal="showStockOut" :detailData="detailData" :salesBillSn="$route.params.sn || bizSn" @close="showStockOut=false"></stockOutDetail>
- </div>
- </template>
- <script>
- import { printFun, exportExcel } from '@/libs/JGPrint.js'
- import { commonMixin } from '@/utils/mixin'
- import moment from 'moment'
- import { STable, VSelect } from '@/components'
- import printModal from './printModal.vue'
- import auditModal from '@/views/common/auditModal.vue'
- import dsModal from '@/views/salesManagement/waitDispatch/dsModal.vue'
- import stockOutDetail from './stockOutDetailModal.vue'
- import { salesDetailBySn, salesDetailPrint, salesDetailExcel, salesDetailTypeExcel, salesWriteAudit, salesWriteAuditPush } from '@/api/sales'
- import { salesDetailAllList, salesDetailAllStockList } from '@/api/salesDetail'
- export default {
- name: 'SalesDetail',
- mixins: [commonMixin],
- components: { STable, VSelect, printModal, auditModal, dsModal, stockOutDetail },
- props: {
- bizSn: { // 有值则为弹框,无值则为页面
- type: [Number, String],
- default: ''
- }
- },
- data () {
- return {
- spinning: false,
- disabled: false,
- showDsModal: false,
- showStockOut: false,
- // 加载数据方法 必须为 Promise 对象
- loadData: parameter => {
- this.disabled = true
- const params = Object.assign(parameter, { salesBillSn: this.bizSn || this.$route.params.sn })
- let url = salesDetailAllList
- if (this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')) { // 审核,需用到库存
- url = salesDetailAllStockList
- } else { // 非审核
- url = salesDetailAllList
- }
- return url(params).then(res => {
- let data
- if (res.status == 200) {
- data = res.data
- const no = 0
- this.outStockStr = ''
- let str = ''
- for (var i = 0; i < data.length; i++) {
- data[i].no = no + i + 1
- const productCode = (data[i].productEntity && data[i].productEntity.code) || (data[i].dealerProductEntity && data[i].dealerProductEntity.code)
- const productName = (data[i].productEntity && data[i].productEntity.name) || (data[i].dealerProductEntity && data[i].dealerProductEntity.name)
- const productOrigCode = (data[i].productEntity && data[i].productEntity.origCode) || (data[i].dealerProductEntity && data[i].dealerProductEntity.origCode)
- const productOrigUnit = (data[i].productEntity && data[i].productEntity.unit) || (data[i].dealerProductEntity && data[i].dealerProductEntity.unit)
- data[i].productCode = productCode || '--'
- data[i].productName = productName || '--'
- data[i].productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
- data[i].productOrigUnit = productOrigUnit || '--'
- if (data[i].unpushedQty && (Number(data[i].stockQty) < Number(data[i].unpushedQty))) {
- str += data[i].productCode + '、'
- }
- }
- if (str.length > 0) {
- str = str.substr(0, str.length - 1)
- this.outStockStr = '产品编号为:' + str + '的产品库存不足;'
- }
- this.localDataSource = data
- this.disabled = false
- }
- return data
- })
- },
- localDataSource: [],
- openModal: false,
- detailData: null, // 详情数据
- nowType: null,
- isCityPrice: false, // 是否显示市级价
- visibleAudit: false,
- auditInfo: null,
- spinningAudit: false,
- outStockStr: '', // 缺货产品信息说明
- auditText: null,
- fromRouter: null
- }
- },
- computed: {
- shippingAddress () {
- const shippingAddrProvinceName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrProvinceName ? this.detailData.salesBillExtEntity.shippingAddrProvinceName : ''
- const shippingAddrCityName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCityName ? this.detailData.salesBillExtEntity.shippingAddrCityName : ''
- const shippingAddrCountyName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCountyName ? this.detailData.salesBillExtEntity.shippingAddrCountyName : ''
- const shippingAddr = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddr ? this.detailData.salesBillExtEntity.shippingAddr : ''
- if (!shippingAddrProvinceName && !shippingAddrCityName && !shippingAddrCountyName && !shippingAddr) {
- return '--'
- } else {
- return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
- }
- },
- columns () {
- const arr = [
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
- { title: '产品编码', dataIndex: 'productCode', width: '13%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
- { title: '产品名称', dataIndex: 'productName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
- { title: '原厂编码', dataIndex: 'productOrigCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
- // { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- // { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- // { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- // { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- { title: '单位', dataIndex: 'productOrigUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
- { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- // { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '6%', align: 'center' },
- { title: '待下推数', dataIndex: 'unpushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- { title: '已下推数', dataIndex: 'pushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- { title: '已取消数', dataIndex: 'cancelQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
- ]
- if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
- arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
- }
- if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
- const ind = this.$hasPermissions('B_isShowCost') ? 5 : 4
- arr.splice(ind, 0, { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
- if (this.isCityPrice) {
- arr.splice(ind + 1, 0, { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
- arr.splice(ind + 2, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
- } else {
- arr.splice(ind + 1, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
- }
- }
- if (this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')) { // 审核,需用到库存
- arr.splice(arr.length - 3, 0, { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '6%', align: 'center' })
- }
- return arr
- }
- },
- methods: {
- // 返回
- handleBack () {
- this.$router.push({ name: 'salesQueryList' })
- },
- // 编辑
- handleEdit () {
- const row = this.detailData
- this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
- },
- // 打开缺货明细
- openStockOut () {
- if (this.outStockStr != '') {
- this.showStockOut = true
- } else {
- this.$info({
- title: '提示',
- content: '此销售单暂无缺货产品!',
- centered: true
- })
- }
- },
- // 详情
- getDetail () {
- salesDetailBySn({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => {
- if (res.status == 200) {
- this.detailData = res.data || null
- this.$refs.table.refresh(true)
- } else {
- this.detailData = null
- }
- })
- },
- // 打开审核/一键审核弹框
- handleAudit (isBatch) {
- if (isBatch) { // 一键审核
- this.showDsModal = true
- this.$refs.dsModal.setDetail(this.detailData)
- } else {
- this.auditText = null
- this.visibleAudit = true
- }
- },
- // 一键审核
- handleOnceAudit (data) {
- const params = {
- salesBillSn: this.bizSn || this.$route.params.sn,
- billStatus: 'AUDIT_PASS',
- dispatchBill: data
- }
- this.spinningAudit = true
- this.spinning = true
- salesWriteAuditPush(params).then(res => {
- if (res.status == 200) {
- this.$message.success(res.message)
- this.spinningAudit = false
- this.spinning = false
- // 关闭详情跳列表
- this.handleBack()
- }
- })
- },
- // 审核
- auditOrder (billStatus) {
- this.spinningAudit = true
- salesWriteAudit({
- salesBillSn: this.bizSn || this.$route.params.sn,
- billStatus: billStatus
- }).then(res => {
- if (res.status == 200) {
- this.visibleAudit = false
- this.$message.success(res.message)
- this.spinningAudit = false
- if (billStatus == 'AUDIT_PASS' && !this.auditText) {
- this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.bizSn || this.$route.params.sn, dispatchBillSn: res.data.dispatchBillSn } })
- } else {
- // 关闭详情跳列表
- this.handleBack()
- }
- } else {
- this.visibleAudit = false
- this.spinningAudit = false
- }
- })
- },
- // 打印导出
- handlePrint (type) {
- const _this = this
- // 销售分类导出
- if (type == 'typeExport') {
- const params = {
- salesBillSn: this.bizSn || this.$route.params.sn,
- showCostFlag: this.$hasPermissions('B_isShowCost')
- }
- _this.spinning = true
- exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => { _this.spinning = false })
- } else {
- this.nowType = type
- this.openModal = true
- }
- },
- // 确定打印或预览
- handleOk (objs) {
- const _this = this
- const params = JSON.parse(JSON.stringify(objs))
- delete params.type
- _this.spinning = true
- if (this.nowType == 'export') { // 导出
- exportExcel(salesDetailExcel, params, '销售' + moment().format('YYYYMMDDHHmmss'), () => { _this.spinning = false })
- } else { // 打印
- const taskName = this.nowType == 'SALES_BILL' ? '销售单' : '销售分类'
- printFun(salesDetailPrint, params, objs.type, taskName, () => { _this.spinning = false })
- }
- }
- },
- mounted () {
- if (!this.$store.state.app.isNewTab || this.bizSn) { // 页签刷新时调用
- this.getDetail()
- }
- },
- activated () {
- // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
- if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
- this.getDetail()
- }
- },
- beforeRouteEnter (to, from, next) {
- next(vm => {
- vm.fromRouter = from
- })
- }
- }
- </script>
- <style lang="less">
- .salesDetail-wrap{
- position: relative;
- height: 100%;
- padding-bottom: 51px;
- box-sizing: border-box;
- >.ant-spin-nested-loading{
- overflow-y: auto;
- height: 100%;
- }
- .salesDetail-cont{
- margin-bottom: 10px;
- }
- .flexBox{
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .footer-cont{
- margin-top: 5px;
- text-align: center;
- }
- .redStyle{
- font-weight: bold;
- color: red;
- }
- }
- </style>
|