Explorar o código

commit 套保计划详情

xkwg %!s(int64=4) %!d(string=hai) anos
pai
achega
583df56b30

+ 20 - 82
src/views/business/plan/compoments/detail/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <!-- 客户资料详情-->
+  <!-- 套保计划详情-->
   <a-modal class="add-custom custom-detail"
-           title="客户资料详情"
+           title="套保计划详情"
            v-model:visible="visible"
            @cancel="cancel"
            width="890px">
@@ -16,89 +16,37 @@
             @submit="handleSearch">
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="客户类型">
-            <span class="white">{{ detail.userinfotype === '2' ? '企业' : '个人' }}</span>
+          <a-form-item label="计划类型">
+            <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="企业名称">
-            <span class="white">{{ detail.customername }}</span>
+          <a-form-item label="计划名称">
+            <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="企业简称">
-            <span class="white">{{ detail.nickname }}</span>
+          <a-form-item label="现货品种">
+            <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="证件类型">
-            <span class="white">{{ detail.cardtypename }}</span>
+          <a-form-item label="标仓系数">
+            <span class="white">{{ formatValue(selectedRow.convertfactor) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="法定代表人">
-            <span class="white">{{ detail.legalpersonname }}</span>
+          <a-form-item label="计划量">
+            <span class="white">{{ formatValue(selectedRow.planqty) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="证件号码">
-            <span class="white">{{ detail.cardnum }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="纳税人识别号">
-            <span class="white">{{ detail.taxpayernum }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="营业执照">
-            <div class="upload">
-                <div class="look">查看附件</div>
-            </div>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ detail.contactname }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人手机号">
-            <span class="white">{{ detail.mobile }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ detail.telphone }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="状态">
-            <span class="green">{{ detail.status }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="通讯地址">
-            <span class="white">{{ detail.address }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
           <a-form-item label="备注">
-            <span class="white">{{ detail.remark }}</span>
+            <span class="white">{{ formatValue(selectedRow.remark) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -112,33 +60,21 @@ import { closeModal } from '@/common/setup/modal/index';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
 import {getStatusName} from "@/views/information/custom/setup";
+import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
+import {formatValue} from "@/common/methods";
+import {getPlanContractType} from "@/views/business/plan/setup";
 
 export default defineComponent({
     name: 'custom-detail',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<Ermcp3HedgePlan>,
             default: {},
         },
     },
-    setup(props) {
+    setup() {
         const { visible, cancel } = closeModal('detail');
-        const detail = reactive({
-            nickname: props.selectedRow.nickname || '--',
-            userinfotype: props.selectedRow.userinfotype || '--',
-            customername: props.selectedRow.customername || '--',
-            cardtypename: props.selectedRow.cardtypename || '--',
-            legalpersonname: props.selectedRow.legalpersonname || '--',
-            cardnum: props.selectedRow.cardnum || '--',
-            taxpayernum: props.selectedRow.taxpayernum || '--',
-            contactname: props.selectedRow.contactname || '--',
-            mobile: props.selectedRow.mobile || '--',
-            telphone: props.selectedRow.telphone || '--',
-            status: getStatusName(props.selectedRow.status) || '--',
-            address: props.selectedRow.address || '--',
-            remark: props.selectedRow.remark || '--'
-        });
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;
@@ -153,6 +89,8 @@ export default defineComponent({
             submit,
             loading,
             detail,
+            formatValue,
+            getPlanContractType,
         };
     },
 

+ 16 - 0
src/views/business/plan/setup.ts

@@ -0,0 +1,16 @@
+/**
+ * 计划类型 - 1:采购 -1:销售
+ * @param contracttype 返回计划类型
+ */
+export function getPlanContractType(contracttype: number): string{
+    let result = "--";
+    switch (contracttype) {
+        case 1:
+            result = "套保采购计划";
+            break
+        case 2:
+            result = "套保销售计划";
+            break
+    }
+    return result
+}

+ 2 - 3
src/views/business/purchase/components/detail/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <!-- 采购详情-->
+    <!-- 采购合同详情-->
     <a-modal class="custom-detail"
              title="详情"
              v-model:visible="visible"
@@ -24,7 +24,7 @@
                         </a-form-item>
                     </a-col>
                     <a-col :span="12">
-                        <a-form-item label="定价类型">
+                        <a-form-item label="合同类型">
                             <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
                         </a-form-item>
                     </a-col>
@@ -101,7 +101,6 @@
 <script lang="ts">
 import {defineComponent, PropType, ref} from 'vue';
 import {closeModal} from '@/common/setup/modal/index';
-import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
 import {formatValue} from "@/common/methods";
 import {Ermcp3SellBuyContract} from "@/services/go/ermcp/purchase/interface";
 import {getPriceTypeName} from "@/views/business/purchase/setup";