index.php 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. <?
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-export-dialog');
  4. ComponentHelper::loadComponentView('com-image' );
  5. ?>
  6. <style>
  7. .distrow {
  8. height: 50px !important;
  9. }
  10. .distpopup {
  11. position: absolute;
  12. right: -2px;
  13. top: -4px;
  14. background: #fff;
  15. box-shadow: 7px 5px 11px grey;
  16. width: 83px;
  17. z-index: 5;
  18. }
  19. </style>
  20. <div id="app" v-cloak>
  21. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  22. <!-- <div slot="header">
  23. <span>门店列表</span>
  24. <el-button type="primary" size="small" style="padding: 9px 15px !important; float: right; position: relative; bottom: 8px;" @click="addStore">添加门店</el-button>
  25. </div> -->
  26. <div class="table-body">
  27. <el-tabs type="card" v-model="activityTab" @tab-click="handleTabClick">
  28. <el-tab-pane label="订单明细" name="order-detail">
  29. <div style="padding-bottom: 20px;">
  30. <div class="flex">
  31. <div class="flex" style="margin-right: 20px;">
  32. <div class="input-title" style="flex-shrink: 0;">门店名称</div>
  33. <el-input size="small" style="width: 130px;" placeholder="请输入门店名称" v-model="searchData.store_name"> </el-input>
  34. </div>
  35. <div class="flex" style="margin-right: 20px;">
  36. <div class="input-title" style="flex-shrink: 0;">会员ID</div>
  37. <el-input size="small" style="width: 130px;" placeholder="请输入会员ID" v-model="searchData.user_id">
  38. </el-input>
  39. </div>
  40. <div class="flex" style="margin-right: 20px;">
  41. <div class="input-title" style="flex-shrink: 0;">会员昵称</div>
  42. <el-input size="small" style="width: 130px;" placeholder="请输入会员昵称" v-model="searchData.nickname">
  43. </el-input>
  44. </div>
  45. <div class="flex" style="margin-right: 20px;">
  46. <div class="input-title" style="flex-shrink: 0;">手机号</div>
  47. <el-input size="small" style="width: 140px;" placeholder="请输入会员手机号" v-model="searchData.mobile">
  48. </el-input>
  49. </div>
  50. <div class="flex" style="margin-right: 20px;">
  51. <div class="input-title" style="flex-shrink: 0;">订单编号</div>
  52. <el-input size="small" style="width: 130px;" placeholder="请输入订单编号" v-model="searchData.order_no">
  53. </el-input>
  54. </div>
  55. <div class="item-box" flex="dir:left cross:center">
  56. <div class="label">订单状态</div>
  57. <el-select v-model="searchData.order_status" @change='searchs' class="select" size="small" style="width: 130px;">
  58. <el-option :key="0" label="全部" :value="0"></el-option>
  59. <el-option :key="1" label="待结算" :value="1"></el-option>
  60. <el-option :key="2" label="已结算" :value="2"></el-option>
  61. <el-option :key="3" label="已失效" :value="3"></el-option>
  62. </el-select>
  63. </div>
  64. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  65. <el-button type="warning" @click="clereSearch" v-if="searchData.store_name || searchData.user_id || searchData.nickname || searchData.mobile || searchData.order_no || searchData.order_status" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  66. </div>
  67. <com-export-dialog style="float: right;margin-top: -31px;" :field_list='orderDetailFieldsList' :action_url="exportUrl" :params="searchData"> </com-export-dialog>
  68. </div>
  69. <div class="stat-item">
  70. <span>订单总金额:{{totalOrderAmounts}}</span>
  71. <span>已结算金额:{{settleOrderAmounts}}</span>
  72. <span>未结算金额:{{notSettleOrderAmounts}}</span>
  73. </div>
  74. <el-table :data="orderDetailList" @selection-change="handleOrderDetailListChange" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  75. <el-table-column type="selection" width="55"></el-table-column>
  76. <el-table-column label="门店名称" width="150" prop="store_name">
  77. <template slot-scope="scope">
  78. <div class="user_img" flex="cross:center">
  79. <el-image class="default-avatar" :src="scope.row.store_logo">
  80. <div slot="error" class="image-slot">
  81. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.store_logo"></com-image>
  82. </div>
  83. </el-image>
  84. <div>{{scope.row.store_name}}</div>
  85. </div>
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="会员ID" prop="user_id" width="100" align="center">
  89. <template slot-scope="scope">
  90. <div>{{scope.row.user_id}}</div>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="会员信息" align="center" width="200">
  94. <template slot-scope="scope">
  95. <div class="user_img" flex="cross:center">
  96. <el-image class="default-avatar" :src="scope.row.avatar_url">
  97. <div slot="error" class="image-slot">
  98. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  99. </div>
  100. </el-image>
  101. <div>{{scope.row.nickname}}<br/>{{scope.row.mobile}}</div>
  102. </div>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="订单编号" prop="order_no" width="250" align="center">
  106. <template slot-scope="scope">
  107. <div>{{scope.row.order_no}}</div>
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="订单金额" prop="order_money" width="100" align="center">
  111. <template slot-scope="scope">
  112. <div> <span>{{scope.row.order_money}}</span> </div>
  113. </template>
  114. </el-table-column>
  115. <el-table-column label="优惠金额" prop="discount_money" width="100" align="center">
  116. <template slot-scope="scope">
  117. <div><span style="color: #409EFF;">{{scope.row.discount_money}}</span> </div>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="支付金额" prop="pay_money" width="100" align="center">
  121. <template slot-scope="scope">
  122. <div> <span>{{scope.row.pay_money}}</span> </div>
  123. </template>
  124. </el-table-column>
  125. <el-table-column label="插件(佣金)分红" prop="addons_bonus" width="150" height="50" align="center">
  126. <template slot-scope="scope">
  127. <div>
  128. <div>
  129. </div>
  130. <el-popover placement="right-end" width="200" trigger="click">
  131. <div v-for="item in addonsCommissions">
  132. <div class="text1">{{item.name}}: ¥{{item.value}}</div>
  133. </div>
  134. <el-button slot="reference" type="text" style="color: #409EFF;" @click="getAddonsCommission(scope.row)">{{scope.row.addons_bonus}}</el-button>
  135. </el-popover>
  136. </div>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="门店股东分红" prop="store_send_commission" width="100" align="center">
  140. <template slot-scope="scope">
  141. <div> <span>{{scope.row.store_send_commission}}</span> </div>
  142. </template>
  143. </el-table-column>
  144. <el-table-column label="服务费" prop="service_charge" width="100" align="center">
  145. <template slot-scope="scope">
  146. <div> <span>{{scope.row.service_charge}}</span> </div>
  147. </template>
  148. </el-table-column>
  149. <el-table-column label="到账金额" prop="amount_received" width="100" align="center">
  150. <template slot-scope="scope">
  151. <div> <span>{{scope.row.amount_received}}</span> </div>
  152. </template>
  153. </el-table-column>
  154. <el-table-column label="状态" prop="settle_status" width="100" align="center">
  155. <template slot-scope="scope">
  156. <div> <span>{{settleStatus[scope.row.settle_status]}}</span> </div>
  157. </template>
  158. </el-table-column>
  159. <el-table-column label="创建时间" prop="user_count" width="200" align="center">
  160. <template slot-scope="scope">
  161. <div>
  162. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  163. </div>
  164. </template>
  165. </el-table-column>
  166. <!-- <el-table-column label="操作" style="width: 180px;" fixed="right" align="center">
  167. <template slot-scope="scope">
  168. <template v-if="scope.row.check_status==1">
  169. <el-button type="text" size="small" @click="switchStatus(scope.$index, 'adopt')">通过</el-button>
  170. <el-button type="text" size="small" @click="switchStatus(scope.$index, 'reject')">不通过</el-button>
  171. </template>
  172. <template v-if="scope.row.check_status==2">
  173. <el-button type="text" size="small" @click="switchStatus(scope.$index, 'adopt')">通过</el-button>
  174. </template>
  175. </template>
  176. </el-table-column> -->
  177. </el-table>
  178. <div style="text-align: right;margin: 20px 0;">
  179. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  180. </div>
  181. </el-tab-pane>
  182. <el-tab-pane label="收银台" name="cashier">
  183. <div style="padding-bottom: 20px;">
  184. <div class="flex">
  185. <div class="flex" style="margin-right: 20px;">
  186. <div class="input-title" style="flex-shrink: 0;">门店名称</div>
  187. <el-input size="small" style="width: 130px;" placeholder="请输入门店名称" v-model="searchData.store_name"> </el-input>
  188. </div>
  189. <div class="flex" style="margin-right: 20px;">
  190. <div class="input-title" style="flex-shrink: 0;">会员昵称</div>
  191. <el-input size="small" style="width: 130px;" placeholder="请输入会员昵称" v-model="searchData.nickname">
  192. </el-input>
  193. </div>
  194. <div class="flex" style="margin-right: 20px;">
  195. <div class="input-title" style="flex-shrink: 0;">实付金额</div>
  196. <el-input size="small" style="width: 130px;" v-model="searchData.min_amount">
  197. <template slot="append">元</template>
  198. </el-input>
  199. &nbsp;&nbsp;-&nbsp;&nbsp;
  200. <el-input size="small" style="width: 130px;" v-model="searchData.max_amount">
  201. <template slot="append">元</template>
  202. </el-input>
  203. </div>
  204. <div class="flex" style="margin-right: 20px;">
  205. <div class="input-title" style="flex-shrink: 0;">付款时间</div>
  206. <el-date-picker v-model="dates" size="small" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="selectedDates"> </el-date-picker>
  207. </div>
  208. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  209. <el-button type="warning" @click="clereSearch" v-if="searchData.store_name || searchData.nickname || searchData.min_amount || searchData.max_amount || searchData.start_time || searchData.end_time" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  210. </div>
  211. <com-export-dialog style="float: right;margin-top: -31px;" :field_list='exportList' :action_url="exportUrl" :params="searchData"> </com-export-dialog>
  212. </div>
  213. <div class="stat-item">
  214. <span>累计实付:¥{{totalRealPayAmounts}}</span>
  215. <span>累计付款笔数:{{totalOrderNumbers}}</span>
  216. <span>累计实收款:¥{{totalReceiveAmounts}}</span>
  217. </div>
  218. <el-table :data="cashierList" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  219. <el-table-column label="门店名称" prop="store_name">
  220. <template slot-scope="scope">
  221. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.logo_img"></com-image>
  222. <div>{{scope.row.store_name}}</div>
  223. </template>
  224. </el-table-column>
  225. <el-table-column label="会员信息" align="center">
  226. <template slot-scope="scope">
  227. <com-image style="float: left;margin-right: 5px;" mode="aspectFill" :src="scope.row.avatar_url"></com-image>
  228. <div>昵称:{{scope.row.nickname}}</div>
  229. <div>手机:{{scope.row.user_id}}</div>
  230. </template>
  231. </el-table-column>
  232. <el-table-column label="应付金额" prop="order_money" align="center">
  233. <template slot-scope="scope">
  234. <div> <span>{{scope.row.order_money}}</span> </div>
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="实付金额" prop="pay_money" align="center">
  238. <template slot-scope="scope">
  239. <div> <span>{{scope.row.pay_money}}</span> </div>
  240. </template>
  241. </el-table-column>
  242. <el-table-column label="优惠金额" prop="discount_money" align="center">
  243. <template slot-scope="scope">
  244. <div> <span>{{scope.row.discount_money}}</span> </div>
  245. </template>
  246. </el-table-column>
  247. <el-table-column label="实收金额" prop="amount_received" align="center">
  248. <template slot-scope="scope">
  249. <div> <span>{{scope.row.amount_received}}</span> </div>
  250. </template>
  251. </el-table-column>
  252. <el-table-column label="备注" prop="remark" align="center">
  253. <template slot-scope="scope">
  254. <div> <span>--</span> </div>
  255. </template>
  256. </el-table-column>
  257. <el-table-column label="付款时间" prop="user_count" align="center">
  258. <template slot-scope="scope">
  259. <div>
  260. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  261. </div>
  262. </template>
  263. </el-table-column>
  264. </el-table>
  265. <div style="text-align: right;margin: 20px 0;">
  266. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  267. </div>
  268. </el-tab-pane>
  269. <el-tab-pane label="核销奖励" name="platform-store-clerk" v-if="install_platform_store_clerk > 0">
  270. <div style="padding-bottom: 20px;">
  271. <div class="flex">
  272. <div class="flex" style="margin-right: 20px;">
  273. <div class="input-title" style="flex-shrink: 0;">门店名称</div>
  274. <el-input size="small" style="width: 130px;" placeholder="请输入门店名称" v-model="searchData.store_name"> </el-input>
  275. </div>
  276. <div class="flex" style="margin-right: 20px;">
  277. <div class="input-title" style="flex-shrink: 0;">会员ID</div>
  278. <el-input size="small" style="width: 130px;" placeholder="请输入会员ID" v-model="searchData.user_id">
  279. </el-input>
  280. </div>
  281. <div class="flex" style="margin-right: 20px;">
  282. <div class="input-title" style="flex-shrink: 0;">会员昵称</div>
  283. <el-input size="small" style="width: 130px;" placeholder="请输入会员昵称" v-model="searchData.nickname">
  284. </el-input>
  285. </div>
  286. <div class="flex" style="margin-right: 20px;">
  287. <div class="input-title" style="flex-shrink: 0;">手机号</div>
  288. <el-input size="small" style="width: 140px;" placeholder="请输入会员手机号" v-model="searchData.mobile">
  289. </el-input>
  290. </div>
  291. <div class="flex" style="margin-right: 20px;">
  292. <div class="input-title" style="flex-shrink: 0;">订单编号</div>
  293. <el-input size="small" style="width: 130px;" placeholder="请输入订单编号" v-model="searchData.order_no">
  294. </el-input>
  295. </div>
  296. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  297. <el-button type="warning" @click="clereSearch" v-if="searchData.store_name || searchData.user_id || searchData.nickname || searchData.mobile || searchData.order_no " style="padding: 9px 15px !important;">清除搜索条件</el-button>
  298. </div>
  299. </div>
  300. <div class="stat-item">
  301. <span>订单总金额:{{totalOrderAmounts}}</span>
  302. <span>已结算金额:{{settleOrderAmounts}}</span>
  303. <span>未结算金额:{{notSettleOrderAmounts}}</span>
  304. </div>
  305. <el-table :data="orderDetailList" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  306. <el-table-column label="门店名称" width="150" prop="store_name">
  307. <template slot-scope="scope">
  308. <div class="user_img" flex="cross:center">
  309. <el-image class="default-avatar" :src="scope.row.store_logo">
  310. <div slot="error" class="image-slot">
  311. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.store_logo"></com-image>
  312. </div>
  313. </el-image>
  314. <div>{{scope.row.store_name}}</div>
  315. </div>
  316. </template>
  317. </el-table-column>
  318. <el-table-column label="会员ID" prop="user_id" width="100" align="center">
  319. <template slot-scope="scope">
  320. <div>{{scope.row.user_id}}</div>
  321. </template>
  322. </el-table-column>
  323. <el-table-column label="会员信息" align="center" width="200">
  324. <template slot-scope="scope">
  325. <div class="user_img" flex="cross:center">
  326. <el-image class="default-avatar" :src="scope.row.avatar_url">
  327. <div slot="error" class="image-slot">
  328. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  329. </div>
  330. </el-image>
  331. <div>{{scope.row.nickname}}<br/>{{scope.row.mobile}}</div>
  332. </div>
  333. </template>
  334. </el-table-column>
  335. <el-table-column label="订单编号" prop="order_no" width="250" align="center">
  336. <template slot-scope="scope">
  337. <div>{{scope.row.order_no}}</div>
  338. </template>
  339. </el-table-column>
  340. <el-table-column label="订单金额" prop="order_money" width="100" align="center">
  341. <template slot-scope="scope">
  342. <div> <span>{{scope.row.order_money}}</span> </div>
  343. </template>
  344. </el-table-column>
  345. <el-table-column label="支付金额" prop="pay_money" width="100" align="center">
  346. <template slot-scope="scope">
  347. <div> <span>{{scope.row.pay_money}}</span> </div>
  348. </template>
  349. </el-table-column>
  350. <el-table-column label="奖励金额" prop="amount_received" width="100" align="center">
  351. <template slot-scope="scope">
  352. <div> <span>{{scope.row.amount_received}}</span> </div>
  353. </template>
  354. </el-table-column>
  355. <el-table-column label="状态" prop="settle_status" width="100" align="center">
  356. <template slot-scope="scope">
  357. <div> <span>{{settleStatus[scope.row.settle_status]}}</span> </div>
  358. </template>
  359. </el-table-column>
  360. <el-table-column label="创建时间" prop="user_count" align="center" >
  361. <template slot-scope="scope">
  362. <div>
  363. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  364. </div>
  365. </template>
  366. </el-table-column>
  367. </el-table>
  368. <div style="text-align: right;margin: 20px 0;">
  369. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  370. </div>
  371. </el-tab-pane>
  372. <el-tab-pane label="次卡核销" name="secondary_card" v-if="install_secondary_card > 0">
  373. <div style="padding-bottom: 20px;">
  374. <div class="flex">
  375. <div class="flex" style="margin-right: 20px;">
  376. <div class="input-title" style="flex-shrink: 0;">门店名称</div>
  377. <el-input size="small" style="width: 130px;" placeholder="请输入门店名称" v-model="searchData.store_name"> </el-input>
  378. </div>
  379. <div class="flex" style="margin-right: 20px;">
  380. <div class="input-title" style="flex-shrink: 0;">会员ID</div>
  381. <el-input size="small" style="width: 130px;" placeholder="请输入会员ID" v-model="searchData.user_id">
  382. </el-input>
  383. </div>
  384. <div class="flex" style="margin-right: 20px;">
  385. <div class="input-title" style="flex-shrink: 0;">会员昵称</div>
  386. <el-input size="small" style="width: 130px;" placeholder="请输入会员昵称" v-model="searchData.nickname">
  387. </el-input>
  388. </div>
  389. <div class="flex" style="margin-right: 20px;">
  390. <div class="input-title" style="flex-shrink: 0;">手机号</div>
  391. <el-input size="small" style="width: 140px;" placeholder="请输入会员手机号" v-model="searchData.mobile">
  392. </el-input>
  393. </div>
  394. <div class="flex" style="margin-right: 20px;">
  395. <div class="input-title" style="flex-shrink: 0;">订单编号</div>
  396. <el-input size="small" style="width: 130px;" placeholder="请输入订单编号" v-model="searchData.order_no">
  397. </el-input>
  398. </div>
  399. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  400. <el-button type="warning" @click="clereSearch" v-if="searchData.store_name || searchData.user_id || searchData.nickname || searchData.mobile || searchData.order_no " style="padding: 9px 15px !important;">清除搜索条件</el-button>
  401. </div>
  402. </div>
  403. <div class="stat-item">
  404. <span>订单总金额:{{totalOrderAmounts}}</span>
  405. <span>已结算金额:{{settleOrderAmounts}}</span>
  406. <span>未结算金额:{{notSettleOrderAmounts}}</span>
  407. </div>
  408. <el-table :data="secondaryCardList" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  409. <el-table-column label="门店名称" width="150" prop="store_name">
  410. <template slot-scope="scope">
  411. <div class="user_img" flex="cross:center">
  412. <el-image class="default-avatar" :src="scope.row.store_logo">
  413. <div slot="error" class="image-slot">
  414. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.store_logo"></com-image>
  415. </div>
  416. </el-image>
  417. <div>{{scope.row.store_name}}</div>
  418. </div>
  419. </template>
  420. </el-table-column>
  421. <el-table-column label="会员ID" prop="user_id" width="100" align="center">
  422. <template slot-scope="scope">
  423. <div>{{scope.row.user_id}}</div>
  424. </template>
  425. </el-table-column>
  426. <el-table-column label="会员信息" align="center" width="200">
  427. <template slot-scope="scope">
  428. <div class="user_img" flex="cross:center">
  429. <el-image class="default-avatar" :src="scope.row.avatar_url">
  430. <div slot="error" class="image-slot">
  431. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  432. </div>
  433. </el-image>
  434. <div>{{scope.row.nickname}}<br/>{{scope.row.mobile}}</div>
  435. </div>
  436. </template>
  437. </el-table-column>
  438. <el-table-column label="订单编号" prop="order_no" width="250" align="center">
  439. <template slot-scope="scope">
  440. <div>{{scope.row.order_no}}</div>
  441. </template>
  442. </el-table-column>
  443. <el-table-column label="支付金额" prop="pay_money" width="100" align="center">
  444. <template slot-scope="scope">
  445. <div> <span>{{scope.row.pay_money}}</span> </div>
  446. </template>
  447. </el-table-column>
  448. <el-table-column label="结算金额" prop="amount_received" width="100" align="center">
  449. <template slot-scope="scope">
  450. <div> <span>{{scope.row.amount_received}}</span> </div>
  451. </template>
  452. </el-table-column>
  453. <el-table-column label="状态" prop="settle_status" width="100" align="center">
  454. <template slot-scope="scope">
  455. <div> <span v-if="scope.row.is_settlement==1">已结算</span> </div>
  456. <div> <span v-if="scope.row.is_settlement==0">待结算</span> </div>
  457. </template>
  458. </el-table-column>
  459. <el-table-column label="创建时间" prop="user_count" align="center" >
  460. <template slot-scope="scope">
  461. <div>
  462. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  463. </div>
  464. </template>
  465. </el-table-column>
  466. </el-table>
  467. <div style="text-align: right;margin: 20px 0;">
  468. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  469. </div>
  470. </el-tab-pane>
  471. </el-tabs>
  472. </div>
  473. </el-card>
  474. </div>
  475. <script>
  476. const app = new Vue({
  477. el: '#app',
  478. data: {
  479. searchData: {
  480. store_name: '',
  481. user_id: null,
  482. nickname: '',
  483. mobile: '',
  484. order_no: '',
  485. order_status: 0,
  486. min_amount: null,
  487. max_mount: null,
  488. start_time: '',
  489. end_time: '',
  490. order_ids: [],
  491. activityTab: 'order-detail'
  492. },
  493. dates: null,
  494. activityTab: 'order-detail',
  495. currPage: 1,
  496. pageCount: 0,
  497. loading: false,
  498. orderDetailList: [],
  499. cashierList: [],
  500. dialogLoading: false,
  501. settleStatus: {
  502. 0: '全部',
  503. 1: '待结算',
  504. 2: '已结算',
  505. 3: '已失效',
  506. },
  507. totalOrderAmounts: 0,
  508. settleOrderAmounts: 0,
  509. notSettleOrderAmounts: 0,
  510. totalRealPayAmounts: 0,
  511. totalOrderNumbers: 0,
  512. totalReceiveAmounts: 0,
  513. // 导出路径
  514. exportUrl: 'store/store-assets/index',
  515. exportList: {},
  516. // 订单明细导出
  517. orderDetailFieldsList: {},
  518. addonsCommissions: [],
  519. install_platform_store_clerk : 0,
  520. install_secondary_card : 0,
  521. },
  522. mounted() {
  523. this.loadData();
  524. },
  525. methods: {
  526. handleOrderDetailListChange(val) {
  527. // 获取选中的订单id
  528. this.searchData.order_ids = val.map(item => item.id);
  529. },
  530. searchs() {
  531. this.currPage = 1;
  532. this.loadData();
  533. },
  534. clereSearch() {
  535. this.searchData.store_name = '';
  536. this.searchData.user_id = null;
  537. this.searchData.nickname = '';
  538. if (this.activityTab == 'order-detail' || this.activityTab == 'platform-store-clerk' ) {
  539. this.searchData.mobile = '';
  540. this.searchData.order_no = '';
  541. this.searchData.order_status = 0;
  542. } else if(this.activityTab=='cashier') {
  543. this.searchData.min_amount = null;
  544. this.searchData.max_amount = null;
  545. this.searchData.start_time = '';
  546. this.searchData.end_time = '';
  547. this.dates = null;
  548. } else if(this.activityTab=='secondary_card') {
  549. this.searchData.min_amount = null;
  550. this.searchData.max_amount = null;
  551. this.searchData.start_time = '';
  552. this.searchData.end_time = '';
  553. this.searchData.mobile = '';
  554. this.searchData.order_no = '';
  555. this.searchData.order_status = 0;
  556. }
  557. this.currPage = 1;
  558. this.loadData();
  559. },
  560. // 选中时间
  561. selectedDates(e) {
  562. if (e) {
  563. this.searchData.start_time = e[0];
  564. this.searchData.end_time = e[1];
  565. } else {
  566. this.searchData.start_time = '';
  567. this.searchData.end_time = '';
  568. }
  569. this.currPage = 1;
  570. this.loadData();
  571. },
  572. // 标签页切换
  573. handleTabClick(e) {
  574. this.loadData();
  575. this.searchData.activityTab = this.activityTab;
  576. },
  577. loadData() {
  578. this.loading = true;
  579. request({
  580. params: {
  581. r: 'store/store-assets/index',
  582. page: this.currPage,
  583. tabname: this.activityTab,
  584. ...this.searchData,
  585. },
  586. method: 'get',
  587. }).then(e => {
  588. this.loading = false;
  589. if (e.data.code == 0) {
  590. if (this.activityTab == 'order-detail' || this.activityTab == 'platform-store-clerk') {
  591. this.orderDetailList = e.data.data.list;
  592. this.totalOrderAmounts = e.data.data.total_order_amounts;
  593. this.settleOrderAmounts = e.data.data.settle_order_amounts;
  594. this.notSettleOrderAmounts = e.data.data.not_settle_order_amounts;
  595. this.install_platform_store_clerk = e.data.data.install_platform_store_clerk;
  596. this.install_secondary_card = e.data.data.install_secondary_card;
  597. this.orderDetailFieldsList = e.data.data.orderDetailFieldsList;
  598. } else if(this.activityTab=='cashier') {
  599. this.cashierList = e.data.data.list;
  600. this.totalRealPayAmounts = e.data.data.total_real_pay_amounts;
  601. this.totalOrderNumbers = e.data.data.total_order_numbers;
  602. this.totalReceiveAmounts = e.data.data.total_receive_amounts;
  603. this.exportList = e.data.data.export_list;
  604. this.install_platform_store_clerk = e.data.data.install_platform_store_clerk;
  605. } else if(this.activityTab=='secondary_card') {
  606. this.secondaryCardList = e.data.data.list;
  607. this.totalOrderAmounts = e.data.data.total_order_amounts;
  608. this.settleOrderAmounts = e.data.data.settle_order_amounts;
  609. this.notSettleOrderAmounts = e.data.data.not_settle_order_amounts;
  610. this.exportList = e.data.data.export_list;
  611. this.install_secondary_card = e.data.data.install_secondary_card;
  612. }
  613. this.pageCount = e.data.data.page_count;
  614. } else {
  615. this.$message.error(e.data.msg);
  616. }
  617. }).catch(e => {
  618. this.loading = false;
  619. });
  620. },
  621. pagination(currentPage) {
  622. let self = this;
  623. self.currPage = currentPage;
  624. self.loadData();
  625. },
  626. // 获取插件分佣
  627. getAddonsCommission(row) {
  628. // console.log(row, 'getAddonsCommission ============= ');
  629. let self = this;
  630. self.addonsCommissions = [];
  631. request({
  632. params: {
  633. r: 'store/store-assets/addons-commission',
  634. user_id: row.user_id,
  635. id: row.id,
  636. order_no: row.order_no,
  637. is_settlement: row.is_settlement,
  638. },
  639. method: 'get',
  640. }).then(e => {
  641. if (e.data.code == 0) {
  642. this.addonsCommissions = e.data.data;
  643. } else {
  644. self.$message.error(e.data.msg);
  645. }
  646. }).catch(e => {
  647. console.log(e);
  648. self.$message.error('网络错误');
  649. });
  650. },
  651. }
  652. });
  653. </script>
  654. <style>
  655. .el-tabs__header {
  656. font-size: 16px;
  657. }
  658. .table-body {
  659. padding: 20px;
  660. background-color: #fff;
  661. }
  662. .input-item {
  663. width: 250px;
  664. margin-right: 40px;
  665. }
  666. .input-item .el-input__inner {
  667. border-right: 0;
  668. }
  669. .input-item .el-input__inner:hover {
  670. border: 1px solid #dcdfe6;
  671. border-right: 0;
  672. outline: 0;
  673. }
  674. .input-item .el-input__inner:focus {
  675. border: 1px solid #dcdfe6;
  676. border-right: 0;
  677. outline: 0;
  678. }
  679. .input-item .el-input-group__append {
  680. background-color: #fff;
  681. border-left: 0;
  682. width: 10%;
  683. padding: 0;
  684. }
  685. .input-item .el-input-group__append .el-button {
  686. padding: 0;
  687. }
  688. .input-item .el-input-group__append .el-button {
  689. margin: 0;
  690. }
  691. .table-body {
  692. padding: 20px;
  693. background-color: #fff;
  694. }
  695. .table-body .el-button {
  696. /* padding: 0 !important; */
  697. padding: 9px;
  698. border: 0;
  699. margin: 0 5px;
  700. }
  701. .input-item {
  702. width: 250px;
  703. margin: 0 0 20px;
  704. display: inline-block;
  705. }
  706. .input-item .el-input__inner {
  707. border-right: 0;
  708. }
  709. .input-item .el-input__inner:hover {
  710. border: 1px solid #dcdfe6;
  711. border-right: 0;
  712. outline: 0;
  713. }
  714. .input-item .el-input__inner:focus {
  715. border: 1px solid #dcdfe6;
  716. border-right: 0;
  717. outline: 0;
  718. }
  719. .input-item .el-input-group__append {
  720. background-color: #fff;
  721. border-left: 0;
  722. width: 10%;
  723. padding: 0;
  724. }
  725. .input-item .el-input-group__append .el-button {
  726. padding: 0;
  727. }
  728. .input-item .el-input-group__append .el-button {
  729. margin: 0;
  730. }
  731. .batch {
  732. margin: 0 0 20px;
  733. display: inline-block;
  734. }
  735. .batch .el-button {
  736. padding: 9px 15px !important;
  737. }
  738. .el-table th>.cell {
  739. color: #333;
  740. font-weight: bold;
  741. font-size: 14px;
  742. }
  743. .el-table__footer-wrapper,
  744. .el-table__header-wrapper {
  745. border-bottom: 1.4px solid #D6D6D6;
  746. }
  747. .el-table .el-button {
  748. padding: 0 !important;
  749. border: 0;
  750. margin: 0 5px;
  751. }
  752. #app .copy .el-input-group__append {
  753. background-color: #409EFF;
  754. border-color: #409EFF;
  755. padding: 0 10px;
  756. }
  757. #app .table-body .copybtn {
  758. color: #fff;
  759. padding: 0 30px;
  760. }
  761. .el-alert {
  762. padding: 0;
  763. padding-left: 5px;
  764. padding-bottom: 5px;
  765. }
  766. .el-alert--info .el-alert__description {
  767. color: #606266;
  768. }
  769. .el-alert .el-button {
  770. margin-left: 20px;
  771. }
  772. .el-alert__content {
  773. display: flex;
  774. align-items: center;
  775. }
  776. .table-body .el-alert__title {
  777. margin-top: 5px;
  778. font-weight: 400;
  779. }
  780. .el-table th>.cell {
  781. color: #333;
  782. font-weight: bold;
  783. font-size: 14px;
  784. }
  785. .el-table__footer-wrapper,
  786. .el-table__header-wrapper {
  787. border-bottom: 1.4px solid #D6D6D6;
  788. }
  789. .item-box {
  790. margin-right: 20px;
  791. }
  792. .flex {
  793. display: flex;
  794. align-items: center;
  795. }
  796. .input-title {
  797. margin-right: 15px;
  798. }
  799. .item-box .label {
  800. margin-right: 8px;
  801. }
  802. .com-share-pop {
  803. display: inline-block;
  804. }
  805. .stat-item {
  806. margin: 10px 0px;
  807. padding-left: 7px;
  808. color: #A2A2A2;
  809. }
  810. .stat-item>span {
  811. margin: 0px 10px;
  812. }
  813. .user_img{
  814. position: relative;
  815. margin-right: 8px;
  816. /* height: 50px;
  817. width: 50px; */
  818. }
  819. .default-avatar{
  820. width: 50px;
  821. height: 50px;
  822. border-radius: 50%;
  823. margin-right: 8px;
  824. }
  825. .uer-nickname {
  826. flex: 1;
  827. }
  828. </style>