ysy 2 жил өмнө
parent
commit
e4f76e1658

+ 3 - 1
pages/pda/components/workCard.vue

@@ -2,7 +2,7 @@
 
 	<view class="card_box" @click="handleDetail">
 		<view class="item_box rx-sc">
-			<view class="round">1</view>
+			<view class="round">{{item.index}}</view>
 			<view class="orderId">{{item.code}}  </view>
 		</view>
 
@@ -60,6 +60,8 @@
 <script>
 	export default {
 		props: {
+			
+			
 			item: {
 				type: Object,
 				default: () => ({})

+ 39 - 37
pages/pda/workOrder/index/index.vue

@@ -21,7 +21,7 @@
 
 			<u-list @scrolltolower="scrolltolower" key="list" :preLoadScreen="page * 10">
 				<u-list-item v-for="(item, index) in dataList" :key="index">
-					<workCard :item="item"   @handleDetail="handleDetail"></workCard>
+					<workCard  :item="item" @handleDetail="handleDetail"></workCard>
 				</u-list-item>
 
 
@@ -37,7 +37,9 @@
 
 <script>
 	import workCard from '../../components/workCard.vue'
-	import { workorderPage } from '@/api/pda/workOrder.js'
+	import {
+		workorderPage
+	} from '@/api/pda/workOrder.js'
 	let [isEnd] = [false]
 	export default {
 		components: {
@@ -46,40 +48,39 @@
 		data() {
 			return {
 				page: 1,
-
+				size: 5,
 				dataList: [],
 
 				searchFrom: {
 					keyWord: null
 				},
-				
+
 
 			}
 		},
 		onShow() {
-			 this.getList()
+			this.getList()
 		},
 		methods: {
-		async	getList() {
+			async getList() {
 				let params = {
-					 page: this.page,
-					 size: 5,
-					 status: [4,5,6,7],
-					 ...this.searchFrom
+					pageNum: this.page,
+					size: this.size,
+					status: [4, 5, 6, 7],
+					...this.searchFrom
 				}
-				
-				 isEnd = false
-				 const res = await workorderPage(params)
-				 console.log(res)
-				 
-				 if (params.page === 1) {
-				   this.dataList = []
-				 }
-				 
-				   this.dataList.push(...res.list)
-				   
-				      isEnd = this.dataList.length >= res.count
-				 
+
+				isEnd = false
+				const res = await workorderPage(params)
+				console.log(res)
+
+				if (params.page === 1) {
+					this.dataList = []
+				}
+
+				this.dataList.push(...res.list)
+				isEnd = this.dataList.length >= res.count
+
 			},
 
 
@@ -91,21 +92,22 @@
 				this.page++
 				this.getList()
 			},
-			
-			
-			handleDetail (item) {
-
-
-             let  url= '/pages/pda/workOrder/extrusionMolding/index'
-			
-			  url += `?id=1&title=挤压成型`
-			  console.log(url)
-			  uni.navigateTo({
-			    url
-			  })
-			  console.log(item)
+
+
+
+			handleDetail(item) {
+
+
+				let url = '/pages/pda/workOrder/extrusionMolding/index'
+
+				url += `?id=1&title=挤压成型`
+				console.log(url)
+				uni.navigateTo({
+					url
+				})
+				console.log(item)
 			},
-		
+
 
 		}
 	}