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',
......
...@@ -68,11 +68,14 @@ Page({ ...@@ -68,11 +68,14 @@ 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": {
"ignore": [], "ignore": [],
"include": [] "include": []
}, },
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "看产值", "name": "看产值",
"pathName": "pages/tab/output/output", "pathName": "pages/tab/output/output",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "携带目标页面", "name": "携带目标页面",
"pathName": "login/loading/loading", "pathName": "login/loading/loading",
"query": "url=%2Fpages%2Ftab%2Fmine%2Fmine%3Fid%3D123", "query": "url=%2Fpages%2Ftab%2Fmine%2Fmine%3Fid%3D123",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "选择账号", "name": "选择账号",
"pathName": "login/accountItems/accountItems", "pathName": "login/accountItems/accountItems",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "个人中心", "name": "个人中心",
"pathName": "pages/tab/mine/mine", "pathName": "pages/tab/mine/mine",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "", "name": "",
"pathName": "login/index/index", "pathName": "login/index/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "客户管理", "name": "客户管理",
"pathName": "pages/mineDetail/customerManagement/customerManagement", "pathName": "pages/mineDetail/customerManagement/customerManagement",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "消息盒子", "name": "消息盒子",
"pathName": "pages/mineDetail/messageBox/messageBox", "pathName": "pages/mineDetail/messageBox/messageBox",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
} }
] ]
} }
}, },
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
"coverView": true, "coverView": true,
"postcss": true, "postcss": true,
"lazyloadPlaceholderEnable": true, "lazyloadPlaceholderEnable": true,
"minified": true, "minified": true,
"useIsolateContext": false, "useIsolateContext": false,
"enhance": true, "enhance": true,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": true,
"packNpmManually": true, "packNpmManually": true,
"packNpmRelationList": [ "packNpmRelationList": [
{ {
"packageJsonPath": "./package.json", "packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./" "miniprogramNpmDistDir": "./"
} }
], ],
"useStaticServer": true, "useStaticServer": true,
"ignoreUploadUnusedFiles": true, "ignoreUploadUnusedFiles": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"useCompilerPlugins": [ "useCompilerPlugins": [
"sass" "sass"
], ],
"condition": false "condition": false,
}, "es6": false,
"editorSetting": { "compileWorklet": false,
"tabIndent": "insertSpaces", "uglifyFileName": false,
"tabSize": 2 "uploadWithSourceMap": true,
}, "minifyWXSS": true,
"libVersion": "2.27.2" "minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"swc": false,
"disableSWC": true
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 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!