Commit c34da649 by chenwq

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

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