|
@@ -1,116 +1,118 @@
|
|
<template>
|
|
<template>
|
|
- <view class="content">
|
|
|
|
- <!-- <button class="btn-add" @click="toAdd" type="primary">新增</button> -->
|
|
|
|
- <uni-calendar
|
|
|
|
- class="uni-calendar--hook"
|
|
|
|
- :selected="info.selected"
|
|
|
|
- :showMonth="false"
|
|
|
|
- :date="day"
|
|
|
|
- @change="change"
|
|
|
|
- @monthSwitch="monthSwitch"
|
|
|
|
- >
|
|
|
|
- <text @click="toAdd">新增工时</text>
|
|
|
|
- </uni-calendar>
|
|
|
|
- <!-- <button @click="showModal" type="primary">新增</button> -->
|
|
|
|
- <uni-collapse ref="collapse">
|
|
|
|
- <uni-collapse-item
|
|
|
|
- v-for="collapse in collapseList"
|
|
|
|
- :key="collapse.name"
|
|
|
|
- :title="collapse.name"
|
|
|
|
|
|
+ <view class="page">
|
|
|
|
+ <view class="content">
|
|
|
|
+ <!-- <button class="btn-add" @click="toAdd" type="primary">新增</button> -->
|
|
|
|
+ <uni-calendar
|
|
|
|
+ class="uni-calendar--hook"
|
|
|
|
+ :selected="info.selected"
|
|
|
|
+ :showMonth="false"
|
|
|
|
+ :date="day"
|
|
|
|
+ @change="change"
|
|
|
|
+ @monthSwitch="monthSwitch"
|
|
>
|
|
>
|
|
- <view class="content">
|
|
|
|
- <uni-card
|
|
|
|
- v-for="(item, index) in collapse.children"
|
|
|
|
- :key="index"
|
|
|
|
- :title="allType[item.type_id] && allType[item.type_id].name"
|
|
|
|
- >
|
|
|
|
- <view class="uni-body">
|
|
|
|
- <view class="detail-item" v-if="item.project_id != '0'">
|
|
|
|
- <view class="detail-label">所属项目</view>
|
|
|
|
- <view class="detail-value">
|
|
|
|
- {{ getProject(item.project_id) }}
|
|
|
|
|
|
+ <text @click="toAdd">新增工时</text>
|
|
|
|
+ </uni-calendar>
|
|
|
|
+ <!-- <button @click="showModal" type="primary">新增</button> -->
|
|
|
|
+ <uni-collapse ref="collapse">
|
|
|
|
+ <uni-collapse-item
|
|
|
|
+ v-for="collapse in collapseList"
|
|
|
|
+ :key="collapse.name"
|
|
|
|
+ :title="collapse.name"
|
|
|
|
+ >
|
|
|
|
+ <view class="content">
|
|
|
|
+ <uni-card
|
|
|
|
+ v-for="(item, index) in collapse.children"
|
|
|
|
+ :key="index"
|
|
|
|
+ :title="allType[item.type_id] && allType[item.type_id].name"
|
|
|
|
+ >
|
|
|
|
+ <view class="uni-body">
|
|
|
|
+ <view class="detail-item" v-if="item.project_id != '0'">
|
|
|
|
+ <view class="detail-label">所属项目</view>
|
|
|
|
+ <view class="detail-value">
|
|
|
|
+ {{ getProject(item.project_id) }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="detail-item">
|
|
|
|
- <view class="detail-label">审核状态</view>
|
|
|
|
- <view
|
|
|
|
- class="detail-value"
|
|
|
|
- :style="{ color: stateColor[item.audit_state] }"
|
|
|
|
- >
|
|
|
|
- {{ auditState[item.audit_state] }}
|
|
|
|
|
|
+ <view class="detail-item">
|
|
|
|
+ <view class="detail-label">审核状态</view>
|
|
|
|
+ <view
|
|
|
|
+ class="detail-value"
|
|
|
|
+ :style="{ color: stateColor[item.audit_state] }"
|
|
|
|
+ >
|
|
|
|
+ {{ auditState[item.audit_state] }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="detail-item" v-if="item.audit_state == 3">
|
|
|
|
- <view class="detail-label">拒绝原因</view>
|
|
|
|
- <view class="detail-value">
|
|
|
|
- {{ item.audit_desc }}
|
|
|
|
|
|
+ <view class="detail-item" v-if="item.audit_state == 3">
|
|
|
|
+ <view class="detail-label">拒绝原因</view>
|
|
|
|
+ <view class="detail-value">
|
|
|
|
+ {{ item.audit_desc }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="detail-item">
|
|
|
|
- <view class="detail-label">工时</view>
|
|
|
|
- <view class="detail-value">
|
|
|
|
- {{ item.workload }}
|
|
|
|
|
|
+ <view class="detail-item">
|
|
|
|
+ <view class="detail-label">工时</view>
|
|
|
|
+ <view class="detail-value">
|
|
|
|
+ {{ item.workload }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view
|
|
|
|
- v-if="item.audit_state == 0 || item.audit_state == 3"
|
|
|
|
- slot="actions"
|
|
|
|
- class="card-actions"
|
|
|
|
- >
|
|
|
|
- <view class="card-actions-item" @click="onHandleSave(item)">
|
|
|
|
- <text class="card-actions-item-text">修改工时</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="card-actions-item" @click="onHandleAudit(item, 0)">
|
|
|
|
- <text class="card-actions-item-text">上报审批</text>
|
|
|
|
|
|
+ <view
|
|
|
|
+ v-if="item.audit_state == 0 || item.audit_state == 3"
|
|
|
|
+ slot="actions"
|
|
|
|
+ class="card-actions"
|
|
|
|
+ >
|
|
|
|
+ <view class="card-actions-item" @click="onHandleSave(item)">
|
|
|
|
+ <text class="card-actions-item-text">修改工时</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="card-actions-item" @click="onHandleAudit(item, 0)">
|
|
|
|
+ <text class="card-actions-item-text">上报审批</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- </uni-card>
|
|
|
|
- </view>
|
|
|
|
- </uni-collapse-item>
|
|
|
|
- </uni-collapse>
|
|
|
|
|
|
+ </uni-card>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-collapse-item>
|
|
|
|
+ </uni-collapse>
|
|
|
|
|
|
- <uni-popup ref="inputDialog" type="dialog">
|
|
|
|
- <uni-popup-dialog
|
|
|
|
- ref="inputClose"
|
|
|
|
- mode="input"
|
|
|
|
- title="填入工时"
|
|
|
|
- :value="currentItem.workload === 0 ? '' : currentItem.workload"
|
|
|
|
- @confirm="dialogInputConfirm"
|
|
|
|
- ></uni-popup-dialog>
|
|
|
|
- </uni-popup>
|
|
|
|
- <uni-popup ref="auditDialog" type="dialog">
|
|
|
|
- <uni-popup-dialog
|
|
|
|
- type="info"
|
|
|
|
- title="提示"
|
|
|
|
- content="是否确认提交审批"
|
|
|
|
- @confirm="auditConfirm"
|
|
|
|
- ></uni-popup-dialog>
|
|
|
|
- </uni-popup>
|
|
|
|
- <view class="group">
|
|
|
|
- <!-- <button
|
|
|
|
|
|
+ <uni-popup ref="inputDialog" type="dialog">
|
|
|
|
+ <uni-popup-dialog
|
|
|
|
+ ref="inputClose"
|
|
|
|
+ mode="input"
|
|
|
|
+ title="填入工时"
|
|
|
|
+ :value="currentItem.workload === 0 ? '' : currentItem.workload"
|
|
|
|
+ @confirm="dialogInputConfirm"
|
|
|
|
+ ></uni-popup-dialog>
|
|
|
|
+ </uni-popup>
|
|
|
|
+ <uni-popup ref="auditDialog" type="dialog">
|
|
|
|
+ <uni-popup-dialog
|
|
|
|
+ type="info"
|
|
|
|
+ title="提示"
|
|
|
|
+ content="是否确认提交审批"
|
|
|
|
+ @confirm="auditConfirm"
|
|
|
|
+ ></uni-popup-dialog>
|
|
|
|
+ </uni-popup>
|
|
|
|
+ <view class="group">
|
|
|
|
+ <!-- <button
|
|
class="approval"
|
|
class="approval"
|
|
v-if="permission['func-05-mobile-works-approval']"
|
|
v-if="permission['func-05-mobile-works-approval']"
|
|
@click="onHandleApproval()"
|
|
@click="onHandleApproval()"
|
|
>
|
|
>
|
|
审批工时
|
|
审批工时
|
|
</button> -->
|
|
</button> -->
|
|
- <button
|
|
|
|
- v-if="permission['func-05-mobile-works-commit']"
|
|
|
|
- @click="onHandleAudit({}, 2)"
|
|
|
|
- type="primary"
|
|
|
|
- class="commit"
|
|
|
|
- >
|
|
|
|
- 上报本月工时
|
|
|
|
- </button>
|
|
|
|
- <button
|
|
|
|
- v-if="permission['func-05-mobile-works-commit']"
|
|
|
|
- v-show="collapseList.length > 0"
|
|
|
|
- @click="onHandleAudit({}, 1)"
|
|
|
|
- class="commit"
|
|
|
|
- >
|
|
|
|
- 上报今日工时
|
|
|
|
- </button>
|
|
|
|
|
|
+ <button
|
|
|
|
+ v-if="permission['func-05-mobile-works-commit']"
|
|
|
|
+ @click="onHandleAudit({}, 2)"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="commit"
|
|
|
|
+ >
|
|
|
|
+ 上报本月工时
|
|
|
|
+ </button>
|
|
|
|
+ <button
|
|
|
|
+ v-if="permission['func-05-mobile-works-commit']"
|
|
|
|
+ v-show="collapseList.length > 0"
|
|
|
|
+ @click="onHandleAudit({}, 1)"
|
|
|
|
+ class="commit"
|
|
|
|
+ >
|
|
|
|
+ 上报今日工时
|
|
|
|
+ </button>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -438,4 +440,10 @@ export default {
|
|
margin: inherit;
|
|
margin: inherit;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+::v-deep {
|
|
|
|
+ .uni-calendar-item__weeks-box-item {
|
|
|
|
+ width: 90rpx;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|