| | |
| | | <view> |
| | | <view class="container"> |
| | | <uni-forms ref="baseForm" :modelValue="baseFormData"> |
| | | <uni-forms-item label="客户名称" required name="name"> |
| | | <!-- <uni-forms-item label="客户名称" required name="name"> |
| | | <uni-easyinput v-model="baseFormData.name" placeholder="请输入客户名称" /> |
| | | </uni-forms-item> --> |
| | | |
| | | <uni-forms-item label="客户名称" required name="name"> |
| | | <view> |
| | | <uni-combox :candidates="names" placeholder="请输入客户名称" |
| | | v-model="baseFormData.name" @input="cstmrSearch()"></uni-combox> |
| | | </view> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item label="客户类别" required name="cstmrType"> |
| | |
| | | director: '', |
| | | cstmrTypeList: [], |
| | | directorList: [], |
| | | names: [], |
| | | nameList: [], |
| | | industrys: ['医药业','制造业','纺织业'], |
| | | productCategorys: ['立体库(货架)','立体库(集成)','四向穿梭库/两向穿梭库','阁楼货架/钢平台','周转容器','平库'], |
| | | baseFormData: { |
| | | name: '', |
| | | citysData: [], |
| | | cstmrType: '', |
| | | director: '', |
| | |
| | | this.autoLoad('user','') |
| | | }, |
| | | methods: { |
| | | cstmrSearch() { |
| | | this.names = [] |
| | | let _this = this |
| | | if(_this.baseFormData.name.length < 4) { |
| | | return |
| | | } |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/cstmrSearch/auth`, |
| | | header:{'token':uni.getStorageSync('token'),'content-type':'application/x-www-form-urlencoded',}, |
| | | data: {condition: _this.baseFormData.name}, |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200 && res.data.length > 0) { |
| | | for(let element of res.data) { |
| | | _this.names.push(element.name) |
| | | _this.nameList.push(element) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | bindPickerChange: function(e) { |
| | | this.cstmrTypeIndex = e.detail.value |
| | | this.baseFormData.cstmrType = this.cstmrTypes[e.detail.value].id |