浏览代码

更新数字金融超市

wuhongyuq 5 年之前
父节点
当前提交
58a887db19

+ 1 - 1
src/layout/companyidentify/detailInfo.vue

@@ -11,7 +11,7 @@
           </el-form-item>
           <span v-if="ruleForm.status === '1' || ruleForm.status === '1'">
             <el-form-item label="认证状态:">
-              <span>{{ ruleForm.status }}</span>
+              <span>{{ ruleForm.status === '0' ? '认证中' : ruleForm.status === '1' ? '认证通过' : '认证失败' }}</span>
             </el-form-item>
           </span>
           <el-form-item label="成立日期:">

+ 1 - 1
src/layout/companyup/detailInfo.vue

@@ -8,7 +8,7 @@
           </el-form-item>
           <span v-if="ruleForm.status === '1' || ruleForm.status === '2'">
             <el-form-item label="审核状态:">
-              <span>{{ ruleForm.status }}</span>
+              <span>{{ ruleForm.status === '0' ? '审核中' : ruleForm.status === '1' ? '审核通过' : '审核拒绝' }}</span>
             </el-form-item>
           </span>
           <el-form-item label="企业简介:">

+ 0 - 1
src/layout/institution/newsInfo.vue

@@ -13,7 +13,6 @@
             </template>
           </el-table-column>
 
-          <el-table-column property="english_name" label="机构英文名称" align="center"> </el-table-column>
           <el-table-column property="profession" label="所属行业" align="center"> </el-table-column>
           <el-table-column property="representative" label="法定代表人" align="center"> </el-table-column>
 

+ 5 - 5
src/layout/layout-part/menus.vue

@@ -2,17 +2,17 @@
   <div id="menus">
     <el-menu :default-active="thisRouter()" class="el-menu-vertical-demo" :router="false" :default-openeds="defalutMenu" @select="to">
       <el-menu-item index="/"> <i class="el-icon-s-grid"></i>首页 </el-menu-item>
-      <el-menu-item index="/supermarket/debt"> <i class="el-icon-s-grid"></i>金融数字超市</el-menu-item>
-      <!-- <el-submenu index="1">
-     <template v-slot:title>
+
+      <el-submenu index="1">
+        <template v-slot:title>
           <i class="el-icon-s-grid"></i>
           <span>金融数字超市</span>
         </template>
         <el-menu-item-group>
           <el-menu-item index="/supermarket/debt">债权产品</el-menu-item>
           <el-menu-item index="/supermarket/stock">股权产品</el-menu-item>
-        </el-menu-item-group> 
-      </el-submenu> -->
+        </el-menu-item-group>
+      </el-submenu>
       <el-submenu index="2">
         <template v-slot:title>
           <i class="el-icon-s-grid"></i>

+ 84 - 0
src/layout/supermarket/detailInfo.vue

