|
@@ -13,7 +13,7 @@
|
|
id="salesDetail-xs-print-btn"
|
|
id="salesDetail-xs-print-btn"
|
|
v-if="$hasPermissions('B_salesPrint')"
|
|
v-if="$hasPermissions('B_salesPrint')"
|
|
:disabled="localDataSource.length==0"
|
|
:disabled="localDataSource.length==0"
|
|
- @click="handlePrint('SALES_BILL')">销售打印</a-button>
|
|
|
|
|
|
+ @click="handlePrint('SALES_BILL',$hasPermissions('B_salesPrint_salesPrice'))">销售打印</a-button>
|
|
<a-button
|
|
<a-button
|
|
key="2"
|
|
key="2"
|
|
type="default"
|
|
type="default"
|
|
@@ -21,7 +21,7 @@
|
|
id="salesDetail-xsfl-print-btn"
|
|
id="salesDetail-xsfl-print-btn"
|
|
v-if="$hasPermissions('B_salesTypePrint')"
|
|
v-if="$hasPermissions('B_salesTypePrint')"
|
|
:disabled="localDataSource.length==0"
|
|
:disabled="localDataSource.length==0"
|
|
- @click="handlePrint('SALES_BILL_TYPE')">销售分类打印</a-button>
|
|
|
|
|
|
+ @click="handlePrint('SALES_BILL_TYPE',$hasPermissions('B_salesTypePrint_salesPrice'))">销售分类打印</a-button>
|
|
<a-divider type="vertical" />
|
|
<a-divider type="vertical" />
|
|
<a-button
|
|
<a-button
|
|
key="3"
|
|
key="3"
|
|
@@ -30,7 +30,7 @@
|
|
id="salesDetail-export-btn"
|
|
id="salesDetail-export-btn"
|
|
v-if="$hasPermissions('B_salesDetailExport')"
|
|
v-if="$hasPermissions('B_salesDetailExport')"
|
|
:disabled="localDataSource.length==0"
|
|
:disabled="localDataSource.length==0"
|
|
- @click="handlePrint('export')">导出Excel</a-button>
|
|
|
|
|
|
+ @click="handlePrint('export',$hasPermissions('B_salesDetailExport_salesPrice'))">导出Excel</a-button>
|
|
<a-button
|
|
<a-button
|
|
key="4"
|
|
key="4"
|
|
type="default"
|
|
type="default"
|
|
@@ -38,7 +38,7 @@
|
|
id="salesDetail-export-btn"
|
|
id="salesDetail-export-btn"
|
|
v-if="$hasPermissions('B_salesTypeExport')"
|
|
v-if="$hasPermissions('B_salesTypeExport')"
|
|
:disabled="localDataSource.length==0"
|
|
:disabled="localDataSource.length==0"
|
|
- @click="handlePrint('typeExport')">销售分类导出</a-button>
|
|
|
|
|
|
+ @click="handlePrint('typeExport',$hasPermissions('B_salesTypeExport_salesPrice'))">销售分类导出</a-button>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
<!-- 基础信息 -->
|
|
<!-- 基础信息 -->
|
|
@@ -75,19 +75,19 @@
|
|
待下推数量:<strong>{{ detailData&&(detailData.totalUnpushedQty || detailData.totalUnpushedQty==0) ? detailData.totalUnpushedQty : '--' }}</strong>;
|
|
待下推数量:<strong>{{ detailData&&(detailData.totalUnpushedQty || detailData.totalUnpushedQty==0) ? detailData.totalUnpushedQty : '--' }}</strong>;
|
|
已发货数量:<strong>{{ detailData&&(detailData.totalDispatchQty || detailData.totalDispatchQty==0) ? detailData.totalDispatchQty : '--' }}</strong>;
|
|
已发货数量:<strong>{{ detailData&&(detailData.totalDispatchQty || detailData.totalDispatchQty==0) ? detailData.totalDispatchQty : '--' }}</strong>;
|
|
待发货数量:<strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;<br/>
|
|
待发货数量:<strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;<br/>
|
|
- <span v-if="$hasPermissions('B_isShowPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowCost')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowCost')">总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
|
|
|
|
- <span v-if="$hasPermissions('B_isShowPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
|
|
|
|
|
|
+ <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="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
|
|
<span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<a-button v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
|
|
<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>
|
|
|
|
|
|
+ <a-checkbox v-model="isCityPrice" v-if="$hasPermissions('B_salesDetail_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -303,19 +303,26 @@ export default {
|
|
{ title: '已下推数', dataIndex: 'pushedQty', 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 : '--') } }
|
|
{ title: '已取消数', dataIndex: 'cancelQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
]
|
|
]
|
|
- if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
|
|
|
|
|
|
+ if (this.$hasPermissions('B_salesDetail_costPrice')) { // 成本价权限
|
|
arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
}
|
|
}
|
|
- if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
|
- const ind = this.$hasPermissions('B_isShowCost') ? 5 : 4
|
|
|
|
|
|
+
|
|
|
|
+ const ind = this.$hasPermissions('B_salesDetail_costPrice') ? 5 : 4
|
|
|
|
+ if(this.$hasPermissions('B_salesDetail_provincePrice')){
|
|
arr.splice(ind, 0, { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
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.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')) { // 售价权限
|
|
arr.splice(ind + 2, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(ind + 2, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (this.$hasPermissions('B_salesDetail_salesPrice')) { // 售价权限
|
|
arr.splice(ind + 1, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
arr.splice(ind + 1, 0, { title: '销售价', dataIndex: 'price', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
if (this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')) { // 审核,需用到库存
|
|
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' })
|
|
arr.splice(arr.length - 3, 0, { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '6%', align: 'center' })
|
|
}
|
|
}
|
|
@@ -408,17 +415,19 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 打印导出
|
|
// 打印导出
|
|
- handlePrint (type) {
|
|
|
|
|
|
+ handlePrint (type,showPriceFlag) {
|
|
const _this = this
|
|
const _this = this
|
|
// 销售分类导出
|
|
// 销售分类导出
|
|
if (type == 'typeExport') {
|
|
if (type == 'typeExport') {
|
|
const params = {
|
|
const params = {
|
|
salesBillSn: this.bizSn || this.$route.params.sn,
|
|
salesBillSn: this.bizSn || this.$route.params.sn,
|
|
- showCostFlag: this.$hasPermissions('B_isShowCost')
|
|
|
|
|
|
+ showCostFlag: this.$hasPermissions('B_salesDetail_costPrice'),
|
|
|
|
+ showPriceFlag: showPriceFlag
|
|
}
|
|
}
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => { _this.spinning = false })
|
|
exportExcel(salesDetailTypeExcel, params, '销售分类' + moment().format('YYYYMMDDHHmmss'), () => { _this.spinning = false })
|
|
} else {
|
|
} else {
|
|
|
|
+ this.detailData.showPriceFlag = showPriceFlag
|
|
this.nowType = type
|
|
this.nowType = type
|
|
this.openModal = true
|
|
this.openModal = true
|
|
}
|
|
}
|