detail.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-rich-text');
  4. ComponentHelper::loadComponentView('com-dialog-select');
  5. ComponentHelper::loadComponentView('com-qq-map');
  6. ComponentHelper::loadComponentView('com-dialog-screen-select');
  7. ?>
  8. <div id="app" v-cloak>
  9. <el-card v-loading="loading" style="border:0" shadow="never" body-style="background-color: #f3f3f3;padding: 0 0;">
  10. <el-tabs v-model="activeName" @tab-click="handleClick">
  11. <el-tab-pane label="基本信息" name="basic_setting">
  12. <?php ComponentHelper::loadComponentView('detail-basic', __DIR__ . '/');
  13. ?>
  14. </el-tab-pane>
  15. </el-tabs>
  16. </el-card>
  17. </div>
  18. <script>
  19. const app = new Vue({
  20. el: '#app',
  21. data() {
  22. return {
  23. store_id: 0,
  24. loading: false,
  25. activeName: 'basic_setting',
  26. basicForm: {
  27. goods_auth: 0,
  28. service_fee: 0,
  29. settle_type: 0,
  30. platform_ratio: 0,
  31. risk_management: 0,
  32. risk_management_ratio: 0,
  33. settle_scene: 1,
  34. store_distribution_status: 0,
  35. store_agent_status: 0,
  36. store_area_status: 0,
  37. store_boss_status: 0,
  38. payment_settlement_type: 0,
  39. address: '',
  40. province_id: '',
  41. city_id: '',
  42. district_id: '',
  43. street_id: '',
  44. community_id: ''
  45. },
  46. statisticsData: { // 基础信息数据统计对象
  47. 'total_money': '累计收入',
  48. 'balance': '当前余额',
  49. 'unsettled_amount': '累计提现',
  50. 'user_nums': '小店用户数',
  51. 'good_counts': '商品数',
  52. 'total_order_number': '订单支付数',
  53. },
  54. };
  55. },
  56. mounted: function() {
  57. this.store_id = getQuery('store_id');
  58. this.loadData();
  59. },
  60. computed: {
  61. show_clear_search_btn: function() {
  62. return !isEmpty(this.search_data.cats) || !isEmpty(this.search_data.start) ||
  63. !isEmpty(this.search_data.end) || !isEmpty(this.search_data.goods_id) ||
  64. !isEmpty(this.search_data.goods_name);
  65. }
  66. },
  67. methods: {
  68. changeTime(e) {
  69. // console.log(e)
  70. this.search_data.start = e[0]
  71. this.search_data.end = e[1]
  72. },
  73. clearSearch() {
  74. this.search_data.cats = [];
  75. this.search_data.start = null;
  76. this.search_data.end = null;
  77. this.search_data.goods_id = null;
  78. this.search_data.goods_name = null;
  79. this.datetime = [];
  80. this.getList();
  81. },
  82. loadData() {
  83. let self = this;
  84. this.loading = true;
  85. request({
  86. params: {
  87. r: 'happiness/store/detail',
  88. store_id: self.store_id,
  89. },
  90. method: 'get'
  91. }).then(e => {
  92. self.loading = false;
  93. if (e.data.code === 0) {
  94. self.provinces = e.data.data.provinces;
  95. //赋予初始值
  96. if (e.data.data.basic_setting) {
  97. self.basicForm = e.data.data.basic_setting;
  98. if (1 == e.data.data.basic_setting.status) {
  99. this.isDisable = false;
  100. } else {
  101. this.isDisable = true;
  102. }
  103. }
  104. if (e.data.data.store_setting) {
  105. e.data.data.store_setting.status=0;
  106. self.storeForm = {...self.storeForm, ...e.data.data.store_setting};
  107. self.times = [e.data.data.store_setting.business_time_start, e.data.data.store_setting.business_time_end];
  108. }
  109. self.system_setting = e.data.data.configs;
  110. if (Object.keys(e.data.data.configs).length > 0 && self.storeForm.intra_city_distribution.is_alone == 0) {
  111. self.storeForm.intra_city_distribution.distribution_scope = e.data.data.configs.localtion_limit;
  112. self.storeForm.intra_city_distribution.delivery_fee = e.data.data.configs.delivery_fee;
  113. self.storeForm.intra_city_distribution.initial_delivery_amount = e.data.data.configs.delivery_amount;
  114. self.storeForm.intra_city_distribution.distance = e.data.data.configs.start_limit;
  115. self.storeForm.intra_city_distribution.distance_charge = e.data.data.configs.start_amount;
  116. self.storeForm.intra_city_distribution.every_distance = e.data.data.configs.add_limit;
  117. self.storeForm.intra_city_distribution.every_distance_charge = e.data.data.configs.add_amount;
  118. }
  119. } else {
  120. self.$message.error(e.data.msg);
  121. }
  122. }).catch(e => {
  123. // console.log(e);
  124. self.$message.error('网络错误');
  125. });
  126. },
  127. },
  128. });
  129. </script>
  130. <style>
  131. .grid-box {
  132. padding: 0 40px;
  133. background: #fff;
  134. border-radius: 0 0 4px 4px;
  135. }
  136. .grid-item {
  137. height: 130px;
  138. }
  139. .grid-text {
  140. font-size: 15px;
  141. }
  142. .grid-val {
  143. font-size: 20px;
  144. padding-top: 10px;
  145. }
  146. .grid-icon {
  147. color: #999;
  148. cursor: pointer;
  149. font-size: 18px;
  150. }
  151. .store-card {
  152. margin-top: 15px;
  153. }
  154. .store-card.el-card {
  155. border: 0;
  156. }
  157. .store-card-body .store-name {
  158. padding-left: 10px;
  159. }
  160. .store-card-body .el-descriptions__body {
  161. padding: 20px 40px;
  162. }
  163. .store-send-code {
  164. padding-left: 10px;
  165. font-size: 12px;
  166. cursor: pointer;
  167. }
  168. .el-tabs__header {
  169. padding: 0 20px;
  170. height: 56px;
  171. line-height: 56px;
  172. background-color: #fff;
  173. margin-bottom: 0;
  174. }
  175. .title {
  176. padding: 0px 8px;
  177. border-left: 5px solid #1479F0;
  178. background-color: #fff;
  179. font-size: 18px;
  180. position: relative;
  181. left: 32px;
  182. margin: 20px 0;
  183. }
  184. .form-body {
  185. background-color: #fff;
  186. padding: 20px 50% 20px 0;
  187. }
  188. .button-item {
  189. padding: 9px 25px;
  190. margin-bottom: 15px;
  191. }
  192. .form-body .item {
  193. width: 300px;
  194. margin-bottom: 50px;
  195. margin-right: 25px;
  196. }
  197. .item-img {
  198. height: 550px;
  199. padding: 25px 10px;
  200. border-radius: 30px;
  201. border: 1px solid #CCCCCC;
  202. background-color: #fff;
  203. }
  204. .item .el-form-item {
  205. width: 300px;
  206. margin: 20px auto;
  207. }
  208. .left-setting-menu {
  209. width: 260px;
  210. }
  211. .left-setting-menu .el-form-item {
  212. height: 60px;
  213. padding-left: 20px;
  214. display: flex;
  215. align-items: center;
  216. margin-bottom: 0;
  217. cursor: pointer;
  218. }
  219. .left-setting-menu .el-form-item .el-form-item__label {
  220. cursor: pointer;
  221. }
  222. .left-setting-menu .el-form-item.active {
  223. background-color: #F3F5F6;
  224. border-top-left-radius: 10px;
  225. width: 105%;
  226. border-bottom-left-radius: 10px;
  227. }
  228. .left-setting-menu .el-form-item .el-form-item__content {
  229. margin-left: 0 !important
  230. }
  231. .no-radius {
  232. border-top-left-radius: 0 !important;
  233. }
  234. .reset {
  235. position: absolute;
  236. top: 3px;
  237. left: 90px;
  238. }
  239. .app-tip {
  240. position: absolute;
  241. right: 24px;
  242. top: 16px;
  243. height: 72px;
  244. line-height: 72px;
  245. max-width: calc(100% - 78px);
  246. }
  247. .app-tip:before {
  248. content: ' ';
  249. width: 0;
  250. height: 0;
  251. border-color: inherit;
  252. position: absolute;
  253. top: -32px;
  254. right: 100px;
  255. border-width: 16px;
  256. border-style: solid;
  257. }
  258. .tip-content {
  259. display: block;
  260. white-space: nowrap;
  261. width: 100%;
  262. overflow: hidden;
  263. text-overflow: ellipsis;
  264. margin: 0 28px;
  265. font-size: 28px;
  266. }
  267. .btn-abs {
  268. position: absolute;
  269. top: 12px;
  270. right: 18px;
  271. }
  272. .form-body .app-share {
  273. padding-top: 12px;
  274. border-top: 1px solid #e2e2e2;
  275. margin-top: -20px;
  276. }
  277. .form-body .app-share .app-share-bg {
  278. position: relative;
  279. width: 310px;
  280. height: 360px;
  281. background-repeat: no-repeat;
  282. background-size: contain;
  283. background-position: center
  284. }
  285. .form-body .app-share .app-share-bg .title {
  286. width: 160px;
  287. height: 29px;
  288. line-height: 1;
  289. word-break: break-all;
  290. text-overflow: ellipsis;
  291. display: -webkit-box;
  292. -webkit-box-orient: vertical;
  293. -webkit-line-clamp: 2;
  294. overflow: hidden;
  295. }
  296. .form-body .app-share .app-share-bg .pic-image {
  297. background-repeat: no-repeat;
  298. background-position: 0 0;
  299. background-size: cover;
  300. width: 160px;
  301. height: 130px;
  302. }
  303. .cashier-tabs .el-tabs__header {
  304. padding: 0;
  305. height: 45px;
  306. line-height: 45px;
  307. /* background-color: #F5F7FA; */
  308. margin-bottom: 0;
  309. }
  310. .cashier-tabs .el-tabs__item {
  311. height: 43px;
  312. line-height: 43px;
  313. }
  314. .cashier-tabs .el-tabs__content {
  315. margin-top: 20px;
  316. }
  317. .form-body {
  318. background-color: #fff;
  319. padding: 20px 50% 20px 0;
  320. }
  321. .button-item {
  322. margin-top: 12px;
  323. padding: 9px 25px;
  324. }
  325. .form-body .item {
  326. width: 300px;
  327. margin-bottom: 50px;
  328. margin-right: 25px;
  329. }
  330. .item-img {
  331. height: 550px;
  332. padding: 25px 10px;
  333. border-radius: 30px;
  334. border: 1px solid #CCCCCC;
  335. background-color: #fff;
  336. }
  337. .item .el-form-item {
  338. width: 300px;
  339. margin: 20px auto;
  340. }
  341. .left-setting-menu {
  342. width: 260px;
  343. }
  344. .left-setting-menu .el-form-item {
  345. height: 60px;
  346. padding-left: 20px;
  347. display: flex;
  348. align-items: center;
  349. margin-bottom: 0;
  350. cursor: pointer;
  351. }
  352. .left-setting-menu .el-form-item .el-form-item__label {
  353. cursor: pointer;
  354. }
  355. .left-setting-menu .el-form-item.active {
  356. background-color: #F3F5F6;
  357. border-top-left-radius: 10px;
  358. width: 105%;
  359. border-bottom-left-radius: 10px;
  360. }
  361. .left-setting-menu .el-form-item .el-form-item__content {
  362. margin-left: 0 !important
  363. }
  364. .no-radius {
  365. border-top-left-radius: 0 !important;
  366. }
  367. .del-btn {
  368. position: absolute;
  369. right: -8px;
  370. top: -8px;
  371. padding: 4px 4px;
  372. }
  373. .reset {
  374. position: absolute;
  375. top: 3px;
  376. left: 90px;
  377. }
  378. .app-tip {
  379. position: absolute;
  380. right: 24px;
  381. top: 16px;
  382. height: 72px;
  383. line-height: 72px;
  384. max-width: calc(100% - 78px);
  385. }
  386. .app-tip:before {
  387. content: ' ';
  388. width: 0;
  389. height: 0;
  390. border-color: inherit;
  391. position: absolute;
  392. top: -32px;
  393. right: 100px;
  394. border-width: 16px;
  395. border-style: solid;
  396. }
  397. .tip-content {
  398. display: block;
  399. white-space: nowrap;
  400. width: 100%;
  401. overflow: hidden;
  402. text-overflow: ellipsis;
  403. margin: 0 28px;
  404. font-size: 28px;
  405. }
  406. .add-image-btn {
  407. width: 100px;
  408. height: 100px;
  409. color: #419EFB;
  410. border: 1px solid #e2e2e2;
  411. cursor: pointer;
  412. }
  413. .addon-no-install {
  414. margin-top: 15px;
  415. margin-left: 40px;
  416. }
  417. .desc-container {
  418. padding: 20px;
  419. }
  420. .el-descriptions__body {
  421. color: #606266;
  422. background-color: #FFF;
  423. padding: 40px;
  424. }
  425. .el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
  426. line-height: 3;
  427. }
  428. .stat-item-label {
  429. font-size: 18px;
  430. line-height: 3;
  431. /* width: 38%; */
  432. }
  433. .stat-itme-content {
  434. font-size: 18px;
  435. line-height: 3;
  436. }
  437. .delele-img-btn {
  438. position: absolute;
  439. left: 64px;
  440. top: -13px;
  441. }
  442. .goods-box {
  443. position: relative;
  444. left: -104px;
  445. }
  446. .mode-switch-btn {
  447. position: relative;
  448. left: -106px;
  449. }
  450. .mode-switch-box {
  451. margin-bottom: 30px;
  452. }
  453. .form-body {
  454. padding: 10px 20px 20px;
  455. background-color: #fff;
  456. margin-bottom: 30px;
  457. }
  458. </style>