|
@@ -565,7 +565,6 @@
|
|
v-model="closePositionList1.transactionPrice"
|
|
v-model="closePositionList1.transactionPrice"
|
|
placeholder
|
|
placeholder
|
|
class="deal"
|
|
class="deal"
|
|
- placeholder="请输入成交价"
|
|
|
|
@change='transaction'
|
|
@change='transaction'
|
|
>
|
|
>
|
|
<ws-option
|
|
<ws-option
|
|
@@ -585,6 +584,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="平仓数量(吨)" prop="closingQuantity">
|
|
<el-form-item label="平仓数量(吨)" prop="closingQuantity">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ @input="closingPositionPayable"
|
|
v-model="closePositionList1.closingQuantity"
|
|
v-model="closePositionList1.closingQuantity"
|
|
autocomplete="off"
|
|
autocomplete="off"
|
|
placeholder="请输入平仓数量"
|
|
placeholder="请输入平仓数量"
|
|
@@ -593,6 +593,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="平仓价格(元/吨)" prop="closeRate">
|
|
<el-form-item label="平仓价格(元/吨)" prop="closeRate">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ @input="closingPositionPayable"
|
|
v-model="closePositionList1.closeRate"
|
|
v-model="closePositionList1.closeRate"
|
|
autocomplete="off"
|
|
autocomplete="off"
|
|
placeholder="请输入平仓价格"
|
|
placeholder="请输入平仓价格"
|
|
@@ -1012,6 +1013,7 @@ export default {
|
|
transactionRecordList: {},
|
|
transactionRecordList: {},
|
|
closePositionList: [],
|
|
closePositionList: [],
|
|
historyList: [],
|
|
historyList: [],
|
|
|
|
+ openPositionTmp:0,
|
|
pickerBeginDateBefore: {
|
|
pickerBeginDateBefore: {
|
|
disabledDate: (time) => {
|
|
disabledDate: (time) => {
|
|
return time.getTime() > Date.now()
|
|
return time.getTime() > Date.now()
|
|
@@ -1039,9 +1041,12 @@ export default {
|
|
transaction(e){
|
|
transaction(e){
|
|
for (let i = 0; i < this.transactionRecordList1.length; i++) {
|
|
for (let i = 0; i < this.transactionRecordList1.length; i++) {
|
|
if(this.transactionRecordList1[i].key==e){
|
|
if(this.transactionRecordList1[i].key==e){
|
|
- if(this.closePositionList1.openPosition>this.transactionRecordList1[i].value){
|
|
|
|
|
|
+ if(this.openPositionTmp>this.transactionRecordList1[i].value){
|
|
this.closePositionList1.openPosition=this.transactionRecordList1[i].value
|
|
this.closePositionList1.openPosition=this.transactionRecordList1[i].value
|
|
}
|
|
}
|
|
|
|
+ else{
|
|
|
|
+ this.closePositionList1.openPosition = this.openPositionTmp
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1299,14 +1304,19 @@ export default {
|
|
},
|
|
},
|
|
//计算平仓应付
|
|
//计算平仓应付
|
|
closingPositionPayable() {
|
|
closingPositionPayable() {
|
|
- this.closePositionList1.closingPositionPayable =
|
|
|
|
- (this.closePositionList1.closeRate -
|
|
|
|
- this.closePositionList1.transactionPrice -
|
|
|
|
- this.closePositionList1.closingBasis) *
|
|
|
|
- this.closePositionList1.closingQuantity
|
|
|
|
|
|
+ if(this.closePositionList1.transactionPrice
|
|
|
|
+ && this.closePositionList1.closeRate && this.closePositionList1.closingBasis && this.closePositionList1.closingQuantity)
|
|
|
|
+ {
|
|
|
|
+ this.closePositionList1.closingPositionPayable =
|
|
|
|
+ (this.closePositionList1.transactionPrice -
|
|
|
|
+ this.closePositionList1.closeRate-
|
|
|
|
+ Math.abs(this.closePositionList1.closingBasis)) *
|
|
|
|
+ this.closePositionList1.closingQuantity
|
|
|
|
+ }
|
|
},
|
|
},
|
|
cloaeposition1(item) {
|
|
cloaeposition1(item) {
|
|
this.dialogFormVisible2 = true
|
|
this.dialogFormVisible2 = true
|
|
|
|
+ this.openPositionTmp = item.openPosition
|
|
this.$set(this.closePositionList1, 'id', item.id)
|
|
this.$set(this.closePositionList1, 'id', item.id)
|
|
this.$set(this.closePositionList1, 'openPosition', item.openPosition)
|
|
this.$set(this.closePositionList1, 'openPosition', item.openPosition)
|
|
this.$set(
|
|
this.$set(
|