charles
2024-07-24 f13d1d01c3c3cbb075e63ae02be54bbb023c13d0
feat:薪资薪酬核算模块
2个文件已添加
9个文件已修改
325 ■■■■■ 已修改文件
src/api/employeeSalary/payroll.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/layout/components/appsidebar/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonSearch.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/TableCommonView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/employeeSalary/index.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/employeeSalary/payroll/index.vue 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/productRegisterForm/addProductRegisterPage.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/silkRegisterForm/addPage.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/dataDictionary/components/addDataDictionaries.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/dataDictionary/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/employeeSalary/payroll.js
New file
@@ -0,0 +1,9 @@
import request from "@/common/untils/request.js"
// 薪资核算列表
export function getPayrollSalaryPlanListApi(params) {
    return request({
        url: "/api-jl/v1/salary/getPayrollSalaryPlanList",
        method: "get",
        params
    })
}
src/components/layout/components/appsidebar/index.vue
@@ -52,6 +52,7 @@
          <el-menu-item index="/employeeSalary/attendanceManage">考勤管理</el-menu-item>
          <el-menu-item index="/employeeSalary/attendanceStatistics">考勤统计</el-menu-item>
          <el-menu-item index="/employeeSalary/salaryPlan">薪资方案</el-menu-item>
          <el-menu-item index="/employeeSalary/payroll">薪资核算</el-menu-item>
          <el-menu-item index="/employeeSalary/apprenticeshipManage">带徒管理</el-menu-item>
          <el-menu-item index="/employeeSalary/machineManage">机台管理</el-menu-item>
        </el-submenu>
src/components/makepager/CommonSearch.vue
@@ -59,6 +59,7 @@
            style="width: 410px"
            clearable
            @change="searchClick"
            @blur="searchClick"
            @clear="clearClick"
          >
            <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i>
src/components/makepager/TableCommonView.vue
@@ -201,7 +201,7 @@
    <div class="styleBtn">
      <i @click="checkCol()" class="label">...</i>
      <el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList">
        <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox>
        <el-checkbox v-for="item in tableList.allcol"  :label="item" :key="item">{{ item }} </el-checkbox>
      </el-checkbox-group>
    </div>
  </div>
