Ver Fonte

现货品种新增

huangbin há 4 anos atrás
pai
commit
1aeda530b6

+ 1 - 0
src/common/setup/modal/interface.ts

@@ -17,5 +17,6 @@ export interface ModalName {
     deleteSpotContract: string; // 删除现货合同
     spotContractDetail: string; // 现货合同详情
 
+    addGoods: string; // 新增商品
 
 }

+ 1 - 2
src/views/information/goods/components/addSpotVariety/index.vue → src/views/information/goods/components/add/index.vue

@@ -193,8 +193,7 @@ export default defineComponent({
     name: 'addSpotVariety',
     components: {},
     setup() {
-        const { visible, cancel } = closeModal('addSpotVariety');
-        const { openAction: addAction } = openModal('addSpotVariety');
+        const { visible, cancel } = closeModal('addGoods');
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;

+ 31 - 25
src/views/information/goods/list/spot-variety/index.vue

@@ -2,16 +2,19 @@
   <!-- 现货品种 -->
   <div class="spot-variety">
     <filterCustomTable @search="search">
-        <a-button class="operBtn" @click="openAction">新增</a-button>
+      <a-button class="operBtn"
+                @click="addAction">新增</a-button>
     </filterCustomTable>
     <div class="spotTableCont">
       <div class="leftSpot">
-       <leftMenu></leftMenu>
+        <leftMenu></leftMenu>
       </div>
       <div class="rightCont">
         <rightSpot></rightSpot>
       </div>
     </div>
+    <!-- 新增商品 -->
+    <AddGoods />
   </div>
 </template>
 
@@ -21,46 +24,49 @@ import { defineComponent } from 'vue';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import leftMenu from '@/views/information/goods/components/leftMenu/index.vue';
 import rightSpot from '@/views/information/goods/components/rightSpot/index.vue';
-
+import { openModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
+import AddGoods from '@/views/information/goods/components/add/index.vue';
 
 export default defineComponent({
     name: 'spot-variety',
     components: {
-      filterCustomTable,
-      leftMenu,
-      rightSpot
+        filterCustomTable,
+        leftMenu,
+        rightSpot,
+        AddGoods,
     },
     setup() {
+        const { openAction: addAction } = openModal('addGoods');
         initData(() => {
             // 加载数据在这里
         });
-        return {};
+        return { addAction };
     },
 });
 </script>
 
 <style lang="less">
 .spot-variety {
-  width: 100%;
-  height: 100%;
-  .flex;
-  flex-direction: column;
-  .spotTableCont {
     width: 100%;
-    height: calc(100% - 45px);
-    overflow-y: auto;
-    .inlineflex;
-    .leftSpot {
-      width: 180px;
-      height: 100%;
-      background: @m-black4;
-    }
-    .rightCont {
-      flex: 1;
-      height: 100%;
-      background: @m-black2;
+    height: 100%;
+    .flex;
+    flex-direction: column;
+    .spotTableCont {
+        width: 100%;
+        height: calc(100% - 45px);
+        overflow-y: auto;
+        .inlineflex;
+        .leftSpot {
+            width: 180px;
+            height: 100%;
+            background: @m-black4;
+        }
+        .rightCont {
+            flex: 1;
+            height: 100%;
+            background: @m-black2;
+        }
     }
-  }
 }
 </style>;