|
|
@@ -1,50 +1,50 @@
|
|
|
<!-- 商品订单-合约汇总-交收 -->
|
|
|
<template>
|
|
|
- <app-drawer title="交收" :width="800" v-model:show="show" :loading="loading" :refresh="refresh">
|
|
|
- <el-form ref="formRef" class="el-form--horizontal" label-width="120px" :model="formData" :rules="formRules">
|
|
|
- <el-form-item label="商品代码/名称">
|
|
|
+ <app-drawer :title="t('operation.delivery')" :width="840" v-model:show="show" :loading="loading" :refresh="refresh">
|
|
|
+ <el-form ref="formRef" class="el-form--horizontal" label-width="140px" :model="formData" :rules="formRules">
|
|
|
+ <el-form-item :label="t('position.goods.goodsname')">
|
|
|
<span>{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="持仓方向">
|
|
|
+ <el-form-item :label="t('position.goods.buyorsell')">
|
|
|
<span>{{ getBuyOrSellName(selectedRow.buyorsell) }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="持仓金额">
|
|
|
+ <el-form-item :label="t('position.goods.curholderamount')">
|
|
|
<span>{{ formatDecimal(selectedRow.curholderamount) }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="持仓量">
|
|
|
+ <el-form-item :label="t('position.goods.curpositionqty')">
|
|
|
<span>{{ selectedRow.curpositionqty }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="冻结量">
|
|
|
+ <el-form-item :label="t('position.goods.frozenqty')">
|
|
|
<span>{{ selectedRow.frozenqty }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="可用量">
|
|
|
+ <el-form-item :label="t('position.goods.enableqty')">
|
|
|
<span>{{ selectedRow.enableqty }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="最小交收量">
|
|
|
+ <el-form-item :label="t('position.goods.mindeliverylot')">
|
|
|
<span>{{ selectedRow.mindeliverylot }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="持仓均价">
|
|
|
+ <el-form-item :label="t('position.goods.averageprice')">
|
|
|
<span>{{ formatDecimal(selectedRow.averageprice, selectedRow.decimalplace) }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="对手方">
|
|
|
+ <el-form-item :label="t('position.goods.matchname')">
|
|
|
<span>{{ selectedRow.matchname }}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="参考损益">
|
|
|
+ <el-form-item :label="t('position.goods.closepl')">
|
|
|
<span :class="selectedRow.closeplColor">
|
|
|
{{ formatDecimal(selectedRow.closepl, selectedRow.decimalplace) }}
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="DeliveryLot" label="交收量">
|
|
|
+ <el-form-item prop="DeliveryLot" :label="t('position.goods.deliverylot')">
|
|
|
<el-input-number :placeholder="t('common.pleaseenter')" v-model="formData.DeliveryLot" :precision="0"
|
|
|
:max="selectedRow.enableqty" :min="0" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="交收数量">
|
|
|
+ <el-form-item :label="t('position.goods.deliveryqty')">
|
|
|
<span>{{ (formData.DeliveryLot ?? 0) * selectedRow.agreeunit }}{{ selectedRow.goodunit }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item class="el-form-item--row" prop="DeliveryInfo"
|
|
|
- :label="selectedRow.buyorsell === BuyOrSell.Buy ? '收货地址' : '交收信息'">
|
|
|
+ :label="selectedRow.buyorsell === BuyOrSell.Buy ? t('position.goods.address') : t('position.goods.deliveryinfo')">
|
|
|
<div class="el-form-item--col">
|
|
|
- <el-input type="textarea" :placeholder="selectedRow.buyorsell === BuyOrSell.Buy ? '请输入收货地址' : '请输入交收信息'"
|
|
|
+ <el-input type="textarea" :placeholder="selectedRow.buyorsell === BuyOrSell.Buy ? t('position.goods.tips9') : t('position.goods.tips10')"
|
|
|
:rows="3" v-model="formData.DeliveryInfo" />
|
|
|
<el-icon :size="20" style="cursor: pointer;" @click="showAddress = true"
|
|
|
v-if="selectedRow.buyorsell === BuyOrSell.Buy">
|
|
|
@@ -93,18 +93,18 @@ const formRef = ref<FormInstance>()
|
|
|
const formRules: FormRules = {
|
|
|
DeliveryLot: [{
|
|
|
required: true,
|
|
|
- message: '请输入交收量',
|
|
|
+ message: t('position.goods.tips7'),
|
|
|
validator: (rule, value, callback) => {
|
|
|
if (value >= props.selectedRow.mindeliverylot) {
|
|
|
callback()
|
|
|
} else {
|
|
|
- callback(new Error('不能小于最小交收量' + `${props.selectedRow.mindeliverylot}`))
|
|
|
+ callback(new Error(t('position.goods.tips8') + `${props.selectedRow.mindeliverylot}`))
|
|
|
}
|
|
|
}
|
|
|
}],
|
|
|
DeliveryInfo: [{
|
|
|
required: true,
|
|
|
- message: props.selectedRow.buyorsell === BuyOrSell.Buy ? '请输入收货地址' : '请输入交收信息',
|
|
|
+ message: props.selectedRow.buyorsell === BuyOrSell.Buy ? t('position.goods.tips9') : t('position.goods.tips10'),
|
|
|
validator: () => {
|
|
|
return !!formData.DeliveryInfo
|
|
|
}
|
|
|
@@ -133,10 +133,10 @@ const onSubmit = () => {
|
|
|
formData.GoodsID = goodsid
|
|
|
formData.BuyOrSell = buyorsell
|
|
|
formSubmit().then(() => {
|
|
|
- ElMessage.success('交收成功')
|
|
|
+ ElMessage.success(t('common.submitsuccess'))
|
|
|
onCancel(true)
|
|
|
}).catch((err) => {
|
|
|
- ElMessage.error('交收失败:' + err)
|
|
|
+ ElMessage.error(t('common.submitfailure') + err)
|
|
|
})
|
|
|
}
|
|
|
})
|