|
@@ -1,67 +1,46 @@
|
|
<template>
|
|
<template>
|
|
- <div id="aApply">
|
|
|
|
|
|
+ <div id="apply">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="24">
|
|
|
|
|
|
+ <el-col :span="24" class="main">
|
|
<el-col :span="24" class="leftTop"> <span>|</span> <span>申请管理</span> </el-col>
|
|
<el-col :span="24" class="leftTop"> <span>|</span> <span>申请管理</span> </el-col>
|
|
- <el-col :span="24" class="info">
|
|
|
|
|
|
+ <el-col :span="24" class="two">
|
|
<span v-if="display == 'list'">
|
|
<span v-if="display == 'list'">
|
|
- <data-table :fields="fields" :opera="opera" :data="list" :total="total" @check="toCheck"></data-table>
|
|
|
|
|
|
+ <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck"></data-table>
|
|
</span>
|
|
</span>
|
|
<span v-else>
|
|
<span v-else>
|
|
- <el-col :span="24">
|
|
|
|
- <!-- <el-table :data="goodsList" border style="width: 100%">
|
|
|
|
- <el-table-column prop="name" label="产品名称" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
|
- <el-table-column label="类型" align="center">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.type == '0' ? '科技需求' : scope.row.type == '1' ? '技术成果' : '商务服务' }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="contacts" label="联系人" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
|
- <el-table-column prop="phone" label="电话" align="center"> </el-table-column>
|
|
|
|
- <el-table-column prop="field" label="所属领域" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
|
- <el-table-column prop="cooperation" label="合作方式" align="center"> </el-table-column>
|
|
|
|
- <el-table-column label="用户状态" align="center">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{ scope.row.dockStatus == '0' ? '待审核' : scope.row.dockStatus == '1' ? '通过' : '拒绝' }}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column fixed="right" label="操作" align="center">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button @click="toCheck(scope.row)" type="text" size="small">审核</el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <el-col :span="24" class="page">
|
|
|
|
- <el-pagination
|
|
|
|
- @current-change="handleCurrentChange1"
|
|
|
|
- :current-page="currentPage1"
|
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
|
- :total="goodsTotal"
|
|
|
|
- :page-size="pageSize"
|
|
|
|
- >
|
|
|
|
- </el-pagination>
|
|
|
|
- </el-col> -->
|
|
|
|
- <goodsList :list="gList" :total="gTotal" @search="getGoodsList" @check="toGoodsCheck" @back="display = 'list'"></goodsList>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <product :productList="productList" :total="productTotal" @back="back" @toEdit="toEdit"></product>
|
|
</span>
|
|
</span>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-dialog title="产品审核" :visible.sync="productDialog" width="50%" :before-close="handleClose">
|
|
|
|
+ <achieve v-if="form.type == '1'" :form="form"></achieve>
|
|
|
|
+ <techol v-if="form.type == '0'" :form="form"></techol>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import goodsList from './apply/goodsList.vue';
|
|
|
|
|
|
+import achieve from './apply/achieve.vue';
|
|
|
|
+import techol from './apply/techol.vue';
|
|
|
|
+import product from './apply/product.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: dockUser } = createNamespacedHelpers('dockUser');
|
|
const { mapActions: dockUser } = createNamespacedHelpers('dockUser');
|
|
export default {
|
|
export default {
|
|
- name: 'aApply',
|
|
|
|
|
|
+ name: 'apply',
|
|
props: {},
|
|
props: {},
|
|
- components: { dataTable, goodsList },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ dataTable,
|
|
|
|
+ product,
|
|
|
|
+ achieve,
|
|
|
|
+ techol,
|
|
|
|
+ },
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
display: 'list',
|
|
display: 'list',
|
|
|
|
+ list: [],
|
|
|
|
+ total: 0,
|
|
opera: [
|
|
opera: [
|
|
{
|
|
{
|
|
label: '审核',
|
|
label: '审核',
|
|
@@ -69,24 +48,24 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
fields: [
|
|
fields: [
|
|
- { label: '姓名', prop: 'user_name' },
|
|
|
|
- { label: '电话', prop: 'contact_tel' },
|
|
|
|
- { label: '申请时间', prop: 'apply_time' },
|
|
|
|
- { label: '用户状态', prop: 'status', format: i => (i == '1' ? '已通过' : i == '2' ? '已拒绝' : '未审核') },
|
|
|
|
|
|
+ { label: '姓名', prop: 'name' },
|
|
|
|
+ { label: '电话', prop: 'phone' },
|
|
|
|
+ { label: '申请时间', prop: 'create_time' },
|
|
|
|
+ { label: '用户状态', prop: 'status', format: i => (i == '1' ? '已通过' : i == '2' ? '已拒绝' : '待审中') },
|
|
],
|
|
],
|
|
- list: [],
|
|
|
|
- total: 0,
|
|
|
|
- gList: [],
|
|
|
|
- gTotal: 0,
|
|
|
|
- gListIndex: 0,
|
|
|
|
- gUserid: '',
|
|
|
|
|
|
+ // 产品列表
|
|
|
|
+ productList: [],
|
|
|
|
+ productTotal: 0,
|
|
|
|
+ // 审核产品
|
|
|
|
+ productDialog: false,
|
|
|
|
+ form: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...dockUser(['query', 'update', 'delete', 'goodsCheck']),
|
|
|
|
|
|
+ ...dockUser(['query']),
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
info.dock_id = this.user.id;
|
|
info.dock_id = this.user.id;
|
|
const res = await this.query({ skip, limit, ...info });
|
|
const res = await this.query({ skip, limit, ...info });
|
|
@@ -95,55 +74,58 @@ export default {
|
|
this.$set(this, `total`, res.total);
|
|
this.$set(this, `total`, res.total);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- toCheck({ index }) {
|
|
|
|
- this.display = 'goodsList';
|
|
|
|
- this.$set(this, `gListIndex`, index);
|
|
|
|
- const list = _.slice(_.get(this.list[this.gListIndex], 'goodsList', []), 0, 20);
|
|
|
|
- this.$set(this, `gList`, list);
|
|
|
|
- this.$set(this, `gTotal`, _.get(this.list[this.gListIndex], 'goodsList', []).length);
|
|
|
|
- this.$set(this, `gUserid`, _.get(this.list[this.gListIndex], 'id'));
|
|
|
|
|
|
+ // 审核产品
|
|
|
|
+ toCheck({ data }) {
|
|
|
|
+ this.$set(this, `productList`, data.productList);
|
|
|
|
+ this.$set(this, `productTotal`, data.productList.length);
|
|
|
|
+ this.display = 'product';
|
|
},
|
|
},
|
|
- getGoodsList({ skip, limit }) {
|
|
|
|
- const list = _.slice(_.get(this.list[this.gListIndex], 'goodsList', []), skip, skip + limit);
|
|
|
|
- this.$set(this, `gList`, list);
|
|
|
|
|
|
+ // 审核打开
|
|
|
|
+ toEdit(data) {
|
|
|
|
+ this.$set(this, `form`, data);
|
|
|
|
+ this.productDialog = true;
|
|
},
|
|
},
|
|
- async toGoodsCheck(data) {
|
|
|
|
- const res = await this.goodsCheck({ ...data, id: this.gUserid });
|
|
|
|
- if (this.$checkRes(res, '审核完成', res.errmsg || '审核失败')) {
|
|
|
|
- this.search();
|
|
|
|
- }
|
|
|
|
|
|
+ // 审核关闭
|
|
|
|
+ handleClose() {
|
|
|
|
+ this.productDialog = false;
|
|
|
|
+ },
|
|
|
|
+ // 返回
|
|
|
|
+ back() {
|
|
|
|
+ this.display = 'list';
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['user', 'menuParams']),
|
|
|
|
- pageTitle() {
|
|
|
|
- return `${this.$route.meta.title}`;
|
|
|
|
- },
|
|
|
|
|
|
+ ...mapState(['user']),
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ test: {
|
|
|
|
+ deep: true,
|
|
|
|
+ immediate: true,
|
|
|
|
+ handler(val) {},
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-.leftTop {
|
|
|
|
- font-size: 18px;
|
|
|
|
- width: 96%;
|
|
|
|
- height: 41px;
|
|
|
|
- line-height: 35px;
|
|
|
|
- border-bottom: 1px solid #e5e5e5;
|
|
|
|
- position: relative;
|
|
|
|
- bottom: 1px;
|
|
|
|
- margin: 10px;
|
|
|
|
- font-weight: 600;
|
|
|
|
- color: #22529a;
|
|
|
|
-}
|
|
|
|
-.info {
|
|
|
|
- padding: 0 40px 0 10px;
|
|
|
|
-}
|
|
|
|
-.page {
|
|
|
|
- text-align: center;
|
|
|
|
- padding: 10px 0;
|
|
|
|
|
|
+.main {
|
|
|
|
+ .leftTop {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ width: 96%;
|
|
|
|
+ height: 41px;
|
|
|
|
+ line-height: 35px;
|
|
|
|
+ border-bottom: 1px solid #e5e5e5;
|
|
|
|
+ position: relative;
|
|
|
|
+ bottom: 1px;
|
|
|
|
+ margin: 10px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #22529a;
|
|
|
|
+ }
|
|
|
|
+ .two {
|
|
|
|
+ padding: 0 30px 0 10px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|