123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962 |
- <template>
- <div class="borderless">
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
- @click="backToList">返回列表
- </el-button>
- </div>
- <el-button
- class="el-button--small-yh add-customer-btn"
- type="primary"
- :disabled="disabled"
- size="small"
- @click="editCustomer"
- >{{ form.id ? '确认修改' : '确认新增' }}
- </el-button>
- </div>
- <basic-container style="margin-top: 60px;">
- <avue-form ref="form"
- style="margin-bottom: -20px"
- v-model="form"
- :option="option">
- </avue-form>
- </basic-container>
- <containerTitle title="基础资料"></containerTitle>
- <basic-container>
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
- <div style="display: flex;justify-content: space-between;margin-bottom: 10px">
- <div>
- <el-button type="primary" @click="dataList.push({})" size="small">新增</el-button>
- <el-button type="primary" @click="exportAll" size="small">导出全部</el-button>
- <el-button type="primary" @click="exportSalary" size="small">导出工资条</el-button>
- <el-form-item label="姓名" style="margin-left: 20px;margin-top: -5px">
- <el-input placeholder="姓名" size="small"></el-input>
- </el-form-item>
- <el-form-item style="margin-top: -6px">
- <el-button type="primary" size="small">查询</el-button>
- </el-form-item>
- </div>
- <div>
- <el-button icon="el-icon-s-operation" size="small" circle @click="drawer=true"></el-button>
- </div>
- </div>
- </el-form>
- <!--抽屉自定义列-->
- <el-drawer
- title="自定义列设置(加项录入正数、减项录入负数)"
- :visible.sync="drawer"
- append-to-body
- withHeader
- size="50%"
- :with-header="false">
- <el-table
- :data="optionList.column"
- border
- ref="table"
- size="mini"
- :height="tableHeight"
- style="width: 100%;">
- <!-- <el-table-column-->
- <!-- type="index"-->
- <!-- align="center"-->
- <!-- label="序号"-->
- <!-- width="50">-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="label"
- align="center"
- label="列名"
- width="200">
- <template slot-scope="scope">
- <el-input v-model="scope.row.label" size="mini" placeholder="请输入内容"></el-input>
- </template>
- </el-table-column>
- <el-table-column
- prop="fixed"
- align="center"
- label="冻结"
- width="50">
- <template slot-scope="scope">
- <el-checkbox v-model="scope.row.fixed"></el-checkbox>
- </template>
- </el-table-column>
- <el-table-column
- prop="hide"
- align="center"
- label="隐藏"
- width="50">
- <template slot-scope="scope">
- <el-checkbox v-model="scope.row.hide"></el-checkbox>
- </template>
- </el-table-column>
- <el-table-column
- prop="width"
- align="center"
- label="宽度"
- width="400">
- <template slot-scope="scope">
- <el-slider :min="1" :max="500" show-input v-model="scope.row.width"></el-slider>
- </template>
- </el-table-column>
- <el-table-column
- prop="remarks"
- align="center"
- label="备注"
- width="200">
- <template slot-scope="scope">
- <el-input v-model="scope.row.remarks" size="mini" placeholder="请输入内容"></el-input>
- </template>
- </el-table-column>
- </el-table>
- </el-drawer>
- <el-table
- :data="dataList"
- border
- size="small"
- :header-cell-style="headerColor"
- style="width: 100%;"
- >
- <el-table-column
- type="index"
- align="center"
- label="序号"
- width="50">
- </el-table-column>
- <el-table-column
- v-for="item in optionList.column"
- :prop="item.prop"
- align="center"
- v-if="item.hide != true"
- :fixed="item.fixed"
- :label="item.label"
- :width="item.width>2?item.width:100">
- <template slot-scope="scope">
- <el-input v-model="scope.row[item.prop]" :placeholder="'请输入'+item.label"></el-input>
- </template>
- </el-table-column>
- </el-table>
- </basic-container>
- </div>
- </template>
- <script>
- import {typeSave} from "@/api/maintenance/salesPolicy";
- export default {
- name: "detailsPage",
- data(){
- return{
- disabled:false,
- form:{},
- dataList:[],
- drawer:false,
- tableHeight:0,
- option:{
- menuBtn: false,
- labelWidth: 100,
- column:[
- {
- label:'年',
- prop:'name',
- type:'year',
- search:true,
- span: 4,
- maxlength: 3,
- },
- {
- label:'月',
- prop:'name1',
- type:'month',
- search:true,
- span: 4,
- maxlength: 3,
- },
- {
- label:'备注',
- prop:'name2',
- search:true,
- span: 16,
- maxlength: 3,
- }]
- },
- optionList:{
- addBtn:false,
- addRowBtn:true,
- cellBtn:true,
- border: true,
- "lazy": true,
- "tip": false,
- "simplePage": true,
- "searchShow": true,
- "align": "center",
- index: true,
- column:[
- {
- label:'学科',
- prop:'nameA',
- slot: true,
- width:100,
- },
- {
- label:'类别',
- prop:'nameB',
- slot:true,
- width:100
- },
- {
- label:'转正时间',
- prop:'nameC',
- type: "date",
- span:8,
- format:'yyyy-MM-dd',
- valueFormat:'yyyy-MM-dd',
- mock:{
- type:'datetime',
- format:'yyyy-MM-dd'
- },
- width:100,
- cell: true,
- },
- {
- label:'职务',
- prop:'name4',
- cell: true,
- },
- {
- label:'姓名',
- prop:'name5',
- cell: true,
- },
- {
- label:'工资拨付标准',
- prop:'name6',
- cell: true,
- },
- {
- label:'职级拨付标准',
- prop:'name7',
- cell: true,
- },
- {
- label:'履约奖',
- prop:'name8',
- cell: true,
- remarks:'基础工资'
- },
- {
- label:'校龄工资',
- prop:'name9',
- cell: true,
- remarks:'基础工资'
- },
- {
- label:'增资',
- prop:'name10',
- cell: true,
- remarks:'基础工资'
- },
- {
- label:'学历工资',
- prop:'name11',
- cell: true,
- remarks:'基础工资'
- },
- {
- label:'职级标准',
- prop:'name12',
- cell: true,
- remarks:'职级标准'
- },
- {
- label:'职级工资',
- prop:'name13',
- cell: true,
- remarks:'基础工资'
- },
- {
- label:'工资基数',
- prop:'name14',
- cell: true,
- remarks:'基础工资'
- },
- {
- label:'基础工资',
- prop:'name15',
- cell: true,
- headerColor:true,
- remarks:'基础工资'
- },
- {
- label:'工作量工资标准',
- prop:'name16',
- cell: true,
- },
- {
- label:'10月份课时',
- prop:'name17',
- cell: true,
- },
- {
- label:'10月工作量工资',
- prop:'name18',
- cell: true,
- remarks:'10月工作量工资'
- },
- {
- label:'自定义',
- prop:'name19',
- cell: true,
- remarks:'工作量工资'
- },
- {
- label:'自定义',
- prop:'name20',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name21',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name22',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name23',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name24',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name25',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name26',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name27',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'自定义',
- prop:'name28',
- cell: true,
- remarks:'工作量工资'
- },{
- label:'工作量工资',
- prop:'name29',
- cell: true,
- },
- {
- label:'日常考核标准',
- prop:'name30',
- cell: true,
- },
- {
- label:'日常考核工资',
- prop:'name31',
- cell: true,
- },
- {
- label:'学期绩效工资',
- prop:'name32',
- cell: true,
- },
- {
- label:'自定义奖励',
- prop:'name33',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name34',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name35',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name36',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name37',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name38',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name39',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name40',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name41',
- cell: true,
- remarks:'奖励工资'
- },
- {
- label:'自定义奖励',
- prop:'name42',
- cell: true,
- remarks:'奖励工资'
- },{
- label:'奖励工资',
- prop:'name43',
- cell: true,
- },
- {
- label:'领导干部补贴',
- prop:'name44',
- cell: true,
- remarks:'职务津贴'
- },
- {
- label:'备课组长',
- prop:'name45',
- cell: true,
- remarks:'职务津贴'
- },
- {
- label:'教研组长',
- prop:'name46',
- cell: true,
- remarks:'职务津贴'
- },
- {
- label:'职务津贴',
- prop:'name47',
- cell: true,
- },
- {
- label:'班主任费',
- prop:'name48',
- cell: true,
- remarks:'班主任津贴'
- },
- {
- label:'班额',
- prop:'name49',
- cell: true,
- remarks:'班主任津贴'
- },
- {
- label:'班主任津贴',
- prop:'name50',
- cell: true,
- remarks:'班主任津贴'
- },
- {
- label:'微信',
- prop:'name51',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'产假工资',
- prop:'name52',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'周末加班',
- prop:'name53',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'2020年上学期绩效',
- prop:'name54',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'2020年下学期绩效',
- prop:'name55',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'干部补贴预留',
- prop:'name56',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'假期加班费',
- prop:'name57',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'新岗岗前培训',
- prop:'name58',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'期中期末考试学科优胜奖(预留发放)',
- prop:'name59',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'级部长(预留发放)',
- prop:'name60',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'9月副班费(预留补发)',
- prop:'name61',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'餐车、周五测温、周五安全岗(预留补发)',
- prop:'name62',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'预留补发',
- prop:'name63',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'调整差额',
- prop:'name64',
- cell: true,
- remarks:'调整差额'
- },
- {
- label:'自定义',
- prop:'name65',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name66',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name67',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name68',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name69',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name70',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name71',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name72',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name73',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'自定义',
- prop:'name74',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'补贴项',
- prop:'name75',
- cell: true,
- remarks:'补贴项'
- },
- {
- label:'出勤',
- prop:'name76',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'督查罚款',
- prop:'name77',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'电话费',
- prop:'name78',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'学习强国',
- prop:'name79',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'宿舍管理费',
- prop:'name80',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'生育津贴',
- prop:'name81',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'五险一金个人',
- prop:'name82',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'扣除项',
- prop:'name83',
- cell: true,
- remarks:'扣除项'
- },
- {
- label:'保险(单位部分)',
- prop:'name84',
- cell: true,
- remarks:'保险(单位部分)'
- },
- {
- label:'保险(个人部分)',
- prop:'name85',
- cell: true,
- remarks:'保险(个人部分)'
- },
- {
- label:'公积金(单位部分)',
- prop:'name86',
- cell: true,
- remarks:'公积金(单位部分)'
- },
- {
- label:'公积金(个人部分)',
- prop:'name87',
- cell: true,
- remarks:'公积金(个人部分)'
- },
- {
- label:'应发工资',
- prop:'name88',
- cell: true,
- remarks:'应发工资'
- },
- {
- label:'个税',
- prop:'name89',
- cell: true,
- remarks:'个税'
- },
- {
- label:'实发工资(减去个人)',
- prop:'name90',
- cell: true,
- remarks:'实发工资(减去个人)'
- },
- {
- label:'备注',
- prop:'name91',
- cell: true,
- remarks:'备注'
- },
- {
- label:'自定义',
- prop:'name92',
- cell: true,
- },
- {
- label:' ',
- prop:'name93',
- cell: true,
- },
- {
- label:' ',
- prop:'name94',
- cell: true,
- },
- {
- label:'日照银行代发最终',
- prop:'name95',
- cell: true,
- remarks:'日照银行代发最终'
- },
- {
- label:'已付',
- prop:'name96',
- cell: true,
- remarks:'已付'
- },
- {
- label:'冲借款',
- prop:'name97',
- cell: true,
- remarks:'冲借款'
- },
- {
- label:'现金付款',
- prop:'name98',
- cell: true,
- remarks:'现金付款'
- },
- {
- label:'暂不付',
- prop:'name99',
- cell: true,
- remarks:'暂不付'
- },
- {
- label:'暂不付1',
- prop:'name100',
- cell: true,
- remarks:'暂不付1'
- },
- {
- label:'暂不付2',
- prop:'name101',
- cell: true,
- remarks:'暂不付2'
- },
- {
- label:'备注',
- prop:'name102',
- cell: true,
- remarks:'备注'
- }
- ]
- },
- }
- },
- created() {
- let windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
- console.log(windowHeight)
- this.tableHeight = windowHeight - 140;
- },
- methods:{
- //自定义表头颜色
- headerColor(row, column, rowIndex, columnIndex){
- // console.log(row, column, rowIndex, columnIndex)
- switch (row.column.property) {
- case 'name14':
- return "color: #fff;background:#a4cf57"
- case 'name29':
- return "color: #fff;background:#a4cf57"
- case 'name31':
- return "color: #fff;background:#a4cf57"
- case 'name43':
- return "color: #fff;background:#a4cf57"
- case 'name47':
- return "color: #fff;background:#a4cf57"
- case 'name50':
- return "color: #fff;background:#a4cf57"
- case 'name75':
- return "color: #fff;background:#a4cf57"
- case 'name83':
- return "color: #fff;background:#a4cf57"
- case 'name84':
- return "color: #fff;background:#a4cf57"
- case 'name85':
- return "color: #fff;background:#a4cf57"
- case 'name86':
- return "color: #fff;background:#a4cf57"
- case 'name87':
- return "color: #fff;background:#a4cf57"
- case 'name88':
- return "color: #fff;background:#a4cf57"
- case 'name89':
- return "color: #fff;background:#a4cf57"
- case 'name90':
- return "color: #fff;background:#a4cf57"
- }
- },
- //修改提交触发
- editCustomer() {
- console.log(this.form)
- this.$refs["form"].validate((valid) => {
- if (valid) {
- this.form.corps = this.form.corps.join(',')
- this.form.specialItemList = this.contactsData
- this.form.presentItemList = this.contactsDataBuyFree
- typeSave(this.form).then(res=>{
- this.$message({
- type: "success",
- message: this.form.id ? "修改成功!" : "新增成功!"
- });
- this.backToList()
- })
- } else {
- return false;
- }
- });
- },
- //新增
- rowSave(form, done) {
- this.$message.success(
- '新增数据' + JSON.stringify(form)
- )
- done()
- },
- //导出全部
- exportAll(){
- let opt = {
- title: '工资条',
- column: this.optionList.column,
- data: this.dataList
- }
- this.$Export.excel({
- title: opt.title ,
- columns: opt.column,
- data: opt.data
- });
- },
- //导出工资条
- exportSalary(){
- let data = []
- for (let item in this.optionList.column){
- switch (this.optionList.column[item].prop) {
- case 'name14':
- data.push(this.optionList.column[item])
- break
- case 'name29':
- data.push(this.optionList.column[item])
- break
- case 'name31':
- data.push(this.optionList.column[item])
- break
- case 'name43':
- data.push(this.optionList.column[item])
- break
- case 'name47':
- data.push(this.optionList.column[item])
- break
- case 'name50':
- data.push(this.optionList.column[item])
- break
- case 'name75':
- data.push(this.optionList.column[item])
- break
- case 'name83':
- data.push(this.optionList.column[item])
- break
- case 'name84':
- data.push(this.optionList.column[item])
- break
- case 'name85':
- data.push(this.optionList.column[item])
- break
- case 'name86':
- data.push(this.optionList.column[item])
- break
- case 'name87':
- data.push(this.optionList.column[item])
- break
- case 'name88':
- data.push(this.optionList.column[item])
- break
- case 'name89':
- data.push(this.optionList.column[item])
- break
- case 'name90':
- data.push(this.optionList.column[item])
- break
- }
- }
- let opt = {
- title: '工资条',
- column: data,
- data: this.dataList
- }
- this.$Export.excel({
- title: opt.title ,
- columns: opt.column,
- data: opt.data
- });
- },
- //返回列表
- backToList() {
- this.$emit("goBack");
- // this.$router.$avueRouter.closeTag();
- // this.$router.push({
- // path: '/maintenance/salesPolicy/index',
- // query: {}
- // });
- },
- }
- }
- </script>
- <style scoped>
- ::v-deep .el-drawer.rtl{
- overflow: scroll;
- }
- ::v-deep .el-table .el-table__fixed {
- height: auto !important;
- bottom: 8px !important;
- }
- </style>
|