Commit 0c52f32a3314ed62cca280e7acb169e34a73c515
1 parent
a92b74f5
优化按量收费不能创建的问题
Showing
5 changed files
with
36 additions
and
13 deletions
src/api/fee/addProxyFeeApi.js
| @@ -27,11 +27,7 @@ export function listFeeConfigs(params) { | @@ -27,11 +27,7 @@ export function listFeeConfigs(params) { | ||
| 27 | params | 27 | params |
| 28 | }).then(response => { | 28 | }).then(response => { |
| 29 | const res = response.data | 29 | const res = response.data |
| 30 | - if (res.code === 0) { | ||
| 31 | resolve(res) | 30 | resolve(res) |
| 32 | - } else { | ||
| 33 | - reject(new Error(res.msg || 'Failed to list fee configs')) | ||
| 34 | - } | ||
| 35 | }).catch(error => { | 31 | }).catch(error => { |
| 36 | reject(error) | 32 | reject(error) |
| 37 | }) | 33 | }) |
src/components/fee/addProxyFee.vue
| @@ -153,7 +153,7 @@ export default { | @@ -153,7 +153,7 @@ export default { | ||
| 153 | computingFormula: '6006', | 153 | computingFormula: '6006', |
| 154 | valid: '1' | 154 | valid: '1' |
| 155 | }).then(response => { | 155 | }).then(response => { |
| 156 | - this.feeConfigOptions = response.data.feeConfigs | 156 | + this.feeConfigOptions = response.feeConfigs |
| 157 | }) | 157 | }) |
| 158 | }, | 158 | }, |
| 159 | 159 | ||
| @@ -235,8 +235,8 @@ export default { | @@ -235,8 +235,8 @@ export default { | ||
| 235 | 235 | ||
| 236 | 236 | ||
| 237 | saveProxyFee(params).then(() => { | 237 | saveProxyFee(params).then(() => { |
| 238 | - this.$message.success(this.$t('addProxyFee.successMessage')) | ||
| 239 | - this.$emit('success') | 238 | + this.$message.success(this.$t('addProxyFee.successMessage')) |
| 239 | + this.$emit('success') | ||
| 240 | this.handleClose() | 240 | this.handleClose() |
| 241 | }).catch(error => { | 241 | }).catch(error => { |
| 242 | this.$message.error(error.message) | 242 | this.$message.error(error.message) |
| @@ -246,7 +246,7 @@ export default { | @@ -246,7 +246,7 @@ export default { | ||
| 246 | 246 | ||
| 247 | resetForm() { | 247 | resetForm() { |
| 248 | if (this.$refs.form) { | 248 | if (this.$refs.form) { |
| 249 | - this.$refs.form.resetFields() | 249 | + //this.$refs.form.resetFields() |
| 250 | } | 250 | } |
| 251 | this.formData = { | 251 | this.formData = { |
| 252 | remark: '', | 252 | remark: '', |
src/utils/dateUtil.js
| @@ -24,6 +24,32 @@ export function getDateYYYYMMDDHHMISS (){ | @@ -24,6 +24,32 @@ export function getDateYYYYMMDDHHMISS (){ | ||
| 24 | return year + "" + month + "" + day + "" + hour + "" + minute + "" + second; | 24 | return year + "" + month + "" + day + "" + hour + "" + minute + "" + second; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | +export function getDateStr() { | ||
| 28 | + let date = new Date(); | ||
| 29 | + let year = date.getFullYear(); | ||
| 30 | + let month = date.getMonth() + 1; | ||
| 31 | + let day = date.getDate(); | ||
| 32 | + let hour = date.getHours(); | ||
| 33 | + let minute = date.getMinutes(); | ||
| 34 | + let second = date.getSeconds(); | ||
| 35 | + if (month < 10) { | ||
| 36 | + month = '0' + month; | ||
| 37 | + } | ||
| 38 | + if (day < 10) { | ||
| 39 | + day = '0' + day; | ||
| 40 | + } | ||
| 41 | + if (hour < 10) { | ||
| 42 | + hour = '0' + hour; | ||
| 43 | + } | ||
| 44 | + if (minute < 10) { | ||
| 45 | + minute = '0' + minute; | ||
| 46 | + } | ||
| 47 | + if (second < 10) { | ||
| 48 | + second = '0' + second; | ||
| 49 | + } | ||
| 50 | + return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second; | ||
| 51 | +} | ||
| 52 | + | ||
| 27 | export function getDateYYYYMMDD() { | 53 | export function getDateYYYYMMDD() { |
| 28 | let date = new Date(); | 54 | let date = new Date(); |
| 29 | let year = date.getFullYear(); | 55 | let year = date.getFullYear(); |
src/views/fee/payFeeOrderList.vue
| @@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
| 105 | <el-form label-width="100px"> | 105 | <el-form label-width="100px"> |
| 106 | <el-form-item :label="$t('payFeeOrder.paymentTime')"> | 106 | <el-form-item :label="$t('payFeeOrder.paymentTime')"> |
| 107 | <el-date-picker v-model="payFeeOrderInfo.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" | 107 | <el-date-picker v-model="payFeeOrderInfo.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" |
| 108 | - :placeholder="$t('payFeeOrder.paymentTimePlaceholder')" style="width: 100%;" readonly> | 108 | + :placeholder="$t('payFeeOrder.paymentTimePlaceholder')" style="width: 100%;"> |
| 109 | </el-date-picker> | 109 | </el-date-picker> |
| 110 | </el-form-item> | 110 | </el-form-item> |
| 111 | 111 | ||
| @@ -213,9 +213,10 @@ import ViewRoomData from '@/components/fee/viewRoomData' | @@ -213,9 +213,10 @@ import ViewRoomData from '@/components/fee/viewRoomData' | ||
| 213 | import ViewFeeData from '@/components/fee/viewFeeData' | 213 | import ViewFeeData from '@/components/fee/viewFeeData' |
| 214 | import ViewFeeConfigData from '@/components/fee/viewFeeConfigData' | 214 | import ViewFeeConfigData from '@/components/fee/viewFeeConfigData' |
| 215 | import { listFeeObj } from '@/api/fee/payFeeOrderApi' | 215 | import { listFeeObj } from '@/api/fee/payFeeOrderApi' |
| 216 | -import { dateAdd, dateSub, addMonth } from '@/utils/dateUtil' | 216 | +import { dateAdd, dateSub, addMonth,getDateStr } from '@/utils/dateUtil' |
| 217 | import { copyObject } from '@/utils/vc' | 217 | import { copyObject } from '@/utils/vc' |
| 218 | 218 | ||
| 219 | + | ||
| 219 | export default { | 220 | export default { |
| 220 | name: 'PayFeeOrderList', | 221 | name: 'PayFeeOrderList', |
| 221 | components: { | 222 | components: { |
| @@ -266,7 +267,7 @@ export default { | @@ -266,7 +267,7 @@ export default { | ||
| 266 | scale: 1, | 267 | scale: 1, |
| 267 | decimalPlace: 2, | 268 | decimalPlace: 2, |
| 268 | receivedAmountSwitch: '1', | 269 | receivedAmountSwitch: '1', |
| 269 | - createTime: new Date().toISOString().slice(0, 19).replace('T', ' '), | 270 | + createTime: getDateStr(), |
| 270 | accountAmount: 0.0, | 271 | accountAmount: 0.0, |
| 271 | viewAccountAmount: 0.0, | 272 | viewAccountAmount: 0.0, |
| 272 | deductionAmount: 0.0, | 273 | deductionAmount: 0.0, |
src/views/user/login/Login.vue
| @@ -44,8 +44,8 @@ export default { | @@ -44,8 +44,8 @@ export default { | ||
| 44 | logo: '', | 44 | logo: '', |
| 45 | companyName:'', | 45 | companyName:'', |
| 46 | loginForm: { | 46 | loginForm: { |
| 47 | - username: 'wuxw', | ||
| 48 | - passwd: 'admin', | 47 | + username: '', |
| 48 | + passwd: '', | ||
| 49 | validateCode: '' | 49 | validateCode: '' |
| 50 | }, | 50 | }, |
| 51 | captchaUrl: '', | 51 | captchaUrl: '', |