main
panliang 2024-05-03 20:22:24 +08:00
parent c907a68df4
commit 0b0e30ed5f
4 changed files with 26 additions and 50 deletions

View File

@ -39,7 +39,7 @@
</uv-form-item>
<uv-line color="#f5f5f5"></uv-line>
<uv-form-item required label="请假理由" prop="reason" labelPosition="top">
<uv-textarea :customStyle="{ padding: '0' }" v-model="form.reason" count placeholder="请输入" :border="`none`" :maxlength="200"></uv-textarea>
<uv-textarea :customStyle="{ padding: '0' }" v-model="form.reason" count placeholder="请输入请假理由" :border="`none`" :maxlength="200"></uv-textarea>
</uv-form-item>
</uv-form>
</view>
@ -114,37 +114,21 @@ const rules = reactive({
type_id: [{ required: true, message: "请选择请假类别" }]
})
onLoad(options => {
http
.request({
url: `/keywords?parent_key=holiday_type`,
method: "GET",
header: {
Accept: "application/json"
}
})
.then(res => {
let names = res.map(item => item.name)
columns.value = [names]
pickerData.value = res
})
http.get(`/keywords?parent_key=holiday_type`).then(res => {
let names = res.map(item => item.name)
columns.value = [names]
pickerData.value = res
})
id.value = options.id
if (id.value) {
http
.request({
url: `/hr/holidays/${options.id}`,
method: "GET",
header: {
Accept: "application/json"
}
})
.then(res => {
startValue.value = res.start_at * 1000
endValue.value = res.end_at * 1000
form.start_at = timeFormat(res.start_at, "yyyy-mm-dd hh:MM:ss")
form.end_at = timeFormat(res.end_at, "yyyy-mm-dd hh:MM:ss")
form.reason = res.reason
form.type_id = res.type.name
})
http.get(`/hr/holidays/${options.id}`).then(res => {
startValue.value = res.start_at * 1000
endValue.value = res.end_at * 1000
form.start_at = timeFormat(res.start_at, "yyyy-mm-dd hh:MM:ss")
form.end_at = timeFormat(res.end_at, "yyyy-mm-dd hh:MM:ss")
form.reason = res.reason
form.type_id = res.type.name
})
}
})

View File

@ -33,9 +33,9 @@ const id = ref(0)
const columns = [
{ title: '审核状态', dataIndex: 'workflow_check.check_status', format: (value) => statusFun(value, 'statusExpense', 'name') },
{ title: '申请人', dataIndex: 'employee.name' },
{ title: '申请时间', dataIndex: 'created_format' },
{ title: '所属门店', dataIndex: 'store.title' },
{ title: '电话号码', dataIndex: 'employee.phone' },
{ title: '申请时间', dataIndex: 'created_format' },
{ title: '请假类型', dataIndex: 'type.name' },
{ title: '请假开始时间', dataIndex: 'start_format' },
{ title: '请假结束时间', dataIndex: 'end_format' },

View File

@ -26,8 +26,8 @@
<ListItem
v-for="item in list" :key="item.id"
title="请假申请"
:status-text="statusFun( item.workflow_check.check_status,'statusExpense','name')"
:status-color="statusFun( item.workflow_check.check_status,'statusExpense','color')"
:status-text="statusFun(item.workflow_check.check_status, 'statusExpense', 'name')"
:status-color="statusFun(item.workflow_check.check_status, 'statusExpense', 'color')"
:body="[
{ label:'请假类型', value: item.type.name },
{ label:'请假事由', value: item.reason },

View File

@ -36,7 +36,7 @@
<uv-line color="#f5f5f5"></uv-line>
<uv-form-item
required
label="请输入补卡理由"
label="补卡理由"
prop="reason"
labelPosition="top"
>
@ -144,22 +144,14 @@ onLoad((options) => {
form.sign_time = options.type == 1 ? '上班补卡' : '下班补卡'
}
if (id.value) {
http
.request({
url: `/hr/sign-repairs/${options.id}`,
method: 'GET',
header: {
Accept: 'application/json',
},
})
.then((res) => {
value.value = res.date * 1000
form.date = timeFormat(res.date, 'yyyy-mm-dd hh:MM')
form.reason = res.reason
form.isOutSide = res.sign_type == 1 ? false : true
form.outside_remarks = res.outside_remarks
form.sign_time = res.sign_time == 1 ? '上班补卡' : '下班补卡'
})
http.get(`/hr/sign-repairs/${options.id}`).then((res) => {
value.value = res.date * 1000
form.date = timeFormat(res.date, 'yyyy-mm-dd hh:MM')
form.reason = res.reason
form.isOutSide = res.sign_type == 1 ? false : true
form.outside_remarks = res.outside_remarks
form.sign_time = res.sign_time == 1 ? '上班补卡' : '下班补卡'
})
}
})