src/router/employeeSalary/index.js
@@ -5,7 +5,7 @@
const salaryPlan = (resolve) => require(["@/views/employeeSalary/salaryPlan/index"], resolve) // 薪资方案
const apprenticeshipManage = (resolve) => require(["@/views/employeeSalary/apprenticeshipManage/index"], resolve) // 带徒管理
const machineManage = (resolve) => require(["@/views/employeeSalary/machineManage/index"], resolve) // 机台管理
const payroll=(resolve)=>require(["@/views/employeeSalary/payroll/index"], resolve)
const appconfig = [
  {
    path: "/employeeSalary/attendanceManage",
@@ -35,6 +35,15 @@
    }
  },
  {
      path: "/employeeSalary/payroll",
      name: "payroll",
      component: payroll,
      meta: {
        title: "薪资核算",
        requireAuth: true
      }
   },
  {
    path: "/employeeSalary/apprenticeshipManage",
    name: "apprenticeshipManage",
    component: apprenticeshipManage,
@@ -52,6 +61,6 @@
      requireAuth: true
    }
  }
]
];
export default appconfig
src/views/employeeSalary/payroll/index.vue
New file
@@ -0,0 +1,246 @@
<template>
    <div class="silkRegister-form">
        <div class="filter">
            <div class="filter-card">
                <CommonSearch
                        :show-add="false"
                        :show-download="false"
                        :amount-view="false"
                        :show-action-btn="false"
                        placeholder="请输入关键词"
                        @searchClick="onFilterSearch"
                >
                    <template slot="leftButton">
                        <div class="margin_right_20px" style="width:200px;">
                            <el-date-picker v-model="object.cycle" style="width:100%"
                                            @change="changeDate"
                                            :clearable="false" type="month" placeholder="选择日期"
                                            :picker-options="pickerOptions"
                                            value-format="yyyy-MM">
                            </el-date-picker>
                        </div>
                        <div>
                            <el-select placeholder="请选择工种" v-model="object.workTypeCode" filterable
                                @change="changeWorkTypeCode"
                                clearable
                            >
                                <el-option v-for="workTypeCode in workTypeCodeList"   :label="workTypeCode.label" :value="workTypeCode.value" />
                            </el-select>
                        </div>
                    </template>
                </CommonSearch>
            </div>
        </div>
        <div class="body">
            <div class="body-card">
                <div class="list-view">
                    <TableCommonView
                            ref="tableListRef"
                            v-loading="loading"
                            :table-list="tableList"
                            @selTableCol="selTableCol"
                    >
                    </TableCommonView>
                </div>
                 <div class="btn-pager">
                  <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import { getPayrollSalaryPlanListApi } from  "@/api/employeeSalary/payroll.js"
    import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
    import NewDate from "@/api/date";
    const { getPreviousMonth } = NewDate;
    export default {
        name: "attendanceStatistics",
        props: {
        },
        mixins: [pageMixin],
        components: {},
        data() {
            return {
                tableList: {},
                loading: false,
                searchOptions:[],
                pickerOptions: {
                    disabledDate(time) {
                        return time.getTime() > new Date().getTime() - 86400000;
                    },
                },
                object:{
                    cycle:getPreviousMonth(),
                    workTypeCode:''
                },
                workTypeCodeList:[],
                keyword: "",
                tableColumn: [],
                showCol: [],
            }
        },
        created() {
            this.setTable();
            this.initData();
        },
        computed: {
        },
        methods: {
            initTable(){
                this.showcol=[ '工种','姓名','生产工资','满勤',
                    '超时工资','加班工资','交通补贴',
                    '带徒补贴','岗位补贴','社保补贴' ,'工龄补贴',
                    '不达保底','质量奖','奖罚1','奖罚2/清凉补贴',
                    '日常检查/奖罚3','停机补贴','应发工资','备注'
                ];
                this.tableColumn=[
                    { label: "工种", prop: "workTypeName",default:true,fixed:true},
                    { label: "姓名", prop: "workerName",default:true,fixed:true},
                    { label: "应发工资", prop: "amount",default:true,fixed:true},
                    { label: "生产工资", prop: "productionAmount" ,default:true},
                    { label: "超时工资", prop: "timeoutAmount",default:true},
                    { label: "加班工资", prop: "overtimeAmount",default:true},
                    { label: "交通补贴", prop: "trafficAmount" ,default:true},
                    { label: "带徒补贴", prop: "masterApprenticeAmount",default:true },
                    { label: "岗位补贴", prop: "positionAmount",default:true},
                    { label: "社保补贴", prop: "socialSecurityAmount",default:true},
                    { label: "工龄补贴", prop: "seniorityAmount",default:true },
                    { label: "不达保底", prop: "baseSalaryAmount",default:true},
                    { label: "质量奖", prop: "qualityStandardsAmount" ,default:true},
                    { label: "奖罚1", prop: "substandardQualityAmount",default:true},
                    { label: "奖罚2/清凉补贴", prop: "heatAmount",default:true},
                    { label: "日常检查/奖罚3", prop: "dailyInspectionAmount",default:true},
                    { label: "停机补贴", prop: "downtimeAmount",default:true},
                    { label: "备注", prop: "remark",default:true},
                ]
            },
            initData(){
              this.workTypeCodeList=[
                  {label:'挡车工',value:'weavers'},
                  {label:'车头工',value:'car_head'},
                  {label:'保全工',value:'maintenance'},
                  {label:'煮茧工',value:'boiled'},
                  {label:'舀茧工',value:'scoop'},
                  {label:'送茧工',value:'transport'},
                  {label:'清洁工',value:'cleaner'},
                  {label:'感知器清洗工',value:'machine_cleaner'},
                  {label:'全能机动',value:'all-powerful'},
                  {label:'班长',value:'monitor'}
              ];
              this.getData();
            },
            changeWorkTypeCode(){
              this.pagerOptions.currPage = 1;
              this.getData()
            },
            setTable() {
                this.initTable();
                this.tableList = {
                    selectIndex: true,
                    isFixed:true,
                    tableInfomation: [],
                    allcol: [],
                    showcol: this.showcol,
                    headerHeight:'47px',
                    tableColumn: this.setColumnVisible(this.showcol)
                }
                this.tableList.allcol = this.tableList.tableColumn.filter(item=>!item.fixed).map((ele) => ele.label)
                this.searchOptions = [];
                for (let i = 0; i < this.tableList.tableColumn.length; i++) {
                    const label = this.tableList.tableColumn[i].label
                    const value = this.tableList.tableColumn[i].prop
                    this.searchOptions.push({ value: value, label: label })
                }
            },
            setColumnVisible(showCol) {
                return this.tableColumn.map((ele) => {
                    return {
                        ...ele,
                        isShowColumn:showCol.includes(ele.label)
                    }
                })
            },
            selTableCol(val) {
                this.showcol = val;
                this.tableList.tableColumn = this.setColumnVisible(val);
            },
            // 请求数据
            async getData() {
                this.loading = true
                const {code,data,total}=await getPayrollSalaryPlanListApi({
                    ...this.object,
                    page: this.pagerOptions.currPage,
                    pageSize: this.pagerOptions.pageSize,
                    keyword:this.keyword
                });
                if(code===200){
                    this.tableList.tableInfomation=data;
                    this.pagerOptions.totalCount=total;
                }
                this.loading=false;
            },
            changeDate(){
                this.pagerOptions.currPage = 1
                this.getData()
            },
            // 搜索
            onFilterSearch(searchText) {
                this.keyword = searchText ?? ""
                this.pagerOptions.currPage = 1
                this.getData()
            }
        }
    }
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
    .silkRegister-form {
        height: 100%;
        overflow: hidden;
        .filter {
            height: 80px;
            display: flex;
            align-items: center;
            padding: 12px 20px 0 20px;
            &-card {
                height: 80px;
                display: flex;
                align-items: center;
                box-sizing: border-box;
                padding: 10px 20px;
                flex: 1;
                border-radius: 12px;
                background-color: #fff;
            }
        }
        .body {
            box-sizing: border-box;
            padding: 10px 20px;
            border-radius: 12px;
            height: calc(100% - 92px);
            .body-card {
                background-color: #fff;
                border-radius: 12px;
                height: 100%;
                overflow: hidden;
            }
            .list-view {
                height: calc(100% - 100px);
                overflow: hidden;
            }
            .btn-pager {
                display: flex;
                margin-top: 10px;
                .page {
                    margin-left: auto;
                }
            }
        }
    }