@@ -0,0 +1,84 @@
+<template>
+  <div id="detailInfo">
+    <el-row>
+      <el-col :span="24">
+        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+          <el-form-item label="产品名称:">
+            <span>{{ ruleForm.name }}</span>
+          </el-form-item>
+          <span v-if="ruleForm.status === '1' || ruleForm.status === '2'">
+            <el-form-item label="发布状态:">
+              <span>{{ ruleForm.status === '0' ? '未发布' : ruleForm.status === '1' ? '发布' : '下架' }}</span>
+            </el-form-item>
+          </span>
+
+          <el-form-item label="是否热门:">
+            <span>{{ ruleForm.top === '0' ? '非热门推荐' : ruleForm.top === '1' ? '热门推荐' : '' }}</span>
+          </el-form-item>
+          <el-form-item label="发布时间:">
+            <span>{{ ruleForm.publish_time }}</span>
+          </el-form-item>
+          <el-form-item label="利率范围:">
+            <span>{{ ruleForm.mongey_min_rate }}</span
+            >-<span>{{ ruleForm.mongey_max_rate }}</span>
+          </el-form-item>
+
+          <el-form-item label="贷款期限:">
+            <span>{{ ruleForm.claims_min_term }}</span
+            >-<span>{{ ruleForm.claims_max_term }}</span>
+          </el-form-item>
+          <el-form-item label="贷款额度:">
+            <span>{{ ruleForm.claims_min_money }}</span
+            >-<span>{{ ruleForm.claims_max_money }}</span>
+          </el-form-item>
+
+          <el-form-item label="担保方式:">
+            <span>{{ ruleForm.ensure_id }}</span
+            >-<span>{{ ruleForm.claims_max_money }}</span>
+          </el-form-item>
+          <el-form-item label="产品简介:">
+            <el-col v-for="(tag, index) in ruleForm.news" :key="index">
+              <el-col :span="18">
+                <el-col :span="24" class="score"> 简介名称{{ tag.news_name }} </el-col>
+                <el-col :span="24" class="score"> 简介内容 {{ tag.news_info }}分</el-col>
+              </el-col>
+            </el-col>
+          </el-form-item>
+
+          <el-form-item>
+            <span v-if="ruleForm.status === '0'">
+              <el-button type="primary" @click="submitForm('ruleForm')">发布</el-button>
+            </span>
+            <span v-if="ruleForm.status === '1'">
+              <el-button type="danger" @click="resetForm('ruleForm')">下架</el-button>
+            </span>
+          </el-form-item>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'detailInfo',
+  props: {
+    ruleForm: null,
+    rules: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    submitForm(ruleForm) {
+      this.$emit('submitForm', { data: this.ruleForm });
+    },
+    resetForm(ruleForm) {
+      this.$emit('resetForm', { data: this.ruleForm });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 53 - 0
src/layout/supermarket/detailInfos.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="detailInfo">
+    <el-row>
+      <el-col :span="24">
+        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+          <el-form-item label="产品名称:">
+            <span>{{ ruleForm.name }}</span>
+          </el-form-item>
+          <span v-if="ruleForm.status === '1' || ruleForm.status === '2'">
+            <el-form-item label="发布状态:">
+              <span>{{ ruleForm.status === '0' ? '未发布' : ruleForm.status === '1' ? '发布' : '下架' }}</span>
+            </el-form-item>
+          </span>
+          <el-form-item label="图片:">
+            <el-image :src="ruleForm.pic"></el-image>
+          </el-form-item>
+          <el-form-item>
+            <span v-if="ruleForm.status === '0'">
+              <el-button type="primary" @click="submitForm('ruleForm')">发布</el-button>
+            </span>
+            <span v-if="ruleForm.status === '1'">
+              <el-button type="danger" @click="resetForm('ruleForm')">下架</el-button>
+            </span>
+          </el-form-item>
+        </el-form>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'detailInfo',
+  props: {
+    ruleForm: null,
+    rules: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    submitForm(ruleForm) {
+      this.$emit('submitForm', { data: this.ruleForm });
+    },
+    resetForm(ruleForm) {
+      this.$emit('resetForm', { data: this.ruleForm });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 23 - 4
src/layout/supermarket/newsInfo.vue

@@ -22,8 +22,14 @@
                   </template>
                 </el-table-column>
 
+                <el-table-column label="是否热门" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.top === '0' ? '热门产品' : scope.row.status === '1' ? '非热门产品' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
                 <el-table-column property="publish_time" label="发布时间" align="center"> </el-table-column>
-                <el-table-column property="mongey_max_rate" label="贷款期限(小)" align="center"> </el-table-column>
+
                 <el-table-column fixed="right" label="操作" align="center">
                   <template slot-scope="scope">
                     <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
@@ -59,9 +65,13 @@
                     <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
                   </template>
                 </el-table-column>
-
+                <el-table-column label="是否热门" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.top === '0' ? '热门产品' : scope.row.status === '1' ? '非热门产品' : '下架' }}</span>
+                  </template>
+                </el-table-column>
                 <el-table-column property="publish_time" label="发布时间" align="center"> </el-table-column>
-                <el-table-column property="mongey_max_rate" label="贷款期限(小)" align="center"> </el-table-column>
+
                 <el-table-column fixed="right" label="操作" align="center">
                   <template slot-scope="scope">
                     <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
@@ -97,13 +107,18 @@
                     <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column label="是否热门" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.top === '0' ? '热门产品' : scope.row.status === '1' ? '非热门产品' : '下架' }}</span>
+                  </template>
+                </el-table-column>
 
                 <el-table-column property="publish_time" label="发布时间" align="center"> </el-table-column>
                 <el-table-column property="mongey_max_rate" label="贷款期限(小)" align="center"> </el-table-column>
                 <el-table-column fixed="right" label="操作" align="center">
                   <template slot-scope="scope">
                     <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
-                    <el-button @click="clickRest(scope.row.id)" type="text"><i class="el-icon-refresh"></i></el-button>
+                    <el-button @click="clickRest(scope.row)" type="text"><i class="el-icon-refresh"></i></el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -161,6 +176,10 @@ export default {
 
       this.$emit('handleClick', newid);
     },
+    clickRest(id) {
+      let newid = id.id;
+      this.$emit('clickRest', newid);
+    },
   },
 };
 </script>

+ 196 - 0
src/layout/supermarket/newsInfos.vue

@@ -0,0 +1,196 @@
+<template>
+  <div id="newsInfo">
+    <el-row>
+      <el-col :span="24">
+        <template>
+          <el-tabs v-model="activeName" @tab-click="handleClicks">
+            <el-tab-pane label="未发布" name="first">
+              <el-col :span="24" class="info">
+                <el-col :span="10" class="input">
+                  <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
+                </el-col>
+                <el-col :span="2" class="btn">
+                  <el-button type="primary" icon="el-icon-search" circle></el-button>
+                </el-col>
+              </el-col>
+              <el-table ref="debtTable" :data="debtTable" style="width: 100%" border>
+                <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+
+                <el-table-column label="图片" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px"> <el-image :src="scope.row.pic"></el-image></span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column label="状态" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column fixed="right" label="操作" align="center">
+                  <template slot-scope="scope">
+                    <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
+                    <el-button @click="clickRest(scope.row)" type="text"><i class="el-icon-refresh"></i></el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-col class="page" :span="24">
+                <el-pagination
+                  @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total,  prev, pager, next, jumper"
+                  :total="total"
+                >
+                </el-pagination>
+              </el-col>
+            </el-tab-pane>
+            <el-tab-pane label="发布" name="second">
+              <el-col :span="24" class="info">
+                <el-col :span="10" class="input">
+                  <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
+                </el-col>
+                <el-col :span="2" class="btn">
+                  <el-button type="primary" icon="el-icon-search" circle></el-button>
+                </el-col>
+              </el-col>
+              <el-table ref="shenheTable" :data="shenheTable" style="width: 100%" border>
+                <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+
+                <el-table-column label="图片" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px"> <el-image :src="scope.row.pic"></el-image></span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column label="状态" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column fixed="right" label="操作" align="center">
+                  <template slot-scope="scope">
+                    <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
+                    <el-button @click="clickRest(scope.row)" type="text"><i class="el-icon-refresh"></i></el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-col class="page" :span="24">
+                <el-pagination
+                  @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total,  prev, pager, next, jumper"
+                  :total="total"
+                >
+                </el-pagination>
+              </el-col>
+            </el-tab-pane>
+            <el-tab-pane label="下架" name="third">
+              <el-col :span="24" class="info">
+                <el-col :span="10" class="input">
+                  <el-input placeholder="请输入产品名称" v-model="input"> </el-input>
+                </el-col>
+                <el-col :span="2" class="btn">
+                  <el-button type="primary" icon="el-icon-search" circle></el-button>
+                </el-col>
+              </el-col>
+              <el-table ref="noshenhetable" :data="noshenhetable" style="width: 100%" border>
+                <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+
+                <el-table-column label="图片" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px"> <el-image :src="scope.row.pic"></el-image></span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column label="状态" align="center">
+                  <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ scope.row.status === '0' ? '未发布' : scope.row.status === '1' ? '发布' : '下架' }}</span>
+                  </template>
+                </el-table-column>
+
+                <el-table-column fixed="right" label="操作" align="center">
+                  <template slot-scope="scope">
+                    <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-view"></i></el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-col class="page" :span="24">
+                <el-pagination
+                  @size-change="handleSizeChange"
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total,  prev, pager, next, jumper"
+                  :total="total"
+                >
+                </el-pagination>
+              </el-col>
+            </el-tab-pane>
+          </el-tabs>
+        </template>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'newsInfo',
+  props: {
+    debtTable: null,
+    shenheTable: null,
+    noshenhetable: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 1,
+    activeName: 'first',
+    input: '',
+  }),
+  created() {},
+  computed: {
+    status() {
+      return this.$route.params.status;
+    },
+  },
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    handleClicks(tab, event) {
+      console.log(tab, event);
+    },
+    handleClick(id) {
+      let newid = id.id;
+
+      this.$emit('handleClick', newid);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  padding: 15px 0;
+}
+.info .input {
+  padding: 6px 0;
+}
+.info .btn {
+  text-align: center;
+}
+/deep/.el-input__inner {
+  height: 30px;
+  line-height: 30px;
+}
+</style>

+ 9 - 0
src/router/index.js

@@ -13,6 +13,15 @@ const routes = [
     path: '/supermarket/debt',
     component: () => import('../views/supermarket/debt.vue'),
   },
+
+  {
+    path: '/supermarket/debtdetail',
+    component: () => import('../views/supermarket/debtdetail.vue'),
+  },
+  {
+    path: '/supermarket/debtdetails',
+    component: () => import('../views/supermarket/debtdetails.vue'),
+  },
   // 金融数字超市 - 股权产品
   {
     path: '/supermarket/stock',

+ 24 - 4
src/views/supermarket/debt.vue

@@ -7,7 +7,14 @@
         </el-col>
         <el-col :span="24" class="search"> </el-col>
         <el-col :span="24" class="main">
-          <newsInfo :debtTable="debtTable" :total="total" @handleClick="handleClick" :noshenhetable="noshenhetable" :shenheTable="shenheTable"></newsInfo>
+          <newsInfo
+            :debtTable="debtTable"
+            :total="total"
+            @clickRest="clickRest"
+            @handleClick="handleClick"
+            :noshenhetable="noshenhetable"
+            :shenheTable="shenheTable"
+          ></newsInfo>
         </el-col>
       </el-col>
     </el-row>
@@ -29,7 +36,7 @@ export default {
     newsInfo, //其他用户列表
   },
   data: () => ({
-    topTitle: '企业信息',
+    topTitle: '债权产品',
     display: 'none',
     debtTable: [
       {
@@ -51,7 +58,7 @@ export default {
   },
   computed: {},
   methods: {
-    // ...mapActions(['query', 'delete']),
+    // ...mapActions(['query', 'delete','update','fetch']),
     // async search({ skip = 0, limit = 10, ...info } = {}) {
     // const res = await this.query({ skip, limit, ...info });
     // var weishenhe = res.data.filter(item => item.status === '0');
@@ -62,9 +69,22 @@ export default {
     // this.$set(this, `noshenhetable`, shibai);
     // },
 
+    async clickRest(newid) {
+      //   const res = await this.fetch(newid);
+      //   if (res.data.top == '0') {\
+      //res.data.id = newid;
+      //     res.data.top = 1;
+      //     let res = this.update(res.data);
+      //   } else {
+      //     res.data.top = '0';
+      //res.data.id = newid;
+      //     let res = this.update(res.data);
+      //   }
+    },
+
     // 修改
     handleClick(newid) {
-      this.$router.push({ path: '/companyup/detail', query: { id: newid } });
+      this.$router.push({ path: '/supermarket/debtdetail', query: { id: newid } });
     },
   },
 };

+ 119 - 0
src/views/supermarket/debtdetail.vue

@@ -0,0 +1,119 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="debt">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle" :display="display"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <el-col :span="24" class="back">
+            <detailTop @goBack="goBack"></detailTop>
+          </el-col>
+          <el-col :span="24" class="info">
+            <detailInfo :ruleForm="ruleForm" :rules="rules" @submitForm="submitForm" @resetForm="resetForm"></detailInfo>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/common/topInfo.vue';
+import detailTop from '@/layout/common/detailTop.vue';
+import detailInfo from '@/layout/supermarket/detailInfo.vue';
+// import { createNamespacedHelpers } from 'vuex';
+// const { mapActions } = createNamespacedHelpers('companyup');
+// const { mapActions: shenhe } = createNamespacedHelpers('');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    topInfo, //头部导航
+    detailTop, //返回
+    detailInfo, //提交
+  },
+  data: () => ({
+    rules: {},
+    display: 'none',
+    topTitle: '债权产品',
+    ruleForm: {
+      name: '产品1',
+      top: '1',
+      publish_time: '21:12',
+      status: '1',
+      news: [
+        {
+          news_name: '123',
+          news_info: '123',
+        },
+      ],
+    },
+  }),
+  created() {
+    // this.search();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  methods: {
+    // ...mapActions(['query', 'delete', 'fetch', 'update']),
+    // ...shenhe({ userquery: 'query', create: 'create' }),
+    // async search() {
+    //   const res = await this.fetch(this.id);
+    //   console.log(res);
+    //   this.$set(this, `ruleForm`, res.data);
+    // },
+
+    // // 提交
+    submitForm(ruleForm) {
+      // this.ruleForm.status = 1;
+      // console.log(this.ruleForm);
+      // let res = this.update(this.ruleForm);
+      // this.$router.push({ path: '/supermarket/debt' });
+      // let data = {};
+      // data.status = 0;
+      // data.product_id = this.ruleForm.id;
+      // data.type = 0;
+      // status;
+      // let acc = this.create(data);
+    },
+    // // 取消
+    resetForm(ruleForm) {
+      // this.ruleForm.status = 2;
+      // console.log(this.ruleForm);
+      // let res = this.update(this.ruleForm);
+      // this.$router.push({ path: '/supermarket/debt' });
+      // let data = {};
+      // data.status = 1;
+      // data.product_id = this.ruleForm.id;
+      // data.type = 0;
+      // status;
+      // let acc = this.create(data);
+    },
+    // 返回
+    goBack() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.debt {
+  padding: 20px;
+}
+.top {
+  border-bottom: 1px solid #ccc;
+}
+.main {
+  border-radius: 10px;
+  margin: 20px 0 0 0;
+  box-shadow: 0 0 3px #666;
+}
+.main .back {
+  padding: 10px 0 10px 15px;
+}
+</style>

+ 112 - 0
src/views/supermarket/debtdetails.vue

@@ -0,0 +1,112 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="debt">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle" :display="display"></topInfo>
+        </el-col>
+        <el-col :span="24" class="main">
+          <el-col :span="24" class="back">
+            <detailTop @goBack="goBack"></detailTop>
+          </el-col>
+          <el-col :span="24" class="info">
+            <detailInfos :ruleForm="ruleForm" :rules="rules" @submitForm="submitForm" @resetForm="resetForm"></detailInfos>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/common/topInfo.vue';
+import detailTop from '@/layout/common/detailTop.vue';
+import detailInfos from '@/layout/supermarket/detailInfos.vue';
+// import { createNamespacedHelpers } from 'vuex';
+// const { mapActions } = createNamespacedHelpers('companyup');
+// const { mapActions: shenhe } = createNamespacedHelpers('');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    topInfo, //头部导航
+    detailTop, //返回
+    detailInfos, //提交
+  },
+  data: () => ({
+    rules: {},
+    display: 'none',
+    topTitle: '股权产品',
+    ruleForm: {
+      name: '产品1',
+      pic: require('@/assets/logo.png'),
+      status: '1',
+    },
+  }),
+  created() {
+    // this.search();
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  methods: {
+    // ...mapActions(['query', 'delete', 'fetch', 'update']),
+    // ...shenhe({ userquery: 'query', create: 'create' }),
+    // async search() {
+    //   const res = await this.fetch(this.id);
+    //   console.log(res);
+    //   this.$set(this, `ruleForm`, res.data);
+    // },
+
+    // // 提交
+    submitForm(ruleForm) {
+      // this.ruleForm.status = 1;
+      // console.log(this.ruleForm);
+      // let res = this.update(this.ruleForm);
+      // this.$router.push({ path: '/supermarket/debt' });
+      // let data = {};
+      // data.status = 0;
+      // data.product_id = this.ruleForm.id;
+      // data.type = 0;
+      // status;
+      // let acc = this.create(data);
+    },
+    // // 取消
+    resetForm(ruleForm) {
+      // this.ruleForm.status = 2;
+      // console.log(this.ruleForm);
+      // let res = this.update(this.ruleForm);
+      // this.$router.push({ path: '/supermarket/debt' });
+      // let data = {};
+      // data.status = 1;
+      // data.product_id = this.ruleForm.id;
+      // data.type = 0;
+      // status;
+      // let acc = this.create(data);
+    },
+    // 返回
+    goBack() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.debt {
+  padding: 20px;
+}
+.top {
+  border-bottom: 1px solid #ccc;
+}
+.main {
+  border-radius: 10px;
+  margin: 20px 0 0 0;
+  box-shadow: 0 0 3px #666;
+}
+.main .back {
+  padding: 10px 0 10px 15px;
+}
+</style>

+ 64 - 8
src/views/supermarket/stock.vue

@@ -1,19 +1,75 @@
 <template>
-  <div id="stock">
-    <p>stock</p>
+  <div id="debt">
+    <el-row>
+      <el-col :span="24" class="debt">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="topTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="search"> </el-col>
+        <el-col :span="24" class="main">
+          <newsInfos :debtTable="debtTable" :total="total" @handleClick="handleClick" :noshenhetable="noshenhetable" :shenheTable="shenheTable"></newsInfos>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
+import topInfo from '@/layout/common/topInfo.vue';
+import newsInfos from '@/layout/supermarket/newsInfos.vue';
+// import { createNamespacedHelpers } from 'vuex';
+// const { mapActions } = createNamespacedHelpers('companyup');
 export default {
-  name: 'stock',
+  name: 'dept',
   props: {},
-  components: {},
-  data: () => ({}),
-  created() {},
+  components: {
+    topInfo, //头部导航
+    // searchInfo, //搜素
+    newsInfos, //其他用户列表
+  },
+  data: () => ({
+    topTitle: '股权产品',
+    display: 'none',
+    debtTable: [
+      {
+        name: '产品1',
+        pic: require('@/assets/logo.png'),
+        status: '1',
+      },
+    ],
+    shenheTable: [],
+    noshenhetable: [],
+    total: 1,
+  }),
+  created() {
+    // this.search();
+  },
   computed: {},
-  methods: {},
+  methods: {
+    // ...mapActions(['query', 'delete','update','fetch']),
+    // async search({ skip = 0, limit = 10, ...info } = {}) {
+    // const res = await this.query({ skip, limit, ...info });
+    // var weishenhe = res.data.filter(item => item.status === '0');
+    // var success = res.data.filter(item => item.status === '1');
+    // var shibai = res.data.filter(item => item.status === '2');
+    // this.$set(this, `debtTable`, weishenhe);
+    // this.$set(this, `shenheTable`, success);
+    // this.$set(this, `noshenhetable`, shibai);
+    // },
+
+    // 修改
+    handleClick(newid) {
+      this.$router.push({ path: '/supermarket/debtdetails', query: { id: newid } });
+    },
+  },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.debt {
+  padding: 20px;
+}
+.top {
+  border-bottom: 1px solid #ccc;
+}
+</style>