瀏覽代碼

添加套期保值模块

leafydream 4 年之前
父節點
當前提交
cd0bf2088c

+ 6 - 1
public/config/readMe.txt

@@ -15,6 +15,9 @@ http://192.168.30.211:8080/cfg?key=test_211
 
 仓单贸易:"apiUrl": "http://192.168.31.118:8080/cfg?key=test_118"
 
+平安期货:"apiUrl": "http://192.168.30.125:8080/cfg?key=test_125"
+
+
 31.175 账号 
     110000000001
     199990000012
@@ -45,4 +48,6 @@ http://192.168.30.211:8080/cfg?key=test_211
     120000000001 
     110000000002 
     199990000001 
-    188880000001 
+    188880000001 
+
+  

+ 7 - 1
src/router/index.ts

@@ -1046,7 +1046,13 @@ const routes: Array<RouteRecordRaw> = [
                         ]
                     },
                 ]
-            }
+            },
+            {
+              path: '/hedging/entry_of_spot_information',
+              name: '',
+              component: () => import('@/views/hedging/entry_of_spot_information/index.vue'),
+              
+            },
         ],
     },
     {

+ 262 - 0
src/views/hedging/entry_of_spot_information/index.vue

@@ -0,0 +1,262 @@
+<template>
+  <div >
+    <a-form class="inlineForm"
+    >
+      <fieldset class="formFieldSet">
+        <legend>基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+           <a-form-item label="采销类型"
+                         name="unitid">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        v-model="basicInfo.procurementType"
+                        placeholder="请选择采销类型">
+                <a-select-option v-for="item in procurementTypes"
+                  :value="item.id"
+                  :key="item.id"
+                >
+                  {{item.name}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="销售方"
+                         name="deliverygoodscode">
+              <a-select class="inlineFormSelect"
+                  style="width: 200px"
+                  placeholder="请选择客户">
+                <a-select-option v-for="item in sellerList"
+                  :value="item.id"
+                  :key="item.sellerName"
+                >
+                  {{item.sellerName}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="交易主体"
+                         name="deliverygoodsname">
+             <a-select class="inlineFormSelect"
+                  style="width: 200px"
+                  placeholder="请选择交易主体">
+                <a-select-option v-for="item in subjects"
+                  :value="item.id"
+                  :key="item.subjectName"
+                >
+                  {{item.subjectName}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+
+      <fieldset class="formFieldSet">
+        <legend>现货信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+           <a-form-item label="现货品种"
+                         name="unitid">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择单位">
+                <!-- <a-select-option v-for="item in unitList"
+                                 :value="item.enumitemname"
+                                 :key="item.enumitemname">
+                  {{item.enumdicname}}
+                </a-select-option> -->
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+          <a-col :span="12">
+            <a-form-item label="现货商品"
+                         name="deliverygoodscode">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+
+                       placeholder="请输入现货品种代码" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="品牌"
+                         name="deliverygoodsname">
+              <a-input class="dialogInput"
+
+                       style="width: 200px"
+                       placeholder="请输入现货品种名称" />
+            </a-form-item>
+          </a-col>
+
+           <a-col :span="12">
+            <a-form-item label="标仓系数"
+                         name="deliverygoodscode">
+              <span>666</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+
+         <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="现货商品数量"
+                         name="deliverygoodsname">
+              <a-input class="dialogInput"
+
+                       style="width: 200px"
+                       placeholder="请输入现货品种名称" />
+                       <span>单位</span>
+            </a-form-item>
+          </a-col>
+
+           <a-col :span="12">
+            <a-form-item label="套保品种数量"
+                         name="deliverygoodscode">
+              <span>单位</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+
+      <fieldset class="formFieldSet">
+        <legend>价格信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+           <a-form-item label="定价类型"
+                         name="unitid">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择单位">
+                <!-- <a-select-option v-for="item in unitList"
+                                 :value="item.enumitemname"
+                                 :key="item.enumitemname">
+                  {{item.enumdicname}}
+                </a-select-option> -->
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+          <a-col :span="12">
+           <a-form-item label="结算币种"
+                         name="unitid">
+              <span>人命币</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="基价"
+                         name="deliverygoodscode">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+
+                       placeholder="请输入现货品种代码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="升贴水"
+                         name="deliverygoodsname">
+              <a-input class="dialogInput"
+
+                       style="width: 200px"
+                       placeholder="请输入现货品种名称" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+
+      <fieldset class="formFieldSet">
+        <legend>其他信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+           <a-form-item label="业务员"
+                         name="unitid">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择单位">
+                <!-- <a-select-option v-for="item in unitList"
+                                 :value="item.enumitemname"
+                                 :key="item.enumitemname">
+                  {{item.enumdicname}}
+                </a-select-option> -->
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+          <a-col :span="12">
+            <a-form-item label="业务归属部门"
+                         name="unitid">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择单位">
+                <!-- <a-select-option v-for="item in unitList"
+                                 :value="item.enumitemname"
+                                 :key="item.enumitemname">
+                  {{item.enumdicname}}
+                </a-select-option> -->
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+
+      <a-button key="submit"
+        type="primary"
+      >提交
+      </a-button>
+
+    </a-form>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, reactive, ref, unref, onMounted, watch } from 'vue';
+import useEntrySpotInfoEvent from './useEntrySpotInfoEvent';
+import useFormValue from './useFormValue';
+
+export default defineComponent({
+    name: 'entrySpotInfo',
+    components: {},
+    setup() {
+      const { onChangeType } = useEntrySpotInfoEvent();
+      const { 
+        procurementTypes, sellerList, subjects,
+        basicInfo
+      } = useFormValue();
+
+
+      watch(procurementTypes, value => {
+       basicInfo.procurementType = value[0].id;
+        console.log(`value`, value)
+      });
+
+
+      watch(basicInfo, (value) => {
+        console.log(`value`, value)
+      });
+
+
+      return {
+        procurementTypes,
+        sellerList,
+        subjects,
+        basicInfo,
+
+        onChangeType
+      }
+    },
+});
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 16 - 0
src/views/hedging/entry_of_spot_information/useEntrySpotInfoEvent.ts

@@ -0,0 +1,16 @@
+import { reactive, ref, unref } from 'vue';
+
+const useEntrySpotInfoEvent = () => {
+
+  const onChangeType = (value: string) => {
+    console.log('value ===> ', value);
+
+    
+  }
+
+  return {
+    onChangeType
+  }
+};
+
+export default useEntrySpotInfoEvent;

+ 56 - 0
src/views/hedging/entry_of_spot_information/useFormValue.ts

@@ -0,0 +1,56 @@
+import { reactive, ref, unref } from 'vue';
+
+const Types = [
+  {
+    id: 1,
+    name: '采购',
+  },
+  {
+    id: 2,
+    name: '采购1',
+  }
+];
+
+const SellerList = [
+  {
+    id: 1,
+    sellerName: '销售方1',
+  },
+  {
+    id: 2,
+    sellerName: '销售方2',
+  }
+];
+
+const Subjects = [
+  {
+    id: 1,
+    subjectName: '主体1',
+  },
+  {
+    id: 2,
+    subjectName: '主体2',
+  }
+];
+
+const useFormValue = () => {
+  const procurementTypes = reactive(Types);
+  const sellerList = reactive(SellerList);
+  const subjects = reactive(Subjects);
+
+  const basicInfo = reactive({
+    procurementType: 0,
+    sellerName: '',
+    subject: ''
+  });
+
+  return {
+    procurementTypes,
+    sellerList,
+    subjects,
+
+    basicInfo
+  }
+};
+
+export default useFormValue;