Commit 95b1f164 authored by caimeng's avatar caimeng

意见反馈编辑

parent cf050aa6
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div slot="footer"> <div slot="footer">
<el-button size="small" @click="handleClose">取 消</el-button> <el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" icon="el-icon-plus" type="primary" @click="submitForm('ruleForm')">新 增</el-button> <el-button size="small" icon="el-icon-plus" type="primary" @click="submitForm('ruleForm')">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -88,7 +88,6 @@ export default { ...@@ -88,7 +88,6 @@ export default {
}, },
}, },
data() { data() {
return { return {
fileList: [], fileList: [],
ui: { ui: {
...@@ -96,6 +95,7 @@ export default { ...@@ -96,6 +95,7 @@ export default {
}, },
visible: this.$props.dialogVisible, visible: this.$props.dialogVisible,
ruleForm: { ruleForm: {
feedNo:'',
feedType: '', feedType: '',
feedStatus: '', feedStatus: '',
feedContent: '', feedContent: '',
...@@ -158,10 +158,26 @@ export default { ...@@ -158,10 +158,26 @@ export default {
} }
}, },
created() { created() {
const {clientNo, clientProductName} = this.params; const {clientNo, feedNo, feedType,feedStatus,feedContent,feedVoucher, feedProduct} = this.params;
const list = [];
feedVoucher.forEach(item=>{
const o = {};
o.name = item;
o.url = item;
list.push(o)
});
this.fileList = list;
console.log(this.params,'内容');
this.ruleForm = { this.ruleForm = {
feedNo,
feedType,
feedStatus,
feedContent,
feedVoucher,
clientNo, clientNo,
productName: clientProductName, productName: feedProduct,
creater: localStorage.getItem("userName"), creater: localStorage.getItem("userName"),
} }
...@@ -225,6 +241,33 @@ export default { ...@@ -225,6 +241,33 @@ export default {
if (!valid) { if (!valid) {
return false return false
} }
if(this.ruleForm.feedNo){
this.$$post('/feed/updateClientFeed', {
feedNo:this.ruleForm.feedNo,
feedType: this.ruleForm.feedType,
feedSource: 'CUSTOMER',
feedStatus: this.ruleForm.feedStatus,
feedContent: this.ruleForm.feedContent,
clientNo: this.ruleForm.clientNo,
productName: this.ruleForm.productName,
feedVoucher: feedVoucher,
creater: localStorage.getItem("userName"),
})
.then(res => {
if (res.data.success) {
this.$message({message: '反馈问题修改成功', type: 'success'});
this.$emit('callback')
this.handleClose();
}else {
this.$message.error(res.data.message);
}
})
.catch(err => {
alert("error!")
})
}else{
this.$$post('/feed/createClientFeed', { this.$$post('/feed/createClientFeed', {
creater: localStorage.getItem("userName"), creater: localStorage.getItem("userName"),
feedType: this.ruleForm.feedType, feedType: this.ruleForm.feedType,
...@@ -248,6 +291,9 @@ export default { ...@@ -248,6 +291,9 @@ export default {
.catch(err => { .catch(err => {
alert("error!") alert("error!")
}) })
}
}) })
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.feedVoucher && scope.row.feedVoucher!==null"> <template v-if="scope.row.feedVoucher && scope.row.feedVoucher!==null">
<template v-for="item in scope.row.feedVoucher"> <template v-for="item in scope.row.feedVoucher">
<el-image style="width: 50px; height: 50px; margin: 0 5px; cursor: pointer;" fit="fill" :preview-src-list="scope.row.feedVoucher" :src="item"></el-image> <el-image style="width: 50px; height: 50px; margin: 0 5px; cursor: pointer;" fit="fill"
:preview-src-list="scope.row.feedVoucher" :src="item"></el-image>
</template> </template>
</template> </template>
</template> </template>
...@@ -53,13 +54,15 @@ ...@@ -53,13 +54,15 @@
<!-- 意见反馈弹框 --> <!-- 意见反馈弹框 -->
<template v-if="visible">
<add-question <add-question
:dialog-visible="visible" :dialog-visible="visible"
:title="dialogTitle" :title="dialogTitle"
:params="params" :params="dialogParams!=null?dialogParams: params"
@handleClose="visible=false" @handleClose="visible=false"
@callback="init" @callback="init"
/> />
</template>
<!-- 查看图片弹框--> <!-- 查看图片弹框-->
...@@ -68,7 +71,7 @@ ...@@ -68,7 +71,7 @@
:visible.sync="imgDialogVisible" :visible.sync="imgDialogVisible"
width="30%" width="30%"
:before-close="handleCloseDialog"> :before-close="handleCloseDialog">
<el-image :src="dialogImgUrl" /> <el-image :src="dialogImgUrl"/>
</el-dialog> </el-dialog>
</div> </div>
...@@ -103,9 +106,10 @@ export default { ...@@ -103,9 +106,10 @@ export default {
return { return {
visible: false, visible: false,
dialogTitle: '', dialogTitle: '',
dialogImgUrl:'', dialogImgUrl: '',
dialogParams: null,
imgDialogVisible:false, imgDialogVisible: false,
form: { form: {
total: 1, total: 1,
...@@ -127,16 +131,34 @@ export default { ...@@ -127,16 +131,34 @@ export default {
await this.init() await this.init()
}, },
methods: { methods: {
handleCloseDialog(){ handleCloseDialog() {
this.dialogVisible = false; this.dialogVisible = false;
}, },
handleDialog(img){ handleDialog(img) {
this.dialogImgUrl = img; this.dialogImgUrl = img;
}, },
handleTabClick() { handleTabClick() {
this.dialogTitle = '意见反馈'; this.dialogTitle = '意见反馈';
this.visible = true; this.visible = true;
const {clientProductName,clientNo} = this.params;
this.dialogParams = {
feedType:'',
feedStatus:'',
feedContent:'',
feedVoucher:[],
clientNo,
feedProduct: clientProductName
}
},
updateQueDialog(row) {
console.log(row, '那啥');
this.visible = true;
this.dialogTitle = '意见反馈';
this.dialogParams = row;
}, },
headerStyle() { headerStyle() {
return "tableHeaderStyle"; return "tableHeaderStyle";
}, },
......
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