|
@@ -94,11 +94,26 @@
|
|
:typeList="typeList"
|
|
:typeList="typeList"
|
|
/> -->
|
|
/> -->
|
|
<view class="group">
|
|
<view class="group">
|
|
- <button @click="onHandleAudit({}, 2)" type="primary">上报本月工时</button>
|
|
|
|
<button
|
|
<button
|
|
|
|
+ class="approval"
|
|
|
|
+ v-if="permission['func-05-mobile-works-approval']"
|
|
|
|
+ @click="onHandleApproval()"
|
|
|
|
+ >
|
|
|
|
+ 审批工时
|
|
|
|
+ </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"
|
|
v-show="collapseList.length > 0"
|
|
@click="onHandleAudit({}, 1)"
|
|
@click="onHandleAudit({}, 1)"
|
|
- class="button"
|
|
|
|
|
|
+ class="commit"
|
|
>
|
|
>
|
|
上报今日工时
|
|
上报今日工时
|
|
</button>
|
|
</button>
|
|
@@ -145,13 +160,9 @@ export default {
|
|
auditType: 0,
|
|
auditType: 0,
|
|
day: moment().format("YYYY-MM-DD"),
|
|
day: moment().format("YYYY-MM-DD"),
|
|
monthDate: moment(),
|
|
monthDate: moment(),
|
|
|
|
+ permission: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onNavigationBarButtonTap(e) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: "../audit/index",
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
onLoad() {
|
|
onLoad() {
|
|
this.init();
|
|
this.init();
|
|
},
|
|
},
|
|
@@ -181,13 +192,14 @@ export default {
|
|
this.queryWorkHours();
|
|
this.queryWorkHours();
|
|
},
|
|
},
|
|
change(e) {
|
|
change(e) {
|
|
- console.log(e);
|
|
|
|
this.day = e.fulldate;
|
|
this.day = e.fulldate;
|
|
this.currentList = e.extraInfo.list || [];
|
|
this.currentList = e.extraInfo.list || [];
|
|
},
|
|
},
|
|
monthSwitch(e) {
|
|
monthSwitch(e) {
|
|
this.monthDate = moment(`${e.year}-${e.month}-01`, "YYYY-MM-DD");
|
|
this.monthDate = moment(`${e.year}-${e.month}-01`, "YYYY-MM-DD");
|
|
- this.day = `${e.year}-${e.month < 10 ? "0" + e.month : e.month}-${moment(this.day).format("DD")}`;
|
|
|
|
|
|
+ this.day = `${e.year}-${e.month < 10 ? "0" + e.month : e.month}-${moment(
|
|
|
|
+ this.day
|
|
|
|
+ ).format("DD")}`;
|
|
this.currentList = [];
|
|
this.currentList = [];
|
|
this.queryWorkHours();
|
|
this.queryWorkHours();
|
|
// this.day = e.fulldate;
|
|
// this.day = e.fulldate;
|
|
@@ -207,6 +219,11 @@ export default {
|
|
this.auditType = type;
|
|
this.auditType = type;
|
|
this.$refs.auditDialog.open();
|
|
this.$refs.auditDialog.open();
|
|
},
|
|
},
|
|
|
|
+ onHandleApproval() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../audit/index",
|
|
|
|
+ });
|
|
|
|
+ },
|
|
async dialogInputConfirm(workload) {
|
|
async dialogInputConfirm(workload) {
|
|
let item = this.currentItem;
|
|
let item = this.currentItem;
|
|
if (isNaN(workload)) {
|
|
if (isNaN(workload)) {
|
|
@@ -338,6 +355,14 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
this.info.selected = selected;
|
|
this.info.selected = selected;
|
|
|
|
+ let permission = {};
|
|
|
|
+ user.Permissions?.forEach((item) => {
|
|
|
|
+ permission = {
|
|
|
|
+ ...permission,
|
|
|
|
+ ...item.Menus,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ this.permission = permission;
|
|
},
|
|
},
|
|
toAdd() {
|
|
toAdd() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -400,10 +425,16 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
position: fixed;
|
|
position: fixed;
|
|
|
|
+ flex-wrap: wrap;
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
left: 0;
|
|
- button {
|
|
|
|
|
|
+ .approval {
|
|
|
|
+ width: 100%;
|
|
|
|
+ border-radius: 0;
|
|
|
|
+ margin: inherit;
|
|
|
|
+ }
|
|
|
|
+ .commit {
|
|
width: 50%;
|
|
width: 50%;
|
|
border-radius: 0;
|
|
border-radius: 0;
|
|
margin: inherit;
|
|
margin: inherit;
|