information.vue 35 KB

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