information.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  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.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"/>
  32. </view>
  33. <text class="info-email">邮箱可用作登录账号,请使用公司邮箱或法人邮箱</text>
  34. <view class="info-from">
  35. <view class="label">固定电话</view>
  36. <input class="row-input" v-model="params.contractPhone" type="text" placeholder="请在号码前加区" placeholder-class="placeholder" maxlength="11"/>
  37. </view>
  38. <view class="info-from">
  39. <view class="label">传真</view>
  40. <input class="row-input" v-model="params.fax" type="text" placeholder="请输入公司传真号" placeholder-class="placeholder"/>
  41. </view>
  42. <view class="info-from">
  43. <view class="label">法人代表</view>
  44. <input class="row-input" v-model="params.legalPerson" type="text" placeholder="请输入公司法人代表姓名" placeholder-class="placeholder" maxlength="6"/>
  45. </view>
  46. <view class="info-from">
  47. <view class="label">注册资本</view>
  48. <input class="row-input" v-model="params.registeredCapital" type="text" placeholder="请填写公司注册资本 " placeholder-class="placeholder" />
  49. </view>
  50. <view class="info-from">
  51. <view class="label">公司性质</view>
  52. <input class="row-input" v-model="params.nature" type="text" placeholder="请填写公司性质" placeholder-class="placeholder"/>
  53. </view>
  54. <view class="info-from">
  55. <view class="label">年营业额</view>
  56. <input class="row-input" v-model="params.turnover" type="text" placeholder="请输入公司年营业额" placeholder-class="placeholder"/>
  57. </view>
  58. </view>
  59. <view class="wrap-content">
  60. <view class="row">
  61. <view class="info-title">经营信息</view>
  62. </view>
  63. <view class="info-from" style="border: 0;">
  64. <view class="label">公司类型</view>
  65. <view class="row-input ShopTyperadio">
  66. <radio-group @change="radioChange">
  67. <label class="radio" v-for="(item, index) in typename" :key="item.value">
  68. <radio :value="item.value" :checked="item.value == params.firstShopType" color='#E15616'/>{{item.name}}
  69. </label>
  70. </radio-group>
  71. </view>
  72. </view>
  73. <view class="secondTyperadio" v-if="params.firstShopType==1" >
  74. <view class="radio" v-for="(item,index) in secondtype" :key="index" @click="secondypeRidio(item)" :class="item.value==params.secondShopType?'active':''">
  75. <view class="secondRadio" >{{item.name}}</view>
  76. </view>
  77. </view>
  78. <view class="zizhi" v-if="params.secondShopType==3">
  79. <view class="info2-title zizhi-title">资质</view>
  80. <view class="uploadImage">
  81. <view class="form-upload-image" v-if="params.medicalPracticeLicenseImg1!=''&&params.medicalPracticeLicenseImg1!=null">
  82. <image class="upload-img" :src="params.medicalPracticeLicenseImg1" alt="" ></image>
  83. <view class="iconfont icon-shanchu1" @click="deleteMedicalImage()"></view>
  84. </view>
  85. <view class="formLine-file" @click="uploadzizhiImageFn" v-else>
  86. <view class="file-zizhi"></view>
  87. </view>
  88. <view class="form-upload-tips">
  89. <text class="iconfont icon-wenhao"></text>
  90. <view class="wen-tips">点击图片可放大图片</view>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="business">
  95. <view class="info2-title business-title">主营内容</view>
  96. <view class="business-info">
  97. <checkbox-group class="row-group" @change="chooseMaleLike">
  98. <label class="diyBox" v-for="(item, index) in mentuzCampList" :key="item.value" >
  99. <checkbox :value="item.value" :checked="item.checked"></checkbox>
  100. <view class="row-text">{{item.name}}</view>
  101. </label>
  102. </checkbox-group>
  103. <view class="addbusiness">
  104. <input class="row-input other" type="text" placeholder="请输入自定义项目" v-model="mainProEdit"placeholder-class="placeholder" maxlength="5"/>
  105. <button type="default" class="button" @click.stop="mainProAdd">确认添加</button>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="business">
  110. <view class="info2-title business-title">经营范围</view>
  111. <view class="business-info">
  112. <checkbox-group class="row-group" @change="chooseMaleLikes">
  113. <label class="row-input" v-for="(item, index) in medicaCampList" :key="item.value" >
  114. <checkbox :value="item.value" :checked="item.checked" ></checkbox>
  115. <view class="row-text">{{item.name}}</view>
  116. </label>
  117. </checkbox-group>
  118. <view class="addbusiness">
  119. <input class="row-input other" type="text" placeholder="请输入自定义经营范围" v-model="shopScopeEdit" placeholder-class="placeholder" maxlength="5"/>
  120. <button type="default" class="button" @click.stop="shopScopeAdd">确认添加</button>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="info">
  125. <view class="info2-title">公司介绍</view>
  126. <textarea v-model="params.info" maxlength="2000" placeholder="公司简介会在公司介绍页面展示,有助于机构更好的了解您, 建议从个人规模、代理产品、机构服务、荣誉资质这4方面进行介绍" placeholder-class="placeholder" name="textarea"/>
  127. </view>
  128. <view class="info">
  129. <view class="info2-title">主打系列商品说明</view>
  130. <textarea placeholder="请输入主打系列商品说明" v-model="params.productDesc" maxlength="500" placeholder-class="placeholder" name="textarea"/>
  131. </view>
  132. </view>
  133. <view class="wrap-image">
  134. <view class="row">
  135. <view class="info-title">资质证明</view>
  136. </view>
  137. <view class="info-from">
  138. <view class="label Code">营业执照编号</view>
  139. <input class="row-input Code" v-model.trim="params.socialCreditCode" type="text" placeholder="请输入公司营业执照编号" placeholder-class="placeholder" maxlength="18"/>
  140. </view>
  141. <view class="zizhi">
  142. <view class="info2-title zizhi-title">营业执照图片</view>
  143. <view class="uploadImage">
  144. <view class="form-upload-image" v-if="params.businessLicenseImage!=''&&params.businessLicenseImage!=null">
  145. <image class="upload-img" :src="params.businessLicenseImage" @click="showViewerImageFn()" ></image>
  146. <view class="iconfont icon-shanchu1" @click="deleteBusinessImage()"></view>
  147. </view>
  148. <view class="formLine-file" @click="uploadBusinessLicenseImageFn" v-else>
  149. <view class="file-biss iconImage"></view>
  150. </view>
  151. </view>
  152. </view>
  153. <view class="zizhi">
  154. <view class="info2-title zizhi-title">公司LOGO</view>
  155. <view class="uploadImage">
  156. <view class="form-upload-image" v-if="params.logo!=''&&params.logo!=null">
  157. <image class="upload-img" :src="params.logo" alt="" @click="showViewerImageFn1()"></image>
  158. <view class="iconfont icon-shanchu1" @click="deletelogoImage()"></view>
  159. </view>
  160. <view class="formLine-file" @click="uploadlogoImageFn" v-else>
  161. <view class="file-logo iconImage"></view>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="zizhi">
  166. <view class="info2-title zizhi-title">生产许可证</view>
  167. <view class="uploadImage">
  168. <view class="form-upload-image" v-if="params.productionLicence!=''&&params.productionLicence!=null">
  169. <image class="upload-img" :src="params.productionLicence" alt="" @click="showViewerImageFn2()"></image>
  170. <view class="iconfont icon-shanchu1" @click="deleteproducImage()"></view>
  171. </view>
  172. <view class="formLine-file" @click="uploadproductionLicenceImageFn" v-else>
  173. <view class="file-produce iconImage"></view>
  174. </view>
  175. </view>
  176. </view>
  177. <view class="zizhi">
  178. <view class="info2-title zizhi-title">卫生许可证</view>
  179. <view class="uploadImage">
  180. <view class="form-upload-image" v-if="params.hygienicLicense!=''&&params.hygienicLicense!=null">
  181. <image class="upload-img" :src="params.hygienicLicense" alt="" @click="showViewerImageFn3()"></image>
  182. <view class="iconfont icon-shanchu1" @click="deletehygienicImage()"></view>
  183. </view>
  184. <view class="formLine-file" @click="uploadhygienicLicenseImageFn" v-else>
  185. <view class="file-health iconImage"></view>
  186. </view>
  187. </view>
  188. </view>
  189. <view class="zizhi">
  190. <view class="info2-title zizhi-title">税务许可证</view>
  191. <view class="uploadImage">
  192. <view class="form-upload-image" v-if="params.taxLicense!=''&&params.taxLicense!=null">
  193. <image class="upload-img" :src="params.taxLicense" alt="" @click="showViewerImageFn4()"></image>
  194. <view class="iconfont icon-shanchu1" @click="deletaxImage()"></view>
  195. </view>
  196. <view class="formLine-file" @click="uploadtaxLicenseImageFn" v-else>
  197. <view class="file-tax iconImage"></view>
  198. </view>
  199. </view>
  200. </view>
  201. <view class="zizhi">
  202. <view class="info2-title zizhi-title hoor">荣誉证书</view>
  203. <view class="uploadImage list-image">
  204. <view class="formLine-file" @click="uploadHonorImageFn" v-if="HonorImagesList.length<5" >
  205. <view class="file-honor iconImage"></view>
  206. </view>
  207. <view class="form-upload-image" v-for="(item, index) in HonorImagesList" :key="index">
  208. <image class="upload-img" :src="item" alt="" @click="showViewerImageFn5()"></image>
  209. <view class="iconfont icon-shanchu1" @click="removeGoodsImagesFn(HonorImagesList)"></view>
  210. </view>
  211. </view>
  212. </view>
  213. <view class="zizhi">
  214. <view class="info2-title zizhi-title hoor">产品证书</view>
  215. <view class="uploadImage list-image">
  216. <view class="formLine-file" @click="uploadproductImageFn" v-if="productImagesList.length<5" >
  217. <view class="file-product iconImage"></view>
  218. </view>
  219. <view class="form-upload-image" v-for="(item, index) in productImagesList" :key="index">
  220. <image class="upload-img" :src="item" alt="" @click="showViewerImageFn6()"></image>
  221. <view class="iconfont icon-shanchu1" @click="removeproductImagesFn(index)"></view>
  222. </view>
  223. </view>
  224. </view>
  225. </view>
  226. <view class="wrap-Btn" :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. 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. 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.mainpro = 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.sname = shop.sname;
  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.nature = shop.nature;
  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.medicalPracticeLicenseImg1 = shop.medicalPracticeLicenseImg1;
  407. this.params.info = shop.info;
  408. this.params.productDesc = shop.productDesc;
  409. this.params.socialCreditCode = shop.socialCreditCode;
  410. this.params.businessLicenseImage = shop.businessLicenseImage;
  411. this.params.logo = shop.logo;
  412. this.params.productionLicence = shop.productionLicence;
  413. this.params.hygienicLicense = shop.hygienicLicense;
  414. this.params.taxLicense = shop.taxLicense;
  415. this.HonorImagesList = response.data.certificateHonor;
  416. this.productImagesList = response.data.productCertification;
  417. if( response.data.certificateHonor!=''&& response.data.certificateHonor!=null){
  418. this.params.certificateHonor =this.HonorImagesList.toString()+',';
  419. }
  420. if( response.data.productCertification!=''&& response.data.productCertification!=null){
  421. this.params.productCertification =this.productImagesList.toString()+',';
  422. }
  423. if(shop.mainpro == "" || shop.mainpro == null){
  424. this.mentuzCampList = this.mentuzCampNullList
  425. }else{
  426. this.mentuzCampList = this.setNewMainpro(shop.mainpro)
  427. this.params.mainpro = shop.mainpro
  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. console.log(this.params);
  441. if(this.params.name==''||this.params.name==null){
  442. this.$util.msg('请输入公司名称',2000);
  443. return
  444. }else if(this.params.townID==''||this.params.townID==null){
  445. this.$util.msg('请选择联系地址',2000);
  446. return
  447. }else if(this.params.address==''||this.params.address==null){
  448. this.$util.msg('请输入正确的联系地址',2000);
  449. return
  450. }else if(this.params.linkMan==''||this.params.linkMan==null){
  451. this.$util.msg('请输入正确的联系人姓名',2000);
  452. return
  453. }else if(this.params.legalPerson==''||this.params.legalPerson==null){
  454. this.$util.msg('请输入法人代表姓名',2000);
  455. return
  456. }else if(this.params.registeredCapital==''||this.params.registeredCapital==null){
  457. this.$util.msg('请输入注册资本',2000);
  458. return
  459. }else if(this.params.nature==''||this.params.nature==null){
  460. this.$util.msg('请输入公司性质',2000);
  461. return
  462. }else if(this.params.turnover==''||this.params.turnover==null){
  463. this.$util.msg('请输入年营业额',2000);
  464. return
  465. }else if(this.params.firstShopType==''||this.params.firstShopType==null){
  466. this.$util.msg('请选择公司类型',2000);
  467. return
  468. }else if(this.params.firstShopType==1 && this.params.secondShopType==""){
  469. this.$util.msg('请选择公司类型',2000);
  470. return
  471. }else if(this.params.mainpro==''||this.params.mainpro==null){
  472. this.$util.msg('请选择主营内容',2000);
  473. return
  474. }else if(this.params.businessScope==''||this.params.businessScope==null){
  475. this.$util.msg('请选择经营内容',2000);
  476. return
  477. }else if(this.params.info==''||this.params.info==null){
  478. this.$util.msg('请填写公司介绍',2000);
  479. return
  480. }else if(this.params.productDesc==''||this.params.productDesc==null){
  481. this.$util.msg('请填系列商品说明',2000);
  482. return
  483. }else if(this.params.socialCreditCode==''||this.params.socialCreditCode==null){
  484. this.$util.msg('请输入正确的统一社会信用代码',2000);
  485. return
  486. }else if(this.params.businessLicenseImage==''||this.params.businessLicenseImage==null){
  487. this.$util.msg('请上传营业执照图片',2000);
  488. return
  489. }else if(this.params.logo==''||this.params.logo==null){
  490. this.$util.msg('请上传公司logo',2000);
  491. return
  492. }else if(this.params.productionLicence==''||this.params.productionLicence==null){
  493. this.$util.msg('请上传生产许可证',2000);
  494. return
  495. }else if(this.params.hygienicLicense==''||this.params.hygienicLicense==null){
  496. this.$util.msg('请上传卫生许可证',2000);
  497. return
  498. }else if(this.params.taxLicense==''||this.params.taxLicense==null){
  499. this.$util.msg('请上传税务许可证',2000);
  500. return
  501. }else if(this.params.certificateHonor==''||this.params.certificateHonor==null){
  502. this.$util.msg('请上传荣誉证书',2000);
  503. return
  504. }else if(this.params.productCertification==''||this.params.productCertification==null){
  505. this.$util.msg('请上传产品证书',2000);
  506. return
  507. }else{
  508. this.UserService.SupplierModifiedData(this.params).then(res=>{
  509. if(res.code === 0){
  510. this.$util.msg('保存成功',2000,true,'success')
  511. setTimeout(()=>{
  512. uni.navigateBack();
  513. },2000)
  514. } else {
  515. this.$util.msg(res.msg,2000);
  516. this.loginLoading = false;
  517. }
  518. })
  519. }
  520. },
  521. mainProAdd(){//添加主营内容
  522. if (this.mainProEdit.length>0) {
  523. let obj = {name:this.mainProEdit,value:`${this.mentuzCampList.length+1}`};
  524. if(this.checkedArray(this.mainProEdit,this.mentuzCampList)){
  525. this.$util.msg('主营内容已存在!',2000)
  526. }else {
  527. this.mentuzCampList.push(obj);
  528. }
  529. }
  530. },
  531. shopScopeAdd(){ //经营内容
  532. if (this.shopScopeEdit.length>0) {
  533. let obj = {name:this.shopScopeEdit,value:`${this.medicaCampList.length+1}`};
  534. if(this.checkedArray(this.shopScopeEdit,this.medicaCampList)){
  535. this.$util.msg('主营内容已存在!',2000)
  536. }else {
  537. this.medicaCampList.push(obj);
  538. }
  539. }
  540. },
  541. checkedArray(content,arr){//判断主营内容是否已存在
  542. console.log(content,arr)
  543. for(var i in arr){
  544. if(arr[i].name == content){
  545. return true;
  546. }
  547. }
  548. return false;
  549. },
  550. radioChange(e){
  551. this.params.firstShopType = e.target.value;
  552. // if (e.target.value==1){
  553. // this.isfirstShow = true;
  554. // }else {
  555. // this.isfirstShow = false;
  556. // }
  557. console.log(e.target.value)
  558. },
  559. showViewerImageFn6(e) {//预览产品
  560. this.myPreviewImageFnlist(this.productImagesList)
  561. },
  562. showViewerImageFn5(e) {//预览荣誉
  563. this.myPreviewImageFnlist(this.HonorImagesList)
  564. },
  565. showViewerImageFn4(e) {//预览税务
  566. this.myPreviewImageFn(this.params.taxLicense)
  567. },
  568. showViewerImageFn3(e) {//预览卫生
  569. this.myPreviewImageFn(this.params.hygienicLicense)
  570. },
  571. showViewerImageFn2(e) {//预览生产
  572. this.myPreviewImageFn(this.params.productionLicence)
  573. },
  574. showViewerImageFn1(e) {//预览logo
  575. this.myPreviewImageFn(this.params.logo)
  576. },
  577. showViewerImageFn(e) {//预览营业执照
  578. this.myPreviewImageFn(this.params.businessLicenseImage)
  579. },
  580. myPreviewImageFnlist(arr){//多张预览
  581. this.isPreviewImage = true;
  582. uni.previewImage({
  583. urls: arr,
  584. current: 0
  585. })
  586. },
  587. myPreviewImageFn(url){//单张预览
  588. this.isPreviewImage = true
  589. let mentuzArray = []
  590. mentuzArray.push(url)
  591. uni.previewImage({
  592. urls: mentuzArray,
  593. current: 0
  594. });
  595. },
  596. uploadproductImageFn(event){//产品证书
  597. uploadFileImage().then(res =>{
  598. this.productImagesList.push(JSON.parse(res.data).data);
  599. this.params.productCertification =this.productImagesList.toString()+',';
  600. })
  601. },
  602. uploadHonorImageFn(event){//荣誉证书上传
  603. uploadFileImage().then(res =>{
  604. this.HonorImagesList.push(JSON.parse(res.data).data);
  605. this.params.certificateHonor =this.HonorImagesList.toString()+',';
  606. })
  607. },
  608. uploadlogoImageFn(event){//上传公司logo
  609. uploadFileImage().then(res =>{
  610. this.params.logo = JSON.parse(res.data).data;
  611. })
  612. },
  613. uploadproductionLicenceImageFn(event){//上传生产
  614. uploadFileImage().then(res =>{
  615. this.params.productionLicence = JSON.parse(res.data).data;
  616. })
  617. },
  618. uploadhygienicLicenseImageFn(event){//上传卫生
  619. uploadFileImage().then(res =>{
  620. this.params.hygienicLicense = JSON.parse(res.data).data;
  621. })
  622. },
  623. uploadtaxLicenseImageFn(event){//上传税务
  624. uploadFileImage().then(res =>{
  625. this.params.taxLicense = JSON.parse(res.data).data;
  626. })
  627. },
  628. uploadBusinessLicenseImageFn(event){//上传营业执照图片
  629. uploadFileImage().then(res =>{
  630. this.params.businessLicenseImage = JSON.parse(res.data).data;
  631. })
  632. },
  633. uploadzizhiImageFn(event){//上传医疗图片
  634. uploadFileImage().then(res =>{
  635. this.params.medicalPracticeLicenseImg1 = JSON.parse(res.data).data;
  636. })
  637. },
  638. removeGoodsImagesFn(index){//删除荣誉图片
  639. this.HonorImagesList.splice(index,1);
  640. this.params.certificateHonor = this.HonorImagesList.toString()+',';
  641. },
  642. removeproductImagesFn(index){//删除产品图片
  643. this.productImagesList.splice(index,1);
  644. this.params.productCertification = this.productImagesList.toString()+',';
  645. },
  646. deletaxImage(){//删除卫生
  647. this.params.taxLicense = '';
  648. },
  649. deletehygienicImage(){//删除卫生
  650. this.params.hygienicLicense = '';
  651. },
  652. deleteproducImage(){//删除生产
  653. this.params.productionLicence = '';
  654. },
  655. deletelogoImage(){//删除logo图片
  656. this.params.logo = '';
  657. },
  658. deleteBusinessImage(){//删除营业执照图片
  659. this.params.businessLicenseImage = '';
  660. },
  661. deleteMedicalImage(){//删除商品图片
  662. this.medicalPracticeLicenseImg1 = '';
  663. },
  664. secondypeRidio(item){
  665. this.params.secondShopType = item.value;
  666. // if (item.value==3){
  667. // this.issecondshow = true;
  668. // }else {
  669. // this.issecondshow = false;
  670. // }
  671. },
  672. showMulLinkageThreePicker() {//三级地址联动
  673. this.isShowInput = true
  674. this.$refs.mpvueCityPicker.show()
  675. },
  676. onConfirm(e) {//获取选择的地址信息
  677. console.log('地址',e);
  678. this.addressData.address = e.name;
  679. this.addressData.townID = e.townCode;
  680. this.addressData.cityID = e.cityCode;
  681. this.addressData.provinceID = e.provinceCode;
  682. this.params.townID = this.addressData.townID;
  683. this.params.provinceID = this.addressData.provinceID;
  684. this.params.cityID = this.addressData.cityID;
  685. this.params.address = this.addressData.address;
  686. },
  687. onConfirmbrand(e){
  688. this.brandname = e.name;
  689. },
  690. },
  691. }
  692. </script>
  693. <style lang="scss">
  694. .container{
  695. width: 100%;
  696. height: auto;
  697. }
  698. .row{
  699. line-height: 80rpx;
  700. background: #f7f7f7;
  701. padding: 0 24rpx;
  702. .info-title{
  703. font-size: $font-size-30;
  704. color: $text-color;
  705. font-weight: bold;
  706. }
  707. }
  708. .placeholder{
  709. color: #b2b2b2;
  710. }
  711. .info-from{
  712. width: 702rpx;
  713. height: 90rpx;
  714. line-height: 90rpx;
  715. border-bottom: 2rpx solid #e1e1e1;
  716. margin: auto;
  717. position: relative;
  718. .label{
  719. width: 112rpx;
  720. text-align: left;
  721. font-size: $font-size-28;
  722. color: #666666;
  723. line-height: 90rpx;
  724. float: left;
  725. &.Code{
  726. width: 170rpx;
  727. }
  728. }
  729. .row-input{
  730. width: 520rpx;
  731. padding-left:10rpx;
  732. font-size: $font-size-28;
  733. color: $text-color;
  734. line-height: 90rpx;
  735. float: left;
  736. height: 90rpx;
  737. margin-left: 50rpx;
  738. &.Code{
  739. width: 470rpx;
  740. }
  741. .icon-xiayibu{
  742. position: absolute;
  743. right: 0;
  744. color: #b2b2b2;
  745. }
  746. .none{
  747. color: #b2b2b2;
  748. }
  749. }
  750. }
  751. .address-details{
  752. height: 146rpx;
  753. border-bottom: 2rpx solid #e1e1e1;
  754. width: 702rpx;
  755. margin: auto;
  756. font-size: $font-size-28;
  757. padding-top: 20rpx;
  758. }
  759. input[type="text"]::placeholder,textarea::placeholder {color: #b2b2b2;font-size: $font-size-28;}
  760. .info-email{
  761. color: #fea785;
  762. font-size: $font-size-20;
  763. padding-left: 24rpx ;
  764. }
  765. .ShopTyperadio{
  766. overflow: hidden;
  767. height: auto;
  768. border: 0;
  769. .radio{
  770. float: left;
  771. margin-right: 77rpx;
  772. .iconfont{
  773. margin-right: 10rpx;
  774. font-size: $font-size-36;
  775. }
  776. .icon-weixuanze{
  777. color: #b2b2b2;
  778. }
  779. .icon-yixuanze{
  780. color: $color-system;
  781. }
  782. }
  783. }
  784. .active{
  785. color: $color-system;
  786. }
  787. .secondTyperadio{
  788. overflow: hidden;
  789. height: auto;
  790. padding: 20rpx 24rpx;
  791. margin-bottom: 20rpx;
  792. color: #999999;
  793. .radio{
  794. float: left;
  795. margin-right: 20rpx;
  796. .secondRadio{
  797. border: 2rpx solid #e1e1e1;
  798. padding: 0 30rpx;
  799. text-align: center;
  800. line-height: 42rpx;
  801. font-size: $font-size-26;
  802. border-radius: 21rpx;
  803. }
  804. }
  805. }
  806. .zizhi{
  807. .uploadImage{
  808. padding: 0 24rpx;
  809. &.list-image{
  810. overflow: hidden;
  811. display: flex;
  812. overflow-x: auto;
  813. flex-shrink: 0;
  814. padding-top: 15rpx;
  815. max-width: 702rpx;
  816. .formLine-file{
  817. float: left;
  818. display: flex;
  819. flex-shrink: 0;
  820. margin:15rpx 15rpx 15rpx 0rpx;
  821. }
  822. .form-upload-image{
  823. float: left;
  824. -webkit-flex-shrink: 0;
  825. flex-shrink: 0;
  826. position: relative;
  827. display: inline-block;
  828. margin:15rpx 15rpx 15rpx 0rpx;
  829. display: flex;
  830. align-items: center;
  831. }
  832. }
  833. .form-upload-image{
  834. width: 200rpx;
  835. height:180rpx;
  836. position: relative;
  837. .upload-img{
  838. width: 100%;
  839. height: 100%;
  840. }
  841. .icon-shanchu1{
  842. position: absolute;
  843. top: -20rpx;
  844. right:-15rpx;
  845. color: #f94b4b;
  846. font-size: $font-size-36;
  847. }
  848. }
  849. .formLine-file{
  850. width:200rpx;
  851. height: 180rpx;
  852. display: inline-block;
  853. .file-zizhi{
  854. background: url('https://static.caimei365.com/app/img/upload/club-yiliao.png') no-repeat;
  855. width:100%;
  856. height:100%;
  857. background-size: 100% 100%;
  858. }
  859. .iconImage{
  860. width: 100%;
  861. height:100%;
  862. &.file-biss{
  863. background: url('https://static.caimei365.com/app/img/upload/club-zizhi.png') no-repeat;
  864. background-size: 100% 100%;
  865. }
  866. &.file-logo{
  867. background: url('https://static.caimei365.com/app/img/upload/icon-logo.png') no-repeat;
  868. background-size: 100% 100%;
  869. }
  870. &.file-produce{
  871. background: url('https://static.caimei365.com/app/img/upload/icon-produce.png') no-repeat;
  872. background-size: 100% 100%;
  873. }
  874. &.file-health{
  875. background: url('https://static.caimei365.com/app/img/upload/icon-health.png') no-repeat;
  876. background-size: 100% 100%;
  877. }
  878. &.file-tax{
  879. background: url('https://static.caimei365.com/app/img/upload/icon-tax.png') no-repeat;
  880. background-size: 100% 100%;
  881. }
  882. &.file-honor{
  883. background: url('https://static.caimei365.com/app/img/upload/icon-honor.png') no-repeat;
  884. background-size: 100% 100%;
  885. }
  886. &.file-product{
  887. background: url('https://static.caimei365.com/app/img/upload/icon-product.png') no-repeat;
  888. background-size: 100% 100%;
  889. }
  890. }
  891. }
  892. .form-upload-tips{
  893. display: inline-block;
  894. vertical-align: top;
  895. position: relative;
  896. margin-left: 20rpx;
  897. .icon-wenhao{
  898. font-size: 41rpx;
  899. color:#1890f9 ;
  900. }
  901. .wen-tips{
  902. width: 360rpx;
  903. height: 64rpx;
  904. line-height: 64rpx;
  905. text-align: center;
  906. color: #FFF;
  907. font-size: 28rpx;
  908. background-color: #1890f9;
  909. position: absolute;
  910. bottom: -80rpx;
  911. left: -4rpx;
  912. border-radius: 2rpx;
  913. display: none ;
  914. }
  915. .wen-tips:before {
  916. content: '';
  917. width: 0px;
  918. height: 0px;
  919. border-width: 20rpx;
  920. border-style: solid;
  921. border-color: transparent transparent #1890f9 transparent;
  922. position: absolute;
  923. top: -35rpx;
  924. left: 10rpx;
  925. }
  926. }
  927. }
  928. }
  929. .form-upload-tips:hover .wen-tips {display: block;}
  930. .business{overflow: hidden;margin: 20rpx 0;}
  931. .business-info{
  932. float: left;
  933. margin-left: 60rpx;
  934. width: 550rpx;
  935. }
  936. .info2-title{
  937. padding: 0 0 24rpx 24rpx;
  938. font-size: $font-size-28;
  939. color: #666666;
  940. &.zizhi-title{
  941. padding: 24rpx;
  942. &.hoor{padding: 24rpx 24rpx 0 24rpx;}
  943. }
  944. &.business-title{
  945. float: left;
  946. }
  947. }
  948. .addbusiness{
  949. margin: 20rpx 0;
  950. .other{
  951. width: 350rpx;
  952. height: 64rpx;
  953. border: 2rpx solid #b2b2b2;
  954. border-radius: 45rpx;
  955. text-align: center;
  956. line-height: 64rpx;
  957. padding-left: 10rpx;
  958. font-size: 28rpx;
  959. display: inline-block;
  960. }
  961. .button{
  962. width: 160rpx;
  963. height: 64rpx;
  964. text-align: center;
  965. line-height: 64rpx;
  966. display: inline-block;
  967. color: $color-system;
  968. background:#ffe6dc ;
  969. margin-left: 15rpx;
  970. border-radius: 45rpx;
  971. }
  972. }
  973. .row-group{
  974. .row-text{
  975. display: inline-block;
  976. font-size: 28rpx;
  977. color: #333333;
  978. }
  979. .row-input{
  980. width: 50%;
  981. display: inline-block;
  982. margin-bottom: 10rpx;
  983. }
  984. .diyBox{
  985. margin-bottom: 5px;
  986. // width: 33%;
  987. margin-right: 70rpx;
  988. display: inline-block;
  989. }
  990. }
  991. radio .wx-radio-input{
  992. border-radius: 50%;
  993. width: 36rpx;
  994. height: 36rpx;
  995. }
  996. radio .wx-radio-input.wx-radio-input-checked::before{
  997. font-size:28rpx;
  998. }
  999. checkbox .wx-checkbox-input{
  1000. border-radius: 50%;
  1001. width: 36rpx;
  1002. height: 36rpx;
  1003. }
  1004. /* 选中后的 背景样式 */
  1005. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1006. background: #E15616;
  1007. border: 2rpx solid #e15616;
  1008. }
  1009. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1010. border-radius: 50%;
  1011. width: 36rpx;
  1012. height: 36rpx;
  1013. line-height: 36rpx;
  1014. text-align: center;
  1015. font-size:20rpx;
  1016. color:#fff;
  1017. // background: transparent;
  1018. transform:translate(-50%, -50%) scale(1);
  1019. -webkit-transform:translate(-50%, -50%) scale(1);
  1020. }
  1021. .info{
  1022. margin: 20rpx 0;
  1023. textarea{
  1024. width: 680rpx;
  1025. height: 200rpx;
  1026. border: 2rpx solid #b2b2b2;
  1027. border-radius: 6rpx;
  1028. font-size: $font-size-28;
  1029. padding: 10rpx;
  1030. margin: auto;
  1031. line-height: 48rpx;
  1032. }
  1033. }
  1034. .wrap-Btn{
  1035. width: 100%;
  1036. height: 90rpx;
  1037. position: fixed;
  1038. left: 0;
  1039. bottom: 0;
  1040. padding-top: 40rpx;
  1041. background-color: #FFFFFF;
  1042. z-index: 999;
  1043. .confirmBbtn{
  1044. width: 600rpx;
  1045. height: 90rpx;
  1046. line-height: 90rpx;
  1047. text-align: center;
  1048. color: #fff;
  1049. background:$btn-confirm;
  1050. border-radius: 45rpx;
  1051. }
  1052. }
  1053. </style>