define({ template: `
预约{{lang_set.project}}
关闭 开启
开启后预约项目完成给被预约门店所在区域的区域代理进行分红
选择固定金额:分红金额=区域代理分润金额/预约次数*区域代理分红比例
选择订单实付金额:分红金额=订单实付金额/预约次数*区域代理分红比例
添加{{lang_set.project}}
`, style: ` .item-card{ border: 1px solid #b4bccc; padding-top: 20px; margin-bottom: 20px; } #appointment .el-icon-close{ margin-left: 20px; font-weight: bold; font-size: 20px; color:#EE3939; } `, props: { form: { default() { return {}; }, }, }, data() { return { lang_set:{}, area_set:'', area_basic:'', projects: [], bookingItems:[{ id:"", project_id:"", service_count:"", price:"", worker_commission:"", merchant_staff_commission:"", area_set:0, province:"", city:"", district:"", street:"", }] }; }, created() { this.lang_set = this.form.lang_set; this.area_set = this.form.area_set; this.area_basic = this.form.area_basic; if(JSON.stringify(this.form.item) !== '[]') { this.bookingItems = this.form.item; } if(JSON.stringify(this.form.projects) !== '[]') { this.projects = this.form.projects; } }, methods: { addItems(){ this.bookingItems.push({ id:"", project_id: "", service_count: "", price: "", worker_commission: "", area_set: 0, province: "", city: "", district: "", street: "", merchant_staff_commission: "", }) }, delItem(index){ this.bookingItems.splice(index,1) }, validate() { let error_status = false; this.bookingItems.forEach(item => { if (!item.project_id ) { this.$message({message: '请选择'+ this.lang_set.project, type: 'warning'}); error_status = true; return false; } if (!item.service_count) { this.$message({message: '请输入预约次数', type: 'warning'}); error_status = true; return false; } }); if (error_status) { return false; } return this.bookingItems; }, }, });