695593266@qq.com 7 ore fa
parent
commit
a996c31b4c

+ 3 - 2
manifest.json

@@ -2,7 +2,7 @@
     "name" : "AiMil工业互联网平台",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.4.25",
+    "versionName" : "V1.0.4.26",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -13,7 +13,8 @@
                     // "target" : "http://123.249.79.125/api/",
                     // "target" : "http://114.116.248.196:86/api/",
                     // "target": "http://116.63.185.248:80/api",
-                    "target" : "http://192.168.1.251:18086/",
+                    // "target" : "http://192.168.1.251:18086/",
+					  "target" : "http://192.168.1.125:18086/",
                     // "target" : "http://aiot.zoomwin.com.cn:51001/api",
                     "changeOrigin" : true,
                     "secure" : false,

+ 44 - 16
pages/pda/components/workCard.vue

@@ -4,8 +4,12 @@
     <view class="card-header">
       <view class="header-left">
         <view class="round" v-if="item.index">{{ item.index }}</view>
-        <view class="orderId" v-if="item.workOrderType != 2">{{ item.code }}</view>
-        <view class="orderId" v-if="item.workOrderType == 2">{{ item.outsourceCode }}</view>
+        <view class="orderId" v-if="item.workOrderType != 2">{{
+          item.code
+        }}</view>
+        <view class="orderId" v-if="item.workOrderType == 2">{{
+          item.outsourceCode
+        }}</view>
       </view>
       <view class="status-tag" :class="'status-' + item.status">
         {{ statusList[item.status] }}
@@ -44,7 +48,9 @@
         </view>
         <view class="info-row half">
           <text class="info-label">批次号</text>
-          <text class="info-value highlight text-ellipsis">{{ item.batchNo }}</text>
+          <text class="info-value highlight text-ellipsis">{{
+            item.batchNo
+          }}</text>
         </view>
       </view>
 
@@ -55,43 +61,57 @@
         </view>
         <view class="info-row half">
           <text class="info-label">规格</text>
-          <text class="info-value highlight text-ellipsis">{{ item.specification }}</text>
+          <text class="info-value highlight text-ellipsis">{{
+            item.specification
+          }}</text>
         </view>
       </view>
 
       <view class="info-grid">
         <view class="info-row half">
           <text class="info-label">生产数量</text>
-          <text class="info-value text-ellipsis">{{ item.formingNum }} {{ item.unit }}</text>
+          <text class="info-value text-ellipsis"
+            >{{ item.formingNum }} {{ item.unit }}</text
+          >
         </view>
         <view class="info-row half">
           <text class="info-label">生产重量</text>
-          <text class="info-value text-ellipsis">{{ item.formingWeight }} {{ item.weightUnit }}</text>
+          <text class="info-value text-ellipsis"
+            >{{ item.formingWeight }} {{ item.weightUnit }}</text
+          >
         </view>
       </view>
 
       <view class="info-grid">
         <view class="info-row half">
           <text class="info-label">报工类型</text>
-          <text class="info-value highlight text-ellipsis">{{ item.singleReport == 1 ? "单个报工" : "批量报工" }}</text>
+          <text class="info-value highlight text-ellipsis">{{
+            item.singleReport == 1 ? "单个报工" : "批量报工"
+          }}</text>
         </view>
         <view class="info-row half">
           <text class="info-label">当前工序</text>
-          <text class="info-value highlight text-ellipsis">{{ item.taskName }}</text>
+          <text class="info-value highlight text-ellipsis">{{
+            item.taskName
+          }}</text>
         </view>
       </view>
 
       <view class="info-grid">
         <view class="info-row full">
           <text class="info-label">工艺路线</text>
-          <text class="info-value highlight text-ellipsis">{{ item.produceRoutingName }}</text>
+          <text class="info-value highlight text-ellipsis">{{
+            item.produceRoutingName
+          }}</text>
         </view>
       </view>
 
       <view class="info-grid">
         <view class="info-row full">
