|
@@ -4,7 +4,12 @@
|
|
|
<el-col :span="24">
|
|
|
<el-col :span="24" class="leftTop"> <span>|</span> <span>交易审核</span> </el-col>
|
|
|
<el-col :span="24" class="info">
|
|
|
- 交易审核
|
|
|
+ <span v-if="view">
|
|
|
+ <list :recruitInfo="recruitInfo" :total="total" @handleCurrentChange="handleCurrentChange" @shareBtn="shareBtn" @deleteBtn="deleteBtn"></list>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <detail :form="form" @submitDate="onSubmit"></detail>
|
|
|
+ </span>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -12,16 +17,101 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+import list from './parts/list.vue';
|
|
|
+import detail from './parts/detail.vue';
|
|
|
+import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
+const { mapActions: product } = createNamespacedHelpers('market');
|
|
|
+const { mapActions: tranaudit } = createNamespacedHelpers('tranaudit');
|
|
|
+const { mapActions: transactions } = createNamespacedHelpers('transaction');
|
|
|
+const { mapActions: productpact } = createNamespacedHelpers('productpact');
|
|
|
+
|
|
|
export default {
|
|
|
- name: 'index',
|
|
|
+ name: 'recruit',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
- data: function() {
|
|
|
- return {};
|
|
|
+ components: {
|
|
|
+ list,
|
|
|
+ detail,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ form: {},
|
|
|
+ view: true,
|
|
|
+ total: 1,
|
|
|
+ currentPage: 0,
|
|
|
+ pageSize: 10,
|
|
|
+ tranList: [
|
|
|
+ {
|
|
|
+ title: 'zxlfcjsdl',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ topTitle: '审核信息',
|
|
|
+ recruitInfo: [],
|
|
|
+ total: 1,
|
|
|
+ skip: '',
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 审核
|
|
|
+ shareBtn(id) {
|
|
|
+ this.searchinfo(id), (this.view = false);
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ async deleteBtn(id) {
|
|
|
+ console.log(id);
|
|
|
+ const res = await this.transactiondetele(id);
|
|
|
+ this.$checkRes(res, '删除成功', '删除失败');
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ ...product(['query', 'delete', 'fetch', 'update']),
|
|
|
+ ...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update' }),
|
|
|
+ ...tranaudit({ tranauditList: 'query', tranauditListupdate: 'update' }),
|
|
|
+ ...transactions({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ if (this.user.role == '4') {
|
|
|
+ skip = this.skip;
|
|
|
+ console.log(this.user.uid);
|
|
|
+ let create_userid = this.user.uid;
|
|
|
+ const res = await this.transactionslist({ skip, create_userid, limit, ...info });
|
|
|
+ this.$set(this, `recruitInfo`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ } else {
|
|
|
+ skip = this.skip;
|
|
|
+ const res = await this.transactionslist({ skip, limit, ...info });
|
|
|
+ this.$set(this, `recruitInfo`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async handleCurrentChange({ skip, limit, currentPage }) {
|
|
|
+ this.$set(this, `skip`, skip);
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+
|
|
|
+ //审核页面
|
|
|
+
|
|
|
+ async searchinfo(id) {
|
|
|
+ const res = await this.productpactFetch(id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onSubmit() {
|
|
|
+ const res = await this.productpactUpdate(this.form);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.form.status = '2';
|
|
|
+ this.form.id = this.form.transaction_id;
|
|
|
+ const arr = await this.transactionupdate(this.form);
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
+ this.$message({
|
|
|
+ message: '审核通过',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.view = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
pageTitle() {
|
|
@@ -33,7 +123,6 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<style lang="less" scoped>
|
|
|
.leftTop {
|
|
|
font-size: 18px;
|