Sfoglia il codice sorgente

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app

liujt 3 mesi fa
parent
commit
8e0d876ee4
40 ha cambiato i file con 2827 aggiunte e 2374 eliminazioni
  1. 10 0
      api/inspectionWork/index.js
  2. 116 109
      components/myCard.vue
  3. 3 3
      manifest.json
  4. 10 2
      pages.json
  5. 1 0
      pages/ehs/snapshot/common-style.scss
  6. 230 64
      pages/ehs/snapshot/components/discardDialog.vue
  7. 509 470
      pages/ehs/snapshot/components/snapshotDialog.vue
  8. 316 0
      pages/ehs/snapshot/components/snapshotList.vue
  9. 4 143
      pages/ehs/snapshot/mySnapshot.vue
  10. 5 223
      pages/ehs/snapshot/snapshotManage.vue
  11. 125 85
      pages/home/myTicket/myTicket.vue
  12. 54 50
      pages/index/index.vue
  13. 1 1
      pages/maintenance/check/index.vue
  14. 8 66
      pages/maintenance/detail/detail.vue
  15. 4 1
      pages/maintenance/order/OrderTask.vue
  16. 243 0
      pages/maintenance/service/OrderTask.vue
  17. 434 0
      pages/maintenance/service/order.vue
  18. 1 1
      pages/pcs/components/OrderListDialog.vue
  19. 1 1
      pages/pcs/components/batchRevokeDialog.vue
  20. 0 378
      pages/pcs/components/myCard.vue
  21. 2 1
      pages/pcs/list.vue
  22. 734 771
      pages/qms/inspectionWork/sampleList.vue
  23. 16 5
      pages/systemSettings/index.vue
  24. BIN
      unpackage/res/icons/1024x1024.png
  25. BIN
      unpackage/res/icons/120x120.png
  26. BIN
      unpackage/res/icons/144x144.png
  27. BIN
      unpackage/res/icons/152x152.png
  28. BIN
      unpackage/res/icons/167x167.png
  29. BIN
      unpackage/res/icons/180x180.png
  30. BIN
      unpackage/res/icons/192x192.png
  31. BIN
      unpackage/res/icons/20x20.png
  32. BIN
      unpackage/res/icons/29x29.png
  33. BIN
      unpackage/res/icons/40x40.png
  34. BIN
      unpackage/res/icons/58x58.png
  35. BIN
      unpackage/res/icons/60x60.png
  36. BIN
      unpackage/res/icons/72x72.png
  37. BIN
      unpackage/res/icons/76x76.png
  38. BIN
      unpackage/res/icons/80x80.png
  39. BIN
      unpackage/res/icons/87x87.png
  40. BIN
      unpackage/res/icons/96x96.png

+ 10 - 0
api/inspectionWork/index.js

@@ -198,4 +198,14 @@ export async function queryQualityTempleContent(data) {
 		return res.data;
 	}
 	return Promise.reject(new Error(res.message));
+}
+
+
+// 报工
+export async function exeReportWork(data) {
+  const res = await postJ(Vue.prototype.apiUrl + `/qms/quality_work_order/exeReportWork`, data);
+  if (res.code == 0) {
+  	return res.data;
+  }
+  return Promise.reject(new Error(res.message));
 }

+ 116 - 109
components/myCard.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="card_container">
     <view class="card_box">
-      <!-- 标题区域 - 独立出来,宽度100% -->
+      <!-- 标题区域 -->
       <view class="header_box" v-if="title">
         <view class="title_left">
           <view class="round" v-if="index">{{ index }}</view>
@@ -9,10 +9,38 @@
             title
           }}</view>
         </view>
-        <!-- 状态 - 固定在右上角 -->
+        <!-- 状态标签 -->
         <view class="status-tag" v-if="status">{{ status }}</view>
+        <!-- 单选/多选控件 -->
+        <view class="select-tag" v-if="showRadio" @click.stop>
+          <!-- 单选模式:使用 u-radio-group(每个卡片独立,互斥) -->
+          <u-radio-group
+            v-if="selectionMode === 'single'"
+            v-model="radioValueModel"
+            placement="row"
+            @change="handleRadioChange"
+          >
+            <u-radio
+              :name="item.id"
+              :iconSize="44"
+              activeColor="#3c9cff"
+              :labelSize="0"
+            ></u-radio>
+          </u-radio-group>
+          <!-- 多选模式:使用独立 u-checkbox,由父组件控制选中状态 -->
+          <u-checkbox
+            v-else
+            :name="item.id"
+            :checked="isChecked"
+            :iconSize="44"
+            activeColor="#3c9cff"
+            :labelSize="0"
+            @change="handleCheckboxChange"
+          ></u-checkbox>
+        </view>
       </view>
 
+      <!-- 内容区域(与原代码相同,省略...) -->
       <view class="item_box rx-bc" v-for="(_item, i) in columns" :key="i">
         <template v-for="val in _item">
           <view
@@ -22,7 +50,6 @@
             :key="val.prop"
             v-if="!val.isNone"
           >
-            <!-- 操作行 -->
             <view class="item_one rx-sc" v-if="val.type == 'action'">
               <view class="lable">{{ val.label }}</view>
               <view class="text" style="flex-wrap: wrap">
@@ -40,25 +67,22 @@
                 </template>
               </view>
             </view>
-
-            <!-- 普通信息行 -->
             <view class="item_one rx-sc kk" v-else>
               <view class="lable">{{ val.label }}</view>
               <view class="text" :class="val.valueClass" v-if="val.formatter">{{
-                val.formatter(item) || ""
+                val.formatter(item) || ''
               }}</view>
               <view class="text" :class="val.valueClass" v-else-if="val.slot">
                 <slot :name="val.slot"></slot>
               </view>
               <view class="text" :class="val.valueClass" v-else>{{
-                item[val.prop] || ""
+                item[val.prop] || ''
               }}</view>
             </view>
           </view>
         </template>
       </view>
 
-      <!-- 查看详情 -->
       <view class="footer-link" v-if="showDetail" @click="goDetail">
         <text>查看详情</text>
         <u-icon name="arrow-right" size="24" color="#999999"></u-icon>
@@ -70,31 +94,17 @@
 <script>
 export default {
   props: {
-    btnList: {
-      type: Array,
-      default: () => [],
-    },
-    item: {
-      type: Object,
-      default: () => ({}),
-    },
-    columns: {
-      type: Array,
-      default: () => [],
-    },
-    title: {
-      type: String,
-      default: "",
-    },
-    status: {
-      type: String,
-      default: "",
-    },
-    index: "",
-    showDetail: {
-      type: Boolean,
-      default: true,
-    },
+    btnList: { type: Array, default: () => [] },
+    item: { type: Object, default: () => ({}) },
+    columns: { type: Array, default: () => [] },
+    title: { type: String, default: '' },
+    status: { type: String, default: '' },
+    index: { type: [String, Number], default: '' },
+    showDetail: { type: Boolean, default: true },
+    showRadio: { type: Boolean, default: false },
+    radioValue: { type: [String, Number], default: null },
+    selectionMode: { type: String, default: 'single' }, // 'single' or 'multiple'
+    checkboxValue: { type: Array, default: () => [] },   // 父组件传入的选中ID数组
   },
   computed: {
     judge() {
@@ -118,38 +128,60 @@ export default {
         }
       };
     },
-  },
-  data() {
-    return {};
+    // 单选模式下的绑定值
+    radioValueModel: {
+      get() {
+        return this.radioValue;
+      },
+      set(val) {
+        if (val === this.item.id) {
+          this.$emit('radioChange', this.item);
+        }
+      },
+    },
+    // 多选模式下的选中状态(根据 checkboxValue 数组判断)
+    isChecked() {
+      return this.checkboxValue.includes(this.item.id);
+    },
   },
   methods: {
     action(item) {
       if (item.type == 1) {
         uni.navigateTo({
-          url: item.pageUrl + "?id=" + this.item.id + (item.query || ""),
+          url: item.pageUrl + '?id=' + this.item.id + (item.query || ''),
         });
       } else {
         this.$emit(item.apiName);
       }
     },
     goDetail() {
-      this.$emit("goDetail", this.item);
+      this.$emit('goDetail', this.item);
+    },
+    handleRadioChange(val) {
+      if (val === this.item.id) {
+        this.$emit('radioChange', this.item);
+      }
+    },
+    // 多选:点击 checkbox 时,通知父组件变更
+    handleCheckboxChange(e) {
+      this.$emit('checkboxChange', {
+        checked: e,        // e 为 boolean,表示当前 checkbox 是否被选中
+        item: this.item,
+      });
     },
   },
 };
 </script>
