store.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. import request from '@/plugins/request';
  11. /**
  12. *店员列表-获取门店
  13. */
  14. export function staffListInfo(data) {
  15. return request({
  16. url: 'merchant/store_list',
  17. method: 'get',
  18. params: data
  19. });
  20. }
  21. /**
  22. *订单-订单列表
  23. */
  24. export function orderList(data) {
  25. return request({
  26. url: `store/order/list`,
  27. method: 'get',
  28. params: data
  29. });
  30. }
  31. /**
  32. *订单-订单头部数据
  33. */
  34. export function orderChart(data) {
  35. return request({
  36. url: `store/order/chart`,
  37. method: 'get',
  38. params: data
  39. });
  40. }
  41. /**
  42. *订单-获取门店订单头部统计
  43. */
  44. export function orderHeader(data) {
  45. return request({
  46. url: `store/order/header`,
  47. method: 'get'
  48. });
  49. }
  50. /**
  51. *订单-充值订单列表
  52. */
  53. export function orderRecharge(data) {
  54. return request({
  55. url: `store/recharge`,
  56. method: 'get',
  57. params: data
  58. });
  59. }
  60. /**
  61. *订单-付费会员订单列表
  62. */
  63. export function orderVip(data) {
  64. return request({
  65. url: `store/vip_order`,
  66. method: 'get',
  67. params: data
  68. });
  69. }
  70. /**
  71. *订单-获取订单编辑表单
  72. */
  73. export function getOrdeDatas(id) {
  74. return request({
  75. url: `store/order/edit/${id}`,
  76. method: 'get'
  77. });
  78. }
  79. /**
  80. * 订单-获取快递公司
  81. */
  82. export function getExpressData(status) {
  83. return request({
  84. url: `order/express_list?status=` + status,
  85. method: 'get'
  86. })
  87. };
  88. /**
  89. * @description 发送货提交表单
  90. * @param {Number} param data.id {Number} 订单id
  91. * @param {Object} param data.datas {Object} 表单信息
  92. */
  93. export function putDelivery(data) {
  94. return request({
  95. url: `/order/delivery/${data.id}`,
  96. method: 'put',
  97. data: data.datas
  98. });
  99. };
  100. /**
  101. * @description 拆单发送货
  102. * @param {Number} param data.id {Number} 订单id
  103. * @param {Object} param data.datas {Object} 表单信息
  104. */
  105. export function splitDelivery(data) {
  106. return request({
  107. url: `/order/split_delivery/${data.id}`,
  108. method: 'put',
  109. data: data.datas
  110. });
  111. };
  112. /**
  113. * 电子面单模板
  114. * @param {com} data 快递公司编号
  115. */
  116. export function orderExpressTemp(data) {
  117. return request({
  118. url: '/order/express/temp',
  119. method: 'get',
  120. params: data
  121. });
  122. }
  123. /**
  124. * 订单时获取所有配送员列表
  125. */
  126. export function orderDeliveryList() {
  127. return request({
  128. url: '/order/delivery/list',
  129. method: 'get'
  130. });
  131. }
  132. // 面单默认配置信息
  133. export function orderSheetInfo() {
  134. return request({
  135. url: '/order/sheet_info',
  136. method: 'get'
  137. });
  138. }
  139. /**
  140. * @description 获取订单可拆分商品列表
  141. * @param {Object} param data {Object} 传值参数
  142. */
  143. export function splitCartInfo(id) {
  144. return request({
  145. url: `order/split_cart_info/${id}`,
  146. method: 'get'
  147. })
  148. };
  149. /**
  150. * @description 配送信息表单
  151. * @param {Number} param id {Number} 订单id
  152. */
  153. export function getDistribution(id) {
  154. return request({
  155. url: `store/order/distribution/${id}`,
  156. method: 'get'
  157. });
  158. };
  159. /**
  160. * @description 订单号核销
  161. */
  162. export function writeUpdate(id) {
  163. return request({
  164. url: `store/order/write_update/${id}`,
  165. method: 'put'
  166. });
  167. }
  168. /**
  169. * @description 订单物流信息
  170. * @param {Number} param id {Number} 订单id
  171. */
  172. export function getExpress(id) {
  173. return request({
  174. url: `/order/express/${id}`,
  175. method: 'get'
  176. });
  177. };
  178. /**
  179. * @description 订单表单详情数据
  180. * @param {Number} param id {Number} 订单id
  181. */
  182. export function getDataInfo(id) {
  183. return request({
  184. url: `store/order/info/${id}`,
  185. method: 'get'
  186. });
  187. };
  188. /**
  189. * @description 获取订单记录
  190. * @param {Number} param data.id {Number} 订单id
  191. * @param {String} param data.datas {String} 分页参数
  192. */
  193. export function getOrderRecord(data) {
  194. return request({
  195. url: `/order/status/${data.id}`,
  196. method: 'get',
  197. params: data.datas
  198. });
  199. };
  200. /**
  201. * @description 修改备注信息
  202. * @param {Number} param data.id {Number} 订单id
  203. * @param {String} param data.remark {String} 备注信息
  204. */
  205. export function putRemarkData(data) {
  206. return request({
  207. url: `order/remark/${data.id}`,
  208. method: 'put',
  209. data: data.remark
  210. });
  211. };
  212. /**
  213. * @description 修改充值备注信息
  214. * @param {Number} param data.id {Number} 订单id
  215. * @param {String} param data.remark {String} 备注信息
  216. */
  217. export function putRechargeRemarkData(data) {
  218. return request({
  219. url: `store/recharge/remark/${data.id}`,
  220. method: 'put',
  221. data: data.remark
  222. });
  223. };
  224. /**
  225. * @description 修改会员备注信息
  226. * @param {Number} param data.id {Number} 订单id
  227. * @param {String} param data.remark {String} 备注信息
  228. */
  229. export function putVipRemarkData(data) {
  230. return request({
  231. url: `store/vip/remark/${data.id}`,
  232. method: 'put',
  233. data: data.remark
  234. });
  235. };
  236. /**
  237. * @description 子订单列表---拆单
  238. * @param {Object} param data {Object} 传值参数
  239. */
  240. export function splitOrderList(id) {
  241. return request({
  242. url: `order/split_order/${id}`,
  243. method: 'get'
  244. })
  245. };
  246. /**
  247. * @description 售后订单
  248. * @param {Object} param data {Object} 传值参数
  249. */
  250. export function orderRefundList(data) {
  251. return request({
  252. url: 'refund/list',
  253. method: 'get',
  254. params: data
  255. })
  256. };
  257. /**
  258. * @description 获取退款表单数据
  259. * @param {Number} param id {Number} 订单id
  260. */
  261. export function getRefundFrom(id) {
  262. return request({
  263. url: `/order/refund/${id}`,
  264. method: 'get'
  265. });
  266. };
  267. /**
  268. * @description 获取不退款表单数据
  269. * @param {Number} param id {Number} 订单id
  270. */
  271. export function getnoRefund(id) {
  272. return request({
  273. url: `/order/no_refund/${id}`,
  274. method: 'get'
  275. });
  276. };
  277. /**
  278. * @description 获取退积分表单
  279. * @param {Number} param id {Number} 订单id
  280. */
  281. export function refundIntegral(id) {
  282. return request({
  283. url: `/order/refund_integral/${id}`,
  284. method: 'get'
  285. });
  286. };
  287. /**
  288. * @description 导出
  289. */
  290. export function orderExport(data,type) {
  291. return request({
  292. url: `store/order/export/${type}`,
  293. method: 'post',
  294. data
  295. });
  296. }
  297. /**
  298. *门店流水-获取列表
  299. */
  300. export function storeFinanceInfo(data) {
  301. return request({
  302. url: 'store/finance_flow/list',
  303. method: 'get',
  304. params:data
  305. });
  306. }
  307. /**
  308. *门店流水--备注
  309. */
  310. export function storeFinanceMarkApi(id,data) {
  311. return request({
  312. url: `store/finance_flow/mark/${id}`,
  313. method: 'put',
  314. params:data
  315. });
  316. }
  317. /**
  318. *门店流水--获取账单记录列表
  319. */
  320. export function storeFfundRecordApi(data) {
  321. return request({
  322. url: `store/finance_flow/fund_record`,
  323. method: 'get',
  324. params:data
  325. });
  326. }
  327. /**
  328. *门店流水--账单记录列表-账单详情
  329. */
  330. export function storeFfundRecordInfoApi(data) {
  331. return request({
  332. url: `store/finance_flow/fund_record_info`,
  333. method: 'get',
  334. params:data
  335. });
  336. }
  337. /**
  338. *门店流水--账单记录列表-账单下载
  339. */
  340. export function exportfundRecordApi(data) {
  341. return request({
  342. url: `/export/storeFinanceRecord`,
  343. method: 'get',
  344. params:data
  345. });
  346. }
  347. /**
  348. *转账申请-申请列表
  349. */
  350. export function storeExtractInfo(data) {
  351. return request({
  352. url: '/store/extract/list',
  353. method: 'get',
  354. params:data
  355. });
  356. }
  357. /**
  358. *转账申请-备注
  359. */
  360. export function storeExtractMarkApi(id,data) {
  361. return request({
  362. url: `store/extract/mark/${id}`,
  363. method: 'post',
  364. data
  365. });
  366. }
  367. /**
  368. *转账申请-审核
  369. */
  370. export function storeExtractVerifyApi(id,data) {
  371. return request({
  372. url: `store/extract/verify/${id}`,
  373. method: 'post',
  374. data
  375. });
  376. }
  377. /**
  378. *转账申请-转账
  379. */
  380. export function storepaying(id) {
  381. return request({
  382. url: `store/extract/transfer/${id}`,
  383. method: 'get'
  384. });
  385. }
  386. /**
  387. *转账申请-设置
  388. */
  389. export function headerListApi (data) {
  390. return request({
  391. url: 'store/finance/header_basics',
  392. method: 'get',
  393. params: data
  394. });
  395. }
  396. /**
  397. *转账申请-设置-表单
  398. */
  399. export function dataFromApi (data,url) {
  400. return request({
  401. url: url,
  402. // url: '/setting/config/edit_basics',
  403. method: 'get',
  404. params: data
  405. });
  406. }
  407. /**
  408. *门店列表-获取列表数据
  409. */
  410. export function storeListApi (data) {
  411. return request({
  412. url: 'store/store',
  413. method: 'get',
  414. params: data
  415. });
  416. }
  417. /**
  418. * @description 门店列表 -- 门店修改信息;
  419. */
  420. export function storeGetInfoApi (id) {
  421. return request({
  422. url: `store/store/get_info/${id}`,
  423. method: 'get'
  424. });
  425. }
  426. /**
  427. * @description 门店设置 获取省市区街道
  428. */
  429. export function cityApi (data) {
  430. return request({
  431. url: 'city',
  432. method: 'get',
  433. params: data
  434. });
  435. }
  436. /**
  437. * @description 门店设置 获取当前登录门店信息
  438. */
  439. export function storeUpdateApi (id,data) {
  440. return request({
  441. url: `store/store/${id}`,
  442. method: 'post',
  443. data
  444. });
  445. }
  446. /**
  447. * @description 门店设置 获取地图key
  448. */
  449. export function keyApi () {
  450. return request({
  451. url: 'store/store/address',
  452. method: 'get'
  453. });
  454. }
  455. /**
  456. * 店设置 进入门店
  457. */
  458. export function storeLogin (id) {
  459. return request({
  460. url: `store/store/login/${id}`,
  461. method: 'get'
  462. });
  463. }
  464. /**
  465. * 门店设置 修改营业状态
  466. */
  467. export function storeSetShowApi (id,type) {
  468. return request({
  469. url: `store/store/set_show/${id}/${type}`,
  470. method: 'put'
  471. });
  472. }
  473. /**
  474. 门店订单 分配
  475. */
  476. export function storeShareApi (data) {
  477. return request({
  478. url: `store/share/order`,
  479. method: 'post',
  480. params: data
  481. });
  482. }
  483. export function headerApi (data) {
  484. return request({
  485. url: 'store/home/header',
  486. method: 'get',
  487. params:data
  488. });
  489. }
  490. export function orderCharts (data) {
  491. return request({
  492. url: 'store/home/orderChart',
  493. method: 'get',
  494. params: data
  495. });
  496. }
  497. export function storeApi (data) {
  498. return request({
  499. url: 'store/home/store',
  500. method: 'get',
  501. params: data
  502. });
  503. }
  504. export function operateApi (data) {
  505. return request({
  506. url: 'store/home/operate',
  507. method: 'get',
  508. params: data
  509. });
  510. }
  511. export function resetApi (id) {
  512. return request({
  513. url: `store/store/reset_admin/${id}`,
  514. method: 'get'
  515. });
  516. }
  517. export function exportTableList (id,keyword,data) {
  518. return request({
  519. url: `export/storeFlowExport?store_id=${id}&keyword=${keyword}&data=${data}`,
  520. method: 'get'
  521. });
  522. }
  523. //分类列表
  524. export function storeCategory (data) {
  525. return request({
  526. url: `/store/category`,
  527. params: data,
  528. method: 'get'
  529. });
  530. }
  531. //添加、编辑表单
  532. export function categoryCreate (id) {
  533. return request({
  534. url: `/store/category/create/${id}`,
  535. method: 'get'
  536. });
  537. }
  538. //树形列表
  539. export function categoryTree (type) {
  540. return request({
  541. url: `/store/category/tree/${type}`,
  542. method: 'get'
  543. });
  544. }
  545. //修改状态
  546. export function categorySetShow (data) {
  547. return request({
  548. url: `/store/category/set_show/${data.id}/${data.is_show}`,
  549. method: 'PUT'
  550. });
  551. }
  552. //门店分类搜索列表
  553. export function cascaderList (type) {
  554. return request({
  555. url: `store/category/cascader_list/${type}`,
  556. method: 'get'
  557. });
  558. }
  559. //获取部门列表
  560. export function getDepartmentList () {
  561. return request({
  562. url: `work/department`,
  563. method: 'get'
  564. });
  565. }
  566. //编辑部门
  567. export function editDepartment(data) {
  568. return request({
  569. url: `work/editDepartment`,
  570. method: 'post',
  571. data
  572. });
  573. }
  574. //添加部门
  575. export function addDepartment(data) {
  576. return request({
  577. url: `work/addDepartment`,
  578. method: 'post',
  579. data
  580. });
  581. }
  582. //删除部门
  583. export function delDepartment(data) {
  584. return request({
  585. url: `work/deleteDepartment`,
  586. method: 'post',
  587. data
  588. });
  589. }
  590. //考勤组列表
  591. export function checkGroupList(data) {
  592. return request({
  593. url: `work/checkGroup`,
  594. method: 'post',
  595. data
  596. });
  597. }
  598. //员工列表
  599. export function getYgList(data) {
  600. return request({
  601. url: `work/member`,
  602. method: 'get',
  603. params:data
  604. })
  605. }
  606. //添加员工
  607. export function addYg(data) {
  608. return request({
  609. url: `work/add`,
  610. method: 'post',
  611. data
  612. })
  613. }
  614. //删除员工
  615. export function delYg(data) {
  616. return request({
  617. url: `work/delete`,
  618. method: 'post',
  619. data
  620. })
  621. }
  622. // 编辑员工
  623. export function editYg(data) {
  624. return request({
  625. url: `work/edit`,
  626. method: 'post',
  627. data
  628. })
  629. }
  630. //打卡规则列表
  631. export function checkRuleList(data) {
  632. return request({
  633. url: `work/checkRule`,
  634. method: 'post',
  635. data
  636. })
  637. }
  638. //添加打卡规则
  639. export function addCheckRule(data) {
  640. return request({
  641. url: `work/addCheckRule`,
  642. method: 'post',
  643. data
  644. })
  645. }
  646. //班次列表
  647. export function getClasses(data) {
  648. return request({
  649. url: `work/checkClasses`,
  650. method: 'get',
  651. params: data
  652. })
  653. }