|
@@ -109,17 +109,28 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
- <div class="table-operator">
|
|
|
|
- <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
|
|
|
|
- <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
|
|
|
|
- <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
|
|
|
|
- <a-popover placement="right">
|
|
|
|
- <template slot="content">
|
|
|
|
- 使用此查询时,时间可清空,必须选择一个客户
|
|
|
|
- </template>
|
|
|
|
- <a-icon type="question-circle" />
|
|
|
|
- </a-popover>
|
|
|
|
-
|
|
|
|
|
|
+ <div class="table-operator" style="display:flex;align-items: center;justify-content: space-between;">
|
|
|
|
+ <div>
|
|
|
|
+ <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(0)">新增(零售)</a-button>
|
|
|
|
+ <a-button type="primary" class="button-warning" v-if="$hasPermissions('B_salesNews')" @click="handleAdd(1)">新增(铺货)</a-button>
|
|
|
|
+ <a-checkbox style="margin-left:10px;" v-model="isByCustQuery" id="sales-byCustQuery">按客户查询</a-checkbox>
|
|
|
|
+ <a-popover placement="right">
|
|
|
|
+ <template slot="content">
|
|
|
|
+ 使用此查询时,时间可清空,必须选择一个客户
|
|
|
|
+ </template>
|
|
|
|
+ <a-icon type="question-circle" />
|
|
|
|
+ </a-popover>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <a-dropdown v-model="showCell">
|
|
|
|
+ <a-button type="link" class="button-default"> <a-icon type="setting" /> 显示</a-button>
|
|
|
|
+ <a-menu slot="overlay">
|
|
|
|
+ <a-menu-item>
|
|
|
|
+ <a-checkbox v-model="showDiscount" id="salesQuery-edit-discount">折后总售价</a-checkbox>
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ </a-menu>
|
|
|
|
+ </a-dropdown>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<div slot="message">
|
|
<div slot="message">
|
|
@@ -253,6 +264,8 @@ export default {
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
openModal: false, // 选择客户弹框是否显示
|
|
openModal: false, // 选择客户弹框是否显示
|
|
isByCustQuery: false, // 是否按客户查询
|
|
isByCustQuery: false, // 是否按客户查询
|
|
|
|
+ showDiscount: false,
|
|
|
|
+ showCell: false,
|
|
time: [
|
|
time: [
|
|
getDate.getMonthDays(12).starttime,
|
|
getDate.getMonthDays(12).starttime,
|
|
getDate.getMonthDays(12).endtime
|
|
getDate.getMonthDays(12).endtime
|
|
@@ -285,28 +298,6 @@ export default {
|
|
totalRecord: 0
|
|
totalRecord: 0
|
|
},
|
|
},
|
|
selType: '0', // 0零售 1铺货
|
|
selType: '0', // 0零售 1铺货
|
|
- // 表头
|
|
|
|
- columns: [
|
|
|
|
- { title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
|
|
|
|
- { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '9%', align: 'center' },
|
|
|
|
- { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '审核', scopedSlots: { customRender: 'audit' }, width: '2%', align: 'center' },
|
|
|
|
- { title: '急件', scopedSlots: { customRender: 'oosFlag' }, width: '2%', align: 'center' },
|
|
|
|
- { title: '出库', scopedSlots: { customRender: 'waitOut' }, width: '2%', align: 'center' },
|
|
|
|
- { title: '收款', scopedSlots: { customRender: 'financial' }, width: '2%', align: 'center' },
|
|
|
|
- // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
|
- ],
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -337,6 +328,39 @@ export default {
|
|
distributionFlag: '0'
|
|
distributionFlag: '0'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed:{
|
|
|
|
+ columns(){
|
|
|
|
+ const _this = this
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', align: 'center', width: '4%' },
|
|
|
|
+ { title: '来源', dataIndex: 'sourceTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '9%', align: 'center' },
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerNameCurrent', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ // { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ // { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '审核', scopedSlots: { customRender: 'audit' }, width: '2%', align: 'center' },
|
|
|
|
+ { title: '急件', scopedSlots: { customRender: 'oosFlag' }, width: '2%', align: 'center' },
|
|
|
|
+ { title: '出库', scopedSlots: { customRender: 'waitOut' }, width: '2%', align: 'center' },
|
|
|
|
+ { title: '收款', scopedSlots: { customRender: 'financial' }, width: '2%', align: 'center' },
|
|
|
|
+ // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
|
+ ]
|
|
|
|
+
|
|
|
|
+ // 显示折扣
|
|
|
|
+ if (this.showDiscount) {
|
|
|
|
+ arr.splice(7, 0, { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
+ arr.splice(8, 0, { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
|
+ }
|
|
|
|
+ return arr
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 时间 change
|
|
// 时间 change
|
|
dateChange (date) {
|
|
dateChange (date) {
|
|
@@ -511,6 +535,7 @@ export default {
|
|
handleExport () {
|
|
handleExport () {
|
|
const _this = this
|
|
const _this = this
|
|
const params = this.queryParam
|
|
const params = this.queryParam
|
|
|
|
+ params.showDiscountAmountFlag = this.showDiscount ? 1 : 0
|
|
this.exportLoading = true
|
|
this.exportLoading = true
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
salesExport(params).then(res => {
|
|
salesExport(params).then(res => {
|