-
 <style lang="scss" scoped>
 .card_container {
-  padding: 20rpx 24rpx;
-  background: #f5f5f5;
+  padding: 16rpx 0;
 }
 
 .card_box {
   background: #ffffff;
-  border-radius: 16rpx;
-  padding: 28rpx;
-  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
+  border-radius: 24rpx;
+  padding: 24rpx;
+  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
   position: relative;
 
   .rx-bc {
@@ -158,7 +190,7 @@ export default {
     flex-flow: row wrap;
 
     > view {
-      margin-top: 28rpx;
+      margin-top: 24rpx;
 
       &:first-child,
       &:nth-child(2) {
@@ -172,19 +204,19 @@ export default {
     align-items: flex-start;
   }
 
-  // 头部样式
   .header_box {
     display: flex;
     justify-content: space-between;
     align-items: center;
     width: 100%;
     position: relative;
-    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
+    background: linear-gradient(135deg, #eef5ff 0%, #f5f9ff 100%);
     padding: 20rpx 24rpx;
-    border-radius: 12rpx 12rpx 0 0;
-    margin: -28rpx -28rpx 28rpx -28rpx;
-    width: calc(100% + 56rpx);
+    border-radius: 20rpx 20rpx 0 0;
+    margin: -24rpx -24rpx 24rpx -24rpx;
+    width: calc(100% + 48rpx);
     box-sizing: border-box;
+
     .round {
       width: 44rpx;
       height: 44rpx;
@@ -199,8 +231,8 @@ export default {
     }
 
     .orderId {
-      color: #333333;
-      font-size: 32rpx;
+      color: #1f2b3c;
+      font-size: 30rpx;
       font-weight: 600;
       white-space: nowrap;
       overflow: hidden;
@@ -211,17 +243,16 @@ export default {
       display: flex;
       align-items: center;
       flex: 1;
-      padding-right: 140rpx;
+      padding-right: 120rpx;
       overflow: hidden;
     }
 
-    // 状态标签
     .status-tag {
       background: #e3f2fd;
       color: #2196f3;
       font-size: 24rpx;
-      padding: 8rpx 20rpx;
-      border-radius: 24rpx;
+      padding: 6rpx 20rpx;
+      border-radius: 30rpx;
       font-weight: 500;
       position: absolute;
       top: 50%;
@@ -229,6 +260,24 @@ export default {
       right: 24rpx;
       z-index: 1;
     }
+
+    .select-tag {
+      position: absolute;
+      top: 50%;
+      transform: translateY(-50%);
+      right: 24rpx;
+      z-index: 2;
+      background: transparent;
+
+      /deep/ .u-radio-group,
+      /deep/ .u-checkbox-group {
+        .u-radio,
+        .u-checkbox {
+          padding: 0;
+          margin-right: 0;
+        }
+      }
+    }
   }
 
   .item_box {
@@ -266,14 +315,14 @@ export default {
       align-items: flex-start;
 
       .lable {
-        color: #666666;
+        color: #8e9aae;
         flex-shrink: 0;
-        margin-right: 12rpx;
-        font-size: 28rpx;
+        margin-right: 16rpx;
+        font-size: 26rpx;
       }
 
       .text {
-        color: #000;
+        color: #1f2b3c;
         font-size: 28rpx;
         flex: 1;
         white-space: nowrap;
@@ -281,17 +330,12 @@ export default {
         text-overflow: ellipsis;
         min-width: 0;
 
-        // 高亮值样式
         &.highlight {
           color: #4caf50;
         }
       }
     }
 
-    .gylx {
-      color: $theme-color;
-    }
-
     .perce50 {
       width: 50%;
       box-sizing: border-box;
@@ -302,6 +346,7 @@ export default {
         padding-left: 20rpx;
       }
     }
+
     .perce100 {
       width: 100%;
     }
@@ -313,59 +358,21 @@ export default {
     }
   }
 
-  // 底部查看详情
   .footer-link {
     display: flex;
     justify-content: center;
     align-items: center;
-    margin-top: 28rpx;
-    padding-top: 24rpx;
-    border-top: 1rpx solid #f0f0f0;
-    color: #666666;
+    margin-top: 24rpx;
+    padding-top: 20rpx;
+    border-top: 2rpx solid #f0f2f5;
+    color: #8e9aae;
     font-size: 28rpx;
     cursor: pointer;
+    gap: 8rpx;
 
     &:active {
       opacity: 0.7;
     }
   }
 }
-
-/deep/.u-input {
-  padding: 0 !important;
-  height: 44rpx !important;
-  font-size: 26rpx !important;
-}
-
-/deep/.u-input__content__field-wrapper__field {
-  font-size: 26rpx !important;
-}
-
-/deep/.uni-date-editor--x .uni-date__icon-clear {
-  border: none !important;
-}
-
-/deep/.uni-date__x-input,
-/deep/.uni-date-x {
-  padding: 0 !important;
-  height: 44rpx !important;
-  font-size: 26rpx !important;
-}
-
-/deep/.input-value {
-  font-size: 26rpx !important;
-  height: 44rpx !important;
-
-  uni-text {
-    font-size: 26rpx !important;
-  }
-}
-
-/deep/.u-textarea {
-  padding: 2px !important;
-}
-
-/deep/.u-textarea__field {
-  font-size: 26rpx !important;
-}
-</style>
+</style>

+ 3 - 3
manifest.json

@@ -1,8 +1,8 @@
 {
-    "name" : "智慧工厂",
+    "name" : "AiMil工业互联网平台",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.4.23",
+    "versionName" : "V1.0.4.25",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -13,7 +13,7 @@
                     // "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.3:18086/",
+                    "target" : "http://192.168.1.251:18086/",
                     // "target" : "http://aiot.zoomwin.com.cn:51001/api",
                     "changeOrigin" : true,
                     "secure" : false,

+ 10 - 2
pages.json

@@ -543,7 +543,7 @@
 		{
 			"path": "pages/maintenance/check/index",
 			"style": {
-				"navigationBarTitleText": "保养中",
+				"navigationBarTitleText": "报工中",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
@@ -551,7 +551,15 @@
 		{
 			"path": "pages/maintenance/check/detail",
 			"style": {
-				"navigationBarTitleText": "保养详情",
+				"navigationBarTitleText": "报工详情",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+		{
+			"path": "pages/maintenance/service/order",
+			"style": {
+				"navigationBarTitleText": "检修工单",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}

+ 1 - 0
pages/ehs/snapshot/common-style.scss

@@ -45,5 +45,6 @@
   display: flex;
   align-items: center;
   justify-content: center;
+  z-index: 999;
   box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.2);
 }

+ 230 - 64
pages/ehs/snapshot/components/discardDialog.vue

@@ -1,74 +1,240 @@
-<!-- components/discardDialog.vue - 废弃弹窗 -->
 <template>
-  <uni-popup ref="popup" type="center">
-    <view class="discard-dialog">
-      <view class="title">废弃</view>
-      <uni-forms ref="form" :modelValue="formData" :rules="rules" label-width="100px">
-        <uni-forms-item label="废弃原因" name="handleOpinion">
-          <textarea v-model="formData.handleOpinion" placeholder="请输入废弃原因(100字以内)" maxlength="100" />
-        </uni-forms-item>
-        <uni-forms-item label="废弃人">
-          <input v-model="formData.handlerName" disabled />
-        </uni-forms-item>
-      </uni-forms>
-      <view class="footer">
-        <button @click="close">取消</button>
-        <button type="primary" @click="handleSubmit">确定</button>
-      </view>
-    </view>
-  </uni-popup>
+	<u-popup :show="visible" :round="0" :closeOnClickOverlay="false" :zIndex="99999" @close="handleCancel"
+		class="u-popup-my">
+		<view class="popup-content">
+			<view class="popup-header">
+				<text class="popup-title">废弃</text>
+				<view class="close-btn" @click="handleCancel">×</view>
+			</view>
+
+			<scroll-view class="popup-body" scroll-y>
+				<view class="page">
+					<view class="card-a">
+						<!-- 头部 -->
+						<view class="a-header">
+							<text class="a-main-title">废弃随手拍</text>
+						</view>
+
+						<!-- 废弃信息 -->
+						<view class="card-section">
+							<view class="section-title">📋 废弃信息</view>
+							<view class="info-list">
+								<view class="info-item">
+									<text class="info-label">废弃原因</text>
+									<textarea
+										v-if="!isView"
+										class="info-textarea"
+										v-model="formData.handleOpinion"
+										placeholder="请输入废弃原因(100字以内)"
+										maxlength="100"
+									/>
+									<text v-else class="info-value readonly">{{ formData.handleOpinion || '无' }}</text>
+								</view>
+								<view class="info-item">
+									<text class="info-label">废弃人</text>
+									<text class="info-value readonly">{{ formData.handlerName }}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</scroll-view>
+
+			<view class="popup-footer">
+				<template v-if="isView">
+					<u-button type="default" @click="handleCancel">关闭</u-button>
+				</template>
+				<template v-else>
+					<u-button type="default" @click="handleCancel">取消</u-button>
+					<u-button type="primary" @click="handleSubmit" :loading="loading">确定</u-button>
+				</template>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</u-popup>
 </template>
 
 <script>
 export default {
-  emits: ['confirm'],
-  data() {
-    return {
-      formData: { id: '', handleOpinion: '', handlerName: '' },
-      rules: { handleOpinion: { required: true, message: '请输入废弃原因', trigger: 'blur' } }
-    };
-  },
-  methods: {
-    open(row) {
-      const userInfo = uni.getStorageSync('userInfo') || {};
-      this.formData = {
-        id: row.id,
-        handleOpinion: row.handleOpinion || '',
-        handlerName: row.handlerName || userInfo.name || ''
-      };
-      this.$refs.popup.open();
-    },
-    close() {
-      this.$refs.popup.close();
-      this.$refs.form?.resetFields();
-    },
-    async handleSubmit() {
-      const valid = await this.$refs.form.validate();
-      if (!valid) return;
-      this.$emit('confirm', { id: this.formData.id, handleOpinion: this.formData.handleOpinion });
-      this.close();
-    }
-  }
+	emits: ['confirm'],
+	data() {
+		return {
+			visible: false,
+			loading: false,
+			dialogType: 'add',
+			formData: { id: '', handleOpinion: '', handlerName: '' },
+			rules: { handleOpinion: { required: true, message: '请输入废弃原因', trigger: 'blur' } }
+		};
+	},
+	computed: {
+		isView() {
+			return this.dialogType === 'view';
+		}
+	},
+	methods: {
+		open(row, type = 'add') {
+			this.dialogType = type;
+			const userInfo = uni.getStorageSync('userInfo') || {};
+			this.formData = {
+				id: row.id || '',
+				handleOpinion: row.handleOpinion || '',
+				handlerName: row.handlerName || userInfo.name || ''
+			};
+			this.visible = true;
+		},
+		handleCancel() {
+			this.visible = false;
+			this.formData = { id: '', handleOpinion: '', handlerName: '' };
+		},
+		async handleSubmit() {
+			if (!this.formData.handleOpinion) {
+				this.$refs.uToast.show({ type: 'error', message: '请输入废弃原因' });
+				return;
+			}
+			this.$emit('confirm', { id: this.formData.id, handleOpinion: this.formData.handleOpinion });
+			this.visible = false;
+			this.formData = { id: '', handleOpinion: '', handlerName: '' };
+		}
+	}
 };
 </script>
 
 <style lang="scss" scoped>
-.discard-dialog {
-  width: 500rpx;
-  background: #fff;
-  border-radius: 16rpx;
-  padding: 30rpx;
-  .title {
-    font-size: 36rpx;
-    font-weight: bold;
-    text-align: center;
-    margin-bottom: 30rpx;
-  }
-  .footer {
-    display: flex;
-    gap: 20rpx;
-    margin-top: 30rpx;
-    button { flex: 1; margin: 0; }
-  }
+.popup-content {
+	width: 100vw;
+	height: calc(100vh - 100px);
+	background: #fff;
+	border-radius: 0;
+	display: flex;
+	flex-direction: column;
+	background-color: #eff2f7;
+}
+
+.popup-header {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	padding: 30rpx;
+	border-bottom: 1rpx solid #e5e5e5;
+	background: #fff;
+
+	.popup-title {
+		font-size: 36rpx;
+		font-weight: bold;
+		color: #333;
+	}
+
+	.close-btn {
+		width: 60rpx;
+		height: 60rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 60rpx;
+		color: #999;
+		line-height: 1;
+	}
+}
+
+.popup-body {
+	flex: 1;
+	overflow-y: auto;
+	padding: 28rpx;
+}
+
+.page {
+	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
+}
+
+.card-a {
+	background: #ffffff;
+	border-radius: 48rpx;
+	box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.05);
+	overflow: hidden;
+}
+
+.a-header {
+	background: linear-gradient(135deg, #fef0f0 0%, #fff3e0 100%);
+	padding: 40rpx 32rpx 24rpx;
+	text-align: center;
+
+	.a-main-title {
+		font-size: 36rpx;
+		font-weight: 800;
+		color: #e53935;
+	}
+}
+
+.card-section {
+	padding: 30rpx 32rpx;
+	border-bottom: 2rpx solid #f0f2f5;
+
+	&:last-child {
+		border-bottom: none;
+	}
+}
+
+.section-title {
+	font-size: 30rpx;
+	font-weight: 700;
+	color: #1f2a44;
+	margin-bottom: 24rpx;
+	padding-left: 16rpx;
+	border-left: 6rpx solid #f56c6c;
+}
+
+.info-list {
+	display: flex;
+	flex-direction: column;
+	gap: 28rpx;
+}
+
+.info-item {
+	display: flex;
+	flex-direction: column;
+	gap: 8rpx;
+}
+
+.info-label {
+	font-size: 26rpx;
+	font-weight: 600;
+	color: #6c7a91;
+}
+
+.info-value {
+	font-size: 28rpx;
+	font-weight: 500;
+	color: #1e2a3a;
+	padding: 16rpx 20rpx;
+	border-radius: 24rpx;
+	border: 2rpx solid #e9edf2;
+	background: #fff;
+
+	&.readonly {
+		color: #999;
+		background: #f5f5f5;
+	}
+}
+
+.info-textarea {
+	font-size: 28rpx;
+	color: #1e2a3a;
+	min-height: 160rpx;
+	padding: 16rpx 20rpx;
+	border-radius: 24rpx;
+	border: 2rpx solid #e9edf2;
+	background: #fff;
+}
+
+.popup-footer {
+	display: flex;
+	padding: 20rpx 30rpx;
+	border-top: 1rpx solid #e5e5e5;
+	background: #fff;
+	gap: 20rpx;
+
+	/deep/ .u-button {
+		flex: 1;
+	}
 }
-</style>
+</style>

+ 509 - 470
pages/ehs/snapshot/components/snapshotDialog.vue

@@ -1,478 +1,517 @@
 <template>
-	<u-popup :show="visible" :round="0" :closeOnClickOverlay="false" :zIndex="99999" @close="handleCancel"
-		class="u-popup-my">
-		<view class="popup-content">
-			<view class="popup-header">
-				<text class="popup-title">{{ dialogTitle }}</text>
-				<view class="close-btn" @click="handleCancel">×</view>
-			</view>
-
-			<scroll-view class="popup-body" scroll-y>
-				<view class="page">
-					<view class="card-a">
-						<!-- 头部 -->
-						<view class="a-header">
-							<text class="a-main-title">随手拍记录</text>
-						</view>
-
-						<!-- 基础信息 -->
-						<view class="card-section">
-							<view class="section-title">📝 基础信息</view>
-							<view class="info-list">
-								<view class="info-item">
-									<text class="info-label">问题描述</text>
-									<textarea v-if="canEdit" class="info-textarea" v-model="formData.description"
-										placeholder="请输入问题描述" :disabled="!canEdit" />
-									<text v-else class="info-value readonly">{{ formData.description }}</text>
-								</view>
-								<view class="info-item">
-									<text class="info-label">问题所在位置</text>
-									<input v-if="canEdit" class="info-input" v-model="formData.location"
-										placeholder="请输入位置" :disabled="!canEdit" />
-									<text v-else class="info-value readonly">{{ formData.location }}</text>
-								</view>
-								<view class="info-item">
-									<text class="info-label">问题所属部门</text>
-
-
-									<view class="info-value" :class="{ disabled: !canEdit }"
-										@click="title != '详情' && $refs.treePicker._show()">
-										{{ formData.problemDeptName || "请选择" }}
-									</view>
-
-								</view>
-								<view class="info-item">
-									<text class="info-label">随手拍图片</text>
-									<fileMain v-if="canEdit" v-model="formData.attachment"
-										:type="canEdit ? '' : 'view'" />
-									<view v-else class="image-list">
-										<image v-for="(img, idx) in formData.attachment" :key="idx" :src="img.url"
-											mode="aspectFill" @click="previewImage(img.url)" />
-									</view>
-								</view>
-							</view>
-						</view>
-
-						<!-- 上报信息 -->
-						<view class="card-section">
-							<view class="section-title">👤 上报信息</view>
-							<view class="info-list">
-								<view class="info-item">
-									<text class="info-label">上报人</text>
-									<text class="info-value readonly">{{ formData.reporterName }}</text>
-								</view>
-								<view class="info-item">
-									<text class="info-label">上报人部门</text>
-									<text class="info-value readonly">{{ formData.reporterDeptName }}</text>
-								</view>
-								<view class="info-item" v-if="!canEdit">
-									<text class="info-label">处理结果</text>
-									<view class="info-value">
-										<text v-if="formData.handleResult == 0" class="status-pending">待处理</text>
-										<text v-else class="status-link" :class="{
+  <u-popup
+    :show="visible"
+    :round="0"
+    :closeOnClickOverlay="false"
+    :zIndex="99999"
+    @close="handleCancel"
+    class="u-popup-my"
+  >
+    <view class="popup-content">
+      <view class="popup-header">
+        <text class="popup-title">{{ dialogTitle }}</text>
+        <view class="close-btn" @click="handleCancel">×</view>
+      </view>
+
+      <scroll-view class="popup-body" scroll-y>
+        <view class="page">
+          <view class="card-a">
+            <!-- 头部 -->
+            <view class="a-header">
+              <text class="a-main-title">随手拍记录</text>
+            </view>
+
+            <!-- 基础信息 -->
+            <view class="card-section">
+              <view class="section-title">📝 基础信息</view>
+              <view class="info-list">
+                <view class="info-item">
+                  <text class="info-label">问题描述</text>
+                  <textarea
+                    v-if="canEdit"
+                    class="info-textarea"
+                    v-model="formData.description"
+                    placeholder="请输入问题描述"
+                    :disabled="!canEdit"
+                  />
+                  <text v-else class="info-value readonly">{{
+                    formData.description
+                  }}</text>
+                </view>
+                <view class="info-item">
+                  <text class="info-label">问题所在位置</text>
+                  <input
+                    v-if="canEdit"
+                    class="info-input"
+                    v-model="formData.location"
+                    placeholder="请输入位置"
+                    :disabled="!canEdit"
+                  />
+                  <text v-else class="info-value readonly">{{
+                    formData.location
+                  }}</text>
+                </view>
+                <view class="info-item">
+                  <text class="info-label">问题所属部门</text>
+
+                  <view
+                    class="info-value"
+                    :class="{ disabled: !canEdit }"
+                    @click="title != '详情' && $refs.treePicker._show()"
+                  >
+                    {{ formData.problemDeptName || "请选择" }}
+                  </view>
+                </view>
+                <view class="info-item">
+                  <text class="info-label">随手拍图片</text>
+                  <fileMain
+                    v-model="formData.attachment"
+                    :type="canEdit ? '' : 'view'"
+                  />
+                </view>
+              </view>
+            </view>
+
+            <!-- 上报信息 -->
+            <view class="card-section">
+              <view class="section-title">👤 上报信息</view>
+              <view class="info-list">
+                <view class="info-item">
+                  <text class="info-label">上报人</text>
+                  <text class="info-value readonly">{{
+                    formData.reporterName
+                  }}</text>
+                </view>
+                <view class="info-item">
+                  <text class="info-label">上报人部门</text>
+                  <text class="info-value readonly">{{
+                    formData.reporterDeptName
+                  }}</text>
+                </view>
+                <view class="info-item" v-if="!canEdit">
+                  <text class="info-label">处理结果</text>
+                  <view >
+                    <text
+                      v-if="formData.handleResult == 0"
+                      class="status-pending"
+                      >待处理</text
+                    >
+                    <text
+                      v-else
+                      class="status-link"
+                      :class="{
                         'status-done': formData.handleResult == 1,
-                        'status-discard': formData.handleResult == 2
-                      }" @click="handleViewResult">{{ getResultLabel(formData.handleResult) }}</text>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</scroll-view>
-
-			<view class="popup-footer">
-				<template v-if="isView">
-					<u-button type="default" @click="handleCancel">关闭</u-button>
-				</template>
-				<template v-else-if="isHandle">
-					<u-button type="default" @click="handleDiscard">废弃</u-button>
-					<u-button type="primary" @click="handleRectify">下发整改</u-button>
-				</template>
-				<template v-else>
-					<u-button type="default" @click="handleCancel">取消</u-button>
-					<u-button type="primary" @click="handleSubmit" :loading="loading">保存</u-button>
-				</template>
-			</view>
-		</view>
-		<u-toast ref="uToast"></u-toast>
-		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="searchDeptNodeClick"
-			title="选择部门" :localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
-	</u-popup>
+                        'status-discard': formData.handleResult == 2,
+                      }"
+                      @click="handleViewResult"
+                      >{{ getResultLabel(formData.handleResult) }}(点击查看)</text
+                    >
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+      </scroll-view>
+
+      <view class="popup-footer">
+        <template v-if="isView">
+          <u-button type="default" @click="handleCancel">关闭</u-button>
+        </template>
+        <template v-else-if="isHandle">
+          <u-button type="default" @click="handleDiscard">废弃</u-button>
+          <u-button type="primary" @click="handleRectify">下发整改</u-button>
+        </template>
+        <template v-else>
+          <u-button type="default" @click="handleCancel">取消</u-button>
+          <u-button type="primary" @click="handleSubmit" :loading="loading"
+            >保存</u-button
+          >
+        </template>
+      </view>
+    </view>
+    <u-toast ref="uToast"></u-toast>
+    <ba-tree-picker
+      ref="treePicker"
+      key="verify"
+      :multiple="false"
+      @select-change="searchDeptNodeClick"
+      title="选择部门"
+      :localdata="classificationList"
+      valueKey="id"
+      textKey="name"
+      childrenKey="children"
+    />
+  </u-popup>
 </template>
 
 <script>
-	import {
-		getById,
-		save,
-		update
-	} from '@/api/snapshot/index.js';
-	import fileMain from "@/pages/doc/index.vue"
-	import {
-		listOrganizations
-	} from "@/api/common.js";
-	import {
-		toTreeData
-	} from "@/utils/utils.js";
-	export default {
-		emits: ['reload', 'rectify', 'discard'],
-		components: {
-			fileMain
-		},
-		data() {
-			return {
-				visible: false,
-				loading: false,
-				dialogType: 'add',
-				formData: this.getDefaultForm(),
-				classificationList: [],
-				resultOptions: [{
-						value: 1,
-						label: '下发整改'
-					},
-					{
-						value: 2,
-						label: '废弃'
-					}
-				]
-			};
-		},
-		computed: {
-			dialogTitle() {
-				const map = {
-					add: '新增随手拍',
-					edit: '编辑随手拍',
-					view: '随手拍详情',
-					handle: '随手拍处理'
-				};
-				return map[this.dialogType] || '随手拍';
-			},
-			isView() {
-				return this.dialogType === 'view';
-			},
-			isHandle() {
-				return this.dialogType === 'handle';
-			},
-			canEdit() {
-				return ['add', 'edit'].includes(this.dialogType);
-			}
-		},
-		methods: {
-			getDefaultForm() {
-				return {
-					id: '',
-					description: '',
-					location: '',
-					problemDeptId: '',
-					problemDeptName: '',
-					attachment: [],
-					reporterId: '',
-					reporterName: '',
-					reporterDeptId: '',
-					reporterDeptName: '',
-					handleResult: 0,
-					handleOpinion: '',
-					invHazardId: ''
-				};
-			},
-			async getTreeList() {
-				const data = await listOrganizations({});
-				let treeList = toTreeData({
-					data: data || [],
-					idField: "id",
-					parentIdField: "parentId",
-				});
-				this.classificationList = treeList;
-			},
-			async open(type, row = null) {
-				this.dialogType = type;
-				if (row && row.id && ['edit', 'view', 'handle'].includes(type)) {
-					try {
-						const data = await getById(row.id);
-						this.formData = {
-							...data,
-							attachment: data.attachment || []
-						};
-					} catch (e) {
-						console.error(e);
-					}
-				} else {
-					this.formData = this.getDefaultForm();
-					const userInfo = uni.getStorageSync('userInfo') || {};
-					this.formData.reporterName = userInfo.name || '';
-					this.formData.reporterId = userInfo.userId || '';
-					this.formData.reporterDeptName = userInfo.groupName || '';
-					this.formData.reporterDeptId = userInfo.groupId || '';
-				}
-				this.getTreeList();
-				this.visible = true;
-			},
-			//选择部门(搜索)
-			async searchDeptNodeClick(id, name, type) {
-				this.formData.problemDeptId = id[0];
-				this.formData.problemDeptName = name;
-	
-			},
-			handleCancel() {
-				this.visible = false;
-				this.resetForm();
-			},
-			resetForm() {
-				this.formData = this.getDefaultForm();
-			},
-			getResultLabel(result) {
-				const item = this.resultOptions.find(opt => opt.value == result);
-				return item ? item.label : '待处理';
-			},
-			previewImage(url) {
-				uni.previewImage({
-					urls: [url]
-				});
-			},
-			handleViewResult() {
-				if (this.formData.handleResult == 2) {
-					uni.showModal({
-						title: '废弃原因',
-						content: this.formData.handleOpinion || '无',
-						showCancel: false
-					});
-				} else if (this.formData.handleResult == 1 && this.formData.invHazardId) {
-					uni.navigateTo({
-						url: `/pages/hazard/detail?id=${this.formData.invHazardId}`
-					});
-				}
-			},
-			async handleSubmit() {
-				// 简单校验
-				if (!this.formData.description) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: '请输入问题描述'
-					});
-					return;
-				}
-				if (!this.formData.location) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: '请输入问题所在位置'
-					});
-					return;
-				}
-				const api = this.dialogType === 'add' ? save : update;
-				this.loading = true;
-				try {
-					await api(this.formData);
-					this.$refs.uToast.show({
-						type: 'success',
-						message: this.dialogType === 'add' ? '新增成功' : '编辑成功'
-					});
-					this.visible = false;
-					this.$emit('reload');
-					this.resetForm();
-				} catch (e) {
-					console.error(e);
-				} finally {
-					this.loading = false;
-				}
-			},
-			handleRectify() {
-				this.$emit('rectify', this.formData);
-				this.visible = false;
-			},
-			handleDiscard() {
-				this.$emit('discard', this.formData);
-				this.visible = false;
-			}
-		}
-	};
+import { getById, save, update } from "@/api/snapshot/index.js";
+import fileMain from "@/pages/doc/index.vue";
+import { listOrganizations } from "@/api/common.js";
+import { toTreeData } from "@/utils/utils.js";
+export default {
+  emits: ["reload", "rectify", "discard"],
+  components: {
+    fileMain,
+  },
+  data() {
+    return {
+      visible: false,
+      loading: false,
+      dialogType: "add",
+      formData: this.getDefaultForm(),
+      classificationList: [],
+      resultOptions: [
+        {
+          value: 1,
+          label: "下发整改",
+        },
+        {
+          value: 2,
+          label: "废弃",
+        },
+      ],
+    };
+  },
+  computed: {
+    dialogTitle() {
+      const map = {
+        add: "新增随手拍",
+        edit: "编辑随手拍",
+        view: "随手拍详情",
+        handle: "随手拍处理",
+      };
+      return map[this.dialogType] || "随手拍";
+    },
+    isView() {
+      return this.dialogType === "view";
+    },
+    isHandle() {
+      return this.dialogType === "handle";
+    },
+    canEdit() {
+      return ["add", "edit"].includes(this.dialogType);
+    },
+  },
+  methods: {
+    getDefaultForm() {
+      return {
+        id: "",
+        description: "",
+        location: "",
+        problemDeptId: "",
+        problemDeptName: "",
+        attachment: [],
+        reporterId: "",
+        reporterName: "",
+        reporterDeptId: "",
+        reporterDeptName: "",
+        handleResult: 0,
+        handleOpinion: "",
+        invHazardId: "",
+      };
+    },
+    async getTreeList() {
+      const data = await listOrganizations({});
+      let treeList = toTreeData({
+        data: data || [],
+        idField: "id",
+        parentIdField: "parentId",
+      });
+      this.classificationList = treeList;
+    },
+    async open(type, row = null) {
+      console.log(row, "type");
+      this.dialogType = type;
+      if (row && row.id && ["edit", "view", "handle"].includes(type)) {
+        try {
+          const data = await getById(row.id);
+          this.formData = {
+            ...data,
+            attachment: data.attachment || [],
+          };
+        } catch (e) {
+          console.error(e);
+        }
+      } else {
+        this.formData = this.getDefaultForm();
+        const userInfo = uni.getStorageSync("userInfo") || {};
+        this.formData.reporterName = userInfo.name || "";
+        this.formData.reporterId = userInfo.userId || "";
+        this.formData.reporterDeptName = userInfo.groupName || "";
+        this.formData.reporterDeptId = userInfo.groupId || "";
+      }
+      this.getTreeList();
+      this.visible = true;
+    },
+    //选择部门(搜索)
+    async searchDeptNodeClick(id, name, type) {
+      this.formData.problemDeptId = id[0];
+      this.formData.problemDeptName = name;
+    },
+    handleCancel() {
+      this.visible = false;
+      this.resetForm();
+    },
+    resetForm() {
+      this.formData = this.getDefaultForm();
+    },
+    getResultLabel(result) {
+      const item = this.resultOptions.find((opt) => opt.value == result);
+      return item ? item.label : "待处理";
+    },
+    previewImage(url) {
+      uni.previewImage({
+        urls: [url],
+      });
+    },
+    handleViewResult() {
+      if (this.formData.handleResult == 2) {
+        this.$emit("discard", this.formData, "view");
+      } else if (this.formData.handleResult == 1 && this.formData.invHazardId) {
+        uni.navigateTo({
+          url: `/pages/hazard/detail?id=${this.formData.invHazardId}`,
+        });
+      }
+    },
+    async handleSubmit() {
+      // 简单校验
+      if (!this.formData.description) {
+        this.$refs.uToast.show({
+          type: "error",
+          message: "请输入问题描述",
+        });
+        return;
+      }
+      if (!this.formData.location) {
+        this.$refs.uToast.show({
+          type: "error",
+          message: "请输入问题所在位置",
+        });
+        return;
+      }
+      const api = this.dialogType === "add" ? save : update;
+      this.loading = true;
+      try {
+        await api(this.formData);
+        this.$refs.uToast.show({
+          type: "success",
+          message: this.dialogType === "add" ? "新增成功" : "编辑成功",
+        });
+        this.visible = false;
+        this.$emit("reload");
+        this.resetForm();
+      } catch (e) {
+        console.error(e);
+      } finally {
+        this.loading = false;
+      }
+    },
+    handleRectify() {
+      this.$emit("rectify", this.formData);
+      this.visible = false;
+    },
+    handleDiscard() {
+      this.$emit("discard", this.formData);
+      this.visible = false;
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.popup-content {
-		width: 100vw;
-		height: calc(100vh - 100px);
-		background: #fff;
-		border-radius: 0;
-		display: flex;
-		flex-direction: column;
-		background-color: #eff2f7;
-	}
-
-	.popup-header {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 30rpx;
-		border-bottom: 1rpx solid #e5e5e5;
-		background: #fff;
-
-		.popup-title {
-			font-size: 36rpx;
-			font-weight: bold;
-			color: #333;
-		}
-
-		.close-btn {
-			width: 60rpx;
-			height: 60rpx;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			font-size: 60rpx;
-			color: #999;
-			line-height: 1;
-		}
-	}
-
-	.popup-body {
-		flex: 1;
-		overflow-y: auto;
-		padding: 28rpx;
-	}
-
-	.page {
-		font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
-	}
-
-	.card-a {
-		background: #ffffff;
-		border-radius: 48rpx;
-		box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.05);
-		overflow: hidden;
-	}
-
-	.a-header {
-		background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
-		padding: 40rpx 32rpx 24rpx;
-		text-align: center;
-
-		.a-main-title {
-			font-size: 36rpx;
-			font-weight: 800;
-			color: #2e7d32;
-		}
-	}
-
-	.card-section {
-		padding: 30rpx 32rpx;
-		border-bottom: 2rpx solid #f0f2f5;
-
-		&:last-child {
-			border-bottom: none;
-		}
-	}
-
-	.section-title {
-		font-size: 30rpx;
-		font-weight: 700;
-		color: #1f2a44;
-		margin-bottom: 24rpx;
-		padding-left: 16rpx;
-		border-left: 6rpx solid #4caf50;
-	}
-
-	.info-list {
-		display: flex;
-		flex-direction: column;
-		gap: 28rpx;
-	}
-
-	.info-item {
-		display: flex;
-		flex-direction: column;
-		gap: 8rpx;
-	}
-
-	.info-label {
-		font-size: 26rpx;
-		font-weight: 600;
-		color: #6c7a91;
-	}
-
-	.info-value {
-		font-size: 28rpx;
-		font-weight: 500;
-		color: #1e2a3a;
-		padding: 16rpx 20rpx;
-		border-radius: 24rpx;
-		border: 2rpx solid #e9edf2;
-		background: #fff;
-
-		&.readonly {
-			color: #999;
-			background: #f5f5f5;
-		}
-	}
-
-	.info-input,
-	.info-textarea {
-		font-size: 28rpx;
-		color: #1e2a3a;
-		height: 60rpx;
-		padding: 16rpx 20rpx;
-		border-radius: 24rpx;
-		border: 2rpx solid #e9edf2;
-		background: #fff;
-	}
-
-	.info-textarea {
-		min-height: 160rpx;
-	}
-
-	.image-list {
-		display: flex;
-		flex-wrap: wrap;
-		gap: 16rpx;
-
-		image {
-			width: 160rpx;
-			height: 160rpx;
-			border-radius: 16rpx;
-			background: #f5f5f5;
-			object-fit: cover;
-		}
-	}
-
-	.status-pending {
-		color: #e6a23c;
-		background: #fff3e0;
-		padding: 8rpx 20rpx;
-		border-radius: 32rpx;
-		font-size: 26rpx;
-		display: inline-block;
-	}
-
-	.status-done {
-		color: #67c23a;
-		background: #e0f3e8;
-		padding: 8rpx 20rpx;
-		border-radius: 32rpx;
-		font-size: 26rpx;
-		display: inline-block;
-	}
-
-	.status-discard {
-		color: #f56c6c;
-		background: #fef0f0;
-		padding: 8rpx 20rpx;
-		border-radius: 32rpx;
-		font-size: 26rpx;
-		display: inline-block;
-	}
-
-	.status-link {
-		text-decoration: none;
-	}
-
-	.popup-footer {
-		display: flex;
-		padding: 20rpx 30rpx;
-		border-top: 1rpx solid #e5e5e5;
-		background: #fff;
-		gap: 20rpx;
-
-		/deep/ .u-button {
-			flex: 1;
-		}
-	}
-</style>
+.popup-content {
+  width: 100vw;
+  height: calc(100vh - 100px);
+  background: #fff;
+  border-radius: 0;
+  display: flex;
+  flex-direction: column;
+  background-color: #eff2f7;
+}
+
+.popup-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 30rpx;
+  border-bottom: 1rpx solid #e5e5e5;
+  background: #fff;
+
+  .popup-title {
+    font-size: 36rpx;
+    font-weight: bold;
+    color: #333;
+  }
+
+  .close-btn {
+    width: 60rpx;
+    height: 60rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 60rpx;
+    color: #999;
+    line-height: 1;
+  }
+}
+
+.popup-body {
+  flex: 1;
+  overflow-y: auto;
+  padding: 28rpx;
+}
+
+.page {
+  font-family:
+    system-ui,
+    -apple-system,
+    "Segoe UI",
+    Roboto,
+    Helvetica,
+    sans-serif;
+}
+
+.card-a {
+  background: #ffffff;
+  border-radius: 48rpx;
+  box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.05);
+  overflow: hidden;
+}
+
+.a-header {
+  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
+  padding: 40rpx 32rpx 24rpx;
+  text-align: center;
+
+  .a-main-title {
+    font-size: 36rpx;
+    font-weight: 800;
+    color: #2e7d32;
+  }
+}
+
+.card-section {
+  padding: 30rpx 32rpx;
+  border-bottom: 2rpx solid #f0f2f5;
+
+  &:last-child {
+    border-bottom: none;
+  }
+}
+
+.section-title {
+  font-size: 30rpx;
+  font-weight: 700;
+  color: #1f2a44;
+  margin-bottom: 24rpx;
+  padding-left: 16rpx;
+  border-left: 6rpx solid #4caf50;
+}
+
+.info-list {
+  display: flex;
+  flex-direction: column;
+  gap: 28rpx;
+}
+
+.info-item {
+  display: flex;
+  flex-direction: column;
+  gap: 8rpx;
+}
+
+.info-label {
+  font-size: 26rpx;
+  font-weight: 600;
+  color: #6c7a91;
+}
+
+.info-value {
+  font-size: 28rpx;
+  font-weight: 500;
+  color: #1e2a3a;
+  padding: 16rpx 20rpx;
+  border-radius: 24rpx;
+  border: 2rpx solid #e9edf2;
+  background: #fff;
+
+  &.readonly {
+    color: #999;
+    background: #f5f5f5;
+  }
+}
+
+.info-input,
+.info-textarea {
+  font-size: 28rpx;
+  color: #1e2a3a;
+  height: 60rpx;
+  padding: 16rpx 20rpx;
+  border-radius: 24rpx;
+  border: 2rpx solid #e9edf2;
+  background: #fff;
+}
+
+.info-textarea {
+  min-height: 160rpx;
+}
+
+.image-list {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 16rpx;
+
+  image {
+    width: 160rpx;
+    height: 160rpx;
+    border-radius: 16rpx;
+    background: #f5f5f5;
+    object-fit: cover;
+  }
+}
+
+.status-pending {
+  color: #e6a23c;
+  background: #fff3e0;
+  padding: 8rpx 20rpx;
+  border-radius: 32rpx;
+  font-size: 26rpx;
+  display: inline-block;
+}
+
+.status-done {
+  color: #67c23a;
+  background: #e0f3e8;
+  padding: 8rpx 20rpx;
+  border-radius: 32rpx;
+  font-size: 26rpx;
+  display: inline-block;
+}
+
+.status-discard {
+  color: #f56c6c;
+  background: #fef0f0;
+  padding: 8rpx 20rpx;
+  border-radius: 32rpx;
+  font-size: 26rpx;
+  display: inline-block;
+}
+
+.status-link {
+  text-decoration: none;
+}
+
+.popup-footer {
+  display: flex;
+  padding: 20rpx 30rpx;
+  border-top: 1rpx solid #e5e5e5;
+  background: #fff;
+  gap: 20rpx;
+
+  /deep/ .u-button {
+    flex: 1;
+  }
+}
+</style>

+ 316 - 0
pages/ehs/snapshot/components/snapshotList.vue

@@ -0,0 +1,316 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="navTitle" @clickLeft="back" />
+
+		<!-- 搜索区域 -->
+		<view class="top-wrapper">
+			<uni-forms :modelValue="where" label-width="100px" class="search-form">
+				<uni-forms-item label="处理结果">
+					<uni-data-select v-model="where.handleResult" :localdata="resultOptions" placeholder="全部"
+						clearable />
+				</uni-forms-item>
+			</uni-forms>
+			<button class="search_btn" @click="handleSearch">搜索</button>
+		</view>
+
+		<view class="wrapper">
+			<u-list @scrolltolower="scrolltolower" class="listContent">
+				<view v-for="(item, idx) in tableList" :key="item.id" style="position: relative">
+					<myCard :item="item" :index="idx + 1" :btnList="currentBtnList" :columns="currentColumns"
+						:title="item.description" :status="statusMap[item.handleResult]" @goDetail="goDetail"
+						@edit="handleEdit(item)" @handleDelete="handleDelete(item)" @handleProcess="handleProcess(item)" />
+				</view>
+				<view style="width: 100%; height: 40rpx"></view>
+				<view style="margin-top: 20vh" v-if="tableList.length == 0">
+					<u-empty iconSize="150" textSize="32" text="暂无数据" />
+				</view>
+			</u-list>
+		</view>
+
+		<!-- 新增/编辑/查看/处理弹窗 -->
+		<snapshot-dialog ref="snapshotDialog" @reload="reloadList" @rectify="onRectify" @discard="onDiscard" />
+		<!-- 废弃弹窗(仅管理模式) -->
+		<discard-dialog v-if="mode === 'manage'" ref="discardDialogRef" @confirm="doDiscard" />
+
+		<!-- 新增按钮(仅我的随手拍) -->
+		<view v-if="mode === 'my'" class="add" @click="handleAdd">
+			<u-icon name="plus" color="#fff"></u-icon>
+		</view>
+	</view>
+</template>
+
+<script>
+	import myCard from "@/components/myCard.vue";
+	import snapshotDialog from "./snapshotDialog.vue";
+	import discardDialog from "./discardDialog.vue";
+	import {
+		getList,
+		remove,
+		discard,
+		handle
+	} from "@/api/snapshot/index.js";
+
+	export default {
+		components: {
+			myCard,
+			snapshotDialog,
+			discardDialog
+		},
+		props: {
+			mode: {
+				type: String,
+				default: "my",
+				validator: (v) => ["my", "manage"].includes(v),
+			},
+		},
+		data() {
+			return {
+				where: {
+					handleResult: ""
+				},
+				resultOptions: [{
+						value: 0,
+						text: "待处理"
+					},
+					{
+						value: 1,
+						text: "下发整改"
+					},
+					{
+						value: 2,
+						text: "废弃"
+					},
+				],
+				statusMap: {
+					0: "待处理",
+					1: "已整改",
+					2: "已废弃"
+				},
+				tableList: [],
+				page: 1,
+				size: 10,
+				isEnd: false,
+				userInfo: {},
+				currentId: null,
+			};
+		},
+		computed: {
+			navTitle() {
+				return this.mode === "my" ? "我的随手拍" : "随手拍管理";
+			},
+			currentColumns() {
+				return [
+					[{
+						prop: "location",
+						label: "位置",
+						className: "perce100"
+					}],
+					[{
+						prop: "problemDeptName",
+						label: "所属部门",
+						className: "perce100"
+					}],
+					[{
+						prop: "reporterName",
+						label: "上报人",
+						className: "perce100"
+					}],
+					[{
+						prop: "createTime",
+						label: "上报时间",
+						className: "perce100"
+					}],
+					[{
+						prop: "handleResult",
+						label: "处理结果",
+						className: "perce100",
+						formatter: (row) => this.statusMap[row.handleResult],
+					}, ],
+					[{
+						label: "操作:",
+						prop: "action",
+						type: "action",
+						className: "perce100",
+					}, ]
+				];
+
+			},
+			currentBtnList() {
+				if (this.mode === "my") {
+					return [{
+							name: "编辑",
+							apiName: "edit",
+							btnType: "primary",
+							judge: [{
+								fn: (item) => item.handleResult === 0
+							}],
+						},
+						{
+							name: "删除",
+							apiName: "handleDelete",
+							btnType: "danger",
+							judge: [{
+								fn: (item) => item.handleResult === 0
+							}],
+						},
+					];
+				} else {
+					return [{
+						name: "处理",
+						apiName: "handleProcess",
+						btnType: "primary",
+						judge: [{
+							fn: (item) => item.handleResult === 0
+						}],
+					}, ];
+				}
+			},
+		},
+		created() {
+			this.userInfo = uni.getStorageSync("userInfo") || {};
+			this.getList();
+		},
+		methods: {
+			back() {
+				uni.navigateBack();
+			},
+
+			// 列表查看详情
+			goDetail(item) {
+				this.$refs.snapshotDialog.open("view", item);
+			},
+
+			// 新增(仅 my 模式)
+			handleAdd() {
+				this.$refs.snapshotDialog.open("add");
+			},
+
+			// 编辑(my 模式按钮)
+			handleEdit(row) {
+				this.$refs.snapshotDialog.open("edit", row);
+			},
+
+			// 删除(my 模式按钮)
+			async handleDelete(row) {
+				const res = await uni.showModal({
+					title: "提示",
+					content: "确认删除该记录吗?",
+				});
+				if (res[1].confirm) {
+					await remove([row.id]);
+					uni.showToast({
+						title: "删除成功",
+						icon: "success"
+					});
+					this.reloadList();
+				}
+			},
+
+			// 处理(manage 模式按钮)
+			handleProcess(row) {
+				this.$refs.snapshotDialog.open("handle", row);
+			},
+
+			// 下发整改(manage 模式)
+			onRectify(data) {
+				this.currentId = data.id;
+				this.$refs.hazardDialogRef &&
+					this.$refs.hazardDialogRef.open("add", "", "report", {
+						sourceType: 4,
+						sourceId: data.id,
+						sourceName: "随手拍",
+						foundUserName: data.reporterName,
+						foundUserId: data.reporterId,
+						foundTime: data.createTime,
+						description: data.location + data.description,
+						reportAttachments: data.attachment,
+					});
+			},
+			doRectify(opinion) {
+				handle({
+					id: this.currentId,
+					handleOpinion: opinion,
+					invHazardId: "下发整改",
+				}).then(() => {
+					uni.showToast({
+						title: "下发整改成功",
+						icon: "success"
+					});
+					this.reloadList();
+				});
+			},
+
+			// 废弃(manage 模式)
+			onDiscard(data,type) {
+				this.$refs.discardDialogRef.open(data,type);
+			},
+			doDiscard({
+				id,
+				handleOpinion
+			}) {
+				discard({
+					id,
+					handleOpinion
+				}).then(() => {
+					uni.showToast({
+						title: "废弃成功",
+						icon: "success"
+					});
+					this.reloadList();
+				});
+			},
+
+			// 通用方法
+			reloadList() {
+				this.page = 1;
+				this.isEnd = false;
+				this.getList();
+			},
+			handleSearch() {
+				this.page = 1;
+				this.isEnd = false;
+				this.getList();
+			},
+			async getList() {
+				if (this.isEnd) return;
+				uni.showLoading({
+					title: "加载中"
+				});
+				try {
+					const baseData = {
+						pageNum: this.page,
+						size: this.size,
+						handleResult: this.where.handleResult !== "" ?
+							this.where.handleResult :
+							undefined,
+					};
+					// 不同模式参数不同
+					if (this.mode === "my") {
+						baseData.reporterId = this.userInfo.userId;
+					}
+					const res = await getList(baseData);
+					const newList = this.mode === "my" ? res.list || [] : res.list || [];
+					if (this.page === 1) this.tableList = newList;
+					else this.tableList.push(...newList);
+					if (this.mode === "my") {
+						this.isEnd = this.tableList.length >= res.count;
+					} else {
+						this.isEnd = newList.length < this.size;
+					}
+					this.page += 1;
+				} catch (e) {
+					console.error(e);
+				} finally {
+					uni.hideLoading();
+				}
+			},
+			scrolltolower() {
+				if (!this.isEnd) this.getList();
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	@import "../common-style.scss";
+</style>

+ 4 - 143
pages/ehs/snapshot/mySnapshot.vue

@@ -1,150 +1,11 @@
 <!-- pages/snapshot/mySnapshot.vue -->
 <template>
-  <view class="mainBox">
-    <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="我的随手拍" @clickLeft="back" />
-
-    <!-- 搜索区域 -->
-    <view class="top-wrapper">
-      <uni-forms :modelValue="where" label-width="100px" class="search-form">
-        <uni-forms-item label="处理结果">
-          <uni-data-select v-model="where.handleResult" :localdata="resultOptions" placeholder="全部" clearable />
-        </uni-forms-item>
- 
-      </uni-forms>
-      <button class="search_btn" @click="handleSearch">搜索</button>
-    </view>
-
-    <view class="wrapper">
-      <u-list @scrolltolower="scrolltolower" class="listContent">
-        <view v-for="(item, idx) in tableList" :key="item.id" style="position: relative">
-          <myCard
-            :item="item"
-            :index="idx + 1"
-            :btnList="myBtnList" 
-            :columns="columns"
-            :title="item.description"
-            :status="statusMap[item.handleResult]"
-            @goDetail="goDetail"
-            @handleDelete="handleDelete"
-          />
-        </view>
-        <view style="width: 100%; height: 40rpx"></view>
-        <view style="margin-top: 20vh" v-if="tableList.length == 0">
-          <u-empty iconSize="150" textSize="32" text="暂无数据" />
-        </view>
-      </u-list>
-    </view>
-
-    <!-- 新增/编辑/查看弹窗 -->
-    <snapshot-dialog ref="snapshotDialog" @reload="reloadList" />
-
-    <view class="add" @click="goDetail({}, 'add')">
-      <u-icon name="plus" color="#fff"></u-icon>
-    </view>
-  </view>
+  <snapshot-list mode="my" />
 </template>
- 
-<script>
-	import myCard from "@/components/myCard.vue";
-import snapshotDialog from './components/snapshotDialog.vue';
-import { getList, remove } from '@/api/snapshot/index.js';
 
+<script>
+import snapshotList from './components/snapshotList.vue';
 export default {
-  components: { myCard, snapshotDialog },
-  data() {
-    return {
-      where: { handleResult: '', createTime: '' },
-      resultOptions: [
-        { value: 0, text: '待处理' },
-        { value: 1, text: '下发整改' },
-        { value: 2, text: '废弃' }
-      ],
-      statusMap: { 0: '待处理', 1: '已整改', 2: '已废弃' },
-      columns: [
-        [{ prop: 'location', label: '位置', className: 'perce100' }],
-        [{ prop: 'problemDeptName', label: '所属部门', className: 'perce100' }],
-        [{ prop: 'createTime', label: '上报时间', className: 'perce100' }],
-        [{ prop: 'handleResult', label: '处理结果', className: 'perce100', formatter: (row) => this.statusMap[row.handleResult] }]
-      ],
-      tableList: [],
-      page: 1,
-      size: 10,
-      isEnd: false,
-      userInfo: {}
-    };
-  },
-  computed: {
-    myBtnList() {
-      return [
-        {
-          name: '编辑',
-          apiName: 'edit',
-          btnType: 'primary',
-          judge: [{ fn: (item) => item.handleResult === 0 }]
-        },
-        {
-          name: '删除',
-          apiName: 'delete',
-          btnType: 'danger',
-          judge: [{ fn: (item) => item.handleResult === 0 }]
-        }
-      ];
-    }
-  },
-  onLoad() {
-    this.userInfo = uni.getStorageSync('userInfo') || {};
-    this.getList();
-  },
-  methods: {
-    back() { uni.navigateBack(); },
-    goDetail(item, type) {
-      this.$refs.snapshotDialog.open(type, item);
-    },
-    async handleDelete(row) {
-      const res = await uni.showModal({ title: '提示', content: '确认删除该记录吗?' });
-      if (res.confirm) {
-        await remove([row.id]);
-        uni.showToast({ title: '删除成功', icon: 'success' });
-        this.reloadList();
-      }
-    },
-    reloadList() {
-      this.page = 1;
-      this.isEnd = false;
-      this.getList();
-    },
-    handleSearch() {
-      this.page = 1;
-      this.isEnd = false;
-      this.getList();
-    },
-    async getList() {
-      if (this.isEnd) return;
-      uni.showLoading({ title: '加载中' });
-      try {
-        const data = {
-          pageNum: this.page,
-          size: this.size,
-          reporterId: this.userInfo.userId,
-          handleResult: this.where.handleResult !== '' ? this.where.handleResult : undefined,
-          createTime: this.where.createTime || undefined
-        };
-        const res = await getList(data);
-        const newList = res.list || [];
-        if (this.page === 1) this.tableList = newList;
-        else this.tableList.push(...newList);
-        this.isEnd = this.tableList.length >= res.count;
-        this.page += 1;
-      } catch (e) { console.error(e); }
-      finally { uni.hideLoading(); }
-    },
-    scrolltolower() {
-      if (!this.isEnd) this.getList();
-    }
-  }
+  components: { snapshotList }
 };
 </script>
-
-<style lang="scss" scoped>
-@import './common-style.scss'; // 共用样式见下方
-</style>

+ 5 - 223
pages/ehs/snapshot/snapshotManage.vue

@@ -1,229 +1,11 @@
 <!-- pages/snapshot/snapshotManage.vue -->
 <template>
-	<view class="mainBox">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="随手拍管理" @clickLeft="back" />
-
-		<view class="top-wrapper">
-			<uni-forms :modelValue="where" label-width="100px" class="search-form">
-	
-				<uni-forms-item label="处理结果">
-					<uni-data-select v-model="where.handleResult" :localdata="resultOptions" placeholder="全部"
-						clearable />
-				</uni-forms-item>
-	
-			</uni-forms>
-			<button class="search_btn" @click="handleSearch">搜索</button>
-		</view>
-
-		<view class="wrapper">
-			<u-list @scrolltolower="scrolltolower" class="listContent">
-				<view v-for="(item, idx) in tableList" :key="item.id" style="position: relative">
-					<myCard :item="item" :index="idx + 1" :btnList="manageBtnList" :columns="columns"
-						:title="item.description" :status="statusMap[item.handleResult]" @goDetail="goDetail"
-						@handleProcess="handleProcess" />
-				</view>
-				<view style="width: 100%; height: 40rpx"></view>
-				<view style="margin-top: 20vh" v-if="tableList.length == 0">
-					<u-empty iconSize="150" textSize="32" text="暂无数据" />
-				</view>
-			</u-list>
-		</view>
-
-		<snapshot-dialog ref="snapshotDialog" @rectify="onRectify" @discard="onDiscard" />
-		<discard-dialog ref="discardDialogRef" @confirm="doDiscard" />
-		<!-- <hazardDialog ref="hazardDialogRef" @reload="doRectify" /> -->
-	</view>
+  <snapshot-list mode="manage" />
 </template>
 
 <script>
-	import myCard from "@/components/myCard.vue";
-	import snapshotDialog from './components/snapshotDialog.vue';
-	import discardDialog from './components/discardDialog.vue';
-	// import hazardDialog from '@/views/hazardManagement/hazardDialog.vue';
-	import {
-		getList,
-		discard,
-		handle
-	} from '@/api/snapshot/index.js';
-
-	export default {
-		components: {
-			myCard,
-			snapshotDialog,
-			discardDialog,
-			// hazardDialog
-		},
-		data() {
-			return {
-				where: {
-					reporterName: '',
-					handleResult: '',
-					createTime: ''
-				},
-				resultOptions: [{
-						value: 0,
-						text: '待处理'
-					},
-					{
-						value: 1,
-						text: '下发整改'
-					},
-					{
-						value: 2,
-						text: '废弃'
-					}
-				],
-				statusMap: {
-					0: '待处理',
-					1: '已整改',
-					2: '已废弃'
-				},
-				columns: [
-					[{
-						prop: 'location',
-						label: '位置',
-						className: 'perce100'
-					}],
-					[{
-						prop: 'problemDeptName',
-						label: '所属部门',
-						className: 'perce100'
-					}],
-					[{
-						prop: 'reporterName',
-						label: '上报人',
-						className: 'perce100'
-					}],
-					[{
-						prop: 'createTime',
-						label: '上报时间',
-						className: 'perce100'
-					}],
-					[{
-						prop: 'handleResult',
-						label: '处理结果',
-						className: 'perce100',
-						formatter: (row) => this.statusMap[row.handleResult]
-					}]
-				],
-				tableList: [],
-				page: 1,
-				size: 10,
-				isEnd: false,
-				currentId: null
-			};
-		},
-		computed: {
-			manageBtnList() {
-				return [{
-					name: '处理',
-					apiName: 'handleProcess',
-					btnType: 'primary',
-					judge: [{
-						fn: (item) => item.handleResult === 0
-					}]
-				}];
-			}
-		},
-		onLoad() {
-			this.getList();
-		},
-		methods: {
-			back() {
-				uni.navigateBack();
-			},
-			goDetail(item, type) {
-				this.$refs.snapshotDialog.open(type, item);
-			},
-			handleProcess(row) {
-				this.$refs.snapshotDialog.open('handle', row);
-			},
-			onRectify(data) {
-				this.currentId = data.id;
-				this.$refs.hazardDialogRef.open('add', '', 'report', {
-					sourceType: 4,
-					sourceId: data.id,
-					sourceName: '随手拍',
-					foundUserName: data.reporterName,
-					foundUserId: data.reporterId,
-					foundTime: data.createTime,
-					description: data.location + data.description,
-					reportAttachments: data.attachment
-				});
-			},
-			doRectify(opinion) {
-				handle({
-					id: this.currentId,
-					handleOpinion: opinion,
-					invHazardId: '下发整改'
-				}).then(() => {
-					uni.showToast({
-						title: '下发整改成功',
-						icon: 'success'
-					});
-					this.reloadList();
-				});
-			},
-			onDiscard(data) {
-				this.$refs.discardDialogRef.open(data);
-			},
-			doDiscard({
-				id,
-				handleOpinion
-			}) {
-				discard({
-					id,
-					handleOpinion
-				}).then(() => {
-					uni.showToast({
-						title: '废弃成功',
-						icon: 'success'
-					});
-					this.reloadList();
-				});
-			},
-			reloadList() {
-				this.page = 1;
-				this.isEnd = false;
-				this.getList();
-			},
-			handleSearch() {
-				this.page = 1;
-				this.isEnd = false;
-				this.getList();
-			},
-			async getList() {
-				if (this.isEnd) return;
-				uni.showLoading({
-					title: '加载中'
-				});
-				try {
-					const data = {
-						pageNum: this.page,
-						size: this.size,
-						reporterName: this.where.reporterName || undefined,
-						handleResult: this.where.handleResult !== '' ? this.where.handleResult : undefined,
-						createTime: this.where.createTime || undefined
-					};
-					const res = await getList(data);
-					const newList = res.rows || [];
-					if (this.page === 1) this.tableList = newList;
-					else this.tableList.push(...newList);
-					this.isEnd = newList.length < this.size;
-					this.page += 1;
-				} catch (e) {
-					console.error(e);
-				} finally {
-					uni.hideLoading();
-				}
-			},
-			scrolltolower() {
-				if (!this.isEnd) this.getList();
-			}
-		}
-	};
+import snapshotList from './components/snapshotList.vue';
+export default {
+  components: { snapshotList }
+};
 </script>
-
-<style lang="scss" scoped>
-	@import './common-style.scss';
-</style>

+ 125 - 85
pages/home/myTicket/myTicket.vue

@@ -13,7 +13,7 @@
 					:key="index">
 					<view @click="handleTabChange(item)" class="badge-c">
 						{{item.name}}
-							<u-badge max="99" :value="item.badge.value" absolute v-show="orderType==1"></u-badge>
+						<u-badge max="99" :value="item.badge.value" absolute v-show="orderType==1"></u-badge>
 					</view>
 
 
@@ -27,7 +27,8 @@
 		</view>
 
 		<view v-if="activeType == 'quality'">
-			<InspectionWorkList pageName="myList" :way="orderType == 1 ? 'todo' : 'done'"  ref="inspectionWorkListRef"></InspectionWorkList>
+			<InspectionWorkList pageName="myList" :way="orderType == 1 ? 'todo' : 'done'" ref="inspectionWorkListRef">
+			</InspectionWorkList>
 		</view>
 
 		<view v-else class="work-list">
@@ -54,8 +55,8 @@
 			<template v-slot:list>
 				<view class="search_list">
 					<u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
-						<u-form-item v-if="orderType == 1 && statusRange[activeType].length > 0" label="类型:" class="required-form" borderBottom
-							prop="assetType">
+						<u-form-item v-if="orderType == 1 && statusRange[activeType].length > 0" label="类型:"
+							class="required-form" borderBottom prop="assetType">
 							<u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30"
 								@change="statusChange">
 								<u-checkbox v-for="(item, index) in statusRange[activeType]"
@@ -81,13 +82,14 @@
 </template>
 
 <script>
-	
 	import {
 		getByCode
 	} from '@/api/pda/common.js'
 
-	import { workorderMyPage } from '@/api/pda/workOrder'
-	
+	import {
+		workorderMyPage
+	} from '@/api/pda/workOrder'
+
 	import SearchPopup from '@/pages/pda/components/searchPopup.vue'
 	import {
 		getWorkOrderList,
@@ -118,9 +120,7 @@
 		},
 		data() {
 			return {
-				clientEnvironmentId:
-					uni.getStorageSync("userInfo") &&
-					uni.getStorageSync("userInfo").clientEnvironmentId,
+				clientEnvironmentId: uni.getStorageSync("userInfo") &&uni.getStorageSync("userInfo").clientEnvironmentId,
 				groupId: null,
 				formData: {},
 				orderTitle: '',
@@ -168,6 +168,16 @@
 							value: 0
 						}
 					},
+					{
+						name: '检修',
+						type: 'service',
+						workOrderType: 7,
+						index: 2,
+						url: `/pages/maintenance/detail/detail?`,
+						badge: {
+							value: 0
+						}
+					},
 					// {
 					// 	name: '量具送检工单',
 					// 	type: 'quantity',
@@ -182,7 +192,7 @@
 						name: '维修工单',
 						type: 'repair',
 						workOrderType: 3,
-						index: 2,
+						index: 3,
 						// url: `/pages/maintain_service/detail/detail?`,
 						url: `/pages/maintenanceWorkorder/detail/detail?`,
 						badge: {
@@ -193,7 +203,7 @@
 						name: '生产工单',
 						type: 'production',
 						workOrderType: 6,
-						index: 3,
+						index:4,
 						// url: `/pages/maintain_service/detail/detail?`,
 						url: `/pages/pda/workOrder/extrusionMolding/index?`,
 						badge: {
@@ -204,7 +214,7 @@
 						name: '质检工单',
 						type: 'quality',
 						workOrderType: 7,
-						index: 4,
+						index: 5,
 						// url: `/pages/maintain_service/detail/detail?`,
 						url: ``,
 						badge: {
@@ -215,7 +225,7 @@
 						name: '盘点工单',
 						type: 'stocktaking',
 						workOrderType: 8,
-						index: 5,
+						index: 6,
 						// url: `/pages/maintain_service/detail/detail?`,
 						url: `/pages/warehouse/workOrder/inventory/inventory?`,
 						badge: {
@@ -288,6 +298,19 @@
 						// 	text: '完成'
 						// }
 					],
+					service: [{
+							value: 0,
+							text: '待接收'
+						},
+						{
+							value: 2,
+							text: '执行中'
+						}
+						// {
+						// 	value: 3,
+						// 	text: '完成'
+						// }
+					],
 					patrol: [{
 							value: 0,
 							text: '待接收'
@@ -301,6 +324,7 @@
 						// 	text: '完成'
 						// }
 					],
+
 					quantity: [{
 							value: 0,
 							text: '待接收'
@@ -354,6 +378,7 @@
 					quality: [],
 					stocktaking: [],
 					production: [],
+					service: [],
 				},
 				searchFrom: {
 					code: '',
@@ -363,11 +388,22 @@
 				isInstall: true, // 是否首次进入页面
 				orderType: 1,
 				codeData: [],
-				groupTabs: [
-					{ label: '全部', groupId: null },
-					{ label: '5号站', groupId: '2008729845612720129' },
-					{ label: '6号站', groupId: '2008729929536548865' },
-					{ label: '7号站', groupId: '2008730320160468994' }
+				groupTabs: [{
+						label: '全部',
+						groupId: null
+					},
+					{
+						label: '5号站',
+						groupId: '2008729845612720129'
+					},
+					{
+						label: '6号站',
+						groupId: '2008729929536548865'
+					},
+					{
+						label: '7号站',
+						groupId: '2008730320160468994'
+					}
 				],
 			}
 		},
@@ -513,9 +549,9 @@
 			handleDetail(item) {
 				let url = this.tabList[this.activeIndex]?.url
 				if (!url) return
-				if(this.activeType == 'stocktaking') {
+				if (this.activeType == 'stocktaking') {
 					url += `id=${item.id}&status=${item.status}`
-				} else if(this.activeType == 'production') {
+				} else if (this.activeType == 'production') {
 					url += `id=${item.id}&title=${item.taskName}&singleReport=${item.singleReport}`
 				} else {
 					// url += `id=${item.id}&workOrderCode=${item.workOrderCode}&BizType=${item.bizType}`
@@ -540,7 +576,7 @@
 				this.page = 1
 				this.reset()
 				this.searchShow = false
-				if(this.activeType == 'quality'){
+				if (this.activeType == 'quality') {
 					this.$nextTick(() => {
 						this.$refs.inspectionWorkListRef.getList()
 					})
@@ -573,6 +609,10 @@
 							case 'check':
 								badgeValue = data.checkNum
 								break
+							case 'service':
+								badgeValue = data.serviceNum
+								break
+
 						}
 						return {
 							...item,
@@ -601,7 +641,7 @@
 				// })
 			},
 			getList() {
-				if(this.activeType == 'quality'){
+				if (this.activeType == 'quality') {
 					return
 				}
 				uni.showLoading({
@@ -613,35 +653,35 @@
 
 				const userInfo = uni.getStorageSync('userInfo')
 
-				if(this.activeType == 'production'){
+				if (this.activeType == 'production') {
 					let statusList = []
-					if(this.orderType == 1){
+					if (this.orderType == 1) {
 						statusList = [4, 5, 7]
 					} else {
 						statusList = [6, 10]
 					}
 					workorderMyPage({
-						pageNum: this.page,
-						size: 10,
-						...this.searchFrom,
-						statusList: statusList,
-						workCenterIds: userInfo.workCenterIds
-					})
-					.then(res => {
-						console.log('workorderMyPage~~~', res)
-						
-						if (res.list?.length > 0) {
-							this.dataList = this.dataList.concat(res.list)
-							isEnd = this.dataList.length >= res.count
-						} else {
-							this.dataList = []
-						}
-						console.log(this.dataList)
-						uni.hideLoading()
-					})
-					
-				} else if(this.activeType == 'stocktaking'){
-					
+							pageNum: this.page,
+							size: 10,
+							...this.searchFrom,
+							statusList: statusList,
+							workCenterIds: userInfo.workCenterIds
+						})
+						.then(res => {
+							console.log('workorderMyPage~~~', res)
+
+							if (res.list?.length > 0) {
+								this.dataList = this.dataList.concat(res.list)
+								isEnd = this.dataList.length >= res.count
+							} else {
+								this.dataList = []
+							}
+							console.log(this.dataList)
+							uni.hideLoading()
+						})
+
+				} else if (this.activeType == 'stocktaking') {
+
 					getPlanOrderList({
 						pageNum: this.page,
 						size: 10,
@@ -669,50 +709,50 @@
 						size: 10,
 						...this.searchFrom,
 					}
-				// 维修
-				if (this.tabList[this.activeIndex].workOrderType == 3) {
-					// let userInfo = uni.getStorageSync('userInfo')
-					// params.executeUserId = userInfo.userId
-					if (this.orderType == 1) {
-						if (!params.orderStatus.includes(3)) {
-							// params.orderStatus.push(3)
-						}
-					}
-				} else {
-					if (this.orderType == 1) {
-						if (params.orderStatus.includes(3)) {
-							let index = params.orderStatus.indexOf(3)
-							params.orderStatus.splice(index, 1)
+					// 维修
+					if (this.tabList[this.activeIndex].workOrderType == 3) {
+						// let userInfo = uni.getStorageSync('userInfo')
+						// params.executeUserId = userInfo.userId
+						if (this.orderType == 1) {
+							if (!params.orderStatus.includes(3)) {
+								// params.orderStatus.push(3)
+							}
 						}
 					} else {
-						params.orderStatus = [3]
+						if (this.orderType == 1) {
+							if (params.orderStatus.includes(3)) {
+								let index = params.orderStatus.indexOf(3)
+								params.orderStatus.splice(index, 1)
+							}
+						} else {
+							params.orderStatus = [3]
+						}
 					}
-				}
 
 
-				if(this.activeType == 'patrol' && this.groupId) {
-					params.teamId = this.groupId
-				}
-				
-				console.log('params~~~', params);
-				getWorkOrderList(params)
-					.then(res => {
-						if (res.list?.length > 0 && params.type === this.tabList[this.activeIndex].workOrderType) {
-							// if (params.page === 1) {
-							// 	this.dataList = []
-							// }
-							// this.dataList.push(...res.data.list.records)
-							this.dataList = this.dataList.concat(res.list)
-							isEnd = this.dataList.length >= res.count
-						} else {
-							this.dataList = []
-						}
-						console.log(this.dataList)
-						uni.hideLoading()
-					})
-					.catch(() => {
-						uni.hideLoading()
-					})
+					if ((this.activeType == 'patrol' || this.activeType == 'service') && this.groupId) {
+						params.teamId = this.groupId
+					}
+
+					console.log('params~~~', params);
+					getWorkOrderList(params)
+						.then(res => {
+							if (res.list?.length > 0 && params.type === this.tabList[this.activeIndex].workOrderType) {
+								// if (params.page === 1) {
+								// 	this.dataList = []
+								// }
+								// this.dataList.push(...res.data.list.records)
+								this.dataList = this.dataList.concat(res.list)
+								isEnd = this.dataList.length >= res.count
+							} else {
+								this.dataList = []
+							}
+							console.log(this.dataList)
+							uni.hideLoading()
+						})
+						.catch(() => {
+							uni.hideLoading()
+						})
 				}
 
 			}

+ 54 - 50
pages/index/index.vue

@@ -150,7 +150,8 @@
 				<CellTip title="生产安全"></CellTip>
 				<view class="nav">
 					<view class="nav-content">
-						<view class="nav-item" v-for="(item, index) in productionSafetyManagement" @click="toNav(item.path)">
+						<view class="nav-item" v-for="(item, index) in productionSafetyManagement"
+							@click="toNav(item.path)">
 							<span :class="'iconfont ' + item.icon"></span>
 							<i class="badge" v-if="item.badge">{{ item.badge }}</i>
 							<label>{{ item.name }}</label>
@@ -171,7 +172,7 @@
 					</view>
 				</view>
 			</view>
-		</view> 
+		</view>
 	</view>
 </template>
 
@@ -210,9 +211,9 @@
 				pcsList: [],
 				// 导航相关
 				moduleNavList: [],
-				energyManagement:[],
+				energyManagement: [],
 				//安全生产
-				productionSafetyManagement:[],
+				productionSafetyManagement: [],
 				scrollIntoViewId: "",
 				currentNavIndex: 0,
 				moduleObserver: null,
@@ -256,26 +257,28 @@
 					})
 					.exec();
 			},
-			getStatistics() {
-				// 获取工单统计数
-				statistics()
-					.then((res) => {
-						this.workOrder = res;
-						this.operationsList.forEach((item) => {
-							if (item.name == "保养工单") item.badge = res.maintenanceNum;
-							if (item.name == "巡点检工单") item.badge = res.patrolInspection;
-							if (item.name == "维修工单") item.badge = res.repairsNum;
-						});
-					})
-					.finally(() => {
-						this.timer = setTimeout(() => {
-							this.getStatistics();
-						}, 12000);
-					});
-				
-			},
+			// getStatistics() {
+			// 	// 获取工单统计数
+			// 	statistics()
+			// 		.then((res) => {
+			// 			this.workOrder = res;
+			// 			this.operationsList.forEach((item) => {
+			// 				if (item.name == "保养工单") item.badge = res.maintenanceNum;
+			// 				if (item.name == "巡点检工单") item.badge = res.patrolInspection;
+			// 				if (item.name == "维修工单") item.badge = res.repairsNum;
+			// 				if (item.name == "检修工单") item.badge = res.serviceNum;
+
+			// 			});
+			// 		})
+			// 		.finally(() => {
+			// 			this.timer = setTimeout(() => {
+			// 				this.getStatistics();
+			// 			}, 12000);
+			// 		});
+
+			// },
 			getBrages() {
-				 qualityTodoByPda().then((res) => {
+				qualityTodoByPda().then((res) => {
 					console.log(2)
 					this.qmsList.forEach((item) => {
 						if (item.name == "质检工单") item.badge = res.workOrderNum;
@@ -287,7 +290,7 @@
 					});
 					// this.qmsList = f.children;
 				});
-				
+
 				statistics()
 					.then((res) => {
 						this.workOrder = res;
@@ -295,6 +298,7 @@
 							if (item.name == "保养工单") item.badge = res.maintenanceNum;
 							if (item.name == "巡点检工单") item.badge = res.patrolInspection;
 							if (item.name == "维修工单") item.badge = res.repairsNum;
+							if (item.name == "检修工单") item.badge = res.serviceNum;
 						});
 					})
 			},
@@ -313,15 +317,15 @@
 							this.productionList = f.children;
 						} else if (f.path == "operationsList") {
 							// const promise = statistics().then((res) => {
-								// console.log(3)
-								// this.workOrder = res;
-								// f.children.forEach((item) => {
-								// 	if (item.name == "保养工单") item.badge = res.maintenanceNum;
-								// 	if (item.name == "巡点检工单")
-								// 		item.badge = res.patrolInspection;
-								// 	if (item.name == "维修工单") item.badge = res.repairsNum;
-								// });
-								this.operationsList = f.children;
+							// console.log(3)
+							// this.workOrder = res;
+							// f.children.forEach((item) => {
+							// 	if (item.name == "保养工单") item.badge = res.maintenanceNum;
+							// 	if (item.name == "巡点检工单")
+							// 		item.badge = res.patrolInspection;
+							// 	if (item.name == "维修工单") item.badge = res.repairsNum;
+							// });
+							this.operationsList = f.children;
 							// });
 							// asyncPromises.push(promise);
 						} else if (f.path == "warehouseManagement") {
@@ -343,16 +347,16 @@
 							this.purchaseManageList = f.children;
 						} else if (f.path == "qualityManage") {
 							// const promise = qualityTodoByPda().then((res) => {
-								// console.log(2)
-								// f.children.forEach((item) => {
-								// 	if (item.name == "质检工单") item.badge = res.workOrderNum;
-								// 	if (item.name == "我的质检工单")
-								// 		item.badge = res.myWorkOrderNum;
-								// 	if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
-								// 	if (item.name == "我的受托单")
-								// 		item.badge = res.myRequestEntrustNum;
-								// });
-								this.qmsList = f.children;
+							// console.log(2)
+							// f.children.forEach((item) => {
+							// 	if (item.name == "质检工单") item.badge = res.workOrderNum;
+							// 	if (item.name == "我的质检工单")
+							// 		item.badge = res.myWorkOrderNum;
+							// 	if (item.name == "我的任务单") item.badge = res.myTaskMonadNum;
+							// 	if (item.name == "我的受托单")
+							// 		item.badge = res.myRequestEntrustNum;
+							// });
+							this.qmsList = f.children;
 							// });
 							// asyncPromises.push(promise);
 						} else if (f.path == "productionControlManagement") {
@@ -442,7 +446,7 @@
 					.filter(([key]) => this[key]?.length > 0)
 					.map(([, value]) => value);
 
-				
+
 			},
 			// 点击导航跳转 - 使用动态获取的顶部高度进行精确定位
 			goToModule(item, index) {
@@ -511,12 +515,12 @@
 								url: `/pages/traceability/scanCode/index?id=${id}`,
 							});
 							return;
-						} else if(scanResult && scanResult.includes("/pages/warehouse/hwQrcode/index")) {
-              uni.navigateTo({
-                url: `${scanResult}`,
-              });
-              return
-            }
+						} else if (scanResult && scanResult.includes("/pages/warehouse/hwQrcode/index")) {
+							uni.navigateTo({
+								url: `${scanResult}`,
+							});
+							return
+						}
 						_this.scantoRouter(scanResult);
 					},
 				});

+ 1 - 1
pages/maintenance/check/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="保养中" @clickLeft="back">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="检查中" @clickLeft="back">
 			<!-- <view class="nav-right" slot="right">
         <view class="text-box" @click="goRegister"> 备件使用登记 </view>
       </view> -->

+ 8 - 66
pages/maintenance/detail/detail.vue

@@ -4,7 +4,7 @@
       fixed="true"
       statusBar="true"
       left-icon="back"
-      title="保养工单详情"
+      title="工单详情"
       @clickLeft="back"
       @clickRight="HandlScanCode"
     ></uni-nav-bar>
@@ -22,7 +22,7 @@
             <text class="kd-content">{{ worksheetInfo.code }}</text>
           </view>
           <view class="kd-cell">
-            <text class="kd-label">保养名称</text>
+            <text class="kd-label">名称</text>
             <text class="kd-content">{{ worksheetInfo.planName }}</text>
           </view>
           <view class="kd-cell">
@@ -30,7 +30,7 @@
             <text class="kd-content">{{ worksheetInfo.categoryName }}</text>
           </view>
           <view class="kd-cell">
-            <text class="kd-label">保养设备总数</text>
+            <text class="kd-label">设备总数</text>
             <text class="kd-content text-warning"
               >{{ worksheetInfo.finishNum }}/{{ worksheetInfo.total }}</text
             >
@@ -211,7 +211,7 @@
                       "
                       @click="checkDetail(item)"
                     >
-                      保养详情
+                      详情
                     </button>
                   </view>
                 </view>
@@ -222,65 +222,7 @@
         <view class="spare-parts" v-if="active == 2">
           <pickCard :list="sparePartsApply" />
         </view>
-        <!-- 	<view class="spare-parts" v-show="active === 2">
-					<Step>
-						<StepItem v-for="(item, index) in repairInfoLogList" :key="index" :active="index == 0" :hideContent="Boolean(item.content)">
-							<template v-slot:header>
-								<view class="step-title">
-									<view class="s1">{{ typeOptions[item.type] }}</view>
-									<view class="s2">
-										{{ item.createTime }}
-									</view>
-								</view>
-							</template>
-							<template v-slot:content v-if="item.content">
-								<view class="list-xs" v-if="item.type == 'CREATE'">
-									<view class="list-xs-item">
-										<view class="label">报修人</view>
-										<view class="value">
-											{{ logs[item.id] ? logs[item.id].content.requestUserName : '' }}
-										</view>
-									</view>
-									<view class="list-xs-item">
-										<view class="label">故障描述</view>
-										<view class="value">
-											{{ logs[item.id] ? logs[item.id].content.remark : '' }}
-										</view>
-									</view>
-								</view>
-								<view class="list-xs" v-else-if="item.type == 'SPARE_PARTS_APPLY'">
-									<view class="list-xs-item">
-										<view class="label">申领清单</view>
-										<view class="value bjsymx" @click="handlbjsymx('备件明细', item.content.infoList)">备件使用明细</view>
-									</view>
-								</view>
-								<view class="list-xs" v-else-if="item.type == 'ACCEPTANCE_CHEK'">
-									<view class="list-xs-item">
-										<view class="label">验收人</view>
-										<view class="value">
-											{{ logs[item.id] ? logs[item.id].content.userName : '' }}
-										</view>
-									</view>
-									<view class="list-xs-item">
-										<view class="label">验收结果</view>
-										<view class="value">
-											{{ logs[item.id] ? (logs[item.id].content.orderStatus == 4 ? '通过' : '驳回') : '' }}
-										</view>
-									</view>
-								</view>
-								<view class="list-xs" v-else-if="item.type == 'WORK_REPORT'">
-									<view class="list-xs-item">
-										<view class="label">处理说明</view>
-										<view class="value">
-											{{ logs[item.id] ? logs[item.id].content.reason : '' }}
-										</view>
-									</view>
-								</view>
-							</template>
-						</StepItem>
-					</Step>
-					<PopSparePart ref="PopSparePart" :workOrderCode="workOrderCode" :noRequest="true"></PopSparePart>
-				</view> -->
+
       </view>
     </view>
     <uni-popup ref="inputDialog" type="dialog">
@@ -343,7 +285,7 @@ export default {
   },
   data() {
     return {
-      tabList: ["基本信息", "保养设备", "备品备件"],
+      tabList: ["基本信息", "设备", "备品备件"],
       typeOptions: {
         CREATE: "生成工单",
         SPARE_PARTS_APPLY: "备品备件申请",
@@ -484,7 +426,7 @@ export default {
       if (this.worksheetInfo.status.code === 0) {
         uni.showModal({
           title: "提示",
-          content: "工单未开启执行,不可进行保养操作,请先点击“开始执行”!",
+          content: "工单未开启执行,不可进行操作,请先点击“开始执行”!",
           confirmText: "开始执行", //这块是确定按钮的文字
           cancelText: "取消", //这块是取消的文字
           success: function (res) {
@@ -601,7 +543,7 @@ export default {
     handleReport() {
       if (this.worksheetInfo.finishNum !== this.worksheetInfo.total) {
         uni.showToast({
-          title: "请完成巡检设备检查",
+          title: "请完成设备检查",
           icon: "none",
         });
         this.active = 1;

+ 4 - 1
pages/maintenance/order/OrderTask.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content_box">
 		<!-- 站号筛选 -->
-		<view class="group-tab-bar rx-sc">
+		<view class="group-tab-bar rx-sc" v-if="clientEnvironmentId==10">
 			<view class="group-tab-item" v-for="(tab, idx) in groupTabs" :key="idx"
 				:class="{ active: groupId === tab.groupId }" @click="switchGroup(tab.groupId)">
 				{{ tab.label }}
@@ -69,6 +69,9 @@
 		},
 		data() {
 			return {
+				clientEnvironmentId:
+					uni.getStorageSync("userInfo") &&
+					uni.getStorageSync("userInfo").clientEnvironmentId,
 				groupTabs: [
 					{ label: '全部', groupId: null },
 					{ label: '5号站', groupId: '2008729845612720129' },

+ 243 - 0
pages/maintenance/service/OrderTask.vue

@@ -0,0 +1,243 @@
+<template>
+	<view class="content_box">
+		<!-- 站号筛选 -->
+		<!-- <view class="group-tab-bar rx-sc"  v-if="clientEnvironmentId == 10">
+			<view class="group-tab-item" v-for="(tab, idx) in groupTabs" :key="idx"
+				:class="{ active: groupId === tab.groupId }" @click="switchGroup(tab.groupId)">
+				{{ tab.label }}
+			</view>
+		</view> -->
+		<view class="list_box marginTop">
+			<u-list>
+				<u-list-item v-for="(item, index) in list" :key="index">
+					<view class="card_box" @click="goDetail(item)">
+						<view class="item_box flex_between">
+							<view class="rx-sc">
+								<view class="round">{{Number(index)+1}}</view>
+								<view class="orderId">{{item.code}} </view>
+							</view>
+							<view class="state">
+								{{ dict.status[item.orderStatus] }}
+							</view>
+						</view>
+						<view class="item_box rx-bc">
+							<view class="item_one perce50 rx-sc">
+								<view class="lable">设备名称:</view>
+								<view class="deviceName">{{item.deviceName}}</view>
+							</view>
+						</view>
+						<view class="item_box rx-bc">
+							<view class="item_one perce50 rx-sc">
+								<view class="lable">规则名称:</view>
+								<view>{{item.ruleName}}</view>
+							</view>
+						</view>
+						<view class="item_box rx-bc">
+							<view class="item_one perce50 rx-sc">
+								<view class="lable">截止时间:</view>
+								<view>{{item.planFinishTime}}</view>
+							</view>
+						</view>
+					</view>
+				</u-list-item>
+				<u-list-item v-if="list.length === 0">
+					<view style='margin-top: 20vh;'>
+						<u-empty iconSize='150' textSize='32' text='暂无工单'>
+						</u-empty>
+					</view>
+				</u-list-item>
+
+			</u-list>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			type: {
+				type: [String, Number]
+			},
+			list: {
+				type: Array,
+				default: () => []
+			},
+			groupId: {
+				type: [String, Number],
+				default: null
+			}
+		},
+		data() {
+			return {
+				clientEnvironmentId:
+					uni.getStorageSync("userInfo") &&
+					uni.getStorageSync("userInfo").clientEnvironmentId,
+				groupTabs: [
+					{ label: '全部', groupId: null },
+					{ label: '5号站', groupId: '2008729845612720129' },
+					{ label: '6号站', groupId: '2008729929536548865' },
+					{ label: '7号站', groupId: '2008730320160468994' }
+				],
+				dict: {
+					status: {
+						0: '待接收',
+						2: '执行中',
+						3: '已完成'
+					},
+					//紧急程度
+					urgent: {
+						1: '普通',
+						2: '紧急',
+						3: '重要'
+					}
+				}
+			}
+		},
+		methods: {
+			goDetail(item) {
+				uni.navigateTo({
+					url: `/pages/maintenance/detail/detail?id=${item.id}&planId=${item.planId}&code=${item.code}&&orderType=7`
+				})
+			},
+			switchGroup(groupId) {
+				this.$emit('changeGroup', groupId)
+			},
+			isClass() {
+				switch (String(this.type)) {
+					case '0':
+						return 'd1'
+						break
+					case '1':
+						return 'd2'
+						break
+					case '3':
+						return 'd3'
+						break
+					default:
+						break
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.group-tab-bar {
+		background: #fff;
+		padding: 16rpx 32rpx;
+		border-bottom: 2rpx solid #e1e1e1;
+		gap: 16rpx;
+	}
+
+	.group-tab-item {
+		padding: 8rpx 24rpx;
+		font-size: 28rpx;
+		color: #666;
+		border-radius: 32rpx;
+		background: #f5f5f5;
+		white-space: nowrap;
+
+		&.active {
+			background: $theme-color;
+			color: #fff;
+		}
+	}
+
+	.marginTop {
+		border-top: 20rpx solid $page-bg;
+	}
+
+	// .content_box {
+	// 	height: 100vh;
+	// 	overflow: hidden;
+	// 	display: flex;
+	// 	flex-direction: column;
+	// 	background-color: $page-bg;
+	// }
+
+	.list_box {
+		flex: 1;
+		overflow: hidden;
+		padding: 16rpx 0;
+
+		.u-list {
+			height: 100% !important;
+		}
+	}
+
+	.card_box {
+		width: 750rpx;
+		padding: 16rpx 32rpx;
+		box-sizing: border-box;
+		border-bottom: 2rpx solid #E1E1E1;
+
+
+		.item_box {
+			margin-top: 10rpx;
+
+
+
+			.round {
+				width: 40rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 50%;
+				background: $theme-color;
+				color: #fff;
+				text-align: center;
+				font-size: 20rpx;
+			}
+
+			.orderId {
+				color: #000;
+				font-family: PingFang HK;
+				font-size: 28rpx;
+				font-style: normal;
+				font-weight: 600;
+				margin-left: 16rpx;
+			}
+
+			.item_one {
+				width: 100%;
+				font-size: 26rpx;
+				font-style: normal;
+				font-weight: 400;
+				line-height: 38rpx;
+				word-wrap: break-word;
+				.lable {
+					width: 150rpx;
+				}
+				
+				.deviceName {
+					width: calc(750rpx - 150rpx);
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+				}
+			}
+
+			.gylx {
+				color: $theme-color;
+			}
+
+			.perce50 {
+				width: 100%;
+			}
+		}
+
+		.flex_between {
+			display: flex;
+			justify-content: space-between;
+		}
+	}
+
+	.state {
+		font-size: 28rpx;
+		color: #7f7f7f;
+		background: #f1f1f1;
+		display: inline;
+		padding: 2px 5px;
+		border-radius: 10px;
+	}
+</style>

+ 434 - 0
pages/maintenance/service/order.vue

@@ -0,0 +1,434 @@
+<template>
+	<view>
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="检修工单" @clickLeft="back"></uni-nav-bar>
+
+		<view class="search-box">
+			<uni-section>
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchForm.code"
+					placeholder="工单编号">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+			<!-- <image class="menu_icon" @click="showSearch" src="~@/static/pda/menu.svg"></image> -->
+		</view>
+
+
+		<view v-show="showTab">
+			<view class="top-wrapper">
+				<view class="tab_box rx-sc">
+					<view class="tab_item" v-for="(item,index) in tabList" :key="index"
+						:class="{active: pickTabIndex == index}">
+						<view @click="changeChartsTab(index)" class="badge-c">
+							{{item.label}}
+							<u-badge max="99" :value="item.number" absolute></u-badge>
+
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+        <OrderTask v-for="(item, index) in tabList" :key="index" v-show="index === pickTabIndex" :list="item.list"
+            :type="tabList.value" :groupId="groupId" @changeGroup="onChangeGroup"></OrderTask>
+
+		<u-toast ref="uToast"></u-toast>
+
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch" ref="mySearchRef"></MySearch>
+	</view>
+</template>
+
+<script>
+	import {
+		isObjectEmpty
+	} from '@/utils/utils.js'
+	import {
+		getWorkOrderList,
+		getRuleList,
+		workPage
+	} from '@/api/myTicket'
+	import OrderTask from './OrderTask.vue'
+	import {
+		post,
+		postJ
+	} from '@/utils/api.js'
+
+	export default {
+		components: {
+			OrderTask
+		},
+		computed: {
+
+		},
+		data() {
+			return {
+				showTab: true,
+				page: 1,
+				size: 10,
+				isEnd: false,
+				tabList: [{
+						value: 0,
+						label: '待接收',
+						list: [],
+						number: 0
+					},
+					{
+						value: 2,
+						label: '执行中',
+						list: [],
+						number: 0
+					},
+					{
+						value: 3,
+						label: '已完成',
+						list: [],
+						number: 0
+					},
+					{
+						value: 4,
+						label: '全部',
+						list: [],
+						isNone: !this.$isAuthorities('eam:maintenance:listAll'),
+						number: 0
+					}
+				].filter(item => !item.isNone),
+
+				pickTabIndex: 0,
+				qrContent: null,
+				barType: 0,
+                searchShow: false,
+                searchForm: {
+                    code: ''
+                },
+                groupId: null,
+				formItems: [{
+						label: '规则名称:',
+						prop: 'ruleId',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'name',
+							dataValue: 'id'
+						}
+					},
+					{
+						label: '时间:',
+						prop: 'startEndTime',
+						component: 'MyDateRange',
+						props: {
+							type: 'daterange',
+						}
+					}
+				]
+			}
+		},
+		onLoad() {
+			this.getRuleList()
+		},
+		onShow() {
+			this.getFirstList()
+			this.getStatus()
+		},
+		onReachBottom() {
+			this.getList()
+		},
+		methods: {
+			getStatus() {
+				getWorkOrderList({
+					orderStatus: [0],
+					type: 7,
+					pageNum: 1,
+					size: 1
+				}).then(res => {
+					this.tabList[0].number = res.count
+				})
+				getWorkOrderList({
+					orderStatus: [2],
+					type: 7,
+					pageNum: 1,
+					size: 1
+				}).then(res => {
+					this.tabList[1].number = res.count
+				})
+
+			},
+			getCount() {
+				statistics().then(data => {
+					console.log('onsole.log(data)-----------')
+					console.log(data)
+					this.tabList = this.tabList.map(item => {
+						// switch (item.value) {
+						// 	case '0':
+						// 		return {
+						// 			...item, badge: {
+						// 				value: data.maintenanceNum
+						// 			}
+						// 		}
+						// 	case '2':
+						// 		return {
+						// 			...item, badge: {
+						// 				value: data.patrolInspection
+						// 			}
+						// 		}
+						// 	case '3':
+						// 		return {
+						// 			...item, badge: {
+						// 				value: data.quantityNum
+						// 			}
+						// 		}
+						// 	case '4':
+						// 		return {
+						// 			...item, badge: {
+						// 				value: data.repairsNum
+						// 			}
+						// 		}
+						// }
+					})
+				})
+			},
+			getFirstList: function() {
+				this.page = 1
+				this.isEnd = false
+				this.getList()
+			},
+
+			getList() {
+				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
+					return
+				}
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
+                let params = {
+                    orderStatus: [this.tabList[this.pickTabIndex].value],
+                    type: 7,
+                    pageNum: this.page,
+                    size: this.size,
+                    ...this.searchForm
+                }
+                if (this.groupId) {
+                    params.teamId = this.groupId
+                }
+				if (!this.showTab || this.pickTabIndex == 3) {
+					delete params.orderStatus
+				}
+				let api = this.pickTabIndex == 3 ? workPage : getWorkOrderList
+				api(params)
+					.then(res => {
+
+						if (this.page == 1) {
+							this.$set(this.tabList[this.pickTabIndex], 'list', res.list)
+							// this.tabList[this.pickTabIndex].list = res.list
+						} else {
+							this.tabList[this.pickTabIndex].list.push(...res.list);
+						}
+						console.log(this.tabList[this.pickTabIndex])
+						this.page += 1
+						this.isEnd = this.tabList[this.pickTabIndex].list.length >= res.count
+						uni.hideLoading()
+					})
+					.catch(() => {
+						uni.hideLoading()
+					})
+			},
+            changeChartsTab(index) {
+                this.pickTabIndex = index
+                this.groupId = null
+                this.getFirstList()
+            },
+            onChangeGroup(groupId) {
+                this.groupId = groupId
+                this.getFirstList()
+            },
+			async getRuleList() {
+				let params = {
+					status: 1,
+					type: 7,
+					pageNum: 1,
+					size: -1
+				}
+				const res = await getRuleList(params)
+				this.formItems.find(item => item.prop === 'ruleId').props.localdata = res
+			},
+			clearSearch() {
+				this.searchForm.code = ''
+				this.doSearch()
+			},
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.showTab = isObjectEmpty(this.searchForm)
+				this.getList();
+			},
+			showSearch() {
+				this.searchShow = true
+			},
+			confirmSearch(e) {
+				console.log(e);
+				let data = JSON.parse(JSON.stringify(e))
+				this.searchForm = {
+					...this.searchForm,
+					...data
+				}
+				console.log(this.searchForm);
+				this.doSearch()
+			},
+
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.top-wrapper {
+		display: flex;
+		align-items: center;
+		background-color: #fff;
+		position: relative;
+
+		.tab_box {
+			width: 100%;
+			height: 68rpx;
+
+
+			.tab_item {
+				height: 68rpx;
+				line-height: 68rpx;
+				padding: 0 20rpx;
+				font-size: 32rpx;
+				// color: #979C9E;
+
+			}
+
+			.active {
+				box-sizing: border-box;
+				border-bottom: 6rpx solid $theme-color;
+				color: $theme-color;
+			}
+
+
+		}
+	}
+
+	.badge-c {
+		position: relative;
+	}
+
+	/deep/.u-badge {
+		top: 0;
+		right: 0;
+		transform: translate(90%, 20%);
+	}
+
+
+	// .tab-title {
+	// 	position: fixed;
+	// 	z-index: 99;
+	// 	width: 100%;
+	// 	padding: 10rpx;
+	// 	// display: flex;
+	// 	// justify-content: space-between;
+	// 	height: $tab-height;
+	// 	line-height: $tab-height;
+	// 	background-color: #ffffff;
+	// 	border-bottom: 1px solid #f2f2f2;
+	// 	// box-sizing: border-box;
+	// 	white-space: nowrap;
+	// 	overflow: auto hidden;
+	// 	display: flex;
+
+	// 	&::-webkit-scrollbar {
+	// 		/*滚动条整体样式*/
+	// 		width: 10px;
+	// 		/*高宽分别对应横竖滚动条的尺寸*/
+	// 		height: 1px;
+	// 	}
+
+	// 	&::-webkit-scrollbar-thumb {
+	// 		/*滚动条里面小方块*/
+	// 		border-radius: 10px;
+	// 		-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+	// 		background: #535353;
+	// 	}
+
+	// 	&::-webkit-scrollbar-track {
+	// 		/*滚动条里面轨道*/
+	// 		-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+	// 		border-radius: 10px;
+	// 		background: #ededed;
+	// 	}
+
+	// 	.tab-item {
+	// 		flex: 1;
+	// 		text-align: center;
+	// 		display: inline-block;
+	// 		font-size: 32rpx;
+	// 		color: $uni-text-color-grey;
+	// 	}
+
+	// 	.tab-item.active {
+	// 		color: $j-primary-border-green;
+	// 		border-bottom: 1px solid $j-primary-border-green;
+	// 	}
+
+	// 	.title-num {
+	// 		font-size: 26rpx;
+	// 	}
+
+
+	// }
+
+	// .title-red {
+	// 	display: inline-block;
+	// 	font-size: 22rpx;
+	// 	padding: 0 10rpx;
+	// 	border-radius: 50rpx;
+	// 	color: #ffffff;
+	// 	background: red;
+	// 	line-height: 38rpx;
+	// 	position: absolute;
+	// 	top: 10rpx;
+	// 	min-width: 18rpx;
+	// }
+
+	.search-box {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+		justify-content: space-between;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
+</style>

+ 1 - 1
pages/pcs/components/OrderListDialog.vue

@@ -43,7 +43,7 @@
 </template>
 
 <script>
-	import myCard from './myCard.vue';
+	import myCard from '@/components/myCard.vue';
 	import {
 		getPurchaseOrderList
 	} from '@/api/purchasingManage/index.js'

+ 1 - 1
pages/pcs/components/batchRevokeDialog.vue

@@ -41,7 +41,7 @@
 </template>
 
 <script>
-	import myCard from './myCard.vue';
+	import myCard from '@/components/myCard.vue';
 	import {
 		producetaskrulerecordQueryRecordWorkOrderPage,
 		batchRevokeOrder,

+ 0 - 378
pages/pcs/components/myCard.vue

@@ -1,378 +0,0 @@
-<template>
-  <view class="card_container">
-    <view class="card_box">
-      <!-- 标题区域 -->
-      <view class="header_box" v-if="title">
-        <view class="title_left">
-          <view class="round" v-if="index">{{ index }}</view>
-          <view class="orderId" :style="{ marginLeft: index ? '16rpx' : '' }">{{
-            title
-          }}</view>
-        </view>
-        <!-- 状态标签 -->
-        <view class="status-tag" v-if="status">{{ status }}</view>
-        <!-- 单选/多选控件 -->
-        <view class="select-tag" v-if="showRadio" @click.stop>
-          <!-- 单选模式:使用 u-radio-group(每个卡片独立,互斥) -->
-          <u-radio-group
-            v-if="selectionMode === 'single'"
-            v-model="radioValueModel"
-            placement="row"
-            @change="handleRadioChange"
-          >
-            <u-radio
-              :name="item.id"
-              :iconSize="44"
-              activeColor="#3c9cff"
-              :labelSize="0"
-            ></u-radio>
-          </u-radio-group>
-          <!-- 多选模式:使用独立 u-checkbox,由父组件控制选中状态 -->
-          <u-checkbox
-            v-else
-            :name="item.id"
-            :checked="isChecked"
-            :iconSize="44"
-            activeColor="#3c9cff"
-            :labelSize="0"
-            @change="handleCheckboxChange"
-          ></u-checkbox>
-        </view>
-      </view>
-
-      <!-- 内容区域(与原代码相同,省略...) -->
-      <view class="item_box rx-bc" v-for="(_item, i) in columns" :key="i">
-        <template v-for="val in _item">
-          <view
-            class="perce50"
-            :class="[val.className, { 'full-width': val.isFullWidth }]"
-            :style="val.style"
-            :key="val.prop"
-            v-if="!val.isNone"
-          >
-            <view class="item_one rx-sc" v-if="val.type == 'action'">
-              <view class="lable">{{ val.label }}</view>
-              <view class="text" style="flex-wrap: wrap">
-                <template v-for="(btn, bI) in btnList">
-                  <u-button
-                    :plain="true"
-                    :hairline="true"
-                    size="mini"
-                    :type="btn.btnType"
-                    v-if="judge(btn)"
-                    :text="btn.name"
-                    @click="action(btn)"
-                    :key="bI"
-                  ></u-button>
-                </template>
-              </view>
-            </view>
-            <view class="item_one rx-sc kk" v-else>
-              <view class="lable">{{ val.label }}</view>
-              <view class="text" :class="val.valueClass" v-if="val.formatter">{{
-                val.formatter(item) || ''
-              }}</view>
-              <view class="text" :class="val.valueClass" v-else-if="val.slot">
-                <slot :name="val.slot"></slot>
-              </view>
-              <view class="text" :class="val.valueClass" v-else>{{
-                item[val.prop] || ''
-              }}</view>
-            </view>
-          </view>
-        </template>
-      </view>
-
-      <view class="footer-link" v-if="showDetail" @click="goDetail">
-        <text>查看详情</text>
-        <u-icon name="arrow-right" size="24" color="#999999"></u-icon>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-export default {
-  props: {
-    btnList: { type: Array, default: () => [] },
-    item: { type: Object, default: () => ({}) },
-    columns: { type: Array, default: () => [] },
-    title: { type: String, default: '' },
-    status: { type: String, default: '' },
-    index: { type: [String, Number], default: '' },
-    showDetail: { type: Boolean, default: true },
-    showRadio: { type: Boolean, default: false },
-    radioValue: { type: [String, Number], default: null },
-    selectionMode: { type: String, default: 'single' }, // 'single' or 'multiple'
-    checkboxValue: { type: Array, default: () => [] },   // 父组件传入的选中ID数组
-  },
-  computed: {
-    judge() {
-      return (item) => {
-        if (item.judge) {
-          let is = true;
-          item.judge.forEach(({ key, value, authorities, fn }) => {
-            if (authorities) {
-              is = this.$isAuthorities(authorities);
-            }
-            if (value && !value.includes(this.item[key])) {
-              is = false;
-            }
-            if (fn) {
-              is = fn(this.item);
-            }
-          });
-          return is;
-        } else {
-          return true;
-        }
-      };
-    },
-    // 单选模式下的绑定值
-    radioValueModel: {
-      get() {
-        return this.radioValue;
-      },
-      set(val) {
-        if (val === this.item.id) {
-          this.$emit('radioChange', this.item);
-        }
-      },
-    },
-    // 多选模式下的选中状态(根据 checkboxValue 数组判断)
-    isChecked() {
-      return this.checkboxValue.includes(this.item.id);
-    },
-  },
-  methods: {
-    action(item) {
-      if (item.type == 1) {
-        uni.navigateTo({
-          url: item.pageUrl + '?id=' + this.item.id + (item.query || ''),
-        });
-      } else {
-        this.$emit(item.apiName);
-      }
-    },
-    goDetail() {
-      this.$emit('goDetail', this.item);
-    },
-    handleRadioChange(val) {
-      if (val === this.item.id) {
-        this.$emit('radioChange', this.item);
-      }
-    },
-    // 多选:点击 checkbox 时,通知父组件变更
-    handleCheckboxChange(e) {
-      this.$emit('checkboxChange', {
-        checked: e,        // e 为 boolean,表示当前 checkbox 是否被选中
-        item: this.item,
-      });
-    },
-  },
-};
-</script>
-<style lang="scss" scoped>
-.card_container {
-  padding: 16rpx 0;
-}
-
-.card_box {
-  background: #ffffff;
-  border-radius: 24rpx;
-  padding: 24rpx;
-  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
-  position: relative;
-
-  .rx-bc {
-    display: flex;
-    align-items: flex-start;
-    flex-flow: row wrap;
-
-    > view {
-      margin-top: 24rpx;
-
-      &:first-child,
-      &:nth-child(2) {
-        margin-top: 0;
-      }
-    }
-  }
-
-  .rx-sc {
-    display: flex;
-    align-items: flex-start;
-  }
-
-  .header_box {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    width: 100%;
-    position: relative;
-    background: linear-gradient(135deg, #eef5ff 0%, #f5f9ff 100%);
-    padding: 20rpx 24rpx;
-    border-radius: 20rpx 20rpx 0 0;
-    margin: -24rpx -24rpx 24rpx -24rpx;
-    width: calc(100% + 48rpx);
-    box-sizing: border-box;
-
-    .round {
-      width: 44rpx;
-      height: 44rpx;
-      line-height: 44rpx;
-      border-radius: 50%;
-      background: $theme-color;
-      color: #fff;
-      text-align: center;
-      font-size: 24rpx;
-      font-weight: 600;
-      flex-shrink: 0;
-    }
-
-    .orderId {
-      color: #1f2b3c;
-      font-size: 30rpx;
-      font-weight: 600;
-      white-space: nowrap;
-      overflow: hidden;
-      text-overflow: ellipsis;
-    }
-
-    .title_left {
-      display: flex;
-      align-items: center;
-      flex: 1;
-      padding-right: 120rpx;
-      overflow: hidden;
-    }
-
-    .status-tag {
-      background: #e3f2fd;
-      color: #2196f3;
-      font-size: 24rpx;
-      padding: 6rpx 20rpx;
-      border-radius: 30rpx;
-      font-weight: 500;
-      position: absolute;
-      top: 50%;
-      transform: translateY(-50%);
-      right: 24rpx;
-      z-index: 1;
-    }
-
-    .select-tag {
-      position: absolute;
-      top: 50%;
-      transform: translateY(-50%);
-      right: 24rpx;
-      z-index: 2;
-      background: transparent;
-
-      /deep/ .u-radio-group,
-      /deep/ .u-checkbox-group {
-        .u-radio,
-        .u-checkbox {
-          padding: 0;
-          margin-right: 0;
-        }
-      }
-    }
-  }
-
-  .item_box {
-    .text {
-      display: flex;
-      flex: 1;
-
-      uni-button:after {
-        border: none;
-      }
-
-      uni-button {
-        width: 100rpx;
-        margin-left: 10rpx;
-        margin-right: 0;
-        color: #fff !important;
-        border: none;
-        background: #157a2c;
-        margin-top: 3px;
-      }
-    }
-
-    .kk .text {
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-      display: block;
-    }
-
-    .item_one {
-      width: 100%;
-      font-size: 28rpx;
-      line-height: 44rpx;
-      display: flex;
-      align-items: flex-start;
-
-      .lable {
-        color: #8e9aae;
-        flex-shrink: 0;
-        margin-right: 16rpx;
-        font-size: 26rpx;
-      }
-
-      .text {
-        color: #1f2b3c;
-        font-size: 28rpx;
-        flex: 1;
-        white-space: nowrap;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        min-width: 0;
-
-        &.highlight {
-          color: #4caf50;
-        }
-      }
-    }
-
-    .perce50 {
-      width: 50%;
-      box-sizing: border-box;
-      padding-right: 20rpx;
-
-      &:nth-child(2n) {
-        padding-right: 0;
-        padding-left: 20rpx;
-      }
-    }
-
-    .perce100 {
-      width: 100%;
-    }
-
-    .full-width {
-      width: 100% !important;
-      padding-left: 0 !important;
-      padding-right: 0 !important;
-    }
-  }
-
-  .footer-link {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-top: 24rpx;
-    padding-top: 20rpx;
-    border-top: 2rpx solid #f0f2f5;
-    color: #8e9aae;
-    font-size: 28rpx;
-    cursor: pointer;
-    gap: 8rpx;
-
-    &:active {
-      opacity: 0.7;
-    }
-  }
-}
-</style>

+ 2 - 1
pages/pcs/list.vue

@@ -74,7 +74,8 @@
 
 <script>
 	import dictMixns from "@/mixins/dictMixins";
-	import myCard from "./components/myCard.vue";
+	import myCard from "@/components/myCard.vue";
+
 	import Assign from "./components/Assign.vue";
 	import workOrderReport from "./components/workOrderReport.vue";
 	import batchRevokeDialog from "./components/batchRevokeDialog.vue";

+ 734 - 771
pages/qms/inspectionWork/sampleList.vue

@@ -1,89 +1,62 @@
 <!-- 样品列表页面 -->
 <template>
-  <view class="mainBox">
-    <uni-nav-bar
-      fixed="true"
-      statusBar="true"
-      left-icon="back"
-      :title="title"
-      @clickLeft="handleClose"
-    >
-    </uni-nav-bar>
-
-    <!-- <view class="nav-placeholder"></view> -->
-
-    <view class="wrapper">
-      <scroll-view class="scroll-wrapper" scroll-y>
-        <view class="sample-list">
-          <view
-            class="sample-item"
-            v-for="(sample, sampleIndex) in projectId
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" @clickLeft="handleClose">
+		</uni-nav-bar>
+
+		<!-- <view class="nav-placeholder"></view> -->
+
+		<view class="wrapper">
+			<scroll-view class="scroll-wrapper" scroll-y>
+				<view class="sample-list">
+					<view class="sample-item" v-for="(sample, sampleIndex) in projectId
               ? tableData.filter((item) => item.id == projectId)
-              : tableData"
-            :key="sampleIndex"
-          >
-            <view class="sample-header" @click="toggleExpand(sampleIndex)">
-              <view class="sample-info">
-                <view class="info-row">
-                  <text class="label">编码:</text>
-                  <text class="value">{{ sample.categoryCode }}</text>
-                </view>
-                <view class="info-row">
-                  <text class="label">名称:</text>
-                  <text class="value">{{ sample.categoryName }}</text>
-                </view>
-                <view class="info-row" v-if="sample.batchNo">
-                  <text class="label">批次号:</text>
-                  <text class="value">{{ sample.batchNo }}</text>
-                </view>
-                <view class="info-row" v-if="sample.packageNo">
-                  <text class="label">包装编码:</text>
-                  <text class="value">{{ sample.packageNo }}</text>
-                </view>
-              </view>
-              <view
-                class="expand-arrow"
-                :class="{ expanded: expandedItems[sampleIndex] }"
-                >›</view
-              >
-            </view>
-
-            <view
-              class="quality-table-wrapper"
-              v-if="expandedItems[sampleIndex]"
-            >
-              <scroll-view class="quality-table-scroll" scroll-x>
-                <view class="quality-table">
-                  <view class="table-header">
-                    <view class="table-cell">质检项名称</view>
-                    <view class="table-cell">质检内容</view>
-                    <view class="table-cell">质检结果</view>
-                    <view class="table-cell">质检方案编码</view>
-                    <view class="table-cell">质检方案名称</view>
-                    <view class="table-cell">质检类型</view>
-                    <view class="table-cell">工艺参数</view>
-                  </view>
-                  <view class="table-body">
-                    <view
-                      class="table-row"
-                      v-for="(
+              : tableData" :key="sampleIndex">
+						<view class="sample-header" @click="toggleExpand(sampleIndex)">
+							<view class="sample-info">
+								<view class="info-row">
+									<text class="label">编码:</text>
+									<text class="value">{{ sample.categoryCode }}</text>
+								</view>
+								<view class="info-row">
+									<text class="label">名称:</text>
+									<text class="value">{{ sample.categoryName }}</text>
+								</view>
+								<view class="info-row" v-if="sample.batchNo">
+									<text class="label">批次号:</text>
+									<text class="value">{{ sample.batchNo }}</text>
+								</view>
+								<view class="info-row" v-if="sample.packageNo">
+									<text class="label">包装编码:</text>
+									<text class="value">{{ sample.packageNo }}</text>
+								</view>
+							</view>
+							<view class="expand-arrow" :class="{ expanded: expandedItems[sampleIndex] }">›</view>
+						</view>
+
+						<view class="quality-table-wrapper" v-if="expandedItems[sampleIndex]">
+							<scroll-view class="quality-table-scroll" scroll-x>
+								<view class="quality-table">
+									<view class="table-header">
+										<view class="table-cell">质检项名称</view>
+										<view class="table-cell">质检内容</view>
+										<view class="table-cell">质检结果</view>
+										<view class="table-cell">质检方案编码</view>
+										<view class="table-cell">质检方案名称</view>
+										<view class="table-cell">质检类型</view>
+										<view class="table-cell">工艺参数</view>
+									</view>
+									<view class="table-body">
+										<view class="table-row" v-for="(
                         quality, qualityIndex
-                      ) in sample.qualitySampleTemplateList"
-                      :key="qualityIndex"
-                    >
-                      <view class="table-cell">
-                        <text
-                          class="cell-text"
-                          :class="{ warn: quality.qualityResults === 2 }"
-                          >{{ quality.inspectionName }}</text
-                        >
-                      </view>
-                      <view class="table-cell">
-                        <u-input
-                          v-model="quality.qualityResultContent"
-                          placeholder="请输入"
-                          border="none"
-                          @change="
+                      ) in sample.qualitySampleTemplateList" :key="qualityIndex">
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.inspectionName }}</text>
+											</view>
+											<view class="table-cell">
+												<u-input v-model="quality.qualityResultContent" placeholder="请输入"
+													border="none" @change="
                             clientEnvironmentId == 10
                               ? newHandleInput(
                                   sample.qualitySampleTemplateList,
@@ -94,111 +67,81 @@
                                   quality.qualityResultContent,
                                   tableData,
                                 )
-                          "
-                          :class="{ warn: quality.qualityResults === 2 }"
-                          :disabled="
+                          " :class="{ warn: quality.qualityResults === 2 }" :disabled="
                             type === 'detail' ||
                             ((!pageName || pageName == 'myList') &&
                               sample.correlationId)
-                          "
-                        >
-                          <template #suffix v-if="quality.unitName">
-                            <text class="unit">{{ quality.unitName }}</text>
-                          </template>
-                        </u-input>
-                      </view>
-                      <view
-                        class="table-cell"
-                        v-if="
+                          ">
+													<template #suffix v-if="quality.unitName">
+														<text class="unit">{{ quality.unitName }}</text>
+													</template>
+												</u-input>
+											</view>
+											<view class="table-cell" v-if="
                           ['炉水电导率', '给水电导率'].includes(
                             quality.inspectionName,
                           )
-                        "
-                      ></view>
-                      <view class="table-cell" v-else>
-                        <u-input
-                          disabled
-                          placeholder=" "
-                          v-if="
+                        "></view>
+											<view class="table-cell" v-else>
+												<u-input disabled placeholder=" " v-if="
                             type === 'detail' ||
                             ((!pageName || pageName == 'myList') &&
                               sample.correlationId)
-                          "
-                          border="surround"
-                          :value="
+                          " border="surround" :value="
                             quality.qualityResults &&
                             qualityResultsList.find(
                               (item) => item.value == quality.qualityResults,
                             ).text
-                          "
-                        >
-                        </u-input>
-                        <uni-data-picker
-                          v-else
-                          v-model="quality.qualityResults"
-                          placeholder="请选择"
-                          :localdata="qualityResultsList"
-                          @change="qualityResultsListChange(tableData)"
-                          :clear-icon="false"
-                        >
-                        </uni-data-picker>
-                      </view>
-                      <view class="table-cell">
-                        <text
-                          class="cell-text"
-                          :class="{ warn: quality.qualityResults === 2 }"
-                          >{{ quality.qualitySchemeTemplateCode }}</text
-                        >
-                      </view>
-                      <view class="table-cell">
-                        <text
-                          class="cell-text"
-                          :class="{ warn: quality.qualityResults === 2 }"
-                          >{{ quality.qualitySchemeTemplateName }}</text
-                        >
-                      </view>
-                      <view class="table-cell">
-                        <text
-                          class="cell-text"
-                          :class="{ warn: quality.qualityResults === 2 }"
-                          >{{ quality.categoryLevelClassName }}</text
-                        >
-                      </view>
-                      <view class="table-cell parameter-cell">
-                        <text
-                          class="cell-text"
-                          :class="{ warn: quality.qualityResults === 2 }"
-                        >
-                          <text v-if="quality.textType == 3">
-                            {{ quality.symbol }}
-                            {{ quality.minValue }}-{{ quality.maxValue }}
-                          </text>
-                          <text v-else-if="quality.textType == 8">
-                            标准值:{{ quality.defaultValue
+                          ">
+												</u-input>
+												<uni-data-picker v-else v-model="quality.qualityResults"
+													placeholder="请选择" :localdata="qualityResultsList"
+													@change="qualityResultsListChange(tableData)" :clear-icon="false">
+												</uni-data-picker>
+											</view>
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.qualitySchemeTemplateCode }}</text>
+											</view>
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.qualitySchemeTemplateName }}</text>
+											</view>
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.categoryLevelClassName }}</text>
+											</view>
+											<view class="table-cell parameter-cell">
+												<text class="cell-text" :class="{ warn: quality.qualityResults === 2 }">
+													<text v-if="quality.textType == 3">
+														{{ quality.symbol }}
+														{{ quality.minValue }}-{{ quality.maxValue }}
+													</text>
+													<text v-else-if="quality.textType == 8">
+														标准值:{{ quality.defaultValue
                             }}{{ quality.unitName || "" }} 下限:{{
                               quality.minValue || 0
                             }}{{ quality.unitName || "" }} 上限:{{
                               quality.minValue || 0
                             }}{{ quality.unitName || "" }}
-                          </text>
-                          <text v-else>
-                            {{ quality.symbol }} {{ quality.defaultValue }}
-                          </text>
-                          <text v-if="quality.textType != 8">
-                            {{ quality.unitName }}</text
-                          >
-                        </text>
-                      </view>
-                    </view>
-                  </view>
-                </view>
-              </scroll-view>
-            </view>
-
-            <view class="quality-summary" v-if="sample.qualityResults">
-              <view style="min-width: 10px; margin-left: 16rpx">
-                <text>
-                  {{
+													</text>
+													<text v-else>
+														{{ quality.symbol }} {{ quality.defaultValue }}
+													</text>
+													<text v-if="quality.textType != 8">
+														{{ quality.unitName }}</text>
+												</text>
+											</view>
+										</view>
+									</view>
+								</view>
+							</scroll-view>
+						</view>
+
+						<view class="quality-summary" v-if="sample.qualityResults">
+							<view style="min-width: 10px; margin-left: 16rpx">
+								<text>
+									{{
                     sample.status == 1
                       ? "已检"
                       : sample.status == 2
@@ -207,611 +150,631 @@
                           ? "已请托"
                           : "待检"
                   }}
-                </text>
-              </view>
-              <view>
-                <text class="summary-label">样品质检结果:</text>
-                <text
-                  class="summary-value"
-                  :class="getQualityResultClass(sample.qualityResults)"
-                >
-                  {{ formatQualityResult(sample.qualityResults) }}
-                </text>
-              </view>
-            </view>
-          </view>
-
-          <view class="empty-state" v-if="!tableData || tableData.length === 0">
-            <text>暂无数据</text>
-          </view>
-        </view>
-      </scroll-view>
-
-      <view style="height: 84rpx"></view>
-      <view class="footerButton">
-        <u-button @click="handleClose" type="default" text="返回"></u-button>
-        <u-button
-          v-if="type != 'view' && !isCorrelationId && workData.status != 1"
-          type="primary"
-          @click="save"
-          text="保存"
-        ></u-button>
-      </view>
-    </view>
-    <u-toast ref="uToast"></u-toast>
-  </view>
+								</text>
+							</view>
+							<view>
+								<text class="summary-label">样品质检结果:</text>
+								<text class="summary-value" :class="getQualityResultClass(sample.qualityResults)">
+									{{ formatQualityResult(sample.qualityResults) }}
+								</text>
+							</view>
+						</view>
+					</view>
+
+					<view class="empty-state" v-if="!tableData || tableData.length === 0">
+						<text>暂无数据</text>
+					</view>
+				</view>
+			</scroll-view>
+
+			<view style="height: 84rpx"></view>
+			<view class="footerButton">
+				<u-button @click="handleClose" type="default" text="返回"></u-button>
+				<u-button v-if="type != 'view' && !isCorrelationId && workData.status != 1&&clientEnvironmentId!=10" type="primary" @click="save"
+					text="保存"></u-button>
+				<u-button v-if="type != 'view' && !isCorrelationId && workData.status != 1&&clientEnvironmentId==10" type="primary" @click="exeReportWork"
+					text="报工"></u-button>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
 </template>
 
 <script>
-import {
-  getById,
-  update,
-  queryQualityInventory,
-} from "@/api/inspectionWork/index.js";
-import { handleInput, qualityResultsListChange } from "./unit.js";
-export default {
-  components: {},
-  data() {
-    return {
-      title: "样品列表",
-      rowIndex: 0,
-      type: "",
-      pageName: "",
-      tableData: [],
-      handleInput,
-      qualityResultsListChange,
-      isCorrelationId: false,
-      expandedItems: {},
-      workData: {},
-      inventoryList: [],
-      projectId: "",
-      qualityResultsList: [
-        {
-          text: "合格",
-          value: 1,
-        },
-        {
-          text: "不合格",
-          value: 2,
-        },
-        {
-          text: "让步接收",
-          value: 3,
-        },
-      ],
-    };
-  },
-  onLoad(data) {
-    if (data.workId) {
-      this.projectId = data.projectId;
-      this.type = data.type || "";
-      this.pageName = data.pageName || "";
-	  this.clientEnvironmentId =uni.getStorageSync("userInfo").clientEnvironmentId
-      getById(data.workId).then((res) => {
-        this.workData = res;
-        if (data.projectId) {
-          const qualitySampleList = res.qualitySampleList.filter(
-            (item) => item.id == data.projectId,
-          );
-
-          if (
-            qualitySampleList[0].correlationId &&
-            ![
-              "myInspectionProjectEntrusted",
-              "myInspectionProjectTask",
-            ].includes(this.pageName)
-          ) {
-            this.isCorrelationId = true;
-          } else {
-            qualitySampleList[0].status = 1;
-          }
-        } else {
-          this.isCorrelationId = true;
-          res.qualitySampleList.forEach((item) => {
-            if (
-              !item.correlationId ||
-              [
-                "myInspectionProjectEntrusted",
-                "myInspectionProjectTask",
-              ].includes(this.pageName)
-            ) {
-              this.isCorrelationId = false;
-              item.status = 1;
-            }
-          });
-        }
-
-        this.tableData = res.qualitySampleList.map((item) => {
-          if (
-            !item.qualitySampleTemplateList.length &&
-            res.templateList.length
-          ) {
-            item.qualitySampleTemplateList = JSON.parse(
-              JSON.stringify(res.templateList),
-            );
-          }
-
-          return item;
-        });
-      });
-
-      this.expandedItems = {};
-      this.getQueryQualityInventory(data.workId);
-    }
-  },
-  methods: {
-    async getQueryQualityInventory(workId) {
-      const res = await queryQualityInventory({
-        qualityWorkerId: workId,
-        size: -1,
-      });
-
-      if (res.list.length > 0) {
-        this.inventoryList = res.list;
-      }
-    },
-    handleClose() {
-      uni.navigateBack();
-    },
-
-    handleConfirm() {
-      this.tableData.forEach((item) => {
-        if (!this.pageName && item.correlationId) {
-          return;
-        }
-        item.status = 1;
-      });
-
-      const pages = getCurrentPages();
-      const prevPage = pages[pages.length - 2];
-      if (prevPage) {
-        prevPage.$vm.handleConfirm &&
-          prevPage.$vm.handleConfirm(this.tableData, this.rowIndex);
-      }
-
-      uni.navigateBack();
-    },
-
-    toggleExpand(index) {
-      this.$set(this.expandedItems, index, !this.expandedItems[index]);
-    },
-    setNum() {
-      let sampleQualifiedNumber = 0; //  样品合格数
-      let sampleNoQualifiedNumber = 0; //  样品不合格数
-      let sampleQualificationRate = 0; //样品合格率
-      let sampleNoQualificationRate = 0; //样品不合格率
-
-      let qualifiedNumber = 0; // 合格数
-      let noQualifiedNumber = 0; //  不合格数
-      let qualificationRate = 0; //  合格率
-      let noQualificationRate = 0; //不合格率
-
-      this.tableData.forEach((item) => {
-        if (item.qualityResults == 2) {
-          sampleNoQualifiedNumber += item.measureQuantity;
-        }
-      });
-      sampleQualifiedNumber =
-        this.workData.sampleQuantity - sampleNoQualifiedNumber;
-
-      sampleQualificationRate =
-        ((sampleQualifiedNumber / this.workData.sampleQuantity) * 100).toFixed(
-          2,
-        ) || "";
-      sampleNoQualificationRate =
-        (
-          (sampleNoQualifiedNumber / this.workData.sampleQuantity) *
-          100
-        ).toFixed(2) || "";
-      if (this.workData.qualityMode == 2 && this.workData.qualityResults == 2) {
-        qualifiedNumber = sampleQualifiedNumber;
-        noQualifiedNumber = this.workData.total - sampleQualifiedNumber;
-      } else {
-        qualifiedNumber = this.workData.total - sampleNoQualifiedNumber;
-        noQualifiedNumber = sampleNoQualifiedNumber;
-      }
-
-      qualificationRate =
-        ((qualifiedNumber / this.workData.total) * 100).toFixed(2) || "";
-      noQualificationRate =
-        ((noQualifiedNumber / this.workData.total) * 100).toFixed(2) || "";
-      this.workData.sampleQualifiedNumber = sampleQualifiedNumber;
-      this.workData.sampleNoQualifiedNumber = sampleNoQualifiedNumber;
-      this.workData.sampleQualificationRate = sampleQualificationRate;
-      this.workData.sampleNoQualificationRate = sampleNoQualificationRate;
-      this.workData.qualifiedNumber = qualifiedNumber;
-      this.workData.noQualifiedNumber = noQualifiedNumber;
-      this.workData.qualificationRate = qualificationRate;
-      this.workData.noQualificationRate = noQualificationRate;
-      // qualityMode
-    },
-    /* 保存编辑 */
-    save() {
-      this.workData.isUpdate = 1;
-      this.setNum();
-      let params = {
-        ...this.workData,
-        sampleList: this.tableData,
-        planTemplateList: this.workData.templateList,
-        templateList: this.workData.templateList,
-        qualityInventoryList: this.inventoryList,
-      };
-
-      update(params)
-        .then((msg) => {
-          uni.$emit("successInit");
-          this.back();
-        })
-        .catch((e) => {});
-    },
-    formatQualityResult(value) {
-      const map = {
-        1: "合格",
-        2: "不合格",
-        3: "让步接收",
-      };
-      return map[value] || "";
-    },
-    //宇信特殊处理
-    newHandleInput(arr, index) {
-      let num = arr.find(
-        (item) => item.inspectionName == "炉水电导率",
-      )?.qualityResultContent;
-      let num1 = arr.find(
-        (item) => item.inspectionName == "给水电导率",
-      )?.qualityResultContent;
-      console.log(num, num1);
-
-      arr.forEach((item, i) => {
-        if (num && num1 && item.inspectionName == "干度值") {
-          let val = parseFloat((((num - num1 / 1000) / num) * 100).toFixed(5));
-          this.$set(
-            this.tableData[index].qualitySampleTemplateList[i],
-            "qualityResultContent",
-            val,
-          );
-
-          this.handleInput(item, val, this.tableData);
-        }
-      });
-    },
-    getQualityResultClass(value) {
-      return {
-        1: "result-pass",
-        2: "result-fail",
-        3: "result-concession",
-      }[value];
-    },
-  },
-};
+	import {
+		getById,
+		update,
+		queryQualityInventory,
+		exeReportWork
+	} from "@/api/inspectionWork/index.js";
+	import {
+		handleInput,
+		qualityResultsListChange
+	} from "./unit.js";
+	import dayjs from "dayjs";
+	export default {
+		components: {},
+		data() {
+			return {
+				title: "样品列表",
+				rowIndex: 0,
+				type: "",
+				pageName: "",
+				tableData: [],
+				handleInput,
+				qualityResultsListChange,
+				isCorrelationId: false,
+				expandedItems: {},
+				workData: {},
+				inventoryList: [],
+				projectId: "",
+				qualityResultsList: [{
+						text: "合格",
+						value: 1,
+					},
+					{
+						text: "不合格",
+						value: 2,
+					},
+					{
+						text: "让步接收",
+						value: 3,
+					},
+				],
+			};
+		},
+		onLoad(data) {
+			if (data.workId) {
+				this.projectId = data.projectId;
+				this.type = data.type || "";
+				this.pageName = data.pageName || "";
+				this.clientEnvironmentId = uni.getStorageSync("userInfo").clientEnvironmentId
+				getById(data.workId).then((res) => {
+					this.workData = res;
+					if (data.projectId) {
+						const qualitySampleList = res.qualitySampleList.filter(
+							(item) => item.id == data.projectId,
+						);
+
+						if (
+							qualitySampleList[0].correlationId &&
+							![
+								"myInspectionProjectEntrusted",
+								"myInspectionProjectTask",
+							].includes(this.pageName)
+						) {
+							this.isCorrelationId = true;
+						} else {
+							qualitySampleList[0].status = 1;
+						}
+					} else {
+						this.isCorrelationId = true;
+						res.qualitySampleList.forEach((item) => {
+							if (
+								!item.correlationId || [
+									"myInspectionProjectEntrusted",
+									"myInspectionProjectTask",
+								].includes(this.pageName)
+							) {
+								this.isCorrelationId = false;
+								item.status = 1;
+							}
+						});
+					}
+
+					this.tableData = res.qualitySampleList.map((item) => {
+						if (
+							!item.qualitySampleTemplateList.length &&
+							res.templateList.length
+						) {
+							item.qualitySampleTemplateList = JSON.parse(
+								JSON.stringify(res.templateList),
+							);
+						}
+
+						return item;
+					});
+				});
+
+				this.expandedItems = {};
+				this.getQueryQualityInventory(data.workId);
+			}
+		},
+		methods: {
+			async getQueryQualityInventory(workId) {
+				const res = await queryQualityInventory({
+					qualityWorkerId: workId,
+					size: -1,
+				});
+
+				if (res.list.length > 0) {
+					this.inventoryList = res.list;
+				}
+			},
+			handleClose() {
+				uni.navigateBack();
+			},
+
+			handleConfirm() {
+				this.tableData.forEach((item) => {
+					if (!this.pageName && item.correlationId) {
+						return;
+					}
+					item.status = 1;
+				});
+
+				const pages = getCurrentPages();
+				const prevPage = pages[pages.length - 2];
+				if (prevPage) {
+					prevPage.$vm.handleConfirm &&
+						prevPage.$vm.handleConfirm(this.tableData, this.rowIndex);
+				}
+
+				uni.navigateBack();
+			},
+
+			toggleExpand(index) {
+				this.$set(this.expandedItems, index, !this.expandedItems[index]);
+			},
+			setNum() {
+				let sampleQualifiedNumber = 0; //  样品合格数
+				let sampleNoQualifiedNumber = 0; //  样品不合格数
+				let sampleQualificationRate = 0; //样品合格率
+				let sampleNoQualificationRate = 0; //样品不合格率
+
+				let qualifiedNumber = 0; // 合格数
+				let noQualifiedNumber = 0; //  不合格数
+				let qualificationRate = 0; //  合格率
+				let noQualificationRate = 0; //不合格率
+
+				this.tableData.forEach((item) => {
+					if (item.qualityResults == 2) {
+						sampleNoQualifiedNumber += item.measureQuantity;
+					}
+				});
+				sampleQualifiedNumber =
+					this.workData.sampleQuantity - sampleNoQualifiedNumber;
+
+				sampleQualificationRate =
+					((sampleQualifiedNumber / this.workData.sampleQuantity) * 100).toFixed(
+						2,
+					) || "";
+				sampleNoQualificationRate =
+					(
+						(sampleNoQualifiedNumber / this.workData.sampleQuantity) *
+						100
+					).toFixed(2) || "";
+				if (this.workData.qualityMode == 2 && this.workData.qualityResults == 2) {
+					qualifiedNumber = sampleQualifiedNumber;
+					noQualifiedNumber = this.workData.total - sampleQualifiedNumber;
+				} else {
+					qualifiedNumber = this.workData.total - sampleNoQualifiedNumber;
+					noQualifiedNumber = sampleNoQualifiedNumber;
+				}
+
+				qualificationRate =
+					((qualifiedNumber / this.workData.total) * 100).toFixed(2) || "";
+				noQualificationRate =
+					((noQualifiedNumber / this.workData.total) * 100).toFixed(2) || "";
+				this.workData.sampleQualifiedNumber = sampleQualifiedNumber;
+				this.workData.sampleNoQualifiedNumber = sampleNoQualifiedNumber;
+				this.workData.sampleQualificationRate = sampleQualificationRate;
+				this.workData.sampleNoQualificationRate = sampleNoQualificationRate;
+				this.workData.qualifiedNumber = qualifiedNumber;
+				this.workData.noQualifiedNumber = noQualifiedNumber;
+				this.workData.qualificationRate = qualificationRate;
+				this.workData.noQualificationRate = noQualificationRate;
+				// qualityMode
+			},
+			/* 保存编辑 */
+			save() {
+				this.workData.isUpdate = 1;
+				this.setNum();
+				let params = {
+					...this.workData,
+					sampleList: this.tableData,
+					planTemplateList: this.workData.templateList,
+					templateList: this.workData.templateList,
+					qualityInventoryList: this.inventoryList
+				};
+
+				update(params)
+					.then((msg) => {
+						uni.$emit("successInit");
+						this.back();
+					})
+					.catch((e) => {});
+			},
+			exeReportWork() {
+				this.workData.isUpdate = 1;
+				this.tableData.qualityTimeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss');
+				this.workData.executeUserId = uni.getStorageSync("userInfo").userId
+				this.workData.executeUserName = uni.getStorageSync("userInfo").name
+				this.workData.qualityResults=this.tableData[0].qualityResults
+				this.setNum();
+				let params = {
+					...this.workData,
+					sampleList: this.tableData,
+					planTemplateList: this.workData.templateList,
+					templateList: this.workData.templateList,
+					qualityInventoryList: this.inventoryList,
+				};
+
+				exeReportWork(params)
+					.then((msg) => {
+						uni.$emit("successInit");
+						this.back();
+					})
+					.catch((e) => {});
+			},
+			formatQualityResult(value) {
+				const map = {
+					1: "合格",
+					2: "不合格",
+					3: "让步接收",
+				};
+				return map[value] || "";
+			},
+			//宇信特殊处理
+			newHandleInput(arr, index) {
+				let num = arr.find(
+					(item) => item.inspectionName == "炉水电导率",
+				)?.qualityResultContent;
+				let num1 = arr.find(
+					(item) => item.inspectionName == "给水电导率",
+				)?.qualityResultContent;
+				console.log(num, num1);
+
+				arr.forEach((item, i) => {
+					if (num && num1 && item.inspectionName == "干度值") {
+						let val = parseFloat((((num - num1 / 1000) / num) * 100).toFixed(5));
+						this.$set(
+							this.tableData[index].qualitySampleTemplateList[i],
+							"qualityResultContent",
+							val,
+						);
+
+						this.handleInput(item, val, this.tableData);
+					}
+				});
+			},
+			getQualityResultClass(value) {
+				return {
+					1: "result-pass",
+					2: "result-fail",
+					3: "result-concession",
+				} [value];
+			},
+		},
+	};
 </script>
 
 <style lang="scss" scoped>
-.mainBox {
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-  background-color: #f3f8fb;
-}
-
-.nav-placeholder {
-  height: calc(var(--status-bar-height, 0px) + 44px);
-}
-
-.wrapper {
-  flex: 1;
-  display: flex;
-  flex-direction: column;
-  overflow: hidden;
-}
-
-.scroll-wrapper {
-  flex: 1;
-  height: 0;
-  padding: 20rpx;
-
-  .sample-list {
-    padding-bottom: 20rpx;
-
-    .sample-item {
-      background: #fff;
-      border-radius: 30rpx;
-      margin-bottom: 20rpx;
-      overflow: hidden;
-      //   box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
-      //   border: 1rpx solid #f0f0f0;
-
-      .quality-summary {
-        padding: 24rpx;
-        background: #fff;
-        border-top: 1rpx solid #f5f3f3;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        font-size: 28rpx;
-        font-weight: bold;
-
-        .summary-label {
-          color: #333;
-          margin-right: 20rpx;
-        }
-
-        .summary-value {
-          padding: 8rpx 20rpx;
-          border-radius: 8rpx;
-
-          &.result-pass {
-            color: #52c41a;
-            background: #f6ffed;
-          }
-
-          &.result-fail {
-            color: #ff4d4f;
-            background: #fff2f0;
-          }
-
-          &.result-concession {
-            color: #faad14;
-            background: #fffbe6;
-          }
-        }
-      }
-
-      .empty-state {
-        padding: 100rpx 0;
-        text-align: center;
-        font-size: 28rpx;
-        color: #999;
-      }
-
-      .sample-header {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        padding: 40rpx 40rpx 20rpx 40rpx;
-        background: #ffffff;
-        box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
-
-        .sample-info {
-          flex: 1;
-        }
-
-        .info-row {
-          display: flex;
-          margin-bottom: 8rpx;
-
-          &:last-child {
-            margin-bottom: 0;
-          }
-
-          .label {
-            font-size: 28rpx;
-            color: #333;
-
-            font-weight: 800;
-
-            margin-right: 10rpx;
-            min-width: 120rpx;
-          }
-
-          .value {
-            font-size: 26rpx;
-            color: #333;
-            flex: 1;
-            font-weight: 800;
-          }
-        }
-
-        .expand-arrow {
-          font-size: 40rpx;
-          color: #999;
-          margin-left: 20rpx;
-          transform: rotate(0deg);
-          transition: transform 0.3s;
-          background: #fff;
-          width: 48rpx;
-          height: 48rpx;
-          border-radius: 50%;
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
-
-          &.expanded {
-            transform: rotate(90deg);
-          }
-        }
-      }
-
-      .quality-table-wrapper {
-        // margin: 20rpx;
-        margin-top: 0;
-        // border-radius: 12rpx;
-        overflow: hidden;
-        // box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
-      }
-
-      // 自定义滚动条样式
-      ::v-deep .quality-table-scroll ::-webkit-scrollbar {
-        width: 6rpx;
-        height: 6rpx;
-      }
-
-      ::v-deep .quality-table-scroll ::-webkit-scrollbar-track {
-        background: #f1f1f1;
-        border-radius: 3rpx;
-      }
-
-      ::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb {
-        background: #c1c1c1;
-        border-radius: 3rpx;
-      }
-
-      ::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb:hover {
-        background: #a8a8a8;
-      }
-
-      ::v-deep .table-cell:last-child::-webkit-scrollbar {
-        width: 4rpx;
-      }
-
-      ::v-deep .table-cell:last-child::-webkit-scrollbar-track {
-        background: #f9f9f9;
-        border-radius: 2rpx;
-      }
-
-      ::v-deep .table-cell:last-child::-webkit-scrollbar-thumb {
-        background: #d9d9d9;
-        border-radius: 2rpx;
-      }
-
-      .quality-table-scroll {
-        width: 100%;
-      }
-
-      .quality-table {
-        min-width: 100%;
-        width: 1540rpx;
-        background: #fff;
-      }
-
-      .table-header {
-        display: flex;
-        background: #f5f5f5;
-        border-bottom: 2rpx solid #e5e5e5;
-
-        .table-cell {
-          padding: 24rpx 12rpx;
-          font-size: 26rpx;
-          font-weight: bold;
-          color: #333;
-          text-align: center;
-          border-right: 1rpx solid #e5e5e5;
-          white-space: nowrap;
-          flex-shrink: 0;
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          background: #f5f5f5;
-          width: 200rpx;
-
-          &:last-child {
-            border-right: none;
-            background: #f5f5f5;
-          }
-
-          &:nth-child(2) {
-            width: 260rpx;
-          }
-
-          &:nth-child(3) {
-            width: 220rpx;
-          }
-
-          &:nth-child(7) {
-            width: 260rpx;
-          }
-        }
-      }
-
-      .table-body {
-        .table-row {
-          display: flex;
-          border-bottom: 1rpx solid #e5e5e5;
-          transition: background 0.2s;
-
-          &:nth-child(even) {
-            // background: #fafafa;
-          }
-
-          &:last-child {
-            border-bottom: none;
-          }
-
-          .table-cell {
-            padding: 20rpx 12rpx;
-            font-size: 24rpx;
-            // color: #666;
-            text-align: center;
-            border-right: 1rpx solid #e5e5e5;
-            white-space: nowrap;
-            flex-shrink: 0;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            width: 200rpx;
-
-            &:last-child {
-              border-right: none;
-              //   background: #f5f5f5;
-            }
-
-            &:nth-child(2) {
-              width: 260rpx;
-            }
-
-            &:nth-child(3) {
-              width: 220rpx;
-            }
-
-            &:nth-child(7) {
-              width: 260rpx !important;
-            }
-
-            .cell-text {
-              overflow: hidden;
-              text-overflow: ellipsis;
-              white-space: nowrap;
-              max-width: 100%;
-
-              &.warn {
-                color: #ff4d4f;
-              }
-            }
-
-            .unit {
-              font-size: 22rpx;
-              color: #999;
-              margin-left: 6rpx;
-            }
-
-            &.parameter-cell {
-              max-height: 120rpx;
-              overflow-y: auto;
-              align-items: flex-start;
-              padding: 16rpx 12rpx;
-              width: 200rpx;
-            }
-          }
-        }
-      }
-    }
-  }
-}
-
-.footerButton {
-  width: 100%;
-  height: 84rpx;
-  display: flex;
-  position: fixed;
-  bottom: 0;
-  z-index: 10;
-  background-color: #fff;
-
-  /deep/.u-button {
-    height: 100%;
-  }
-
-  > view {
-    flex: 1;
-  }
-}
-
-.warn {
-  color: #ff4d4f !important;
-}
-
-/deep/.text-color {
-  font-size: 28rpx;
-}
-</style>
+	.mainBox {
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		background-color: #f3f8fb;
+	}
+
+	.nav-placeholder {
+		height: calc(var(--status-bar-height, 0px) + 44px);
+	}
+
+	.wrapper {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+	}
+
+	.scroll-wrapper {
+		flex: 1;
+		height: 0;
+		padding: 20rpx;
+
+		.sample-list {
+			padding-bottom: 20rpx;
+
+			.sample-item {
+				background: #fff;
+				border-radius: 30rpx;
+				margin-bottom: 20rpx;
+				overflow: hidden;
+				//   box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
+				//   border: 1rpx solid #f0f0f0;
+
+				.quality-summary {
+					padding: 24rpx;
+					background: #fff;
+					border-top: 1rpx solid #f5f3f3;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					font-size: 28rpx;
+					font-weight: bold;
+
+					.summary-label {
+						color: #333;
+						margin-right: 20rpx;
+					}
+
+					.summary-value {
+						padding: 8rpx 20rpx;
+						border-radius: 8rpx;
+
+						&.result-pass {
+							color: #52c41a;
+							background: #f6ffed;
+						}
+
+						&.result-fail {
+							color: #ff4d4f;
+							background: #fff2f0;
+						}
+
+						&.result-concession {
+							color: #faad14;
+							background: #fffbe6;
+						}
+					}
+				}
+
+				.empty-state {
+					padding: 100rpx 0;
+					text-align: center;
+					font-size: 28rpx;
+					color: #999;
+				}
+
+				.sample-header {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					padding: 40rpx 40rpx 20rpx 40rpx;
+					background: #ffffff;
+					box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
+
+					.sample-info {
+						flex: 1;
+					}
+
+					.info-row {
+						display: flex;
+						margin-bottom: 8rpx;
+
+						&:last-child {
+							margin-bottom: 0;
+						}
+
+						.label {
+							font-size: 28rpx;
+							color: #333;
+
+							font-weight: 800;
+
+							margin-right: 10rpx;
+							min-width: 120rpx;
+						}
+
+						.value {
+							font-size: 26rpx;
+							color: #333;
+							flex: 1;
+							font-weight: 800;
+						}
+					}
+
+					.expand-arrow {
+						font-size: 40rpx;
+						color: #999;
+						margin-left: 20rpx;
+						transform: rotate(0deg);
+						transition: transform 0.3s;
+						background: #fff;
+						width: 48rpx;
+						height: 48rpx;
+						border-radius: 50%;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+
+						&.expanded {
+							transform: rotate(90deg);
+						}
+					}
+				}
+
+				.quality-table-wrapper {
+					// margin: 20rpx;
+					margin-top: 0;
+					// border-radius: 12rpx;
+					overflow: hidden;
+					// box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
+				}
+
+				// 自定义滚动条样式
+				::v-deep .quality-table-scroll ::-webkit-scrollbar {
+					width: 6rpx;
+					height: 6rpx;
+				}
+
+				::v-deep .quality-table-scroll ::-webkit-scrollbar-track {
+					background: #f1f1f1;
+					border-radius: 3rpx;
+				}
+
+				::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb {
+					background: #c1c1c1;
+					border-radius: 3rpx;
+				}
+
+				::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb:hover {
+					background: #a8a8a8;
+				}
+
+				::v-deep .table-cell:last-child::-webkit-scrollbar {
+					width: 4rpx;
+				}
+
+				::v-deep .table-cell:last-child::-webkit-scrollbar-track {
+					background: #f9f9f9;
+					border-radius: 2rpx;
+				}
+
+				::v-deep .table-cell:last-child::-webkit-scrollbar-thumb {
+					background: #d9d9d9;
+					border-radius: 2rpx;
+				}
+
+				.quality-table-scroll {
+					width: 100%;
+				}
+
+				.quality-table {
+					min-width: 100%;
+					width: 1540rpx;
+					background: #fff;
+				}
+
+				.table-header {
+					display: flex;
+					background: #f5f5f5;
+					border-bottom: 2rpx solid #e5e5e5;
+
+					.table-cell {
+						padding: 24rpx 12rpx;
+						font-size: 26rpx;
+						font-weight: bold;
+						color: #333;
+						text-align: center;
+						border-right: 1rpx solid #e5e5e5;
+						white-space: nowrap;
+						flex-shrink: 0;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						background: #f5f5f5;
+						width: 200rpx;
+
+						&:last-child {
+							border-right: none;
+							background: #f5f5f5;
+						}
+
+						&:nth-child(2) {
+							width: 260rpx;
+						}
+
+						&:nth-child(3) {
+							width: 220rpx;
+						}
+
+						&:nth-child(7) {
+							width: 260rpx;
+						}
+					}
+				}
+
+				.table-body {
+					.table-row {
+						display: flex;
+						border-bottom: 1rpx solid #e5e5e5;
+						transition: background 0.2s;
+
+						&:nth-child(even) {
+							// background: #fafafa;
+						}
+
+						&:last-child {
+							border-bottom: none;
+						}
+
+						.table-cell {
+							padding: 20rpx 12rpx;
+							font-size: 24rpx;
+							// color: #666;
+							text-align: center;
+							border-right: 1rpx solid #e5e5e5;
+							white-space: nowrap;
+							flex-shrink: 0;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							width: 200rpx;
+
+							&:last-child {
+								border-right: none;
+								//   background: #f5f5f5;
+							}
+
+							&:nth-child(2) {
+								width: 260rpx;
+							}
+
+							&:nth-child(3) {
+								width: 220rpx;
+							}
+
+							&:nth-child(7) {
+								width: 260rpx !important;
+							}
+
+							.cell-text {
+								overflow: hidden;
+								text-overflow: ellipsis;
+								white-space: nowrap;
+								max-width: 100%;
+
+								&.warn {
+									color: #ff4d4f;
+								}
+							}
+
+							.unit {
+								font-size: 22rpx;
+								color: #999;
+								margin-left: 6rpx;
+							}
+
+							&.parameter-cell {
+								max-height: 120rpx;
+								overflow-y: auto;
+								align-items: flex-start;
+								padding: 16rpx 12rpx;
+								width: 200rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.footerButton {
+		width: 100%;
+		height: 84rpx;
+		display: flex;
+		position: fixed;
+		bottom: 0;
+		z-index: 10;
+		background-color: #fff;
+
+		/deep/.u-button {
+			height: 100%;
+		}
+
+		>view {
+			flex: 1;
+		}
+	}
+
+	.warn {
+		color: #ff4d4f !important;
+	}
+
+	/deep/.text-color {
+		font-size: 28rpx;
+	}
+</style>

+ 16 - 5
pages/systemSettings/index.vue

@@ -11,8 +11,8 @@
 				</u-cell>
 			</picker>
 			<u-cell title="修改密码" :isLink="true" arrow-direction="right" @click="$refs.passwordModalRef.open()">
-			
-		
+
+
 			</u-cell>
 			<u-cell title="服务器地址" :isLink="true" arrow-direction="right" @click="handleServerSettings">
 				<text slot="value" class="u-slot-value" :key="apiAdress">{{
@@ -24,6 +24,10 @@
 					Nversion == currentVersion ? '' : `发现新版本(${Nversion})`}}
 				</text>
 			</u-cell>
+			<u-cell title="清理缓存" :isLink="true" arrow-direction="right" @click="restart()">
+
+			</u-cell>
+
 		</u-cell-group>
 		<view class="flex-buttom">
 			<view class="btn" @click="loginOut"> 退出登录 </view>
@@ -58,7 +62,8 @@
 	export default {
 		components: {
 			updatePop,
-			ServerSetting,passwordModal
+			ServerSetting,
+			passwordModal
 		},
 		data() {
 			return {
@@ -268,14 +273,17 @@
 											if (ress.progress < 100) {
 												uni.showLoading({
 													title: "正在下载安装包: " + (ress
-														.progress > lastProgress ? ress.progress : lastProgress) + "%",
+														.progress > lastProgress ?
+														ress.progress :
+														lastProgress) + "%",
 													mask: true,
 												});
 												loadingVisible = true;
 											} else {
 												loadingVisible = false;
 											}
-											lastProgress = ress.progress > lastProgress ? ress.progress : lastProgress;
+											lastProgress = ress.progress > lastProgress ? ress
+												.progress : lastProgress;
 										}
 									})
 
@@ -302,6 +310,9 @@
 				})
 				// #endif
 			},
+			restart() {
+				plus.runtime.restart()
+			},
 			getbb() {
 				get(this.apiUrl + '/versioning/getLatestData').then(res => {
 					if (res.success) {

BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png