li.shaoyi 4 anos atrás
pai
commit
100cd11c6c

+ 6 - 26
src/views/business/plan/components/delete/index.vue

@@ -1,24 +1,11 @@
 <template>
   <!-- 删除计划-->
-  <a-modal class="commonModal fieldsetDialog plan_uncommitted_delete"
-           title="删除计划"
-           centered
-           v-model:visible="visible"
-           @cancel="cancel"
-           width="890px">
+  <a-modal class="commonModal fieldsetDialog plan_uncommitted_delete" title="删除计划" centered v-model:visible="visible" @cancel="cancel" width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">删除</a-button>
-      <a-button key="cancel"
-                type="primary"
-                :loading="loading"
-                @click="cancel">取消</a-button>
+      <a-button key="submit" type="primary" :loading="loading" @click="submit">删除</a-button>
+      <a-button key="cancel" type="primary" :loading="loading" @click="cancel">取消</a-button>
     </template>
-    <a-form class="inlineForm"
-            :form="form"
-            @submit="handleSearch">
+    <a-form class="inlineForm" :form="form" @submit="handleSearch">
       <fieldset class="formFieldSet">
         <legend>套保计划</legend>
         <a-row :gutter="24">
@@ -72,8 +59,7 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="状态">
-              <span
-                    class="white">{{ formatValue(getPlanStatusName(selectedRow.hedgeplanstatus)) }}</span>
+              <span class="white">{{ formatValue(getPlanStatusName(selectedRow.hedgeplanstatus)) }}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -164,10 +150,4 @@ export default defineComponent({
         };
     },
 });
-</script>
-
-<style lang="less">
-.plan_uncommitted_delete {
-}
-</style
->;
+</script>

+ 31 - 100
src/views/business/plan/components/recommit/index.vue

@@ -1,136 +1,74 @@
 <template>
   <!-- 计划 重新提交-->
-  <a-modal class="commonModal plan-recommit"
-           title="重新提交"
-           v-model:visible="visible"
-           centered
-           @cancel="cancel"
-           width="890px">
+  <a-modal class="commonModal plan-recommit" title="重新提交" v-model:visible="visible" centered @cancel="cancel" width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">完成</a-button>
+      <a-button key="submit" type="primary" :loading="loading" @click="submit">完成</a-button>
     </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-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">
+          <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-form-item>
         </a-col>
         <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-col>
         <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">
+          <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>
           </a-form-item>
         </a-col>
         <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">
+          <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-col>
         <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="标仓系数" name="">
+            <a-input class="dialogInput ConvertFactor" v-model:value="formState.ConvertFactor" readonly style="width: 200px" placeholder="请输入标仓系数" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="计划量"
-                       class="relative"
-                       name="PlanQty">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     v-model:value="formState.PlanQty"
-                     placeholder="请输入计划量" />
+          <a-form-item label="计划量" class="relative" name="PlanQty">
+            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.PlanQty" placeholder="请输入计划量" />
           </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">
+          <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-form-item>
         </a-col>
         <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">
+          <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-form-item>
         </a-col>
         <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-col>
       </a-row>
@@ -140,7 +78,7 @@
 
 <script lang="ts">
 import { defineComponent, PropType, ref, watchEffect } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
+import { _closeModal } from '@/common/setup/modal/modal';
 import { formatTime } from '@/common/methods/index';
 import { getPayCurrencyTypeEnumList, getSpotContractTypeEnumList } from '@/common/constants/enumsList';
 import { AllEnums } from '@/services/go/commonService/interface';
@@ -159,7 +97,7 @@ import { handlerManagerList } from '@/common/setup/user';
 
 export default defineComponent({
     name: 'plan-recommit',
-    emits:['refresh'],
+    emits: ['cancel', 'update'],
     components: {},
     props: {
         selectedRow: {
@@ -168,7 +106,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const { visible, cancel } = closeModal('plan_uncommitted_recommit');
+        const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         const planTye = ref<AllEnums[]>(getSpotContractTypeEnumList());
         // 表单
@@ -216,8 +154,7 @@ export default defineComponent({
                     Tradeuserid: param.Tradeuserid, // 交易用户id
                 };
                 requestResultLoadingAndInfo(hedgePlanReq, reqParam, loading, ['重新提交计划成功', '重新提交计划失败:']).then(() => {
-                    context.emit('refresh');
-                    cancel();
+                    cancel(true);
                 });
             });
         }
@@ -239,10 +176,4 @@ export default defineComponent({
         };
     },
 });
-</script>
-
-<style lang="less">
-.plan-recommit {
-}
-</style
->;
+</script>