|
|
@@ -38,6 +38,22 @@
|
|
|
>
|
|
|
导出
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ @click="handleSyncData(1)"
|
|
|
+ >
|
|
|
+ 同步基础数据至工时系统
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ @click="handleSyncData(2)"
|
|
|
+ >
|
|
|
+ 同步工时数据至工时系统
|
|
|
+ </el-button>
|
|
|
<!-- <print-table-btn @click="printTable" /> -->
|
|
|
|
|
|
</template>
|
|
|
@@ -363,7 +379,28 @@ export default window.$crudCommon({
|
|
|
return {
|
|
|
color
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleSyncData(type) {
|
|
|
+ let obj = {
|
|
|
+ 1: {
|
|
|
+ message: '确认要将基础数据同步到工时系统吗?',
|
|
|
+ method: this.api.syncBaseData
|
|
|
+ },
|
|
|
+ 2: {
|
|
|
+ message: '确认要将工时数据同步到工时系统吗?',
|
|
|
+ method: this.api.syncWorkingHours
|
|
|
+ }
|
|
|
+ };
|
|
|
+ this.$confirm(obj[type].message, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ obj[type].method({ yearAndMonth: this.params.yearAndMonth }).then(() => {
|
|
|
+ this.$message.success('同步成功!');
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
}, {
|
|
|
// 模块路径
|