diff --git a/pages/billing/addUser.vue b/pages/billing/addUser.vue index e921bdc..90cfb65 100644 --- a/pages/billing/addUser.vue +++ b/pages/billing/addUser.vue @@ -2,9 +2,7 @@ - + @@ -139,102 +137,102 @@ }, methods: { - del() { - this.delShow = true; - }, - delItemModal() { - this.delShow = false; - this.tui.request("/app/customer/delById", "post", { - id: this.userInfo.id, - }, false, true).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: "删除成功", - icon: 'none' - }) - uni.navigateBack() - } else { - uni.showToast({ - title: "删除失败", - icon: 'none' - }) - } - }) - }, - nameBlur() { - this.formData.username = this.formData.phone; - }, - openPicker() { - console.log('执行打开地址选择器') - this.show = true - }, + del() { + this.delShow = true; + }, + delItemModal() { + this.delShow = false; + this.tui.request("/app/customer/delById", "post", { + id: this.userInfo.id, + }, false, true).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: "删除成功", + icon: 'none' + }) + uni.navigateBack() + } else { + uni.showToast({ + title: "删除失败", + icon: 'none' + }) + } + }) + }, + nameBlur() { + this.formData.username = this.formData.phone; + }, + openPicker() { + console.log('执行打开地址选择器') + this.show = true + }, - onhideShow() { - this.show = false - console.log('执行了关闭地址选择器') - }, - //选中省市区 - onsetCity(e) { - let data = e.detail.target.dataset; - let address = data.province + data.city + data.area; - this.show = false - this.formData.address1 = address; - this.addressObj = { - province: data.province, - city: data.city, - area: data.area, - } - - console.log(this.formData, this.addressObj); - }, - // 触发提交表单 - submit() { - this.$refs.form.validate().then(res => { - // res.shopId = this.shopIndex; - res.shopId = 1; - if (this.userInfo) { - res.id = this.userInfo.id - this.tui.request("/app/customer/edit", "post", Object.assign(this.addressObj, res), false, - true).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: "修改成功", - icon: 'none' - }) - uni.navigateBack() - } else { - uni.showToast({ - title: "修改失败", - icon: 'none' - }) - } - }) - } else { - this.tui.request("/app/customer/save", "post", Object.assign(this.addressObj, res), false, - true).then((res) => { - if (res.code == 200) { - uni.showToast({ - title: "添加成功", - icon: 'none' - }) - uni.navigateBack({ - delta: 1 - }) - } else { - uni.showToast({ - title: "添加失败", - icon: 'none' - }) - } - }) + onhideShow() { + this.show = false + console.log('执行了关闭地址选择器') + }, + //选中省市区 + onsetCity(e) { + let data = e.detail.target.dataset; + let address = data.province + data.city + data.area; + this.show = false + this.formData.address1 = address; + this.addressObj = { + province: data.province, + city: data.city, + area: data.area, } - }).catch(err => { - console.log('表单错误信息:', err); - }) + console.log(this.formData, this.addressObj); + }, + // 触发提交表单 + submit() { + this.$refs.form.validate().then(res => { + // res.shopId = this.shopIndex; + res.shopId = 1; + if (this.userInfo) { + res.id = this.userInfo.id + this.tui.request("/app/customer/edit", "post", Object.assign(this.addressObj, res), false, + true).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: "修改成功", + icon: 'none' + }) + uni.navigateBack() + } else { + uni.showToast({ + title: "修改失败", + icon: 'none' + }) + } + }) + } else { + this.tui.request("/app/customer/save", "post", Object.assign(this.addressObj, res), false, + true).then((res) => { + if (res.code == 200) { + uni.showToast({ + title: "添加成功", + icon: 'none' + }) + uni.navigateBack({ + delta: 1 + }) + } else { + uni.showToast({ + title: "添加失败", + icon: 'none' + }) + } + }) + } + + }).catch(err => { + console.log('表单错误信息:', err); + }) + } } } - } + .popup-height { + padding: 0 25upx; + background-color: #fff; + } + \ No newline at end of file diff --git a/pages/staff/staff.vue b/pages/staff/staff.vue index 2e23867..68ed4f4 100644 --- a/pages/staff/staff.vue +++ b/pages/staff/staff.vue @@ -1,8 +1,8 @@