|
@@ -35,7 +35,7 @@ import detailTopInfo from '@/layout/common/detailTopInfo.vue';
|
|
|
import detailTop from '@/layout/common/detailTop.vue';
|
|
|
import detailInfo from '@/layout/companyup/detailInfo.vue';
|
|
|
import { createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions } = createNamespacedHelpers('companyup');
|
|
|
+const { mapActions: companyup } = createNamespacedHelpers('companyup');
|
|
|
const { mapActions: profession } = createNamespacedHelpers('profession');
|
|
|
export default {
|
|
|
name: 'detail',
|
|
@@ -65,60 +65,47 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(['query', 'delete', 'fetch', 'update']),
|
|
|
- ...profession({ query: 'query', create: 'create' }),
|
|
|
+ ...companyup({ companyupStatus: 'updateStatus', companyupFetch: 'fetch' }),
|
|
|
+ ...profession({ queryType: 'query', create: 'create' }),
|
|
|
async searchquery() {
|
|
|
let pcode = 0;
|
|
|
- const acc = await this.query({ pcode });
|
|
|
- console.log(acc.data);
|
|
|
+ const acc = await this.queryType({ pcode });
|
|
|
this.$set(this, `yiji`, acc.data);
|
|
|
},
|
|
|
-
|
|
|
async syi(code) {
|
|
|
let pcode = code;
|
|
|
-
|
|
|
- const ess = await this.query({ pcode });
|
|
|
- console.log(ess.data);
|
|
|
-
|
|
|
+ const ess = await this.queryType({ pcode });
|
|
|
this.$set(this, `erji`, ess.data);
|
|
|
},
|
|
|
async ser(code) {
|
|
|
let pcode = code;
|
|
|
-
|
|
|
- const ess = await this.query({ pcode });
|
|
|
- console.log(ess.data);
|
|
|
-
|
|
|
+ const ess = await this.queryType({ pcode });
|
|
|
this.$set(this, `sanji`, ess.data);
|
|
|
},
|
|
|
async ssan(code) {
|
|
|
let pcode = code;
|
|
|
-
|
|
|
- const ess = await this.query({ pcode });
|
|
|
- console.log(ess.data);
|
|
|
-
|
|
|
+ const ess = await this.queryType({ pcode });
|
|
|
this.$set(this, `siji`, ess.data);
|
|
|
},
|
|
|
-
|
|
|
async search() {
|
|
|
- const res = await this.fetch(this.id);
|
|
|
- console.log(res);
|
|
|
- this.$set(this, `ruleForm`, res.data);
|
|
|
+ const res = await this.companyupFetch(this.id);
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$set(this, `ruleForm`, res.data);
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
- // 提交
|
|
|
- submitForm(ruleForm) {
|
|
|
- this.ruleForm.status = 1;
|
|
|
- console.log(this.ruleForm);
|
|
|
- let res = this.update(this.ruleForm);
|
|
|
- this.$checkRes(res, '审核成功', '审核成功');
|
|
|
+ // 审核企业修改信息+通过
|
|
|
+ submitForm({ data }) {
|
|
|
+ data.status = '1';
|
|
|
+ let res = this.companyupStatus(data);
|
|
|
+ this.$checkRes(res, '审核通过成功', '审核通过失败');
|
|
|
+ this.goBack();
|
|
|
},
|
|
|
- // 取消
|
|
|
- resetForm(ruleForm) {
|
|
|
- this.ruleForm.status = 2;
|
|
|
- console.log(this.ruleForm);
|
|
|
- let res = this.update(this.ruleForm);
|
|
|
-
|
|
|
- // this.$router.push({ path: '/companyup/index' });
|
|
|
+ // 审核企业修改信息+拒绝
|
|
|
+ resetForm({ data }) {
|
|
|
+ data.status = '2';
|
|
|
+ let res = this.companyupStatus(data);
|
|
|
+ this.$checkRes(res, '审核拒绝通过', '审核拒绝失败');
|
|
|
+ this.goBack();
|
|
|
},
|
|
|
// 返回
|
|
|
goBack() {
|