Browse Source

重新提交现货合同

huangbin 4 years ago
parent
commit
da0b273f57
1 changed files with 14 additions and 2 deletions
  1. 14 2
      src/views/information/spot-contract/components/modify/index.vue

+ 14 - 2
src/views/information/spot-contract/components/modify/index.vue

@@ -419,7 +419,7 @@ import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 import { FormState } from '../interface';
 import { formatTime } from '@/common/methods/format';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
-import { Moment } from 'moment';
+import moment, { Moment } from 'moment';
 import { handleFormRule, handleContract, handleDeliveryGoods, handleAmout, handlePrice, handleDate, handleFromState } from '../setup';
 import { addContractReq } from '@/views/information/spot-contract/components/add/setup';
 import { mergeTwoObj } from '@/utils/objHandle';
@@ -480,7 +480,7 @@ export default defineComponent({
                 queryTradeManager();
                 mergeTwoObj(formState, props.selectedRow);
                 isSell.value = formState.ContractType === 1 ? false : true;
-                const { deliverygoodsid, qty, price, wrstandardid, spotgoodsbrandid, currencyid, attachment } = props.selectedRow;
+                const { deliverygoodsid, qty, price, wrstandardid, spotgoodsbrandid, currencyid, attachment, deliverystartdate, deliveryenddate, startdate, enddate } = props.selectedRow;
                 if (deliverygoodsid) {
                     deliveryGoodsChange(deliverygoodsid);
                     if (wrstandardid) {
@@ -493,6 +493,18 @@ export default defineComponent({
                 formState.Price = price.toString();
                 formState.CurrencyID = currencyid;
                 formState.ContractAttachment = attachment;
+                if (deliverystartdate) {
+                    deliveryDate.value.push(moment(deliverystartdate));
+                }
+                if (deliveryenddate) {
+                    deliveryDate.value.push(moment(deliveryenddate));
+                }
+                if (startdate) {
+                    priceDate.value.push(moment(startdate));
+                }
+                if (enddate) {
+                    priceDate.value.push(moment(enddate));
+                }
                 if (attachment) {
                     uploadImgList.value = handleImg(attachment);
                 }