information.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  1. <template name='information'>
  2. <view class="container" :style="{paddingBottom :isIphoneX ? '218rpx' : '184rpx'}">
  3. <view class="wrap-info">
  4. <view class="row">
  5. <view class="info-title">基本信息</view>
  6. </view>
  7. <view class="info-from">
  8. <view class="label">公司名称</view>
  9. <input class="row-input" type="text" v-model="params.name" placeholder="请与营业执照的注册名称保持一致" placeholder-class="placeholder" maxlength="30"/>
  10. </view>
  11. <view class="info-email">示例:华熙生物科技股份有限公司</view>
  12. <view class="info-from">
  13. <view class="label">公司简称</view>
  14. <input class="row-input" type="text" v-model="params.shortName" placeholder="请输入公司简称" placeholder-class="placeholder" maxlength="10"/>
  15. </view>
  16. <view class="info-email">示例:华熙生物</view>
  17. <view class="info-from">
  18. <view class="label">公司地址</view>
  19. <view class="row-input" @click="showMulLinkageThreePicker">
  20. <text :class="addressData.address === '请选择公司所在地区' ? 'none' : ''">
  21. {{addressData.address}}
  22. </text>
  23. <text class="iconfont icon-xiayibu"></text>
  24. </view>
  25. </view>
  26. <textarea value="" v-model="params.address" placeholder="请填写详细地址,如街道/小区/门牌等" maxlength="50" placeholder-class="placeholder" class="address-details"/>
  27. <view class="info-from">
  28. <view class="label">联系人</view>
  29. <input class="row-input" v-model="params.linkMan" type="text" placeholder="请输入联系人姓名" placeholder-class="placeholder" maxlength="6"/>
  30. </view>
  31. <view class="info-from">
  32. <view class="label">邮箱</view>
  33. <input class="row-input" v-model="params.email" type="text" placeholder="请输入邮箱地址" placeholder-class="placeholder"/>
  34. </view>
  35. <text class="info-email">邮箱可用作登录账号,请使用公司邮箱或法人邮箱</text>
  36. <view class="info-from">
  37. <view class="label">固定电话</view>
  38. <input class="row-input" v-model="params.contractPhone" type="text" placeholder="请在号码前加区" placeholder-class="placeholder" maxlength="11"/>
  39. </view>
  40. <view class="info-from">
  41. <view class="label">传真</view>
  42. <input class="row-input" v-model="params.fax" type="text" placeholder="请输入公司传真号" placeholder-class="placeholder"/>
  43. </view>
  44. <view class="info-from">
  45. <view class="label">法人代表</view>
  46. <input class="row-input" v-model="params.legalPerson" type="text" placeholder="请输入公司法人代表姓名" placeholder-class="placeholder" maxlength="6"/>
  47. </view>
  48. <view class="info-from">
  49. <view class="label">注册资本</view>
  50. <input class="row-input" v-model="params.registeredCapital" type="text" placeholder="请填写公司注册资本 " placeholder-class="placeholder" />
  51. </view>
  52. <view class="info-from">
  53. <view class="label">公司性质</view>
  54. <input class="row-input" v-model="params.companyNature" type="text" placeholder="请填写公司性质" placeholder-class="placeholder"/>
  55. </view>
  56. <view class="info-from">
  57. <view class="label">年营业额</view>
  58. <input class="row-input" v-model="params.turnover" type="text" placeholder="请输入公司年营业额" placeholder-class="placeholder"/>
  59. </view>
  60. </view>
  61. <view class="wrap-content">
  62. <view class="row">
  63. <view class="info-title">经营信息</view>
  64. </view>
  65. <view class="info-from" style="border: 0;">
  66. <view class="label">公司类型</view>
  67. <view class="row-input ShopTyperadio">
  68. <radio-group @change="radioChange">
  69. <label class="radio" v-for="(item, index) in typename" :key="item.value">
  70. <radio :value="item.value" :checked="item.value == params.firstShopType" color='#E15616'/>{{item.name}}
  71. </label>
  72. </radio-group>
  73. </view>
  74. </view>
  75. <view class="secondTyperadio" v-if="params.firstShopType==1" >
  76. <view class="radio" v-for="(item,index) in secondtype" :key="index" @click="secondypeRidio(item)" :class="item.value==params.secondShopType?'active':''">
  77. <view class="secondRadio" >{{item.name}}</view>
  78. </view>
  79. </view>
  80. <view class="zizhi" v-if="params.secondShopType==3">
  81. <view class="info2-title zizhi-title">资质</view>
  82. <view class="uploadImage">
  83. <view class="form-upload-image" v-if="params.medicalPracticeLicense!=''&&params.medicalPracticeLicense!=null">
  84. <image class="upload-img" :src="params.medicalPracticeLicense" alt="" ></image>
  85. <view class="iconfont icon-shanchu1" @click="deleteMedicalImage()"></view>
  86. </view>
  87. <view class="formLine-file" @click="uploadzizhiImageFn" v-else>
  88. <view class="file-zizhi"></view>
  89. </view>
  90. <view class="form-upload-tips">
  91. <text class="iconfont icon-wenhao"></text>
  92. <view class="wen-tips">点击图片可放大图片</view>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="business">
  97. <view class="info2-title business-title">主营内容</view>
  98. <view class="business-info">
  99. <checkbox-group class="row-group" @change="chooseMaleLike">
  100. <label class="diyBox" v-for="(item, index) in mentuzCampList" :key="item.value" >
  101. <checkbox :value="item.value" :checked="item.checked"></checkbox>
  102. <view class="row-text">{{item.name}}</view>
  103. </label>
  104. </checkbox-group>
  105. <view class="addbusiness">
  106. <input class="row-input other" type="text" placeholder="请输入自定义项目" v-model="mainProEdit"placeholder-class="placeholder" maxlength="5"/>
  107. <button type="default" class="button" @click.stop="mainProAdd">确认添加</button>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="business">
  112. <view class="info2-title business-title">经营范围</view>
  113. <view class="business-info">
  114. <checkbox-group class="row-group" @change="chooseMaleLikes">
  115. <label class="row-input" v-for="(item, index) in medicaCampList" :key="item.value" >
  116. <checkbox :value="item.value" :checked="item.checked" ></checkbox>
  117. <view class="row-text">{{item.name}}</view>
  118. </label>
  119. </checkbox-group>
  120. <view class="addbusiness">
  121. <input class="row-input other" type="text" placeholder="请输入自定义经营范围" v-model="shopScopeEdit" placeholder-class="placeholder" maxlength="5"/>
  122. <button type="default" class="button" @click.stop="shopScopeAdd">确认添加</button>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="info input">
  127. <view class="label">网站地址:</view>
  128. <input class="row-input" v-model="params.website" type="text" placeholder="请输入公司网站地址" placeholder-class="placeholder" maxlength="100"/>
  129. </view>
  130. <view class="info input">
  131. <view class="label">微信公众号:</view>
  132. <input class="row-input" v-model="params.wxOfficialAccount" type="text" placeholder="请输入公司微信公众号" placeholder-class="placeholder" maxlength="20"/>
  133. </view>
  134. <view class="info input">
  135. <view class="label">微信小程序:</view>
  136. <input class="row-input" v-model="params.wxApplets" type="text" placeholder="请输入公司微信小程序名称" placeholder-class="placeholder" maxlength="20"/>
  137. </view>
  138. <view class="info">
  139. <view class="info2-title">公司介绍</view>
  140. <textarea v-model="params.shopDesc" maxlength="2000" placeholder="公司简介会在公司介绍页面展示,有助于机构更好的了解您, 建议从个人规模、代理产品、机构服务、荣誉资质这4方面进行介绍" placeholder-class="placeholder" name="textarea"/>
  141. </view>
  142. <view class="info">
  143. <view class="info2-title">主打系列商品说明</view>
  144. <textarea placeholder="请输入主打系列商品说明" v-model="params.mainProductDesc" maxlength="500" placeholder-class="placeholder" name="textarea"/>
  145. </view>
  146. </view>
  147. <view class="wrap-image">
  148. <view class="row">
  149. <view class="info-title">资质证明</view>
  150. </view>
  151. <view class="info-from">
  152. <view class="label Code">营业执照编号</view>
  153. <input class="row-input Code" v-model.trim="params.socialCreditCode" type="text" placeholder="请输入公司营业执照编号" placeholder-class="placeholder" maxlength="18"/>
  154. </view>
  155. <view class="zizhi">
  156. <view class="info2-title zizhi-title">营业执照图片</view>
  157. <view class="uploadImage">
  158. <view class="form-upload-image" v-if="params.businessLicense!=''&&params.businessLicense!=null">
  159. <image class="upload-img" :src="params.businessLicense" @click="showViewerImageFn()" ></image>
  160. <view class="iconfont icon-shanchu1" @click="deleteBusinessImage()"></view>
  161. </view>
  162. <view class="formLine-file" @click="uploadBusinessLicenseImageFn" v-else>
  163. <view class="file-biss iconImage"></view>
  164. </view>
  165. </view>
  166. </view>
  167. <view class="zizhi">
  168. <view class="info2-title zizhi-title">公司LOGO</view>
  169. <view class="uploadImage">
  170. <view class="form-upload-image" v-if="params.logo!=''&&params.logo!=null">
  171. <image class="upload-img" :src="params.logo" alt="" @click="showViewerImageFn1()"></image>
  172. <view class="iconfont icon-shanchu1" @click="deletelogoImage()"></view>
  173. </view>
  174. <view class="formLine-file" @click="uploadlogoImageFn" v-else>
  175. <view class="file-logo iconImage"></view>
  176. </view>
  177. </view>
  178. </view>
  179. <view class="zizhi">
  180. <view class="info2-title zizhi-title">生产许可证</view>
  181. <view class="uploadImage">
  182. <view class="form-upload-image" v-if="params.operationLicence!=''&&params.operationLicence!=null">
  183. <image class="upload-img" :src="params.operationLicence" alt="" @click="showViewerImageFn2()"></image>
  184. <view class="iconfont icon-shanchu1" @click="deleteproducImage()"></view>
  185. </view>
  186. <view class="formLine-file" @click="uploadproductionLicenceImageFn" v-else>
  187. <view class="file-produce iconImage"></view>
  188. </view>
  189. </view>
  190. </view>
  191. <view class="zizhi">
  192. <view class="info2-title zizhi-title">卫生许可证</view>
  193. <view class="uploadImage">
  194. <view class="form-upload-image" v-if="params.hygienicLicense!=''&&params.hygienicLicense!=null">
  195. <image class="upload-img" :src="params.hygienicLicense" alt="" @click="showViewerImageFn3()"></image>
  196. <view class="iconfont icon-shanchu1" @click="deletehygienicImage()"></view>
  197. </view>
  198. <view class="formLine-file" @click="uploadhygienicLicenseImageFn" v-else>
  199. <view class="file-health iconImage"></view>
  200. </view>
  201. </view>
  202. </view>
  203. <view class="zizhi">
  204. <view class="info2-title zizhi-title">税务许可证</view>
  205. <view class="uploadImage">
  206. <view class="form-upload-image" v-if="params.taxLicense!=''&&params.taxLicense!=null">
  207. <image class="upload-img" :src="params.taxLicense" alt="" @click="showViewerImageFn4()"></image>
  208. <view class="iconfont icon-shanchu1" @click="deletaxImage()"></view>
  209. </view>
  210. <view class="formLine-file" @click="uploadtaxLicenseImageFn" v-else>
  211. <view class="file-tax iconImage"></view>
  212. </view>
  213. </view>
  214. </view>
  215. <view class="zizhi">
  216. <view class="info2-title zizhi-title hoor">荣誉证书</view>
  217. <view class="uploadImage list-image">
  218. <view class="formLine-file" @click="uploadHonorImageFn" v-if="HonorImagesList.length<5" >
  219. <view class="file-honor iconImage"></view>
  220. </view>
  221. <view class="form-upload-image" v-for="(item, index) in HonorImagesList" :key="index">
  222. <image class="upload-img" :src="item" alt="" @click="showViewerImageFn5()"></image>
  223. <view class="iconfont icon-shanchu1" @click="removeGoodsImagesFn(HonorImagesList)"></view>
  224. </view>
  225. </view>
  226. </view>
  227. <view class="zizhi">
  228. <view class="info2-title zizhi-title hoor">产品证书</view>
  229. <view class="uploadImage list-image">
  230. <view class="formLine-file" @click="uploadproductImageFn" v-if="productImagesList.length<5" >
  231. <view class="file-product iconImage"></view>
  232. </view>
  233. <view class="form-upload-image" v-for="(item, index) in productImagesList" :key="index">
  234. <image class="upload-img" :src="item" alt="" @click="showViewerImageFn6()"></image>
  235. <view class="iconfont icon-shanchu1" @click="removeproductImagesFn(index)"></view>
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. <view class="wrap-Btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '34rpx'}">
  241. <button type="default" class="confirmBbtn" @click="shopSubmit">保存</button>
  242. </view>
  243. <mpvue-city-picker :themeColor="themeColor"
  244. ref="mpvueCityPicker"
  245. :pickerValueDefault="cityPickerValueDefault"
  246. @onCancel="onCancel"
  247. @onConfirm="onConfirm">
  248. </mpvue-city-picker>
  249. </view>
  250. </template>
  251. <script>
  252. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  253. import { uploadFileImage } from "@/services/public.js"
  254. import { mapState,mapMutations } from 'vuex';
  255. export default{
  256. name:'information',
  257. components:{
  258. mpvueCityPicker,
  259. },
  260. data(){
  261. return{
  262. isShowInput:false,
  263. firsttype:0,
  264. secontype:0,
  265. isfirstShow:false,
  266. issecondshow:false,
  267. addressData:{
  268. address:'请选择公司所在地区',
  269. townId:'', //区ID
  270. cityId:'', //区ID
  271. provinceId:'', //区ID
  272. addressDetail: '', //地址
  273. },
  274. typename:[
  275. {name:'医疗',value:1},
  276. {name:'非医疗',value:2}
  277. ],
  278. secondtype:[
  279. {name:'一类器械',value:1},
  280. {name:'二类器械',value:2},
  281. {name:'三类器械',value:3},
  282. {name:'其它',value:4}
  283. ],
  284. mentuzCampNullList:[
  285. {value:'1',name:'产品'},
  286. {value:'2',name:'仪器'},
  287. {value:'3',name:'服务'}
  288. ],
  289. medicaCampNullList:[
  290. {value:'1',name:'仪器护理类'},
  291. {value:'2',name:'护肤品类'},
  292. {value:'3',name:'纹绣类'},
  293. {value:'4',name:'美体内衣'},
  294. {value:'5',name:'整形耗材'},
  295. {value:'6',name:'国际品牌'},
  296. {value:'7',name:'美胸类'},
  297. {value:'8',name:'健康保健类'},
  298. {value:'9',name:'面膜类'},
  299. {value:'10',name:'抗衰老'},
  300. {value:'11',name:'生殖保养'},
  301. {value:'12',name:'健康养生'},
  302. {value:'13',name:'纤体减肥'}
  303. ],
  304. params:{
  305. userId:'',
  306. shopId:'',
  307. townId:'',
  308. provinceId: '',//省id
  309. cityId: '',
  310. address:'',
  311. name:'',//公司名称
  312. shortName:'',//公司简称
  313. linkMan:'',//联系人
  314. email:'',//
  315. contractPhone:'',//固定电话
  316. fax:'',//传真
  317. legalPerson:'',//法人代表
  318. registeredCapital:'',//注册资本
  319. companyNature:'',//公司性质
  320. turnover:'',//年营业额
  321. firstShopType:'',//公司类型 1医疗 2非医疗
  322. secondShopType:'',//医疗下的二级分类
  323. mainProduct:'',//主营产品
  324. businessScope:'',//经营内容
  325. website:'',//网站地址
  326. wxOfficialAccount:'',//微信公众号
  327. wxApplets:'',//微信小程序
  328. shopDesc:'',//公司介绍
  329. mainProductDesc:'',//主打说明
  330. medicalPracticeLicense:'',//三级器械/医疗执照
  331. socialCreditCode:'',//营业执照编号
  332. businessLicense:'',//营业执照
  333. logo:'',//公司logo
  334. operationLicence:'',//生产
  335. hygienicLicense:'',//卫生
  336. taxLicense:'',//税务
  337. honorCertification:'',//荣誉
  338. productCertification:'',//产品
  339. },
  340. mentuzCampList:[],
  341. medicaCampList:[],
  342. shopMainPros:[],
  343. shopScope:[],
  344. mainProEdit: '',
  345. shopScopeEdit:'',
  346. HonorImagesList:[],
  347. productImagesList:[],
  348. isPreviewImage:false, //预览图片开关
  349. isMainproCheck:false,
  350. isIphoneX:this.$store.state.isIphoneX,
  351. }
  352. },
  353. onLoad() {
  354. },
  355. created() {
  356. this.shopInfo();
  357. },
  358. methods:{
  359. chooseMaleLike(e){
  360. this.isMainproCheck = true
  361. this.params.mainProduct = this.checkLikes(e,this.mentuzCampList)
  362. },
  363. chooseMaleLikes(e){
  364. this.isMainproCheck = true
  365. this.params.businessScope = this.checkLikes(e,this.medicaCampList)
  366. },
  367. checkLikes(e,list){
  368. let values = e.detail.value;
  369. let arr = []
  370. list.forEach(item => {
  371. if(values.indexOf(item.value) >= 0){
  372. this.$set(item,'checked',true)
  373. arr.push(item.name)
  374. }else{
  375. this.$set(item,'checked',false)
  376. }
  377. })
  378. console.log(arr)
  379. return arr.join('/')
  380. },
  381. setNewMainpro(arr){//回显处理主营内容
  382. let _ARRAY = [];
  383. arr.split('/').forEach((item,index) =>{
  384. if(item != ""){
  385. let _OBJ = {value:(index+1).toString(),name:item,checked:true}
  386. _ARRAY.push(_OBJ)
  387. }
  388. })
  389. return _ARRAY
  390. },
  391. shopInfo(){
  392. this.$api.getStorage().then((resolve) =>{
  393. this.params.userId = resolve.userId;
  394. this.params.shopId = resolve.shopId;
  395. console.log(resolve)
  396. this.UserService.SupplierShopInfo({userId:this.params.userId}).then(response =>{
  397. if(response.code==0){
  398. console.log(response)
  399. let shop = response.data.shop;
  400. let user = response.data.user;
  401. this.params.name = shop.name;
  402. this.params.shortName = shop.shortName;
  403. this.params.linkMan = shop.linkMan;
  404. this.params.email = user.email;
  405. this.addressData.address = shop.provincialAddress;
  406. this.params.address = shop.address;
  407. this.params.website = shop.website
  408. this.params.wxOfficialAccount = shop.wxOfficialAccount
  409. this.params.wxApplets = shop.wxApplets
  410. this.params.provinceId = shop.provinceId;
  411. this.params.cityId = shop.cityId;
  412. this.params.townId = shop.townId;
  413. if(shop.contractPhone!=""&&shop.contractPhone!=null){
  414. this.params.contractPhone = shop.contractPhone;
  415. }
  416. if(shop.fax!=""&&shop.fax!=null){
  417. this.params.fax = shop.fax;
  418. }
  419. this.params.legalPerson = shop.legalPerson;
  420. this.params.registeredCapital = shop.registeredCapital;
  421. this.params.companyNature = shop.companyNature;
  422. this.params.turnover = shop.turnover;
  423. this.params.firstShopType = shop.firstShopType ? shop.firstShopType:'';
  424. this.params.secondShopType = shop.secondShopType ? shop.secondShopType : '';
  425. this.params.medicalPracticeLicense = shop.medicalPracticeLicense;
  426. this.params.shopDesc = shop.shopDesc;
  427. this.params.mainProductDesc = shop.mainProductDesc;
  428. this.params.socialCreditCode = shop.socialCreditCode;
  429. this.params.businessLicense = shop.businessLicense;
  430. this.params.logo = shop.logo;
  431. this.params.operationLicence = shop.operationLicence;
  432. this.params.hygienicLicense = shop.hygienicLicense;
  433. this.params.taxLicense = shop.taxLicense;
  434. this.HonorImagesList = shop.honorCertification;
  435. this.productImagesList = shop.productCertification;
  436. if( shop.honorCertification!=''&& shop.honorCertification!=null){
  437. this.params.honorCertification =this.HonorImagesList.toString()+',';
  438. }
  439. if( shop.productCertification!=''&& shop.productCertification!=null){
  440. this.params.productCertification =this.productImagesList.toString()+',';
  441. }
  442. if(shop.mainProduct == "" || shop.mainProduct == null){
  443. this.mentuzCampList = this.mentuzCampNullList
  444. }else{
  445. this.mentuzCampList = this.setNewMainpro(shop.mainProduct)
  446. this.params.mainProduct = shop.mainProduct
  447. }
  448. if(shop.businessScope == "" || shop.businessScope == null){
  449. this.medicaCampList = this.medicaCampNullList
  450. }else{
  451. this.medicaCampList = this.setNewMainpro(shop.businessScope)
  452. this.params.businessScope = shop.businessScope
  453. }
  454. }
  455. })
  456. })
  457. },
  458. shopSubmit(){//提交修改
  459. if(this.params.name==''||this.params.name==null){
  460. this.$util.msg('请输入公司名称',2000);
  461. return
  462. }
  463. if(this.params.townId==''||this.params.townId==null){
  464. this.$util.msg('请选择联系地址',2000);
  465. return
  466. }
  467. if(this.params.address==''||this.params.address==null){
  468. this.$util.msg('请输入正确的联系地址',2000);
  469. return
  470. }
  471. if(this.params.linkMan==''||this.params.linkMan==null){
  472. this.$util.msg('请输入正确的联系人姓名',2000);
  473. return
  474. }
  475. if(this.params.legalPerson==''||this.params.legalPerson==null){
  476. this.$util.msg('请输入法人代表姓名',2000);
  477. return
  478. }
  479. if(this.params.registeredCapital==''||this.params.registeredCapital==null){
  480. this.$util.msg('请输入注册资本',2000);
  481. return
  482. }
  483. if(this.params.companyNature==''||this.params.companyNature==null){
  484. this.$util.msg('请输入公司性质',2000);
  485. return
  486. }
  487. if(this.params.turnover==''||this.params.turnover==null){
  488. this.$util.msg('请输入年营业额',2000);
  489. return
  490. }
  491. if(this.params.firstShopType==''||this.params.firstShopType==null){
  492. this.$util.msg('请选择公司类型',2000);
  493. return
  494. }
  495. if(this.params.firstShopType==1 && this.params.secondShopType==""){
  496. this.$util.msg('请选择公司类型',2000);
  497. return
  498. }
  499. if(this.params.secondShopType == 3){
  500. if(this.shopInfo.medicalPracticeLicense == ''){
  501. this.$util.msg('请上传医疗许可证书',2000);
  502. return
  503. }
  504. }
  505. if(this.params.mainProduct==''||this.params.mainProduct==null){
  506. this.$util.msg('请选择主营内容',2000);
  507. return
  508. }
  509. if(this.params.businessScope==''||this.params.businessScope==null){
  510. this.$util.msg('请选择经营内容',2000);
  511. return
  512. }
  513. if(this.params.website){
  514. if(!this.$reg.isWebsite(this.params.website)){
  515. this.$util.msg('请输入正确的网站地址',2000);
  516. return
  517. }
  518. }
  519. if(this.params.shopDesc==''||this.params.shopDesc==null){
  520. this.$util.msg('请填写公司介绍',2000);
  521. return
  522. }
  523. if(this.params.mainProductDesc==''||this.params.mainProductDesc==null){
  524. this.$util.msg('请填系列商品说明',2000);
  525. return
  526. }
  527. if(this.params.socialCreditCode==''||this.params.socialCreditCode==null){
  528. this.$util.msg('请输入正确的统一社会信用代码',2000);
  529. return
  530. }
  531. if(this.params.businessLicense==''||this.params.businessLicense==null){
  532. this.$util.msg('请上传营业执照图片',2000);
  533. return
  534. }
  535. if(this.params.logo==''||this.params.logo==null){
  536. this.$util.msg('请上传公司logo',2000);
  537. return
  538. }
  539. if(this.params.operationLicence==''||this.params.operationLicence==null){
  540. this.$util.msg('请上传生产许可证',2000);
  541. return
  542. }
  543. if(this.params.hygienicLicense==''||this.params.hygienicLicense==null){
  544. this.$util.msg('请上传卫生许可证',2000);
  545. return
  546. }
  547. if(this.params.taxLicense==''||this.params.taxLicense==null){
  548. this.$util.msg('请上传税务许可证',2000);
  549. return
  550. }
  551. if(this.params.honorCertification==''||this.params.honorCertification==null){
  552. this.$util.msg('请上传荣誉证书',2000);
  553. return
  554. }
  555. if(this.params.productCertification==''||this.params.productCertification==null){
  556. this.$util.msg('请上传产品证书',2000);
  557. return
  558. }
  559. this.UserService.SupplierModifiedData(this.params).then(res=>{
  560. if(res.code === 0){
  561. this.$util.msg('保存成功',2000,true,'success')
  562. setTimeout(()=>{
  563. uni.navigateBack();
  564. },2000)
  565. } else {
  566. this.$util.msg(res.msg,2000);
  567. this.loginLoading = false;
  568. }
  569. })
  570. },
  571. mainProAdd(){//添加主营内容
  572. if (this.mainProEdit.length>0) {
  573. let obj = {name:this.mainProEdit,value:`${this.mentuzCampList.length+1}`};
  574. if(this.checkedArray(this.mainProEdit,this.mentuzCampList)){
  575. this.$util.msg('主营内容已存在!',2000)
  576. }else {
  577. this.mentuzCampList.push(obj);
  578. }
  579. }
  580. },
  581. shopScopeAdd(){ //经营内容
  582. if (this.shopScopeEdit.length>0) {
  583. let obj = {name:this.shopScopeEdit,value:`${this.medicaCampList.length+1}`};
  584. if(this.checkedArray(this.shopScopeEdit,this.medicaCampList)){
  585. this.$util.msg('主营内容已存在!',2000)
  586. }else {
  587. this.medicaCampList.push(obj);
  588. }
  589. }
  590. },
  591. checkedArray(content,arr){//判断主营内容是否已存在
  592. console.log(content,arr)
  593. for(var i in arr){
  594. if(arr[i].name == content){
  595. return true;
  596. }
  597. }
  598. return false;
  599. },
  600. radioChange(e){
  601. this.params.firstShopType = e.target.value;
  602. // if (e.target.value==1){
  603. // this.isfirstShow = true;
  604. // }else {
  605. // this.isfirstShow = false;
  606. // }
  607. console.log(e.target.value)
  608. },
  609. showViewerImageFn6(e) {//预览产品
  610. this.myPreviewImageFnlist(this.productImagesList)
  611. },
  612. showViewerImageFn5(e) {//预览荣誉
  613. this.myPreviewImageFnlist(this.HonorImagesList)
  614. },
  615. showViewerImageFn4(e) {//预览税务
  616. this.myPreviewImageFn(this.params.taxLicense)
  617. },
  618. showViewerImageFn3(e) {//预览卫生
  619. this.myPreviewImageFn(this.params.hygienicLicense)
  620. },
  621. showViewerImageFn2(e) {//预览生产
  622. this.myPreviewImageFn(this.params.operationLicence)
  623. },
  624. showViewerImageFn1(e) {//预览logo
  625. this.myPreviewImageFn(this.params.logo)
  626. },
  627. showViewerImageFn(e) {//预览营业执照
  628. this.myPreviewImageFn(this.params.businessLicense)
  629. },
  630. myPreviewImageFnlist(arr){//多张预览
  631. this.isPreviewImage = true;
  632. uni.previewImage({
  633. urls: arr,
  634. current: 0
  635. })
  636. },
  637. myPreviewImageFn(url){//单张预览
  638. this.isPreviewImage = true
  639. let mentuzArray = []
  640. mentuzArray.push(url)
  641. uni.previewImage({
  642. urls: mentuzArray,
  643. current: 0
  644. });
  645. },
  646. uploadproductImageFn(event){//产品证书
  647. uploadFileImage().then(res =>{
  648. let imagePath = JSON.parse(res.data).data;
  649. this.productImagesList.push(imagePath);
  650. this.params.productCertification =this.productImagesList.toString()+',';
  651. })
  652. },
  653. uploadHonorImageFn(event){//荣誉证书上传
  654. uploadFileImage().then(res =>{
  655. let imagePath = JSON.parse(res.data).data;
  656. this.HonorImagesList.push(imagePath);
  657. this.params.honorCertification =this.HonorImagesList.toString()+',';
  658. })
  659. },
  660. uploadlogoImageFn(event){//上传公司logo
  661. uploadFileImage().then(res =>{
  662. this.params.logo = JSON.parse(res.data).data;
  663. })
  664. },
  665. uploadproductionLicenceImageFn(event){//上传生产
  666. uploadFileImage().then(res =>{
  667. this.params.operationLicence = JSON.parse(res.data).data;
  668. })
  669. },
  670. uploadhygienicLicenseImageFn(event){//上传卫生
  671. uploadFileImage().then(res =>{
  672. this.params.hygienicLicense = JSON.parse(res.data).data;
  673. })
  674. },
  675. uploadtaxLicenseImageFn(event){//上传税务
  676. uploadFileImage().then(res =>{
  677. this.params.taxLicense = JSON.parse(res.data).data;
  678. })
  679. },
  680. uploadBusinessLicenseImageFn(event){//上传营业执照图片
  681. uploadFileImage().then(res =>{
  682. this.params.businessLicense = JSON.parse(res.data).data;
  683. })
  684. },
  685. uploadzizhiImageFn(event){//上传医疗图片
  686. uploadFileImage().then(res =>{
  687. this.params.medicalPracticeLicense = JSON.parse(res.data).data;
  688. })
  689. },
  690. removeGoodsImagesFn(index){//删除荣誉图片
  691. this.HonorImagesList.splice(index,1);
  692. this.params.honorCertification = this.HonorImagesList.toString()+',';
  693. },
  694. removeproductImagesFn(index){//删除产品图片
  695. this.productImagesList.splice(index,1);
  696. this.params.productCertification = this.productImagesList.toString()+',';
  697. },
  698. deletaxImage(){//删除卫生
  699. this.params.taxLicense = '';
  700. },
  701. deletehygienicImage(){//删除卫生
  702. this.params.hygienicLicense = '';
  703. },
  704. deleteproducImage(){//删除生产
  705. this.params.operationLicence = '';
  706. },
  707. deletelogoImage(){//删除logo图片
  708. this.params.logo = '';
  709. },
  710. deleteBusinessImage(){//删除营业执照图片
  711. this.params.businessLicense = '';
  712. },
  713. deleteMedicalImage(){//删除商品图片
  714. this.medicalPracticeLicense = '';
  715. },
  716. secondypeRidio(item){
  717. this.params.secondShopType = item.value;
  718. // if (item.value==3){
  719. // this.issecondshow = true;
  720. // }else {
  721. // this.issecondshow = false;
  722. // }
  723. },
  724. showMulLinkageThreePicker() {//三级地址联动
  725. this.isShowInput = true
  726. this.$refs.mpvueCityPicker.show()
  727. },
  728. onConfirm(e) {//获取选择的地址信息
  729. console.log('地址',e);
  730. this.addressData.address = e.name;
  731. this.addressData.townId = e.townCode;
  732. this.addressData.cityId = e.cityCode;
  733. this.addressData.provinceId = e.provinceCode;
  734. this.params.townId = this.addressData.townId;
  735. this.params.provinceId = this.addressData.provinceId;
  736. this.params.cityId = this.addressData.cityId;
  737. this.params.address = this.addressData.address;
  738. },
  739. onConfirmbrand(e){
  740. this.brandname = e.name;
  741. },
  742. },
  743. }
  744. </script>
  745. <style lang="scss">
  746. .container{
  747. width: 100%;
  748. height: auto;
  749. }
  750. .row{
  751. line-height: 80rpx;
  752. background: #f7f7f7;
  753. padding: 0 24rpx;
  754. .info-title{
  755. font-size: $font-size-30;
  756. color: $text-color;
  757. font-weight: bold;
  758. }
  759. }
  760. .placeholder{
  761. color: #b2b2b2;
  762. }
  763. .info-from-tips{
  764. width: 100%;
  765. box-sizing: border-box;
  766. padding: 0 24rpx;
  767. line-height: 44rpx;
  768. font-size: $font-size-24;
  769. color: #fea785;
  770. text-align: left;
  771. }
  772. .info-from{
  773. width: 702rpx;
  774. height: 90rpx;
  775. line-height: 90rpx;
  776. border-bottom: 2rpx solid #e1e1e1;
  777. margin: auto;
  778. position: relative;
  779. .label{
  780. width: 112rpx;
  781. text-align: left;
  782. font-size: $font-size-28;
  783. color: #666666;
  784. line-height: 90rpx;
  785. float: left;
  786. &.Code{
  787. width: 170rpx;
  788. }
  789. }
  790. .row-input{
  791. width: 520rpx;
  792. padding-left:10rpx;
  793. font-size: $font-size-28;
  794. color: $text-color;
  795. line-height: 90rpx;
  796. float: left;
  797. height: 90rpx;
  798. margin-left: 50rpx;
  799. &.Code{
  800. width: 470rpx;
  801. }
  802. .icon-xiayibu{
  803. position: absolute;
  804. right: 0;
  805. color: #b2b2b2;
  806. }
  807. .none{
  808. color: #b2b2b2;
  809. }
  810. }
  811. }
  812. .address-details{
  813. height: 146rpx;
  814. border-bottom: 2rpx solid #e1e1e1;
  815. width: 702rpx;
  816. margin: auto;
  817. font-size: $font-size-28;
  818. padding-top: 20rpx;
  819. }
  820. input[type="text"]::placeholder,textarea::placeholder {color: #b2b2b2;font-size: $font-size-28;}
  821. .info-email{
  822. width: 100%;
  823. box-sizing: border-box;
  824. padding: 0 24rpx;
  825. line-height: 44rpx;
  826. font-size: $font-size-20;
  827. color: #fea785;
  828. text-align: left;
  829. }
  830. .ShopTyperadio{
  831. overflow: hidden;
  832. height: auto;
  833. border: 0;
  834. .radio{
  835. float: left;
  836. margin-right: 77rpx;
  837. .iconfont{
  838. margin-right: 10rpx;
  839. font-size: $font-size-36;
  840. }
  841. .icon-weixuanze{
  842. color: #b2b2b2;
  843. }
  844. .icon-yixuanze{
  845. color: $color-system;
  846. }
  847. }
  848. }
  849. .active{
  850. color: $color-system;
  851. }
  852. .secondTyperadio{
  853. overflow: hidden;
  854. height: auto;
  855. padding: 20rpx 24rpx;
  856. margin-bottom: 20rpx;
  857. color: #999999;
  858. .radio{
  859. float: left;
  860. margin-right: 20rpx;
  861. .secondRadio{
  862. border: 2rpx solid #e1e1e1;
  863. padding: 0 30rpx;
  864. text-align: center;
  865. line-height: 42rpx;
  866. font-size: $font-size-26;
  867. border-radius: 21rpx;
  868. }
  869. }
  870. }
  871. .zizhi{
  872. .uploadImage{
  873. padding: 0 24rpx;
  874. &.list-image{
  875. overflow: hidden;
  876. display: flex;
  877. overflow-x: auto;
  878. flex-shrink: 0;
  879. padding-top: 15rpx;
  880. max-width: 702rpx;
  881. .formLine-file{
  882. float: left;
  883. display: flex;
  884. flex-shrink: 0;
  885. margin:15rpx 15rpx 15rpx 0rpx;
  886. }
  887. .form-upload-image{
  888. float: left;
  889. -webkit-flex-shrink: 0;
  890. flex-shrink: 0;
  891. position: relative;
  892. display: inline-block;
  893. margin:15rpx 15rpx 15rpx 0rpx;
  894. display: flex;
  895. align-items: center;
  896. }
  897. }
  898. .form-upload-image{
  899. width: 200rpx;
  900. height:180rpx;
  901. position: relative;
  902. .upload-img{
  903. width: 100%;
  904. height: 100%;
  905. }
  906. .icon-shanchu1{
  907. position: absolute;
  908. top: -20rpx;
  909. right:-15rpx;
  910. color: #f94b4b;
  911. font-size: $font-size-36;
  912. }
  913. }
  914. .formLine-file{
  915. width:200rpx;
  916. height: 180rpx;
  917. display: inline-block;
  918. .file-zizhi{
  919. background: url('https://static.caimei365.com/app/img/upload/club-yiliao.png') no-repeat;
  920. width:100%;
  921. height:100%;
  922. background-size: 100% 100%;
  923. }
  924. .iconImage{
  925. width: 100%;
  926. height:100%;
  927. &.file-biss{
  928. background: url('https://static.caimei365.com/app/img/upload/club-zizhi.png') no-repeat;
  929. background-size: 100% 100%;
  930. }
  931. &.file-logo{
  932. background: url('https://static.caimei365.com/app/img/upload/icon-logo.png') no-repeat;
  933. background-size: 100% 100%;
  934. }
  935. &.file-produce{
  936. background: url('https://static.caimei365.com/app/img/upload/icon-produce.png') no-repeat;
  937. background-size: 100% 100%;
  938. }
  939. &.file-health{
  940. background: url('https://static.caimei365.com/app/img/upload/icon-health.png') no-repeat;
  941. background-size: 100% 100%;
  942. }
  943. &.file-tax{
  944. background: url('https://static.caimei365.com/app/img/upload/icon-tax.png') no-repeat;
  945. background-size: 100% 100%;
  946. }
  947. &.file-honor{
  948. background: url('https://static.caimei365.com/app/img/upload/icon-honor.png') no-repeat;
  949. background-size: 100% 100%;
  950. }
  951. &.file-product{
  952. background: url('https://static.caimei365.com/app/img/upload/icon-product.png') no-repeat;
  953. background-size: 100% 100%;
  954. }
  955. }
  956. }
  957. .form-upload-tips{
  958. display: inline-block;
  959. vertical-align: top;
  960. position: relative;
  961. margin-left: 20rpx;
  962. .icon-wenhao{
  963. font-size: 41rpx;
  964. color:#1890f9 ;
  965. }
  966. .wen-tips{
  967. width: 360rpx;
  968. height: 64rpx;
  969. line-height: 64rpx;
  970. text-align: center;
  971. color: #FFF;
  972. font-size: 28rpx;
  973. background-color: #1890f9;
  974. position: absolute;
  975. bottom: -80rpx;
  976. left: -4rpx;
  977. border-radius: 2rpx;
  978. display: none ;
  979. }
  980. .wen-tips:before {
  981. content: '';
  982. width: 0px;
  983. height: 0px;
  984. border-width: 20rpx;
  985. border-style: solid;
  986. border-color: transparent transparent #1890f9 transparent;
  987. position: absolute;
  988. top: -35rpx;
  989. left: 10rpx;
  990. }
  991. }
  992. }
  993. }
  994. .form-upload-tips:hover .wen-tips {display: block;}
  995. .business{overflow: hidden;margin: 20rpx 0;}
  996. .business-info{
  997. float: left;
  998. margin-left: 60rpx;
  999. width: 550rpx;
  1000. }
  1001. .info2-title{
  1002. padding: 0 0 24rpx 24rpx;
  1003. font-size: $font-size-28;
  1004. color: #666666;
  1005. &.zizhi-title{
  1006. padding: 24rpx;
  1007. &.hoor{padding: 24rpx 24rpx 0 24rpx;}
  1008. }
  1009. &.business-title{
  1010. float: left;
  1011. }
  1012. }
  1013. .addbusiness{
  1014. margin: 20rpx 0;
  1015. .other{
  1016. width: 350rpx;
  1017. height: 64rpx;
  1018. border: 2rpx solid #b2b2b2;
  1019. border-radius: 45rpx;
  1020. text-align: center;
  1021. line-height: 64rpx;
  1022. padding-left: 10rpx;
  1023. font-size: 28rpx;
  1024. display: inline-block;
  1025. }
  1026. .button{
  1027. width: 160rpx;
  1028. height: 64rpx;
  1029. text-align: center;
  1030. line-height: 64rpx;
  1031. display: inline-block;
  1032. color: $color-system;
  1033. background:#ffe6dc ;
  1034. margin-left: 15rpx;
  1035. border-radius: 45rpx;
  1036. }
  1037. }
  1038. .row-group{
  1039. .row-text{
  1040. display: inline-block;
  1041. font-size: 28rpx;
  1042. color: #333333;
  1043. }
  1044. .row-input{
  1045. width: 50%;
  1046. display: inline-block;
  1047. margin-bottom: 10rpx;
  1048. }
  1049. .diyBox{
  1050. margin-bottom: 5px;
  1051. // width: 33%;
  1052. margin-right: 70rpx;
  1053. display: inline-block;
  1054. }
  1055. }
  1056. radio .wx-radio-input{
  1057. border-radius: 50%;
  1058. width: 36rpx;
  1059. height: 36rpx;
  1060. }
  1061. radio .wx-radio-input.wx-radio-input-checked::before{
  1062. font-size:28rpx;
  1063. }
  1064. checkbox .wx-checkbox-input{
  1065. border-radius: 50%;
  1066. width: 36rpx;
  1067. height: 36rpx;
  1068. }
  1069. /* 选中后的 背景样式 */
  1070. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1071. background: #E15616;
  1072. border: 2rpx solid #e15616;
  1073. }
  1074. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1075. border-radius: 50%;
  1076. width: 36rpx;
  1077. height: 36rpx;
  1078. line-height: 36rpx;
  1079. text-align: center;
  1080. font-size:20rpx;
  1081. color:#fff;
  1082. // background: transparent;
  1083. transform:translate(-50%, -50%) scale(1);
  1084. -webkit-transform:translate(-50%, -50%) scale(1);
  1085. }
  1086. .info{
  1087. margin: 20rpx 0;
  1088. &.input{
  1089. width: 702rpx;
  1090. height: 90rpx;
  1091. line-height: 90rpx;
  1092. border-bottom: 2rpx solid #e1e1e1;
  1093. margin: auto;
  1094. position: relative;
  1095. .label{
  1096. width: 150rpx;
  1097. text-align: left;
  1098. font-size: $font-size-28;
  1099. color: #666666;
  1100. line-height: 90rpx;
  1101. float: left;
  1102. }
  1103. .row-input{
  1104. width: 490rpx;
  1105. padding-left:10rpx;
  1106. font-size: $font-size-28;
  1107. color: $text-color;
  1108. line-height: 90rpx;
  1109. float: left;
  1110. height: 90rpx;
  1111. margin-left: 50rpx;
  1112. }
  1113. }
  1114. textarea{
  1115. width: 680rpx;
  1116. height: 200rpx;
  1117. border: 2rpx solid #b2b2b2;
  1118. border-radius: 6rpx;
  1119. font-size: $font-size-28;
  1120. padding: 10rpx;
  1121. margin: auto;
  1122. line-height: 48rpx;
  1123. }
  1124. }
  1125. .wrap-Btn{
  1126. width: 100%;
  1127. height: 90rpx;
  1128. position: fixed;
  1129. left: 0;
  1130. bottom: 0;
  1131. padding-top: 40rpx;
  1132. background-color: #FFFFFF;
  1133. z-index: 999;
  1134. .confirmBbtn{
  1135. width: 600rpx;
  1136. height: 90rpx;
  1137. line-height: 90rpx;
  1138. text-align: center;
  1139. color: #fff;
  1140. background:$btn-confirm;
  1141. border-radius: 45rpx;
  1142. }
  1143. }
  1144. </style>