|
@@ -58,13 +58,20 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
- <div class="table-operator">
|
|
|
|
|
|
+ <div class="table-operator" style="display:flex;align-items: center;justify-content: space-between;">
|
|
<a-button id="salesManagementList-add" type="primary" class="button-error" v-if="$hasPermissions('B_salesReturnNew')" @click="openModal = true">新增</a-button>
|
|
<a-button id="salesManagementList-add" type="primary" class="button-error" v-if="$hasPermissions('B_salesReturnNew')" @click="openModal = true">新增</a-button>
|
|
|
|
+ <div>
|
|
|
|
+ <hideCellMenus placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<!-- alert -->
|
|
<!-- alert -->
|
|
<a-alert type="info" style="margin-bottom: 10px;">
|
|
<a-alert type="info" style="margin-bottom: 10px;">
|
|
<div slot="message">
|
|
<div slot="message">
|
|
退货总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount ): '--' }}</strong>;
|
|
退货总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount ): '--' }}</strong>;
|
|
|
|
+ <span v-if="showDiscount">
|
|
|
|
+ 折扣总金额:<strong>{{ countData&&(countData.discountAmount || countData.discountAmount==0) ? toThousands(countData.discountAmount ): '--' }}</strong>;
|
|
|
|
+ 折后总金额:<strong>{{ countData&&(countData.discountedAmount || countData.discountedAmount==0) ? toThousands(countData.discountedAmount ): '--' }}</strong>;
|
|
|
|
+ </span>
|
|
总单数:<strong>{{ countData&&(countData.totalBillNumber || countData.totalBillNumber==0) ? countData.totalBillNumber : '--' }}</strong>;
|
|
总单数:<strong>{{ countData&&(countData.totalBillNumber || countData.totalBillNumber==0) ? countData.totalBillNumber : '--' }}</strong>;
|
|
总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : '--' }}</strong>;
|
|
总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : '--' }}</strong>;
|
|
总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : '--' }}</strong>;
|
|
总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : '--' }}</strong>;
|
|
@@ -137,6 +144,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
import chooseCustomModal from './chooseCustomModal.vue'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
import custList from '@/views/common/custList.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
|
|
+import hideCellMenus from '@/views/common/hideCellMenus'
|
|
import { salesReturnList, salesReturnCount, salesReturnAudit, salesReturnDel } from '@/api/salesReturn'
|
|
import { salesReturnList, salesReturnCount, salesReturnAudit, salesReturnDel } from '@/api/salesReturn'
|
|
export default {
|
|
export default {
|
|
name: 'SalesReturnList',
|
|
name: 'SalesReturnList',
|
|
@@ -146,7 +154,8 @@ export default {
|
|
chooseCustomModal,
|
|
chooseCustomModal,
|
|
rangeDate,
|
|
rangeDate,
|
|
custList,
|
|
custList,
|
|
- stateIcon
|
|
|
|
|
|
+ stateIcon,
|
|
|
|
+ hideCellMenus
|
|
},
|
|
},
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
@@ -174,24 +183,6 @@ export default {
|
|
buyerRelationType: undefined // 客户关系
|
|
buyerRelationType: undefined // 客户关系
|
|
},
|
|
},
|
|
countData: null, // 统计数据
|
|
countData: null, // 统计数据
|
|
- // 表头
|
|
|
|
- columns: [
|
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售退货单号', scopedSlots: { customRender: 'salesReturnNo' }, width: '15%', align: 'center' },
|
|
|
|
- { title: '客户名称', dataIndex: 'buyerNameCurrent', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '退款总金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '总款数', dataIndex: 'totalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '是否抓单', dataIndex: 'grabFlag', width: '6%', align: 'center', customRender: function (text) { return ['否', '是'][text] } },
|
|
|
|
- { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
|
|
- { title: '付款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
|
|
|
|
- // { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
|
|
|
|
- ],
|
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -211,7 +202,43 @@ export default {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ colsArr: [// 需要显示的列
|
|
|
|
+ {
|
|
|
|
+ title: '折后金额',
|
|
|
|
+ key: 'discount',
|
|
|
|
+ disabled: false,
|
|
|
|
+ checked: false
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ showCell: [] // 已选要显示的列
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ columns () {
|
|
|
|
+ const _this = this
|
|
|
|
+ const arr = [
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售退货单号', scopedSlots: { customRender: 'salesReturnNo' }, width: '15%', align: 'center' },
|
|
|
|
+ { title: '客户名称', dataIndex: 'buyerNameCurrent', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '客户关系', dataIndex: 'buyerRelationTypeDictValue', align: 'center', width: '9%', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '退款总金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '折扣金额', cell: 'discount', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '折后金额', cell: 'discount', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ { title: '总款数', dataIndex: 'totalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '是否抓单', dataIndex: 'grabFlag', width: '6%', align: 'center', customRender: function (text) { return ['否', '是'][text] } },
|
|
|
|
+ { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
|
|
+ { title: '付款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
|
|
|
|
+ ]
|
|
|
|
+ return arr.filter(item => !_this.showCell.includes(item.cell))
|
|
|
|
+ },
|
|
|
|
+ showDiscount () {
|
|
|
|
+ return !this.showCell.includes('discount')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|