Просмотр исходного кода

feat: 添加质检工单统计功能并修复样式问题

yusheng 3 месяцев назад
Родитель
Сommit
532f64a751

+ 10 - 0
api/myTicket/index.js

@@ -125,6 +125,16 @@ export async function statistics(params) {
 	}
 	return Promise.reject(new Error(data.message))
 }
+// 质检工单统计
+export async function qualityTodoByPda(params) {
+	const data = await get(Vue.prototype.apiUrl + `/qms/quality_work_order/queryTodoByPda`, params)
+	if (data.code == 0) {
+		return data.data
+	}
+	return Promise.reject(new Error(data.message))
+}
+
+
 //流程待办统计
 export async function todoNuber(params) {
 		const data = await postJ(Vue.prototype.apiUrl + `/bpm/task/todo-page`, params)

+ 2 - 2
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.49",
+    "versionName" : "V1.0.3.51",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -10,7 +10,7 @@
             "proxy" : {
                 "/api" : {
                     // "target" : "http://192.168.1.110:18086/",
-                    "target" : "http://192.168.1.125:18086/",
+                    "target" : "http://192.168.1.251:18086/",
                     // "target" : "http://192.168.1.251:18086/",
                     // "target" : "http://192.168.1.251:18086/",
                     // "target" : "http://110.41.182.105/api/",

+ 8 - 8
pages.json

@@ -1952,7 +1952,7 @@
 			"style": {
 				"navigationBarTitleText": "我的客户",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -1960,7 +1960,7 @@
 			"style": {
 				"navigationBarTitleText": "公海客户员工",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -2404,7 +2404,7 @@
 			"style": {
 				"navigationBarTitleText": "质检工单",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -2412,7 +2412,7 @@
 			"style": {
 				"navigationBarTitleText": "质检报工",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -2420,7 +2420,7 @@
 			"style": {
 				"navigationBarTitleText": "我的质检工单",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -2428,7 +2428,7 @@
 			"style": {
 				"navigationBarTitleText": "我的质检任务工单",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -2436,7 +2436,7 @@
 			"style": {
 				"navigationBarTitleText": "我的质检受托工单",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		},
 		{
@@ -2444,7 +2444,7 @@
 			"style": {
 				"navigationBarTitleText": "我的质检受托工单",
 				"navigationStyle": "custom",
-				"navigationBarTextStyle": "white"
+				"navigationBarTextStyle": "black"
 			}
 		}
 	],

+ 1 - 0
pages/doc/file-edit.vue

@@ -65,6 +65,7 @@
 
 
 		</view>
+		<u-toast ref="uToast"></u-toast>
 		<ba-tree-picker ref="directoryIdRef" :multiple="false" title="选择文档位置" :localdata="folderList" valueKey="id"
 			textKey="name" childrenKey='sonDirectoryList' @select-row="directoryIdBack" />
 

+ 16 - 2
pages/index/index.vue

@@ -175,7 +175,8 @@
 <script>
 	import CellTip from "@/components/CellTip.vue";
 	import {
-		statistics
+		statistics,
+		qualityTodoByPda
 	} from "@/api/myTicket";
 	export default {
 		components: {
@@ -313,7 +314,20 @@
 						} else if (f.path == "purchasingManage") {
 							this.purchaseManageList = f.children;
 						} else if (f.path == "qualityManage") {
-							this.qmsList = f.children;
+
+							qualityTodoByPda().then((res) => {
+
+								// console.log("this.operationsList---", this.operationsList);
+								// console.log("res", res);
+								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;
+							});
 						} else if (f.path == "productionControlManagement") {
 							this.pcsList = f.children;
 						} else if (f.path == 'dispatchManage') {

+ 2 - 10
pages/qms/inspectionWork/addSample.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-popup :show="visible" mode="center" :round="0" :closeOnClickOverlay="false" :zIndex="99999"
+		<u-popup :show="visible" :round="0" :closeOnClickOverlay="false" :zIndex="99999"
 			@close="closePopup">
 			<view class="popup-content">
 				<view class="popup-header">
@@ -1146,7 +1146,6 @@
 			// 全检
 			async updatePackingList() {
 				let list = this.tableList;
-				let sampleCount = this.form.total;
 				const dataList = [];
 				let count = list ? list.length : 0;
 				const codeList = await this.batchCodes(count);
@@ -1306,7 +1305,7 @@
 <style lang="scss" scoped>
 	.popup-content {
 		width: 100vw;
-		height: 100vh;
+		height: 90vh;
 		background: #fff;
 		border-radius: 0;
 		display: flex;
@@ -1395,13 +1394,6 @@
 				}
 			}
 		}
-
-		.form-section-inner {
-			// margin-top: 20rpx;
-			// padding: 0 20rpx;
-			// background: #f9f9f9;
-			// border-radius: 12rpx;
-		}
 	}
 
 	.table-info {

+ 3 - 0
pages/qms/inspectionWork/index.vue

@@ -43,6 +43,9 @@
 			this.$nextTick(() => {
 				this.$refs.listRef.getList()
 			})
+			uni.setNavigationBarColor({
+			   frontColor: '#000000',
+			 });
 		},
 
 

+ 20 - 4
pages/qms/inspectionWork/list.vue

@@ -8,7 +8,7 @@
 		<view class="top-wrapper">
 
 			<uni-section>
-				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="keyWord" placeholder="名称、批次号">
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="keyWord" placeholder="名称、批次号、工单编码">
 				</uni-easyinput>
 			</uni-section>
 			<button class="search_btn" @click="doSearch">搜索</button>
@@ -26,9 +26,12 @@
 							<view class="herder_text"></view>
 							<view class="herder_view">
 								{{ getDictValue('质检计划类型', item.qualityType+'')}}/{{item.code}}/{{item.productCode}}/{{item.productName}}
-								<text>
+								<text v-if="!pageName||pageName=='myList'">
 									({{item.isPendingSample == 1?'待收样':statusList.find(row=>row.value==item.status).label}})
 								</text>
+								<text v-else>
+									({{statusList1.find(row=>row.value==item.status).label}})
+								</text>
 							</view>
 						</view>
 						<view class="text">检验项目:</view>
@@ -53,7 +56,7 @@
 									@click="sampleCollection(item)"></u-button>
 								<u-button
 									v-if="![1, 2].includes(item.status) &&item.sampleQuantity < item.total &&item.isPendingSample != 1"
-									type="primary" text="样" @click="addSampleOpen(item)"></u-button>
+									type="primary" text="样" @click="addSampleOpen(item)"></u-button>
 							</view>
 						</view>
 					</view>
@@ -116,6 +119,15 @@
 						label: '待请样'
 					}
 				],
+				statusList1: [{
+						value: 1,
+						label: '未报工'
+					},
+					{
+						value: 2,
+						label: '已报工'
+					}
+				],
 				tableList: [],
 				page: 1,
 				size: 10,
@@ -131,6 +143,9 @@
 		created() {
 			this.requestDict('质检计划类型')
 
+		},
+		onLoad(){
+		
 		},
 
 		methods: {
@@ -179,7 +194,7 @@
 					pageNum: this.page,
 					size: this.size,
 					keyWord: this.keyWord,
-					// recordingMethod: 1,
+					recordingMethod: 1,
 
 				}
 				if (this.pageName) {
@@ -275,6 +290,7 @@
 </script>
 
 <style lang="scss" scoped>
+	
 	.mainBox {
 		background-color: #f3f8fb
 	}