Commit 8f11fe98 authored by 王's avatar

备注

parent 3e62db70
......@@ -190,6 +190,27 @@
<refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/>
<el-dialog
title="编辑备注"
center
append-to-body
:visible.sync="showCommentDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
width="600px">
<div>
<el-form ref="commentFrom" :model="commentForm" :rules="rules">
<el-form-item prop="value">
<el-input type="textarea" v-model="commentForm.value"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="showCommentDialog = false;commentForm={}">取 消</el-button>
<el-button type="primary" @click="saveComment">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -239,6 +260,13 @@
orderStatusOption: ORDERSTATUSOPTION,
buyTypeOption: BUYTYPEOPTION,
inviteSearchPlaceholder: '',
showCommentDialog: false,
commentForm: {},
rules:{
value:[
{ required: true, message: '请输入备注', trigger: 'change' }
]
}
}
},
methods: {
......@@ -267,20 +295,25 @@
detail: _detail
}
},
saveComment(){
let id = this.commentForm.id;
let value = this.commentForm.value ? this.commentForm.value : '';
if(!value) return;
editOrderDescApi(id,'order',{desc: value}).then(res=>{
this.$message({
type: 'success',
message: '编辑备注成功'
})
this.showCommentDialog = false
this.getOrderList();
});
},
editComment(id, desc) {
this.$prompt('', '编辑备注', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputValue: desc
}).then(({ value }) => {
editOrderDescApi(id,'order',{desc: value}).then(res=>{
this.$message({
type: 'success',
message: '编辑备注成功'
})
this.getOrderList();
});
})
this.showCommentDialog = true;
this.commentForm = {
id: id,
value: desc
};
},
onPageChange(val){
this.nowPage = val
......
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