Przeglądaj źródła

物流单修改

xiaohaizhao 7 miesięcy temu
rodzic
commit
24c8089d4d

+ 0 - 1
packageA/orderForm/modules/shipments/index.json

@@ -1,6 +1,5 @@
 {
   "component": true,
   "usingComponents": {
-    "list": "../../../shipment/modules/list/index"
   }
 }

+ 52 - 0
packageA/orderForm/modules/shipments/index.scss

@@ -0,0 +1,52 @@
+.item {
+	width: 100vw;
+	margin-bottom: 20rpx;
+	background-color: #ffffff;
+
+
+	.top {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			height: 80rpx;
+			width: 100%;
+			border-bottom: 1rpx solid #ddd;
+			box-sizing: border-box;
+			padding-right: 30rpx;
+			font-size: 28rpx;
+			padding-left: 30rpx;
+			box-sizing: border-box;
+
+			text{
+					color: var(--assist);
+			}
+	}
+
+	.content {
+			position: relative;
+			padding-bottom: 20rpx;
+			padding-left: 30rpx;
+			box-sizing: border-box;
+
+			.num {
+					line-height: 40rpx;
+					font-size: 28rpx;
+					color: #333333;
+					padding: 20rpx 0;
+			}
+
+			.exp {
+					height: 34rpx;
+					font-size: 24rpx;
+					margin-bottom: 8rpx;
+					color: #999999;
+			}
+	}
+}
+
+/* 文本行数限制 */
+.line-1 {
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}

+ 29 - 1
packageA/orderForm/modules/shipments/index.wxml

@@ -1 +1,29 @@
-<list list='{{list}}' />
+<view class="item" wx:for="{{list}}" wx:key="sa_logisticsid" wx:key="billno">
+    <navigator url="/packageA/shipment/detail?id={{item.sa_logisticsid}}" class="content">
+        <view class="num">
+            物流号:{{item.billno}}
+        </view>
+				<view class="exp">
+            单据日期:{{item.billdate || ' --'}}
+        </view>
+        <view class="exp" wx:if="{{item.logisticsstatus}}">
+            物流状态:{{item.logisticsstatus}}
+        </view>
+        <view class="exp" wx:else>
+            订单状态:{{item.status == '审核' ? '待收货' : '已收货'}}
+        </view>
+        <view class="exp">
+            总件数:{{item.packageqty || ' --'}}
+        </view>
+        <view class="exp">
+            物流费:{{item.logisticsamount || ' --'}}
+        </view>
+				<view class="exp">
+            收货地址:{{item.address || ' --'}}
+        </view>
+        <view class="exp">
+            备注:{{item.remarks|| ' --'}}
+        </view>
+    </navigator>
+</view>
+<Yl_Empty wx:if="{{list.length==0}}" />

+ 39 - 37
packageA/shipment/detail.js

