Commit b3db596f authored by 刘文虎's avatar 刘文虎

当前工资

parent 73ac4ccc
;(function() {
let NODE_ENV = 'prod' // dev:开发环境 | test:测试环境 | prod:生产环境
let NODE_ENV = 'test' // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null
let VERSION = 'v1.0.15'
if (process.env.NODE_ENV === 'development') {
......
......@@ -31,7 +31,8 @@ export function get(data) {
return request({
url: `/rest/bookRecord/detail`,
method: 'GET',
data
data,
noLoading: true
})
}
......@@ -51,3 +52,12 @@ export function deleteByIds(data) {
})
}
// 自动计算当前工资明细
export function recordCalculateDetail(data) {
return request({
url: `/rest/project/record/pre`,
method: 'POST',
data,
noLoading: true
})
}
\ No newline at end of file
......@@ -3,12 +3,12 @@
<view class="mask-view">
<view class="apply-refuse" :style="style">
<view class="title" :style="'color:' + titleColor">{{ title }}</view>
<view class="content-view">
<view class="content-view" :style="{'min-height':$slots.content?0:''}">
<view :class="['content-text-view', { 'has-input': isInput }]" v-if="content">{{ content }}</view>
<view v-if="$slots.content" class="slot-view"><slot name="content" /></view>
<view v-if="isInput&&visible">
<u-input
type="number"
type="digit"
adjust-position
v-model="text"
:focus="focus"
......@@ -112,7 +112,7 @@ export default {
watch: {
visible(val) {
if (!val) {
this.input = '';
// this.input = '';
this.text = '';
this.focus = false;
// wx.offKeyboardHeightChange((res) => {
......@@ -121,6 +121,7 @@ export default {
} else {
console.log('-------watch -----');
if (!this.isInput) return;
this.text=this.input
// const { screenHeight } = wx.getSystemInfoSync()
// this.updatePosition(0)
......
......@@ -40,8 +40,8 @@ export default {
height: 72upx;
display: flex;
align-items: center;
background: #cbede4;
color: #ffffff;
background: #EEEEEE;
color: #8D8D8D;
font-size: 28rpx;
font-weight: bold;
overflow: hidden;
......@@ -68,9 +68,9 @@ export default {
}
}
.left {
background: linear-gradient(70deg, #ffffff 50%, #cbede4 0);
background: linear-gradient(70deg, #ffffff 50%, #EEEEEE 0);
}
.right {
background: linear-gradient(110deg, #cbede4 50%, #ffffff 0);
background: linear-gradient(110deg, #EEEEEE 50%, #ffffff 0);
}
</style>
......@@ -25,7 +25,6 @@
<script>
import NavbarRight from '@/components/navbar-right';
import NoData from '@/components/no-data';
import PopInput from '@/components/pop-input-view';
import SubmitButton from '@/components/submit-button/index.vue';
import { billBaseUrl } from '@/utils/config.js';
import { getList, deleteById, enable, close } from '@/api/mine/timed.js';
......@@ -33,7 +32,6 @@ import { getOfferPriceList,updateOfferPrice } from '@/api/bill/quoted-price.js'
export default {
components: {
NoData,
PopInput,
SubmitButton,
NavbarRight
},
......
......@@ -37,8 +37,8 @@ export default {
height: 72upx;
display: flex;
align-items: center;
background: #cbede4;
color: #ffffff;
background: #EEEEEE;
color: #8D8D8D;
font-size: 28rpx;
font-weight: bold;
overflow: hidden;
......@@ -65,9 +65,9 @@ export default {
}
}
.left {
background: linear-gradient(70deg, #ffffff 50%, #cbede4 0);
background: linear-gradient(70deg, #ffffff 50%, #EEEEEE 0);
}
.right {
background: linear-gradient(110deg, #cbede4 50%, #ffffff 0);
background: linear-gradient(110deg, #EEEEEE 50%, #ffffff 0);
}
</style>
<template>
<view class="wage" v-if="list.length">
<view class="wage-title">当前工资(自动计算)</view>
<view class="wage-table">
<view class="table">
<view class="table-tr table-th">
<view
class="table-td"
:class="{ 'table-td-left': key === 0, 'table-td-right': key === wageTableOptions.length - 1 }"
v-for="(item, key) in wageTableOptions"
:key="key"
>
<text>{{ item.label }}</text>
</view>
</view>
<block v-for="(item, index) in list" :key="index">
<view class="table-tr table-border" v-if="index <= 4 || loadmore">
<view
class="table-td"
:class="{ 'table-td-left': key === 0, 'table-td-right': key === wageTableOptions.length - 1 }"
v-for="(tdItem, key) in wageTableOptions"
:key="key"
>
<view v-if="tdItem.value === 'rewardAmount'">
<text :class="{ deduct: item[tdItem.value]<0 }" v-if="item.rewardText !== 1">
<text>{{ item[tdItem.value] || 0 }}</text>
</text>
</view>
<text v-else>{{ item[tdItem.value] || 0 }}</text>
</view>
</view>
</block>
</view>
</view>
<view class="load-more" @click="change" v-if="list.length > 5">
<u-icon :name="loadmore ? 'arrow-up' : 'arrow-down'" class="load-more-icon"></u-icon>
<text>{{ loadmore ? '收起' : '查看更多' }}</text>
</view>
</view>
</template>
<script>
import { wageTableOptions } from '@/utils/options/workpoint/index.js';
export default {
props: {
list: {
type: Array,
default: () => []
}
},
data() {
return {
wageTableOptions,
loadmore: false
};
},
methods: {
change() {
this.loadmore = !this.loadmore;
}
}
};
</script>
<style lang="scss" scoped>
.wage {
margin-bottom: 24rpx;
.wage-title {
margin: 40rpx 0;
font-size: 28rpx;
color: #333333;
}
.load-more {
margin-top: 12rpx;
padding: 6rpx 0;
font-size: 26rpx;
text-align: center;
color: $default-color;
.load-more-icon {
// margin-top: 2rpx;
margin-right: 12rpx;
}
}
}
.wage-table {
.table {
.table-tr {
width: 100%;
color: #333333;
display: flex;
align-items: center;
}
.table-th {
color: #8d8d8d;
font-weight: bold;
background: #f6f7fa;
}
.table-td {
width: 25%;
padding: 24rpx 6rpx;
font-size: 28rpx;
line-height: 36rpx;
text-align: center;
}
.table-td-left {
text-align: left;
}
.table-td-right {
text-align: right;
}
.deduct {
color: #fc524d;
}
.table-border{
border-bottom: 2rpx solid #F6F7FA;
}
}
}
</style>
This diff is collapsed.
This diff is collapsed.
......@@ -32,19 +32,53 @@ export const workTypeOptions = [{
number: 0.5,
label: "半个工"
},
{
value: 3,
label: "自定义"
},
]
export const overtimeTypeOptions = [{
value: 1,
label: "无"
},
]
export const deductTypeOptions = [{
value: 1,
label: "无"
},
{
value: '+',
label: "加+"
},
{
value: '-',
label: "减-"
},
]
export const wageTableOptions = [{
value: 'memberName',
label: "姓名",
width:'28%'
},
{
value: 'normalAmount',
label: "上班",
width:'18%'
},
{
value: 'overAmount',
label: "加班",
width:'18%'
},
{
value: 'rewardAmount',
label: "补扣",
width:'18%'
},
{
value: 3,
label: "自定义"
value: 'amount',
label: "合计",
width:'18%'
},
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment