details.php 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  1. <?php
  2. /**
  3. * @link:http://www.goodmall.com/
  4. * @copyright: Copyright (c) 2020
  5. * 名片
  6. * Author: james
  7. * Date: 2020-07-10
  8. * Time: 15:48
  9. */
  10. ?>
  11. <div id="app" v-cloak>
  12. <el-card shadow="never" style="border:0;min-width: 1400px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  13. <div slot="header">
  14. <span>基础详情页</span>
  15. </div>
  16. <div class="table-body body-main">
  17. <!-- 左侧视频 -->
  18. <div class="main-left">
  19. <video :src="detailsInfo.video_url" controls="controls" ref="videoPlayer" @loadedmetadata="handleMetadataLoaded">
  20. </video>
  21. <!-- 关联商品才显示商品信息 -->
  22. <div v-if="detailsInfo.related_type==1 && detailsInfo.goods.id" class="video-top">
  23. <div style="padding-right: 20px;">
  24. <image style="width: 70px;height: 70px;" mode="aspectFill" :src="detailsInfo.goods.cover_pic"></image>
  25. </div>
  26. <div class="top-right">
  27. <div class="top-title">{{detailsInfo.goods.name}}</div>
  28. <div class="wrapper">
  29. <div>商品id: </div>
  30. <div id="text">{{detailsInfo.goods.id}}</div>
  31. <textarea id="input" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  32. <el-button type="primary" size="mini" class="to-copy" @click="copyText()">复制</el-button>
  33. </div>
  34. <div class="detail-price">¥{{detailsInfo.goods.price}}</div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="main-right">
  39. <div class="">
  40. <el-form :model="form" label-width="100px">
  41. <el-form-item label="标题">
  42. <div>{{detailsInfo.title}}</div>
  43. </el-form-item>
  44. <el-form-item label="内容">
  45. <div>{{detailsInfo.content}}</div>
  46. </el-form-item>
  47. </el-form>
  48. <el-form :model="form" label-width="100px" style="display: flex;flex-wrap:wrap;">
  49. <el-row :gutter="20">
  50. <el-col :span="8">
  51. <el-form-item label="视频id">
  52. <div>{{detailsInfo.id}}</div>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :span="8">
  56. <el-form-item label="会员">
  57. <div>{{detailsInfo.nickname}}</div>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :span="8">
  61. <el-form-item label="发布时间">
  62. <div>{{detailsInfo.created_at|formatDate}}</div>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="8">
  66. <el-form-item label="审核时间">
  67. <div>{{detailsInfo.check_time|formatDate}}</div>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="8">
  71. <el-form-item label="视频时长">
  72. <div>{{detailsInfo.duration_seconds}}秒</div>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="8">
  76. <el-form-item label="状态">
  77. <div>{{detailsInfo.status}}</div>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="8">
  81. <el-form-item label="关联类型">
  82. <div v-if="detailsInfo.related_type==1">商品</div>
  83. <div v-if="detailsInfo.related_type==2">店铺</div>
  84. <div v-if="detailsInfo.related_type==3">地址</div>
  85. <div v-if="detailsInfo.related_type==4">暂无关联</div>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="8">
  89. <el-form-item label="分红比例">
  90. <div v-if="detailsInfo.share.share_type==2">{{detailsInfo.share.fixed_value}}元</div>
  91. <div v-else-if="detailsInfo.share.share_type==1">{{detailsInfo.share.percentage}}%</div>
  92. <div v-else>暂未开启</div>
  93. </el-form-item>
  94. </el-col>
  95. </el-row>
  96. </el-form>
  97. <el-form :model="form" label-width="100px" style="display: flex;flex-wrap:wrap;">
  98. <el-form-item label="标签" prop="status">
  99. <div style="margin: 20px 0">
  100. <el-button v-for="item in detailsInfo.label_list" type="primary" plain>{{item.name}}</el-button>
  101. </div>
  102. </el-form-item>
  103. </el-form>
  104. </div>
  105. <el-card class="box-card" v-loading="cardLoading" shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  106. <div class="form-body">
  107. <el-form size="small" label-width="150px">
  108. <el-row>
  109. <el-col :span="24">
  110. <el-form-item label="最大限制">
  111. <div>单条视频不能超过最大限制</div>
  112. </el-form-item>
  113. <el-form-item>
  114. <div class="demo-input-suffix agent-setting-item">
  115. <div class="agent-item-input">
  116. <div class="item-lab-title">总共</div>
  117. <el-input class="member-money repeat-input" v-model="detailsInfo.max_integral" placeholder="" :disabled="true">
  118. <template slot="append">积分</template>
  119. </el-input>
  120. </div>
  121. <div class="agent-item-input">
  122. <div class="item-lab-title">剩余积分</div>
  123. <el-input type="number" class="member-money repeat-input" v-model="detailsInfo.surplus_integral" placeholder="" :disabled="true">
  124. <!-- <template slot="append">%</template> -->
  125. </el-input>
  126. </div>
  127. <div class="agent-item-input item-mini">
  128. <div flex="cross:center">
  129. <el-radio v-model="integralMine" :label="false">增加</el-radio>
  130. <el-radio v-model="integralMine" :label="true">减少</el-radio>
  131. </div>
  132. <el-input type="number" class="repeat-input member-operation" v-model="form.operation_integral" :min="0.00" placeholder="">
  133. </el-input>
  134. </div>
  135. </div>
  136. </el-form-item>
  137. <el-form-item>
  138. <div class="demo-input-suffix agent-setting-item">
  139. <div class="agent-item-input">
  140. <div class="item-lab-title">总共</div>
  141. <el-input class="member-money repeat-input" v-model="detailsInfo.max_money" placeholder="" :disabled="true">
  142. <template slot="append">元</template>
  143. </el-input>
  144. </div>
  145. <div class="agent-item-input">
  146. <div class="item-lab-title">剩余金额</div>
  147. <el-input type="number" class="member-money repeat-input" v-model="detailsInfo.surplus_money" placeholder="" :disabled="true">
  148. <!-- <template slot="append">%</template> -->
  149. </el-input>
  150. </div>
  151. <div class="agent-item-input item-mini">
  152. <div flex="cross:center">
  153. <el-radio v-model="moneyMine" :label="false">增加</el-radio>
  154. <el-radio v-model="moneyMine" :label="true">减少</el-radio>
  155. </div>
  156. <!-- <el-button v-if="!moneyMine" type="primary" icon="el-icon-arrow-left" @click="operationMoney(false)">增加</el-button> -->
  157. <!-- <el-button v-if="moneyMine" type="info" icon="el-icon-arrow-left" @click="operationMoney(false)">增加</el-button> -->
  158. <el-input type="number" class="repeat-input member-operation" v-model="form.operation_money" :min="0.00" placeholder="">
  159. </el-input>
  160. <!-- <el-button v-if="!moneyMine" type="info" @click="operationMoney(true)" :disabled="form.operation_money>detailsInfo.surplus_money">减少<i class="el-icon-arrow-right el-icon--right"></i></el-button> -->
  161. <!-- <el-button v-if="moneyMine" type="primary" @click="operationMoney(true)" :disabled="form.operation_money>detailsInfo.surplus_money">减少<i class="el-icon-arrow-right el-icon--right"></i></el-button> -->
  162. </div>
  163. </div>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="24">
  167. <el-form-item label="用户观看奖励设置">
  168. <!-- <div>短视频直播带货八月分享购</div> -->
  169. </el-form-item>
  170. <el-form-item label="积分" prop="status">
  171. <el-switch v-model="form.open_integral_award" :active-value="1" :inactive-value="0" active-text="开启" inactive-text="关闭">
  172. </el-switch>
  173. <div v-if="form.open_integral_award==1" class="demo-input-suffix agent-setting-item">
  174. <div class="agent-item-input">
  175. <el-input class="member-money repeat-input" type="number" v-model="form.watch_integral_sum" :min="0" placeholder="">
  176. <template slot="append">积分</template>
  177. </el-input>
  178. </div>
  179. <div class="agent-item-input">
  180. <div class="item-lab-title">观看</div>
  181. <el-input type="number" :min="0" class="member-money repeat-input" v-model="form.watch_integral" placeholder="">
  182. <template slot="append">%</template>
  183. </el-input>
  184. </div>
  185. <div class="agent-item-input">
  186. <div class="item-lab-title">上级分享</div>
  187. <el-input type="number" :min="0" class="member-money repeat-input" v-model="form.watch_integral_one" placeholder="">
  188. <template slot="append">%</template>
  189. </el-input>
  190. </div>
  191. <!-- <div class="agent-item-input">
  192. <div class="item-lab-title">二级</div>
  193. <el-input type="number" :min="0" class="member-money repeat-input" v-model="form.watch_integral_two" placeholder="">
  194. <template slot="append">%</template>
  195. </el-input>
  196. </div> -->
  197. </div>
  198. </el-form-item>
  199. <el-form-item label="金额" prop="status">
  200. <el-switch v-model="form.open_money_award" :active-value="1" :inactive-value="0" active-text="开启" inactive-text="关闭">
  201. </el-switch>
  202. <div v-if="form.open_money_award==1" class="demo-input-suffix agent-setting-item">
  203. <div class="agent-item-input">
  204. <el-input class="member-money repeat-input" type="number" :min="0" v-model="form.watch_money_sum" placeholder="">
  205. <template slot="append">元</template>
  206. </el-input>
  207. </div>
  208. <div class="agent-item-input">
  209. <div class="item-lab-title">观看</div>
  210. <el-input type="number" :min="0" class="member-money repeat-input" v-model="form.watch_money" placeholder="">
  211. <template slot="append">%</template>
  212. </el-input>
  213. </div>
  214. <div class="agent-item-input">
  215. <div class="item-lab-title">上级分享</div>
  216. <el-input type="number" :min="0" class="member-money repeat-input" v-model="form.watch_money_one" placeholder="">
  217. <template slot="append">%</template>
  218. </el-input>
  219. </div>
  220. <!-- <div class="agent-item-input">
  221. <div class="item-lab-title">二级</div>
  222. <el-input type="number" :min="0" class="member-money repeat-input" v-model="form.watch_money_two" placeholder="">
  223. <template slot="append">%</template>
  224. </el-input>
  225. </div> -->
  226. </div>
  227. </el-form-item>
  228. </el-col>
  229. </el-row>
  230. <el-button class="button-item" :loading="btnLoading" type="primary" @click="editConfig" size="small">保存</el-button>
  231. </el-form>
  232. </div>
  233. </el-card>
  234. </div>
  235. </div>
  236. </el-card>
  237. <!-- 2.0 视频概况 -->
  238. <el-card shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  239. <!-- style="padding-top: 0;" -->
  240. <div class="table-body">
  241. <div slot="header">
  242. <span style="font-size: 25px;">视频概况</span>
  243. </div>
  244. <!-- <el-form size="small" :inline="true" flex="dir:left cross:center">
  245. <div class="item-box" flex="dir:left cross:center">
  246. <el-date-picker @change="changeVideoDataTime" v-model="video_time" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  247. </el-date-picker>
  248. </div>
  249. <div class="item-box" flex="dir:left cross:center">
  250. <el-button type="primary" style="padding: 9px 15px !important;" @click="videoSearchs">搜索
  251. </el-button>
  252. </div>
  253. </el-form> -->
  254. <div class="video_card">
  255. <el-row class="video-list" v-loading="loading">
  256. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  257. <div class="video-item-title">观看人数</div>
  258. <div class="video-item-num"><span>{{video_data.look_people_num}}</span>人</div>
  259. </el-col>
  260. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  261. <div class="video-item-title">收藏人数</div>
  262. <div class="video-item-num"><span>{{video_data.like_num}}</span>人</div>
  263. </el-col>
  264. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  265. <div class="video-item-title">分享次数</div>
  266. <div class="video-item-num"><span>{{video_data.share_num}}</span>次</div>
  267. </el-col>
  268. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  269. <div class="video-item-title">分享点击数</div>
  270. <div class="video-item-num"><span>{{video_data.share_click_num}}</span>次</div>
  271. </el-col>
  272. <!-- <el-col v-if="detailsInfo.related_type==1" :xs="24" :sm="6" :md="4" :lg="4">
  273. <div class="video-item-title">累计订单金额</div>
  274. <div class="video-item-num"><span>{{video_data.order_sum_money}}</span>元</div>
  275. </el-col> -->
  276. <el-col v-if="detailsInfo.related_type==1" :xs="24" :sm="6" :md="4" :lg="4">
  277. <div class="video-item-title">分红奖励</div>
  278. <div class="video-item-num"><span>{{video_data.dividend_money}}</span>元</div>
  279. </el-col>
  280. </el-row>
  281. </div>
  282. <div class="video_card">
  283. <div class="label video_card_title">观看奖励</div>
  284. <el-row class="video-list" v-loading="loading">
  285. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  286. <div class="video-item-title">积分</div>
  287. <div class="video-item-num"><span>{{video_data.look_integral_own}}</span>积分</div>
  288. </el-col>
  289. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  290. <div class="video-item-title">一级</div>
  291. <div class="video-item-num"><span>{{video_data.look_integral_one}}</span>积分</div>
  292. </el-col>
  293. <!-- <el-col :xs="24" :sm="6" :md="4" :lg="4">
  294. <div class="video-item-title">二级</div>
  295. <div class="video-item-num"><span>{{video_data.look_integral_two}}</span>积分</div>
  296. </el-col> -->
  297. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  298. <div class="video-item-title">金额</div>
  299. <div class="video-item-num"><span>{{video_data.look_money_own}}</span>元</div>
  300. </el-col>
  301. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  302. <div class="video-item-title">一级</div>
  303. <div class="video-item-num"><span>{{video_data.look_money_one}}</span>元</div>
  304. </el-col>
  305. <!-- <el-col :xs="24" :sm="6" :md="4" :lg="4">
  306. <div class="video-item-title">二级</div>
  307. <div class="video-item-num"><span>{{video_data.look_money_two}}</span>元</div>
  308. </el-col> -->
  309. </el-row>
  310. </div>
  311. <div v-if="detailsInfo.related_type==1" class="video_card">
  312. <div class="label video_card_title">订单数据</div>
  313. <el-row class="video-list" v-loading="loading">
  314. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  315. <div class="video-item-title">订单数量</div>
  316. <div class="video-item-num"><span>{{video_data.order_num}}</span>单</div>
  317. </el-col>
  318. <el-col :xs="24" :sm="6" :md="4" :lg="4">
  319. <div class="video-item-title">订单金额</div>
  320. <div class="video-item-num"><span>{{video_data.order_sum_money}}</span>元</div>
  321. </el-col>
  322. </el-row>
  323. </div>
  324. </div>
  325. </el-card>
  326. <!-- 2.1 视频交易转化 -->
  327. <!-- v-if="detailsInfo.related_type==1" -->
  328. <el-card v-if="detailsInfo.related_type==1" shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  329. <div class="table-body">
  330. <div slot="header">
  331. <span style="font-size: 25px;">视频交易转化</span>
  332. </div>
  333. <!-- <el-form size="small" :inline="true" flex="dir:left cross:center">
  334. <div class="item-box" flex="dir:left cross:center">
  335. <el-date-picker @change="changeTransactionTime" v-model="transaction_time" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  336. </el-date-picker>
  337. </div>
  338. <div class="item-box" flex="dir:left cross:center">
  339. <el-button type="primary" style="padding: 9px 15px !important;" @click="transactionSearchs">搜索
  340. </el-button>
  341. </div>
  342. </el-form> -->
  343. <div class="persen-main">
  344. <div class="persen-main-left">
  345. <div class="main-item item-one">
  346. <div class="item-data">
  347. <span class="data-title">观看人数</span>
  348. <span class="data-num">{{transaction_data.look_people_num||0}}</span>
  349. </div>
  350. </div>
  351. <div class="main-item item-two">
  352. <div class="item-data">
  353. <span class="data-title">完播人数</span>
  354. <span class="data-num">{{transaction_data.look_complete_num||0}}</span>
  355. <span class="data-persen">{{transaction_data.look_proportion||0}}%</span>
  356. </div>
  357. </div>
  358. <div class="main-item item-three">
  359. <div class="item-data">
  360. <span class="data-title">下单人数</span>
  361. <span class="data-num">{{transaction_data.order_people||0}}</span>
  362. <span class="data-persen">{{transaction_data.order_proportion||0}}%</span>
  363. </div>
  364. <div class="item-data">
  365. <span class="data-title">下单金额(元)</span>
  366. <span class="data-num">{{transaction_data.order_money||0}}</span>
  367. </div>
  368. </div>
  369. <div class="main-item item-four">
  370. <div class="item-data">
  371. <span class="data-title">支付客户数</span>
  372. <span class="data-num">{{transaction_data.pay_people||0}}</span>
  373. <span class="data-persen">{{transaction_data.pay_proportion||0}}%</span>
  374. </div>
  375. <div class="item-data">
  376. <span class="data-title">支付金额(元)</span>
  377. <span class="data-num">{{transaction_data.pay_money||0}}</span>
  378. <!-- <span class="data-persen">100%</span> -->
  379. </div>
  380. <div class="item-data">
  381. <span class="data-title">客单价(元)</span>
  382. <span class="data-num">{{transaction_data.pay_average_money||0}}</span>
  383. <!-- <span class="data-persen">100%</span> -->
  384. </div>
  385. </div>
  386. </div>
  387. <div class="persen-main-right">
  388. <div class="right-info">
  389. <div class="main-right-one">
  390. <div class="right-title">完播转换率</div>
  391. <div class="right-title">{{transaction_data.look_proportion||0}}%</div>
  392. </div>
  393. <div class="main-right-two">
  394. <div class="right-title">下单转换率</div>
  395. <div class="right-title">{{transaction_data.order_proportion||0}}%</div>
  396. </div>
  397. <div class="main-right-three">
  398. <div class="right-title">支付转换率</div>
  399. <div class="right-title">{{transaction_data.pay_proportion||0}}%</div>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. </el-card>
  406. <!-- 3.0 订单列表 -->
  407. <el-card v-if="detailsInfo.related_type==1" shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  408. <div class="table-body">
  409. <div slot="header" style="margin-bottom:20px;">
  410. <span style="font-size: 25px;">订单列表</span>
  411. </div>
  412. <el-form size="small" :inline="true" flex="dir:left cross:center">
  413. <div class="item-box" flex="dir:left cross:center">
  414. <div class="label">会员</div>
  415. <el-input style="width: 200px" v-model="search.nickname" placeholder="请输入会员呢称"></el-input>
  416. </div>
  417. <div class="item-box" flex="dir:left cross:center">
  418. <div class="label">创建时间</div>
  419. <el-date-picker v-model="time" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  420. </el-date-picker>
  421. </div>
  422. <div class="item-box" flex="dir:left cross:center">
  423. <el-button type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索
  424. </el-button>
  425. </div>
  426. </el-form>
  427. <el-tabs v-model="activeName" @tab-click="handleClick">
  428. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  429. <el-table-column label="商品" prop="goods_name" width="150" align="center">
  430. <template slot-scope="scope">
  431. <div class="order-goods-name">{{scope.row.goods_name}}</div>
  432. </template>
  433. </el-table-column>
  434. <el-table-column prop="avatar_url,nickname" label="会员" width="200">
  435. <template slot-scope="scope">
  436. <div flex="box:first">
  437. <div style="padding-right: 10px;">
  438. <com-image mode="aspectFill" :src="scope.row.avatar_url"></com-image>
  439. </div>
  440. <div flex="cross:top cross:center">
  441. {{scope.row.nickname}}
  442. </div>
  443. </div>
  444. </template>
  445. </el-table-column>
  446. <el-table-column label="订单时间" prop="created_at" width="150" align="center">
  447. <template slot-scope="scope">
  448. <div>{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  449. </template>
  450. </el-table-column>
  451. <el-table-column prop="order_no" label="订单编号" width="200" align="center"></el-table-column>
  452. <el-table-column prop="total_pay_price" label="订单金额" width="150" align="center"></el-table-column>
  453. <el-table-column prop="money" label="佣金(元)" width="150" align="center"></el-table-column>
  454. <el-table-column prop="award_money" label="分红奖励(元)" width="150" align="center"></el-table-column>
  455. <el-table-column prop="is_settlement" label="状态" align="center">
  456. <template slot-scope="scope">
  457. <div v-if="scope.row.is_settlement==1">已结算</div>
  458. <div v-if="scope.row.is_settlement==0">未结算</div>
  459. </template>
  460. </el-table-column>
  461. <el-table-column fixed="right" label="操作" width="160" align="center">
  462. <template slot-scope="scope">
  463. <el-button @click="toOrderDetail(scope.row.order_id)" type="text" size="small">查看详情</el-button>
  464. </template>
  465. </el-table-column>
  466. </el-table>
  467. </el-tabs>
  468. <!-- 分页器 -->
  469. <div flex="box:last cross:center">
  470. <div></div>
  471. <div>
  472. <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :page-count="pageCount">
  473. </el-pagination>
  474. </div>
  475. </div>
  476. </div>
  477. </el-card>
  478. </div>
  479. <script>
  480. const app = new Vue({
  481. el: '#app',
  482. data: {
  483. video_id: '', //视频id
  484. video_ids: '',
  485. detailsInfo: {}, //视频详情信息
  486. form: {}, //编辑的数据
  487. integralMine: false, //默认积分不是减少的操作
  488. moneyMine: false, //默认金额不是减少的操作
  489. totalIntegral: '', //总积分
  490. totalMoney: '', //总金额
  491. isMineIntegral: false, //操作积分方式,默认不是减小
  492. isMineMoney: false, //操作金额方式,默认不是减小
  493. page: 1,
  494. avatar: '',
  495. time: [], //本地存时间,请求时不发送
  496. search: {
  497. nickname: '', //昵称
  498. // title : '',//标题
  499. start_time: null,
  500. end_time: null,
  501. },
  502. loading: false,
  503. activeName: '-1',
  504. list: [], //列表数据
  505. recommend: [], //推荐标签列表
  506. pagination: null,
  507. btnLoading: false,
  508. cardLoading: false,
  509. video_time: [], //本地存时间,请求时不发送
  510. video_search: {
  511. start_time: null,
  512. end_time: null,
  513. },
  514. transaction_time: [], //本地存时间,请求时不发送
  515. transaction_search: {
  516. start_time: null,
  517. end_time: null,
  518. },
  519. transaction_data: {}, //视频转化返回数据
  520. video_data: { //视频概况数据
  521. dividend_money: 0,
  522. like_num: 0,
  523. look_integral_one: 0,
  524. look_integral_own: 0,
  525. look_integral_two: 0,
  526. look_money_one: 0,
  527. look_money_own: 0,
  528. look_money_two: 0,
  529. look_num: 0,
  530. order_money: 0,
  531. order_num: 0,
  532. order_sum_money: 0,
  533. share_click_num: 0,
  534. share_num: 0,
  535. },
  536. pageCount: 1, // 订单列表页码总数
  537. },
  538. filters: {
  539. // 秒级时间戳转标准时间格式
  540. formatDate: function(value) {
  541. let date = new Date(value * 1000);
  542. let y = date.getFullYear();
  543. let MM = date.getMonth() + 1;
  544. MM = MM < 10 ? ('0' + MM) : MM;
  545. let d = date.getDate();
  546. d = d < 10 ? ('0' + d) : d;
  547. let h = date.getHours();
  548. h = h < 10 ? ('0' + h) : h;
  549. let m = date.getMinutes();
  550. m = m < 10 ? ('0' + m) : m;
  551. let s = date.getSeconds();
  552. s = s < 10 ? ('0' + s) : s;
  553. return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
  554. },
  555. },
  556. mounted() {
  557. this.video_id = getQuery('video_id');
  558. this.getDetails();
  559. console.log(this.page, this.search, '///////////////')
  560. this.getVideoData(); //获取视频概况
  561. this.getTransactionData(); //获取视频交易转化
  562. // this.getVideoInfo();
  563. this.$nextTick(() => {
  564. const video = document.getElementById('myVideo');
  565. // if (element) {
  566. // // 进行你的操作
  567. // } else {
  568. // console.error('Element not found');
  569. // }
  570. console.log('video----',video);
  571. });
  572. },
  573. methods: {
  574. // 0.0.1 一键复制
  575. copyText() {
  576. var text = document.getElementById("text").innerText;
  577. var input = document.getElementById("input");
  578. input.value = text; // 修改文本框的内容
  579. input.select(); // 选中文本
  580. document.execCommand("copy"); // 执行浏览器复制命令
  581. this.$message.success('已成功复制商品id');
  582. },
  583. // 0.0.2 操作积分的方法-是否为减少
  584. operationIntegral(e) {
  585. if (!e) { //增加
  586. // this.totalIntegral = parseFloat(this.detailsInfo.surplus_integral) + parseFloat(this.form.operation_integral);
  587. } else {
  588. if (parseFloat(this.form.operation_integral) > parseFloat(this.detailsInfo.surplus_integral)) {
  589. this.$message.error('减少积分不可超过剩余积分');
  590. this.form.operation_integral = 0.00;
  591. return
  592. } else {
  593. // this.totalIntegral = parseFloat(this.detailsInfo.surplus_integral) - parseFloat(this.form.operation_integral);
  594. }
  595. }
  596. this.integralMine = e; //点击设置增加或减少的状态
  597. },
  598. // 0.0.2 操作金额的方法-是否为减少
  599. operationMoney(e) {
  600. if (!e) { //增加
  601. // this.totalMoney = parseFloat(this.detailsInfo.surplus_money) + parseFloat(this.form.operation_money);
  602. } else {
  603. if (parseFloat(this.form.operation_money) > parseFloat(this.detailsInfo.surplus_money)) {
  604. this.$message.error('减少金额不可超过剩余金额');
  605. this.form.operation_money = 0.00;
  606. return
  607. } else {
  608. // this.totalMoney = parseFloat(this.detailsInfo.surplus_money) - parseFloat(this.form.operation_money);
  609. }
  610. }
  611. this.moneyMine = e; //点击设置增加或减少的状态
  612. },
  613. // 编辑表单数据
  614. editConfig() {
  615. // console.log(this.form);
  616. let postData = {};
  617. postData['id'] = this.video_id;
  618. let operation_money_setting = !this.form.operation_money ? 0 : JSON.parse(JSON.stringify(parseInt(this.form.operation_money)));
  619. let operation_integral_setting = !this.form.operation_integral ? 0 : JSON.parse(JSON.stringify(parseInt(this.form.operation_integral)));
  620. postData['operation_money'] = this.moneyMine ? operation_money_setting * (-1) : operation_money_setting * 1;
  621. postData['operation_integral'] = this.integralMine ? operation_integral_setting * (-1) : operation_integral_setting * 1;
  622. postData['open_integral_award'] = parseInt(this.form.open_integral_award);
  623. postData['open_money_award'] = parseInt(this.form.open_money_award);
  624. postData['duration_seconds'] = this.form.duration_seconds;
  625. // 开关打开且不为100%
  626. if (this.form.open_integral_award == 1) {
  627. // postData['watch_integral_sum'] = parseInt(this.form.watch_integral_sum);
  628. postData['watch_integral_sum'] = this.form.watch_integral_sum;
  629. postData['watch_integral'] = !this.form.watch_integral ? 0 : JSON.parse(JSON.stringify(parseInt(this.form.watch_integral)));
  630. postData['watch_integral_one'] = !this.form.watch_integral_one ? 0 : JSON.parse(JSON.stringify(parseInt(this.form.watch_integral_one)));
  631. postData['watch_integral_two'] = !this.form.watch_integral_two ? 0 : JSON.parse(JSON.stringify(parseInt(this.form.watch_integral_two)));
  632. let watch_integral_percent = parseInt(postData.watch_integral) + parseInt(postData.watch_integral_one) + parseInt(postData.watch_integral_two);
  633. if (watch_integral_percent != 100) {
  634. this.$message.error('积分观看奖励设置比例累计应为100%');
  635. return
  636. }
  637. }
  638. if (this.form.open_money_award == 1) {
  639. // postData['watch_money_sum'] = parseInt(this.form.watch_money_sum);
  640. postData['watch_money_sum'] = this.form.watch_money_sum;
  641. postData['watch_money'] = !this.form.watch_money ? 0 : parseInt(this.form.watch_money);
  642. postData['watch_money_one'] = !this.form.watch_money_one ? 0 : parseInt(this.form.watch_money_one);
  643. postData['watch_money_two'] = !this.form.watch_money_two ? 0 : parseInt(this.form.watch_money_two);
  644. let watch_money_percent = parseInt(postData.watch_money) + parseInt(postData.watch_money_one) + parseInt(postData.watch_money_two);
  645. if (watch_money_percent != 100) {
  646. this.$message.error('金额观看奖励设置比例累计应为100%');
  647. return
  648. }
  649. }
  650. request({
  651. params: {
  652. r: 'short-video/default/video-detail',
  653. },
  654. method: 'post',
  655. data: {
  656. form: postData
  657. },
  658. }).then(e => {
  659. this.loading = false;
  660. this.integralMine = false;
  661. this.moneyMine = false;
  662. if (e.data.code === 0) {
  663. this.$message.success(e.data.msg);
  664. // 从新获取数据
  665. this.getDetails();
  666. } else {
  667. this.$message.error(e.data.msg);
  668. }
  669. }).catch(e => {});
  670. },
  671. // 1.0 获取订单列表
  672. loadData(page, others) {
  673. this.loading = true;
  674. // 检查是否选择了搜索时间
  675. if (!this.time) {
  676. this.search.start_time = '';
  677. this.search.end_time = '';
  678. } else {
  679. this.search.start_time = this.time[0];
  680. this.search.end_time = this.time[1];
  681. }
  682. request({
  683. params: {
  684. r: 'short-video/video/order-list',
  685. page: page,
  686. video_id: this.video_ids,
  687. ...others, //其他搜索字段
  688. },
  689. method: 'get',
  690. }).then(e => {
  691. this.loading = false;
  692. if (e.data.code === 0) {
  693. this.list = e.data.data.list;
  694. this.pagination = e.data.data.pagination;
  695. this.pageCount = e.data.data.page_count;
  696. } else {
  697. this.$message.error(e.data.msg);
  698. }
  699. }).catch(e => {});
  700. },
  701. // 1.2 获取视频概况
  702. getVideoData(others) {
  703. this.loading = true;
  704. request({
  705. params: {
  706. r: 'short-video/video/video-data',
  707. id: this.video_id,
  708. ...others, //其他搜索字段
  709. },
  710. method: 'get',
  711. }).then(e => {
  712. this.loading = false;
  713. if (e.data.code === 0) {
  714. this.video_data = e.data.data;
  715. } else {
  716. this.$message.error(e.data.msg);
  717. }
  718. }).catch(e => {});
  719. },
  720. // 1.3 获取视频交易转化
  721. getTransactionData(others) {
  722. this.loading = true;
  723. request({
  724. method: 'get',
  725. params: {
  726. r: 'short-video/video/video-transaction',
  727. id: this.video_id,
  728. ...others, //其他搜索字段
  729. },
  730. }).then(e => {
  731. this.loading = false;
  732. if (e.data.code === 0) {
  733. this.transaction_data = e.data.data;
  734. } else {
  735. this.$message.error(e.data.msg);
  736. }
  737. }).catch(e => {});
  738. },
  739. // 1.0 获取视频详情
  740. getDetails() {
  741. this.loading = true;
  742. request({
  743. params: {
  744. r: 'short-video/default/video-detail',
  745. id: this.video_id
  746. },
  747. method: 'get',
  748. }).then(e => {
  749. this.loading = false;
  750. if (e.data.code === 0) {
  751. this.video_ids = e.data.data.id;
  752. this.loadData(this.page, this.search); //获取列表数据
  753. this.detailsInfo = e.data.data;
  754. // 构造本地的编辑数据对象
  755. let form = {};
  756. form['operation_integral'] = !!e.data.data.operation_integral ? e.data.data.operation_integral : 0;
  757. form['operation_money'] = !!e.data.data.operation_money ? e.data.data.operation_money : 0;
  758. form['open_integral_award'] = e.data.data.open_integral_award;
  759. form['open_money_award'] = e.data.data.open_money_award;
  760. form['watch_integral_sum'] = !!e.data.data.watch_integral_sum ? e.data.data.watch_integral_sum : 0;
  761. form['watch_integral'] = !!e.data.data.watch_integral ? e.data.data.watch_integral : 0;
  762. form['watch_integral_one'] = !!e.data.data.watch_integral_one ? e.data.data.watch_integral_one : 0;
  763. form['watch_integral_two'] = !!e.data.data.watch_integral_two ? e.data.data.watch_integral_two : 0;
  764. form['watch_money_sum'] = !!e.data.data.watch_money_sum ? e.data.data.watch_money_sum : 0;
  765. form['watch_money'] = !!e.data.data.watch_money ? e.data.data.watch_money : 0;
  766. form['watch_money_one'] = !!e.data.data.watch_money_one ? e.data.data.watch_money_one : 0;
  767. form['watch_money_two'] = !!e.data.data.watch_money_two ? e.data.data.watch_money_two : 0;
  768. console.log(form);
  769. this.form = form;
  770. this.totalIntegral = parseFloat(this.detailsInfo.surplus_integral) + parseFloat(this.form.operation_integral); //总积分
  771. this.totalMoney = parseFloat(this.detailsInfo.surplus_money) + parseFloat(this.form.operation_money); //总金额
  772. } else {
  773. this.$message.error(e.data.msg);
  774. }
  775. }).catch(e => {});
  776. },
  777. pageChange(page) {
  778. this.page = page;
  779. this.loadData(this.page, this.search);
  780. },
  781. handleClick(tab, event) {
  782. this.page = 1;
  783. this.search.status = this.activeName;
  784. this.loadData(this.page, this.search);
  785. },
  786. handleSelectionChange(val) {
  787. let self = this;
  788. self.choose_list = [];
  789. val.forEach(function(item) {
  790. self.choose_list.push(item.id);
  791. })
  792. },
  793. searchs() {
  794. this.page = 1;
  795. this.loadData(this.page, this.search);
  796. },
  797. // 视频概况搜索
  798. videoSearchs() {
  799. this.getVideoData(this.video_search);
  800. },
  801. // 搜搜视频交易转化
  802. transactionSearchs() {
  803. this.getTransactionData(this.transaction_search);
  804. },
  805. // 3.0 跳转订单详情
  806. toOrderDetail(id) {
  807. this.$navigate({
  808. r: 'mall/order/index',
  809. order_id: id
  810. })
  811. },
  812. changeVideoDataTime() {
  813. if (this.video_time) {
  814. this.video_search.start_time = this.video_time[0];
  815. this.video_search.end_time = this.video_time[1];
  816. } else {
  817. this.video_time = [];
  818. this.video_search.start_time = null;
  819. this.video_search.end_time = null;
  820. }
  821. },
  822. changeTransactionTime() {
  823. if (this.transaction_time) {
  824. this.transaction_search.start_time = this.transaction_time[0];
  825. this.transaction_search.end_time = this.transaction_time[1];
  826. } else {
  827. this.transaction_time = [];
  828. this.transaction_search.start_time = null;
  829. this.transaction_search.end_time = null;
  830. }
  831. },
  832. getVideoInfo(){
  833. this.$nextTick(() => {
  834. const video = document.getElementById('myVideo');
  835. // if (element) {
  836. // // 进行你的操作
  837. // } else {
  838. // console.error('Element not found');
  839. // }
  840. console.log('video',video);
  841. });
  842. // video.addEventListener('loadedmetadata', () => {
  843. // // this.duration = video.duration; // 获取视频时长,单位为秒
  844. // console.log('duration----', video.duration);
  845. // });
  846. },
  847. handleMetadataLoaded() {
  848. this.form.duration_seconds = this.$refs.videoPlayer.duration;
  849. // this.duration = this.$refs.videoPlayer.duration;
  850. // console.log('duration----', this.$refs.videoPlayer.duration);
  851. }
  852. }
  853. });
  854. </script>
  855. <style>
  856. .persen-main {
  857. position: relative;
  858. margin: 20px 0;
  859. }
  860. .persen-main-left {
  861. width: 70%;
  862. }
  863. .persen-main-left .main-item {
  864. margin-bottom: 2px;
  865. height: 80px;
  866. padding: 16px 30px;
  867. box-sizing: border-box;
  868. display: flex;
  869. }
  870. .item-one,
  871. .item-three {
  872. background: #edf4ff;
  873. }
  874. .item-two {
  875. background: #f0faf2;
  876. }
  877. .item-four {
  878. background: #fff7e8;
  879. }
  880. .main-item .item-data {
  881. position: relative;
  882. display: flex;
  883. flex-direction: column;
  884. justify-content: space-between;
  885. height: 40px;
  886. padding-right: 50px;
  887. margin-right: 60px;
  888. }
  889. .main-item .item-data span {
  890. font-size: 14px;
  891. line-height: 16px;
  892. }
  893. .main-item .item-data .data-title,
  894. .main-item .item-data .data-persen {
  895. color: #C0C4CC;
  896. }
  897. .main-item .item-data .data-persen {
  898. position: absolute;
  899. font-size: 12px;
  900. top: -1px;
  901. right: 0;
  902. }
  903. .persen-main-right {
  904. height: 405px;
  905. background-image: url(resources/img/plugins/short_video/persen-bg.png);
  906. /* background-image: url(https://img.yzcdn.cn/retail/img/data/conversion-bg.png); */
  907. background-repeat: no-repeat;
  908. background-size: cover;
  909. width: 560px;
  910. position: absolute;
  911. top: -55px;
  912. left: 56%;
  913. }
  914. .right-info {
  915. position: relative;
  916. width: 500px;
  917. height: 327px;
  918. /* background-color: #ccc; */
  919. }
  920. .right-info .main-right-one {
  921. position: absolute;
  922. top: 122px;
  923. right: 80px;
  924. }
  925. .right-info .main-right-two {
  926. position: absolute;
  927. top: 240px;
  928. right: 100px;
  929. }
  930. .right-info .main-right-three {
  931. position: absolute;
  932. top: 342px;
  933. right: 140px;
  934. }
  935. .el-tabs__header {
  936. font-size: 16px;
  937. }
  938. .table-body {
  939. padding: 20px;
  940. background-color: #fff;
  941. }
  942. .table-body .el-button {
  943. /* padding: 0 !important; */
  944. border: 0;
  945. margin: 0 5px;
  946. }
  947. .input-item {
  948. width: 250px;
  949. margin: 0 0 20px;
  950. display: inline-block;
  951. }
  952. .input-item .el-input__inner {
  953. border-right: 0;
  954. }
  955. .input-item .el-input__inner:hover {
  956. border: 1px solid #dcdfe6;
  957. border-right: 0;
  958. outline: 0;
  959. }
  960. .input-item .el-input__inner:focus {
  961. border: 1px solid #dcdfe6;
  962. border-right: 0;
  963. outline: 0;
  964. }
  965. .input-item .el-input-group__append {
  966. background-color: #fff;
  967. border-left: 0;
  968. width: 10%;
  969. padding: 0;
  970. }
  971. .input-item .el-input-group__append .el-button {
  972. padding: 0;
  973. }
  974. .input-item .el-input-group__append .el-button {
  975. margin: 0;
  976. }
  977. .batch {
  978. margin: 0 0 20px;
  979. display: inline-block;
  980. }
  981. .batch .el-button {
  982. padding: 9px 15px !important;
  983. }
  984. .item-box {
  985. margin-right: 20px;
  986. }
  987. .item-box .label {
  988. margin-right: 8px;
  989. }
  990. .body-main {
  991. margin-bottom: 20px;
  992. display: flex;
  993. }
  994. .body-main .main-left {
  995. width: 22%;
  996. position: relative;
  997. }
  998. .body-main .main-left video {
  999. /* position: absolute;
  1000. z-index: 10;
  1001. top: 0; */
  1002. width: 100%;
  1003. }
  1004. .body-main .main-left .video-top {
  1005. /* position: absolute;
  1006. z-index: 99;
  1007. top: 0; */
  1008. width: 100%;
  1009. display: flex;
  1010. align-items: flex-start;
  1011. box-sizing: border-box;
  1012. padding: 20px;
  1013. /* opacity: .5; */
  1014. background-color: #FFFFFF;
  1015. }
  1016. .body-main .main-left .video-top .top-right {
  1017. line-height: 26px;
  1018. }
  1019. .body-main .main-left .video-top .top-right .top-title {
  1020. font-size: 18px;
  1021. white-space: nowrap;
  1022. overflow: hidden;
  1023. text-overflow: ellipsis;
  1024. width: 260px;
  1025. }
  1026. .body-main .main-left .video-top .top-right .wrapper {
  1027. display: flex;
  1028. /* align-items: flex-start; */
  1029. }
  1030. .body-main .main-left .video-top .top-right .wrapper .to-copy {
  1031. /* color: #03C5FF; */
  1032. margin-left: 20px;
  1033. }
  1034. .body-main .main-left .video-top .top-right .detail-price {
  1035. color: #BC0100;
  1036. font-size: 18px;
  1037. font-family: Microsoft YaHei;
  1038. font-weight: bold;
  1039. }
  1040. .body-main .main-right {
  1041. width: 78%;
  1042. box-sizing: border-box;
  1043. padding-left: 60px;
  1044. }
  1045. .form-button {
  1046. margin: 0;
  1047. }
  1048. .form-button .el-form-item__content {
  1049. margin-left: 0 !important;
  1050. }
  1051. .button-item {
  1052. padding: 9px 25px;
  1053. /* width: 66px; */
  1054. height: 38px;
  1055. }
  1056. .demo-input-suffix {
  1057. display: flex;
  1058. }
  1059. .demo-input-suffix .member-money {
  1060. width: 160px;
  1061. margin-right: 20px;
  1062. }
  1063. .member-operation {
  1064. width: 160px;
  1065. margin-left: 20px;
  1066. margin-right: 0;
  1067. }
  1068. .agent-setting-item,
  1069. .agent-item-input {
  1070. display: flex;
  1071. font-size: 14px;
  1072. color: #606266;
  1073. }
  1074. .agent-setting-item .agent-setting-item-lab {
  1075. margin-right: 30px;
  1076. }
  1077. .agent-setting-item .item-lab-title {
  1078. margin-right: 12px;
  1079. white-space: nowrap;
  1080. }
  1081. .agent-setting-item {
  1082. margin-top: 18px;
  1083. }
  1084. .agent-setting-item:first-child {
  1085. margin-top: 0;
  1086. }
  1087. .demo-input-suffix .repeat-input {
  1088. /* width: 100px; */
  1089. }
  1090. .order-goods-name {
  1091. white-space: nowrap;
  1092. overflow: hidden;
  1093. text-overflow: ellipsis;
  1094. }
  1095. /* 视频概况 */
  1096. .video-list {
  1097. padding: 20px 0 30px;
  1098. }
  1099. .video-item-title,
  1100. .video-item-num {
  1101. color: #C0C4CC;
  1102. }
  1103. .video-item-num {
  1104. margin-top: 10px;
  1105. }
  1106. .video-item-num span {
  1107. font-size: 30px;
  1108. color: #303133;
  1109. }
  1110. .video_card_title {
  1111. margin-bottom: -10px;
  1112. }
  1113. .item-mini {
  1114. margin-left: 20px;
  1115. }
  1116. .el-table th>.cell {
  1117. color: #333;
  1118. font-weight: bold;
  1119. font-size: 14px;
  1120. }
  1121. .el-table__footer-wrapper,
  1122. .el-table__header-wrapper {
  1123. border-bottom: 1.4px solid #D6D6D6;
  1124. }
  1125. </style>