Commit 5bcc6466 by wangzhihui

fixed

1 parent fb35f069
...@@ -39,8 +39,10 @@ const formItems = [{ ...@@ -39,8 +39,10 @@ const formItems = [{
props: 'staffPhone', props: 'staffPhone',
type: 'input', type: 'input',
inputType: 'number', inputType: 'number',
disabled:false,
placeholder: '请输入手机号码', placeholder: '请输入手机号码',
maxLength: 11 maxLength: 11,
}, { }, {
label: '可见客户', label: '可见客户',
props: 'connectionIds', props: 'connectionIds',
......
...@@ -69,10 +69,13 @@ Page({ ...@@ -69,10 +69,13 @@ Page({
// if // if
if (options?.info) { if (options?.info) {
wx.setNavigationBarTitle({ title: '编辑员工' }) wx.setNavigationBarTitle({ title: '编辑员工' })
this.setData({ this.setData({
staffName: data.staffName, staffName: data.staffName,
staffPhone: data.staffPhone staffPhone: data.staffPhone
}) })
//更新手机号是否可以编辑
this.updatePhoneEdit()
} }
this.setData({ this.setData({
addOrEdit: options?.info ? 'edit' : 'add', addOrEdit: options?.info ? 'edit' : 'add',
...@@ -95,6 +98,12 @@ Page({ ...@@ -95,6 +98,12 @@ Page({
onShow() { onShow() {
}, },
updatePhoneEdit(){
this.data.formItems.forEach(item=>{
if(item.label =='手机号码') item.disabled = true
})
this.setData({formItems:this.data.formItems})
},
// 获取服务中心下的客户列表 // 获取服务中心下的客户列表
getConnectionList(e) { getConnectionList(e) {
mineApi.getConnectionListByServiceAPI({ mineApi.getConnectionListByServiceAPI({
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<block wx:for="{{formItems}}" wx:key="index"> <block wx:for="{{formItems}}" wx:key="index">
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view> <view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<view class="input-box" wx:if="{{item.type == 'input'}}"> <view class="input-box" wx:if="{{item.type == 'input'}}">
<input type="{{item.inputType || 'text'}}" placeholder="{{item.placeholder}}" class="input" bindinput="input" data-name="{{item.props}}" maxlength="{{item.maxLength}}" value="{{formData[item.props]}}" placeholder-class="input-placeholder" /> <input type="{{item.inputType || 'text'}}" disabled="{{item.disabled}}" placeholder="{{item.placeholder}}" class="input" bindinput="input" data-name="{{item.props}}" maxlength="{{item.maxLength}}" value="{{formData[item.props]}}" placeholder-class="input-placeholder" />
</view> </view>
<view class="select-box" style="background-color: {{item.disabled ? '#E1E2E6' : ''}}" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}" data-disabled="{{item.disabled}}"> <view class="select-box" style="background-color: {{item.disabled ? '#E1E2E6' : ''}}" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}" data-disabled="{{item.disabled}}">
<view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view> <view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view>
......
{ {
"appid": "wx2c28337db96364d2", "appid": "wx570d9331f9ace0bd",
"projectname": "business-assistant", "projectname": "business-assistant",
"compileType": "miniprogram", "compileType": "miniprogram",
"packOptions": { "packOptions": {
...@@ -87,11 +87,22 @@ ...@@ -87,11 +87,22 @@
"useCompilerPlugins": [ "useCompilerPlugins": [
"sass" "sass"
], ],
"condition": false "condition": false,
"es6": false,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"swc": false,
"disableSWC": true
}, },
"editorSetting": { "editorSetting": {
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 2 "tabSize": 2
}, },
"libVersion": "2.27.2" "libVersion": "2.27.2",
"simulatorPluginLibVersion": {}
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!