xiaohaizhao 1 år sedan
förälder
incheckning
fe9178a67d

+ 4 - 4
packageA/shipment/detail.js

@@ -13,9 +13,9 @@ Page({
             icon: "icon-tabfujian1",
             model: "#Query"
         }, {
-            label: "装箱明细",
+            label: "送货明细", //label: "装箱明细",
             icon: "icon-tabcaozuojilu1",
-            model: "#Binding"
+            model: "#Delivery" //"#Binding"
         }]
     },
     onLoad(options) {
@@ -136,7 +136,7 @@ Page({
             content: '是否确认收货?确认后不可更改',
             complete: (res) => {
                 if (res.confirm) _Http.basic({
-                    "id": "20221122133204",
+                    "id": "20230721104302",
                     "content": {
                         "sa_logisticsid": that.data.sa_logisticsid
                     }
@@ -168,7 +168,7 @@ Page({
         content.pageNumber = 1;
         content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
         _Http.basic({
-            "id": wx.getStorageSync('userrole') == '业务员' ? 20221122132804 : 20230111141104,
+            "id": 20230720142102,
             content
         }).then(res => {
             console.log("更新订单列表", res)

+ 1 - 0
packageA/shipment/detail.json

@@ -2,6 +2,7 @@
   "usingComponents": {
     "Preview":"./modules/preview/index",
     "Query": "./modules/query/index",
+    "Delivery": "./modules/delivery/index",
     "Binding": "./modules/binding/index"
   }
 }

+ 2 - 1
packageA/shipment/detail.wxml

@@ -13,7 +13,8 @@
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
 	<Query slot='物流查询' id='Query' />
-	<Binding slot='装箱明细' id='Binding' />
+	<!-- <Binding slot='装箱明细' id='Binding' /> -->
+	<Delivery slot='送货明细' id='Delivery' />
 	<view style="height: 140rpx;" />
 </Yl_FunTabs>
 

+ 6 - 6
packageA/shipment/index.js

@@ -48,13 +48,13 @@ Page({
 		if (init) content.pageNumber = 1;
 		if (content.pageNumber > content.pageTotal) return;
 		_Http.basic({
-			"id": wx.getStorageSync('userrole') == '业务员' ? 20221122132804 : 20230111141104,
+			"id": 20230720142102,
 			content
 		}).then(res => {
-			console.log("订单列表", res)
-			if(res.msg!='成功')return wx.showToast({
+			console.log("物流单", res)
+			if (res.msg != '成功') return wx.showToast({
 				title: res.msg,
-				icon:"none"
+				icon: "none"
 			})
 			this.selectComponent('#ListBox').RefreshToComplete();
 			this.setData({
@@ -76,7 +76,7 @@ Page({
 		});
 		this.getList(true)
 	},
-	/* 切换tabs */
+	/* 切换tabs 
 	tabsChange(e) {
 		let status = "";
 		switch (e.detail.title) {
@@ -92,7 +92,7 @@ Page({
 			"content.where.status": status
 		});
 		this.getList(true);
-	},
+	},*/
 	onReady() {
 		this.setListHeight()
 	},

+ 2 - 2
packageA/shipment/index.wxml

@@ -2,10 +2,10 @@
 <template is="skeleton" wx:if="{{loading}}" />
 
 <Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
-<van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
+<!-- <van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
     <van-tab title="待收货" />
     <van-tab title="已收货" />
-</van-tabs>
+</van-tabs> -->
 <view class="total" style="height: 20rpx;" />
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
     <List list="{{list}}" />

+ 37 - 0
packageA/shipment/modules/delivery/index.js

@@ -0,0 +1,37 @@
+const _Http = getApp().globalData.http;
+Component({
+  data: {
+    sa_logisticsid: 0,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageTotal: 1,
+      total: null
+    }
+  },
+  methods: {
+    getList(id, init) {
+      let content = this.data.content;
+      content.sa_logisticsid = id;
+      if (init) content.pageNumber = 1;
+      _Http.basic({
+        "id": "20230720141702",
+        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_logisticsid: id
+        })
+      })
+    }
+  }
+})

+ 4 - 0
packageA/shipment/modules/delivery/index.json

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

+ 68 - 0
packageA/shipment/modules/delivery/index.scss

@@ -0,0 +1,68 @@
+.title {
+	font-size: 28rpx;
+	color: #333333;
+	margin: 30rpx;
+}
+
+.binding-box {
+	width: 100vw;
+	padding: 20rpx 30rpx 0rpx;
+	background-color: #fff;
+	box-sizing: border-box;
+	border-bottom: 1rpx solid #ddd;
+
+	.numno {
+		font-size: 28rpx;
+		margin-bottom: 15rpx;
+	}
+
+	.product {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		margin-bottom: 20rpx;
+
+		.image {
+			width: 130rpx;
+			height: 130rpx;
+			margin-right: 20rpx;
+			border-radius: 16rpx;
+			overflow: hidden;
+			flex-shrink: 0;
+		}
+
+		.content {
+			flex: 1;
+			color: #333;
+
+			.content-title {
+				line-height: 40rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+			}
+
+			.row {
+				font-size: 26rpx;
+				width: 100%;
+				margin-top: 8rpx;
+
+				text {
+					line-height: 30rpx;
+					display: inline-block;
+					width: 50%;
+					word-break: break-all;
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+				}
+
+				.qty {
+					font-weight: bold;
+					text-align: center;
+					font-size: 30rpx;
+				}
+			}
+		}
+
+	}
+}

+ 30 - 0
packageA/shipment/modules/delivery/index.wxml

@@ -0,0 +1,30 @@
+<view class="title">送货明细</view>
+
+
+<view class="binding-box" wx:for="{{list}}" wx:key="i">
+	<view class="numno">
+		发货通知单:{{item.billno}}
+	</view>
+	<view class="product" url="#">
+		<view class="image">
+			<van-image width="100%" height="100%" fit="cover" src="{{item.cover||12321}}" use-loading-slot use-error-slot lazy-load>
+				<van-loading slot="loading" type="spinner" size="20" vertical />
+				<text slot="error">加载失败</text>
+			</van-image>
+		</view>
+		<view class="content">
+			<view class="content-title">{{item.itemname||' --'}}</view>
+			<view class="row">
+				<text>编号:{{item.itemno || ' --'}}</text>
+				<text>规格:{{item.spec || ' --'}}</text>
+			</view>
+			<view class="row">
+				<text>型号:{{item.model || ' --'}}</text>
+				<text class="qty">x{{item.qty||0}}</text>
+			</view>
+		</view>
+	</view>
+</view>
+
+
+<Yl_Empty wx:if="{{list.length==0}}" />

+ 0 - 2
packageA/shipment/modules/list/index.scss

@@ -1,6 +1,5 @@
 .item {
     width: 100vw;
-
     margin-bottom: 20rpx;
     background-color: #ffffff;
 
@@ -30,7 +29,6 @@
         box-sizing: border-box;
 
         .num {
-            height: 40rpx;
             line-height: 40rpx;
             font-size: 28rpx;
             color: #333333;

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

@@ -1,22 +1,19 @@
 <view class="item" wx:for="{{list}}" wx:key="billno">
     <navigator url="#" class="top" data-num="{{item.logisticno}}" bindtap="copyNum">
-        快递单号: {{item.logisticno||' --'}} <text wx:if="{{item.logisticno}}">复制</text>
+        {{item.logiscomp_name}} : {{item.logisticno||' --'}} <text wx:if="{{item.logisticno}}">复制</text>
     </navigator>
     <navigator url="/packageA/shipment/detail?id={{item.sa_logisticsid}}" class="content">
         <view class="num">
             物流单:{{item.billno}}
         </view>
         <view class="exp">
-            收货人:{{item.name || ' --'}}
+            订单状态:{{item.status == '审核' ? '待收货' : '已收货'}}
         </view>
         <view class="exp">
-            收货地址:{{item.address || ' --'}}
-        </view>
-        <view class="exp">
-            单据时间:{{item.billdate|| ' --'}}
+            审核时间:{{item.checkdate || ' --'}}
         </view>
         <view class="exp">
-            审核时间:{{item.checkdate || ' --'}}
+            备注:{{item.remarks|| ' --'}}
         </view>
     </navigator>
 </view>

+ 7 - 0
pages/index/index.js

@@ -23,6 +23,9 @@ Page({
 		this.getCollectCount();
 		this.updateMsgCount();
 	},
+	onShow() {
+		// if (wx.getAccountInfoSync().miniProgram.envVersion !== 'release') this.refreshData();
+	},
 	/**
 	 * 更新站点信息
 	 * 主要用来渲染首页的banner和宫格
@@ -113,6 +116,10 @@ Page({
 					name: "打款凭证",
 					path: "/packageA/remitVoucher/index",
 					icon: "work-dakuanpingzheng"
+				}, {
+					name: "物流单",
+					path: "/packageA/shipment/index",
+					icon: "icon-shouhuo"
 				}, {
 					name: "返退单",
 					path: "/packageA/returnOne/index",