information.vue 36 KB

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