index.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921
  1. <template>
  2. <div class="user-content mobile-content">
  3. <user-header @updateLoad="updateEnterpriseInfo"></user-header>
  4. <ul class="switch-list">
  5. <li :class="{active: activeType === 'store'}" @click="swtichTab('store')">店铺管理</li>
  6. <li :class="{active: activeType === 'Account'}" @click="swtichTab('Account')">账户管理</li>
  7. </ul>
  8. <!-- 店铺管理 -->
  9. <template v-if="activeType === 'store'">
  10. <template v-if="storeInfo.storeName">
  11. <div class="topinfo clearfix">
  12. <div class="pull-left">
  13. 店铺信息
  14. </div>
  15. <div class="pull-right" @click="updateInfo()" v-show="storeState === 'look'">
  16. <img src="/images/vendor/updateinfo.png"/>
  17. 编辑
  18. </div>
  19. </div>
  20. <ul class="infoul">
  21. <li class="clearfix" :class="{border: storeState !== 'look'}">
  22. <div class="name pull-left" :class="{update: storeState !== 'look'}">店铺名称:</div>
  23. <div class="text pull-left" v-if="storeState === 'look'">
  24. {{storeInfo.storeName || '-'}}
  25. </div>
  26. <div v-else class="text pull-left">
  27. <input v-model="storeInfo.storeName" type="text"/>
  28. </div>
  29. </li>
  30. <li class="clearfix" :class="{border: storeState !== 'look'}">
  31. <div class="name pull-left" :class="{update: storeState !== 'look'}">简介:</div>
  32. <div class="text pull-left clearfix" v-if="storeState === 'look'">
  33. {{Islook ? dealWithText(storeInfo.description) : dealWithText()}}
  34. <a class="pull-right" @click="dealWithText2('open')" v-show="Islook">
  35. 全部<img src="/images/store/default/openblack.png"/>
  36. </a>
  37. <a class="pull-right upload" @click="dealWithText2('hide')" v-show="!hidelook">
  38. 收起<img src="/images/store/default/openblack.png"/>
  39. </a>
  40. </div>
  41. <div class="text pull-left" v-else>
  42. <textarea v-model="storeInfo.description">
  43. </textarea>
  44. </div>
  45. </li>
  46. <li class="clearfix" :class="{border: storeState !== 'look'}">
  47. <div class="name pull-left" :class="{update: storeState !== 'look'}">企业地址:</div>
  48. <div class="text pull-left" v-if="storeState === 'look'">
  49. {{storeInfo.enterprise.address || '-'}}
  50. </div>
  51. <div v-else class="text pull-left">
  52. <input v-model="storeInfo.enterprise.address" type="text"/>
  53. </div>
  54. </li>
  55. <li class="clearfix" :class="{border: storeState !== 'look'}">
  56. <div class="name pull-left" :class="{update: storeState !== 'look'}">电话:</div>
  57. <div class="text pull-left" v-if="storeState === 'look'">
  58. {{storeInfo.enterprise.enTel || '暂无信息'}}
  59. </div>
  60. <div v-else class="text pull-left">
  61. <input v-model="storeInfo.enterprise.enTel" type="text"/>
  62. </div>
  63. </li>
  64. <li class="clearfix" :class="{border: storeState !== 'look'}">
  65. <div class="name pull-left" :class="{update: storeState !== 'look'}">传真:</div>
  66. <div class="text pull-left" v-if="storeState === 'look'">
  67. {{storeInfo.enterprise.enFax || '暂无信息'}}
  68. </div>
  69. <div v-else class="text pull-left">
  70. <input v-model="storeInfo.enterprise.enFax" type="text"/>
  71. </div>
  72. </li>
  73. <li class="clearfix" :class="{border: storeState !== 'look'}">
  74. <div class="name pull-left" :class="{update: storeState !== 'look'}">手机:</div>
  75. <div class="text pull-left" v-if="storeState === 'look'">
  76. {{storeInfo.enterprise.enPhone || '暂无信息'}}
  77. </div>
  78. <div v-else class="text pull-left">
  79. <input v-model="storeInfo.enterprise.enPhone" type="text"/>
  80. </div>
  81. </li>
  82. <li class="clearfix" :class="{border: storeState !== 'look'}">
  83. <div class="name pull-left" :class="{update: storeState !== 'look'}">微信:</div>
  84. <div class="text pull-left" v-if="storeState === 'look'">
  85. {{storeInfo.enterprise.enWeixin || '暂无信息'}}
  86. </div>
  87. <div v-else class="text pull-left">
  88. <input v-model="storeInfo.enterprise.enWeixin" type="text"/>
  89. </div>
  90. </li>
  91. <li class="clearfix" :class="{border: storeState !== 'look'}">
  92. <div class="name pull-left" :class="{update: storeState !== 'look'}">QQ:</div>
  93. <div class="text pull-left" v-if="storeState === 'look'">
  94. {{storeInfo.enterprise.enQQ || '暂无信息'}}
  95. </div>
  96. <div v-else class="text pull-left">
  97. <input v-model="storeInfo.enterprise.enQQ" type="text"/>
  98. </div>
  99. </li>
  100. </ul>
  101. <div class="control clearfix">
  102. <div class="cancel" @click="storeInfosave('cancel')" v-if="storeState !== 'look'">取消</div>
  103. <div class="save" @click="storeInfosave()" v-if="storeState !== 'look'">保存</div>
  104. </div>
  105. </template>
  106. <template v-else>
  107. <div class="none-state">
  108. <img src="/images/mobile/@2x/empty-collect.png">
  109. <p v-text="getRemindText"></p>
  110. <nuxt-link to="/">返回首页</nuxt-link>
  111. </div>
  112. </template>
  113. </template>
  114. <!-- /end 店铺管理 -->
  115. <!-- 账户管理 -->
  116. <template v-else>
  117. <div class="topinfo clearfix">
  118. <div class="pull-left">
  119. 企业信息
  120. </div>
  121. <div class="pull-right" @click="updateInfo()" v-show="storeState === 'look' && enterpriseInfo.enName">
  122. <img src="/images/vendor/updateinfo.png"/>
  123. 编辑
  124. </div>
  125. </div>
  126. <ul class="infoul infoul2">
  127. <li class="clearfix" :class="{noupdate: storeState !== 'look'}">
  128. <div class="name pull-left" :class="{update: storeState !== 'look'}" >企业名称:</div>
  129. <div class="text pull-left" :class="{update: storeState !== 'look'}">
  130. {{enterpriseInfo.enName || '-'}}
  131. </div>
  132. </li>
  133. <li class="clearfix" :class="{noupdate: storeState !== 'look', border: storeState !== 'look'}">
  134. <div class="name pull-left" :class="{update: storeState !== 'look'}">营业执照号:</div>
  135. <div class="text pull-left" :class="{update: storeState !== 'look'}">
  136. {{enterpriseInfo.enBussinessCode || '-'}}
  137. </div>
  138. </li>
  139. <li class="clearfix" :class="{border: storeState !== 'look'}">
  140. <div class="name pull-left" :class="{update: storeState !== 'look'}">注册地址:</div>
  141. <div class="text pull-left" v-if="storeState === 'look'">
  142. {{enterpriseInfo.enAddress || '-'}}
  143. </div>
  144. <div v-else class="text pull-left">
  145. <input v-model="enterpriseInfo.enAddress" type="text"/>
  146. </div>
  147. </li>
  148. <li class="clearfix" :class="{border: storeState !== 'look'}">
  149. <div class="name pull-left" :class="{update: storeState !== 'look'}">官网地址:</div>
  150. <div class="text pull-left" v-if="storeState === 'look'">
  151. {{enterpriseInfo.enUrl || '-'}}
  152. </div>
  153. <div v-else class="text pull-left">
  154. <input v-model="enterpriseInfo.enUrl" type="text"/>
  155. </div>
  156. </li>
  157. <li class="clearfix" :class="{border: storeState !== 'look'}">
  158. <div class="name pull-left" :class="{update: storeState !== 'look'}">所属行业:</div>
  159. <div class="text pull-left" v-if="storeState === 'look'">
  160. {{enterpriseInfo.enIndustry || '-'}}
  161. </div>
  162. <div v-else class="text pull-left clearfix">
  163. <input v-model="enterpriseInfo.enIndustry" type="text" style="width: 4.5rem"/>
  164. <div class="moreIcon pull-right" @click="isShowTypeAlert = true">
  165. <img src="/images/store/default/moreicon.png" @click="isShowTypeAlert = true"/>
  166. </div>
  167. </div>
  168. </li>
  169. <li class="clearfix" :class="{border: storeState !== 'look'}">
  170. <div class="name pull-left" :class="{update: storeState !== 'look'}" style="margin-top: 0.04rem;">经营范围:</div>
  171. <div class="text pull-left" v-if="storeState === 'look'" >
  172. <span v-for="item in scopeLabel" class="label">
  173. {{item}}
  174. </span>
  175. <span class="text pull-left nolabel" v-if="scopeLabel.length == 0">
  176. 无标签信息
  177. </span>
  178. </div>
  179. <div v-else class="text pull-left">
  180. <label v-for="item in scopeLabel" class="labelKuang" v-show="AddBtnShow">
  181. <span class="Updatelabel">
  182. {{item}}
  183. </span>
  184. <span class="updatespan"@click="addBtn(item)">编辑</span>
  185. </label>
  186. <span class="addBtn" v-show="AddBtnShow" @click="addBtn()"></span>
  187. <div class="commit" v-show="!AddBtnShow">
  188. <input type="text" placeholder="请输入不大于10个字符" class="inputText" v-model="labelText"/>
  189. <button @click="saveLabel()">确定</button>
  190. </div>
  191. </div>
  192. </li>
  193. </ul>
  194. <template v-if="storeState === 'look'">
  195. <div class="topinfo clearfix" style="color: #999;border-top: 1px solid #d9d9d9;background: #fafafa">
  196. 个人信息
  197. </div>
  198. <ul class="infoul infoul2" style="color: #999;background: #fafafa">
  199. <li class="clearfix">
  200. <div class="name pull-left">用户名:</div>
  201. <div class="text pull-left">
  202. {{userInfo.userName || '-'}}
  203. </div>
  204. </li>
  205. <li class="clearfix">
  206. <div class="name pull-left">邮箱:</div>
  207. <div class="text pull-left">
  208. {{userInfo.userEmail || '-'}}
  209. </div>
  210. </li>
  211. <li class="clearfix">
  212. <div class="name pull-left">手机:</div>
  213. <div class="text pull-left">
  214. {{userInfo.userTel || '-'}}
  215. </div>
  216. </li>
  217. </ul>
  218. <div class="topinfo clearfix" style="color: #999;border-top: 1px solid #d9d9d9;background: #fafafa">
  219. 管理员信息
  220. </div>
  221. <ul class="infoul infoul2" style="color: #999;background: #fafafa">
  222. <li class="clearfix">
  223. <div class="name pull-left">姓名:</div>
  224. <div class="text pull-left">
  225. {{admininfo.userName || '-'}}
  226. </div>
  227. </li>
  228. <li class="clearfix">
  229. <div class="name pull-left">手机号:</div>
  230. <div class="text pull-left">
  231. {{admininfo.userTel || '-'}}
  232. </div>
  233. </li>
  234. <li class="clearfix">
  235. <div class="name pull-left">邮箱:</div>
  236. <div class="text pull-left">
  237. {{admininfo.userEmail || '-'}}
  238. </div>
  239. </li>
  240. </ul>
  241. </template>
  242. <div class="control clearfix">
  243. <div class="cancel" @click="storeInfosave('cancel')" v-if="storeState !== 'look'">取消</div>
  244. <div class="save" @click="storeInfosave()" v-if="storeState !== 'look'">保存</div>
  245. </div>
  246. </template>
  247. <!-- /end 账户管理 -->
  248. <!-- 选择行业弹窗 -->
  249. <div class="mobile-modal" v-show="isShowTypeAlert">
  250. <div class="modal-content">
  251. <div class="content-title">
  252. 所属行业
  253. <i class="el-icon-close" @click="isShowTypeAlert = false"></i>
  254. </div>
  255. <div class="content-title-label clearfix" >
  256. <div v-for="(item, index) in ContentTitleArray" @click="chooseTitle(index)">
  257. <a>{{item}}</a>
  258. </div>
  259. </div>
  260. <div class="content-info" v-if="TypeListShow.firstListShow">
  261. <div v-for="(item, index) in TypeList.firstList" class="content-info-item" :class="{active: index === TypeListActive.firstListActive}" @click="chooseItem('firstList', item, index)" >
  262. {{item}}<img src="/images/mobile/@2x/getlabel_icon.png" v-show="index === TypeListActive.firstListActive"/>
  263. </div>
  264. </div>
  265. <div class="content-info" v-if="TypeListShow.secondsListShow">
  266. <div v-for="(item, index) in TypeList.secondsList" class="content-info-item" :class="{active: index === TypeListActive.secondsListActive}" @click="chooseItem('secondsList', item, index)" >
  267. {{item}}
  268. <img src="/images/mobile/@2x/getlabel_icon.png" v-show="index === TypeListActive.secondsListActive"/>
  269. </div>
  270. </div>
  271. <div class="content-info" v-if="TypeListShow.threetListShow">
  272. <div v-for="(item, index) in TypeList.threetList" class="content-info-item" :class="{active: index === TypeListActive.threetListActive}" @click="chooseItem('threetList', item, index)" >
  273. {{item}}
  274. <img src="/images/mobile/@2x/getlabel_icon.png" v-show="index === TypeListActive.threetListActive"/>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. <!-- /end 选择行业弹窗 -->
  280. <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
  281. <!--<loading v-show="isSearchSearchingMore"></loading>-->
  282. <div v-if="enterprise && false"></div>
  283. </div>
  284. </template>
  285. <script>
  286. import { userHeader, RemindBox, Loading } from '~components/mobile/common'
  287. export default {
  288. layout: 'mobile',
  289. middleware: 'authenticated',
  290. data () {
  291. return {
  292. activeType: 'store',
  293. splitText: '', // 省略号文本
  294. normalText: '', // 原来文本
  295. Islook: true,
  296. storeState: 'look',
  297. admininfo: {}, // 管理员信息
  298. AddBtnShow: true,
  299. labelText: '',
  300. scopeLabel: [],
  301. ContentTitleArray: [], // 行业数组
  302. isSearchSearchingMore: false,
  303. collectResult: '',
  304. timeoutCount: 0,
  305. isShowTypeAlert: false, // 是否现在所属行业弹窗
  306. TypeList: {
  307. firstList: [],
  308. secondsList: [],
  309. threetList: []
  310. },
  311. TypeListActive: {
  312. firstListActive: '',
  313. secondsListActive: '',
  314. threetListActive: ''
  315. },
  316. TypeListShow: {
  317. firstListShow: true,
  318. secondsListShow: false,
  319. threetListShow: false
  320. },
  321. TypeObj: {},
  322. enterpriseInfo: {},
  323. hidelook: true
  324. }
  325. },
  326. components: {
  327. userHeader,
  328. RemindBox,
  329. Loading
  330. },
  331. fetch ({ store, route }) {
  332. return Promise.all([
  333. store.dispatch('loadStoreStatus', { op: 'check' })
  334. ])
  335. // let user = store.state.option.user.data
  336. },
  337. mounted: function () {
  338. this.$nextTick(() => {
  339. this.$http.get('/data/profession.json').then(response => {
  340. this.TypeObj = response.data
  341. for (let i of Object.keys(response.data)) {
  342. this.TypeList.firstList.push(i)
  343. }
  344. })
  345. })
  346. },
  347. computed: {
  348. getRemindText: function () {
  349. return '您的账户暂未开通卖家中心,请前往pc端申请开通!'
  350. },
  351. storeInfo() {
  352. let str = JSON.stringify(this.$store.state.option.storeStatus.data)
  353. return JSON.parse(str)
  354. },
  355. enterprise() {
  356. // return this.$store.state.supplier.material.enUser.data
  357. let str = JSON.stringify(this.$store.state.supplier.material.enUser.data)
  358. this.enterpriseInfo = JSON.parse(str)
  359. return ''
  360. },
  361. userInfo() {
  362. return this.$store.state.option.user.data
  363. }
  364. },
  365. methods: {
  366. chooseTitle(key) {
  367. if (key === 0) {
  368. this.TypeListShow = {
  369. firstListShow: true,
  370. secondsListShow: false,
  371. threetListShow: false
  372. }
  373. } else if (key === 1) {
  374. this.TypeListShow = {
  375. firstListShow: false,
  376. secondsListShow: true,
  377. threetListShow: false
  378. }
  379. } else if (key === 2) {
  380. this.TypeListShow = {
  381. firstListShow: false,
  382. secondsListShow: true,
  383. threetListShow: false
  384. }
  385. }
  386. },
  387. chooseItem(listIndex, key, index) {
  388. if (listIndex === 'firstList') {
  389. this.TypeListActive.firstListActive = index
  390. this.ContentTitleArray[0] = key
  391. this.TypeList.secondsList = []
  392. if (this.TypeObj[key] instanceof Array) {
  393. this.TypeList.secondsList = this.TypeObj[key]
  394. } else {
  395. for (let i of Object.keys(this.TypeObj[key])) {
  396. this.TypeList.secondsList.push(i)
  397. }
  398. }
  399. this.TypeListShow = {
  400. firstListShow: false,
  401. secondsListShow: true,
  402. threetListShow: false
  403. }
  404. this.TypeListActive.secondsListActive = ''
  405. this.TypeListActive.threetListActive = ''
  406. for (let i = 1; i < this.ContentTitleArray.length; i++) {
  407. this.ContentTitleArray.splice(i, 1)
  408. }
  409. } else if (listIndex === 'secondsList') {
  410. this.TypeList.threetList = []
  411. this.TypeListActive.secondsListActive = index
  412. this.TypeListActive.threetListActive = ''
  413. this.ContentTitleArray[1] = key
  414. if (this.TypeObj[this.ContentTitleArray[0]][key] instanceof Array) {
  415. this.TypeList.threetList = this.TypeObj[this.ContentTitleArray[0]][key] ? this.TypeObj[this.ContentTitleArray[0]][key] : []
  416. }
  417. for (let i = 2; i < this.ContentTitleArray.length; i++) {
  418. this.ContentTitleArray.splice(i, 1)
  419. }
  420. if (this.TypeList.threetList.length > 0) {
  421. this.TypeListShow = {
  422. firstListShow: false,
  423. secondsListShow: false,
  424. threetListShow: true
  425. }
  426. } else {
  427. this.enterpriseInfo.enIndustry = key
  428. this.isShowTypeAlert = false
  429. this.TypeListShow = {
  430. firstListShow: true,
  431. secondsListShow: false,
  432. threetListShow: false
  433. }
  434. }
  435. } else if (listIndex === 'threetList') {
  436. this.TypeListActive.threetListActive = index
  437. this.ContentTitleArray[2] = key
  438. this.enterpriseInfo.enIndustry = key
  439. this.isShowTypeAlert = false
  440. this.TypeListShow = {
  441. firstListShow: true,
  442. secondsListShow: false,
  443. threetListShow: false
  444. }
  445. }
  446. },
  447. addBtn(text) {
  448. if (text !== undefined) {
  449. this.labelText = text
  450. this.IsChange = text
  451. }
  452. this.AddBtnShow = false
  453. },
  454. saveLabel() {
  455. this.AddBtnShow = true
  456. if (this.labelText === '') {
  457. return false
  458. }
  459. if (this.IsChange !== '') {
  460. let ms = this.enterpriseInfo.enBusinessScope.split(',')
  461. for (let j = 0; j < ms.length; j++) {
  462. if (ms[j].trim() === this.IsChange) {
  463. ms[j] = this.labelText
  464. }
  465. }
  466. this.enterpriseInfo.enBusinessScope = ms.join(',')
  467. } else {
  468. if (this.enterpriseInfo.enBusinessScope.trim() === '') {
  469. this.enterpriseInfo.enBusinessScope += this.labelText
  470. } else {
  471. this.enterpriseInfo.enBusinessScope += ',' + this.labelText
  472. }
  473. }
  474. this.labelText = ''
  475. this.IsChange = ''
  476. this.scopeLabel = this.enterpriseInfo.enBusinessScope.split(',')
  477. // this.enterpriseInfo.enBusinessScope.push(this.labelText)
  478. },
  479. swtichTab(_tp) {
  480. this.activeType = _tp
  481. this.storeState = 'look'
  482. this.isSearchSearchingMore = true
  483. this.updateEnterpriseInfo()
  484. },
  485. updateEnterpriseInfo() {
  486. this.hidelook = true
  487. this.Islook = true
  488. this.admininfo = {}
  489. this.$store.dispatch('supplier/loadEnUser', {enUU: this.storeInfo.enUU, filter: 'enUU'}).then(() => {
  490. this.scopeLabel = this.enterpriseInfo.enBusinessScope ? this.enterpriseInfo.enBusinessScope.split(',') : []
  491. this.$http.get(`/basic/user/getUserByUU?uu=${this.enterpriseInfo.enAdminuu}`).then(res => {
  492. this.admininfo = res.data
  493. this.isSearchSearchingMore = false
  494. })
  495. })
  496. },
  497. updateInfo() {
  498. this.storeState = 'update'
  499. },
  500. dealWithText2(tp) {
  501. if (tp === 'open') {
  502. this.Islook = false
  503. this.hidelook = false
  504. } else {
  505. this.Islook = true
  506. this.hidelook = true
  507. }
  508. },
  509. dealWithText(_T) {
  510. if (_T) {
  511. // 文本处理
  512. this.normalText = _T
  513. if (_T.length < 140) {
  514. this.Islook = false
  515. return _T
  516. } else {
  517. this.Islook = true
  518. return _T.substr(0, 140) + '...'
  519. }
  520. } else {
  521. this.Islook = false
  522. return this.normalText
  523. }
  524. },
  525. scroll: function () {
  526. // let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
  527. if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
  528. this.$refs.searchSeekInput.blur()
  529. }
  530. },
  531. blur: function() {
  532. setTimeout(() => {
  533. this.$store.dispatch('mobile/SetInputGetFocus', false)
  534. }, 300)
  535. },
  536. inputGetFocus: function() {
  537. setTimeout(() => {
  538. this.$store.dispatch('mobile/SetInputGetFocus', true)
  539. }, 300)
  540. },
  541. storeInfosave(_tp) {
  542. if (_tp === 'cancel') {
  543. this.storeState = 'look'
  544. return
  545. }
  546. if (this.activeType === 'store') {
  547. let kay = {
  548. description: this.storeInfo.description,
  549. enterprise: this.storeInfo.enterprise,
  550. storeName: this.storeInfo.storeName,
  551. storeShortName: this.storeInfo.storeShortName
  552. }
  553. this.$http.put(`/store-service/stores/${this.storeInfo.uuid}?kind=BASIC_INFO`, kay).then(res => {
  554. this.collectResult = '保存成功'
  555. this.timeoutCount++
  556. this.storeState = 'look'
  557. })
  558. } else {
  559. this.$http.post(`/basic/enterprise/${this.storeInfo.enUU}/updateInfo`, this.enterpriseInfo).then(res => {
  560. this.collectResult = '保存成功'
  561. this.timeoutCount++
  562. this.storeState = 'look'
  563. }).catch(err => {
  564. this.collectResult = err.response.data
  565. this.timeoutCount++
  566. let str = JSON.stringify(this.$store.state.supplier.material.enUser.data)
  567. this.enterpriseInfo = JSON.parse(str)
  568. })
  569. }
  570. }
  571. }
  572. }
  573. </script>
  574. <style scoped lang="scss">
  575. .user-content{
  576. margin-bottom: 0rem;
  577. padding-bottom: 1.4rem;
  578. ul.switch-list {
  579. li {
  580. display: inline-block;
  581. width: 50%;
  582. height: .63rem;
  583. line-height: .63rem;
  584. text-align: center;
  585. font-size: .28rem;
  586. color: #666;
  587. background: #fff;
  588. border: 1px solid #b4b4b4;
  589. border-right: none;
  590. &.active {
  591. background: #0067e7;
  592. border: 1px solid #0067e7;
  593. color: #fff;
  594. }
  595. &:first-child {
  596. border-left: none;
  597. }
  598. &:last-child {
  599. border-right: none;
  600. }
  601. }
  602. &.vendor-switch {
  603. li {
  604. width: 50%;
  605. }
  606. }
  607. }
  608. .topinfo {
  609. color: #333;
  610. font-size: 0.28rem;
  611. height: 0.8rem;
  612. line-height: 0.8rem;
  613. padding: 0 0.24rem;
  614. border-bottom: 0.01rem solid #d9d9d9;
  615. .pull-right {
  616. color: #999;
  617. font-size: 0.26rem;
  618. img {
  619. width: 0.34rem;
  620. height: 0.34rem;
  621. }
  622. }
  623. }
  624. .infoul {
  625. .upload {
  626. img {
  627. transform: rotate(180deg);
  628. }
  629. }
  630. color: #666;
  631. font-size: 0.28rem;
  632. li {
  633. padding: 0.15rem 0.05rem;
  634. line-height: 1.3;
  635. &.border {
  636. border-bottom: 0.01rem solid #d9d9d9;
  637. }
  638. &.noupdate {
  639. background: #fafafa;
  640. color: #999;
  641. }
  642. }
  643. .name {
  644. width: 1.6rem;
  645. text-align: right;
  646. }
  647. .text {
  648. width: 5.4rem;
  649. }
  650. .update {
  651. padding: 0.06rem 0 0.06rem 0rem;
  652. }
  653. input {
  654. width: 5.4rem;
  655. border: 0px solid #b4b4b4;
  656. padding: 0.06rem 0 0.06rem 0.12rem;
  657. }
  658. textarea{
  659. width: 5.4rem;
  660. padding: 0.06rem 0 0.06rem 0.12rem;
  661. min-height: 5rem;
  662. resize: none;
  663. border: 0px solid #b4b4b4;
  664. }
  665. }
  666. .control {
  667. width: 90%;
  668. margin: 0.15rem auto 0.4rem;
  669. height: .88rem;
  670. line-height: 0.88rem;
  671. }
  672. .save {
  673. border-radius: 3px;
  674. width: 48%;
  675. color: #fff;
  676. text-align: center;
  677. height: .88rem;
  678. line-height: 0.88rem;
  679. background: #3e82f5;
  680. float: right;
  681. }
  682. .cancel {
  683. border-radius: 3px;
  684. width: 48%;
  685. background: #acabab;
  686. color: #fff;
  687. text-align: center;
  688. height: .88rem;
  689. line-height: 0.88rem;
  690. float: left;
  691. }
  692. .infoul2 {
  693. .name {
  694. width: 1.7rem;
  695. }
  696. .text {
  697. width: 5.3rem;
  698. }
  699. input {
  700. width: 5.3rem;
  701. }
  702. .nolabel {
  703. position: relative;
  704. width: auto;
  705. text-align: center;
  706. color: #666;
  707. font-size: 0.24rem;
  708. display: inline-block;
  709. vertical-align: top;
  710. padding: 2px 4px;
  711. margin: 0.02rem 3px 0px;
  712. background: #f2f3f7;
  713. border-radius: 5px;
  714. }
  715. .label {
  716. width: auto;
  717. padding: 2px 4px;
  718. margin: 0.08rem 3px 0 3px;
  719. background: #5078cb;
  720. border-radius: 5px;
  721. text-align: center;
  722. color: #fff;
  723. font-size: 0.24rem;
  724. display: inline-block;
  725. vertical-align: top;
  726. }
  727. .labelKuang {
  728. background: #fff;
  729. border: 1px solid #b4b4b4;
  730. border-radius: 3px;
  731. overflow: hidden;
  732. height: 0.53rem;
  733. line-height: 0.53rem;
  734. display: inline-block;
  735. vertical-align: top;
  736. margin: 0px 3px 3px 3px;
  737. font-size: 0px;
  738. }
  739. .Updatelabel {
  740. padding: 0 4px;
  741. color: #666;
  742. font-size: 0.26rem;
  743. height: 100%;
  744. display: inline-block;
  745. vertical-align: top;
  746. }
  747. .updatespan {
  748. background: #353535;
  749. color: #fff;
  750. font-size: 0.26rem;
  751. padding:0 2px;
  752. height: 100%;
  753. display: inline-block;
  754. vertical-align: top;
  755. }
  756. .addBtn {
  757. background-image: url('/images/mobile/@2x/addBtn.png');
  758. background-size: 100% 100%;
  759. width: 1.4rem;
  760. height: 0.54rem;
  761. display: inline-block;
  762. vertical-align: middle;
  763. }
  764. .commit {
  765. }
  766. .inputText {
  767. width: 4.4rem;
  768. border-top-left-radius: 3px;
  769. border-bottom-left-radius: 3px;
  770. border: 1px solid #b4b4b4;
  771. height: 0.62rem;
  772. line-height: 0.62rem;
  773. vertical-align: top;
  774. display: inline-block;
  775. }
  776. button {
  777. display: inline-block;
  778. height: 0.62rem;
  779. width: 0.8rem;
  780. line-height: 0.62rem;
  781. font-size: 14px;
  782. font-weight: 400;
  783. text-align: center;
  784. background-color: #3f84f6;
  785. border: 1px solid #3f84f6;
  786. color: #fff;
  787. border-top-right-radius: 3px;
  788. border-bottom-right-radius: 3px;
  789. vertical-align: top;
  790. margin-left: -0.1rem;
  791. }
  792. .moreIcon {
  793. margin-top: 0.06rem;
  794. position: relative;
  795. img {
  796. width: 0.17rem;
  797. height: 0.3rem;
  798. }
  799. &:after {
  800. position: absolute;
  801. left: -10px;
  802. right: -10px;
  803. top: -10px;
  804. bottom: -10px;
  805. content: ' '
  806. }
  807. }
  808. }
  809. .modal-content {
  810. position: absolute;
  811. height: 10rem;
  812. bottom: 0px;
  813. left: 0px;
  814. background: #fff;
  815. width: 100%;
  816. border-radius: 0px;
  817. box-shadow: 0 -9px 9px rgba(0,0,0,.5);
  818. .content-title {
  819. color: #666;
  820. font-size: .3rem;
  821. text-align: center;
  822. height: 1rem;
  823. line-height: 1rem;
  824. position: relative;
  825. i {
  826. font-size: 0.3rem;
  827. color: #999;
  828. position: absolute;
  829. right: 0.3rem;
  830. top: 50%;
  831. margin-top: -0.15rem;
  832. }
  833. }
  834. .content-title-label {
  835. color: #3f84f6;
  836. font-size: 0.28rem;
  837. height: 0.5rem;
  838. line-height: 0.5rem;
  839. border-bottom: 0.01rem solid #999;
  840. div {
  841. width: 33.3%;
  842. float: left;
  843. text-align: center;
  844. a {
  845. height: 0.5rem;
  846. line-height: 0.5rem;
  847. color: #3f84f6 !important;
  848. border-bottom: 0.01rem solid #3f84f6;
  849. display: inline-block;
  850. width: 80%;
  851. overflow: hidden;
  852. text-overflow: ellipsis;
  853. white-space: nowrap;
  854. }
  855. }
  856. }
  857. .content-info {
  858. overflow-y: auto;
  859. height: 8.5rem;
  860. width: 100%;
  861. .content-info-item {
  862. height: 0.86rem;
  863. line-height: 0.86rem;
  864. color: #333;
  865. font-size: 0.28rem;
  866. padding-left: 0.3rem;
  867. &.active {
  868. color: #3f84f6 !important
  869. }
  870. img {
  871. width: 0.3rem;
  872. height: 0.18rem;
  873. margin-left: 0.3rem;
  874. }
  875. }
  876. }
  877. }
  878. .none-state{
  879. text-align: center;
  880. padding:1.5rem 0;
  881. background: #fff;
  882. margin-top:.1rem;
  883. width:100%;
  884. img{
  885. margin:0 auto;
  886. width: 4.08rem;
  887. height: 2.62rem;
  888. }
  889. p {
  890. font-size: .32rem;
  891. color: #999;
  892. margin: 1.19rem 0 0 0;
  893. }
  894. a {
  895. display: block;
  896. font-size: .28rem;
  897. color: #fff;
  898. width: 1.88rem;
  899. height: .54rem;
  900. line-height: .54rem;
  901. background: #418bf6;
  902. margin: .7rem auto 0;
  903. border-radius: .05rem;
  904. }
  905. }
  906. }
  907. </style>