diff --git a/pages/order/detail/detail.wxml b/pages/order/detail/detail.wxml index 48ba0dd..73e398d 100644 --- a/pages/order/detail/detail.wxml +++ b/pages/order/detail/detail.wxml @@ -100,9 +100,12 @@ 存货名称 - - {{item.Goods_Name?item.Goods_Name:"请选择存货"}} + + {{item.Goods_Name}} + diff --git a/pages/order/newBill/newBill.js b/pages/order/newBill/newBill.js index f7eff82..a1854bc 100644 --- a/pages/order/newBill/newBill.js +++ b/pages/order/newBill/newBill.js @@ -100,7 +100,8 @@ Page({ Details: [], }, dateTimeArray1: null, - dateTime1: null + dateTime1: null, + backPage:"", }, onLoad: function(options) { @@ -108,6 +109,26 @@ Page({ setTime(that) }, + 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 */ @@ -359,10 +380,22 @@ Page({ // 点击添加存货 add: function(e) { - 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, }) }, diff --git a/pages/order/newBill/newBill.wxml b/pages/order/newBill/newBill.wxml index 0ba70b8..24cb68f 100644 --- a/pages/order/newBill/newBill.wxml +++ b/pages/order/newBill/newBill.wxml @@ -95,50 +95,87 @@ - - - - 存货名称 - - {{item.Goods_Name?item.Goods_Name:"请选择存货"}} + + + + + + 存货名称 + + {{item.Goods_Name}} + - - + + + + + 报货数量 + + + - - 报货数量 - - - + + 辅 数 量 + + + - - 辅 数 量 - - - + + 单 价 + + + + + + 政策单价 + {{item.PolicyPrice}} + + - - 单 价 - - + 删除 + + + + + - - 政策单价 - {{item.PolicyPrice}} + + + + + 添加存货 - + + + + + + + + + 更多 + + + + + + + + 保存 + + - 删除 - - - - diff --git a/pages/order/newBill/newBill.wxss b/pages/order/newBill/newBill.wxss index cecf8a0..5d651b3 100644 --- a/pages/order/newBill/newBill.wxss +++ b/pages/order/newBill/newBill.wxss @@ -228,3 +228,54 @@ 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; +} \ No newline at end of file diff --git a/pages/saleForecastList/Detail/Detail.js b/pages/saleForecastList/Detail/Detail.js index b08ff83..4642871 100644 --- a/pages/saleForecastList/Detail/Detail.js +++ b/pages/saleForecastList/Detail/Detail.js @@ -110,7 +110,6 @@ Page({ onShow: function () { var that = this; if (this.data.backPage == "goodsNameChoosePage") { - this.data.backPage = ""; var goodsArr = app.globalData.goodsNameArray; app.globalData.goodsNameArray = []; if (goodsArr.length > 0) { diff --git a/pages/saleForecastList/Detail/Detail.wxml b/pages/saleForecastList/Detail/Detail.wxml index fe10207..6bdff6e 100644 --- a/pages/saleForecastList/Detail/Detail.wxml +++ b/pages/saleForecastList/Detail/Detail.wxml @@ -70,10 +70,14 @@ 存货名称 - - {{item.Goods_Name?item.Goods_Name:"请选择存货"}} + + {{item.Goods_Name}} + diff --git a/pages/saleForecastList/newBill/newBill.js b/pages/saleForecastList/newBill/newBill.js index 98973ed..5caea76 100644 --- a/pages/saleForecastList/newBill/newBill.js +++ b/pages/saleForecastList/newBill/newBill.js @@ -102,9 +102,7 @@ Page({ onShow: function() { var that = this; - if (this.data.backPage == "goodsNameChoosePage") { - this.data.backPage =""; var goodsArr = app.globalData.goodsNameArray; app.globalData.goodsNameArray = []; if (goodsArr.length > 0) { diff --git a/pages/saleForecastList/newBill/newBill.wxml b/pages/saleForecastList/newBill/newBill.wxml index 5ea4dba..9232027 100644 --- a/pages/saleForecastList/newBill/newBill.wxml +++ b/pages/saleForecastList/newBill/newBill.wxml @@ -71,9 +71,12 @@ 存货名称 - - {{item.Goods_Name?item.Goods_Name:"请选择存货"}} + + {{item.Goods_Name}} +