Commit c34da649 by chenwq

服务中心/客户编辑加字段,popup加自定义class

1 parent bb5ec223
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js // tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
Component({ Component({
externalClasses: ['custom-class'],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -50,7 +51,7 @@ Component({ ...@@ -50,7 +51,7 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
noScroll() {}, noScroll() { },
hidePopup() { hidePopup() {
this.setData({ this.setData({
show: false show: false
......
<view class="popup " hidden="{{!showPopup}}" catchtouchmove="noScroll"> <view class="popup custom-class" hidden="{{!showPopup}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content {{close?'close':''}}" style="height:{{height}}"> <view class="popup-content {{close?'close':''}}" style="height:{{height}}">
<block wx:if="{{title}}"> <block wx:if="{{title}}">
......
...@@ -89,6 +89,7 @@ Page({ ...@@ -89,6 +89,7 @@ Page({
}, },
handleConfirm() { handleConfirm() {
let { userInfo } = wx.$storage.get()
let { apiNameObj, addOrEdit, formData } = this.data let { apiNameObj, addOrEdit, formData } = this.data
formData.sceneList = this.dealScene() formData.sceneList = this.dealScene()
let validObj = wx.$util.checkRule(formData, constantData.formRule) let validObj = wx.$util.checkRule(formData, constantData.formRule)
...@@ -111,7 +112,10 @@ Page({ ...@@ -111,7 +112,10 @@ Page({
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
// 创建/编辑接口 // 创建/编辑接口
mineCustomerApi[apiNameObj[addOrEdit]](formData).then(res => { mineCustomerApi[apiNameObj[addOrEdit]]({
...formData,
serviceMerchantName: userInfo.merchantName
}).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == '0') { if (code == '0') {
if (addOrEdit == 'add') { if (addOrEdit == 'add') {
......
...@@ -56,7 +56,6 @@ Page({ ...@@ -56,7 +56,6 @@ Page({
getList(isReset = false) { getList(isReset = false) {
let { customerInfo } = this.data let { customerInfo } = this.data
mineCustomerApi.getEmployeeList({ merchantId: customerInfo.merchantId }).then(res => { mineCustomerApi.getEmployeeList({ merchantId: customerInfo.merchantId }).then(res => {
console.log(res)
this.setData({ this.setData({
saleList: res, saleList: res,
triggered: false triggered: false
...@@ -70,6 +69,7 @@ Page({ ...@@ -70,6 +69,7 @@ Page({
}, },
getInviteCode() { getInviteCode() {
let { userInfo } = wx.$storage.get()
let { customerInfo, popupVal } = this.data let { customerInfo, popupVal } = this.data
let _this = this let _this = this
let sceneStr = '' let sceneStr = ''
...@@ -88,7 +88,7 @@ Page({ ...@@ -88,7 +88,7 @@ Page({
sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item]) sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item])
}) })
let params = { let params = {
merchantId: customerInfo.merchantId, merchantId: userInfo.bussinessId,
staffLabel: sceneStr staffLabel: sceneStr
} }
mineCustomerApi.getInviteCode(params).then(res => { mineCustomerApi.getInviteCode(params).then(res => {
......
...@@ -40,6 +40,7 @@ Page({ ...@@ -40,6 +40,7 @@ Page({
}, },
handleConfirm() { handleConfirm() {
let { userInfo } = wx.$storage.get()
let { apiNameObj, addOrEdit, formData } = this.data let { apiNameObj, addOrEdit, formData } = this.data
let _this = this let _this = this
let validObj = wx.$util.checkRule(formData, constantData.formRule) let validObj = wx.$util.checkRule(formData, constantData.formRule)
...@@ -57,7 +58,10 @@ Page({ ...@@ -57,7 +58,10 @@ Page({
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
// 创建/编辑接口 // 创建/编辑接口
mineServiceApi[apiNameObj[addOrEdit]](formData).then(res => { mineServiceApi[apiNameObj[addOrEdit]]({
...formData,
serviceMerchantName: userInfo.merchantName
}).then(res => {
let { code, message } = res let { code, message } = res
if (code == '0') { if (code == '0') {
if (addOrEdit == 'add') { if (addOrEdit == 'add') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!