index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/element/element.css">
  2. <link rel="stylesheet" href="__CDN__/assets/addons/shopro/libs/common.css">
  3. <style>
  4. #indexPage {
  5. font-family: Source Han Sans SC;
  6. padding: 0 20px 20px;
  7. background: #fff;
  8. border-radius: 10px 10px 0px 0px;
  9. }
  10. .shopro-screen-container {
  11. padding-top: 20px;
  12. }
  13. .shopro-reset-button {
  14. margin-right: 20px;
  15. }
  16. .title {
  17. height: 58px;
  18. line-height: 58px;
  19. font-weight: 600;
  20. font-size: 13px;
  21. }
  22. .btn-common {
  23. width: 80px;
  24. height: 30px;
  25. line-height: 30px;
  26. border-radius: 4px;
  27. font-size: 13px;
  28. text-align: center;
  29. cursor: pointer;
  30. display: inline-block;
  31. }
  32. .btn-box {
  33. margin-bottom: 20px;
  34. display: flex;
  35. justify-content: space-between;
  36. }
  37. .create-btn {
  38. background: #7536D0;
  39. color: #fff;
  40. width: 100px;
  41. height: 32px;
  42. line-height: 32px;
  43. }
  44. .operation-status {
  45. color: #7438D5;
  46. margin-right: 14px;
  47. cursor: pointer;
  48. }
  49. .table-header-bgcolor th {
  50. background-color: #f9f9f9 !important;
  51. padding: 8px 0;
  52. }
  53. .table-header-bgcolor th .cell {
  54. font-weight: 400;
  55. color: #444;
  56. }
  57. /* 搜索 筛选 */
  58. .screen-con {
  59. display: flex;
  60. }
  61. .header-input-item {
  62. margin-right: 30px;
  63. margin-bottom: 14px;
  64. width: 242px;
  65. }
  66. .header-input-item .header-input-tip {
  67. margin-right: 14px;
  68. }
  69. .header-input-item .el-input {
  70. width: 176px;
  71. }
  72. .shopro-pagination-container{
  73. justify-content: space-between;
  74. }
  75. .multiple-set-acitve-1,.multiple-set-acitve-2,.multiple-set-acitve-3{
  76. cursor: pointer;
  77. margin-right: 14px;
  78. }
  79. .multiple-set-acitve .multiple-set-acitve-1{
  80. color: #60CC9E;
  81. }
  82. .multiple-set-acitve .multiple-set-acitve-2{
  83. color: #ED655F;
  84. }
  85. .multiple-set-acitve .multiple-set-acitve-3{
  86. color: #7438D5
  87. }
  88. .shopro-pagination-container .shopro-edit-text{
  89. color: inherit;
  90. }
  91. .shopro-refresh-button{
  92. margin-bottom: 20px;
  93. margin-right: 20px;
  94. }
  95. .el-checkbox__inner:focus{
  96. border: none;
  97. outline: none;
  98. }
  99. .el-table--border th:first-child .cell{
  100. padding-left: 5px;
  101. }
  102. .multiple-set-item{
  103. color: #ccc;
  104. }
  105. .shopro-table-container .table-image{
  106. width: 60px;
  107. height: 60px;
  108. }
  109. .el-table td,
  110. .el-table th {
  111. padding: 10px 0 9px;
  112. }
  113. [v-cloak] {
  114. display: none
  115. }
  116. </style>
  117. <script src="__CDN__/assets/addons/shopro/libs/vue.js"></script>
  118. <script src="__CDN__/assets/addons/shopro/libs/element/element.js"></script>
  119. <script src="__CDN__/assets/addons/shopro/libs/moment.js"></script>
  120. <div id="indexPage" v-cloak v-loading="isAjax">
  121. <div class="shopro-screen-container">
  122. <div class="shopro-button shopro-refresh-button" @click="getListData">
  123. <i class="el-icon-refresh"></i>
  124. </div>
  125. <div class="display-flex shopro-screen-item">
  126. <div class="shopro-screen-tip">商品名称</div>
  127. <div class="shopro-screen-condition">
  128. <el-input placeholder="请输入商品名称" size="small" v-model="searchForm.goods_title"></el-input>
  129. </div>
  130. </div>
  131. <div class="display-flex shopro-screen-item">
  132. <div class="shopro-screen-tip">商品分类</div>
  133. <div class="shopro-screen-condition">
  134. <el-select v-model="searchForm.goods_type" placeholder="请选择商品分类" size="small">
  135. <el-option :label="goods.name" :value="goods.type" v-for="goods in goodTypeOptions">
  136. </el-option>
  137. </el-select>
  138. </div>
  139. </div>
  140. <div class="display-flex shopro-screen-item">
  141. <div class="shopro-screen-tip">活动类型</div>
  142. <div class="shopro-screen-condition">
  143. <el-select v-model="searchForm.activity_type" placeholder="请选择活动类型" size="small">
  144. <el-option :label="activity.name" :value="activity.type" v-for="activity in activityTypeOptions">
  145. </el-option>
  146. </el-select>
  147. </div>
  148. </div>
  149. <div class="display-flex shopro-screen-item">
  150. <div class="shopro-screen-tip">分销规则</div>
  151. <div class="shopro-screen-condition">
  152. <el-select v-model="searchForm.self_rules" placeholder="请选择分销规则" size="small">
  153. <el-option :label="rules.name" :value="rules.type" v-for="rules in commissionTypeOptions">
  154. </el-option>
  155. </el-select>
  156. </div>
  157. </div>
  158. <div class="display-flex shopro-screen-item">
  159. <div class="shopro-screen-tip">分销状态</div>
  160. <div class="shopro-screen-condition">
  161. <el-select v-model="searchForm.commission_goods_status" placeholder="请选择分销状态" size="small">
  162. <el-option :label="status.name" :value="status.type" v-for="status in commissionStatusOptions">
  163. </el-option>
  164. </el-select>
  165. </div>
  166. </div>
  167. <div class="display-flex shopro-screen-item-button">
  168. <div class="shopro-button shopro-reset-button" @click="screenEmpty">重置</div>
  169. <div class="shopro-button shopro-screen-button" @click="pageCurrentChange(1)">筛选</div>
  170. </div>
  171. </div>
  172. <div class="shopro-table-container" v-loading="tableAjax">
  173. <el-table ref="multipleTable" :data="listData" style="width: 100%" border stripe="true" :cell-class-name="tableCellClassName"
  174. :header-cell-class-name="tableCellClassName"
  175. @selection-change="handleSelectionChange">
  176. <el-table-column
  177. type="selection"
  178. width="55">
  179. </el-table-column>
  180. <el-table-column prop="id" label="ID" width="130">
  181. </el-table-column>
  182. <el-table-column prop="name" label="商品信息" min-width="300">
  183. <template slot-scope="scope">
  184. <div class="display-flex">
  185. <div class="table-image">
  186. <el-image :src="Fast.api.cdnurl(scope.row.image)" fit="contain">
  187. <div slot="error" class="image-slot">
  188. <i class="el-icon-picture-outline"></i>
  189. </div>
  190. </el-image>
  191. </div>
  192. <div>
  193. <div class="ellipsis-item" style="margin-top: 8px;line-height: 1;">
  194. {{scope.row.title}}
  195. </div>
  196. <div class="display-flex" style="margin-top: 14px;">
  197. <span v-if="scope.row.is_sku==1"
  198. style="color: #444;margin-right: 12px;line-height: 20px;">
  199. {{scope.row.is_sku==1?'多规格':''}}
  200. </span>
  201. <div v-if="scope.row.activity_type || scope.row.app_type" class="activity-type display-flex">
  202. <div v-if="scope.row.app_type" class="activity-tags full-activity-tag">
  203. {{scope.row.app_type_text}}
  204. </div>
  205. <template v-for="(b,a) in scope.row.activity_type_text_arr">
  206. <template v-if="a=='groupon'">
  207. <div class="activity-tags groupon-activity-tag">
  208. 拼团
  209. </div>
  210. </template>
  211. <div v-if="a=='seckill'" class="activity-tags seckill-activity-tag">{{b}}</div>
  212. <div v-if="a=='full_reduce' || a=='full_discount' || a=='free_shipping'"
  213. class="activity-tags full-activity-tag">{{b}}</div>
  214. </template>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </template>
  220. </el-table-column>
  221. <el-table-column label="分销规则" width="100">
  222. <template slot-scope="scope">
  223. <div v-if="scope.row.commission && scope.row.commission.status==1">
  224. <div v-if="scope.row.commission.self_rules==0">默认规则</div>
  225. <div v-if="scope.row.commission.self_rules==1">独立规则</div>
  226. <div v-if="scope.row.commission.self_rules==2">批量规则</div>
  227. </div>
  228. <div v-if="!scope.row.commission || (scope.row.commission && scope.row.commission.status==0)">
  229. -
  230. </div>
  231. </template>
  232. </el-table-column>
  233. <el-table-column label="操作" fixed="right" width="220">
  234. <template slot-scope="scope">
  235. <div>
  236. <span class="shopro-edit-text"
  237. @click="operation('edit',scope.row)">设置佣金</span>
  238. <span class="shopro-detail-text" v-if="scope.row.commission">
  239. <span v-if="scope.row.commission && scope.row.commission.status==0" @click="operation('join',scope.row)">参与</span>
  240. <span style="color:#ff5959;" v-if="scope.row.commission && scope.row.commission.status==1" @click="operation('nojoin',scope.row)">不参与</span>
  241. </span>
  242. <span class="shopro-detail-text" v-if="!scope.row.commission"
  243. @click="operation('join',scope.row)">参与</span>
  244. </div>
  245. </template>
  246. </el-table-column>
  247. </el-table>
  248. </div>
  249. <div class="shopro-pagination-container">
  250. <div class="display-flex">
  251. <div style="margin-right: 40px;"><el-checkbox v-model="allcheckeds" @change="changeAllcheckeds">批量设置</el-checkbox></div>
  252. <div class="display-flex multiple-set-item" :class="multipleSelection.length>0?'multiple-set-acitve':''">
  253. <div class="multiple-set-acitve-1" @click="operation('join',0)">参与</div>
  254. <div class="multiple-set-acitve-2" @click="operation('nojoin',0)">不参与</div>
  255. <div class="multiple-set-acitve-3" @click="operation('edit',0)">设置佣金</div>
  256. </div>
  257. </div>
  258. <el-pagination @size-change="pageSizeChange" @current-change="pageCurrentChange"
  259. :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="limit"
  260. layout="total, sizes, prev, pager, next, jumper" :total="totalPage" pager-count="5">
  261. </el-pagination>
  262. </div>
  263. </div>