operation.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <template>
  2. <div class="operation">
  3. <el-form
  4. class="operationForm"
  5. ref="OperationRef"
  6. :model="form"
  7. label-width="auto"
  8. >
  9. <el-row :gutter="20">
  10. <el-col :span="8">
  11. <el-form-item label="业务员" class="formItem">
  12. <el-input v-model="form.operation" placeholder="输入姓名、手机号、工号查找"></el-input>
  13. </el-form-item>
  14. </el-col>
  15. <el-col :span="8">
  16. <el-form-item label="归属机构" class="formItem">
  17. <el-cascader style="width: 100%" v-model="form.organization" :options="options" />
  18. </el-form-item>
  19. </el-col>
  20. <el-col :span="8">
  21. <el-form-item label="类型" class="formItem">
  22. <el-select v-model="form.type">
  23. <el-option key="1" value="type1"></el-option>
  24. <el-option key="2" value="type2"></el-option>
  25. <el-option key="3" value="type3"></el-option>
  26. </el-select>
  27. </el-form-item>
  28. </el-col>
  29. </el-row>
  30. <el-row :gutter="20">
  31. <el-col :span="8">
  32. <el-form-item label="所属" class="formItem">
  33. <el-input v-model="form.belong" placeholder="渠道、团队、电销组名称查找"></el-input>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="8">
  37. <el-form-item label="人员状态" class="formItem">
  38. <el-select v-model="form.staffState">
  39. <el-option key="1" value="type1"></el-option>
  40. <el-option key="2" value="type2"></el-option>
  41. <el-option key="3" value="type3"></el-option>
  42. </el-select>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="8">
  46. <el-form-item label="账号状态" class="formItem">
  47. <el-select v-model="form.accountState">
  48. <el-option key="1" value="type1"></el-option>
  49. <el-option key="2" value="type2"></el-option>
  50. <el-option key="3" value="type3"></el-option>
  51. </el-select>
  52. </el-form-item>
  53. </el-col>
  54. </el-row>
  55. <el-row :gutter="20">
  56. <el-col :span="8">
  57. <el-form-item label="管理人" class="formItem">
  58. <el-input v-model="form.person" placeholder="管理人姓名、工号"></el-input>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="8">
  62. <el-button type="primary" @click="search()">查询</el-button>
  63. <el-button type="primary" plain @click="reset()">重置</el-button>
  64. </el-col>
  65. </el-row>
  66. </el-form>
  67. <el-row :gutter="20" style="margin: 20px 0" flex>
  68. <el-col :span="3" style="display: flex">
  69. <el-checkbox @change="selectAll"></el-checkbox>&nbsp;
  70. <el-select class="select-all" placeholder="全选" v-model="selectType" style="width: 120px">
  71. <el-option key="all" value="选中所有数据"></el-option>
  72. <el-option key="cur" value="选中本页数据"></el-option>
  73. </el-select>
  74. </el-col>
  75. <el-col :span="2">
  76. <el-button type="primary" icon="plus" @click="addNumber">添加成员</el-button>
  77. </el-col>
  78. <el-col :span="2">
  79. <el-dropdown trigger="click" placement="bottom" @command="dropdownCommand">
  80. <el-button>批量管理</el-button>
  81. <template #dropdown>
  82. <el-dropdown-menu>
  83. <el-dropdown-item command="启用">启用</el-dropdown-item>
  84. <el-dropdown-item command="禁用">禁用</el-dropdown-item>
  85. <el-dropdown-item command="删除">删除</el-dropdown-item>
  86. <el-dropdown-item command="分配管理人">分配管理人</el-dropdown-item>
  87. </el-dropdown-menu>
  88. </template>
  89. </el-dropdown>
  90. </el-col>
  91. </el-row>
  92. <el-table
  93. :data="tableData"
  94. height="460"
  95. >
  96. <el-table-column type="selection" width="55"></el-table-column>
  97. <el-table-column label="姓名" prop="name" width="80"></el-table-column>
  98. <el-table-column label="手机号" prop="" width="150"></el-table-column>
  99. <el-table-column label="工号" prop="" width="200"></el-table-column>
  100. <el-table-column label="类型" prop="" width="100"></el-table-column>
  101. <el-table-column label="归属" prop="" width="200"></el-table-column>
  102. <el-table-column label="所属机构" prop="" width="200"></el-table-column>
  103. <el-table-column label="人员状态" prop="" width="150"></el-table-column>
  104. <el-table-column label="账号状态" prop="" width="150"></el-table-column>
  105. <el-table-column label="管理人" prop="" width="150"></el-table-column>
  106. <el-table-column label="管理人工号" prop="" width="200"></el-table-column>
  107. <el-table-column label="推荐人" prop="" width="150"></el-table-column>
  108. <el-table-column label="推荐人工号" prop="" width="200"></el-table-column>
  109. <el-table-column fixed="right" label="操作" width="120">
  110. <template #default="scope">
  111. <div style="display: flex; align-items: center; justify-content: space-between">
  112. <a style="color: #409EFF; cursor: pointer" @click="showDetail(scope)">详情</a>&nbsp;
  113. <el-dropdown placement="bottom" trigger="click" @command="tableDataCommand(scope, $event)">
  114. <a style="color: #409EFF; cursor: pointer">更多</a>
  115. <template #dropdown>
  116. <el-dropdown-menu>
  117. <el-dropdown-item command="编辑">编辑</el-dropdown-item>
  118. <el-dropdown-item command="启用">启用</el-dropdown-item>
  119. <el-dropdown-item command="禁用">禁用</el-dropdown-item>
  120. <el-dropdown-item command="删除">删除</el-dropdown-item>
  121. <el-dropdown-item command="分配管理人">分配管理人</el-dropdown-item>
  122. <el-dropdown-item command="添加银行卡">添加银行卡</el-dropdown-item>
  123. </el-dropdown-menu>
  124. </template>
  125. </el-dropdown>
  126. </div>
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. <div style="display: flex; justify-content: center; margin-top: 15px">
  131. <el-pagination
  132. v-model:current-page="currentPage"
  133. v-model:page-size="pageSize"
  134. :page-sizes="[10, 20, 30, 40]"
  135. layout="total, sizes, prev, pager, next, jumper"
  136. :total="400"
  137. @size-change="handleSizeChange"
  138. @current-change="handleCurrentChange"
  139. />
  140. </div>
  141. <el-dialog
  142. v-model="dialogShow"
  143. :title="title"
  144. width="1000"
  145. >
  146. <addOperation></addOperation>
  147. <template #footer>
  148. <div>
  149. <el-button plain @click="() => { dialogShow = false }">取消</el-button>
  150. <el-button type="primary">确定</el-button>
  151. </div>
  152. </template>
  153. </el-dialog>
  154. <el-dialog
  155. v-model="bankCardDialogShow"
  156. title="添加银行卡"
  157. width="500"
  158. >
  159. <addCard></addCard>
  160. <template #footer>
  161. <div>
  162. <el-button plain @click="() => { bankCardDialogShow = false }">取消</el-button>
  163. <el-button type="primary">确定</el-button>
  164. </div>
  165. </template>
  166. </el-dialog>
  167. <el-dialog
  168. v-model="allocationShow"
  169. title="分配管理人"
  170. width="800"
  171. >
  172. <allocation></allocation>
  173. </el-dialog>
  174. </div>
  175. </template>
  176. <script setup lang="ts">
  177. import { ref } from 'vue'
  178. import { useRouter } from 'vue-router'
  179. import addOperation from './modules/addOperation.vue'
  180. import addCard from './modules/addCard.vue'
  181. import allocation from './modules/allocation.vue'
  182. import { ElMessageBox, ElMessage } from 'element-plus'
  183. import Allocation from "@/views/operationManagement/modules/allocation.vue";
  184. let muRouter = useRouter()
  185. // 查询条件
  186. let form = ref({
  187. operation: '',
  188. organization: [],
  189. type: '',
  190. belong: '',
  191. staffState: '',
  192. accountState: '',
  193. person: ''
  194. })
  195. let options = [
  196. {
  197. value: 'guide',
  198. label: 'Guide',
  199. children: [
  200. {
  201. value: 'disciplines',
  202. label: 'Disciplines',
  203. children: [
  204. {
  205. value: 'consistency',
  206. label: 'Consistency',
  207. },
  208. {
  209. value: 'feedback',
  210. label: 'Feedback',
  211. },
  212. {
  213. value: 'efficiency',
  214. label: 'Efficiency',
  215. },
  216. {
  217. value: 'controllability',
  218. label: 'Controllability',
  219. },
  220. ],
  221. }
  222. ]
  223. }
  224. ]
  225. // 获取列表数据
  226. const init = () => {
  227. }
  228. // 搜索
  229. const search = () => {
  230. }
  231. // 重置
  232. const reset = () => {
  233. form.value = {
  234. operation: '',
  235. organization: [],
  236. type: '',
  237. belong: '',
  238. staffState: '',
  239. accountState: '',
  240. person: ''
  241. }
  242. }
  243. // 外部的全选
  244. const selectAll = () => {
  245. }
  246. // 全选的类型
  247. let selectType = ref('')
  248. // 批量管理
  249. const dropdownCommand = (e) => {
  250. switch (e) {
  251. case '删除':
  252. ElMessageBox({
  253. title: '删除业务员',
  254. message: '确定要删除该业务员吗?',
  255. type: 'warning',
  256. showCancelButton: true,
  257. confirmButtonText: '确定',
  258. cancelButtonText: '取消',
  259. }).then(( action ) => {
  260. }).catch(( action ) => {
  261. })
  262. break;
  263. case '禁用':
  264. ElMessageBox({
  265. title: '禁用业务员',
  266. message: '确定要禁用该业务员吗?',
  267. type: 'warning',
  268. showCancelButton: true,
  269. confirmButtonText: '确定',
  270. cancelButtonText: '取消',
  271. }).then(( action ) => {
  272. }).catch(( action ) => {
  273. })
  274. break;
  275. case '启用':
  276. ElMessage({
  277. message: '启用成功!',
  278. type: 'success',
  279. })
  280. break;
  281. case '分配管理人':
  282. allocationShow.value = true
  283. break;
  284. }
  285. }
  286. // 列表数据
  287. let tableData = ref([
  288. {
  289. name: 1
  290. }
  291. ])
  292. // 分页数据
  293. // 页码
  294. let currentPage = ref(1)
  295. // 单页数量
  296. let pageSize = ref(10)
  297. // 单页数量变化
  298. const handleSizeChange = (size) => {
  299. pageSize.value = size
  300. }
  301. // 页码变化
  302. const handleCurrentChange = (page) => {
  303. currentPage.value = page
  304. }
  305. // 详情
  306. const showDetail = (scope) => {
  307. muRouter.push({
  308. path: '/operationDetail'
  309. })
  310. }
  311. // 添加银行卡弹框
  312. let bankCardDialogShow = ref(false)
  313. // 更多
  314. const tableDataCommand = (scope, e) => {
  315. switch (e) {
  316. case '编辑':
  317. dialogShow.value = true
  318. title.value = '编辑'
  319. break;
  320. case '删除':
  321. ElMessageBox({
  322. title: '删除业务员',
  323. message: '确定要删除该业务员吗?',
  324. type: 'warning',
  325. showCancelButton: true,
  326. confirmButtonText: '确定',
  327. cancelButtonText: '取消',
  328. }).then(( action ) => {
  329. }).catch(( action ) => {
  330. })
  331. break;
  332. case '禁用':
  333. ElMessageBox({
  334. title: '禁用业务员',
  335. message: '确定要禁用该业务员吗?',
  336. type: 'warning',
  337. showCancelButton: true,
  338. confirmButtonText: '确定',
  339. cancelButtonText: '取消',
  340. }).then(( action ) => {
  341. }).catch(( action ) => {
  342. })
  343. break;
  344. case '启用':
  345. ElMessage({
  346. message: '启用成功!',
  347. type: 'success',
  348. })
  349. break;
  350. case '添加银行卡':
  351. bankCardDialogShow.value = true
  352. break;
  353. case '分配管理人':
  354. allocationShow.value = true
  355. break;
  356. }
  357. }
  358. // 添加业务员
  359. const addNumber = () => {
  360. dialogShow.value = true
  361. title.value = '添加'
  362. }
  363. // 添加/编辑业务员弹框
  364. let dialogShow = ref(false)
  365. // 添加/编辑业务员弹框标题
  366. let title = ref('添加')
  367. // 分配管理人
  368. let allocationShow = ref(false)
  369. </script>
  370. <style scoped lang="scss">
  371. .operation{
  372. margin: 0 20px;
  373. .operationForm{
  374. margin: 20px 0;
  375. }
  376. .formItem{
  377. width: 350px;
  378. }
  379. :deep(.select-all .el-select__wrapper){
  380. box-shadow: none;
  381. background: none;
  382. }
  383. }
  384. </style>