huangbin hace 4 años
padre
commit
2f2f0bd8a7

+ 7 - 35
src/views/information/spot-contract/components/add/index.vue

@@ -221,7 +221,7 @@
                         placeholder="请选择结算币种">
                 <a-select-option v-for="item in payCurrency"
                                  :key="item.enumdicid"
-                                 :value="item.enumdicname">
+                                 :value="item.enumdicid">
                   {{item.enumdicname}}
                 </a-select-option>
               </a-select>
@@ -321,21 +321,6 @@
                                 :disabled-date="disabledDate"
                                 :show-time="{hideDisabledOptions: true}"
                                 format="YYYY-MM-DD" />
-                <!-- <a-select class="inlineFormSelect"
-                          style="width: 95px"
-                          placeholder="请选择定价类型">
-                  <a-select-option value="1">
-                    日期一
-                  </a-select-option>
-                </a-select>
-                <span class="to">-</span>
-                <a-select class="inlineFormSelect"
-                          style="width: 95px"
-                          placeholder="请选择定价类型">
-                  <a-select-option value="1">
-                    日期二
-                  </a-select-option>
-                </a-select> -->
               </a-form-item>
             </a-col>
           </template>
@@ -415,15 +400,7 @@
 import { defineComponent, ref, toRaw } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods';
-import {
-    handleFromState,
-    handleContract,
-    handlevalidate,
-    handleDeliveryGoods,
-    handlePrice,
-    handleDate,
-    addContractReq
-} from './setup';
+import { handleFromState, handleContract, handlevalidate, handleDeliveryGoods, handlePrice, handleDate, addContractReq } from './setup';
 import { getUserName } from '@/services/bus/user';
 import { getGoodsList } from '@/services/bus/goods';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
@@ -436,7 +413,7 @@ export default defineComponent({
     components: {},
     setup() {
         const { visible, cancel } = closeModal('spot_contract_btn_add');
-        const {loading, sendReq} = addContractReq();
+        const { loading, sendReq } = addContractReq();
 
         // 表单
         const formRef = ref();
@@ -477,10 +454,6 @@ export default defineComponent({
                 .then(() => {
                     const param = toRaw(formState);
 
-                    // console.log('deliveryDate', moment(deliveryDate.value[0], 'YYYY/MM/DD'));
-                    // console.log('priceDate', priceDate);
-                    // console.log('values', formState);
-
                     // 交收期
                     const dDate = deliveryDate.value;
                     if (dDate.length) {
@@ -500,12 +473,10 @@ export default defineComponent({
                     console.log('values', formState);
 
                     sendReq(param, OperateType)
-                        .then(res =>{
-                            cancel()
-                        })
-                        .catch(err =>{
-
+                        .then((res) => {
+                            cancel();
                         })
+                        .catch((err) => {});
                 })
                 .catch((error: ValidateErrorEntity<FormState>) => {
                     console.log('error', error);
@@ -515,6 +486,7 @@ export default defineComponent({
             queryCustomList();
             getDeliveryGoods();
             goodsList.value = getGoodsList();
+            console.log('goodsList.value', goodsList.value);
         });
         return {
             visible,

+ 0 - 1
src/views/information/spot-contract/components/add/interface.ts

@@ -21,7 +21,6 @@ export interface FormState {
     DeliveryEndDate: string // string 交收期(结束)
     PriceMove: number | null// double 升贴水[2:点价3:暂定价]
     GoodsID: number | undefined // uint64 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
-    // PriceMove: number// double 升贴水[2:点价3:暂定价]
     StartDate: string // string 点价开始日期[2:点价3:暂定价]
     EndDate: string // string 点价结束日期[2:点价3:暂定价]
     // PointDesc: string // string 点价备注[2:点价3:暂定价]