@@ -9,7 +9,7 @@ Page({
             label: "详细信息",
             icon: "icon-tabchanpin"
         }, {
-            label: "物流查询",
+            label: "物流跟踪",
             icon: "icon-tabfujian1",
             model: "#Query"
         }, {
@@ -27,7 +27,7 @@ Page({
     /* 获取详情 */
     getDetail(init = false, show = true) {
         _Http.basic({
-            "id": 20221204201804,
+            "id": 20230720142002,
             "content": {
                 nocache: true,
                 "sa_logisticsid": this.data.sa_logisticsid
@@ -38,9 +38,9 @@ Page({
                 title: res.msg,
                 icon: "none"
             });
-            this.setPreview(res.data[0]);
+            this.setPreview(res.data);
             this.setData({
-                detail: res.data[0],
+                detail: res.data,
                 loading: false
             });
             if (init) this.partialRenewal(true)
@@ -49,39 +49,40 @@ Page({
     /* 设置详情信息 */
     setPreview(data) {
         let list1 = [{
-                label: "物流单号",
-                value: data.logisticno
-            }, {
-                label: "状态",
-                value: data.status == '审核' ? '待收货' : '已收货'
-            }, {
-                label: "收货人",
-                value: data.name
-            }, {
-                label: "收货地址",
-                value: data.address
-            }, {
-                label: "快递公司",
-                value: data.logiscomp_enterprisename
-            }, {
-                label: "快递单号",
-                value: data.logisticno
-            }, {
-                label: "运费状态",
-                value: data.paytype
-            }, {
-                label: "运费",
-                value: data.freightamount
-            },{
-                label: "件数",
-                value: data.packageqty
-            }, {
-                label: "物流费",
-                value: data.freightamount
-            },  {
-                label: "备注",
-                value: data.remarks
-            }, ],
+                    label: "物流公司",
+                    value: data.logiscomp_name
+                }, {
+                    label: "物流单号",
+                    value: data.logisticno
+                }, {
+                    label: "单据日期",
+                    value: data.billdate
+                }, {
+                    label: "收货人",
+                    value: data.name
+                }, {
+                    label: "联系方式",
+                    value: data.phonenumber
+                }, {
+                    label: "详细地址",
+                    value: data.province + data.city + data.county + data.address
+                }, {
+                    label: "件数",
+                    value: data.packageqty
+                }, {
+                    label: "重量",
+                    value: data.weight
+                }, {
+                    label: "体积",
+                    value: data.volume
+                }, {
+                    label: "物流费",
+                    value: data.logisticsamount
+                }, {
+                    label: "物流状态",
+                    value: data.logisticsstatus
+                }, 
+            ],
 
             list2 = [{
                 label: "创建人",
@@ -128,6 +129,7 @@ Page({
                 } = Component.data.content,
                 id = this.data.detail.sa_logisticsid;
             // if (model == "#Binding") id = this.data.detail.sa_logistics_boxid;
+            if (model == "#Query") id = this.data.detail.billno;
             if (total == null || init) {
                 Component.getList(id, init);
             } else if (pageNumber <= pageTotal) {

+ 2 - 3
packageA/shipment/detail.wxml

@@ -5,14 +5,13 @@
 	<view class="num">
 		{{detail.billno}}
 	</view>
-	<view class="exp">状态:{{detail.status}}</view>
 	<view class="exp">单据时间:{{detail.billdate}}</view>
 	<view class="exp">创建日期:{{detail.createdate}}</view>
-	<view class="exp">收货状态:{{ detail.status == '审核' ? '待收货' : '已收货'}}</view>
+	<view class="exp">物流状态:{{ detail.logisticsstatus||'--'}}</view>
 </view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
-	<Query slot='物流查询' id='Query' />
+	<Query slot='物流跟踪' id='Query' />
 	<!-- <Binding slot='装箱明细' id='Binding' /> -->
 	<Delivery slot='送货明细' id='Delivery' />
 	<view style="height: 140rpx;" />

+ 4 - 1
packageA/shipment/modules/list/index.wxml

@@ -6,7 +6,10 @@
         <view class="num">
             物流单:{{item.billno}}
         </view>
-        <view class="exp">
+        <view class="exp" wx:if="{{item.logisticsstatus}}">
+            物流状态:{{item.logisticsstatus}}
+        </view>
+        <view class="exp" wx:else>
             订单状态:{{item.status == '审核' ? '待收货' : '已收货'}}
         </view>
         <view class="exp">

+ 9 - 9
packageA/shipment/modules/query/index.js

@@ -24,9 +24,9 @@ Component({
 		},
 		getList(id) {
 			let content = this.data.content;
-			content.sa_logisticsid = id;
+			content.billno = id;
 			_Http.basic({
-				"id": "20230110135004",
+				"id": "2024101114155503",
 				content
 			}).then(res => {
 				console.log("物流查询", res)
@@ -34,16 +34,16 @@ Component({
 					title: res.msg,
 					icon: "none"
 				})
-				if (res.data.message) this.setData({
-					steps: res.data.data.map(v => {
+				let data = res.data.data[0];
+				this.setData({
+					steps: data.traceList.map(v => {
 						return {
-							text: v.time,
-							desc: v.context
+							text: v.acceptTime,
+							desc: v.remark
 						}
 					}),
-					nu: res.data.nu,
-					"content.total": 1,
-					sa_logisticsid: id
+					nu: data.orderNo,
+					"content.total": 1
 				})
 			})
 		}

+ 2 - 2
packageA/shipment/modules/query/index.wxml

@@ -1,3 +1,3 @@
-<navigator url="#" class="title" bindtap="copyNum"><text wx:if="{{nu}}">快递单号:{{nu}}</text><text wx:else>暂无物流信息</text><text wx:if="{{nu}}">复制</text></navigator>
-<van-steps steps="{{ steps }}" active="{{ active }}" direction="vertical" active-color="#375CAC" />
+<navigator url="#" class="title" bindtap="copyNum"><text wx:if="{{nu}}">物流单号:{{nu}}</text><text wx:else>暂无物流信息</text><text wx:if="{{nu}}">复制</text></navigator>
+<van-steps steps="{{ steps }}"  direction="vertical" active-color="#375CAC" />
 <Yl_Empty wx:if="{{steps.length==0}}" />

+ 1 - 1
project.config.json

@@ -41,7 +41,7 @@
     "useCompilerPlugins": [
       "sass"
     ],
-    "condition": true,
+    "condition": false,
     "compileWorklet": false
   },
   "compileType": "miniprogram",

+ 7 - 0
project.private.config.json

@@ -10,6 +10,13 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "packageA/shipment/detail",
+          "pathName": "packageA/shipment/detail",
+          "query": "id=354",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "packageA/orderForm/detail",
           "pathName": "packageA/orderForm/detail",