Commit a1e72e5292891286990b8965ddb102c226b689a6

Authored by wuxw
1 parent 0d65871c

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

src/components/resource/resourceStoreTimes.vue
... ... @@ -13,9 +13,9 @@
13 13 <el-table-column prop="stock" :label="$t('resourceStoreTimes.stock')" align="center" />
14 14 <el-table-column prop="totalPrice" :label="$t('resourceStoreTimes.totalPrice')" align="center" />
15 15 </el-table>
16   - <div style="text-align: right; margin-top: 20px;">
  16 + <!-- <div style="text-align: right; margin-top: 20px;">
17 17 <span>{{ $t('resourceStoreTimes.totalPrice') }}: {{ resourceStoreTimesInfo.totalPrice }}</span>
18   - </div>
  18 + </div> -->
19 19 </el-dialog>
20 20 </template>
21 21  
... ... @@ -49,17 +49,15 @@ export default {
49 49 },
50 50 async _loadAllResourceStoreTimes(page, rows, resCode, shId) {
51 51 try {
52   - const params = {
53   - params: {
  52 +
  53 + const { data, totalPrice } = await listResourceStoreTimes({
54 54 page: page,
55 55 row: rows,
56 56 resCode: resCode,
57 57 shId: shId
58   - }
59   - }
60   - const { data, totalPrice } = await listResourceStoreTimes(params)
  58 + })
61 59 this.resourceStoreTimesInfo.timeses = data
62   - this.resourceStoreTimesInfo.totalPrice = totalPrice.toFixed(2)
  60 + this.resourceStoreTimesInfo.totalPrice = totalPrice
63 61 } catch (error) {
64 62 this.$message.error(this.$t('common.fetchError'))
65 63 }
... ...
src/views/resource/resourceStoreManageLang.js
... ... @@ -118,6 +118,14 @@ export const messages = {
118 118 fetchTotalPriceError: 'Failed to get total price details',
119 119 storehouse: 'Storehouse',
120 120 selectType: 'Please select resource type'
  121 + },
  122 + resourceStoreTimes:{
  123 + title: 'Total Price Details',
  124 + itemCode: 'Item Code',
  125 + inboundTime: 'Inbound Time',
  126 + unitPrice: 'Unit Price',
  127 + stock: 'Stock',
  128 + totalPrice: 'Total Price',
121 129 }
122 130 },
123 131 zh: {
... ... @@ -239,6 +247,14 @@ export const messages = {
239 247 fetchTotalPriceError: '获取物品总价详情失败',
240 248 storehouse: '仓库',
241 249 selectType: '请选择物品类型'
  250 + },
  251 + resourceStoreTimes:{
  252 + title: '物品总价详情',
  253 + itemCode: '物品编码',
  254 + inboundTime: '入库时间',
  255 + unitPrice: '单价',
  256 + stock: '库存',
  257 + totalPrice: '总价',
242 258 }
243 259 }
244 260 }
245 261 \ No newline at end of file
... ...
src/views/resource/resourceStoreManageList.vue
... ... @@ -27,8 +27,8 @@
27 27 <el-col :span="4">
28 28 <el-select v-model="resourceStoreManageInfo.conditions.shId" style="width:100%">
29 29 <el-option :label="$t('resourceStoreManage.selectStorehouse')" value=""></el-option>
30   - <el-option v-for="(item, index) in resourceStoreManageInfo.storehouses" :key="index" :label="item.shName"
31   - :value="item.shId"></el-option>
  30 + <el-option v-for="(item, index) in resourceStoreManageInfo.storehouses" :key="index"
  31 + :label="item.shName" :value="item.shId"></el-option>
32 32 </el-select>
33 33 </el-col>
34 34 <el-col :span="4">
... ... @@ -46,7 +46,7 @@
46 46 :label="item.specName" :value="item.rssId"></el-option>
47 47 </el-select>
48 48 </el-col>
49   - <el-col :span="4" >
  49 + <el-col :span="4">
50 50 <el-select v-model="resourceStoreManageInfo.conditions.isFixed" style="width:100%">
51 51 <el-option :label="$t('resourceStoreManage.selectIsFixed')" value=""></el-option>
52 52 <el-option v-for="(item, index) in resourceStoreManageInfo.isFixeds" :key="index" :label="item.name"
... ... @@ -100,13 +100,15 @@
100 100 </div>
101 101 </div>
102 102 <el-table :data="resourceStoreManageInfo.resourceStores" border style="width:100%">
103   - <el-table-column prop="resId" :label="$t('resourceStoreManage.resourceId')" align="center"></el-table-column>
  103 + <el-table-column prop="resId" :label="$t('resourceStoreManage.resourceId')"
  104 + align="center"></el-table-column>
104 105 <el-table-column :label="$t('resourceStoreManage.resourceNameCode')" align="center">
105 106 <template slot-scope="scope">
106 107 {{ scope.row.resName }}({{ scope.row.resCode }})
107 108 </template>
108 109 </el-table-column>
109   - <el-table-column prop="shName" :label="$t('resourceStoreManage.storeName')" align="center"></el-table-column>
  110 + <el-table-column prop="shName" :label="$t('resourceStoreManage.storeName')"
  111 + align="center"></el-table-column>
110 112 <el-table-column :label="$t('resourceStoreManage.resourceType')" align="center">
111 113 <template slot-scope="scope">
112 114 {{ scope.row.parentRstName }}
... ... @@ -401,14 +403,14 @@ export default {
401 403 this.resourceStoreManageInfo.curType = {}
402 404 this.$refs.addResourceStoreType.open('')
403 405 return;
404   - }
405   - if(!_curType || !_curType.rstId){
  406 + }
  407 + if (!_curType || !_curType.rstId) {
406 408 this.$message.error(this.$t('resourceStoreManage.selectType'))
407 409 return;
408 410 }
409   - this.$refs.addResourceStoreType.open(_curType.rstId)
410   -
411   -
  411 + this.$refs.addResourceStoreType.open(_curType.rstId)
  412 +
  413 +
412 414 },
413 415  
414 416 openDeleteResourceStoreTypeModel() {
... ... @@ -467,9 +469,9 @@ export default {
467 469 async exportExcel() {
468 470 try {
469 471 this.resourceStoreManageInfo.conditions.pagePath = 'resourceStoreManage'
470   - const res = await exportData(this.resourceStoreManageInfo.conditions)
  472 + const res = await exportData(this.resourceStoreManageInfo.conditions)
471 473 this.$message.success(this.$t('resourceStoreManage.exportSuccess'))
472   - if(res && res.code === 0){
  474 + if (res && res.code === 0) {
473 475 window.open('/#/pages/property/downloadTempFile?tab=下载中心')
474 476 }
475 477 } catch (error) {
... ...
src/views/user/login/Login.vue
... ... @@ -44,8 +44,8 @@ export default {
44 44 logo: '',
45 45 companyName:'',
46 46 loginForm: {
47   - username: 'wuxw',
48   - passwd: 'admin',
  47 + username: '',
  48 + passwd: '',
49 49 validateCode: ''
50 50 },
51 51 captchaUrl: '',
... ...