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-form-item>
<uv-line color="#f5f5f5"></uv-line> <uv-line color="#f5f5f5"></uv-line>
<uv-form-item required label="请假理由" prop="reason" labelPosition="top"> <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-item>
</uv-form> </uv-form>
</view> </view>
@ -114,30 +114,14 @@ const rules = reactive({
type_id: [{ required: true, message: "请选择请假类别" }] type_id: [{ required: true, message: "请选择请假类别" }]
}) })
onLoad(options => { onLoad(options => {
http http.get(`/keywords?parent_key=holiday_type`).then(res => {
.request({
url: `/keywords?parent_key=holiday_type`,
method: "GET",
header: {
Accept: "application/json"
}
})
.then(res => {
let names = res.map(item => item.name) let names = res.map(item => item.name)
columns.value = [names] columns.value = [names]
pickerData.value = res pickerData.value = res
}) })
id.value = options.id id.value = options.id
if (id.value) { if (id.value) {
http http.get(`/hr/holidays/${options.id}`).then(res => {
.request({
url: `/hr/holidays/${options.id}`,
method: "GET",
header: {
Accept: "application/json"
}
})
.then(res => {
startValue.value = res.start_at * 1000 startValue.value = res.start_at * 1000
endValue.value = res.end_at * 1000 endValue.value = res.end_at * 1000
form.start_at = timeFormat(res.start_at, "yyyy-mm-dd hh:MM:ss") form.start_at = timeFormat(res.start_at, "yyyy-mm-dd hh:MM:ss")

View File

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

View File

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