information.vue 34 KB

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