information.vue 36 KB

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