|
@@ -0,0 +1,223 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="salesDetail-wrap">
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont" style="padding:16px 24px;">
|
|
|
|
+ <template slot="subTitle">
|
|
|
|
+ <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
|
|
|
|
+ <span style="margin: 0 10px 0 20px;color: #666;font-size: 14px;font-weight: 600;">促销名称:{{ detailData&&detailData.salesReturnNo||'--' }}</span>
|
|
|
|
+ <a-button type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo">
|
|
|
|
+ <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/> {{ isShowBisiceInfo?'隐藏':'查看' }}信息
|
|
|
|
+ </a-button>
|
|
|
|
+ </template>
|
|
|
|
+ </a-page-header>
|
|
|
|
+ <!-- 基础信息 -->
|
|
|
|
+ <a-card size="small" title="基础信息" :bordered="false" v-show="!isShowBisiceInfo" class="salesDetail-cont">
|
|
|
|
+ <a-descriptions size="small" :column="3" v-if="detailData">
|
|
|
|
+ <a-descriptions-item label="促销名称">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="促销时间">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item :span="2" label="促销品费用归属品牌">{{ detailData.createDate || '--' }}all是积分兑换更好地给好的坤哥电饭锅快递费给对方看个房<span class="link-bule btn-box" @click="handleSeeDetail('brand')">详情</span></a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="费用所属部门">{{ detailData.buyerName || '--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="参与客户">{{ detailData.buyerName || '--' }}<span class="link-bule btn-box" @click="handleSee">查看</span></a-descriptions-item>
|
|
|
|
+ <a-descriptions-item :span="2" label="促销品费用归属品类">{{ detailData.buyerName || '--' }}<span class="link-bule btn-box" @click="handleSeeDetail('category')">详情</span></a-descriptions-item>
|
|
|
|
+
|
|
|
|
+ <a-descriptions-item label="促销描述" :span="3">
|
|
|
|
+ <div class="flex">
|
|
|
|
+ <div>{{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrProvinceName || '' }}</div>
|
|
|
|
+ <span class="link-bule btn-box">查看全部</span>
|
|
|
|
+ </div>
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="附件"><a class="link-bule" target="downloadFile" download>{{ detailData.billStatusDictValue || '--' }}</a></a-descriptions-item>
|
|
|
|
+ </a-descriptions>
|
|
|
|
+ </a-card>
|
|
|
|
+ <a-card size="small" title="规则设置" :bordered="false" class="pages-wrap">
|
|
|
|
+ <div class="btnGroup" v-if="$route.params.type=='rule'">
|
|
|
|
+ <a-button type="primary" class="button-warning" @click="handleProduct" :disabled="disabled">买产品送产品</a-button>
|
|
|
|
+ <a-button style="margin:0 10px" type="primary" class="button-warn" @click="handleAmount" :disabled="disabled">买产品送采购额</a-button>
|
|
|
|
+ <a-button type="primary" @click="handleSpecialProduct" :disabled="disabled">特价产品</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <s-table
|
|
|
|
+ class="sTable"
|
|
|
|
+ ref="table"
|
|
|
|
+ size="small"
|
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ :scroll="{ y: 500 }"
|
|
|
|
+ :defaultLoadData="false"
|
|
|
|
+ bordered>
|
|
|
|
+ <!-- 产品编码 -->
|
|
|
|
+ <template slot="productCode" slot-scope="text, record">
|
|
|
|
+ <a-badge count="促" v-if="record.promotionFlag == 1">
|
|
|
|
+ <div style="padding-right: 15px;">{{ text }}</div>
|
|
|
|
+ </a-badge>
|
|
|
|
+ <span v-else>{{ text }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 操作 -->
|
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="$route.params.type=='rule'"
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ @click="handleDetail(record)"
|
|
|
|
+ class="button-info"
|
|
|
|
+ id="promotionList-edit-btn">编辑</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="$route.params.type=='rule'"
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ @click="handleDel(record)"
|
|
|
|
+ class="button-error"
|
|
|
|
+ id="promotionList-del-btn">删除</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ v-if="!$route.params.type"
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ @click="handleDetail(record)"
|
|
|
|
+ class="button-info"
|
|
|
|
+ id="promotionList-edit-btn">详情</a-button>
|
|
|
|
+ </template>
|
|
|
|
+ </s-table>
|
|
|
|
+ </a-card>
|
|
|
|
+ </a-spin>
|
|
|
|
+ <!-- 查看参与客户 -->
|
|
|
|
+ <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
|
|
|
|
+ <!-- 促销品费用归属品牌/促销品费用归属品类 -->
|
|
|
|
+ <brandCategoryModal :openType="openType" :openModal="openModal" @close="openModal = false"></brandCategoryModal>
|
|
|
|
+ <!-- 详情 -->
|
|
|
|
+ <detailModal :openModal="openDetailModal" @close="openDetailModal = false"></detailModal>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import { STable } from '@/components'
|
|
|
|
+import lookUpCustomersModal from '../promotionManagement/lookUpCustomersModal'
|
|
|
|
+import brandCategoryModal from './brandCategoryModal'
|
|
|
|
+import detailModal from './detailModal'
|
|
|
|
+import { queryPageForWarehouseDetail, salesDetailBySn } from '@/api/sales'
|
|
|
|
+export default {
|
|
|
|
+ name: 'SalesOrderWarehouseDetail',
|
|
|
|
+ mixins: [commonMixin],
|
|
|
|
+ components: { STable, lookUpCustomersModal, brandCategoryModal, detailModal },
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ disabled: false,
|
|
|
|
+ spinning: false,
|
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
|
+ loadData: parameter => {
|
|
|
|
+ this.disabled = true
|
|
|
|
+ const dataAjax = Object.assign(parameter, { salesBillSn: '559837590779535360', warehouseSn: '527851347359506432' })
|
|
|
|
+ return queryPageForWarehouseDetail(dataAjax).then(res => {
|
|
|
|
+ let data
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ data = res.data
|
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
|
+ }
|
|
|
|
+ this.disabled = false
|
|
|
|
+ }
|
|
|
|
+ return data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ detailData: null, // 详情数据
|
|
|
|
+ countData: null, // 数量数据
|
|
|
|
+ fromRouter: null,
|
|
|
|
+ openModal: false,
|
|
|
|
+ isShowBisiceInfo: false,
|
|
|
|
+ openCustomerModal: false,
|
|
|
|
+ openType: undefined,
|
|
|
|
+ openDetailModal: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ columns () {
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
|
|
+ { title: '促销类型', dataIndex: 'productEntity.unit', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '规则门槛', dataIndex: 'productEntity.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '规则', dataIndex: 'productEntity.origCode', width: '28%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '订单起订金额', dataIndex: 'productCode', width: '15%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
|
|
|
|
+ { title: '订单经费上限', dataIndex: 'qty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
|
|
+ ]
|
|
|
|
+ return arr
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // 查看详情
|
|
|
|
+ handleDetail (con) {
|
|
|
|
+ this.openDetailModal = true
|
|
|
|
+ },
|
|
|
|
+ // 返回
|
|
|
|
+ handleBack () {
|
|
|
|
+ this.$router.push({ name: 'dealerPromotionManagement' })
|
|
|
|
+ },
|
|
|
|
+ // 详情
|
|
|
|
+ getDetail () {
|
|
|
|
+ salesDetailBySn({ salesBillSn: '559837590779535360' }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ this.detailData = res.data || null
|
|
|
|
+ } else {
|
|
|
|
+ this.detailData = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 基础信息 详情弹窗
|
|
|
|
+ handleSeeDetail (name) {
|
|
|
|
+ this.openType = name
|
|
|
|
+ this.openModal = true
|
|
|
|
+ },
|
|
|
|
+ // 买产品送产品
|
|
|
|
+ handleProduct () {},
|
|
|
|
+ // 买产品送采购额
|
|
|
|
+ handleAmount () {},
|
|
|
|
+ // 特价产品
|
|
|
|
+ handleSpecialProduct () {},
|
|
|
|
+ // 查看客户
|
|
|
|
+ handleSee () {
|
|
|
|
+ this.openCustomerModal = true
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted () {
|
|
|
|
+ if (!this.$store.state.app.isNewTab || this.outBizSubSn || 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" scoped>
|
|
|
|
+ .salesDetail-wrap{
|
|
|
|
+ .salesDetail-cont{
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ }
|
|
|
|
+ .btnGroup{
|
|
|
|
+ margin-bottom:15px;
|
|
|
|
+ }
|
|
|
|
+ .flex{
|
|
|
|
+ display:flex;
|
|
|
|
+ align-item:center;
|
|
|
|
+ }
|
|
|
|
+ .btn-box{
|
|
|
|
+ margin-left:5px;
|
|
|
|
+ }
|
|
|
|
+ .footer-cont{
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|