|
@@ -56,7 +56,7 @@
|
|
|
<!-- 购物车 -->
|
|
|
<shopingCatModal :showModal="openShopCatModal" :paramsData="paramsData" @close="openShopCatModal=false" @ok="getOrderDetail(false, true)"></shopingCatModal>
|
|
|
<!-- 已选产品 -->
|
|
|
- <div>
|
|
|
+ <div id="purchaseTable">
|
|
|
<div class="chooseBox-title">
|
|
|
<div class="sub-title" style="display: flex;">
|
|
|
已选产品
|
|
@@ -99,10 +99,11 @@
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<ve-table
|
|
|
- class="sTable"
|
|
|
border-y
|
|
|
- ref="purchaseTable"
|
|
|
+ border-around
|
|
|
:max-height="tableHeight"
|
|
|
+ :row-style-option="{clickHighlight: true}"
|
|
|
+ :cellSelectionOption="{enable: false}"
|
|
|
:virtual-scroll-option="{enable: true}"
|
|
|
:columns="chooseColumns"
|
|
|
:table-data="localDataSource"
|
|
@@ -234,6 +235,7 @@ export default {
|
|
|
productCode: '',
|
|
|
orderBy: 'purchase_bill_detail.CREATE_DATE desc'
|
|
|
},
|
|
|
+ loadingInstance: null,
|
|
|
purchaseDisabled: false, // 查询、重置按钮是否可操作
|
|
|
localDataSource: [],
|
|
|
openGuideModal: false, // 导入产品引导
|
|
@@ -249,22 +251,22 @@ export default {
|
|
|
chooseColumns () {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
|
- { title: '序号', key: "a", field: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '产品编码',key: "b", field: 'productCode', width: '20%', align: 'center'},
|
|
|
- { title: '产品名称',key: "c", field: 'productName', width: '35%', align: 'center', ellipsis: true },
|
|
|
- { title: '采购数量',key: "d", width: '8%', align: 'center',
|
|
|
+ { title: '序号', key: "a", field: 'no', width: '5%', align: 'center', operationColumn: false },
|
|
|
+ { title: '产品编码',key: "b", field: 'productCode', width: '20%', align: 'center', operationColumn: false},
|
|
|
+ { title: '产品名称',key: "c", field: 'productName', width: '35%', align: 'center', operationColumn: false,ellipsis: {showTitle: true} },
|
|
|
+ { title: '采购数量',key: "d", width: '8%', align: 'center', operationColumn: false,
|
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
|
return <qtyComp row={row} column={column} rowIndex={rowIndex} that={_this} />
|
|
|
}},
|
|
|
- { title: '单位',key: "e", field: 'productUnit', width: '8%', align: 'center' },
|
|
|
- { title: '操作',key: "f", width: '8%', align: 'center',
|
|
|
+ { title: '单位',key: "e", field: 'productUnit', width: '8%', align: 'center', operationColumn: false },
|
|
|
+ { title: '操作',key: "f", width: '8%', align: 'center', operationColumn: false,
|
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
|
return <actionComp row={row} column={column} rowIndex={rowIndex} that={_this} />
|
|
|
}}
|
|
|
]
|
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
|
- arr.splice(3, 0, { title: '采购单价',key: "h", field: 'discountedPrice', width: '8%', align: 'right'})
|
|
|
- arr.splice(6, 0, { title: '采购金额',key: "i", field: 'discountedAmount', width: '8%', align: 'right'})
|
|
|
+ arr.splice(3, 0, { title: '采购单价',key: "h", field: 'discountedPrice', width: '8%', align: 'right', operationColumn: false})
|
|
|
+ arr.splice(6, 0, { title: '采购金额',key: "i", field: 'discountedAmount', width: '8%', align: 'right', operationColumn: false})
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -273,6 +275,7 @@ export default {
|
|
|
getTableData(){
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
+ this.loadingInstance.show()
|
|
|
// 查询总计
|
|
|
const params = Object.assign({ pageNo: 1, pageSize: 10000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
|
|
|
purchaseDetailList(params).then(res => {
|
|
@@ -291,6 +294,7 @@ export default {
|
|
|
this.localDataSource = data.list
|
|
|
this.disabled = false
|
|
|
this.spinning = false
|
|
|
+ this.loadingInstance.close()
|
|
|
})
|
|
|
},
|
|
|
// 获取采购单基本信息
|
|
@@ -490,6 +494,12 @@ export default {
|
|
|
pageInit () {
|
|
|
this.$nextTick(() => {
|
|
|
this.setTableH()
|
|
|
+ this.loadingInstance = this.$veLoading({
|
|
|
+ target: document.querySelector("#purchaseTable"),
|
|
|
+ name: "pulse",
|
|
|
+ lock: true,
|
|
|
+ fullscreen: false
|
|
|
+ });
|
|
|
this.getOrderDetail(false, true)
|
|
|
})
|
|
|
}
|
|
@@ -512,6 +522,9 @@ export default {
|
|
|
this.pageInit()
|
|
|
}
|
|
|
},
|
|
|
+ destroyed() {
|
|
|
+ this.loadingInstance.destroy();
|
|
|
+ },
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {})
|
|
|
}
|