diff --git a/.gitignore b/.gitignore index 78a752d..6bce4a4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ selenium-debug.log *.njsproj *.sln *.local +*.rar +*.zip package-lock.json yarn.lock diff --git a/src/views/admin/line-order-template-logs/index.vue b/src/views/admin/line-order-template-logs/index.vue index 463ffa7..b852f0c 100644 --- a/src/views/admin/line-order-template-logs/index.vue +++ b/src/views/admin/line-order-template-logs/index.vue @@ -665,7 +665,7 @@ export default { }, onchangePattern(init = true) { if (this.inForm.price_pattern === 'aicoin') { - init && (this.inForm.price = '') + init && (this.inForm.price = '0') init && (this.inForm.price_type = 'aicoin') this.aicoinPrice = undefined if (this.inForm.symbol) { @@ -683,8 +683,12 @@ export default { if (this.inForm.price_pattern === 'aicoin') { aicoinSymbol({ symbol: this.inForm.symbol, symbolType: this.inForm.symbol_type }).then(res => { this.aicoinPrice = undefined - this.inForm.price = undefined + this.inForm.price = 0 this.aicoins = res.data + }).catch(() => { + this.aicoinPrice = undefined + this.inForm.price = 0 + this.aicoins = {} }) } }, @@ -719,7 +723,7 @@ export default { this.inForm.api_id = [] return false } - this.inForm.api_id = this.userIdOptions.map(item => item.key) + this.inForm.api_id = this.lineUsers.map(item => item.id + '') }, // 获取杠杆api用户 getListLineApiUser(exchangeType) { @@ -859,6 +863,10 @@ export default { this.getListLineApiUser() this.form.type === 2 && this.getSymbolGroup(this.inForm.symbol_type) this.form.type === 1 && this.onCalculate() + // 获取交易对用于计算 + if (this.inForm.price_pattern === 'mixture') { + this.getSymbol(this.inForm.symbol) + } this.open = true this.title = '修改委托下单模板' this.isEdit = true diff --git a/src/views/admin/line-order/index.vue b/src/views/admin/line-order/index.vue index fb0c349..95910b5 100644 --- a/src/views/admin/line-order/index.vue +++ b/src/views/admin/line-order/index.vue @@ -407,6 +407,15 @@ width="200" :show-overflow-tooltip="true" /> + + + + + + { @@ -1564,6 +1574,10 @@ export default { this.aicoinPrice = undefined this.form.price = undefined this.aicoins = res.data + }).catch(() => { + this.aicoinPrice = undefined + this.form.price = 0 + this.aicoins = {} }) } }, @@ -1617,7 +1631,7 @@ export default { this.form.api_id = [] return false } - this.form.api_id = this.apiIdOptions.map(item => item.key) + this.form.api_id = this.lineUsers.map(item => item.id) }, onAll() { if (this.modeForm.api_user_ids && this.modeForm.api_user_ids.length > 0) { @@ -2021,14 +2035,14 @@ export default { if (this.form.id !== undefined) { updateLinePreOrder(this.form).then(response => { if (response.code === 200) { - this.formLoading = false this.msgSuccess(response.msg) this.open = false this.getList() } else { - this.formLoading = false this.msgError(response.msg) } + }).finally(() => { + this.formLoading = false }) } else { if (this.title === '批量添加') { @@ -2036,14 +2050,14 @@ export default { delete params.symbol batchAddOrder(params).then(response => { if (response.code === 200) { - this.formLoading = false this.msgSuccess(response.msg) this.open = false this.getList() } else { - this.formLoading = false this.msgError(response.msg) } + }).finally(() => { + this.formLoading = false }) return false } @@ -2056,14 +2070,15 @@ export default { api_id: this.form.api_id.toString() }).then(response => { if (response.code === 200) { - this.formLoading = false this.msgSuccess(response.msg) this.open = false this.getList() } else { - this.formLoading = false + this.formLoadng = false this.msgError(response.msg) } + }).finally(() => { + this.formLoading = false }) } } diff --git a/xx.rar b/xx.rar deleted file mode 100644 index 1f4be6a..0000000 Binary files a/xx.rar and /dev/null differ