wuhongyu 5 år sedan
förälder
incheckning
b15b5b01b3

+ 117 - 0
src/layout/enterpriseProduct/enterpriseProduct.vue

@@ -0,0 +1,117 @@
+<template>
+  <div id="column">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>审核信息列表</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="recruitInfo" style="width: 100%">
+              <el-table-column prop="name" label="产品名称" align="center"> </el-table-column>
+
+              <el-table-column prop="totaltype" label="产品类型 " align="center">
+                <template v-slot="scoped">
+                  {{
+                    `${scoped.row.totaltype}` === `0` ? '技术' : `${scoped.row.totaltype}` === `1` ? '产品' : `${scoped.row.totaltype}` === `2` ? '服务' : ''
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="state" label="状态" align="center">
+                <template v-slot="scoped">
+                  {{ `${scoped.row.status}` === `0` ? '审核中' : `${scoped.row.status}` === `1` ? '审核通过' : '审核拒绝' }}
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scoped">
+                  <el-tooltip content="审核通过" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleEdit(scoped.row)" v-if="scoped.row.status == '0'"
+                      ><i class="el-icon-check"></i
+                    ></el-button>
+                  </el-tooltip>
+                  <el-tooltip content="审核拒绝" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleshibai(scoped.row)" v-if="scoped.row.status == '0'"
+                      ><i class="el-icon-close"></i
+                    ></el-button>
+                  </el-tooltip>
+                  <el-tooltip content="删除" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-col :span="24" class="page">
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
+            </el-col>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'column',
+  props: {
+    recruitInfo: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 0,
+    pageSize: 10,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    addData() {
+      this.$router.push({ path: '/personnel/recruitDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+    handleEdit(row) {
+      this.$emit('edit', { data: row });
+    },
+    handleshibai(row) {
+      this.$emit('shibai', { data: row });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+.page {
+  padding: 20px 0;
+  text-align: center;
+}
+</style>

+ 73 - 0
src/layout/enterpriseTrans/detail.vue

@@ -0,0 +1,73 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle"> </el-col>
+          <el-col :span="12" class="topBtn"> </el-col>
+        </el-col>
+        <el-col :span="24" class="messgae">
+          <el-form ref="form" :model="form" label-width="120px">
+            <el-form-item label=" 营销人名称">
+              <el-input v-model="form.market_username" :disabled="true"></el-input>
+            </el-form-item>
+            <el-form-item label="购买人名称">
+              <el-input v-model="form.username" :disabled="true"></el-input>
+            </el-form-item>
+            <el-form-item label="商品名称">
+              <el-input v-model="form.product_name" :disabled="true"></el-input>
+            </el-form-item>
+            <el-form-item label="状态">
+              <el-radio-group v-model="form.result">
+                <el-radio :label="1" name="1">审核通过</el-radio>
+                <el-radio :label="2" name="2">审核拒绝</el-radio>
+              </el-radio-group>
+            </el-form-item>
+
+            <el-form-item label="审核说明">
+              <el-input v-model="form.description"></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit()">提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'columnDetail',
+  props: {
+    form: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    onSubmit() {
+      this.$emit('submitDate', { data: this.form, id: this.form.id });
+    },
+    returnBtn() {
+      this.$router.push({ path: '/personnel/column' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+}
+.top .topTitle {
+  text-align: left;
+}
+.top .topBtn {
+  text-align: right;
+  padding: 0 5px;
+}
+</style>

+ 117 - 0
src/layout/enterpriseTrans/enterprise.vue

@@ -0,0 +1,117 @@
+<template>
+  <div id="column">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>审核信息列表</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="recruitInfo" style="width: 100%">
+              <el-table-column prop="name" label="产品名称" align="center"> </el-table-column>
+
+              <el-table-column prop="totaltype" label="产品类型 " align="center">
+                <template v-slot="scoped">
+                  {{
+                    `${scoped.row.totaltype}` === `0` ? '技术' : `${scoped.row.totaltype}` === `1` ? '产品' : `${scoped.row.totaltype}` === `2` ? '服务' : ''
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="state" label="状态" align="center">
+                <template v-slot="scoped">
+                  {{ `${scoped.row.status}` === `0` ? '审核中' : `${scoped.row.status}` === `1` ? '审核通过' : '审核拒绝' }}
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scoped">
+                  <el-tooltip content="审核通过" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleEdit(scoped.row)" v-if="scoped.row.status == '0'"
+                      ><i class="el-icon-check"></i
+                    ></el-button>
+                  </el-tooltip>
+                  <el-tooltip content="审核拒绝" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleshibai(scoped.row)" v-if="scoped.row.status == '0'"
+                      ><i class="el-icon-close"></i
+                    ></el-button>
+                  </el-tooltip>
+                  <el-tooltip content="删除" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-col :span="24" class="page">
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
+            </el-col>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'column',
+  props: {
+    recruitInfo: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 0,
+    pageSize: 10,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    addData() {
+      this.$router.push({ path: '/personnel/recruitDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+    handleEdit(row) {
+      this.$emit('edit', { data: row });
+    },
+    handleshibai(row) {
+      this.$emit('shibai', { data: row });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+.page {
+  padding: 20px 0;
+  text-align: center;
+}
+</style>

+ 60 - 0
src/layout/enterpriseTrans/jiaoyidetail.vue

@@ -0,0 +1,60 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle"> </el-col>
+          <el-col :span="12" class="topBtn"> </el-col>
+        </el-col>
+        <el-col :span="24" class="messgae">
+          <el-form ref="form" :model="form" label-width="120px">
+            <el-form-item label="审核">
+              <el-radio-group v-model="form.status">
+                <el-radio :label="2" name="2">交易成功</el-radio>
+                <el-radio :label="3" name="3">交易取消</el-radio>
+              </el-radio-group>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit(form)">提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'columnDetail',
+  props: {
+    form: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {
+    onSubmit() {
+      this.$emit('submitDate', { data: this.form, id: this.form.id });
+    },
+    returnBtn() {
+      this.$router.push({ path: '/personnel/column' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+}
+.top .topTitle {
+  text-align: left;
+}
+.top .topBtn {
+  text-align: right;
+  padding: 0 5px;
+}
+</style>

+ 145 - 0
src/layout/enterpriseTrans/transaction copy.vue

@@ -0,0 +1,145 @@
+<template>
+  <div id="column">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>审核信息列表</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="recruitInfo" style="width: 100%">
+              <el-table-column prop="username" label="购买人名称" align="center"> </el-table-column>
+              <el-table-column prop="market_username" label="营销人名称" align="center"> </el-table-column>
+              <el-table-column prop="product_name" label="商品名称 " align="center"> </el-table-column>
+              <el-table-column prop="state" label="状态" align="center">
+                <template v-slot="scoped">
+                  {{
+                    `${scoped.row.status}` === `0`
+                      ? '未交易'
+                      : `${scoped.row.status}` === `1`
+                      ? '交易中'
+                      : `${scoped.row.status}` === `2`
+                      ? '交易成功'
+                      : `${scoped.row.status}` === `3`
+                      ? '交易失败'
+                      : ''
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scoped">
+                  <el-tooltip content="审核" placement="bottom" effect="light">
+                    <el-button
+                      v-if="scoped.row.status == 1"
+                      type="text"
+                      size="small"
+                      @click="
+                        $router.push({
+                          path: '/enterprise/jiaoyidetail',
+                          query: {
+                            id: scoped.row.id,
+                          },
+                        })
+                      "
+                      ><i class="el-icon-edit"></i
+                    ></el-button>
+                  </el-tooltip>
+
+                  <el-tooltip content="发起交易" placement="bottom" effect="light">
+                    <el-button
+                      v-if="scoped.row.status == 0"
+                      type="text"
+                      size="small"
+                      @click="
+                        $router.push({
+                          path: '/enterprise/detail',
+                          query: {
+                            id: scoped.row.id,
+                            name: scoped.row.product_name,
+                            oneid: scoped.row.username,
+                            twoid: scoped.row.market_username,
+                          },
+                        })
+                      "
+                      ><i class="el-icon-edit"></i
+                    ></el-button>
+                  </el-tooltip>
+
+                  <el-tooltip content="删除" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-col :span="24" class="page">
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
+            </el-col>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'column',
+  props: {
+    recruitInfo: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 0,
+    pageSize: 10,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    addData() {
+      this.$router.push({ path: '/personnel/recruitDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+    handleEdit(row) {
+      this.$emit('edit', { data: row });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+.page {
+  padding: 20px 0;
+  text-align: center;
+}
+</style>

+ 145 - 0
src/layout/enterpriseTrans/transaction.vue

@@ -0,0 +1,145 @@
+<template>
+  <div id="column">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <el-col :span="12" class="topTitle">
+            <span>审核信息列表</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="list">
+          <template>
+            <el-table :data="recruitInfo" style="width: 100%">
+              <el-table-column prop="username" label="购买人名称" align="center"> </el-table-column>
+              <el-table-column prop="market_username" label="营销人名称" align="center"> </el-table-column>
+              <el-table-column prop="product_name" label="商品名称 " align="center"> </el-table-column>
+              <el-table-column prop="state" label="状态" align="center">
+                <template v-slot="scoped">
+                  {{
+                    `${scoped.row.status}` === `0`
+                      ? '未交易'
+                      : `${scoped.row.status}` === `1`
+                      ? '交易中'
+                      : `${scoped.row.status}` === `2`
+                      ? '交易成功'
+                      : `${scoped.row.status}` === `3`
+                      ? '交易失败'
+                      : ''
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center">
+                <template slot-scope="scoped">
+                  <el-tooltip content="审核" placement="bottom" effect="light">
+                    <el-button
+                      v-if="scoped.row.status == 1"
+                      type="text"
+                      size="small"
+                      @click="
+                        $router.push({
+                          path: '/enterpriseTrans/jiaoyidetail',
+                          query: {
+                            id: scoped.row.id,
+                          },
+                        })
+                      "
+                      ><i class="el-icon-edit"></i
+                    ></el-button>
+                  </el-tooltip>
+
+                  <el-tooltip content="发起交易" placement="bottom" effect="light">
+                    <el-button
+                      v-if="scoped.row.status == 0"
+                      type="text"
+                      size="small"
+                      @click="
+                        $router.push({
+                          path: '/enterpriseTrans/detail',
+                          query: {
+                            id: scoped.row.id,
+                            name: scoped.row.product_name,
+                            oneid: scoped.row.username,
+                            twoid: scoped.row.market_username,
+                          },
+                        })
+                      "
+                      ><i class="el-icon-edit"></i
+                    ></el-button>
+                  </el-tooltip>
+
+                  <el-tooltip content="删除" placement="bottom" effect="light">
+                    <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-col :span="24" class="page">
+              <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
+            </el-col>
+          </template>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'column',
+  props: {
+    recruitInfo: null,
+    total: null,
+  },
+  components: {},
+  data: () => ({
+    currentPage: 0,
+    pageSize: 10,
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    addData() {
+      this.$router.push({ path: '/personnel/recruitDetail' });
+    },
+    handleDelete(item) {
+      this.$emit('delete', item);
+    },
+    handleEdit(row) {
+      this.$emit('edit', { data: row });
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(currentPage) {
+      console.log(currentPage);
+      this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.top {
+  padding: 15px 0;
+  border-bottom: 1px solid #cccc;
+}
+.top .topTitle {
+  padding: 0 10px;
+}
+.top .topAdd {
+  padding: 0 10px 0 0;
+  text-align: right;
+}
+.page {
+  padding: 20px 0;
+  text-align: center;
+}
+</style>

+ 24 - 0
src/router/index.js

@@ -48,6 +48,30 @@ const routes = [
     meta: { title: '部门管理' },
     component: () => import('../views/department/index.vue'),
   },
+  //产品供求审核管理
+  {
+    path: '/enterpriseProduct/index',
+    meta: { title: '产品供求审核管理' },
+    component: () => import('../views/enterpriseProduct/index.vue'),
+  },
+  //产品供求交易状态审核管理
+  {
+    path: '/enterpriseTrans/index',
+    meta: { title: '产品供求交易状态审核管理' },
+    component: () => import('../views/enterpriseTrans/index.vue'),
+  },
+  //科技超市发起交易审核详情
+  {
+    path: '/enterpriseTrans/detail',
+    component: () => import('../views/enterpriseTrans/detail.vue'),
+  },
+
+  //科技超市交易审核管理
+  {
+    path: '/enterpriseTrans/jiaoyidetail',
+    component: () => import('../views/enterpriseTrans/jiaoyidetail.vue'),
+  },
+
   //技术培训
   {
     path: '/technical/index',

+ 11 - 5
src/store/index.js

@@ -3,10 +3,14 @@ import Vuex from 'vuex';
 import login from '@common/store/login';
 import * as ustate from '@common/store/user/state';
 import * as umutations from '@common/store/user/mutations';
-import codeitem from './codeitem';
-import codeCategory from './codeCategory';
+import tranaudit from './tranaudit';
+import transaction from './transaction';
+import market from './market';
 import liveTechnicalColumn from './liveTechnicalColumn';
 import liveTechnicalNews from './liveTechnicalNews';
+import codeitem from './codeitem';
+import codeCategory from './codeCategory';
+
 // 个人&企业
 import users from './user';
 Vue.use(Vuex);
@@ -14,11 +18,13 @@ Vue.use(Vuex);
 export default new Vuex.Store({
   modules: {
     login,
-
-    codeitem, //字典
-    codeCategory, //字典表类别
+    tranaudit, //交易审核表
+    transaction, //交易记录
+    market, //产品信息表
     liveTechnicalColumn, //技术培训类别
     liveTechnicalNews, //技术培训内容
+    codeitem, //字典表
+    codeCategory, //字典表类别
     users,
   },
   state: { ...ustate },

+ 38 - 0
src/store/market.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = { newsInfo: `/api/market/product` };
+const state = () => ({});
+const mutations = {};
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, ...info });
+    return res;
+  },
+  async newquery({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.newsInfo}/newquery`, { skip, limit, ...info });
+    return res;
+  },
+  async newfetch({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.newsInfo}/newfetch`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+};
+export default { namespaced: true, state, mutations, actions };

+ 39 - 0
src/store/tranaudit.js

@@ -0,0 +1,39 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  newsInfo: `/api/market/tranaudit`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
+    return res;
+  },
+
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 38 - 0
src/store/transaction.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  transactionInfo: `/api/market/transaction`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.transactionInfo}`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.transactionInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.transactionInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.transactionInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.transactionInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 13 - 2
src/views/dictionary/parts/itemList.vue

@@ -11,7 +11,17 @@
           </el-col>
         </el-col>
         <el-col :span="24" class="list">
-          <data-table :fields="fields" @delete="toDelete" :data="list" :total="total" :opera="opera" @edit="toEdit" :usePage="true"></data-table>
+          <data-table
+            :fields="fields"
+            @delete="toDelete"
+            :data="list"
+            :total="total"
+            :limit="limit"
+            :opera="opera"
+            @query="search"
+            @edit="toEdit"
+            :usePage="true"
+          ></data-table>
         </el-col>
       </el-col>
       <el-drawer title="字典项" :visible.sync="drawer" direction="rtl" @closed="handleClose" :destroy-on-close="true">
@@ -42,6 +52,7 @@ export default {
   components: { dataTable, dataForm },
   data: () => {
     return {
+      limit: 10,
       pageTitle: '字典项',
       drawer: false,
       form: {},
@@ -72,7 +83,7 @@ export default {
   methods: {
     ...codeitem(['query', 'create', 'update', 'delete']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ ...info, category: this.category });
+      const res = await this.query({ skip, limit, ...info, category: this.category });
       if (this.$checkRes(res)) {
         this.$set(this, `list`, res.data);
         this.$set(this, `total`, res.total);

+ 88 - 0
src/views/enterpriseProduct/index.vue

@@ -0,0 +1,88 @@
+<template>
+  <div id="recruit">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <enterpriseProduct
+          :recruitInfo="recruitInfo"
+          :total="total"
+          @handleCurrentChange="handleCurrentChange"
+          @delete="deleteData"
+          @edit="edit"
+          @shibai="shibai"
+        ></enterpriseProduct>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import enterpriseProduct from '@/layout/enterpriseProduct/enterpriseProduct.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('market');
+export default {
+  name: 'recruit',
+  props: {},
+  components: {
+    topInfo,
+    enterpriseProduct,
+  },
+  data: () => ({
+    topTitle: '审核信息',
+    recruitInfo: [],
+    total: 1,
+    skip: '',
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    ...product(['query', 'delete', 'fetch', 'update']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      skip = this.skip;
+      const res = await this.query({ skip, limit, ...info });
+      this.$set(this, `recruitInfo`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+    async deleteData(item) {
+      const res = await this.delete(item.id);
+      this.$checkRes(res, '删除成功', '删除失败');
+      this.search();
+    },
+
+    async edit({ data }) {
+      console.log('a');
+      data.status = '1';
+      let res = await this.update(data);
+      this.$checkRes(res, '审核成功', '审核失败');
+      console.log(data);
+    },
+
+    async shibai({ data }) {
+      console.log('a');
+      data.status = '2';
+      let res = await this.update(data);
+      this.$checkRes(res, '审核成功', '审核失败');
+      console.log(data);
+    },
+
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 107 - 0
src/views/enterpriseTrans/detail.vue

@@ -0,0 +1,107 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <detail :form="form" @submitDate="onSubmit"></detail>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import detail from '@/layout/enterpriseTrans/detail.vue';
+import { createNamespacedHelpers, mapState } from 'vuex';
+
+const { mapActions: tranaudit } = createNamespacedHelpers('tranaudit');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+
+export default {
+  name: 'columnDetail',
+  props: {},
+  components: {
+    detail,
+    topInfo,
+  },
+  data: () => ({
+    topTitle: '审核',
+    form: {},
+    acc: {},
+    xinxi: {},
+  }),
+  created() {
+    this.search();
+  },
+  computed: {
+    ...mapState(['user']),
+
+    id() {
+      return this.$route.query.id;
+    },
+    oneid() {
+      return this.$route.query.oneid;
+    },
+    twoid() {
+      return this.$route.query.twoid;
+    },
+    name() {
+      return this.$route.query.name;
+    },
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
+  methods: {
+    ...tranaudit(['fetch', 'create', 'update', 'query']),
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactionupdate: 'update' }),
+    async search() {
+      console.log(this.id);
+      console.log(this.oneid);
+      console.log(this.twoid);
+      console.log(this.name);
+      let transaction_id = this.id;
+      const ress = await this.transactionsfetch(transaction_id);
+      console.log(ress.data);
+      this.$set(this, `form`, ress.data);
+      this.$set(this, `xinxi`, ress.data);
+    },
+    async onSubmit() {
+      let acc = {};
+      acc.username = this.oneid;
+      acc.market_username = this.twoid;
+      acc.product_name = this.name;
+      acc.transaction_id = this.id;
+      acc.id = this.id;
+      acc.userid = this.user.uid;
+      acc.result = this.form.result;
+      acc.description = this.form.description;
+      console.log(acc);
+      if (this.form.result == '1') {
+        this.xinxi.status = '1';
+        console.log(this.xinxi);
+        let res = await this.transactionupdate(this.xinxi);
+        this.$checkRes(res, '审核成功', '审核失败');
+      } else if (this.form.result == '2') {
+        this.xinxi.status = '3';
+        let res = await this.transactionupdate(this.xinxi);
+        this.$checkRes(res, '审核成功', '审核失败');
+      }
+      this.$router.push({ path: '/enterprise/transaction' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 81 - 0
src/views/enterpriseTrans/index.vue

@@ -0,0 +1,81 @@
+<template>
+  <div id="recruit">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <transaction :recruitInfo="recruitInfo" :total="total" @delete="deleteData" @edit="edit" @handleCurrentChange="handleCurrentChange"></transaction>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import transaction from '@/layout/enterpriseTrans/transaction.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: product } = createNamespacedHelpers('market');
+const { mapActions: tranaudit } = createNamespacedHelpers('tranaudit');
+const { mapActions: transactions } = createNamespacedHelpers('transaction');
+
+export default {
+  name: 'recruit',
+  props: {},
+  components: {
+    topInfo,
+    transaction,
+  },
+  data: () => ({
+    topTitle: '审核信息',
+    recruitInfo: [],
+    total: 1,
+    skip: '',
+  }),
+  created() {
+    this.search();
+  },
+  computed: {},
+  methods: {
+    ...product(['query', 'delete', 'fetch', 'update']),
+    ...tranaudit({ tranauditList: 'query', tranauditListupdate: 'update' }),
+    ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele' }),
+
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      skip = this.skip;
+      const res = await this.transactionslist({ skip, limit, ...info });
+      console.log(res);
+      console.log(res.data);
+      this.$set(this, `recruitInfo`, res.data);
+      this.$set(this, `total`, res.total);
+    },
+    async deleteData(item) {
+      const res = await this.transactiondetele(item.id);
+      this.$checkRes(res, '删除成功', '删除失败');
+      this.search();
+    },
+
+    async edit({ data }) {
+      console.log('a');
+      data.status = '1';
+      let res = await this.update(data);
+      this.$checkRes(res, '审核成功', '审核失败');
+      console.log(data);
+    },
+
+    async handleCurrentChange({ skip, limit, currentPage }) {
+      this.$set(this, `skip`, skip);
+      this.search();
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>

+ 82 - 0
src/views/enterpriseTrans/jiaoyidetail.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="columnDetail">
+    <el-row>
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle"></topInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <jiaoyidetail :form="form" @submitDate="onSubmit"></jiaoyidetail>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/public/top.vue';
+import jiaoyidetail from '@/layout/enterpriseTrans/jiaoyidetail.vue';
+import { createNamespacedHelpers, mapState } from 'vuex';
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+export default {
+  name: 'columnDetail',
+  props: {},
+  components: {
+    jiaoyidetail,
+    topInfo,
+  },
+  data: () => ({
+    topTitle: '交易',
+    form: {},
+    xinxi: {},
+  }),
+  created() {
+    this.search();
+  },
+  computed: {
+    ...mapState(['user']),
+
+    id() {
+      return this.$route.query.id;
+    },
+    oneid() {
+      return this.$route.query.oneid;
+    },
+    twoid() {
+      return this.$route.query.twoid;
+    },
+    name() {
+      return this.$route.query.name;
+    },
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
+  methods: {
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactionupdate: 'update' }),
+    async search() {
+      let transaction_id = this.id;
+      const res = await this.transactionsfetch(transaction_id);
+      console.log(res.data);
+      this.$set(this, `form`, res.data);
+    },
+    async onSubmit({ data }) {
+      console.log(data);
+      console.log(data.status);
+
+      let res = await this.transactionupdate(data);
+      this.$checkRes(res, '审核成功', '审核失败');
+      this.$router.push({ path: '/enterprise/transaction' });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  padding: 20px;
+  margin: 10px 20px;
+  border: 1px solid #ccc;
+  width: 96%;
+}
+</style>