-          <text class="info-label">生产编号</text>
-          <text class="info-value highlight text-ellipsis">{{ item.productionCodes }}</text>
+          <text class="info-label">计划编号</text>
+          <text class="info-value highlight text-ellipsis">{{
+            item.productionPlanCode
+          }}</text>
         </view>
       </view>
     </view>
@@ -99,7 +119,11 @@
     <!-- 底部箭头提示 -->
     <view class="card-footer">
       <text class="footer-tip">查看详情</text>
-      <image class="arrow-icon" src="/static/pda/arrow_right2.svg" mode="aspectFit"></image>
+      <image
+        class="arrow-icon"
+        src="/static/pda/arrow_right2.svg"
+        mode="aspectFit"
+      ></image>
     </view>
   </view>
 </template>
@@ -126,7 +150,7 @@ export default {
   },
   methods: {
     handleDetail() {
-      console.log('this.item', this.item)
+      console.log("this.item", this.item);
       this.$emit("handleDetail", this.item);
     },
   },
@@ -149,7 +173,11 @@ export default {
     align-items: center;
     justify-content: space-between;
     padding: 24rpx 28rpx;
-    background: linear-gradient(135deg, rgba(21, 122, 44, 0.06) 0%, rgba(21, 122, 44, 0.02) 100%);
+    background: linear-gradient(
+      135deg,
+      rgba(21, 122, 44, 0.06) 0%,
+      rgba(21, 122, 44, 0.02) 100%
+    );
     border-bottom: 1rpx solid #f0f0f0;
 
     .header-left {
@@ -232,7 +260,7 @@ export default {
       white-space: nowrap;
 
       &::after {
-        content: ':';
+        content: ":";
       }
     }
 
@@ -287,7 +315,7 @@ export default {
       white-space: nowrap;
 
       &::after {
-        content: ':';
+        content: ":";
       }
     }
 

+ 2 - 2
pages/pda/feeding/components/workOrderBom.vue

@@ -54,8 +54,8 @@
           }}</view>
         </view>
         <view class="item">
-          <view class="lable rx-cc">生产编号</view>
-          <view class="content">{{ item.productionCodes }}</view>
+          <view class="lable rx-cc">计划编号</view>
+          <view class="content">{{ item.productionPlanCode }}</view>
         </view>
         <view class="item rx-sc">
           <view class="rx ww55">

+ 1 - 23
pages/pda/jobBooking/components/batchJobBom.vue

