information.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  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="isfirstShow" >
  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="issecondshow">
  79. <view class="info2-title zizhi-title">资质</view>
  80. <view class="uploadImage">
  81. <view class="form-upload-image" v-if="params.medicalPracticeLicenseImg1!=''">
  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!=''">
  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!=''">
  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!=''">
  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!=''">
  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!=''">
  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.params.certificateHonor = shop.hygienicLicense;
  411. this.HonorImagesList = response.data.certificateHonor;
  412. this.productImagesList = response.data.productCertification;
  413. if( response.data.certificateHonor!=''|| response.data.certificateHonor!=null){
  414. this.params.certificateHonor =this.HonorImagesList.toString()+',';
  415. }
  416. if( response.data.productCertification!=''|| response.data.productCertification!=null){
  417. this.params.productCertification =this.productImagesList.toString()+',';
  418. }
  419. if(shop.mainpro == "" || shop.mainpro == null){
  420. this.mentuzCampList = this.mentuzCampNullList
  421. }else{
  422. this.mentuzCampList = this.setNewMainpro(shop.mainpro)
  423. this.params.mainpro = shop.mainpro
  424. }
  425. if(shop.businessScope == "" || shop.businessScope == null){
  426. this.medicaCampList = this.medicaCampNullList
  427. }else{
  428. this.medicaCampList = this.setNewMainpro(shop.businessScope)
  429. this.params.businessScope = shop.businessScope
  430. }
  431. }
  432. })
  433. })
  434. },
  435. shopSubmit(){//提交修改
  436. console.log(this.params);
  437. if(this.params.name==''){
  438. this.$util.msg('请输入公司名称',2000);
  439. return
  440. }else if(this.params.townID==''){
  441. this.$util.msg('请选择联系地址',2000);
  442. return
  443. }else if(this.params.address==''){
  444. this.$util.msg('请输入正确的联系地址',2000);
  445. return
  446. }else if(this.params.linkMan==''){
  447. this.$util.msg('请输入正确的联系人姓名',2000);
  448. return
  449. }else if(this.params.legalPerson==''){
  450. this.$util.msg('请输入法人代表姓名',2000);
  451. return
  452. }else if(this.params.registeredCapital==''){
  453. this.$util.msg('请输入注册资本',2000);
  454. return
  455. }else if(this.params.nature==''){
  456. this.$util.msg('请输入公司性质',2000);
  457. return
  458. }else if(this.params.turnover==''){
  459. this.$util.msg('请输入年营业额',2000);
  460. return
  461. }else if(this.params.firstShopType==''){
  462. this.$util.msg('请选择公司类型',2000);
  463. return
  464. }else if(this.params.firstShopType==1){
  465. if(this.params.secondShopType==""){
  466. this.$util.msg('请选择公司类型',2000);
  467. return
  468. }
  469. }else if(this.params.mainpro==''){
  470. this.$util.msg('请选择主营内容',2000);
  471. return
  472. }else if(this.params.businessScope==''){
  473. this.$util.msg('请选择经营内容',2000);
  474. return
  475. }else if(this.params.info==''){
  476. this.$util.msg('请填写公司介绍',2000);
  477. return
  478. }else if(this.params.productDesc==''){
  479. this.$util.msg('请填系列商品说明',2000);
  480. return
  481. }else if(this.params.socialCreditCode==''){
  482. this.$util.msg('请输入正确的统一社会信用代码',2000);
  483. return
  484. }else if(this.params.businessLicenseImage==''){
  485. this.$util.msg('请上传营业执照图片',2000);
  486. return
  487. }else if(this.params.logo==''){
  488. this.$util.msg('请上传公司logo',2000);
  489. return
  490. }else if(this.params.productionLicence==''){
  491. this.$util.msg('请上传生产许可证',2000);
  492. return
  493. }else if(this.params.hygienicLicense==''){
  494. this.$util.msg('请上传卫生许可证',2000);
  495. return
  496. }else if(this.params.taxLicense==''){
  497. this.$util.msg('请上传税务许可证',2000);
  498. return
  499. }else if(this.params.certificateHonor==''){
  500. this.$util.msg('请上传荣誉证书',2000);
  501. return
  502. }else if(this.params.productCertification==''){
  503. this.$util.msg('请上传产品证书',2000);
  504. return
  505. }else{
  506. this.UserService.SupplierModifiedData(this.params).then(res=>{
  507. if(res.code === 0){
  508. this.$util.msg('修改成功',2000,true,'success')
  509. setTimeout(()=>{
  510. uni.navigateBack();
  511. },2000)
  512. } else {
  513. this.$util.msg(res.msg,2000);
  514. this.loginLoading = false;
  515. }
  516. })
  517. }
  518. },
  519. mainProAdd(){//添加主营内容
  520. if (this.mainProEdit.length>0) {
  521. let obj = {name:this.mainProEdit,value:`${this.mentuzCampList.length+1}`};
  522. if(this.checkedArray(this.mainProEdit,this.mentuzCampList)){
  523. this.$util.msg('主营内容已存在!',2000)
  524. }else {
  525. this.mentuzCampList.push(obj);
  526. }
  527. }
  528. },
  529. shopScopeAdd(){ //经营内容
  530. if (this.shopScopeEdit.length>0) {
  531. let obj = {name:this.shopScopeEdit,value:`${this.medicaCampList.length+1}`};
  532. if(this.checkedArray(this.shopScopeEdit,this.medicaCampList)){
  533. this.$util.msg('主营内容已存在!',2000)
  534. }else {
  535. this.medicaCampList.push(obj);
  536. }
  537. }
  538. },
  539. checkedArray(content,arr){//判断主营内容是否已存在
  540. console.log(content,arr)
  541. for(var i in arr){
  542. if(arr[i].name == content){
  543. return true;
  544. }
  545. }
  546. return false;
  547. },
  548. radioChange(e){
  549. this.params.firstShopType = e.target.value;
  550. if (e.target.value==1){
  551. this.isfirstShow = true;
  552. }else {
  553. this.isfirstShow = false;
  554. }
  555. console.log(e.target.value)
  556. },
  557. showViewerImageFn6(e) {//预览产品
  558. this.myPreviewImageFnlist(this.productImagesList)
  559. },
  560. showViewerImageFn5(e) {//预览荣誉
  561. this.myPreviewImageFnlist(this.HonorImagesList)
  562. },
  563. showViewerImageFn4(e) {//预览税务
  564. this.myPreviewImageFn(this.params.taxLicense)
  565. },
  566. showViewerImageFn3(e) {//预览卫生
  567. this.myPreviewImageFn(this.params.hygienicLicense)
  568. },
  569. showViewerImageFn2(e) {//预览生产
  570. this.myPreviewImageFn(this.params.productionLicence)
  571. },
  572. showViewerImageFn1(e) {//预览logo
  573. this.myPreviewImageFn(this.params.logo)
  574. },
  575. showViewerImageFn(e) {//预览营业执照
  576. this.myPreviewImageFn(this.params.businessLicenseImage)
  577. },
  578. myPreviewImageFnlist(arr){//多张预览
  579. this.isPreviewImage = true;
  580. uni.previewImage({
  581. urls: arr,
  582. current: 0
  583. })
  584. },
  585. myPreviewImageFn(url){//单张预览
  586. this.isPreviewImage = true
  587. let mentuzArray = []
  588. mentuzArray.push(url)
  589. uni.previewImage({
  590. urls: mentuzArray,
  591. current: 0
  592. });
  593. },
  594. uploadproductImageFn(event){//产品证书
  595. uploadFileImage().then(res =>{
  596. this.productImagesList.push(JSON.parse(res.data).data);
  597. this.params.productCertification =this.productImagesList.toString()+',';
  598. })
  599. },
  600. uploadHonorImageFn(event){//荣誉证书上传
  601. uploadFileImage().then(res =>{
  602. this.HonorImagesList.push(JSON.parse(res.data).data);
  603. this.params.certificateHonor =this.HonorImagesList.toString()+',';
  604. })
  605. },
  606. uploadlogoImageFn(event){//上传公司logo
  607. uploadFileImage().then(res =>{
  608. this.params.logo = JSON.parse(res.data).data;
  609. })
  610. },
  611. uploadproductionLicenceImageFn(event){//上传生产
  612. uploadFileImage().then(res =>{
  613. this.params.productionLicence = JSON.parse(res.data).data;
  614. })
  615. },
  616. uploadhygienicLicenseImageFn(event){//上传卫生
  617. uploadFileImage().then(res =>{
  618. this.params.hygienicLicense = JSON.parse(res.data).data;
  619. })
  620. },
  621. uploadtaxLicenseImageFn(event){//上传税务
  622. uploadFileImage().then(res =>{
  623. this.params.taxLicense = JSON.parse(res.data).data;
  624. })
  625. },
  626. uploadBusinessLicenseImageFn(event){//上传营业执照图片
  627. uploadFileImage().then(res =>{
  628. this.params.businessLicenseImage = JSON.parse(res.data).data;
  629. })
  630. },
  631. uploadzizhiImageFn(event){//上传医疗图片
  632. uploadFileImage().then(res =>{
  633. this.params.medicalPracticeLicenseImg1 = JSON.parse(res.data).data;
  634. })
  635. },
  636. removeGoodsImagesFn(index){//删除荣誉图片
  637. this.HonorImagesList.splice(index,1);
  638. this.params.certificateHonor = this.HonorImagesList.toString()+',';
  639. },
  640. removeproductImagesFn(index){//删除产品图片
  641. this.productImagesList.splice(index,1);
  642. this.params.productCertification = this.productImagesList.toString()+',';
  643. },
  644. deletaxImage(){//删除卫生
  645. this.params.taxLicense = '';
  646. },
  647. deletehygienicImage(){//删除卫生
  648. this.params.hygienicLicense = '';
  649. },
  650. deleteproducImage(){//删除生产
  651. this.params.productionLicence = '';
  652. },
  653. deletelogoImage(){//删除logo图片
  654. this.params.logo = '';
  655. },
  656. deleteBusinessImage(){//删除营业执照图片
  657. this.params.businessLicenseImage = '';
  658. },
  659. deleteMedicalImage(){//删除商品图片
  660. this.medicalPracticeLicenseImg1 = '';
  661. },
  662. secondypeRidio(item){
  663. this.params.secondShopType = item.value;
  664. if (item.value==3){
  665. this.issecondshow = true;
  666. }else {
  667. this.issecondshow = false;
  668. }
  669. },
  670. showMulLinkageThreePicker() {//三级地址联动
  671. this.isShowInput = true
  672. this.$refs.mpvueCityPicker.show()
  673. },
  674. onConfirm(e) {//获取选择的地址信息
  675. console.log('地址',e);
  676. this.addressData.address = e.name;
  677. this.addressData.townID = e.townCode;
  678. this.addressData.cityID = e.cityCode;
  679. this.addressData.provinceID = e.provinceCode;
  680. this.params.townID = this.addressData.townID;
  681. this.params.provinceID = this.addressData.provinceID;
  682. this.params.cityID = this.addressData.cityID;
  683. this.params.address = this.addressData.address;
  684. },
  685. onConfirmbrand(e){
  686. this.brandname = e.name;
  687. },
  688. },
  689. }
  690. </script>
  691. <style lang="scss">
  692. .row{
  693. line-height: 80rpx;
  694. background: #f7f7f7;
  695. padding: 0 24rpx;
  696. .info-title{
  697. font-size: $font-size-30;
  698. color: $text-color;
  699. font-weight: bold;
  700. }
  701. }
  702. .placeholder{
  703. color: #b2b2b2;
  704. }
  705. .info-from{
  706. width: 702rpx;
  707. height: 90rpx;
  708. line-height: 90rpx;
  709. border-bottom: 2rpx solid #e1e1e1;
  710. margin: auto;
  711. position: relative;
  712. .label{
  713. width: 112rpx;
  714. text-align: left;
  715. font-size: $font-size-28;
  716. color: #666666;
  717. line-height: 90rpx;
  718. float: left;
  719. &.Code{
  720. width: 170rpx;
  721. }
  722. }
  723. .row-input{
  724. width: 520rpx;
  725. padding-left:10rpx;
  726. font-size: $font-size-28;
  727. color: $text-color;
  728. line-height: 90rpx;
  729. float: left;
  730. height: 90rpx;
  731. margin-left: 50rpx;
  732. &.Code{
  733. width: 470rpx;
  734. }
  735. .icon-xiayibu{
  736. position: absolute;
  737. right: 0;
  738. color: #b2b2b2;
  739. }
  740. .none{
  741. color: #b2b2b2;
  742. }
  743. }
  744. }
  745. .address-details{
  746. height: 146rpx;
  747. border-bottom: 2rpx solid #e1e1e1;
  748. width: 702rpx;
  749. margin: auto;
  750. font-size: $font-size-28;
  751. padding-top: 20rpx;
  752. }
  753. input[type="text"]::placeholder,textarea::placeholder {color: #b2b2b2;font-size: $font-size-28;}
  754. .info-email{
  755. color: #fea785;
  756. font-size: $font-size-20;
  757. padding-left: 24rpx ;
  758. }
  759. .ShopTyperadio{
  760. overflow: hidden;
  761. height: auto;
  762. border: 0;
  763. .radio{
  764. float: left;
  765. margin-right: 77rpx;
  766. .iconfont{
  767. margin-right: 10rpx;
  768. font-size: $font-size-36;
  769. }
  770. .icon-weixuanze{
  771. color: #b2b2b2;
  772. }
  773. .icon-yixuanze{
  774. color: $color-system;
  775. }
  776. }
  777. }
  778. .active{
  779. color: $color-system;
  780. }
  781. .secondTyperadio{
  782. overflow: hidden;
  783. height: auto;
  784. padding: 0 24rpx;
  785. margin-bottom: 20rpx;
  786. color: #999999;
  787. .radio{
  788. float: left;
  789. margin-right: 20rpx;
  790. .secondRadio{
  791. border: 2rpx solid #e1e1e1;
  792. padding: 0 30rpx;
  793. text-align: center;
  794. line-height: 42rpx;
  795. font-size: $font-size-26;
  796. border-radius: 21rpx;
  797. }
  798. }
  799. }
  800. .zizhi{
  801. .uploadImage{
  802. padding: 0 24rpx;
  803. &.list-image{
  804. overflow: hidden;
  805. display: flex;
  806. overflow-x: auto;
  807. flex-shrink: 0;
  808. padding-top: 20rpx;
  809. max-width: 702rpx;
  810. .formLine-file{
  811. float: left;
  812. display: flex;
  813. flex-shrink: 0;
  814. margin-right: 15rpx;
  815. }
  816. .form-upload-image{
  817. float: left;
  818. -webkit-flex-shrink: 0;
  819. flex-shrink: 0;
  820. position: relative;
  821. display: inline-block;
  822. margin-right:15rpx;
  823. display: flex;
  824. align-items: center;
  825. }
  826. }
  827. .form-upload-image{
  828. width: 200rpx;
  829. height:180rpx;
  830. position: relative;
  831. .upload-img{
  832. width: 100%;
  833. height: 100%;
  834. }
  835. .icon-shanchu1{
  836. position: absolute;
  837. top: -20rpx;
  838. right:-15rpx;
  839. color: #f94b4b;
  840. font-size: $font-size-36;
  841. }
  842. }
  843. .formLine-file{
  844. width:200rpx;
  845. height: 180rpx;
  846. display: inline-block;
  847. .file-zizhi{
  848. background: url('http://static-b.caimei365.com/app/img/upload/club-yiliao.png') no-repeat;
  849. width:100%;
  850. height:100%;
  851. background-size: 100%;
  852. }
  853. .iconImage{
  854. width: 100%;
  855. height:100%;
  856. &.file-biss{
  857. background: url('http://static-b.caimei365.com/app/img/upload/club-zizhi.png') no-repeat;
  858. background-size: 100%;
  859. }
  860. &.file-logo{
  861. background: url('http://static-b.caimei365.com/app/img/upload/icon-logo.png') no-repeat;
  862. background-size: 100%;
  863. }
  864. &.file-produce{
  865. background: url('http://static-b.caimei365.com/app/img/upload/icon-produce.png') no-repeat;
  866. background-size: 100%;
  867. }
  868. &.file-health{
  869. background: url('http://static-b.caimei365.com/app/img/upload/icon-health.png') no-repeat;
  870. background-size: 100%;
  871. }
  872. &.file-tax{
  873. background: url('http://static-b.caimei365.com/app/img/upload/icon-tax.png') no-repeat;
  874. background-size: 100%;
  875. }
  876. &.file-honor{
  877. background: url('http://static-b.caimei365.com/app/img/upload/icon-honor.png') no-repeat;
  878. background-size: 100%;
  879. }
  880. &.file-product{
  881. background: url('http://static-b.caimei365.com/app/img/upload/icon-product.png') no-repeat;
  882. background-size: 100%;
  883. }
  884. }
  885. }
  886. .form-upload-tips{
  887. display: inline-block;
  888. vertical-align: top;
  889. position: relative;
  890. .icon-wenhao{
  891. font-size: 41rpx;
  892. color:#1890f9 ;
  893. }
  894. .wen-tips{
  895. width: 360rpx;
  896. height: 64rpx;
  897. line-height: 64rpx;
  898. text-align: center;
  899. color: #FFF;
  900. font-size: 28rpx;
  901. background-color: #1890f9;
  902. position: absolute;
  903. bottom: -80rpx;
  904. left: -4rpx;
  905. border-radius: 2rpx;
  906. display: none ;
  907. }
  908. .wen-tips:before {
  909. content: '';
  910. width: 0px;
  911. height: 0px;
  912. border-width: 20rpx;
  913. border-style: solid;
  914. border-color: transparent transparent #1890f9 transparent;
  915. position: absolute;
  916. top: -35rpx;
  917. left: 10rpx;
  918. }
  919. .form-upload-tips:hover .wen-tips{display: block;}
  920. }
  921. }
  922. }
  923. .business{overflow: hidden;}
  924. .business-info{
  925. float: left;
  926. margin-left: 60rpx;
  927. width: 550rpx;
  928. }
  929. .info2-title{
  930. padding: 0 0 24rpx 24rpx;
  931. font-size: $font-size-28;
  932. color: #666666;
  933. &.zizhi-title{
  934. padding: 24rpx;
  935. &.hoor{padding: 24rpx 24rpx 0 24rpx;}
  936. }
  937. &.business-title{
  938. float: left;
  939. }
  940. }
  941. .addbusiness{
  942. margin: 20rpx 0;
  943. .other{
  944. width: 350rpx;
  945. height: 64rpx;
  946. border: 2rpx solid #b2b2b2;
  947. border-radius: 45rpx;
  948. text-align: center;
  949. line-height: 64rpx;
  950. padding-left: 10rpx;
  951. font-size: 28rpx;
  952. display: inline-block;
  953. }
  954. .button{
  955. width: 160rpx;
  956. height: 64rpx;
  957. text-align: center;
  958. line-height: 64rpx;
  959. display: inline-block;
  960. color: $color-system;
  961. background:#ffe6dc ;
  962. margin-left: 15rpx;
  963. border-radius: 45rpx;
  964. }
  965. }
  966. .row-group{
  967. .row-text{
  968. display: inline-block;
  969. font-size: 28rpx;
  970. color: #333333;
  971. }
  972. .row-input{
  973. width: 50%;
  974. display: inline-block;
  975. margin-bottom: 10rpx;
  976. }
  977. .diyBox{
  978. margin-bottom: 5px;
  979. // width: 33%;
  980. margin-right: 70rpx;
  981. display: inline-block;
  982. }
  983. }
  984. radio .wx-radio-input{
  985. border-radius: 50%;
  986. width: 36rpx;
  987. height: 36rpx;
  988. }
  989. radio .wx-radio-input.wx-radio-input-checked::before{
  990. font-size:28rpx;
  991. }
  992. checkbox .wx-checkbox-input{
  993. border-radius: 50%;
  994. width: 36rpx;
  995. height: 36rpx;
  996. }
  997. /* 选中后的 背景样式 */
  998. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  999. background: #E15616;
  1000. border: 2rpx solid #e15616;
  1001. }
  1002. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1003. border-radius: 50%;
  1004. width: 36rpx;
  1005. height: 36rpx;
  1006. line-height: 36rpx;
  1007. text-align: center;
  1008. font-size:20rpx;
  1009. color:#fff;
  1010. // background: transparent;
  1011. transform:translate(-50%, -50%) scale(1);
  1012. -webkit-transform:translate(-50%, -50%) scale(1);
  1013. }
  1014. .info{
  1015. margin: 20rpx 0;
  1016. textarea{
  1017. width: 680rpx;
  1018. height: 200rpx;
  1019. border: 2rpx solid #b2b2b2;
  1020. border-radius: 6rpx;
  1021. font-size: $font-size-28;
  1022. padding: 10rpx;
  1023. margin: auto;
  1024. line-height: 48rpx;
  1025. }
  1026. }
  1027. .wrap-Btn{
  1028. margin:100rpx auto;
  1029. .confirmBbtn{
  1030. width: 600rpx;
  1031. height: 90rpx;
  1032. line-height: 90rpx;
  1033. text-align: center;
  1034. color: #fff;
  1035. background:$btn-confirm;
  1036. border-radius: 45rpx;
  1037. }
  1038. }
  1039. </style>