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 | 27 | params |
| 28 | 28 | }).then(response => { |
| 29 | 29 | const res = response.data |
| 30 | - if (res.code === 0) { | |
| 31 | 30 | resolve(res) |
| 32 | - } else { | |
| 33 | - reject(new Error(res.msg || 'Failed to list fee configs')) | |
| 34 | - } | |
| 35 | 31 | }).catch(error => { |
| 36 | 32 | reject(error) |
| 37 | 33 | }) | ... | ... |
src/components/fee/addProxyFee.vue
| ... | ... | @@ -153,7 +153,7 @@ export default { |
| 153 | 153 | computingFormula: '6006', |
| 154 | 154 | valid: '1' |
| 155 | 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 | 235 | |
| 236 | 236 | |
| 237 | 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 | 240 | this.handleClose() |
| 241 | 241 | }).catch(error => { |
| 242 | 242 | this.$message.error(error.message) |
| ... | ... | @@ -246,7 +246,7 @@ export default { |
| 246 | 246 | |
| 247 | 247 | resetForm() { |
| 248 | 248 | if (this.$refs.form) { |
| 249 | - this.$refs.form.resetFields() | |
| 249 | + //this.$refs.form.resetFields() | |
| 250 | 250 | } |
| 251 | 251 | this.formData = { |
| 252 | 252 | remark: '', | ... | ... |
src/utils/dateUtil.js
| ... | ... | @@ -24,6 +24,32 @@ export function getDateYYYYMMDDHHMISS (){ |
| 24 | 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 | 53 | export function getDateYYYYMMDD() { |
| 28 | 54 | let date = new Date(); |
| 29 | 55 | let year = date.getFullYear(); | ... | ... |
src/views/fee/payFeeOrderList.vue
| ... | ... | @@ -105,7 +105,7 @@ |
| 105 | 105 | <el-form label-width="100px"> |
| 106 | 106 | <el-form-item :label="$t('payFeeOrder.paymentTime')"> |
| 107 | 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 | 109 | </el-date-picker> |
| 110 | 110 | </el-form-item> |
| 111 | 111 | |
| ... | ... | @@ -213,9 +213,10 @@ import ViewRoomData from '@/components/fee/viewRoomData' |
| 213 | 213 | import ViewFeeData from '@/components/fee/viewFeeData' |
| 214 | 214 | import ViewFeeConfigData from '@/components/fee/viewFeeConfigData' |
| 215 | 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 | 217 | import { copyObject } from '@/utils/vc' |
| 218 | 218 | |
| 219 | + | |
| 219 | 220 | export default { |
| 220 | 221 | name: 'PayFeeOrderList', |
| 221 | 222 | components: { |
| ... | ... | @@ -266,7 +267,7 @@ export default { |
| 266 | 267 | scale: 1, |
| 267 | 268 | decimalPlace: 2, |
| 268 | 269 | receivedAmountSwitch: '1', |
| 269 | - createTime: new Date().toISOString().slice(0, 19).replace('T', ' '), | |
| 270 | + createTime: getDateStr(), | |
| 270 | 271 | accountAmount: 0.0, |
| 271 | 272 | viewAccountAmount: 0.0, |
| 272 | 273 | deductionAmount: 0.0, | ... | ... |