mao 1 year ago
parent
commit
1f23782198
5 changed files with 20 additions and 43 deletions
  1. 1 1
      api/base/path.js
  2. 1 1
      api/business/subPlanDetails.js
  3. 1 0
      pages.json
  4. 4 35
      pages/batchReporting/index.vue
  5. 13 6
      pages/productionPlan/index.vue

+ 1 - 1
api/base/path.js

@@ -1,3 +1,3 @@
-const baseURL = 'http://192.168.31.126:8080';
+const baseURL = 'http://192.168.31.216:8080';
 
 export default baseURL;

+ 1 - 1
api/business/subPlanDetails.js

@@ -18,4 +18,4 @@ export function getSubPlanDetailsList(data) {
 		method: 'GET',
 		data: data
 	})
-}
+}

+ 1 - 0
pages.json

@@ -36,6 +36,7 @@
 			"path": "pages/productionPlan/index",
 			"style": {
 				"navigationBarTitleText": "生产计划单"
+				// "enablePullDownRefresh":true
 			}
 		},
 		{

+ 4 - 35
pages/batchReporting/index.vue

@@ -67,41 +67,7 @@
 	})
 	const turnoverApplicationDialog = ref(null)
 	const lotDialog = ref(null)
-	const listData = ref([
-		{
-			batchNumber: "DC23727410070",
-			caseNumber: "X12522、X522、X15522、J5211、J5112",
-			totalWorkingHours: 135.5,
-			qualifiedQuantity: 600,
-			invest: 1000,
-			previousProcess: "NC车1",
-			currentProcess: "热处理",
-			NextProcess: "清洗",
-			status: 0
-		},
-		{
-			batchNumber: "DC23727410070",
-			caseNumber: "X12522、X522、X15522、J5211、J5112",
-			totalWorkingHours: 135.5,
-			qualifiedQuantity: 600,
-			invest: 1000,
-			previousProcess: "NC车1",
-			currentProcess: "热处理",
-			NextProcess: "清洗",
-			status: 1
-		},
-		{
-			batchNumber: "DC23727410070",
-			caseNumber: "X12522、X522、X15522、J5211、J5112",
-			totalWorkingHours: 135.5,
-			qualifiedQuantity: 600,
-			invest: 1000,
-			previousProcess: "NC车1",
-			currentProcess: "热处理",
-			NextProcess: "清洗",
-			status: 2
-		}
-	])
+	const listData = ref([])
 	const handleShowTurnoverApplication = (data) => {
 		let _data = data ?? {}
 		// 调用子组件中的方法
@@ -112,6 +78,9 @@
 		// 调用子组件中的方法
 		lotDialog.value.open(_data)
 	}
+	const init = () = > {
+		
+	}
 
 </script>
 

+ 13 - 6
pages/productionPlan/index.vue

@@ -1,12 +1,12 @@
 <template>
 	<view class="uni-column" style="padding: 24rpx;">
-		<view v-for="(item, index) in listData" :key="index" class="list-item">
+		<view v-for="(item, index) in listData" :key="index"  @click="handleToBatchReporting" class="list-item">
 			<view class="title-container uni-row">
 				<view class="title uni-row">
 					<text class="label">生产计划单号</text>
 					<text class="label code">{{ item['productionPlanNo'] }}</text>
 				</view>
-				<view v-if="item['status']" class="tag"><text class="label">进行中</text></view>
+				<view v-if="item['dayWorkList'].length > 0" class="tag"><text class="label">进行中</text></view>
 				<view v-else type="default" class="tag not-start"><text class="label">未开始</text></view>
 			</view>
 			<!-- 			<view class="item-info uni-row">
@@ -19,7 +19,7 @@
 			</view>
 			<view class="item-info uni-row">
 				<text class="label">总批数</text>
-				<text class="label right">{{ item['batchNumber'] }}</text>
+				<text class="label right">{{ item['lotNumber'] }}</text>
 			</view>
 			<view class="item-info uni-row">
 				<text class="label">完成批数</text>
@@ -27,11 +27,11 @@
 			</view>
 			<view class="item-info uni-row">
 				<text class="label">投产数/合格数</text>
-				<text class="label right">{{ item['qualifiedQuantity'] }}/{{item['invest']}}</text>
+				<text class="label right">{{ item['productionQuantity'] }}/{{item['invest']}}</text>
 			</view>
 			<view class="item-info uni-row">
 				<text class="label">设备</text>
-				<text class="label right">{{ item['equiment']}}</text>
+				<text class="label right">{{ item['equipmentName']}}</text>
 			</view>
 			<!-- 			<view class="item-info uni-row">
 				<text class="label">操作人</text>
@@ -56,13 +56,14 @@
 	
 
 	const listData = ref([])
+
 	onLoad(() => {
 		init();
 	})  
 
 	function init(){
 		getSubPlanDetailsList({}).then(res => {
-			console.log(res)
+			console.log(res.rows)
 			listData.value = res.rows;
 		})
 
@@ -82,6 +83,12 @@
 		// }) 
 	} 
 	
+	function handleToBatchReporting(){
+		uni.navigateTo({
+			url:"/pages/batchReporting/index"
+		})
+	}
+	
 </script>
 
 <style lang="scss">