|
@@ -15,6 +15,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="OutSide_right">
|
|
<div class="OutSide_right">
|
|
|
|
+ <el-link type="primary" :underline="false" @click="showReportingDialog()">{{ "同步临时报工"
|
|
|
|
+ }}</el-link>
|
|
<el-link type="primary" :underline="false" @click="(taskTypeDialog = true)">{{ "任务类型管理"
|
|
<el-link type="primary" :underline="false" @click="(taskTypeDialog = true)">{{ "任务类型管理"
|
|
}}</el-link>
|
|
}}</el-link>
|
|
<el-link type="primary" :underline="false" @click="addPlan()">{{
|
|
<el-link type="primary" :underline="false" @click="addPlan()">{{
|
|
@@ -222,6 +224,29 @@
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <!-- 同步临时报工 -->
|
|
|
|
+ <el-dialog title="同步临时报工" :visible.sync="synchronousReportingDialog" width="600px" :before-close="handleClose">
|
|
|
|
+ <div class="tongbu">
|
|
|
|
+ <div :style="`color: ${reportWorkDayDisable ? 'red' : '#999'}`">选择的日期在三十天内</div>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="reportWorkDay"
|
|
|
|
+ type="daterange"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ :clearable="false"
|
|
|
|
+ range-separator="至"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
+ @change="handleDateChange">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="
|
|
|
|
+ (synchronousReportingDialog = false)
|
|
|
|
+ ">取 消</el-button>
|
|
|
|
+ <el-button type="primary" :loading="reportWorkLoading" :disabled="reportWorkDayDisable" @click="reportWorkCli()">确定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 任务类型新增 -->
|
|
<!-- 任务类型新增 -->
|
|
<el-dialog title="新增任务类型" :visible.sync="taskTypeAddDialog" width="800" :before-close="handleClose">
|
|
<el-dialog title="新增任务类型" :visible.sync="taskTypeAddDialog" width="800" :before-close="handleClose">
|
|
<div>
|
|
<div>
|
|
@@ -290,6 +315,10 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ synchronousReportingDialog: false,
|
|
|
|
+ reportWorkDay: [],
|
|
|
|
+ reportWorkDayDisable: false,
|
|
|
|
+ reportWorkLoading: false,
|
|
steelStampNumber: "",
|
|
steelStampNumber: "",
|
|
todayDate: this.dayjs().format('YYYY-MM-DD'),
|
|
todayDate: this.dayjs().format('YYYY-MM-DD'),
|
|
planDate: this.dayjs().format('YYYY-MM-DD'),
|
|
planDate: this.dayjs().format('YYYY-MM-DD'),
|
|
@@ -390,6 +419,55 @@ export default {
|
|
this.getTaskTypeList();
|
|
this.getTaskTypeList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ reportWorkCli() {
|
|
|
|
+ this.reportWorkLoading = true;
|
|
|
|
+ this.http.post(
|
|
|
|
+ "/wx-corp-info/testSyncTemporaryJobApplication",
|
|
|
|
+ { startDate: this.reportWorkDay[0], endDate: this.reportWorkDay[1] },
|
|
|
|
+ (res) => {
|
|
|
|
+ this.reportWorkLoading = false;
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.synchronousReportingDialog = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '同步成功',
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ this.getTableData()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ (error) => {
|
|
|
|
+ this.reportWorkLoading = false;
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ // 显示临时报工
|
|
|
|
+ showReportingDialog() {
|
|
|
|
+ this.reportWorkDay = [this.dayjs().format('YYYY-MM-DD'), this.dayjs().format('YYYY-MM-DD')]
|
|
|
|
+ this.synchronousReportingDialog = true
|
|
|
|
+ },
|
|
|
|
+ handleDateChange(value) {
|
|
|
|
+ const startDate = value[0];
|
|
|
|
+ const endDate = value[1];
|
|
|
|
+ const d1 = this.dayjs(startDate);
|
|
|
|
+ const d2 = this.dayjs(endDate);
|
|
|
|
+ const diffDays = Math.abs(d1.diff(d2, 'day'));
|
|
|
|
+ if (diffDays > 30) {
|
|
|
|
+ this.reportWorkDayDisable = true
|
|
|
|
+ console.log('日期相隔超过三十天');
|
|
|
|
+ } else {
|
|
|
|
+ console.log('日期相隔不超过三十天');
|
|
|
|
+ this.reportWorkDayDisable = false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 初始化 Form
|
|
// 初始化 Form
|
|
initTodayPlanForm() {
|
|
initTodayPlanForm() {
|
|
this.todayPlanForm = {
|
|
this.todayPlanForm = {
|
|
@@ -1058,6 +1136,20 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style scoped lang='scss'>
|
|
<style scoped lang='scss'>
|
|
|
|
+
|
|
|
|
+.tongbu {
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ &>div {
|
|
|
|
+ margin-bottom: 15px;
|
|
|
|
+ color: #999;
|
|
|
|
+ &:last-child {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
.colorText {
|
|
.colorText {
|
|
color: #02a7f0;
|
|
color: #02a7f0;
|
|
cursor: pointer;
|
|
cursor: pointer;
|