企微助手 ,仓库名 短剧

transferRecord.vue 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <div v-loading="loading">
  3. <div class="backBox" @click="goBack">
  4. <div class="back">
  5. <i class="el-icon-back"></i>
  6. <span class="back_main_title">{{type=='off'?'离职迁移':type=='on'?'在职迁移':'返回'}}/</span><span>分配记录</span>
  7. </div>
  8. </div>
  9. <div class="self-hint" style="margin-bottom:10px">
  10. <i class="el-icon-message-solid"></i>
  11. <div>由于企业微信限制,列表仅展示在{{$store.state.simpleName}}操作的分配记录,{{$store.state.simpleName}}分配记录将不会展示</div>
  12. </div>
  13. <div class="screenBox">
  14. <!-- 搜索客户 -->
  15. <self-input :reset='resetFlag' @inputChange='(val)=>{input_keyword = val;init(1)}'></self-input>
  16. <!-- 所属客服 -->
  17. <service-single title='接替员工' :reset='resetFlag' @customerDefine="serviceSingleEvent"></service-single>
  18. <!-- 添加时间 -->
  19. <date-picker title="分配时间" :reset='resetFlag' @changeTime="changeTime"></date-picker>
  20. <!-- 转接状态 -->
  21. <self-channel title="转接状态" :reset='resetFlag' type='assignment_status' @channelDefine="(val)=>{assignment_status = val;init(1)}"></self-channel>
  22. <div class="reset" @click="resetEvent">重置</div>
  23. </div>
  24. <div class="tableInfo">
  25. <div>
  26. <div class="flex">
  27. <i class="el-icon-user-solid"></i>
  28. <div class="totalCustom">共有<span>{{total}}</span>个已分配客户</div>
  29. </div>
  30. </div>
  31. </div>
  32. <!-- table -->
  33. <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%">
  34. <el-table-column prop="customer_name" label="客户名称" show-overflow-tooltip align="center"></el-table-column>
  35. <el-table-column prop="takeover_userid" label="接替员工" show-overflow-tooltip align="center"></el-table-column>
  36. <el-table-column label="转接状态" align="center">
  37. <template slot-scope="scope">
  38. <span v-if="scope.row.status==1">已转接</span>
  39. <span v-if="scope.row.status==2">客户转接中</span>
  40. <span v-if="scope.row.status==3">客户已拒绝</span>
  41. <span v-if="scope.row.status==4">接替成员客户达到上限</span>
  42. <span v-if="scope.row.status==5">无接替记录</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="takeover_time" label="分配时间" show-overflow-tooltip align="center"></el-table-column>
  46. <el-table-column label="操作" align="center">
  47. <template slot-scope="scope">
  48. <div class="flex" style="justify-content:center">
  49. <div class="c-00B38A pointer" style="margin:0 6px" v-if="scope.row.takeover_userid" @click="showDetial(scope.row)">详情</div>
  50. </div>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. <div class="pagination" v-show="total>0">
  55. <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pages)'>
  56. </el-pagination>
  57. </div>
  58. <!--详情-->
  59. <el-drawer :size="drawerSize" :visible.sync="detialDrawer" :with-header="false">
  60. <detial @changeDrawerSize="changeDrawerSize" @closeDrawer="closeDrawer" :rowProp="{
  61. customer_id:rowPro.customer_id,
  62. user_id:rowPro.takeover_userid
  63. }" ref="detial"></detial>
  64. </el-drawer>
  65. </div>
  66. </template>
  67. <script>
  68. import selfInput from '@/components/assembly/screen/input.vue'
  69. import datePicker from '@/components/assembly/screen/datePicker.vue'
  70. import serviceSingle from '@/components/assembly/screen/serviceSingle.vue'
  71. import selfChannel from '@/components/assembly/screen/channel.vue'
  72. import detial from '@/components/detials/index.vue'
  73. export default {
  74. components: { selfInput, datePicker, serviceSingle, selfChannel, detial },
  75. data () {
  76. return {
  77. type: '',
  78. loading: false,
  79. page: 1,
  80. pages: 0,
  81. total: 0,
  82. page_size: 20,
  83. input_keyword: '',
  84. resetFlag: false,
  85. tableData: [],
  86. transfer_time: [],
  87. user_id: '',
  88. assignment_status: '',
  89. drawerSize: '60%',
  90. detialDrawer: false,
  91. rowPro: {},//去详情的此条对象
  92. }
  93. },
  94. created () {
  95. this.type = this.$route.params.type;
  96. this.init(1)
  97. },
  98. methods: {
  99. changeDrawerSize () {
  100. this.drawerSize = this.drawerSize == '100%' ? '60%' : '100%'
  101. },
  102. closeDrawer () {
  103. this.detialDrawer = false
  104. },
  105. showDetial (row) {
  106. this.rowPro = row
  107. this.drawerSize = '60%'
  108. this.detialDrawer = true
  109. this.$nextTick(() => {
  110. this.$refs.detial.acIdx = 0
  111. this.$refs.detial.init()
  112. })
  113. },
  114. serviceSingleEvent (val) {
  115. if (val && val.user_id) {
  116. this.user_id = val.user_id
  117. } else {
  118. this.user_id = ''
  119. }
  120. this.init(1)
  121. },
  122. goBack () {
  123. localStorage.setItem('transter', this.type)
  124. this.$router.go(-1)
  125. },
  126. changeTime (time) {//筛选时间变化
  127. if (!time || time && time.length == 0) {
  128. this.transfer_time = [];
  129. } else {
  130. this.transfer_time = time;
  131. }
  132. this.init(1)
  133. },
  134. resetEvent () {//重置
  135. this.resetFlag = !this.resetFlag
  136. this.input_keyword = '';
  137. this.user_id = '';
  138. this.assignment_status = '';
  139. this.transfer_time = [];
  140. this.init(1)
  141. },
  142. init (page) {
  143. this.page = page ? page : this.page;
  144. this.loading = true
  145. this.$axios.get(this.URL.BASEURL + this.URL.customerAssignmentList, {
  146. params: {
  147. assignment_date_start: this.transfer_time && this.transfer_time.length > 1 ? this.transfer_time[0] : '',
  148. assignment_date_end: this.transfer_time && this.transfer_time.length > 1 ? this.transfer_time[1] : '',
  149. customer_name: this.input_keyword,
  150. page: this.page,
  151. page_size: this.page_size,
  152. type: this.type == 'off' ? 2 : 1,
  153. user_id: this.user_id,
  154. assignment_status: this.assignment_status
  155. }
  156. }).then((res) => {
  157. var res = res.data
  158. this.loading = false
  159. if (res && res.errno == 0) {
  160. this.tableData = res.rst.data;
  161. this.total = res.rst.pageInfo.total;
  162. this.pages = res.rst.pageInfo.pages;
  163. } else if (res.errno != 4002) {
  164. this.$message({
  165. message: res.err,
  166. type: "warning"
  167. })
  168. }
  169. }).catch((err) => {
  170. this.loading = false
  171. });
  172. },
  173. handleCurrentChange (val) {
  174. this.init(val)
  175. }
  176. }
  177. }
  178. </script>
  179. <style lang="scss" scoped>
  180. @import "@/style/list.scss";
  181. .screenBox .common-screen-item {
  182. width: inherit;
  183. }
  184. .tableInfo {
  185. height: 50px;
  186. }
  187. .backBox {
  188. background: #ffffff;
  189. padding: 15px;
  190. margin-bottom: 10px;
  191. .back {
  192. font-size: 14px;
  193. line-height: 20px;
  194. color: #333333;
  195. cursor: pointer;
  196. display: inline-block;
  197. i {
  198. font-size: 16px;
  199. }
  200. .back_main_title {
  201. font-size: 16px;
  202. font-weight: bold;
  203. }
  204. }
  205. }
  206. </style>