Commit 95b1f164 authored by caimeng's avatar caimeng

意见反馈编辑

parent cf050aa6
......@@ -63,7 +63,7 @@
<div slot="footer">
<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>
</el-dialog>
</template>
......@@ -88,7 +88,6 @@ export default {
},
},
data() {
return {
fileList: [],
ui: {
......@@ -96,6 +95,7 @@ export default {
},
visible: this.$props.dialogVisible,
ruleForm: {
feedNo:'',
feedType: '',
feedStatus: '',
feedContent: '',
......@@ -158,10 +158,26 @@ export default {
}
},
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 = {
feedNo,
feedType,
feedStatus,
feedContent,
feedVoucher,
clientNo,
productName: clientProductName,
productName: feedProduct,
creater: localStorage.getItem("userName"),
}
......@@ -225,6 +241,33 @@ export default {
if (!valid) {
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', {
creater: localStorage.getItem("userName"),
feedType: this.ruleForm.feedType,
......@@ -248,6 +291,9 @@ export default {
.catch(err => {
alert("error!")
})
}
})
......
......@@ -22,7 +22,8 @@
<template slot-scope="scope">
<template v-if="scope.row.feedVoucher && scope.row.feedVoucher!==null">
<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>
......@@ -53,13 +54,15 @@
<!-- 意见反馈弹框 -->
<template v-if="visible">
<add-question
:dialog-visible="visible"
:title="dialogTitle"
:params="params"
:params="dialogParams!=null?dialogParams: params"
@handleClose="visible=false"
@callback="init"
/>
</template>
<!-- 查看图片弹框-->
......@@ -68,7 +71,7 @@
:visible.sync="imgDialogVisible"
width="30%"
:before-close="handleCloseDialog">
<el-image :src="dialogImgUrl" />
<el-image :src="dialogImgUrl"/>
</el-dialog>
</div>
......@@ -103,9 +106,10 @@ export default {
return {
visible: false,
dialogTitle: '',
dialogImgUrl:'',
dialogImgUrl: '',
dialogParams: null,
imgDialogVisible:false,
imgDialogVisible: false,
form: {
total: 1,
......@@ -127,16 +131,34 @@ export default {
await this.init()
},
methods: {
handleCloseDialog(){
handleCloseDialog() {
this.dialogVisible = false;
},
handleDialog(img){
handleDialog(img) {
this.dialogImgUrl = img;
},
handleTabClick() {
this.dialogTitle = '意见反馈';
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() {
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