|
@@ -1,133 +1,61 @@
|
|
|
<template>
|
|
<template>
|
|
|
<!-- 修改计划 -->
|
|
<!-- 修改计划 -->
|
|
|
- <a-modal class="commonModal modify-custom"
|
|
|
|
|
- title="修改计划"
|
|
|
|
|
- v-if="visible"
|
|
|
|
|
- centered
|
|
|
|
|
- v-model:visible="visible"
|
|
|
|
|
- @cancel="cancel"
|
|
|
|
|
- width="890px">
|
|
|
|
|
|
|
+ <a-modal class="commonModal modify-custom" title="修改计划" v-if="visible" centered v-model:visible="visible" @cancel="cancel" width="890px">
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <a-button key="submit"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- @click="submit(2)">完成</a-button>
|
|
|
|
|
- <a-button key="cancel"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- @click="cancel">取消</a-button>
|
|
|
|
|
|
|
+ <a-button key="submit" type="primary" :loading="loading" @click="submit(2)">完成</a-button>
|
|
|
|
|
+ <a-button key="cancel" type="primary" :loading="loading" @click="cancel">取消</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
- <a-form class="inlineForm"
|
|
|
|
|
- ref="formRef"
|
|
|
|
|
- :model="formState"
|
|
|
|
|
- :rules="rules">
|
|
|
|
|
|
|
+ <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="计划类型"
|
|
|
|
|
- name="ContractType">
|
|
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.ContractType"
|
|
|
|
|
- placeholder="请选择计划类型">
|
|
|
|
|
- <a-select-option v-for="item in planTye"
|
|
|
|
|
- :value="item.enumitemname"
|
|
|
|
|
- :key="item.autoid">{{item.enumdicname}}</a-select-option>
|
|
|
|
|
|
|
+ <a-form-item label="计划类型" name="ContractType">
|
|
|
|
|
+ <a-select class="inlineFormSelect" style="width: 200px" v-model:value="formState.ContractType" placeholder="请选择计划类型">
|
|
|
|
|
+ <a-select-option v-for="item in planTye" :value="item.enumitemname" :key="item.autoid">{{item.enumdicname}}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="计划名称"
|
|
|
|
|
- name="HedgePlanNo">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- v-model:value="formState.HedgePlanNo"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入计划名称" />
|
|
|
|
|
|
|
+ <a-form-item label="计划名称" name="HedgePlanNo">
|
|
|
|
|
+ <a-input class="dialogInput" v-model:value="formState.HedgePlanNo" style="width: 200px" placeholder="请输入计划名称" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="现货品种"
|
|
|
|
|
- name="DeliveryGoodsID">
|
|
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.DeliveryGoodsID"
|
|
|
|
|
- @change="chooseMG"
|
|
|
|
|
- placeholder="请选择现货品种">
|
|
|
|
|
- <a-select-option v-for="item in DGList"
|
|
|
|
|
- :value="item.data.deliverygoodsid"
|
|
|
|
|
- :key="item.data.deliverygoodsid">{{item.data.deliverygoodsname}}
|
|
|
|
|
|
|
+ <a-form-item label="现货品种" name="DeliveryGoodsID">
|
|
|
|
|
+ <a-select class="inlineFormSelect" style="width: 200px" v-model:value="formState.DeliveryGoodsID" @change="chooseMG" placeholder="请选择现货品种">
|
|
|
|
|
+ <a-select-option v-for="item in DGList" :value="item.data.deliverygoodsid" :key="item.data.deliverygoodsid">{{item.data.deliverygoodsname}}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="商品"
|
|
|
|
|
- name="WRStandardID">
|
|
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- @change="chooseWR"
|
|
|
|
|
- v-model:value="formState.WRStandardID"
|
|
|
|
|
- placeholder="请选择商品">
|
|
|
|
|
- <a-select-option v-for="item in gmlist"
|
|
|
|
|
- :value="item.wrstandardid"
|
|
|
|
|
- :key="item.wrstandardid">{{item.wrstandardname}}</a-select-option>
|
|
|
|
|
|
|
+ <a-form-item label="商品" name="WRStandardID">
|
|
|
|
|
+ <a-select class="inlineFormSelect" style="width: 200px" @change="chooseWR" v-model:value="formState.WRStandardID" placeholder="请选择商品">
|
|
|
|
|
+ <a-select-option v-for="item in gmlist" :value="item.wrstandardid" :key="item.wrstandardid">{{item.wrstandardname}}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="标仓系数"
|
|
|
|
|
- name>
|
|
|
|
|
- <a-input class="dialogInput ConvertFactor"
|
|
|
|
|
- v-model:value="formState.ConvertFactor"
|
|
|
|
|
- readonly
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入标仓系数" />
|
|
|
|
|
|
|
+ <a-form-item label="计划量" class="relative" name="PlanQty">
|
|
|
|
|
+ <a-input-number class="dialogInput" style="width: 200px" :min="0" v-model:value="formState.PlanQty" placeholder="请输入计划量"></a-input-number>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="计划量"
|
|
|
|
|
- class="relative"
|
|
|
|
|
- name="PlanQty">
|
|
|
|
|
- <a-input-number class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- :min="0"
|
|
|
|
|
- v-model:value="formState.PlanQty"
|
|
|
|
|
- placeholder="请输入计划量"></a-input-number>
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="交易用户"
|
|
|
|
|
- name="Tradeuserid">
|
|
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.Tradeuserid"
|
|
|
|
|
- placeholder="请选择交易用户">
|
|
|
|
|
- <a-select-option v-for="item in tableList"
|
|
|
|
|
- :value="item.roleid"
|
|
|
|
|
- :key="item.roleid">{{item.rolename}}</a-select-option>
|
|
|
|
|
|
|
+ <a-form-item label="交易用户" name="Tradeuserid">
|
|
|
|
|
+ <a-select class="inlineFormSelect" style="width: 200px" v-model:value="formState.Tradeuserid" placeholder="请选择交易用户">
|
|
|
|
|
+ <a-select-option v-for="item in tableList" :value="item.roleid" :key="item.roleid">{{item.rolename}}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="结算币种"
|
|
|
|
|
- name="Currencyid">
|
|
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.Currencyid"
|
|
|
|
|
- placeholder="请选择结算币种">
|
|
|
|
|
- <a-select-option v-for="item in priceTyep"
|
|
|
|
|
- :key="item.enumitemname"
|
|
|
|
|
- :value="item.enumitemname">{{item.enumdicname}}</a-select-option>
|
|
|
|
|
|
|
+ <a-form-item label="结算币种" name="Currencyid">
|
|
|
|
|
+ <a-select class="inlineFormSelect" style="width: 200px" v-model:value="formState.Currencyid" placeholder="请选择结算币种">
|
|
|
|
|
+ <a-select-option v-for="item in priceTyep" :key="item.enumitemname" :value="item.enumitemname">{{item.enumdicname}}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
- <a-form-item label="备注"
|
|
|
|
|
- class="relative"
|
|
|
|
|
- name="Remark">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- v-model:value="formState.Remark"
|
|
|
|
|
- style="width: 636px"
|
|
|
|
|
- placeholder="请输入备注" />
|
|
|
|
|
|
|
+ <a-form-item label="备注" class="relative" name="Remark">
|
|
|
|
|
+ <a-input class="dialogInput" v-model:value="formState.Remark" style="width: 636px" placeholder="请输入备注" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
@@ -155,83 +83,83 @@ import { handlerManagerList } from '@/common/setup/user';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: 'plan_uncommitted_modify',
|
|
|
|
|
- emits: ['cancel', 'update'],
|
|
|
|
|
- props: {
|
|
|
|
|
- selectedRow: {
|
|
|
|
|
- type: Object as PropType<Ermcp3HedgePlan>,
|
|
|
|
|
- default: {},
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ name: 'plan_uncommitted_modify',
|
|
|
|
|
+ emits: ['cancel', 'update'],
|
|
|
|
|
+ props: {
|
|
|
|
|
+ selectedRow: {
|
|
|
|
|
+ type: Object as PropType<Ermcp3HedgePlan>,
|
|
|
|
|
+ default: {},
|
|
|
},
|
|
},
|
|
|
- setup(props, context) {
|
|
|
|
|
- const { visible, cancel } = _closeModal(context);
|
|
|
|
|
- const loading = ref<boolean>(false);
|
|
|
|
|
- const planTye = ref<AllEnums[]>(getSpotContractTypeEnumList());
|
|
|
|
|
- // 表单
|
|
|
|
|
- const { formRef, formState, rules } = handleForm();
|
|
|
|
|
- // 品种、品类
|
|
|
|
|
- const { DGList, getDG, gmlist, chooseMG, chooseWR } = getMiddleGoodsD(formState);
|
|
|
|
|
- // 交易用户
|
|
|
|
|
- const { tableList, queryTable } = handlerManagerList(loading, 2);
|
|
|
|
|
- // 币种
|
|
|
|
|
- const priceTyep = getPayCurrencyTypeEnumList();
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ setup(props, context) {
|
|
|
|
|
+ const { visible, cancel } = _closeModal(context);
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
+ const planTye = ref<AllEnums[]>(getSpotContractTypeEnumList());
|
|
|
|
|
+ // 表单
|
|
|
|
|
+ const { formRef, formState, rules } = handleForm();
|
|
|
|
|
+ // 品种、品类
|
|
|
|
|
+ const { DGList, getDG, gmlist, chooseMG, chooseWR } = getMiddleGoodsD(formState);
|
|
|
|
|
+ // 交易用户
|
|
|
|
|
+ const { tableList, queryTable } = handlerManagerList(loading, 2);
|
|
|
|
|
+ // 币种
|
|
|
|
|
+ const priceTyep = getPayCurrencyTypeEnumList();
|
|
|
|
|
|
|
|
- getDG();
|
|
|
|
|
- queryTable();
|
|
|
|
|
- mergeTwoObj(formState, props.selectedRow);
|
|
|
|
|
- const { deliverygoodsid, planqty, wrstandardid } = props.selectedRow;
|
|
|
|
|
- deliverygoodsid && chooseMG(deliverygoodsid);
|
|
|
|
|
- formState.PlanQty = planqty;
|
|
|
|
|
|
|
+ getDG();
|
|
|
|
|
+ queryTable();
|
|
|
|
|
+ mergeTwoObj(formState, props.selectedRow);
|
|
|
|
|
+ const { deliverygoodsid, planqty, wrstandardid } = props.selectedRow;
|
|
|
|
|
+ deliverygoodsid && chooseMG(deliverygoodsid);
|
|
|
|
|
+ formState.PlanQty = planqty;
|
|
|
|
|
|
|
|
- if (wrstandardid) {
|
|
|
|
|
- formState.WRStandardID = wrstandardid;
|
|
|
|
|
- chooseWR(wrstandardid);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (wrstandardid) {
|
|
|
|
|
+ formState.WRStandardID = wrstandardid;
|
|
|
|
|
+ chooseWR(wrstandardid);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- function submit(OperateType: 1 | 2) {
|
|
|
|
|
- validateAction<FormState>(formRef, formState).then((param) => {
|
|
|
|
|
- const loginId = geLoginID_number();
|
|
|
|
|
- const userid = getAreaUserId();
|
|
|
|
|
- const reqParam: ErmcpHedgePlanReq = {
|
|
|
|
|
- HedgePlanID: Number(props.selectedRow.hedgeplanid),
|
|
|
|
|
- HedgePlanNo: param.HedgePlanNo, // 计划类型
|
|
|
|
|
- ContractType: param.ContractType, // 计划类型
|
|
|
|
|
- DeliveryGoodsID: Number(param.DeliveryGoodsID),
|
|
|
|
|
- WRStandardID: Number(param.WRStandardID), // 现货品种
|
|
|
|
|
- PlanQty: Number(param.PlanQty), // 计划数量
|
|
|
|
|
- OperateType: OperateType,
|
|
|
|
|
- ConvertFactor: param.ConvertFactor,
|
|
|
|
|
- Currencyid: param.Currencyid,
|
|
|
|
|
- ApplyId: Number(loginId),
|
|
|
|
|
- PlanTime: formatTime(new Date(), 's'),
|
|
|
|
|
- ProductType: 1,
|
|
|
|
|
- Biztype: 1,
|
|
|
|
|
- AreaUserID: userid,
|
|
|
|
|
- Remark: param.Remark,
|
|
|
|
|
- Tradeuserid: param.Tradeuserid, // 交易用户id
|
|
|
|
|
- };
|
|
|
|
|
- requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, ['修改计划成功', '修改计划失败:']).then(() => {
|
|
|
|
|
- cancel(true);
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- return {
|
|
|
|
|
- visible,
|
|
|
|
|
- cancel,
|
|
|
|
|
- submit,
|
|
|
|
|
- loading,
|
|
|
|
|
- planTye,
|
|
|
|
|
- DGList,
|
|
|
|
|
- gmlist,
|
|
|
|
|
- chooseMG,
|
|
|
|
|
- tableList,
|
|
|
|
|
- priceTyep,
|
|
|
|
|
- formRef,
|
|
|
|
|
- formState,
|
|
|
|
|
- rules,
|
|
|
|
|
- chooseWR,
|
|
|
|
|
|
|
+ function submit(OperateType: 1 | 2) {
|
|
|
|
|
+ validateAction<FormState>(formRef, formState).then((param) => {
|
|
|
|
|
+ const loginId = geLoginID_number();
|
|
|
|
|
+ const userid = getAreaUserId();
|
|
|
|
|
+ const reqParam: ErmcpHedgePlanReq = {
|
|
|
|
|
+ HedgePlanID: Number(props.selectedRow.hedgeplanid),
|
|
|
|
|
+ HedgePlanNo: param.HedgePlanNo, // 计划类型
|
|
|
|
|
+ ContractType: param.ContractType, // 计划类型
|
|
|
|
|
+ DeliveryGoodsID: Number(param.DeliveryGoodsID),
|
|
|
|
|
+ WRStandardID: Number(param.WRStandardID), // 现货品种
|
|
|
|
|
+ PlanQty: Number(param.PlanQty), // 计划数量
|
|
|
|
|
+ OperateType: OperateType,
|
|
|
|
|
+ ConvertFactor: param.ConvertFactor,
|
|
|
|
|
+ Currencyid: param.Currencyid,
|
|
|
|
|
+ ApplyId: Number(loginId),
|
|
|
|
|
+ PlanTime: formatTime(new Date(), 's'),
|
|
|
|
|
+ ProductType: 1,
|
|
|
|
|
+ Biztype: 1,
|
|
|
|
|
+ AreaUserID: userid,
|
|
|
|
|
+ Remark: param.Remark,
|
|
|
|
|
+ Tradeuserid: param.Tradeuserid, // 交易用户id
|
|
|
};
|
|
};
|
|
|
- },
|
|
|
|
|
|
|
+ requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, ['修改计划成功', '修改计划失败:']).then(() => {
|
|
|
|
|
+ cancel(true);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ visible,
|
|
|
|
|
+ cancel,
|
|
|
|
|
+ submit,
|
|
|
|
|
+ loading,
|
|
|
|
|
+ planTye,
|
|
|
|
|
+ DGList,
|
|
|
|
|
+ gmlist,
|
|
|
|
|
+ chooseMG,
|
|
|
|
|
+ tableList,
|
|
|
|
|
+ priceTyep,
|
|
|
|
|
+ formRef,
|
|
|
|
|
+ formState,
|
|
|
|
|
+ rules,
|
|
|
|
|
+ chooseWR,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|