Merge pull request '更新' (#15) from zyj into master

Reviewed-on: #15
pull/17/head^2
zhangyouji 2 years ago
commit a86a2bb5f1
  1. 5
      src/api/refineryAccount/accountDetails.js
  2. 39
      src/views/refineryAccount/accountDetails/index.vue

@ -12,6 +12,10 @@ const getLikeRefineryAccount = (params = {}) => {
return request.postJson('/oil-refinery/xoilRefineryAccountRecord/getLikeRefineryAccount', params) return request.postJson('/oil-refinery/xoilRefineryAccountRecord/getLikeRefineryAccount', params)
} }
// 详情 // 详情
const searchInfo = query => {
return request.get(`/oil-user/sysCustomerInfo/searchInfo/${query}`)
}
// 详情
const getById = query => { const getById = query => {
return request.get(`oil-refinery/xoilRefineryAccountRecord/getById/${query}`) return request.get(`oil-refinery/xoilRefineryAccountRecord/getById/${query}`)
} }
@ -20,5 +24,6 @@ export default {
getByPage, getByPage,
getLikeByName, getLikeByName,
getLikeRefineryAccount, getLikeRefineryAccount,
searchInfo,
getById getById
} }

@ -3,10 +3,20 @@
<div class="frame"> <div class="frame">
<autocomplete class="mr20" :params="parameter.params" :config="configAutocomplete" /> <autocomplete class="mr20" :params="parameter.params" :config="configAutocomplete" />
<autocomplete class="mr20" :params="parameter.params" :config="configAutocompleteaccount" /> <autocomplete class="mr20" :params="parameter.params" :config="configAutocompleteaccount" />
<el-select v-model="parameter.params.refineryType" placeholder="炼厂类型" clearable> <el-select
<el-option v-for="item in refineryTypeEnum" :key="item.value" :label="item.label" :value="item.value"> </el-option> v-model="parameter.params.createUser"
filterable
remote
reserve-keyword
clearable
placeholder="请输入姓名/手机号码"
:remote-method="searchUserInfo"
>
<el-option v-for="item in sysCustomerList" :key="item.id" :label="item.userName" :value="item.id">
{{ item.phone }} ( {{ item.userName }} - {{ item.userCode }})
</el-option>
</el-select> </el-select>
<el-input v-model="parameter.params.creater" placeholder="创建人姓名或手机号" clearable></el-input> <!-- <el-input v-model="parameter.params.creater" placeholder="创建人姓名或手机号" clearable></el-input> -->
<el-select v-model="parameter.params.transactionType" placeholder="交易类型" clearable> <el-select v-model="parameter.params.transactionType" placeholder="交易类型" clearable>
<el-option v-for="(item, index) in rechargeTypeEnum" :key="index" :label="item.label" :value="item.value"> </el-option> <el-option v-for="(item, index) in rechargeTypeEnum" :key="index" :label="item.label" :value="item.value"> </el-option>
</el-select> </el-select>
@ -39,11 +49,7 @@
<el-table-column prop="transactionType" label="交易类型" show-overflow-tooltip align="center"> <el-table-column prop="transactionType" label="交易类型" show-overflow-tooltip align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<p> <p>
{{ {{ rechargeTypeEnum.find(item => item.value == row.transactionType).label }}
row.transactionType === 'TURN'
? LoopBackTypeEnum.find(item => item.value == row.turnType).label
: rechargeTypeEnum.find(item => item.value == row.transactionType).label
}}
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
@ -141,7 +147,7 @@ export default {
labelKey: 'accountName', labelKey: 'accountName',
valueKey: 'id', valueKey: 'id',
placeholder: '炼厂账户名称', placeholder: '炼厂账户名称',
querykey: 'accountId' querykey: 'refineryAccountId'
}, },
refineryList: [], refineryList: [],
tableHeight: 0, tableHeight: 0,
@ -184,7 +190,8 @@ export default {
] ]
} }
], ],
datetime: [] datetime: [],
sysCustomerList: []
} }
}, },
@ -227,6 +234,7 @@ export default {
pageSize: 10, pageSize: 10,
params: {} params: {}
}) })
this.datetime = []
}, },
// table height // table height
heightHandle() { heightHandle() {
@ -241,12 +249,19 @@ export default {
}, },
changeDateTime(val) { changeDateTime(val) {
if (val) { if (val) {
this.parameter.params.createTimeStart = val[0] this.parameter.params.startCreateTime = val[0]
this.parameter.params.createTimeEnd = val[1] this.parameter.params.endCreateTime = val[1]
} }
}, },
indexMethod(index) { indexMethod(index) {
return index + 1 return index + 1
},
searchUserInfo(info) {
if (info && info !== '') {
serve.searchInfo(info).then(res => {
this.sysCustomerList = res.data
})
}
} }
} }
} }

Loading…
Cancel
Save