define({
name: "notification",
template: `
{{name}}
单品下单通知,可指定某个用户,通知商品下单备货通知,如果商品为同一商家,建议使用系统一设置
非公众号注册会员,无法绑定通知人员
{{item.name}}
通知商家方式
搜索
搜索
{{scope.row.nickname}}
选择
`,
data(){
return {
notification_list:[{
id:1,
name:"下单通知"
},{
id:2,
name:"付款通知"
},{
id:3,
name:"买家收货通知"
}],
choose_goods_loading:false,
choose_goods_show:false,
// current_page:1,
// total:1,
// per_page:1,
goodsData:[],
member:{
avatar_image:"",
uid:"",
},
name:"",
keyword:"",
keyword_mobile:'',
loading:false
}
},
style: `
.img_box{
margin:20px 0;
display: flex;
flex-direction: column;
}
.img_box img{
width:150px;
height:150px;
}
.introduce_name{
width: 150px;
line-height: 20px;
}
.notcie_icon{
font-size: 32px;
width: 100%;
text-align: center;
}
.el-checkbox-group{
display: contents;
}
.nickname_card{
align-items: center;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
height: fit-content;
line-height: 50px;
margin-left:10px;
}
`,
created() {
this.member.avatar_image = this.form.member ? this.form.member.avatar_image : "";
this.member.uid = this.form.member ? this.form.member.uid : "";
this.is_storeCashier = this.form.is_storeCashier ? this.form.is_storeCashier : '';
// this.form.notice_type = [1,2]
this.name = this.form.member.username ? this.form.member.username : "";
},
methods: {
btnNotificationData(){
this.choose_goods_show = true;
this.choose_goods_loading = true
},
btnSelect(data){
// console.log(data,'data');
this.name = data.nickname
this.member.avatar_image = data.avatar_image
this.member.uid = data.uid
this.choose_goods_show = false
},
btnSearch(){
this.loading = true
this.$http.post(this.http_url +'member.member.get-search-member-json',{
keyword:this.keyword
}).then(response => {
if(response.data.result==1){
this.$message({
message: '成功',
type: 'success'
});
this.loading = false
this.goodsData = response.data.data.members
}
else{
this.$message.error(response.data);
}
}),function(res){
console.log(res);
};
},
btnSearchMobile() {
this.loading = true
this.$http.post(this.http_url +'plugin.store-cashier.store.admin.member-information.get-member-only-mobile',{
keyword:this.keyword_mobile
}).then(response => {
if(response.data.result==1){
this.$message({
message: '成功',
type: 'success'
});
this.loading = false
this.goodsData = response.data.data.members
}
else{
this.$message.error(response.data.msg);
this.loading = false
}
})
},
extraDate(){
},
validate(){
return {
type:this.form.notice_type,
uid:this.member.uid ? this.member.uid : ""
}
}
},
props: {
form: {
// type: Object,
default() {
return {}
}
},
http_url:{
type:String,
default() {
return "";
},
}
}
})