|
@@ -6,8 +6,8 @@
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
<a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
|
- <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ productTotal&&productTotal.sparePartsNo }}</span>
|
|
|
- <span style="margin: 0 10px;color: #666;">供应商:{{ productTotal&&productTotal.supplierName }}</span>
|
|
|
+ <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ basicInfoData&&basicInfoData.sparePartsNo }}</span>
|
|
|
+ <span style="margin: 0 10px;color: #666;">供应商:{{ basicInfoData&&basicInfoData.supplierName }}</span>
|
|
|
<a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
|
|
|
<a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
|
|
|
</a-button>
|
|
@@ -15,13 +15,13 @@
|
|
|
</a-page-header>
|
|
|
<!-- 基础信息 -->
|
|
|
<a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont" v-show="showDetail">
|
|
|
- <div v-if="productTotal" ref="detailBar">
|
|
|
- <a-descriptions :column="2">
|
|
|
- <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
|
|
|
- <a-descriptions-item label="入库仓库">{{ (productTotal&&productTotal.warehouseName) || '--' }}</a-descriptions-item>
|
|
|
- </a-descriptions>
|
|
|
+ <div v-if="basicInfoData" ref="detailBar">
|
|
|
+ <a-descriptions :column="2">
|
|
|
+ <a-descriptions-item label="入库单号">{{ (basicInfoData&&basicInfoData.sparePartsNo) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入库类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入库仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
</div>
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
@@ -56,9 +56,9 @@
|
|
|
<!-- 总计 -->
|
|
|
<a-alert type="info" v-if="productTotal">
|
|
|
<div slot="message">
|
|
|
- 入库数量 <strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong> ,
|
|
|
+ 入库数量 <strong>{{ (productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0)) ? productTotal.productTotalQty : '--' }}</strong> ,
|
|
|
<span v-if="$hasPermissions('B_sparePartsEdit_costPrice')">
|
|
|
- 入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? toThousands(productTotal.totalPrice) : '--' }}</strong>
|
|
|
+ 入库金额 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? toThousands(productTotal.productTotalCost) : '--' }}</strong>
|
|
|
</span>
|
|
|
</div>
|
|
|
</a-alert>
|
|
@@ -122,6 +122,7 @@ import { getOperationalPrecision } from '@/libs/tools.js'
|
|
|
import sparePartsProductModal from './productModal.vue'
|
|
|
import ImportGuideModal from './importGuideModal.vue'
|
|
|
import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail, sparePartsDetailBatchInsert } from '@/api/spareParts'
|
|
|
+import { queryDetailCount } from '@/api/purchase'
|
|
|
export default {
|
|
|
name: 'BulkWarehousingOrderEdit',
|
|
|
mixins: [commonMixin],
|
|
@@ -148,15 +149,16 @@ export default {
|
|
|
data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
|
|
|
}
|
|
|
this.getDetailCount(Object.assign(parameter, { sparePartsSn: this.$route.params.sn }))
|
|
|
+ this.getBasicInfoData()
|
|
|
}
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
openModal: false, // 选择基本信息弹框是否显示
|
|
|
- basicInfoData: null, // 基本信息
|
|
|
+ basicInfoData: null, // 基础信息
|
|
|
productTotal: null, // 合计
|
|
|
itemSn: '',
|
|
|
- openGuideModal: false ,// 导入产品引导
|
|
|
+ openGuideModal: false, // 导入产品引导
|
|
|
tableHeight: 0
|
|
|
}
|
|
|
},
|
|
@@ -172,13 +174,13 @@ export default {
|
|
|
]
|
|
|
if (this.$hasPermissions('B_sparePartsEdit_costPrice')) { // 成本价权限
|
|
|
arr.splice(5, 0, { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
- arr.splice(6,0,{ title: '小计', dataIndex: 'subtotal', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
+ arr.splice(6, 0, { title: '小计', dataIndex: 'subtotal', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- showDetail(newValue, oldValue){
|
|
|
+ showDetail (newValue, oldValue) {
|
|
|
this.setTableH()
|
|
|
},
|
|
|
'$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
@@ -195,7 +197,7 @@ export default {
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
const toolsBarH = this.$refs.toolsBar.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - toolsBarH - 282
|
|
|
- if(this.showDetail){
|
|
|
+ if (this.showDetail) {
|
|
|
this.tableHeight = this.tableHeight - this.$refs.detailBar.offsetHeight - 30
|
|
|
}
|
|
|
})
|
|
@@ -246,7 +248,7 @@ export default {
|
|
|
handleBack () {
|
|
|
this.$router.push({ path: '/purchasingManagement/bulkWarehousingOrder/list', query: { closeLastOldTab: true } })
|
|
|
},
|
|
|
- // 合计
|
|
|
+ // 获取统计数据
|
|
|
getDetailCount (params) {
|
|
|
sparePartsPageCount(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
@@ -256,6 +258,16 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 获取基础信息数据
|
|
|
+ getBasicInfoData () {
|
|
|
+ queryDetailCount({ sn: this.$route.params.sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.basicInfoData = res.data
|
|
|
+ } else {
|
|
|
+ this.basicInfoData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
pageInit () {
|
|
|
this.productTotal = null
|
|
|
this.openModal = false
|