Browse Source

JLHWEB: 1、修复床垫报价业务审核后无法修改;

JohnnyChan 1 day ago
parent
commit
fd44b236d6

+ 18 - 16
JLHWEB/src/components/LjSelector/index.vue

@@ -73,7 +73,7 @@
 </template>
 
 <script lang="tsx" setup name="LjSelector">
-import { reactive, toRefs, ref, onMounted, nextTick, inject, watch } from "vue";
+import { reactive, toRefs, ref, onMounted, nextTick, inject, watch, computed } from "vue";
 import LjDialog from "@/components/LjDialog/index.vue";
 import LjFoldLayoutDouble from "@/components/LjFoldLayoutDouble/index.vue";
 // import LjVxeTable from "@/components/LjVxeTable/index.vue";
@@ -92,6 +92,7 @@ import SalePriceItem from "./components/SalePriceItem.vue";
 import draggable from "vuedraggable";
 import { ElMessage } from "element-plus";
 import { isArray, isBoolean } from "@/utils/is";
+import { t } from "@/utils/i18n";
 
 interface LjDialogSelectorProps {
   /**
@@ -125,14 +126,17 @@ interface LjDialogSelectorProps {
    */
   beforeSubmit?: (params?: any) => boolean;
   layout?: any;
+  submitText?: string;
 }
 
+// const { t } = useI18n();
+
 const props = withDefaults(defineProps<LjDialogSelectorProps>(), {
-  multipleLimit: 1
+  multipleLimit: 1,
+  submitText: t("common.table.submit")
   // action: () => []
 });
 
-const { t } = useI18n();
 const { CheckPower, funcFilterPower, funcRightActionPower, buttonDefault } = useAuthButtons(t);
 const LjSelectorRef = ref();
 
@@ -210,17 +214,6 @@ const funcCancel = () => {
   dialogVisible.value = false;
 };
 
-const defaultAction: detailAction[] = [
-  buttonDefault({
-    label: t("common.table.submit"),
-    clickFunc: () => funcSubmit()
-  }),
-  buttonDefault({
-    label: t("common.cancelText"),
-    clickFunc: () => funcCancel()
-  })
-];
-
 const btnGroup = ref<any>([]);
 
 const initParams = ref<any>();
@@ -235,13 +228,22 @@ const dialogVisible = ref(false);
  */
 const show = (params: any, activeName?: string, refresh?: boolean) => {
   initParams.value = params;
-  btnGroup.value = defaultAction.concat(funcFilterPower(props.action));
-  console.log("btnGroup.value :>> ", btnGroup.value);
 
   activeName && (activeCollapse.value = activeName);
 
   LjSelectorRef.value.show(refresh);
   nextTick(() => {
+    let defaultAction: detailAction[] = [
+      buttonDefault({
+        label: props.submitText,
+        clickFunc: () => funcSubmit()
+      }),
+      buttonDefault({
+        label: t("common.cancelText"),
+        clickFunc: () => funcCancel()
+      })
+    ];
+    btnGroup.value = defaultAction.concat(funcFilterPower(props.action));
     dialogVisible.value = true;
   });
 };

+ 4 - 2
JLHWEB/src/views/baseinfo/bednetarea/hooks/index.tsx

@@ -462,7 +462,8 @@ export const useHooks = (t?: any) => {
       ElMessageBox.confirm("是否确定要保存吗?", "询问", {
         confirmButtonText: "是",
         cancelButtonText: "否",
-        type: "warning"
+        type: "warning",
+        closeOnClickModal: false
       })
         .then(() => {
           SaveBedNetArea(param).then(() => {
@@ -493,7 +494,8 @@ export const useHooks = (t?: any) => {
     ElMessageBox.confirm("是否确定要删除吗?", "询问", {
       confirmButtonText: "是",
       cancelButtonText: "否",
-      type: "warning"
+      type: "warning",
+      closeOnClickModal: false
     })
       .then(() => {
         DeleteBedNetArea({ list: delArr }).then(() => {

+ 1 - 2
JLHWEB/src/views/baseinfo/mattresstype/index.vue

@@ -97,8 +97,7 @@ const orderEditAction = [
     label: t("common.saveText"),
     icon: "iconsave-01",
     clickFunc: item => {
-      const save_data = orderStatus.value == "new" ? LjDetailRef.value?.infoParam : LjDetailRef.value?._mainData;
-
+      const save_data = LjDetailRef.value?._mainData;
       fSave({ mattress: save_data }).then(() => {
         LjDrawerRef.value.hide();
       });

+ 1 - 2
JLHWEB/src/views/baseinfo/shrinkage/index.vue

@@ -97,8 +97,7 @@ const orderEditAction = [
     label: t("common.saveText"),
     icon: "iconsave-01",
     clickFunc: item => {
-      const save_data = orderStatus.value == "new" ? LjDetailRef.value?.infoParam : LjDetailRef.value?._mainData;
-
+      const save_data = LjDetailRef.value?._mainData;
       fSave({ shrinkage: save_data }).then(() => {
         LjDrawerRef.value.hide();
       });

+ 1 - 2
JLHWEB/src/views/baseinfo/spring/index.vue

@@ -101,8 +101,7 @@ const orderEditAction = [
     label: t("common.saveText"),
     icon: "iconsave-01",
     clickFunc: item => {
-      const save_data = orderStatus.value == "new" ? LjDetailRef.value?.infoParam : LjDetailRef.value?._mainData;
-
+      const save_data = LjDetailRef.value?._mainData;
       fSave({ spring: save_data }).then(() => {
         LjDrawerRef.value.hide();
       });

+ 5 - 0
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -287,10 +287,15 @@ const action: detailAction[] = [
         return;
       }
       const _cur = curRecords[curRecords.length - 1];
+      console.log("修改 _cur :>> ", _cur);
       if (_cur.parentid > 0) {
         ElMessage.warning("副规格无法编辑");
         return;
       }
+      if (_cur.yw_flag == 1) {
+        ElMessage.warning("已业务补充审核,无法修改");
+        return;
+      }
       if (_cur.flag == 1) {
         ElMessage.warning("单据已审核,不能修改");
         return;

+ 1 - 1
JLHWEB/src/views/saleprice/dept/index.vue

@@ -105,7 +105,7 @@ const orderEditAction = [
       try {
         await detailRef.value.detail.toValidateForm();
 
-        const save_data = orderStatus.value == "new" ? LjDetailRef.value?.infoParam : LjDetailRef.value?._mainData;
+        const save_data = LjDetailRef.value?._mainData;
         save_data.if_rate_auto = Number(save_data.if_rate_auto);
 
         fSave({ dept: save_data }).then(() => {