|
@@ -78,7 +78,7 @@
|
|
<span v-if="detailData&&detailData.sourceType&&detailData.sourceType==='XPRH_PURCHASE'"> 返券金额:<strong>{{ detailData&&(detailData.totalGiveAmount || detailData.totalGiveAmount==0) ? toThousands(detailData.totalGiveAmount) : '--' }}</strong>;</span>
|
|
<span v-if="detailData&&detailData.sourceType&&detailData.sourceType==='XPRH_PURCHASE'"> 返券金额:<strong>{{ detailData&&(detailData.totalGiveAmount || detailData.totalGiveAmount==0) ? toThousands(detailData.totalGiveAmount) : '--' }}</strong>;</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
|
|
|
|
|
|
+ <hideCellMenus placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
@@ -138,12 +138,13 @@ import { hdPrint } from '@/libs/JGPrint'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import outInDetialModal from './outInDetialModal.vue'
|
|
import outInDetialModal from './outInDetialModal.vue'
|
|
import PrintPanel from '@/views/common/printPanel.vue'
|
|
import PrintPanel from '@/views/common/printPanel.vue'
|
|
|
|
+import hideCellMenus from '@/views/common/hideCellMenus'
|
|
// 接口
|
|
// 接口
|
|
import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
|
|
import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
|
|
import { salesDetailList } from '@/api/salesDetail'
|
|
import { salesDetailList } from '@/api/salesDetail'
|
|
export default {
|
|
export default {
|
|
name: 'SalesDetail',
|
|
name: 'SalesDetail',
|
|
- components: { STable, VSelect, PrintPanel, outInDetialModal },
|
|
|
|
|
|
+ components: { STable, VSelect, PrintPanel, outInDetialModal, hideCellMenus },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
props: {
|
|
props: {
|
|
outBizSn: { // 有值则为弹框,无值则为页面
|
|
outBizSn: { // 有值则为弹框,无值则为页面
|
|
@@ -194,7 +195,22 @@ export default {
|
|
},
|
|
},
|
|
localDataSource: [], // 原始列表数据
|
|
localDataSource: [], // 原始列表数据
|
|
detailData: null, // 详情数据
|
|
detailData: null, // 详情数据
|
|
- isShowBisiceInfo: false// 显示基础内容
|
|
|
|
|
|
+ isShowBisiceInfo: false, // 显示基础内容
|
|
|
|
+ colsArr: [
|
|
|
|
+ {
|
|
|
|
+ title: '成本价',
|
|
|
|
+ key: 'totalCost',
|
|
|
|
+ disabled: false,
|
|
|
|
+ checked: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '返券金额',
|
|
|
|
+ key: 'giveAmount',
|
|
|
|
+ disabled: !(this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE'),
|
|
|
|
+ checked: false
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ showCell: []// 已选要显示的列
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -220,15 +236,10 @@ export default {
|
|
{ title: '单位', dataIndex: 'productOrigUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productOrigUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后小计', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '折后小计', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
- { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
|
|
|
|
+ { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额 <a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
]
|
|
]
|
|
- // 实际总成本
|
|
|
|
- if (this.showCost) {
|
|
|
|
- arr.push({ slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- }
|
|
|
|
- if (this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE') {
|
|
|
|
- arr.push({ title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额 <a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
- }
|
|
|
|
// 下级创建,不显示仓库仓位
|
|
// 下级创建,不显示仓库仓位
|
|
if (!this.isOwerEdit) {
|
|
if (!this.isOwerEdit) {
|
|
arr.push({ title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
arr.push({ title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
@@ -238,7 +249,7 @@ export default {
|
|
}
|
|
}
|
|
arr.push({ title: '是否急件', dataIndex: 'oosFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
arr.push({ title: '是否急件', dataIndex: 'oosFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' })
|
|
arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' })
|
|
- return arr
|
|
|
|
|
|
+ return arr.filter(item => !_this.showCell.includes(item.dataIndex))
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|