|
@@ -34,15 +34,15 @@
|
|
<view v-if="selectValue=='个人'" style="padding: 16px">
|
|
<view v-if="selectValue=='个人'" style="padding: 16px">
|
|
<uni-forms :modelValue="formData" label-width="0">
|
|
<uni-forms :modelValue="formData" label-width="0">
|
|
|
|
|
|
- <text v-if="formInfo.contactNickName">用户昵称:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>用户昵称:</text>
|
|
<uni-forms-item label="用户昵称" name="realName" label-width="0">
|
|
<uni-forms-item label="用户昵称" name="realName" label-width="0">
|
|
<uni-easyinput type="text" disabled v-model="formInfo.contactNickName" placeholder="请输入您的昵称" />
|
|
<uni-easyinput type="text" disabled v-model="formInfo.contactNickName" placeholder="请输入您的昵称" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <text v-if="formInfo.userRealName">真实姓名:</text>
|
|
|
|
|
|
+ <text style="line-height: 30px;vertical-align: middle;">真实姓名:</text>
|
|
<uni-forms-item label="真实姓名" name="contactMethod" v-if="formInfo.userRealName">
|
|
<uni-forms-item label="真实姓名" name="contactMethod" v-if="formInfo.userRealName">
|
|
<uni-easyinput type="text" disabled="" v-model="formInfo.userRealName" placeholder="请输入真实姓名" />
|
|
<uni-easyinput type="text" disabled="" v-model="formInfo.userRealName" placeholder="请输入真实姓名" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <text v-if="formInfo.contactMethod">联系方式:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>联系方式:</text>
|
|
<uni-forms-item label="联系方式" name="phone">
|
|
<uni-forms-item label="联系方式" name="phone">
|
|
<uni-easyinput type="text" disabled v-model="formInfo.contactMethod" placeholder="请输入联系手机/微信/邮箱" />
|
|
<uni-easyinput type="text" disabled v-model="formInfo.contactMethod" placeholder="请输入联系手机/微信/邮箱" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
@@ -53,7 +53,7 @@
|
|
<view v-if="selectValue=='公司'" style="padding: 16px">
|
|
<view v-if="selectValue=='公司'" style="padding: 16px">
|
|
<uni-forms :modelValue="formData" label-width="0">
|
|
<uni-forms :modelValue="formData" label-width="0">
|
|
<view style="margin-bottom:16px">
|
|
<view style="margin-bottom:16px">
|
|
- <text v-if="searchValue">公司名称:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>公司名称:</text>
|
|
<w-select style="width: 100%;" v-model='searchValue' :list='items' valueName='name'
|
|
<w-select style="width: 100%;" v-model='searchValue' :list='items' valueName='name'
|
|
keyName="regNumber" @change='selectChange' :filterable="true">
|
|
keyName="regNumber" @change='selectChange' :filterable="true">
|
|
</w-select>
|
|
</w-select>
|
|
@@ -61,15 +61,15 @@
|
|
<!-- <uni-forms-item label="公司名称" name="name">
|
|
<!-- <uni-forms-item label="公司名称" name="name">
|
|
<uni-easyinput type="text" v-model="userInfo.company" placeholder="请输入所在公司名称" />
|
|
<uni-easyinput type="text" v-model="userInfo.company" placeholder="请输入所在公司名称" />
|
|
</uni-forms-item> -->
|
|
</uni-forms-item> -->
|
|
- <text v-if="formInfo.jobTitle">您的职称:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>您的职称:</text>
|
|
<uni-forms-item label="" name="realName" label-width="0">
|
|
<uni-forms-item label="" name="realName" label-width="0">
|
|
<uni-easyinput type="text" :clearable="false" v-model="formInfo.jobTitle" placeholder="请输入您的职称" />
|
|
<uni-easyinput type="text" :clearable="false" v-model="formInfo.jobTitle" placeholder="请输入您的职称" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <text v-if="formInfo.contactPerson">联系姓名:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>联系姓名:</text>
|
|
<uni-forms-item label="联系人姓名" name="contactMethod">
|
|
<uni-forms-item label="联系人姓名" name="contactMethod">
|
|
<uni-easyinput type="text" :clearable="false" v-model="formInfo.contactPerson" placeholder="请输入联系人姓名" />
|
|
<uni-easyinput type="text" :clearable="false" v-model="formInfo.contactPerson" placeholder="请输入联系人姓名" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <text v-if="formInfo.contactMethod">联系方式:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>联系方式:</text>
|
|
<uni-forms-item label="联系方式" name="phone">
|
|
<uni-forms-item label="联系方式" name="phone">
|
|
<uni-easyinput type="text" :clearable="false" v-model="formInfo.contactMethod" placeholder="请输入联系手机/微信/邮箱" />
|
|
<uni-easyinput type="text" :clearable="false" v-model="formInfo.contactMethod" placeholder="请输入联系手机/微信/邮箱" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
@@ -119,26 +119,26 @@
|
|
</view>
|
|
</view>
|
|
<view v-if="stepIndex!=1">
|
|
<view v-if="stepIndex!=1">
|
|
|
|
|
|
- <view style="padding: 16px" v-if="(selectValue=='公司'&&stepIndex==2)||(selectValue=='个人'&&stepIndex==2)">
|
|
|
|
|
|
+ <view style="padding: 16px;padding-bottom: 0;" v-if="(selectValue=='公司'&&stepIndex==2)||(selectValue=='个人'&&stepIndex==2)">
|
|
|
|
|
|
- <text>发布种类:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>发布种类:</text>
|
|
<uni-data-select v-model="selectValue2" :localdata="selectList2" @change="changeSelect2"
|
|
<uni-data-select v-model="selectValue2" :localdata="selectList2" @change="changeSelect2"
|
|
:clear="false"></uni-data-select>
|
|
:clear="false"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view v-if="selectValue2=='产品'" >
|
|
<view v-if="selectValue2=='产品'" >
|
|
<view style="padding: 16px" v-if="(selectValue=='公司'&&stepIndex==2)||(selectValue=='个人'&&stepIndex==2)">
|
|
<view style="padding: 16px" v-if="(selectValue=='公司'&&stepIndex==2)||(selectValue=='个人'&&stepIndex==2)">
|
|
- <text v-if="selectValue4">产品种类:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>产品种类:</text>
|
|
<uni-data-select v-model="selectValue4" :localdata="selectList4" @change="changeSelect4"
|
|
<uni-data-select v-model="selectValue4" :localdata="selectList4" @change="changeSelect4"
|
|
placeholder="产品种类" :clear="false" style="margin-bottom:16px"></uni-data-select>
|
|
placeholder="产品种类" :clear="false" style="margin-bottom:16px"></uni-data-select>
|
|
|
|
|
|
|
|
|
|
<view style="margin-top: 16px;">
|
|
<view style="margin-top: 16px;">
|
|
- <text>品牌:</text>
|
|
|
|
- <uni-easyinput type="text" required v-model="brand" placeholder="请输入产品品牌" />
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>产品品牌:</text>
|
|
|
|
+ <uni-easyinput type="text" :clearable="false" required v-model="brand" placeholder="请输入产品品牌" />
|
|
</view>
|
|
</view>
|
|
<view style="margin-top: 16px;line-height: 30px;margin-bottom: 16px;">
|
|
<view style="margin-top: 16px;line-height: 30px;margin-bottom: 16px;">
|
|
- 发布的产品是否属于医疗器械?
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text>发布的产品是否属于医疗器械?
|
|
<uni-data-checkbox :multiple="false" v-model="isMedical" selectedColor="#01BEFF"
|
|
<uni-data-checkbox :multiple="false" v-model="isMedical" selectedColor="#01BEFF"
|
|
:localdata="[{text: '是',value: '1'},{text: '否',value: '0'}]" />
|
|
:localdata="[{text: '是',value: '1'},{text: '否',value: '0'}]" />
|
|
</view>
|
|
</view>
|
|
@@ -166,18 +166,20 @@
|
|
<uni-forms :modelValue="formData" label-width="0">
|
|
<uni-forms :modelValue="formData" label-width="0">
|
|
|
|
|
|
<uni-forms-item label="" name="prodName" label-width="0">
|
|
<uni-forms-item label="" name="prodName" label-width="0">
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>产品名称:</text>
|
|
<uni-easyinput maxlength="50" type="text" :clearable="false" v-model="item.prodName"
|
|
<uni-easyinput maxlength="50" type="text" :clearable="false" v-model="item.prodName"
|
|
placeholder="*请输入产品名称" />
|
|
placeholder="*请输入产品名称" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <uni-forms-item label="" name="contactMethod">
|
|
|
|
|
|
+ <uni-forms-item label="" name="prodSpec" label-width="0">
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>产品型号:</text>
|
|
<uni-easyinput maxlength="100" type="text" :clearable="false" v-model="item.prodSpec"
|
|
<uni-easyinput maxlength="100" type="text" :clearable="false" v-model="item.prodSpec"
|
|
placeholder="*请输入产品型号" />
|
|
placeholder="*请输入产品型号" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
- <uni-forms-item label="" name="phone">
|
|
|
|
|
|
+ <uni-forms-item label="" name="prodDesc">
|
|
|
|
+ <text style="line-height: 30px;vertical-align: middle;">产品介绍:</text>
|
|
<uni-easyinput maxlength="500" type="textarea" v-model="item.prodDesc" placeholder="请输入产品介绍" />
|
|
<uni-easyinput maxlength="500" type="textarea" v-model="item.prodDesc" placeholder="请输入产品介绍" />
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
</uni-forms>
|
|
</uni-forms>
|
|
<template v-slot:actions v-if="itemIndex==extList.length-1" >
|
|
<template v-slot:actions v-if="itemIndex==extList.length-1" >
|
|
<view style="margin: 12px;margin-top: -12px;">
|
|
<view style="margin: 12px;margin-top: -12px;">
|
|
@@ -220,7 +222,7 @@
|
|
</view>
|
|
</view>
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2">
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2">
|
|
<view style="padding: 16px">
|
|
<view style="padding: 16px">
|
|
- <text>服务类型:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>服务类型:</text>
|
|
<uni-data-select v-model="selectValue3" :localdata="selectList3" @change="changeSelect3"
|
|
<uni-data-select v-model="selectValue3" :localdata="selectList3" @change="changeSelect3"
|
|
:clear="false"></uni-data-select>
|
|
:clear="false"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
@@ -228,8 +230,8 @@
|
|
|
|
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2">
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2">
|
|
<view style="padding: 16px">
|
|
<view style="padding: 16px">
|
|
- <text>品牌:</text>
|
|
|
|
- <uni-easyinput type="text" required v-model="brand" placeholder="请输入服务品牌" />
|
|
|
|
|
|
+ <text style="line-height: 30px;vertical-align: middle;">服务品牌:</text>
|
|
|
|
+ <uni-easyinput type="text" :clearable="false" v-model="brand" placeholder="请输入服务品牌" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -240,7 +242,7 @@
|
|
<input placeholder="写下一句简短的标题" name="input" placeholder-style="color:#AAAAAA" ></input>
|
|
<input placeholder="写下一句简短的标题" name="input" placeholder-style="color:#AAAAAA" ></input>
|
|
</view> -->
|
|
</view> -->
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2" style="padding: 16px;padding-bottom: 0;margin-bottom: -30rpx;">
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2" style="padding: 16px;padding-bottom: 0;margin-bottom: -30rpx;">
|
|
- <text>服务介绍:</text>
|
|
|
|
|
|
+ <text style="color: red;line-height: 30px;vertical-align: middle;margin-right: 4px;">*</text><text>服务介绍:</text>
|
|
</view>
|
|
</view>
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2" class="tn-margin tn-bg-gray--light tn-padding"
|
|
<view v-if="selectValue2=='服务'&&stepIndex==2" class="tn-margin tn-bg-gray--light tn-padding"
|
|
style="border-radius: 10rpx;">
|
|
style="border-radius: 10rpx;">
|
|
@@ -592,12 +594,58 @@
|
|
prodName: "",
|
|
prodName: "",
|
|
prodSpec: "",
|
|
prodSpec: "",
|
|
})
|
|
})
|
|
|
|
+ }
|
|
|
|
+ if(that.selectValue=='公司'){
|
|
|
|
+ console.error(this.org);
|
|
|
|
+ //判断必填项
|
|
|
|
+ // 公司
|
|
|
|
+ if(!this.org.name){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入公司名称',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ icon:'none'
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(this.formInfo.jobTitle.length<1){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入您的职称',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ icon:'none'
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if(this.formInfo.contactPerson.length<1){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入联系人姓名',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ icon:'none'
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if(this.formInfo.contactMethod.length<1){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入联系手机/微信/邮箱',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ icon:'none'
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if(this.stepIndex==2&&that.selectValue2=='产品'){
|
|
if(this.stepIndex==2&&that.selectValue2=='产品'){
|
|
|
|
+ if(this.brand.length<1){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入产品品牌',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ icon:'none'
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
for(let i=0;i<this.extList.length;i++){
|
|
for(let i=0;i<this.extList.length;i++){
|
|
if(!this.extList[i].prodName||!this.extList[i].prodSpec){
|
|
if(!this.extList[i].prodName||!this.extList[i].prodSpec){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: !this.extList[i].prodName?'产品'+(i+1)+'的产品名称必填':'产品'+(i+1)+'的产品型号必填',
|
|
|
|
|
|
+ title: !this.extList[i].prodName?'请输入产品'+(i+1)+'的产品名称':'请输入产品'+(i+1)+'的产品型号',
|
|
duration: 2000,
|
|
duration: 2000,
|
|
icon:'none'
|
|
icon:'none'
|
|
});
|
|
});
|
|
@@ -610,7 +658,7 @@
|
|
|
|
|
|
if(!this.content){
|
|
if(!this.content){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '服务介绍必填',
|
|
|
|
|
|
+ title: '请输入服务介绍',
|
|
duration: 2000,
|
|
duration: 2000,
|
|
icon:'none'
|
|
icon:'none'
|
|
});
|
|
});
|
|
@@ -620,13 +668,9 @@
|
|
}
|
|
}
|
|
|
|
|
|
this.stepIndex = this.stepIndex+1;
|
|
this.stepIndex = this.stepIndex+1;
|
|
-
|
|
|
|
- console.error(this.stepIndex);
|
|
|
|
},
|
|
},
|
|
getCompany(){
|
|
getCompany(){
|
|
let that = this;
|
|
let that = this;
|
|
-
|
|
|
|
-
|
|
|
|
request.post('/slbUserCompanyRel/show/my', {
|
|
request.post('/slbUserCompanyRel/show/my', {
|
|
userNo: uni.getStorageSync('userNo')
|
|
userNo: uni.getStorageSync('userNo')
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -635,7 +679,15 @@
|
|
for(let i=0;i<list.length;i++){
|
|
for(let i=0;i<list.length;i++){
|
|
list[i].name = list[i].company;
|
|
list[i].name = list[i].company;
|
|
list[i].regNumber= list[i].company;
|
|
list[i].regNumber= list[i].company;
|
|
- if(list[i].isDefault=='1'){
|
|
|
|
|
|
+ if(!that.isEdit&&list[i].isDefault=='1'){
|
|
|
|
+ that.searchValue = list[i].name
|
|
|
|
+ that.current = list[i].name;
|
|
|
|
+ that.formInfo.jobTitle = list[i].jobTitle;
|
|
|
|
+ that.formInfo.contactPerson = list[i].contactPerson;
|
|
|
|
+ that.formInfo.contactMethod = list[i].contactMethod;
|
|
|
|
+ that.org = list[i];
|
|
|
|
+ }
|
|
|
|
+ if(that.isEdit&&list[i].name==that.editItem.company){
|
|
that.searchValue = list[i].name
|
|
that.searchValue = list[i].name
|
|
that.current = list[i].name;
|
|
that.current = list[i].name;
|
|
that.formInfo.jobTitle = list[i].jobTitle;
|
|
that.formInfo.jobTitle = list[i].jobTitle;
|
|
@@ -649,9 +701,6 @@
|
|
console.warn(that.items);
|
|
console.warn(that.items);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
changeSelect(e) {
|
|
changeSelect(e) {
|
|
this.selectValue = e;
|
|
this.selectValue = e;
|
|
@@ -697,7 +746,7 @@
|
|
for(let i=0;i<this.extList.length;i++){
|
|
for(let i=0;i<this.extList.length;i++){
|
|
if(!this.extList[i].prodName||!this.extList[i].prodSpec){
|
|
if(!this.extList[i].prodName||!this.extList[i].prodSpec){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: !this.extList[i].prodName?'产品'+(i+1)+'的产品名称必填':'产品'+(i+1)+'的产品型号必填',
|
|
|
|
|
|
+ title: !this.extList[i].prodName?'请输入产品'+(i+1)+'的产品名称':'请输入产品'+(i+1)+'的产品型号',
|
|
duration: 2000,
|
|
duration: 2000,
|
|
icon:'none'
|
|
icon:'none'
|
|
});
|
|
});
|
|
@@ -740,6 +789,8 @@
|
|
postData.companyEntity.company = postData.company;
|
|
postData.companyEntity.company = postData.company;
|
|
postData.companyEntity.jobTitle = postData.jobTitle;
|
|
postData.companyEntity.jobTitle = postData.jobTitle;
|
|
postData.companyEntity.creditCode = this.org.creditCode;
|
|
postData.companyEntity.creditCode = this.org.creditCode;
|
|
|
|
+ postData.companyEntity.address = this.org.base;
|
|
|
|
+ postData.companyEntity.regStatus = this.org.regStatus;
|
|
|
|
|
|
postData.companyEntity.contactPerson = postData.contactPerson;
|
|
postData.companyEntity.contactPerson = postData.contactPerson;
|
|
postData.companyEntity.contactMethod = postData.contactMethod;
|
|
postData.companyEntity.contactMethod = postData.contactMethod;
|
|
@@ -888,7 +939,7 @@
|
|
|
|
|
|
} else {
|
|
} else {
|
|
that.items = [];
|
|
that.items = [];
|
|
-
|
|
|
|
|
|
+ that.org = {};
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|