diff --git a/imgs/longWhiteBtn.png b/imgs/longWhiteBtn.png new file mode 100644 index 0000000..c88764d Binary files /dev/null and b/imgs/longWhiteBtn.png differ diff --git a/imgs/whiteBtn.png b/imgs/whiteBtn.png new file mode 100644 index 0000000..d1c821c Binary files /dev/null and b/imgs/whiteBtn.png differ diff --git a/pages/order/detail/detail.js b/pages/order/detail/detail.js index 4896b80..99cdd3a 100644 --- a/pages/order/detail/detail.js +++ b/pages/order/detail/detail.js @@ -99,7 +99,8 @@ Page({ rowIdx: -1, dmo: {}, dateTimeArray1: null, - dateTime1: null + dateTime1: null, + backPage:'', }, onLoad: function(options) { @@ -114,6 +115,26 @@ Page({ }) }, + onShow: function () { + var that = this; + if (this.data.backPage == "goodsNameChoosePage") { + var goodsArr = app.globalData.goodsNameArray; + app.globalData.goodsNameArray = []; + if (goodsArr.length > 0) { + // 在此添加货品价格的请求 + for (var i = 0; i < goodsArr.length; i++) { + let newobj = {}; + this.data.dmo.Details.push(newobj); + var itemIndex = this.data.dmo.Details.length - 1; + var detail = this.data.dmo.Details[itemIndex]; + detail.SaleGoods_ID = goodsArr[i].SaleGoods_ID; + detail.Goods_Name = goodsArr[i].Goods_Name; + GetGoodsInfo(this, this.data.dmo, detail); + } + } + } + }, + /** * 滑动切换tab */ @@ -409,13 +430,63 @@ Page({ }, add: function(e) { - let newobj = {}; - this.data.dmo.Details.push(newobj); - this.setData({ - dmo: this.data.dmo + // let newobj = {}; + // this.data.dmo.Details.push(newobj); + // this.setData({ + // dmo: this.data.dmo + // }) + var dmo = this.data.dmo; + if (dmo.Customer_ID == null) { + wx.showToast({ + title: '请选择购货客户' + }) + return; + } + if (dmo.AccountingUnit_ID == null) { + wx.showToast({ + title: '请选择会计单位' + }) + return; + } + wx.navigateTo({ + url: '../../goodaNameChooseTemplate/goodaNameChooseTemplate?unitID=' + dmo.AccountingUnit_ID + '&customerID' + dmo.Customer_ID, + }) + }, + + // 存货明细页面更多按钮 + moreBtnClick: function (e) { + var that = this; + var itemList = [ + "审核", + "撤销" + ]; + wx.showActionSheet({ + itemList: itemList, + itemColor: "#2689f8", + success: function (res) { + // res.cancel 用户是不是点击了取消按钮 + // res.tapIndex 数组元素的序号,从0开始 + that.moreBtnClickedDetailInfo(itemList[res.tapIndex]); + } }) }, + // 更多 -> 撤销 -> 审核 + moreBtnClickedDetailInfo: function (item) { + if (item == "审核") { + wx.showModal({ + title: "提示", + content: "++++" + item + "++++", + }) + } else { + wx.showModal({ + title: "提示", + content: "++++" + item + "++++", + }) + } + }, + + // 保存 submitForm: function() { var dmo = this.data.dmo; diff --git a/pages/order/detail/detail.wxml b/pages/order/detail/detail.wxml index 73e398d..f9f74cd 100644 --- a/pages/order/detail/detail.wxml +++ b/pages/order/detail/detail.wxml @@ -138,11 +138,36 @@ 删除 - + + + + + + 添加存货 + + + + + + + + + 更多 + + + + + + + 保存 + + + - + diff --git a/pages/order/detail/detail.wxss b/pages/order/detail/detail.wxss index cecf8a0..c37015d 100644 --- a/pages/order/detail/detail.wxss +++ b/pages/order/detail/detail.wxss @@ -228,3 +228,59 @@ page { font-size: 18px; color: rgb(48, 48, 48); } + +.imageView { + height: 80px; + width: 100%; + margin-top: 20rpx; + position: relative; + align-items: center; + justify-content: center; + box-sizing: content-box; +} + +.imageViewNoMargin{ + height: 80px; + width: 100%; + margin-top: -10rpx; + position: relative; + align-items: center; + justify-content: center; + box-sizing: content-box; +} + +.currentImage { + width: 100%; + height: 100%; +} + +.bottomGroupView{ + margin-top: -10rpx; + width: 100%; + height: 80px; + display: flex; + flex-direction: row; +} + +.btnTextView { + position: absolute; + width: 100%; + top:0; + line-height: 65px; + text-align: center; +} + +.btnText { + color: white; + font-size: 20px; +} + +.goodsNameImageToTopFar{ + height: calc(100% - 180px); + background:#EAF1F8; +} + +.blueAddText{ + color: #2689f8; + font-size: 20px; +} diff --git a/pages/order/newBill/newBill.wxml b/pages/order/newBill/newBill.wxml index 24cb68f..b0c070e 100644 --- a/pages/order/newBill/newBill.wxml +++ b/pages/order/newBill/newBill.wxml @@ -148,16 +148,14 @@ - + - 添加存货 + 添加存货 - - @@ -165,7 +163,6 @@ - @@ -173,7 +170,6 @@ - diff --git a/pages/order/newBill/newBill.wxss b/pages/order/newBill/newBill.wxss index 5d651b3..66b7f3e 100644 --- a/pages/order/newBill/newBill.wxss +++ b/pages/order/newBill/newBill.wxss @@ -112,8 +112,6 @@ page { } .add { - display: flex; - flex-direction: row; align-items: center; justify-content: center; border-left: none; @@ -149,10 +147,6 @@ page { background-color: #fff; } -.main-body { - background-color: #fff; -} - .submit { margin-left: 5%; margin-top: 10%; @@ -278,4 +272,9 @@ page { .goodsNameImageToTopFar{ height: calc(100% - 180px); background:#EAF1F8; +} + +.blueAddText{ + color: #2689f8; + font-size: 20px; } \ No newline at end of file