|
@@ -124,7 +124,7 @@ import { useRoute, useRouter } from "vue-router";
|
|
|
import { useHooks } from "./hooks/index";
|
|
|
import { useAuthButtons } from "@/hooks/useAuthButtons";
|
|
|
import { CommonDynamicSelect, GetERPWrkGrpList, GetERPWrkGrpList2 } from "@/api/modules/common";
|
|
|
-import { SaveMattressInterface, GetResetWiptype } from "@/api/modules/quote";
|
|
|
+import { SaveMattressInterface, GetResetWiptype, UpdateL1Basicinfo } from "@/api/modules/quote";
|
|
|
import { ElMessage, ElMessageBox, ElNotification } from "element-plus";
|
|
|
import mittBus from "@/utils/mittBus";
|
|
|
import { MittEnum } from "@/enums/mittEnum";
|
|
@@ -234,7 +234,8 @@ const detailProps = reactive<DetailProp>({
|
|
|
|
|
|
const tabRemove: Function = inject("tabRemove") as Function;
|
|
|
const loadingStatus = reactive({
|
|
|
- save: false
|
|
|
+ save: false,
|
|
|
+ synchsL1: false
|
|
|
});
|
|
|
|
|
|
const cellClassNameFn = (data: any, editable) => {
|
|
@@ -869,6 +870,31 @@ const orderDefaultAction = [
|
|
|
// }
|
|
|
// })
|
|
|
],
|
|
|
+ buttonDefault({
|
|
|
+ label: "同步L1资料",
|
|
|
+ // limited: () => {
|
|
|
+ // return !orderStatus.value;
|
|
|
+ // },
|
|
|
+ loading: () => loadingStatus.synchsL1,
|
|
|
+ clickFunc: async () => {
|
|
|
+ try {
|
|
|
+ loadingStatus.synchsL1 = true;
|
|
|
+ let res = await UpdateL1Basicinfo();
|
|
|
+ if (res) {
|
|
|
+ ElNotification({
|
|
|
+ title: "同步成功",
|
|
|
+ message: `物料:${res.mtrlnum}个 <br/>工组:${res.wkgnum}个 <br/>物料类别:${res.mtrltypenum}个`,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ loadingStatus.synchsL1 = false;
|
|
|
+ } catch (error) {
|
|
|
+ loadingStatus.synchsL1 = false;
|
|
|
+ console.error(error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }),
|
|
|
buttonDefault({
|
|
|
label: t("common.back"),
|
|
|
clickFunc: item => {
|