|
|
@@ -218,6 +218,15 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="createTime" label="创建时间" width="160">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="isRecommend" label="是否推荐" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.isRecommend"
|
|
|
+ @change="changeTj(scope.row.companyId,scope.row.isRecommend)"
|
|
|
+ :active-value="openValue" :disabled="!isAuth('autonym:tongguo')"
|
|
|
+ :inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column fixed='right' prop="status" label="状态" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.status == 1">待审核</span>
|
|
|
@@ -730,6 +739,8 @@
|
|
|
dialogFormVisibleImg:false,
|
|
|
imgUrl:'',
|
|
|
hangyeData: [],
|
|
|
+ openValue:1,
|
|
|
+ closeValue:2,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -1551,6 +1562,40 @@
|
|
|
})
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
+ // 是否推荐
|
|
|
+ changeTj(companyId, isRecommend) {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('company/updateCompanyIsRecommend'),
|
|
|
+ method: 'post',
|
|
|
+ params: this.$http.adornParams({
|
|
|
+ 'companyId': companyId,
|
|
|
+ 'isRecommend':isRecommend
|
|
|
+ })
|
|
|
+ }).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ if (data.code == 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.dataSelect()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: data.msg,
|
|
|
+ type: 'warning',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.dataSelect()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
// 发票记录按钮
|
|
|
fapiaoClick(row){
|
|
|
this.userId = row.userId
|