|
@@ -75,19 +75,19 @@
|
|
|
待下推数量:<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_salesDetail_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_costPrice')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_costPrice')">总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_salesPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_salesPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_salesPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
|
|
|
- <span v-if="$hasPermissions('B_salesDetail_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_costPrice')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_costPrice')">总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_salesPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_salesPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_salesPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
|
|
|
+ <span v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
|
|
|
<span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(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_salesDetail_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
|
|
|
+ <a-checkbox v-model="isCityPrice" v-if="$hasPermissions(authCode + '_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -219,6 +219,7 @@ export default {
|
|
|
disabled: false,
|
|
|
showDsModal: false,
|
|
|
showStockOut: false,
|
|
|
+ authCode: '',
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -303,22 +304,22 @@ export default {
|
|
|
{ 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_salesDetail_costPrice')) { // 成本价权限
|
|
|
+ if (this.$hasPermissions(this.authCode + '_costPrice')) { // 成本价权限
|
|
|
arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
}
|
|
|
|
|
|
- const ind = this.$hasPermissions('B_salesDetail_costPrice') ? 5 : 4
|
|
|
- if(this.$hasPermissions('B_salesDetail_provincePrice')){
|
|
|
+ const ind = this.$hasPermissions(this.authCode + '_costPrice') ? 5 : 4
|
|
|
+ if(this.$hasPermissions(this.authCode + '_provincePrice')){
|
|
|
arr.splice(ind, 0, { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
}
|
|
|
// 是否勾选市级价格
|
|
|
if (this.isCityPrice) {
|
|
|
arr.splice(ind + 1, 0, { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
- if (this.$hasPermissions('B_salesDetail_salesPrice')) { // 售价权限
|
|
|
+ if (this.$hasPermissions(this.authCode + '_salesPrice')) { // 售价权限
|
|
|
arr.splice(ind + 2, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
}
|
|
|
} else {
|
|
|
- if (this.$hasPermissions('B_salesDetail_salesPrice')) { // 售价权限
|
|
|
+ if (this.$hasPermissions(this.authCode + '_salesPrice')) { // 售价权限
|
|
|
arr.splice(ind + 1, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
}
|
|
|
}
|
|
@@ -421,8 +422,7 @@ export default {
|
|
|
// 销售分类导出
|
|
|
if (type == 'typeExport') {
|
|
|
const params = {
|
|
|
- salesBillSn: this.bizSn || this.$route.params.sn,
|
|
|
- showCostFlag: this.$hasPermissions('B_salesDetail_costPrice')
|
|
|
+ salesBillSn: this.bizSn || this.$route.params.sn
|
|
|
}
|
|
|
_this.spinning = true
|
|
|
exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => {
|
|
@@ -470,6 +470,7 @@ export default {
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.fromRouter = from
|
|
|
+ vm.authCode = to.meta.permission
|
|
|
})
|
|
|
}
|
|
|
}
|