|
|
@@ -67,6 +67,9 @@
|
|
|
<el-button link type="primary" icon="HelpFilled" @click="handleSync(scope.row)">
|
|
|
同步MES记录
|
|
|
</el-button>
|
|
|
+ <el-button link type="warning" icon="Histogram" @click="handleCalcBl(scope.row)">
|
|
|
+ 补录数据并统计
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -200,7 +203,7 @@
|
|
|
|
|
|
<script setup name="Emp">
|
|
|
import {addEmp, delEmp, getEmp, listEmp, sync, updateEmp} from "@/api/emp/emp";
|
|
|
-import {calc} from "@/api/emp/empCalc";
|
|
|
+import {calc,calcBl} from "@/api/emp/empCalc";
|
|
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
|
|
|
|
@@ -401,6 +404,17 @@ function handleCalc(row) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+function handleCalcBl(row) {
|
|
|
+ proxy.$modal.loading("正在处理中,请稍候...");
|
|
|
+ calcBl(row.empDate).then(response => {
|
|
|
+ proxy.$modal.closeLoading();
|
|
|
+ proxy.$modal.msgSuccess("统计成功");
|
|
|
+ }).catch(error => {
|
|
|
+ proxy.$modal.closeLoading();
|
|
|
+ proxy.$modal.msgError("处理失败");
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
function handleSync(row) {
|
|
|
sync(row.empDate).then(response => {
|
|
|
proxy.$modal.msgSuccess("统计成功");
|