Commit 8f11fe98 authored by 王's avatar

备注

parent 3e62db70
...@@ -190,6 +190,27 @@ ...@@ -190,6 +190,27 @@
<refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog> <refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange"/> <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> </div>
</template> </template>
...@@ -239,6 +260,13 @@ ...@@ -239,6 +260,13 @@
orderStatusOption: ORDERSTATUSOPTION, orderStatusOption: ORDERSTATUSOPTION,
buyTypeOption: BUYTYPEOPTION, buyTypeOption: BUYTYPEOPTION,
inviteSearchPlaceholder: '', inviteSearchPlaceholder: '',
showCommentDialog: false,
commentForm: {},
rules:{
value:[
{ required: true, message: '请输入备注', trigger: 'change' }
]
}
} }
}, },
methods: { methods: {
...@@ -267,20 +295,25 @@ ...@@ -267,20 +295,25 @@
detail: _detail detail: _detail
} }
}, },
editComment(id, desc) { saveComment(){
this.$prompt('', '编辑备注', { let id = this.commentForm.id;
confirmButtonText: '确定', let value = this.commentForm.value ? this.commentForm.value : '';
cancelButtonText: '取消', if(!value) return;
inputValue: desc
}).then(({ value }) => {
editOrderDescApi(id,'order',{desc: value}).then(res=>{ editOrderDescApi(id,'order',{desc: value}).then(res=>{
this.$message({ this.$message({
type: 'success', type: 'success',
message: '编辑备注成功' message: '编辑备注成功'
}) })
this.showCommentDialog = false
this.getOrderList(); this.getOrderList();
}); });
}) },
editComment(id, desc) {
this.showCommentDialog = true;
this.commentForm = {
id: id,
value: desc
};
}, },
onPageChange(val){ onPageChange(val){
this.nowPage = 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