Bläddra i källkod

部分bug以及新需求

cz 1 år sedan
förälder
incheckning
4129502708
2 ändrade filer med 12 tillägg och 4 borttagningar
  1. 7 2
      src/views/JXSK/mes/forward/add.vue
  2. 5 2
      src/views/JXSK/mes/receive/add.vue

+ 7 - 2
src/views/JXSK/mes/forward/add.vue

@@ -86,6 +86,8 @@ import { ref, reactive, getCurrentInstance, onMounted } from "vue";
 import { showSuccessToast, showFailToast } from "vant";
 import { useRoute } from "vue-router";
 import testForm from "@/components/testForm/index.vue";
+import { showConfirmDialog } from "vant";
+
 const proxy = getCurrentInstance().proxy;
 const route = useRoute();
 const formDom = ref(null);
@@ -196,12 +198,15 @@ const otherBtnClick = () => {
 const getDetails = () => {
   proxy.post("/productionTaskDetail/detail", { id: route.query.id }).then(
     (res) => {
-      if (res.data && res.data.productionTaskDetailRecordList.length > 0) {
+      if (
+        res.data.productionTaskDetailRecordList &&
+        res.data.productionTaskDetailRecordList.length > 0
+      ) {
         let id = res.data.previousProcessesRecordId;
         proxy
           .post("/fileInfo/getList", { businessIdList: [id] })
           .then((res) => {
-            if (res.data && res.data[id].length > 0) {
+            if (res.data[id] && res.data[id].length > 0) {
               formData.data.fileListOne = res.data[id].map((item) => {
                 return {
                   raw: item,

+ 5 - 2
src/views/JXSK/mes/receive/add.vue

@@ -238,12 +238,15 @@ const otherBtnClick = () => {
 const getDetails = () => {
   proxy.post("/productionTaskDetail/detail", { id: route.query.id }).then(
     (res) => {
-      if (res.data && res.data.productionTaskDetailRecordList.length > 0) {
+      if (
+        res.data.productionTaskDetailRecordList &&
+        res.data.productionTaskDetailRecordList.length > 0
+      ) {
         let id = res.data.previousProcessesRecordId;
         proxy
           .post("/fileInfo/getList", { businessIdList: [id] })
           .then((res) => {
-            if (res.data && res.data[id].length > 0) {
+            if (res.data[id] && res.data[id].length > 0) {
               formData.data.fileList = res.data[id].map((item) => {
                 return {
                   raw: item,