| | |
| | | v-model="baseFormData.cstmrType$" @input="autoLoad('cstmrType',baseFormData.cstmrType$)"></uni-combox> |
| | | </view> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="客户行业" required name="industry"> |
| | | <view > |
| | | <uni-combox :candidates="industrys" placeholder="请选择客户行业" |
| | | v-model="baseFormData.industry"></uni-combox> |
| | | <uni-forms-item label="客户行业" name="industry" required> |
| | | <view @click="autoLoad('customerIndustryName','')"> |
| | | <uni-combox :candidates="industrys" placeholder="请选择客户行业" |
| | | v-model="baseFormData.industry" |
| | | @input="autoLoad('customerIndustryName',baseFormData.industry)"></uni-combox> |
| | | </view> |
| | | </uni-forms-item> |
| | | |
| | | <uni-forms-item label="产品类别" required name="productCategory"> |
| | | <view> |
| | | <uni-combox :candidates="productCategorys" placeholder="请选择产品类别" |
| | | v-model="baseFormData.productCategory"></uni-combox> |
| | | <uni-forms-item label="产品类型" name="productCategory" required> |
| | | <view @click="autoLoad('orderProductType','')"> |
| | | <uni-combox :candidates="productCategorys" placeholder="请选择产品类型" |
| | | v-model="baseFormData.productCategory" |
| | | @input="autoLoad('orderProductType',baseFormData.orderProductTypeId)"></uni-combox> |
| | | </view> |
| | | </uni-forms-item> |
| | | |
| | |
| | | </uni-forms-item> |
| | | |
| | | |
| | | <!-- <uni-forms-item label="负责人" required name="director"> |
| | | <view @click="autoLoad('user','')"> |
| | | <uni-combox :candidates="directors" placeholder="请选择负责人" |
| | | v-model="baseFormData.director" @input="autoLoad('user',baseFormData.director)"></uni-combox> |
| | | </view> |
| | | </uni-forms-item> --> |
| | | |
| | | <uni-forms-item label="客户联系人" required name="contacts"> |
| | | <uni-easyinput v-model="baseFormData.contacts" placeholder="请输入客户联系人" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="电话" required name="tel"> |
| | | <uni-easyinput v-model="baseFormData.tel" placeholder="请输入客户电话" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="负责人" name="director"> |
| | | <view @click="autoLoad('user','')"> |
| | | <uni-combox :candidates="directors" placeholder="请选择负责人" |
| | | v-model="baseFormData.director$" @input="autoLoad('user',baseFormData.director$)"></uni-combox> |
| | | </view> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="备注" name="remarks"> |
| | | <uni-easyinput type="textarea" v-model="baseFormData.remarks" placeholder="请输入备注" /> |
| | |
| | | directorList: [], |
| | | names: [], |
| | | nameList: [], |
| | | industrys: ['医药业','制造业','纺织业'], |
| | | productCategorys: ['立体库(货架)','立体库(集成)','四向穿梭库/两向穿梭库','阁楼货架/钢平台','周转容器','平库'], |
| | | industrys: [], |
| | | industryList: [], |
| | | productCategorys: [], |
| | | productCategoryList: [], |
| | | baseFormData: { |
| | | name: '', |
| | | citysData: [], |
| | |
| | | }, |
| | | director: { |
| | | rules: [{ |
| | | required: true, |
| | | required: false, |
| | | errorMessage: '请输入负责人', |
| | | }] |
| | | }, |
| | |
| | | this.baseFormData.cstmrType = this.cstmrTypes[e.detail.value].id |
| | | }, |
| | | areaChange(e) { |
| | | console.log(e); |
| | | console.log(this.baseFormData.pcd$); |
| | | this.citysDataTemp = e.detail.value[0].value + ',' + e.detail.value[1].value + ',' + e.detail.value[2].value |
| | | }, |
| | | autoLoad(type,condition) { |
| | |
| | | that.cstmrTypes = [] |
| | | that.directors = [] |
| | | that.directorList = [] |
| | | that.industrys = [] |
| | | var a = that.baseUrl + '/' + type + 'Query/auth' |
| | | uni.request({ |
| | | url: that.baseUrl + '/' + type + 'Query' +'/auth', |
| | |
| | | } |
| | | return |
| | | } |
| | | |
| | | if (type == 'orderProductType') { |
| | | for (element of res.data) { |
| | | that.productCategorys.push(element.value) |
| | | that.productCategoryList.push(element) |
| | | } |
| | | return |
| | | } |
| | | if (type == 'customerIndustryName') { |
| | | for (element of res.data) { |
| | | that.industrys.push(element.value) |
| | | that.industryList.push(element) |
| | | } |
| | | return |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | let that = this |
| | | var element; |
| | | for (element of that.directorList) { |
| | | if(element.value == that.baseFormData.director) { |
| | | if(element.value == that.baseFormData.director$) { |
| | | that.baseFormData.director = element.id |
| | | } |
| | | } |
| | | for (element of that.cstmrTypeList) { |
| | | if(element.value == that.baseFormData.cstmrType$) { |
| | | that.baseFormData.cstmrType = element.id |
| | | } |
| | | } |
| | | for (element of that.productCategoryList) { |
| | | if(element.value == that.baseFormData.productCategory) { |
| | | that.baseFormData.productCategory = element.id |
| | | } |
| | | } |
| | | for (element of that.industryList) { |
| | | if(element.value == that.baseFormData.industry) { |
| | | that.baseFormData.industry = element.id |
| | | } |
| | | } |
| | | this.$refs.baseForm.validate().then(res=>{ |
| | |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack() |
| | | uni.navigateBack({delta:2}) |
| | | } else if (res.code === 403) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |