Ver código fonte

订货单添加出库单 物流单

xiaohaizhao 1 ano atrás
pai
commit
1f28dcfa24

+ 8 - 0
packageA/orderForm/detail.js

@@ -19,6 +19,14 @@ Page({
 			label: "订单进度",
 			icon: "icon-tabcaozuojilu1",
 			model: "#Progress"
+		}, {
+			label: "出库单",
+			icon: "icon-tabrenwu",
+			model: "#Consignment"
+		}, {
+			label: "物流单",
+			icon: "icon-shouhuo",
+			model: "#Shipments"
 		}]
 	},
 	onLoad(options) {

+ 3 - 1
packageA/orderForm/detail.json

@@ -2,6 +2,8 @@
     "usingComponents": {
         "Product": "./modules/product/index",
         "Yl_Attachment": "/components/Yl_Attachment/index",
-        "Progress": "./modules/progress/index"
+        "Progress": "./modules/progress/index",
+        "Consignment": "./modules/consignment/index",
+        "Shipments": "./modules/shipments/index"
     }
 }

+ 2 - 0
packageA/orderForm/detail.wxml

@@ -61,6 +61,8 @@
     <Product slot='产品明细' id='Product' disabled="{{detail.status!='新建'}}" />
     <Yl_Attachment slot='附件' id='Yl_Attachment' ownertable="sa_order" ownerid="{{detail.sa_orderid}}" disabled="{{detail.status!='新建'}}" />
     <Progress slot='订单进度' id='Progress' />
+    <Consignment slot='出库单' id='Consignment' />
+    <Shipments slot='物流单' id='Shipments' />
 </Yl_FunTabs>
 
 <view style="height: 130rpx;" />

+ 38 - 0
packageA/orderForm/modules/consignment/index.js

@@ -0,0 +1,38 @@
+const _Http = getApp().globalData.http;
+Component({
+  properties: {},
+  data: {
+    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": "20230815151203",
+        "version": 1,
+        content
+      }).then(res => {
+        console.log("出货列表", res)
+        if (res.msg != '成功') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        content.pageNumber = res.pageNumber + 1;
+        content.pageSize = res.pageSize;
+        content.pageTotal = res.pageTotal;
+        content.total = res.total;
+        this.setData({
+          list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+          content
+        })
+      })
+    },
+  }
+})

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

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

+ 16 - 0
packageA/orderForm/modules/consignment/index.scss

@@ -0,0 +1,16 @@
+.item {
+	margin-top: 20rpx;
+	background-color: #fff;
+	width: 100vw;
+	box-sizing: border-box;
+	padding: 20rpx 30rpx;
+
+	.title {
+		font-weight: bold;
+	}
+
+	.row {
+		font-size: 26rpx;
+		margin-top: 6rpx;
+	}
+}

+ 7 - 0
packageA/orderForm/modules/consignment/index.wxml

@@ -0,0 +1,7 @@
+<navigator class="item" url="#" wx:for="{{list}}" wx:key="st_stockbillid">
+	<view class="title">{{item.billno}}</view>
+	<view class="row">单据日期:{{item.billdate||" --"}}</view>
+	<view class="row">状态:{{item.status||" --"}}</view>
+	<view class="row">备注:{{item.remarks||" --"}}</view>
+</navigator>
+<Yl_Empty wx:if="{{list.length==0}}" />

+ 38 - 0
packageA/orderForm/modules/shipments/index.js

@@ -0,0 +1,38 @@
+const _Http = getApp().globalData.http;
+Component({
+  properties: {},
+  data: {
+    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": "20221205111402",
+        "version": 1,
+        content
+      }).then(res => {
+        console.log("物流单列表", res)
+        if (res.msg != '成功') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        content.pageNumber = res.pageNumber + 1;
+        content.pageSize = res.pageSize;
+        content.pageTotal = res.pageTotal;
+        content.total = res.total;
+        this.setData({
+          list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+          content
+        })
+      })
+    },
+  }
+})

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

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

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


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

@@ -0,0 +1 @@
+<list list='{{list}}' />