</style>
src/views/productManage/productRegisterForm/addProductRegisterPage.vue
@@ -987,7 +987,7 @@
    getSelectDataList() {
      //车间
      getDictList({
        dictType: 1,
        dictType: 2,
      }).then((res) => {
        if (res.code == 200) {
          this.nameList = res.data || [];
@@ -1004,7 +1004,7 @@
      });
      //庄口
      getDictList({
        dictType: 0,
        dictType: 1,
      }).then((res) => {
        if (res.code == 200) {
          this.marketList = res.data || [];
src/views/productManage/silkRegisterForm/addPage.vue
@@ -770,7 +770,7 @@
    getSelectDataList() {
      //车间
      getDictList({
        dictType: 1,
        dictType: 2,
      }).then((res) => {
        if (res.code == 200) {
          this.nameList = res.data || [];
@@ -792,7 +792,7 @@
      // });
      //庄口
      getDictList({
        dictType: 0,
        dictType: 1,
      }).then((res) => {
        if (res.code == 200) {
          this.marketList = res.data || [];
@@ -1025,7 +1025,10 @@
                    message: "保存成功!",
                    type: "success",
                  });
                  this.activeName = "second"
                    if(res.data.ID){
                        this.registerId=res.data.ID;
                    }
                  this.activeName = "second";
                    this.getDetailsData();
                  // this.$router.push({
                  //   path: "/productManage/silkRegisterForm",
src/views/systemSetting/dataDictionary/components/addDataDictionaries.vue
@@ -4,7 +4,7 @@
      :before-close="handleClose">
      <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules"
        ref="ruleForm">
        <template v-if="editConfig.infomitton.TabsIndex === 0 || editConfig.infomitton.TabsIndex === 1">
        <template v-if="editConfig.infomitton.TabsIndex === 1 || editConfig.infomitton.TabsIndex === 2">
          <el-form-item prop="number" label="编码" style="width: 100%;">
            <el-input :disabled="editConfig.dialogTitle != '新增'" v-model="editConfig.infomitton.number"
              placeholder="请输入"></el-input>
@@ -15,14 +15,14 @@
          </el-form-item>
        </template>
        <template v-if="editConfig.infomitton.TabsIndex === 2">
        <template v-if="editConfig.infomitton.TabsIndex === 3">
          <el-form-item prop="name" label="带号颜色" style="width: 100%;">
            <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.name"
              placeholder="请输入字母或数字,不允许有空格、中文"></el-input>
          </el-form-item>
        </template>
        <template v-if="editConfig.infomitton.TabsIndex === 3">
        <template v-if="editConfig.infomitton.TabsIndex === 4">
          <el-form-item prop="name" label="规格" style="width: 100%;">
            <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.name"
              placeholder="请输入字母或数字,不允许有空格、中文"></el-input>
@@ -97,20 +97,20 @@
    },
    saveParams(type) {
      let params = {}
      if (type === 0 || type === 1) {
      if (type === 1 || type === 2) {
        params = {
          dictType: this.editConfig.infomitton.TabsIndex,
          name: this.editConfig.infomitton.name,
          number: this.editConfig.infomitton.number,
          remark: this.editConfig.infomitton.remark,
        }
      } else if (type === 2) {
      } else if (type === 3) {
        params = {
          dictType: this.editConfig.infomitton.TabsIndex,
          name: this.editConfig.infomitton.name,
          remark: this.editConfig.infomitton.remark,
        }
      } else if (type === 3) {
      } else if (type === 4) {
        params = {
          dictType: this.editConfig.infomitton.TabsIndex,
          name: this.editConfig.infomitton.name,
src/views/systemSetting/dataDictionary/index.vue
@@ -11,27 +11,27 @@
    <div class="body-card">
      <div class="list-view">
        <div class="bottom-tabs" >
          <div class="tab-pane" @click="getTab(0)" :style="{
            background: TabsIndex == 0 ? '#2a78fb' : '#F1F3F8',
            color: TabsIndex == 0 ? '#fff' : '#666'
          }">
            庄口管理
          </div>
          <div class="tab-pane" @click="getTab(1)" :style="{
            background: TabsIndex == 1 ? '#2a78fb' : '#F1F3F8',
            color: TabsIndex == 1 ? '#fff' : '#666'
          }">
            车间管理
            庄口管理
          </div>
          <div class="tab-pane" @click="getTab(2)" :style="{
            background: TabsIndex == 2 ? '#2a78fb' : '#F1F3F8',
            color: TabsIndex == 2 ? '#fff' : '#666'
          }">
            带号颜色
            车间管理
          </div>
          <div class="tab-pane" @click="getTab(3)" :style="{
            background: TabsIndex == 3 ? '#2a78fb' : '#F1F3F8',
            color: TabsIndex == 3 ? '#fff' : '#666'
          }">
            带号颜色
          </div>
          <div class="tab-pane" @click="getTab(4)" :style="{
            background: TabsIndex == 4 ? '#2a78fb' : '#F1F3F8',
            color: TabsIndex == 4 ? '#fff' : '#666'
          }">
            规格
          </div>
@@ -73,7 +73,7 @@
  computed: {},
  data() {
    return {
      TabsIndex:0,
      TabsIndex:1,
      loading: false,
      productTableList: {},
      editConfig:{
@@ -166,26 +166,26 @@
    },
    async getProductOrderInfo() {
        this.getData()
        if (this.TabsIndex == 0) {
        if (this.TabsIndex == 1) {
          // 庄口管理
          this.editConfig.dialogTitleType="庄口"
          this.tableBottomColumn = this.tableColumn // 表头
          this.showBottomCol = this.showCol  // 动态表头
          this.setBottomList()
        }else if (this.TabsIndex == 1) {
        }else if (this.TabsIndex == 2) {
          // 车间管理
          this.editConfig.dialogTitleType="车间"
          this.tableBottomColumn = this.workshopTableColumn
          this.showBottomCol = this.showWorkshopCol
          this.setBottomList()
        } else if (this.TabsIndex == 2) {
        } else if (this.TabsIndex == 3) {
          // 带号颜色
          this.editConfig.dialogTitleType="带号颜色"
          this.tableBottomColumn = this.colorTableColumn
          this.showBottomCol = this.showColorCol
          this.setBottomList()
        } else if (this.TabsIndex == 3) {
        } else if (this.TabsIndex == 4) {
          // 规格
          this.editConfig.dialogTitleType="规格"
          this.tableBottomColumn = this.specsTableColumn
vue.config.js
@@ -5,7 +5,7 @@
  return path.join(__dirname, dir)
}
const ipNum=105;
const serverPath='http://192.168.0.105:8008';
const serverPath=`http://192.168.0.${ipNum}:8008`;
// 设置不参与构建的库
const externals = {};
module.exports = {