|
@@ -38,6 +38,14 @@
|
|
|
<svg-icon icon-class="paicheng" />
|
|
|
</template>
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ :disabled="toDeleteIds.length < 1"
|
|
|
+ type="refresh"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ :size="size"
|
|
|
+ @click="apsSync"
|
|
|
+ >APS同步</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<template #menu="{ size, row, index }">
|
|
|
<el-button
|
|
@@ -287,6 +295,7 @@ import {
|
|
|
lockWorkOrder,
|
|
|
zipWorkOrder,
|
|
|
} from "@/api/order";
|
|
|
+import {syncAps} from "@/api/aps";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
import ChoiceRoutePage from "./components/choice-route-page.vue";
|
|
@@ -294,6 +303,7 @@ import ChoiceWorkshopPage from "./components/choice-workshop-page.vue";
|
|
|
import WorkOrderSeq from "./components/work-order-seq.vue";
|
|
|
import { checkPerm } from "@/directive/permission";
|
|
|
import { queryDictDataByType } from "@/api/system/dict";
|
|
|
+import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
const router = useRouter();
|
|
|
const test = () => {
|
|
@@ -310,7 +320,22 @@ const permission = reactive({
|
|
|
const disabledDate = (time) => {
|
|
|
return time.getTime() < Date.now(); // 8.64e7 毫秒数代表一天
|
|
|
};
|
|
|
-
|
|
|
+const apsSync = () =>{
|
|
|
+ ElMessageBox.confirm("是否同步所选中数据?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ let param = {type: 3,codes: toDeleteIds.value}
|
|
|
+ syncAps(param).then((data)=>{
|
|
|
+ if (data.code === "200") {
|
|
|
+ ElMessage.success(data.msg);
|
|
|
+ } else {
|
|
|
+ ElMessage.error(data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+}
|
|
|
const jumpPage = (workOrderCode, type) => {
|
|
|
if (type === 1) {
|
|
|
router.push("/requisition?workOrderCode=" + workOrderCode);
|