quwangxin %!s(int64=2) %!d(string=hai) anos
pai
achega
9666422a2a

+ 13 - 5
src/api/produceOrder/index.js

@@ -98,6 +98,16 @@ export async function reportPage (data) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+// 打印详情页-tab列表
+export async function printWorkOrderInfo (workOrderId) {
+  const res = await request.get(
+    `/mes/workreport/printWorkOrderInfo/${workOrderId}`
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 
 
 // 获取详情页数据
 // 获取详情页数据
 export async function getInfoById (id) {
 export async function getInfoById (id) {
@@ -135,13 +145,11 @@ export async function getDeviceByTaskId (params) {
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
 
 
-// 获取槽数 
+// 获取槽数
 export async function getSoltNum (id) {
 export async function getSoltNum (id) {
-  const res = await request.get(
-    `/main/categorypallet/getByCategoryId/${id}`
-  );
+  const res = await request.get(`/main/categorypallet/getByCategoryId/${id}`);
   if (res.data.code == 0) {
   if (res.data.code == 0) {
     return res.data.data;
     return res.data.data;
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
-}
+}

+ 5 - 10
src/components/print/OrderPrint.vue

@@ -280,7 +280,7 @@
 
 
 <script>
 <script>
   import { downloadPDF } from '@/utils/pdf.js';
   import { downloadPDF } from '@/utils/pdf.js';
-  import { reportPage } from '@/api/produceOrder/index.js';
+  import { printWorkOrderInfo } from '@/api/produceOrder/index.js';
   export default {
   export default {
     props: {
     props: {
       infoData: {
       infoData: {
@@ -950,15 +950,10 @@
         this.init();
         this.init();
       },
       },
       init () {
       init () {
-        for (const p of this.processList) {
-          reportPage({
-            size: -1,
-            workOrderId: this.workOrderId,
-            taskCode: p.taskCode
-          }).then((res) => {
-            this.$set(p, 'list', res.list || []);
-          });
-        }
+        printWorkOrderInfo(this.workOrderId).then((res) => {
+          console.log(res);
+          // this.$set(p, 'list', res.list || []);
+        });
       },
       },
       cancel () {
       cancel () {
         this.visible = false;
         this.visible = false;

+ 15 - 15
src/views/produceOrder/report.vue

@@ -122,7 +122,7 @@
         :is="componentName"
         :is="componentName"
         :key="activeName + isUpdate"
         :key="activeName + isUpdate"
         :infoData="infoData"
         :infoData="infoData"
-		:formData="formData"
+        :formData="formData"
         :taskInfo="{
         :taskInfo="{
           ...tabList[activeName],
           ...tabList[activeName],
           lastTaskCode:
           lastTaskCode:
@@ -190,7 +190,7 @@
           包装: 'Package',
           包装: 'Package',
           入库: 'Warehousing'
           入库: 'Warehousing'
         },
         },
-		formData:{}
+        formData: {}
       };
       };
     },
     },
     computed: {
     computed: {
@@ -207,7 +207,7 @@
     },
     },
     created () {
     created () {
       this.init();
       this.init();
-	  this.getInfoData()
+      this.getInfoData();
     },
     },
     methods: {
     methods: {
       handleReport () {
       handleReport () {
@@ -257,20 +257,20 @@
         const res1 = await getTaskListById(this.infoData.produceVersionId);
         const res1 = await getTaskListById(this.infoData.produceVersionId);
 
 
         this.tabList = res1;
         this.tabList = res1;
-		this.tabList.push({
-			name: "入库",
-			code: "999999"
-		})
+        this.tabList.push({
+          name: '入库',
+          code: '999999'
+        });
         this.activeName = '0';
         this.activeName = '0';
       },
       },
-	  async getInfoData(){
-	  	const res = await getInfo()
-	  	if(typeof res != 'string'){
-	  		this.formData = res
-	  	}else{
-			this.formData = {}
-		}
-	  },
+      async getInfoData () {
+        const res = await getInfo();
+        if (typeof res != 'string') {
+          this.formData = res;
+        } else {
+          this.formData = {};
+        }
+      }
     }
     }
   };
   };
 </script>
 </script>

+ 2 - 2
vue.config.js

@@ -31,8 +31,8 @@ module.exports = {
     proxy: {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
       '/api': {
-        // target: 'http://192.168.3.51:18086', // 测试
-        target: 'http://192.168.3.35:8080', // kang杨威
+        target: 'http://192.168.3.51:18086', // 测试
+        // target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
         // target: 'http://192.168.3.41:8080', // 何江鹏
         // target: 'http://192.168.3.33:8080', // 谢一平
         // target: 'http://192.168.3.33:8080', // 谢一平