|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
- <!-- 修改现货合同-->
|
|
|
+ <!-- 重新提交现货合同-->
|
|
|
<a-modal class="commonModal modify-custom"
|
|
|
- title="修改现货合同"
|
|
|
+ title="重新提交现货合同"
|
|
|
v-if="visible"
|
|
|
v-model:visible="visible"
|
|
|
@cancel="cancel"
|
|
|
@@ -418,7 +418,8 @@ import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
|
|
|
import { handleAccountManager } from '../setup';
|
|
|
import { Moment } from 'moment';
|
|
|
import { handleFormRule, handleContract, handleDeliveryGoods, handleAmout, handlePrice, handleDate, handleFromState } from '../setup';
|
|
|
-import {addContractReq} from "@/views/information/spot-contract/components/add/setup";
|
|
|
+import { addContractReq } from '@/views/information/spot-contract/components/add/setup';
|
|
|
+import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
|
|
|
interface Obj {
|
|
|
[props: string]: any;
|
|
|
@@ -463,18 +464,11 @@ export default defineComponent({
|
|
|
// formState.ContractAttachment = new Uint8Array()
|
|
|
// formState.SpotGoodsBrandID = +props.selectedRow.spotcontractid
|
|
|
if (props.selectedRow.contractno) {
|
|
|
- // 处理第一次加载的
|
|
|
- const obj: Obj = {};
|
|
|
- Object.keys(formState).forEach((el) => {
|
|
|
- const key = el.toLocaleLowerCase() as keyof Ermcp3ContractRsp;
|
|
|
- if (Reflect.has(props.selectedRow, key)) {
|
|
|
- obj[el] = props.selectedRow[key];
|
|
|
- } else {
|
|
|
- console.warn(`${key}不对应`);
|
|
|
- }
|
|
|
- });
|
|
|
- Object.assign(formState, obj);
|
|
|
- props.selectedRow.deliverygoodsid && deliveryGoodsChange(props.selectedRow.deliverygoodsid);
|
|
|
+ mergeTwoObj(formState, props.selectedRow);
|
|
|
+ const { deliverygoodsid, qty, price } = props.selectedRow;
|
|
|
+ deliverygoodsid && deliveryGoodsChange(deliverygoodsid);
|
|
|
+ formState.Qty = qty.toString();
|
|
|
+ formState.Price = price.toString();
|
|
|
}
|
|
|
});
|
|
|
function submit() {
|