Explorar o código

Merge remote-tracking branch 'origin/dev'

lushuncheng %!s(int64=6) %!d(string=hai) anos
pai
achega
c7fe0e3894

+ 4 - 0
static/css/main.css

@@ -1,3 +1,7 @@
+:root {
+  --mainColor: #409EFF;
+}
+
 html {
   font-size: 14px;
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/200.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
dist/_nuxt/152243d4394eaf89c5ca.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/_nuxt/685eef4b16211db76296.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/_nuxt/3bbf01fe8919e4f3c946.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
dist/_nuxt/6c60356c874657c574d5.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/_nuxt/ec4fca58829585554db8.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/_nuxt/41834020e7db528d5e74.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
dist/_nuxt/913535d35ba1343e4491.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
dist/_nuxt/df507937fddf6bad1a6e.js


+ 0 - 14
dist/css/main.css

@@ -1,14 +0,0 @@
-html {
-  font-size: 14px;
-}
-.el-table .success-row {
-  background: #f0f9eb;
-}
-#main .ql-snow .ql-picker-label {
-  display: flex;
-  align-items: center;
-}
-
-textarea:focus {
-  outline: 0;
-}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/login/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/404/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/cert_check/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/cert_edit/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/cert_pro/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/cloud_balance/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/cloud_developer/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/cloud_job/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/dev_check/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/dev_check_detail/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/dev_show/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/gongmall/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/group_list/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/vip_manager/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/vip_order/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/vip_setting/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/wage_details/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
dist/main/wage_settlement/index.html


+ 1 - 1
nuxt.config.js

