freework_level.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. <template>
  2. <div class="container">
  3. <div>
  4. <el-row>
  5. <el-form :inline="true" class="filter-form" :label-position="labelPosition">
  6. <el-row>
  7. <el-form-item label="状态" style="margin-bottom: 5px">
  8. <el-radio-group v-model="form.order_status" size="mini" @change="searchList()">
  9. <el-radio-button :label="0">全部({{form.order_status_val.order_status_all}})</el-radio-button>
  10. <el-radio-button :label="1">待支付({{form.order_status_val.order_status_1}})</el-radio-button>
  11. <el-radio-button :label="2">待完善({{form.order_status_val.order_status_2}})</el-radio-button>
  12. <el-radio-button :label="3">审核中({{form.order_status_val.order_status_3}})</el-radio-button>
  13. <el-radio-button :label="4">联系成功({{form.order_status_val.order_status_4}})</el-radio-button>
  14. <el-radio-button :label="5">面试中({{form.order_status_val.order_status_5}})</el-radio-button>
  15. <el-radio-button :label="6">已拒绝({{form.order_status_val.order_status_6}})</el-radio-button>
  16. <el-radio-button :label="8">待打款({{form.order_status_val.order_status_8}})</el-radio-button>
  17. <el-radio-button :label="7">已完成({{form.order_status_val.order_status_7}})</el-radio-button>
  18. <el-radio-button :label="9">暂停认证</el-radio-button>
  19. </el-radio-group>
  20. </el-form-item>
  21. </el-row>
  22. <el-row>
  23. <el-form-item label="领域" prop="uid">
  24. <el-select
  25. size="small"
  26. v-model="form.item_type"
  27. placeholder="领域类型"
  28. @change="getList_ly"
  29. clearable
  30. :style="{ width: '100px' }"
  31. >
  32. <el-option
  33. v-for="(item, index) in item_type"
  34. :key="index"
  35. :label="item.label"
  36. :value="item.value"
  37. :disabled="item.disabled"
  38. ></el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item style="margin-bottom: 5px">
  42. <el-radio-group v-model="form.item_id" size="mini" @change="searchList()">
  43. <el-radio-button :label="1101">F1({{form.item_id_val.item_id_1101}})</el-radio-button>
  44. <el-radio-button :label="1102">F2({{form.item_id_val.item_id_1102}})</el-radio-button>
  45. <el-radio-button :label="1103">F3({{form.item_id_val.item_id_1103}})</el-radio-button>
  46. <el-radio-button :label="1104">F4({{form.item_id_val.item_id_1104}})</el-radio-button>
  47. <el-radio-button :label="1105">F5({{form.item_id_val.item_id_1105}})</el-radio-button>
  48. <el-radio-button :label="1106">F6({{form.item_id_val.item_id_1106}})</el-radio-button>
  49. <el-radio-button :label="0">全部({{form.item_id_val.item_id_0}})</el-radio-button>
  50. </el-radio-group>
  51. </el-form-item>
  52. </el-row>
  53. <el-row>
  54. <el-form-item label-width="40px" label="uid" prop="uid">
  55. <el-input size="small" v-model="form.uid" placeholder="请输入uid"></el-input>
  56. </el-form-item>
  57. <el-form-item label-width="60px" label="技术栈" prop="uid">
  58. <el-cascader
  59. v-model="form.direction_id_obj"
  60. :options="direction_data"
  61. size="small"
  62. placeholder="请选择技术栈"
  63. :style="{ width: '170px' }"
  64. clearable
  65. ></el-cascader>
  66. </el-form-item>
  67. <el-form-item label-width="60px" label="来源" prop="uid">
  68. <el-select
  69. size="small"
  70. v-model="form.cert_type"
  71. placeholder="请选择先认证后付款"
  72. clearable
  73. :style="{ width: '170px' }"
  74. >
  75. <el-option
  76. v-for="(item, index) in cert_typeOptions"
  77. :key="index"
  78. :label="item.label"
  79. :value="item.value"
  80. :disabled="item.disabled"
  81. ></el-option>
  82. </el-select>
  83. </el-form-item>
  84. <el-form-item label-width="60px" label="排序" prop="uid">
  85. <el-select
  86. size="small"
  87. v-model="form.orderby"
  88. placeholder="请选择排序方式"
  89. clearable
  90. :style="{ width: '170px' }"
  91. >
  92. <el-option
  93. v-for="(item, index) in orderby"
  94. :key="index"
  95. :label="item.label"
  96. :value="item.value"
  97. :disabled="item.disabled"
  98. ></el-option>
  99. </el-select>
  100. </el-form-item>
  101. <el-form-item label-width="0">
  102. <el-button size="small" type="primary" @click="submitForm">提交</el-button>
  103. <el-button :type="show_admin_memo_val" size="small" @click="show_admin_memo">仅显示有备注</el-button>
  104. <el-button :type="show_interview_val" size="small" @click="show_interview">已安排面试</el-button>
  105. <el-button size="small" @click="reset">重置</el-button>
  106. </el-form-item>
  107. </el-row>
  108. </el-form>
  109. </el-row>
  110. </div>
  111. <div class="clear"></div>
  112. <el-table :data="tableData" :span-method="objectSpanMethod" border>
  113. <el-table-column fixed="left" prop="uid" label="开发者UID" width="100px"/>
  114. <el-table-column fixed="left" prop="user_info.realname" label="姓名" width="100px"/>
  115. <el-table-column fixed="left" prop="item_id" label="目标等级" width="100px" />
  116. <el-table-column prop="user_info.mobile" label="电话" width="130px">
  117. <template slot-scope="scope">
  118. {{scope.row.extend_memo.weixin || scope.row.user_info.mobile}}
  119. </template>
  120. </el-table-column>
  121. <el-table-column prop="user_info.direction_name" label="申请技术栈" width="150px"/>
  122. <el-table-column prop="interview.realname" label="面试官姓名" width="100px">
  123. <template slot-scope="scope">
  124. {{scope.row.interview.realname?scope.row.interview.realname:scope.row.interview.uid}}
  125. </template>
  126. </el-table-column>
  127. <el-table-column prop="interview.interview_time" label="面试时间" width="160px">
  128. <template slot-scope="scope">
  129. {{scope.row.interview.interview_time ? scope.row.interview.interview_time:'待分配'}}
  130. </template>
  131. </el-table-column>
  132. <el-table-column prop="confirm_item_id" label="最终定级" width="100px"/>
  133. <el-table-column prop="admin_memo" label="备注" width="200px"/>
  134. <el-table-column prop="cert_type_text" label="来源" width="160px">
  135. <template slot-scope="scope">
  136. {{scope.row.cert_type_text}} - {{scope.row.pay_money}}元
  137. </template>
  138. </el-table-column>
  139. <!-- <el-table-column prop="order_status_text" label="状态" width="100px"/> -->
  140. <!-- <el-table-column prop="pay_money" label="支付金额" width="100px"/> -->
  141. <!-- <el-table-column prop="interview.pay_money" label="面试工资" width="100px"/> -->
  142. <el-table-column prop="addtime" label="申请时间" width="160px"/>
  143. <el-table-column prop="pay_time" label="支付时间" width="160px"/>
  144. <el-table-column prop="buy_memo" label="备注" width="160px"/>
  145. <el-table-column prop="ctrontorl" fixed="right" label="操作" width="220px">
  146. <template slot-scope="scope">
  147. <el-button type="text" v-if="scope.row.cert_status == 0" @click="setCertStatus(1,scope.row.id)">暂停认证</el-button>
  148. <el-button type="text" v-else @click="setCertStatus(0,scope.row.id)">恢复认证</el-button>
  149. <el-button type="text" @click="drawer(scope.row.id)">查看详情</el-button>
  150. <el-button type="text" @click="set_admin_memo(scope.row)">备注</el-button>
  151. <el-button v-if="scope.row.order_status<4 && scope.row.pay_status==2" type="text" @click="change_order_status_4(scope.row)">联系成功</el-button>
  152. </template>
  153. </el-table-column>
  154. </el-table>
  155. <div class="mainPageBox">
  156. <el-pagination
  157. @current-change="changePagination"
  158. :page-size="10"
  159. :total="Number(total)"
  160. layout="total, prev, pager, next"
  161. background
  162. ></el-pagination>
  163. </div>
  164. <freework_level :id="id" :drawer="drawer_bool"/>
  165. </div>
  166. </template>
  167. <script>
  168. import freework_level from "/components/drawer/freework_level.vue";
  169. export default {
  170. components: {
  171. freework_level,
  172. },
  173. props:[],
  174. data() {
  175. return {
  176. page: 1,
  177. drawer_bool:false,
  178. id:0,
  179. form:{
  180. timeRange:[],
  181. order_status:3,
  182. order_status_val:{
  183. },
  184. item_id_val:{},
  185. item_id:0,
  186. item_type:1,
  187. orderby:1,
  188. direction_id_obj:[],
  189. },
  190. show_admin_memo_val:"",
  191. show_interview_val:"",
  192. orderby: [
  193. {
  194. label: "申请时间顺序",
  195. value: 0
  196. },
  197. {
  198. label: "申请时间倒序",
  199. value: 1
  200. },
  201. {
  202. label: "已安排面试",
  203. value: 2
  204. },
  205. ],
  206. cert_typeOptions: [
  207. {
  208. label: "全部",
  209. value: 0
  210. },
  211. {
  212. label: "活动认证",
  213. value: 1
  214. },
  215. {
  216. label: "先用后付",
  217. value: 2
  218. },
  219. {
  220. label: "普通认证",
  221. value: 3
  222. }
  223. ,
  224. {
  225. label: "人工认证",
  226. value: 4
  227. }
  228. ],
  229. item_type: [
  230. {
  231. label: "全部",
  232. value: 0
  233. },
  234. {
  235. label: "申请",
  236. value: 1
  237. },
  238. {
  239. label: "认证",
  240. value: 2
  241. },
  242. ],
  243. returnData:{},
  244. total: 0,
  245. labelPosition: 'left',
  246. tableData: [],
  247. direction_data:[],
  248. }
  249. },
  250. computed: {
  251. },
  252. mounted() {
  253. this.getList();
  254. this.get_direction();
  255. this.get_order_status();
  256. },
  257. methods: {
  258. async getList_ly(){
  259. this.page=1;
  260. this.getList();
  261. },
  262. async drawer(id){
  263. this.id=id;
  264. this.drawer_bool=true;
  265. },
  266. async setDrawer(a){
  267. this.drawer_bool=a;
  268. },
  269. async getList(drawer_bool=false) {
  270. this.drawer_bool=drawer_bool;
  271. this.get_order_status();
  272. this.get_item_id();
  273. if(this.form.orderby==1)
  274. {
  275. this.form.pay_time_desc=true;
  276. this.form.interview_time_asc=false;
  277. }
  278. else if(this.form.orderby==2)
  279. {
  280. this.form.pay_time_desc=false;
  281. this.form.interview_time_asc=true;
  282. }
  283. else
  284. {
  285. this.form.pay_time_desc=false;
  286. this.form.interview_time_asc=false;
  287. }
  288. if (this.form.direction_id_obj[1]) {
  289. this.form.occupation_id = this.form.direction_id_obj[0];
  290. this.form.direction_id = this.form.direction_id_obj[1];
  291. }
  292. else
  293. {
  294. this.form.occupation_id = 0;
  295. this.form.direction_id = 0;
  296. }
  297. this.form.page=this.page;
  298. let data_temp = {...this.form};
  299. // 暂停认证处理
  300. if(this.form.order_status == 9){
  301. delete data_temp['order_status']
  302. data_temp['cert_status'] = 1
  303. }
  304. let res = await this.$post("/uapi/cert/order",data_temp);
  305. if (res && res.status === 1) {
  306. this.tableData = res.data.list;
  307. this.total = res.data.total;
  308. }
  309. },
  310. submitForm()
  311. {
  312. this.page=1;
  313. this.getList();
  314. },
  315. show_admin_memo() {
  316. this.page=1;
  317. if (this.show_admin_memo_val)
  318. {
  319. this.show_admin_memo_val="";
  320. this.form.admin_memo=false;
  321. }
  322. else
  323. {
  324. this.show_admin_memo_val="danger";
  325. this.form.admin_memo=true;
  326. }
  327. this.getList();
  328. },
  329. show_interview(){
  330. this.page=1;
  331. if (this.show_interview_val)
  332. {
  333. this.show_interview_val="";
  334. this.form.orderby=0;
  335. }
  336. else
  337. {
  338. this.show_interview_val="danger";
  339. this.form.orderby=2;
  340. }
  341. this.getList();
  342. },
  343. get_direction() {
  344. this.$post("/api/direction/get_all_data")
  345. .then(res => {
  346. if (res.status == 1) {
  347. let aa = directionDataParse(res.data);
  348. aa.splice(0, 1, {
  349. label: "全部",
  350. value: 0,
  351. children:[
  352. {
  353. label: "全部",
  354. value: 0,
  355. }
  356. ]
  357. });
  358. this.direction_data = [...aa];
  359. }
  360. })
  361. .catch(() => {
  362. this.$message({
  363. type: "info",
  364. message: "操作失败"
  365. });
  366. });
  367. },
  368. async setCertStatus(status,id){
  369. let res = await this.$post("/uapi/cert/set_cert_status",{
  370. id,val:status
  371. });
  372. if (res && res.status === 1) {
  373. this.getList();
  374. }else{
  375. this.$message({
  376. type: "info",
  377. message: "操作失败"
  378. });
  379. }
  380. },
  381. async get_order_status() {
  382. let res = await this.$post("/uapi/cert/order_status");
  383. if (res && res.status === 1) {
  384. this.form.order_status_val = res.data.order_status;
  385. }
  386. },
  387. async get_item_id() {
  388. const data = this.form;
  389. let res = await this.$post("/uapi/cert/item_id",data);
  390. if (res && res.status === 1) {
  391. this.form.item_id_val = res.data.item_id;
  392. }
  393. },
  394. async change_order_status_4(row)
  395. {
  396. let res = await this.$post("/uapi/cert/change_order_status_4",row);
  397. if (res && res.status === 1) {
  398. this.$message({
  399. type: 'success',
  400. message: '操作成功!'
  401. });
  402. this.getList();
  403. }
  404. },
  405. set_admin_memo(row)
  406. {
  407. this.$prompt('请输入备注', '提示', {
  408. confirmButtonText: '确定',
  409. cancelButtonText: '取消',
  410. inputValue:row.admin_memo
  411. }).then(({ value }) => {
  412. row.val=value;
  413. this.set_admin_memo_url(row);
  414. }).catch(() => {
  415. });
  416. },
  417. async set_admin_memo_url(row)
  418. {
  419. let res =await this.$post("/uapi/cert/set_admin_memo",row);
  420. this.$message({
  421. type: 'success',
  422. message: '操作成功!'
  423. });
  424. this.getList();
  425. },
  426. changePagination(val) {
  427. this.page = val;
  428. this.getList();
  429. },
  430. searchList(type="") {
  431. if(type==1) this.returnData={};
  432. this.page=1;
  433. this.getList();
  434. },
  435. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  436. let count=row.interview.count;
  437. let min=rowIndex+1-row.interview.index;
  438. let max=count+min;
  439. if ((columnIndex!=6 && columnIndex!=5 && columnIndex!=7 && columnIndex!=13) && rowIndex<max-1 && rowIndex>=min-1 && count>1) {
  440. if (rowIndex === min-1) {
  441. return {
  442. rowspan: count,
  443. colspan: 1
  444. };
  445. } else {
  446. return {
  447. rowspan: 0,
  448. colspan: 0
  449. };
  450. }
  451. }
  452. },
  453. reset(){
  454. this.form = {
  455. timeRange:[],
  456. order_status:3,
  457. order_status_val:{
  458. },
  459. item_id_val:{},
  460. item_id:0,
  461. item_type:1,
  462. orderby:1,
  463. direction_id_obj:[],
  464. }
  465. this.show_admin_memo_val="";
  466. this.form.admin_memo=false;
  467. this.show_interview_val="";
  468. this.form.orderby=0;
  469. this.page=0;
  470. this.getList();
  471. }
  472. }
  473. };
  474. function directionDataParse(arr) {
  475. arr = arr.sort(function(a, b) {
  476. return Number(a.display_order) - Number(b.display_order) > 0;
  477. });
  478. let result = [];
  479. let len = arr.length;
  480. result.push({
  481. label:"全部",
  482. value:0,
  483. })
  484. for (let i = 0; i < len; i++) {
  485. let { children, ...other } = arr[i];
  486. let label = arr[i].occupation_name || arr[i].direction_name;
  487. let value = arr[i].occupation_id || arr[i].direction_id;
  488. let item;
  489. if (children) {
  490. children = directionDataParse(children);
  491. item = {
  492. ...other,
  493. label,
  494. value,
  495. children
  496. };
  497. } else {
  498. item = {
  499. ...other,
  500. label,
  501. value
  502. };
  503. }
  504. result.push(item);
  505. }
  506. return result;
  507. }
  508. </script>
  509. <style scoped>
  510. .container{
  511. display:grid !important;
  512. }
  513. .clear{clear: both}
  514. </style>