zhaoxiaohai 3 роки тому
батько
коміт
5b2e08eb7c

+ 2 - 1
packageA/orderForm/detail.js

@@ -14,7 +14,8 @@ Page({
 			model: "#Yl_Attachment"
 		}, {
 			label: "订单进度",
-			icon: "icon-tabcaozuojilu1"
+			icon: "icon-tabcaozuojilu1",
+			model: "#Progress"
 		}, {
 			label: "发票",
 			icon: "icon-tabkaipiaoxinxi"

+ 2 - 1
packageA/orderForm/detail.json

@@ -1,6 +1,7 @@
 {
 	"usingComponents": {
 		"Product": "./modules/product/index",
-		"Yl_Attachment": "/components/Yl_Attachment/index"
+		"Yl_Attachment": "/components/Yl_Attachment/index",
+		"Progress": "./modules/progress/index"
 	}
 }

+ 1 - 0
packageA/orderForm/detail.wxml

@@ -84,5 +84,6 @@
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Product slot='产品明细' id='Product' />
 	<Yl_Attachment slot='附件' id='Yl_Attachment' admin ownertable="sa_order" ownerid="{{detail.sa_orderid}}" />
+	<Progress slot='订单进度' id='Progress' />
 	<view style="height: 40rpx;" />
 </Yl_FunTabs>

+ 37 - 0
packageA/orderForm/modules/progress/index.js

@@ -0,0 +1,37 @@
+const _Http = getApp().globalData.http;
+Component({
+  data: {
+    sa_orderid: 0,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageTotal: 1,
+      total: null
+    }
+  },
+  methods: {
+    getList(id, init) {
+      let content = this.data.content;
+      content.sa_orderid = id;
+      if (init) content.pageNumber = 1;
+      _Http.basic({
+        "id": "20221229093602",
+        content
+      }).then(res => {
+        console.log("订单进度", res)
+        if (res.msg != '成功') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        this.setData({
+          list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+          "content.pageNumber": res.pageNumber + 1,
+          "content.pageSize": res.pageSize,
+          "content.pageTotal": res.pageTotal,
+          "content.total": res.total,
+          sa_orderid: id
+        })
+      })
+    }
+  }
+})

+ 4 - 0
packageA/orderForm/modules/progress/index.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 37 - 0
packageA/orderForm/modules/progress/index.scss

@@ -0,0 +1,37 @@
+.count {
+	font-size: 28rpx;
+	color: #333333;
+	margin: 20rpx;
+}
+
+.progress {
+	navigator {
+		width: 100vw;
+		background-color: #fff;
+		box-sizing: border-box;
+		padding: 20rpx 30rpx;
+		margin-bottom: 10rpx;
+
+		.time {
+			height: 34rpx;
+			line-height: 34rpx;
+			font-size: 24rpx;
+			color: #666666;
+		}
+
+		.label {
+			font-size: 28rpx;
+			color: #666;
+			margin-top: 20rpx;
+		}
+
+		.content {
+			background: #F5F5F5;
+			border-radius: 16rpx;
+			padding: 20rpx 30rpx;
+			font-size: 28rpx;
+			color: #333333;
+			margin-top: 20rpx;
+		}
+	}
+}

+ 12 - 0
packageA/orderForm/modules/progress/index.wxml

@@ -0,0 +1,12 @@
+<view class="progress">
+	<view class="count">共有{{content.total}}条记录</view>
+
+	<navigator url="#" wx:for="{{list}}" wx:key="item.rowindex">
+		<view class="time">
+			{{item.actiondate}}
+		</view>
+		<view class="label">{{item.actionby}} <text style="color: var(--success);">{{item.action + item.type}}</text> </view>
+		<view class="content">{{item.remarks}}</view>
+	</navigator>
+</view>
+<Yl_Empty wx:if="{{list.length==0}}" />