code
This commit is contained in:
		| @ -323,7 +323,7 @@ | ||||
|                 /> | ||||
|               </el-form-item> | ||||
|               <el-row v-else type="flex"> | ||||
|                 <el-col :span="12"> | ||||
|                 <el-col :span="14"> | ||||
|                   <el-form-item label="下单价(实际价格)" prop="price"> | ||||
|                     <el-input | ||||
|                       v-model="inForm.price" | ||||
| @ -331,19 +331,19 @@ | ||||
|                     > | ||||
|                       <template #prepend> | ||||
|                         <el-select v-if="inForm.price_pattern === 'aicoin'" v-model="aicoinPrice" placeholder="请选择" style="width: 150px;" @change="onchangeAicoin"> | ||||
|                           <el-option v-for="o in options" :key="o.label" :label="o.label" :value="aicoins[o.value] || ''"> | ||||
|                           <el-option v-for="o in JSON.stringify(aicoins) !== '{}' ? options : []" :key="o.label" :label="o.label" :value="aicoins[o.value] || ''"> | ||||
|                             <span style="float: left">{{ o.label }}</span> | ||||
|                             <span style="float: right">{{ aicoins[o.value] || 0 }}</span> | ||||
|                           </el-option> | ||||
|                         </el-select> | ||||
|                       </template> | ||||
|                       <template #append> | ||||
|                         <span v-if="inForm.price_pattern === 'mixture'">{{ comPrice }}</span> | ||||
|                         <span v-if="inForm.price_pattern !== 'percentage'">{{ comPrice }}</span> | ||||
|                       </template> | ||||
|                     </el-input> | ||||
|                   </el-form-item> | ||||
|                 </el-col> | ||||
|                 <el-col :span="7"> | ||||
|                 <el-col :span="5"> | ||||
|                   <el-form-item label="计算百分比"> | ||||
|                     <el-inputNumber v-model="percenter" controls-position="right" :min="0" style="width: 100px;" /> | ||||
|                   </el-form-item> | ||||
| @ -631,7 +631,7 @@ export default { | ||||
|       // (this.form.price-?)/? *100 + '%' | ||||
|       // 主单委托实际价下  获取交易对行情价 | ||||
|       const { symbol, price, price_pattern } = this.inForm | ||||
|       if (symbol && price_pattern === 'mixture') { | ||||
|       if (symbol && price_pattern !== 'percentage') { | ||||
|         const s = this.comSymbols.find(item => item.symbol === symbol) | ||||
|         if (s) { | ||||
|           const res = ((price - s.lastPrice) / s.lastPrice) * 100 | ||||
| @ -693,7 +693,7 @@ export default { | ||||
|       } | ||||
|     }, | ||||
|     onchangeAicoin() { | ||||
|       this.inForm.price = this.aicoinPrice | ||||
|       this.inForm.price = this.aicoinPrice || 0 | ||||
|     }, | ||||
|     onAddExt(type, index) { | ||||
|       if (type === 0) { | ||||
| @ -864,9 +864,7 @@ export default { | ||||
|         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.getSymbol(this.inForm.symbol) | ||||
|         this.open = true | ||||
|         this.title = '修改委托下单模板' | ||||
|         this.isEdit = true | ||||
|  | ||||
| @ -654,7 +654,7 @@ | ||||
|                 /> | ||||
|               </el-form-item> | ||||
|               <el-row v-else type="flex"> | ||||
|                 <el-col :span="12"> | ||||
|                 <el-col :span="14"> | ||||
|                   <el-form-item label="下单价(实际价格)" prop="price"> | ||||
|                     <el-input | ||||
|                       v-model="form.price" | ||||
| @ -662,19 +662,19 @@ | ||||
|                     > | ||||
|                       <template #prepend> | ||||
|                         <el-select v-if="form.price_pattern === 'aicoin'" v-model="aicoinPrice" placeholder="请选择" style="width: 150px;" @change="onchangeAicoin"> | ||||
|                           <el-option v-for="o in options" :key="o.label" :label="o.label" :value="aicoins[o.value] || ''"> | ||||
|                           <el-option v-for="o in JSON.stringify(aicoins) !== '{}' ? options : []" :key="o.label" :label="o.label" :value="aicoins[o.value] || ''"> | ||||
|                             <span style="float: left">{{ o.label }}</span> | ||||
|                             <span style="float: right">{{ aicoins[o.value] || 0 }}</span> | ||||
|                           </el-option> | ||||
|                         </el-select> | ||||
|                       </template> | ||||
|                       <template #append> | ||||
|                         <span v-if="form.price_pattern === 'mixture'">{{ comPrice }}</span> | ||||
|                         <span v-if="form.price_pattern !== 'percentage'">{{ comPrice }}</span> | ||||
|                       </template> | ||||
|                     </el-input> | ||||
|                   </el-form-item> | ||||
|                 </el-col> | ||||
|                 <el-col :span="7"> | ||||
|                 <el-col :span="5"> | ||||
|                   <el-form-item label="计算百分比"> | ||||
|                     <el-inputNumber v-model="percenter" controls-position="right" :min="0" style="width: 100px;" /> | ||||
|                   </el-form-item> | ||||
| @ -1502,7 +1502,7 @@ export default { | ||||
|       // (this.form.price-?)/? *100 + '%' | ||||
|       // 主单委托实际价下  获取交易对行情价 | ||||
|       const { symbol, price, price_pattern } = this.form | ||||
|       if (symbol && price_pattern === 'mixture') { | ||||
|       if (symbol && price_pattern !== 'percentage') { | ||||
|         const s = this.comSymbols.find(item => item.symbol === symbol) | ||||
|         if (s) { | ||||
|           const res = ((price - s.lastPrice) / s.lastPrice) * 100 | ||||
| @ -1582,7 +1582,7 @@ export default { | ||||
|       } | ||||
|     }, | ||||
|     onchangeAicoin() { | ||||
|       this.form.price = this.aicoinPrice | ||||
|       this.form.price = this.aicoinPrice || 0 | ||||
|     }, | ||||
|     onAddExt(type, index) { | ||||
|       if (type === 0) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 shilin
					shilin