@@ -301,7 +301,6 @@ import {
 // import checkboxTable from '../componentsTable/checkbox/checkbox.vue'
 import batchProductJobBom from "./batchProductJobBom.vue";
 import semiProductJobBomPL from "./semiProductJobBomPL.vue";
-import { parameterGetByCode } from "@/api/mainData/index.js";
 export default {
   props: {
     item: {
@@ -568,28 +567,7 @@ export default {
       this.$set(this.item.workReportInfo, "notFormedNum", noAdultCount);
     },
 
-    getByCode() {
-      parameterGetByCode({ code: "enable_quality_plus" }).then((res) => {
-        if (
-          res.value == "1" &&
-          (this.item.currentTaskDiagram.type == 6 ||
-            this.item.currentTaskDiagram.type == 2 ||
-            this.item.currentTaskDiagram.type == 2)
-        ) {
-          uni.showModal({
-            title: "提示",
-            content: "质检需要去PC端进行",
-            success: function (res) {
-              if (res.confirm) {
-                console.log("用户点击确定");
-              } else if (res.cancel) {
-                console.log("用户点击取消");
-              }
-            },
-          });
-        }
-      });
-    },
+    getByCode() {},
 
     getSemiProductList(newVal) {
       console.log(newVal);

+ 1 - 23
pages/pda/jobBooking/components/singleJobBom.vue

@@ -215,7 +215,6 @@
 import { createInProduct } from "@/api/pda/jobBooking.js";
 import checkboxTable from "../componentsTable/checkbox/checkbox.vue";
 import singleProductJobBom from "./singleProductJobBom.vue";
-import { parameterGetByCode } from "@/api/mainData/index.js";
 import { createInProductBatchTG } from "@/api/pda/jobBooking.js";
 export default {
   props: {
@@ -387,28 +386,7 @@ export default {
       this.$forceUpdate();
     },
 
-    getByCode() {
-      parameterGetByCode({ code: "enable_quality_plus" }).then((res) => {
-        if (
-          res.value == "1" &&
-          (this.item.currentTaskDiagram.type == 6 ||
-            this.item.currentTaskDiagram.type == 2 ||
-            this.item.currentTaskDiagram.type == 2)
-        ) {
-          uni.showModal({
-            title: "提示",
-            content: "质检需要去PC端进行",
-            success: function (res) {
-              if (res.confirm) {
-                console.log("用户点击确定");
-              } else if (res.cancel) {
-                console.log("用户点击取消");
-              }
-            },
-          });
-        }
-      });
-    },
+    getByCode() {},
 
     getSemiProductList(newVal) {
       console.log(newVal);

+ 1 - 1
pages/pda/sample/inspection/job.vue

@@ -230,4 +230,4 @@
 		background: #F0F8F2;
 		color: $theme-color;
 	}
-</style>
+</style>

+ 53 - 3
pages/pda/workOrder/extrusionMolding/index.vue

@@ -298,6 +298,7 @@ import {
   checkStatus,
   skipTask,
 } from "@/api/pda/workOrder.js";
+import { parameterGetByCode } from "@/api/mainData/index.js";
 
 export default {
   components: {
@@ -393,11 +394,17 @@ export default {
     this.title = options.title;
     this.id = options.id;
     this.singleReport = options.singleReport; // 报工类型
+    uni.$off("refreshProduceReportWork");
+    uni.$on("refreshProduceReportWork", this.refreshProduceReportWork);
     uni.showLoading({
       title: "加载中",
     });
   },
 
+  onUnload() {
+    uni.$off("refreshProduceReportWork");
+  },
+
   onShow() {
     this.getInfo();
     this.getSteps();
@@ -408,6 +415,12 @@ export default {
   methods: {
     scrolltolower() {},
 
+    refreshProduceReportWork() {
+      this.getInfo();
+      this.getSteps();
+      this.produce();
+    },
+
     handTab(type) {
       if (type != this.tabType) {
         this.tabType = type;
@@ -482,7 +495,7 @@ export default {
     },
 
     // 点击之后调用事件
-    operate(type, item) {
+    async operate(type, item) {
       console.log(4444, type, item);
       // if (this.info.outsourceStatus == 2) {
       // 	uni.showToast({
@@ -575,6 +588,15 @@ export default {
         // 		icon: "none",
         // 	})
         // }
+        if ([3, 6].includes(Number(this.currentType))) {
+          const qualityUrl = await this.getQualityWorkOrderUrl(taskId);
+          if (qualityUrl) {
+            uni.navigateTo({
+              url: qualityUrl,
+            });
+            return;
+          }
+        }
         url = "/pages/pda/jobBooking/index/index";
         url += `?id=${this.info.id}&taskId=${taskId}&taskName=${taskName}
 				&taskType=${this.currentType}&isOutsource=${item.isOutsource || 0}
@@ -613,8 +635,11 @@ export default {
           url,
         });
       } else if (type == "inspectionJob") {
-        url = "/pages/pda/sample/inspection/job";
-        url += `?workOrderId=${this.info.id}&taskId=${taskId}&taskName=${taskName}`;
+        url = await this.getQualityWorkOrderUrl(taskId);
+        if (!url) {
+          url = "/pages/pda/sample/inspection/job";
+          url += `?workOrderId=${this.info.id}&taskId=${taskId}&taskName=${taskName}`;
+        }
         uni.navigateTo({
           url,
         });
@@ -654,6 +679,31 @@ export default {
       }
     },
 
+    async getQualityWorkOrderUrl(taskId) {
+      let config = {};
+      try {
+        config = await parameterGetByCode({ code: "enable_quality_plus" });
+      } catch (err) {
+        console.error("获取质检配置失败", err);
+      }
+      if (!config || config.value != "1") {
+        return "";
+      }
+      const workOrderCode = this.info.code || this.info.workOrderCode || "";
+      const produceSourceTaskId = this.getProduceSourceTaskId(taskId);
+      return `/pages/qms/inspectionWork/index?produceSourceTaskId=${produceSourceTaskId}&workOrderCode=${encodeURIComponent(
+        workOrderCode,
+      )}&fromProduceReport=1`;
+    },
+
+    getProduceSourceTaskId(taskId) {
+      const currentStep = this.stepsList.find((item) => item.taskId == taskId);
+      return (
+        (currentStep && (currentStep.sourceTaskId || currentStep.produceSourceTaskId || currentStep.id)) ||
+        taskId
+      );
+    },
+
     produce() {
       produceDetail(this.id).then((res) => {
         this.produceList = res.produceDetail;

+ 12 - 6
pages/qms/inspectionWork/index.vue

@@ -2,7 +2,7 @@
 	<view>
 
 
-		<list ref="listRef"></list>
+		<list ref="listRef" :produceFilter="produceFilter"></list>
 
 	</view>
 </template>
@@ -17,9 +17,7 @@
 		mixins: [],
 		data() {
 			return {
-
-
-
+				produceFilter: {}
 
 			}
 		},
@@ -35,11 +33,19 @@
 			})
 		},
 		onUnload() {
+			if (this.produceFilter && this.produceFilter.fromProduceReport == "1") {
+				uni.$emit("refreshProduceReportWork")
+			}
 		
 			uni.$off('successInit')
 		
 		},
-		onLoad() {
+		onLoad(options = {}) {
+			this.produceFilter = {
+				produceSourceTaskId: options.produceSourceTaskId || "",
+				workOrderCode: options.workOrderCode ? decodeURIComponent(options.workOrderCode) : "",
+				fromProduceReport: options.fromProduceReport || ""
+			}
 			this.$nextTick(() => {
 				this.$refs.listRef.getList()
 			})
@@ -57,4 +63,4 @@
 
 <style lang="scss" scoped>
 
-</style>
+</style>

+ 21 - 5
pages/qms/inspectionWork/list.vue

@@ -113,6 +113,10 @@
 			},
 			way: {
 				default: 'route'
+			},
+			produceFilter: {
+				type: Object,
+				default: () => ({})
 			}
 		},
 		data() {
@@ -165,17 +169,29 @@
 		},
 
 		methods: {
+			buildQueryData(baseData = {}) {
+				const data = {
+					...baseData
+				}
+				if (this.produceFilter && this.produceFilter.produceSourceTaskId) {
+					data.produceSourceTaskId = this.produceFilter.produceSourceTaskId
+				}
+				if (this.produceFilter && this.produceFilter.workOrderCode) {
+					data.workOrderCodeList = [this.produceFilter.workOrderCode]
+				}
+				return data
+			},
 			successInit() {
 				uni.showLoading({
 					title: '加载中'
 				})
 
-				let data = {
+				let data = this.buildQueryData({
 					pageNum: 1,
 					size: this.tableList.length,
 					keyWord: this.keyWord,
 					// recordingMethod: 1,
-				}
+				})
 				if (this.pageName) {
 					data.currentLoginUserId = this.userInfo.userId
 				}
@@ -212,13 +228,13 @@
 					title: '加载中'
 				})
 
-				let data = {
+				let data = this.buildQueryData({
 					pageNum: this.page,
 					size: this.size,
 					keyWord: this.keyWord,
 					// recordingMethod: 1,
 
-				}
+				})
 				if (this.pageName) {
 					data.currentLoginUserId = this.userInfo.userId
 				}
@@ -438,4 +454,4 @@
 		height: 60rpx;
 		width: auto;
 	}
-</style>
+</style>