diff --git a/pages/saleOutStore/saleOutStore.json b/pages/saleOutStore/saleOutStore.json
index 40e7eda..e392493 100644
--- a/pages/saleOutStore/saleOutStore.json
+++ b/pages/saleOutStore/saleOutStore.json
@@ -1,5 +1,5 @@
{
"navigationBarBackgroundColor": "white",
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "出库列表"
+ "navigationBarTitleText": "出库单列表"
}
\ No newline at end of file
diff --git a/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.js b/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.js
index f963d94..4afdbae 100644
--- a/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.js
+++ b/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.js
@@ -3,31 +3,29 @@ const app = getApp();
var network = require("../../../utils/net.js");
var timechage = require("../../../utils/dateTimeUtil.js");
var LoadOrder = '/MainSystem/B3MiniProgramRpc/XuRpcs/Driver/SaleOutStoreRpc/LoadSaleOutStore'
+var billConfirm = '/MainSystem/B3MiniProgramRpc/XuRpcs/Driver/SaleOutStoreRpc/BillConfirm'
Page({
data: {
currentTab: 0,
- winHeight: 0,
+ winHeight: app.globalData.winHeight,
orderInfo: {},
},
onLoad: function (options) {
var that = this;
let ID = Number(options.id);
- wx.getSystemInfo({
- success: function (res) {
- that.setData({
- winWidth: res.windowWidth,
- winHeight: res.windowHeight
- });
- }
- });
var method = LoadOrder;
var params = [ID];
network.transfer_request(method, params, function (res) {
res.result.LoadTime = timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), 'Y-M-D h:m');
res.result.OrderDate = timechage.formatTimeTwo(res.result.OrderDate.substring(6, 19), 'Y-M-D h:m');
+ if (res.result.Details.length > 0){
+ for (var i = 0; i < res.result.Details.length; i++){
+ res.result.Details[i].ConfirmNumber = res.result.Details[i].UnitNumber;
+ }
+ }
that.setData({
orderInfo: res.result,
})
@@ -36,7 +34,37 @@ Page({
// 点击输入的确认数量
getConfirmNumber:function(e){
+ var value = e.detail.value;
+ var index = event.currentTarget.dataset.index;
+ this.data.orderInfo.Details[index].ConfirmNumber = value;
+ this.setData({
+ orderInfo: this.data.orderInfo
+ });
+ },
+ // 保存按钮点击
+ billConfirm: function () {
+ var detailsArray = this.data.orderInfo.Details;
+ let getArr = [];
+ for (var i = 0; i < detailsArray.length; i++) {
+ var dmo = {
+ ID: detailsArray[i].ID,
+ Number: detailsArray[i].ConfirmNumber,
+ }
+ getArr.push(dmo);
+ }
+ var method = billConfirm;
+ var params = [this.data.orderInfo.ID, getArr];
+ network.transfer_request(method, params, function (res) {
+ wx.showToast({
+ title: '信息变更操作成功',
+ success: function (res) {
+ wx.navigateBack({
+ delta: 1
+ })
+ }
+ })
+ })
},
/**
@@ -63,4 +91,5 @@ Page({
}
},
+
})
\ No newline at end of file
diff --git a/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.wxml b/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.wxml
index 4f109ca..3c68c9e 100644
--- a/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.wxml
+++ b/pages/saleOutStore/saleOutStoreDetail/saleOutStoreDetail.wxml
@@ -82,14 +82,6 @@
-
-
@@ -116,6 +108,15 @@
+
+
+
+
+ 确定
+
+
+
+
@@ -157,13 +158,13 @@
-
+