@@ -40,7 +40,7 @@ module.exports = {
   */
   css: [
     'element-ui/lib/theme-chalk/index.css',
-    '@/static/css/main.css',
+    '@/assets/css/common.css',
   ],
 
   /*

+ 382 - 52
pages/main/index/cloud_job.vue

@@ -1,24 +1,86 @@
 <template>
   <div id="cloud-job">
-    <el-select v-model="selected" @change="changeSelect" placeholder="筛选">
-      <el-option v-for="(item, index) of statuses" :key="index" :label="item" :value="index">
-        <span>{{item}}</span>
-      </el-option>
-    </el-select>
+    <div class="top">
+      <h3>云端工作</h3>
+      <div class="top-info">
+        <div class="top-info-left">
+          <span>
+            待审核:
+            <b>{{nums.waitCheckNum && nums.waitCheckNum.num}}</b>
+          </span>
+          <span>
+            对接面试中:
+            <b>{{nums.selectDeveloperNum && (nums.selectDeveloperNum.num + nums.waitInterviewNum.num)}}</b>
+          </span>
+          <span>
+            待托管费用:
+            <b>{{nums.waitPayNum && nums.waitPayNum.num}}</b>
+          </span>
+          <span>
+            开发中:
+            <b>{{nums.waitSettNum && nums.waitSettNum.num}}</b>
+          </span>
+        </div>
+        <div class="top-info-right">
+          <span @click="createPeriod">生成20天内的账单</span>
+          <span @click="finishPeriod">生成待结薪的账单</span>
+        </div>
+      </div>
+    </div>
+    <div class="form">
+      <div class="left">
+        <el-select v-model="selectedStatus" placeholder="工作状态">
+          <el-option
+            v-for="(item, index) of statuses"
+            :key="index"
+            :label="item.name"
+            :value="index"
+          >
+            <div>
+              {{item.name}}
+              <span class="num" :style="`background: ${item.color};`">{{item.num}}</span>
+            </div>
+          </el-option>
+        </el-select>
+        <el-select v-model="selectedDirection" placeholder="职位方向">
+          <el-option
+            v-for="(item, index) of directions"
+            :key="index"
+            :label="item.direction_name"
+            :value="item.direction_id"
+          ></el-option>
+        </el-select>
+        <el-input placeholder="工作ID" v-model="jobID"></el-input>
+        <el-input placeholder="企业方ID" v-model="comID"></el-input>
+        <el-input placeholder="开发者ID" v-model="devID"></el-input>
+        <el-input placeholder="审核人员名字" v-model="checkID"></el-input>
+        <el-checkbox v-model="unDeposit" @change="changeDeposit"></el-checkbox>本期未托管
+        <el-button @click="getCloudJob">筛选</el-button>
+      </div>
+      <div class="right">
+        <el-button @click="doManager">结算管理</el-button>
+        <el-button @click="doExport">导出报表</el-button>
+      </div>
+    </div>
     <div class="table">
       <el-table
         v-if="tableData.length"
+        width="100%"
         height="100%"
         border
         style="width: 100%"
         :data="tableData"
         :row-class-name="tableRowClassName"
+        :row-style="tableRowClassName"
+        @row-click="clickRow"
       >
         <el-table-column
           v-for="(prop, index) of tableProps"
           :key="index"
           :prop="prop"
           :label="tableHeaders[index]"
+          :fixed="index < 4"
+          width="150px"
         >
           <template slot-scope="scope">
             <el-button
@@ -27,7 +89,11 @@
               @click="clickDetail(scope.row['id'])"
             >{{scope.row[prop]}}</el-button>
             <span v-else-if="prop === 'status'">{{scope.row['statusName']}}</span>
-            <span v-else>{{scope.row[prop]}}</span>
+            <span v-else-if="prop === 'id'">
+              {{scope.row['id']}}
+              <span v-if="!scope.row.deposit_status" style="color: red;">(待托管)</span>
+            </span>
+            <span v-else>{{scope.row[prop] || '--'}}</span>
           </template>
         </el-table-column>
       </el-table>
@@ -35,7 +101,7 @@
     <el-pagination
       @current-change="changePagination"
       :current-page.sync="currentPage"
-      :page-size="10"
+      :page-size="20"
       layout="total, prev, pager, next"
       :total="totalCount"
     ></el-pagination>
@@ -44,38 +110,75 @@
 
 <script>
 const tableHeaders = [
+  "工作ID",
+  "方向",
   "企业方",
-  "名称",
-  "地点",
-  "简介",
-  "核定价格/预算区间",
-  "已完成月数",
+  "开发者",
+  "状态",
+  "基本薪资",
+  "每周工时",
   "用户来源",
   "审核人员",
-  "创建时间",
-  "状态",
-  "操作"
+  "发布时间",
+  "本期托管",
+  "下期托管",
+  "开始时间",
+  "结薪时间",
+  "发薪时间",
+  "试用期",
+  "开票",
+  "纳税",
+  "企业方费用",
+  "开发者工资",
+  "试用期",
+  "开票",
+  "纳税",
+  "企业方费用",
+  "开发者薪资",
 ]
 const tableProps = [
+  "id",
+  "matchDirections",
   "nickname",
-  "title",
-  "address",
-  "description",
+  "devNickname",
+  "status",
   "salary",
-  "work_hours",
+  "workHours",
   "remark_user_from",
   "remark_checked_user",
   "createTime",
-  "status",
-  "ctrl"
+  "current_deposit_num",
+  "next_deposit_num",
+  "startTime",
+  "endTime",
+  "sendSalaryTime",
+  "isNeedProbation",
+  "isInvoice",
+  "devIsInvoice",
+  "companyTotalPrice",
+  "personTotalPrice",
 ]
 
 export default {
   data() {
     return {
-      // 筛选状态
+      uid: '',
+      // 开发者id
+      devID: '',
+      // 企业id
+      comID: '',
+      // 工作ID
+      jobID: '',
+      // 审核人员id
+      checkID: '',
+      unDeposit: false,
+      totalFee: 11,
+      // 工作状态
       statuses: [],
-      selected: "",
+      // 职位方向
+      directions: [],
+      selectedDirection: "",
+      selectedStatus: "",
       // 数据总条目
       totalCount: 0,
       currentPage: 1,
@@ -84,25 +187,153 @@ export default {
       // 列表头字段
       tableProps,
       // 列表数据
-      tableData: []
+      tableData: [],
+      nums: {},
     }
   },
   mounted() {
-    this.getFilters()
+    // this.getNums()
+    this.getJobStatus()
+    this.getDirection()
+    this.getCloudJob()
   },
   methods: {
+    /**
+     * 获取顶部数据
+     */
+    async getNums() {
+      let res = {
+        "data": {
+          "userinvite": 0,
+          "outsourcecoder": 1,
+          "project_progress": 7,
+          "suggestion": 3,
+          "projectmanage": 581,
+          "hiremanage": "116",
+          "coderverify": "9",
+          "companyverify": "0",
+          "realnameverify": "8",
+          "experience_audit": "4",
+          "take_big_coins_audit": 4,
+          "rooter_notify": 0,
+          "cloudjob": 523,
+          "cloudjobArr": {
+            "all": {
+              "num": 523
+            },
+            "waitCheckNum": {
+              "status": 2,
+              "num": 170
+            },
+            "selectDeveloperNum": {
+              "status": 4,
+              "num": 25
+            },
+            "waitInterviewNum": {
+              "status": 5,
+              "num": 13
+            },
+            "waitSettNum": {
+              "status": 7,
+              "num": "315"
+            }
+          }
+        },
+        "info": "返回统计数据",
+        "status": "yes"
+      }// await this.$post('https://dev.test.proginn.com/rooter/ajaxrooternums')
+      if(res) {
+        console.log(res.data)
+      }
+    },
+    /**
+     * 获取主列表数据
+     */
+    async getCloudJob() {
+      let res = await this.$post('/api/admin/job/cloud_job', {
+        uid: this.uid,
+        developer_id: this.devID,
+        uid: this.comID,
+        checker_id: this.checkID,
+        job_id: this.jobID,
+        direction_id: this.selectedDirection,
+        status: this.selectedStatus,
+        not_deposit: this.unDeposit ? '1' : '0',
+        page: this.currentPage,
+      })
+      if(res) {
+        this.tableData = []
+        const data = res.data.listData
+        const list = data.list
+        this.tableData = this.formatTableData(list)
+        this.totalCount = Number(data.total)
+        this.totalPage = data.totalPage
+      }
+    },
+    /**
+     * 获取全部工作方向和ID
+     */
+    async getDirection() {
+      let res = await this.$post('/api/admin/job/get_direction')
+      if(res) {
+        this.directions = res.data
+      }
+    },
+    /**
+     * 获取云端工作的全部状态以及对应状态的个数
+     */
+    async getJobStatus() {
+      let res = await this.$post('/api/admin/job/getJobStatus')
+      if(res) {
+        let numObj = res.data.status_num
+        this.nums = numObj
+        this.statuses = res.data.status_name.map(name => {
+          let item = { name }
+          switch(name) {
+            case '全部':
+              item.num = numObj.all.num
+              break
+            case '对接开发者':
+              item.num = numObj.selectDeveloperNum.num
+              item.color = '#F0F9EB'
+              break
+            case '待审核':
+              item.num = numObj.waitCheckNum.num
+              item.color = '#e1f3d8'
+              break
+            case '面试中':
+              item.num = numObj.waitInterviewNum.num
+              item.color = '#F0F9EB'
+              break
+            case '开发中':
+              item.num = numObj.waitSettNum.num
+              item.color = '#FAECD8'
+              break
+            case '待托管费用':
+              item.num = numObj.waitPayNum.num
+              item.color = '#F0F9EB'
+              break
+            case '确认聘用':
+              item.num = numObj.interviewOkNum.num
+              item.color = '#F0F9EB'
+              break
+            case '面试通过':
+              item.num = numObj.interviewOkNum.num
+              item.color = '#F0F9EB'
+              break
+            case '等待确定工资':
+              item.num = numObj.interviewOkNum.num
+              item.color = '#F0F9EB'
+              break
+          }
+          return item
+        })
+      }
+    },
     // 筛选框变动
     changeSelect(index) {
       this.currentPage = 1
-      this.getTableData(index)
-    },
-    // 获取筛选
-    async getFilters() {
-      const res = await this.$post("/api/admin/job/job_status_map")
-      const data = res.data
-      this.statuses = data || []
-      if(data.length) this.selected = data[0]
-      this.getTableData()
+      this.getCloudJob(index)
     },
     // 点击详情
     clickDetail(id) {
@@ -110,9 +341,33 @@ export default {
     },
     // 根据状态显示图表样式
     tableRowClassName({ row, rowIndex }) {
-      // console.log({row, rowIndex})
-      let className = ""
-      if(row.status === "1") className = "success-row"
+      let className
+      switch(row.statusName) {
+        case '待审核':
+          className = 'background: #E1F3D8;'
+          break
+        case '对接开发者':
+          className = 'background: #F0F9EB;'
+          break
+        case '面试中':
+          className = 'background: #F0F9EB;'
+          break
+        case '确认聘用':
+          className = 'background: #F0F9EB;'
+          break
+        case '开发中':
+          className = 'background: #FAECD8;'
+          break
+        case '结束合作':
+          className = 'background: #F4F4F5;'
+          break
+        // case '待托管费用':
+        //   className = 'background: #F0F9EB;'
+        //   break
+        // case '确认聘用':
+        //   className = 'background: #F0F9EB;'
+        //   break
+      }
       return className
     },
     // 格式化列表数据
@@ -120,32 +375,107 @@ export default {
       return data.map(i => ({
         ...i,
         nickname: i.companyUser.nickname,
-        ctrl: "详情"
+        devNickname: i.developerUser ? i.developerUser.nickname : '',
+        direction: i.developerUser ? i.developerUser.direction_name : '',
+        workHours: i.hours === '0' ? (i.workHours ? i.workHours.name.replace('小时', '') : '') : i.hours,
+        endTime: `每月${i.end_time}号`,
+        salary: i.salary !== '0' ? i.salary : `${i.match_salary_min}-${i.match_salary_max}`,
+        sendSalaryTime: `每月${i.send_salary_time}号`,
+        isNeedProbation: i.is_need_probation === '1' ? i.probation_days : '--',
+        isInvoice: i.is_invoice === '1' ? '是' : '否',
+        devIsInvoice: i.dev_is_invoice === '1' ? '是' : '否',
       }))
     },
     // 页码变动
     changePagination(page) {
-      this.getTableData()
+      this.getCloudJob()
+    },
+    /**
+     * 修改未托管
+     */
+    changeDeposit(val) {
+      // console.log(val)
+      // this.unDeposit = !val
     },
-    // 获取列表数据
-    async getTableData(status = 0) {
-      this.tableData = []
-      const p = this.currentPage
-      const res = await this.$post("/api/admin/job/jobs", { p, status })
-      // console.log(res)
-      const data = res.data
-      const list = data.list
-      this.tableData = this.formatTableData(list)
-      this.totalCount = Number(data.total)
-      this.totalPage = data.totalPage
+    /**
+     * 生成工作周期
+     */
+    async createPeriod() {
+      let res = await this.$post('/api/admin/job/create_period')
+      if(res) {
+        this.$message({
+          message: '生成成功',
+          type: 'success'
+        })
+      }
+    },
+    /**
+     * 更新工作周期
+     */
+    async finishPeriod() {
+      let res = await this.$post('/api/admin/job/create_period')
+      if(res) {
+        this.$message({
+          message: '更新成功',
+          type: 'success'
+        })
+      }
+    },
+    /**
+     * 结算管理
+     */
+    doManager() {
+      window.open('/main/cloud_balance')
+    },
+    clickRow(row) {
+      let id = row.id
+      if(location.hostname === 'www.proginn.com') window.open(`/rooter/cloudjobitem/${id}`)
+      else window.open(`https://dev.test.proginn.com/rooter/cloudjobitem/${id}`)
+    },
+    /**
+     * 点击导出
+     */
+    doExport() {
+      window.open('/api/admin/job/exportJobData')
     }
   }
 }
 </script>
 
 <style scoped>
+#cloud-job {
+  width: calc(100% - 144px);
+}
 .table {
-  height: 100%;
-  height: calc(100% - 80px);
+  height: calc(100% - 150px);
+}
+.top {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  height: 60px;
+}
+.top-info {
+  display: flex;
+  justify-content: space-between;
+}
+.top-info-right {
+  color: var(--mainColor);
+}
+.top-info-right span {
+  cursor: pointer;
+}
+.form {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 10px;
+}
+.form .el-input,
+.form .el-select {
+  width: 120px;
+}
+.num {
+  padding: 4px 8px;
 }
 </style>