发放记录可修改发放状态,线索详情修改
This commit is contained in:
@@ -39,3 +39,25 @@ export async function sendLog(params) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param params
|
||||
*/
|
||||
export async function editSubsidyStatus(params) {
|
||||
const res = await request.post('/receiver/subsidy/status', params);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function statusList(params) {
|
||||
const res = await request.get('/receiver/subsidy/statusList', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<!-- 用户编辑弹窗 -->
|
||||
<template>
|
||||
<ele-modal
|
||||
width="800px"
|
||||
:visible="visible"
|
||||
:append-to-body="true"
|
||||
:close-on-click-modal="true"
|
||||
custom-class="ele-dialog-form"
|
||||
title="修改状态"
|
||||
@update:visible="updateVisible"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="姓名:" prop="title">
|
||||
<el-select v-model="form.status">
|
||||
<el-option
|
||||
v-for="(item, index) in statusArray"
|
||||
:key="index"
|
||||
:value="index"
|
||||
:label="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<el-button @click="updateVisible(false)">取消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="save">
|
||||
保存
|
||||
</el-button>
|
||||
</template>
|
||||
</ele-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { editSubsidyStatus, statusList } from '@/api/receiver/subsidy';
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
// 弹窗是否打开
|
||||
visible: Boolean,
|
||||
// 修改回显的数据
|
||||
data: Object
|
||||
},
|
||||
data() {
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
status: ''
|
||||
};
|
||||
return {
|
||||
editVersion: false,
|
||||
defaultForm,
|
||||
// 表单数据
|
||||
form: { ...defaultForm },
|
||||
// 表单验证规则
|
||||
rules: {},
|
||||
// 提交状态
|
||||
loading: false,
|
||||
statusArray: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 是否开启响应式布局
|
||||
styleResponsive() {
|
||||
return this.$store.state.theme.styleResponsive;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadStatusList();
|
||||
},
|
||||
methods: {
|
||||
loadStatusList() {
|
||||
statusList().then((res) => {
|
||||
this.statusArray = res;
|
||||
});
|
||||
},
|
||||
/* 更新visible */
|
||||
updateVisible(value) {
|
||||
this.$emit('update:visible', value);
|
||||
},
|
||||
save() {
|
||||
this.loading = true;
|
||||
editSubsidyStatus({ ...this.form })
|
||||
.then((msg) => {
|
||||
this.loading = false;
|
||||
this.$message.success(msg);
|
||||
this.updateVisible(false);
|
||||
this.$emit('done');
|
||||
})
|
||||
.catch((e) => {
|
||||
this.loading = false;
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
visible(visible) {
|
||||
this.editVersion = false;
|
||||
if (visible) {
|
||||
this.editVersion = true;
|
||||
if (this.data) {
|
||||
this.$util.assignObject(this.form, {
|
||||
...this.data
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$refs.form.clearValidate();
|
||||
this.form = { ...this.defaultForm };
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.ele-image-upload-list .ele-image-upload-item {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -83,28 +83,30 @@
|
||||
</template>
|
||||
<!-- 操作列 -->
|
||||
<template v-slot:action="{ row }">
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
@click="editStatus(row.id)"
|
||||
>
|
||||
<el-link type="primary" :underline="false" @click="editStatus(row)">
|
||||
修改状态
|
||||
</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
<edit :data="current" :visible.sync="showEdit" @done="reload" />
|
||||
<edit-status
|
||||
:data="current"
|
||||
:visible.sync="showEditStatus"
|
||||
@done="reload"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sendLog } from '@/api/receiver/subsidy';
|
||||
import edit from './components/edit.vue';
|
||||
import editStatus from './components/editStatus.vue';
|
||||
import { utils, writeFile } from 'xlsx';
|
||||
|
||||
export default {
|
||||
name: 'receiverSendLog',
|
||||
components: { edit },
|
||||
components: { edit, editStatus },
|
||||
data() {
|
||||
return {
|
||||
where: {
|
||||
@@ -210,7 +212,8 @@
|
||||
]
|
||||
},
|
||||
reasonVisible: false,
|
||||
reason: ''
|
||||
reason: '',
|
||||
showEditStatus: false
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
@@ -233,8 +236,9 @@
|
||||
reset() {
|
||||
this.where = {};
|
||||
},
|
||||
editStatus(id) {
|
||||
console.log(id);
|
||||
editStatus(row) {
|
||||
this.current = row;
|
||||
this.showEditStatus = true;
|
||||
},
|
||||
showDetail(row) {
|
||||
this.current = row;
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户来源"></el-form-item>
|
||||
<el-form-item label="客户归属">
|
||||
{{ form.cfrom }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
@@ -63,6 +65,18 @@
|
||||
</el-row>
|
||||
-->
|
||||
</el-form>
|
||||
<!-- 留资记录 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
:columns="columns2"
|
||||
:datasource="datasource2"
|
||||
cache-key="receiverCustomerEnrollTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar>
|
||||
<el-link>留资记录</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
<!-- 数据表格 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
@@ -88,18 +102,6 @@
|
||||
<template v-else>{{ row.log }}</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
<!-- 留资记录 -->
|
||||
<ele-pro-table
|
||||
ref="table"
|
||||
:columns="columns2"
|
||||
:datasource="datasource2"
|
||||
cache-key="receiverCustomerEnrollTables"
|
||||
>
|
||||
<!-- 表头工具栏 -->
|
||||
<template v-slot:toolbar>
|
||||
<el-link>留资记录</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
<el-dialog title="新增小记" :visible.sync="addLogVisible" width="30%">
|
||||
<el-form ref="form" label-width="50px">
|
||||
@@ -148,7 +150,8 @@
|
||||
en_time: '',
|
||||
selectedCar: {},
|
||||
wxgr: 0,
|
||||
provinceCity: []
|
||||
provinceCity: [],
|
||||
cfrom: ''
|
||||
},
|
||||
addForm: {
|
||||
id: '',
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
},
|
||||
{
|
||||
prop: 'cfrom',
|
||||
label: '来源',
|
||||
label: '归属',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
minWidth: 80
|
||||
|
||||
Reference in New Issue
Block a user