|
@@ -11,173 +11,126 @@
|
|
|
<a-button key="submit"
|
|
<a-button key="submit"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:loading="loading"
|
|
:loading="loading"
|
|
|
- @click="submit">完成</a-button>
|
|
|
|
|
|
|
+ @click="submit(2)">完成</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
<a-form class="inlineForm"
|
|
<a-form class="inlineForm"
|
|
|
- :form="form"
|
|
|
|
|
- @submit="handleSearch">
|
|
|
|
|
|
|
+ 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="客户类型">
|
|
|
|
|
- <a-select class="typeSelect"
|
|
|
|
|
|
|
+ <a-form-item label="计划类型"
|
|
|
|
|
+ name="ContractType">
|
|
|
|
|
+ <a-select class="inlineFormSelect"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
- placeholder="请选择客户类型">
|
|
|
|
|
- <a-select-option value="1">
|
|
|
|
|
- 客户一
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="2">
|
|
|
|
|
- 客户二
|
|
|
|
|
|
|
+ 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-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="企业名称">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入企业名称" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="企业简称">
|
|
|
|
|
|
|
+ <a-form-item label="计划名称"
|
|
|
|
|
+ name="HedgePlanNo">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
|
|
+ v-model:value="formState.HedgePlanNo"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
- placeholder="请输入企业简称" />
|
|
|
|
|
|
|
+ placeholder="请输入计划名称" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="证件类型">
|
|
|
|
|
|
|
+ <a-form-item label="现货品种"
|
|
|
|
|
+ name="DeliveryGoodsID">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
- placeholder="请选择证件类型">
|
|
|
|
|
- <a-select-option value="1">
|
|
|
|
|
- 客户一
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="2">
|
|
|
|
|
- 客户二
|
|
|
|
|
|
|
+ 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-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="法定代表人">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入法定代表人" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="证件号码">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入证件号码" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="纳税人识别号">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入纳税人识别号" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="营业执照">
|
|
|
|
|
- <div class="upload">
|
|
|
|
|
- <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
|
|
- :transform-file="transformFile">
|
|
|
|
|
- <a-button class="uploadBtn">上传</a-button>
|
|
|
|
|
- </a-upload>
|
|
|
|
|
- <div class="look">查看附件</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="联系人">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- placeholder="请输入联系人" />
|
|
|
|
|
|
|
+ <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-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="联系人手机号">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
|
|
+ <a-form-item label="标仓系数"
|
|
|
|
|
+ name="">
|
|
|
|
|
+ <a-input class="ConvertFactor"
|
|
|
|
|
+ v-model:value="formState.ConvertFactor"
|
|
|
|
|
+ readonly
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
- placeholder="请输入联系人手机号" />
|
|
|
|
|
|
|
+ placeholder="请输入标仓系数" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="联系电话">
|
|
|
|
|
|
|
+ <a-form-item label="计划量"
|
|
|
|
|
+ class="relative"
|
|
|
|
|
+ name="PlanQty">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
- placeholder="请输入联系电话" />
|
|
|
|
|
|
|
+ v-model:value="formState.PlanQty"
|
|
|
|
|
+ placeholder="请输入计划量" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
- <a-form-item>
|
|
|
|
|
-
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
- <a-form-item label="通讯地址">
|
|
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
|
|
- style="width: 205px"
|
|
|
|
|
- placeholder="请选择省">
|
|
|
|
|
- <a-select-option value="1">
|
|
|
|
|
- 客户一
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="2">
|
|
|
|
|
- 客户二
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- </a-select>
|
|
|
|
|
|
|
+ <a-form-item label="交易用户"
|
|
|
|
|
+ name="Tradeuserid">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
|
- style="width: 205px"
|
|
|
|
|
- placeholder="请选择市">
|
|
|
|
|
- <a-select-option value="1">
|
|
|
|
|
- 客户一
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="2">
|
|
|
|
|
- 客户二
|
|
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.Tradeuserid"
|
|
|
|
|
+ placeholder="请选择交易用户">
|
|
|
|
|
+ <a-select-option v-for="item in traderList"
|
|
|
|
|
+ :value="item.roleid"
|
|
|
|
|
+ :key="item.roleid">
|
|
|
|
|
+ {{item.rolename}}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="结算币种"
|
|
|
|
|
+ name="Currencyid">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
|
- style="width: 205px"
|
|
|
|
|
- placeholder="请选择县(区)">
|
|
|
|
|
- <a-select-option value="1">
|
|
|
|
|
- 客户一
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="2">
|
|
|
|
|
- 客户二
|
|
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.Currencyid"
|
|
|
|
|
+ placeholder="请选择结算币种">
|
|
|
|
|
+ <a-select-option v-for="item in priceTyep"
|
|
|
|
|
+ :key="item.enumdicid"
|
|
|
|
|
+ :value="item.enumdicid">
|
|
|
|
|
+ {{item.enumdicname}}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
- <a-col :span="24">
|
|
|
|
|
- <a-form-item label=" ">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 635px"
|
|
|
|
|
- placeholder="请输入详细地址" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- </a-row>
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
- <a-form-item label="备注">
|
|
|
|
|
|
|
+ <a-form-item label="备注"
|
|
|
|
|
+ class="relative"
|
|
|
|
|
+ name="Remark">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
- style="width: 635px"
|
|
|
|
|
|
|
+ v-model:value="formState.Remark"
|
|
|
|
|
+ style="width: 636px"
|
|
|
placeholder="请输入备注" />
|
|
placeholder="请输入备注" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -187,32 +140,104 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, ref } from 'vue';
|
|
|
|
|
|
|
+import { defineComponent, PropType, ref, toRaw, watchEffect } from 'vue';
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import { initData } from '@/common/methods/index';
|
|
|
|
|
|
|
+import { formatTime, initData } from '@/common/methods/index';
|
|
|
|
|
+import { getPayCurrencyTypeEnumList, getSpotContractTypeEnumList } from '@/common/constants/enumsList';
|
|
|
|
|
+import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
|
|
+import { changeStatus, getMiddleGoodsD, handleForm, handleTrader } from '../setup';
|
|
|
|
|
+import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
|
|
|
|
|
+import { FormState } from '@/views/information/spot-contract/components/interface';
|
|
|
|
|
+import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
|
|
|
|
|
+import { getLongTypeLoginID } from '@/services/bus/login';
|
|
|
|
|
+import { LongType } from '@/services/socket/login/interface';
|
|
|
|
|
+import APP from '@/services';
|
|
|
|
|
+import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
|
|
+import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'plan_uncommitted_modify',
|
|
name: 'plan_uncommitted_modify',
|
|
|
components: {},
|
|
components: {},
|
|
|
props: {
|
|
props: {
|
|
|
- // selectedRow: {
|
|
|
|
|
- // type:
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ selectedRow: {
|
|
|
|
|
+ type: Object as PropType<Ermcp3HedgePlan>,
|
|
|
|
|
+ default: {},
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
- setup() {
|
|
|
|
|
- // const { visible, cancel } = closeModal('modifyCustomInfo');
|
|
|
|
|
|
|
+ setup(props, context) {
|
|
|
const { visible, cancel } = closeModal('plan_uncommitted_modify');
|
|
const { visible, cancel } = closeModal('plan_uncommitted_modify');
|
|
|
|
|
+ const planTye = ref<AllEnums[]>(getSpotContractTypeEnumList());
|
|
|
|
|
+ // 表单
|
|
|
|
|
+ const { formRef, formState, rules } = handleForm();
|
|
|
|
|
+ // 品种、品类
|
|
|
|
|
+ const { DGList, getDG, gmlist, chooseMG, chooseWR } = getMiddleGoodsD(formState);
|
|
|
|
|
+ // 交易用户
|
|
|
|
|
+ const { traderList, getRoleList } = handleTrader();
|
|
|
|
|
+ // 币种
|
|
|
|
|
+ const priceTyep = getPayCurrencyTypeEnumList();
|
|
|
|
|
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
- function submit() {
|
|
|
|
|
- cancel();
|
|
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ if (props.selectedRow.contracttype) {
|
|
|
|
|
+ mergeTwoObj(formState, props.selectedRow);
|
|
|
|
|
+ const { deliverygoodsid, planqty } = props.selectedRow;
|
|
|
|
|
+ deliverygoodsid && chooseMG(deliverygoodsid);
|
|
|
|
|
+ formState.PlanQty = String(planqty);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ function submit(OperateType: 1 | 2) {
|
|
|
|
|
+ formRef.value
|
|
|
|
|
+ .validate()
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ const param = toRaw(formState);
|
|
|
|
|
+ const loginId = getLongTypeLoginID() as LongType;
|
|
|
|
|
+ const userid = APP.get('userAccount').memberuserid;
|
|
|
|
|
+ const reqParam: ErmcpHedgePlanReq = {
|
|
|
|
|
+ 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
|
|
|
|
|
+ };
|
|
|
|
|
+ changeStatus(reqParam, OperateType, loading).then(() => {
|
|
|
|
|
+ cancel();
|
|
|
|
|
+ context.emit('refresh', true);
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log('param', param);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error: ValidateErrorEntity<FormState>) => {
|
|
|
|
|
+ console.log('error', error);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- initData(() => {});
|
|
|
|
|
|
|
+ initData(() => {
|
|
|
|
|
+ getDG();
|
|
|
|
|
+ getRoleList();
|
|
|
|
|
+ });
|
|
|
return {
|
|
return {
|
|
|
visible,
|
|
visible,
|
|
|
cancel,
|
|
cancel,
|
|
|
submit,
|
|
submit,
|
|
|
loading,
|
|
loading,
|
|
|
|
|
+ planTye,
|
|
|
|
|
+ DGList,
|
|
|
|
|
+ gmlist,
|
|
|
|
|
+ chooseMG,
|
|
|
|
|
+ traderList,
|
|
|
|
|
+ priceTyep,
|
|
|
|
|
+ formRef,
|
|
|
|
|
+ formState,
|
|
|
|
|
+ rules,
|
|
|
|
|
+ chooseWR,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|