|
|
@@ -66,6 +66,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getLastMonthData } from "@/api/technicianRoster";
|
|
|
import {exportBlob} from "@/api/common";
|
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
|
import moment from "moment";
|
|
|
@@ -169,7 +170,7 @@ export default window.$crudCommon({
|
|
|
uploadAfter(res, done, loading, column) {
|
|
|
this.excelBox = false;
|
|
|
this.page.currentPage = 1;
|
|
|
- this.onLoad(this.page);
|
|
|
+ this.getList(this.page);
|
|
|
done();
|
|
|
},
|
|
|
handleExport() {
|
|
|
@@ -192,7 +193,26 @@ export default window.$crudCommon({
|
|
|
// });
|
|
|
},
|
|
|
handleReadyLastMonData() {
|
|
|
- this.$message.warning("功能建设中...");
|
|
|
+ if (this.isSelAnnual) {
|
|
|
+ this.$message.warning("请选择月份");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm("确认要读取上个月的数据吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let lastMonth = moment(this.yearAndMonth).subtract(1, 'months').format("YYYY-MM");
|
|
|
+ getLastMonthData({ yearAndMonth: lastMonth}).then(res => {
|
|
|
+ let data = res.data;
|
|
|
+ if (data.success) {
|
|
|
+ this.$message.success('读取成功!');
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.getList(this.page);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
}, {
|