|
@@ -90,8 +90,20 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
<!-- 操作按钮 -->
|
|
|
- <div class="table-operator">
|
|
|
- <a-button id="purchaseOrderList-add" type="primary" v-if="$hasPermissions('B_purchaseNew')&&($hasPermissions('B_SUPPLIER_SJ')||$hasPermissions('B_SUPPLIER_ZB'))" class="button-error" @click="handleAdd">新增</a-button>
|
|
|
+ <div class="table-operator" style="display:flex;align-items: center;justify-content: space-between;">
|
|
|
+ <div>
|
|
|
+ <a-button id="purchaseOrderList-add" type="primary" v-if="$hasPermissions('B_purchaseNew')&&($hasPermissions('B_SUPPLIER_SJ')||$hasPermissions('B_SUPPLIER_ZB'))" class="button-error" @click="handleAdd">新增</a-button>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <a-dropdown v-model="showCell">
|
|
|
+ <a-button type="link" class="button-default" id="purchaseOrderList-showCell"> <a-icon type="setting" /> 显示</a-button>
|
|
|
+ <a-menu slot="overlay">
|
|
|
+ <a-menu-item>
|
|
|
+ <a-checkbox v-model="showOrderType" id="purchaseOrderList-orderType">订单类型</a-checkbox>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+ </a-dropdown>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- alert -->
|
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
@@ -176,7 +188,6 @@ export default {
|
|
|
components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
- const _this = this
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
@@ -206,24 +217,8 @@ export default {
|
|
|
totalQty: 0, // 总数量
|
|
|
totalAmount: 0// 总金额
|
|
|
},
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: '13%', align: 'center' },
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '供应商', dataIndex: 'purchaseTargetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '采购数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '采购金额', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '审核数量', dataIndex: 'totalPushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '审核金额', dataIndex: 'totalPushedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
- { title: '已取消数量', dataIndex: 'totalCancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '采购状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
|
- { title: '入库', scopedSlots: { customRender: 'waitOut' }, width: '3%', align: 'center' },
|
|
|
- { title: '付款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
|
|
|
- ],
|
|
|
+ showCell: false, // 是否显示自定义列
|
|
|
+ showOrderType: false, // 是否显示订单类型
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -250,6 +245,32 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const _this = this
|
|
|
+ const arr = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: '13%', align: 'center' },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '供应商', dataIndex: 'purchaseTargetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '采购数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '采购金额', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
+ { title: '审核数量', dataIndex: 'totalPushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '审核金额', dataIndex: 'totalPushedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
+ { title: '已取消数量', dataIndex: 'totalCancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '采购状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '审核', scopedSlots: { customRender: 'audit' }, width: '3%', align: 'center' },
|
|
|
+ { title: '入库', scopedSlots: { customRender: 'waitOut' }, width: '3%', align: 'center' },
|
|
|
+ { title: '付款', scopedSlots: { customRender: 'financial' }, width: '3%', align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
|
|
|
+ ]
|
|
|
+ if (this.showOrderType) {
|
|
|
+ arr.splice(4, 0, { title: '订单类型', dataIndex: 'orderTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 统计信息
|
|
|
getTotalData (params) {
|