v1.9 优化采购查询物品总价bug

This commit is contained in:
wuxw 2025-08-20 15:08:47 +08:00
parent 0d65871cd9
commit a1e72e5292
4 changed files with 38 additions and 22 deletions

View File

@ -13,9 +13,9 @@
<el-table-column prop="stock" :label="$t('resourceStoreTimes.stock')" align="center" />
<el-table-column prop="totalPrice" :label="$t('resourceStoreTimes.totalPrice')" align="center" />
</el-table>
<div style="text-align: right; margin-top: 20px;">
<!-- <div style="text-align: right; margin-top: 20px;">
<span>{{ $t('resourceStoreTimes.totalPrice') }}: {{ resourceStoreTimesInfo.totalPrice }}</span>
</div>
</div> -->
</el-dialog>
</template>
@ -49,17 +49,15 @@ export default {
},
async _loadAllResourceStoreTimes(page, rows, resCode, shId) {
try {
const params = {
params: {
const { data, totalPrice } = await listResourceStoreTimes({
page: page,
row: rows,
resCode: resCode,
shId: shId
}
}
const { data, totalPrice } = await listResourceStoreTimes(params)
})
this.resourceStoreTimesInfo.timeses = data
this.resourceStoreTimesInfo.totalPrice = totalPrice.toFixed(2)
this.resourceStoreTimesInfo.totalPrice = totalPrice
} catch (error) {
this.$message.error(this.$t('common.fetchError'))
}

View File

@ -118,6 +118,14 @@ export const messages = {
fetchTotalPriceError: 'Failed to get total price details',
storehouse: 'Storehouse',
selectType: 'Please select resource type'
},
resourceStoreTimes:{
title: 'Total Price Details',
itemCode: 'Item Code',
inboundTime: 'Inbound Time',
unitPrice: 'Unit Price',
stock: 'Stock',
totalPrice: 'Total Price',
}
},
zh: {
@ -239,6 +247,14 @@ export const messages = {
fetchTotalPriceError: '获取物品总价详情失败',
storehouse: '仓库',
selectType: '请选择物品类型'
},
resourceStoreTimes:{
title: '物品总价详情',
itemCode: '物品编码',
inboundTime: '入库时间',
unitPrice: '单价',
stock: '库存',
totalPrice: '总价',
}
}
}

View File

@ -27,8 +27,8 @@
<el-col :span="4">
<el-select v-model="resourceStoreManageInfo.conditions.shId" style="width:100%">
<el-option :label="$t('resourceStoreManage.selectStorehouse')" value=""></el-option>
<el-option v-for="(item, index) in resourceStoreManageInfo.storehouses" :key="index" :label="item.shName"
:value="item.shId"></el-option>
<el-option v-for="(item, index) in resourceStoreManageInfo.storehouses" :key="index"
:label="item.shName" :value="item.shId"></el-option>
</el-select>
</el-col>
<el-col :span="4">
@ -46,7 +46,7 @@
:label="item.specName" :value="item.rssId"></el-option>
</el-select>
</el-col>
<el-col :span="4" >
<el-col :span="4">
<el-select v-model="resourceStoreManageInfo.conditions.isFixed" style="width:100%">
<el-option :label="$t('resourceStoreManage.selectIsFixed')" value=""></el-option>
<el-option v-for="(item, index) in resourceStoreManageInfo.isFixeds" :key="index" :label="item.name"
@ -100,13 +100,15 @@
</div>
</div>
<el-table :data="resourceStoreManageInfo.resourceStores" border style="width:100%">
<el-table-column prop="resId" :label="$t('resourceStoreManage.resourceId')" align="center"></el-table-column>
<el-table-column prop="resId" :label="$t('resourceStoreManage.resourceId')"
align="center"></el-table-column>
<el-table-column :label="$t('resourceStoreManage.resourceNameCode')" align="center">
<template slot-scope="scope">
{{ scope.row.resName }}({{ scope.row.resCode }})
</template>
</el-table-column>
<el-table-column prop="shName" :label="$t('resourceStoreManage.storeName')" align="center"></el-table-column>
<el-table-column prop="shName" :label="$t('resourceStoreManage.storeName')"
align="center"></el-table-column>
<el-table-column :label="$t('resourceStoreManage.resourceType')" align="center">
<template slot-scope="scope">
{{ scope.row.parentRstName }}
@ -401,14 +403,14 @@ export default {
this.resourceStoreManageInfo.curType = {}
this.$refs.addResourceStoreType.open('')
return;
}
if(!_curType || !_curType.rstId){
}
if (!_curType || !_curType.rstId) {
this.$message.error(this.$t('resourceStoreManage.selectType'))
return;
}
this.$refs.addResourceStoreType.open(_curType.rstId)
this.$refs.addResourceStoreType.open(_curType.rstId)
},
openDeleteResourceStoreTypeModel() {
@ -467,9 +469,9 @@ export default {
async exportExcel() {
try {
this.resourceStoreManageInfo.conditions.pagePath = 'resourceStoreManage'
const res = await exportData(this.resourceStoreManageInfo.conditions)
const res = await exportData(this.resourceStoreManageInfo.conditions)
this.$message.success(this.$t('resourceStoreManage.exportSuccess'))
if(res && res.code === 0){
if (res && res.code === 0) {
window.open('/#/pages/property/downloadTempFile?tab=下载中心')
}
} catch (error) {

View File

@ -44,8 +44,8 @@ export default {
logo: '',
companyName:'',
loginForm: {
username: 'wuxw',
passwd: 'admin',
username: '',
passwd: '',
validateCode: ''
},
captchaUrl: '',