Commit f6235c0b by zhuzhequan

重新开通

parent 084d3990
...@@ -40,4 +40,7 @@ export function deleteData(ids) { ...@@ -40,4 +40,7 @@ export function deleteData(ids) {
export function getStatusSelect() { export function getStatusSelect() {
return axios.get('/sys/domain/getErpStatusList') return axios.get('/sys/domain/getErpStatusList')
} }
\ No newline at end of file export function reOpenErp(id) {
return axios.post(`/sys/domain/reopen/${id}`)
}
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
<el-form-item label="状态"> <el-form-item label="状态">
<el-select <el-select
style="width: 160px" style="width: 160px"
clearable
filterable
v-model="searchForm.status" v-model="searchForm.status"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
...@@ -116,13 +118,20 @@ ...@@ -116,13 +118,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="公司名称" label="客户名称"
prop="companyName" prop="companyName"
header-align="center" header-align="center"
align="center" align="center"
width="180" width="180"
:show-overflow-tooltip="true"></el-table-column> :show-overflow-tooltip="true"></el-table-column>
<el-table-column <el-table-column
label="客户编码"
prop="userMark"
header-align="center"
align="center"
width="180"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="负责人" label="负责人"
prop="headName" prop="headName"
header-align="center" header-align="center"
...@@ -156,7 +165,11 @@ ...@@ -156,7 +165,11 @@
align="center" align="center"
prop="statusTxt" prop="statusTxt"
width="150" width="150"
:show-overflow-tooltip="true" /> :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-tag plain :type="findStatus(scope.row.status)">{{ scope.row.statusTxt }}</el-tag>
</template>
</el-table-column>
<el-table-column <el-table-column
label="创建时间" label="创建时间"
...@@ -176,13 +189,22 @@ ...@@ -176,13 +189,22 @@
label="操作" label="操作"
header-align="center" header-align="center"
align="center" align="center"
width="55" width="90"
fixed="right"> fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<i <div style="display:flex;align-items:center;justify-content: center;font-size: 17px">
class="el-icon-edit" <i
style="cursor: pointer" class="el-icon-edit"
@click="handleEdit(scope.row)"></i> style="cursor: pointer"
title="编辑"
@click="handleEdit(scope.row)"></i>
<i
class="el-icon-position"
v-if="scope.row.status===9"
title="重新开通"
style="cursor: pointer;color:#67C23A;margin-left: 6px"
@click="reOpen(scope.row)"></i>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -316,12 +338,36 @@ import { ...@@ -316,12 +338,36 @@ import {
addManageData, addManageData,
updateManageData, updateManageData,
getDataById, getDataById,
deleteData deleteData,
reOpenErp
} from '@/common/api/manage/index' } from '@/common/api/manage/index'
export default { export default {
name: 'saasManage', name: 'saasManage',
data() { data() {
return { return {
statusColor: [
{
key: 1,
value: 'success'
},
{
key: 2,
value: 'warning'
},
{
key: 3,
value: 'info'
},
{
key: 4,
value: 'info'
},
{
key: 9,
value: 'danger'
}
],
paymentPackages: [ paymentPackages: [
{ {
id: 0, id: 0,
...@@ -396,10 +442,14 @@ export default { ...@@ -396,10 +442,14 @@ export default {
}, },
async created() { async created() {
this.cloneEditForm = JSON.parse(JSON.stringify(this.editForm)) this.cloneEditForm = JSON.parse(JSON.stringify(this.editForm))
this.getList() await this.getList()
this.getStatusList() await this.getStatusList()
}, },
methods: { methods: {
findStatus(status) {
const item = this.statusColor.find(el => el.key === status)
return item ? item.value : ''
},
async getStatusList() { async getStatusList() {
const { data } = await getStatusSelect() const { data } = await getStatusSelect()
this.statusList = data this.statusList = data
...@@ -447,6 +497,26 @@ export default { ...@@ -447,6 +497,26 @@ export default {
this.$refs.form.clearValidate() this.$refs.form.clearValidate()
}) })
}, },
async reOpen(row) {
try {
await this.$confirm('确认重新开通?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
try {
const res = await reOpenErp(row.id)
if (res.code === 200) {
this.$message.success(res.message)
await this.getList()
}
} catch (e) {
console.error(e)
}
},
async handleEdit(row) { async handleEdit(row) {
this.editId = row.id this.editId = row.id
const l = this.$loading({ const l = this.$loading({
...@@ -568,16 +638,20 @@ export default { ...@@ -568,16 +638,20 @@ export default {
.el-table .el-table__cell { .el-table .el-table__cell {
padding: 6px 0; padding: 6px 0;
} }
.el-input__inner { .el-input__inner {
padding: 0 4px; padding: 0 4px;
} }
.el-input--small .el-input__inner { .el-input--small .el-input__inner {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.el-icon-time:before { .el-icon-time:before {
content: ''; content: '';
} }
.el-dialog__footer { .el-dialog__footer {
text-align: center; text-align: center;
...@@ -585,9 +659,11 @@ export default { ...@@ -585,9 +659,11 @@ export default {
padding: 9px 50px; padding: 9px 50px;
} }
} }
.el-dialog__body { .el-dialog__body {
padding: 10px 20px; padding: 10px 20px;
} }
.el-icon-edit:before { .el-icon-edit:before {
color: #ff9800; color: #ff9800;
font-weight: bold; font-weight: bold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment