diff --git a/pages/saleForecastList/Detail/Detail.js b/pages/saleForecastList/Detail/Detail.js
index 351724c..b08ff83 100644
--- a/pages/saleForecastList/Detail/Detail.js
+++ b/pages/saleForecastList/Detail/Detail.js
@@ -62,7 +62,7 @@ function GetGoodsInfo(that, dmo, detail) {
detail.Price = res.result.Price;
detail.PolicyPrice = res.result.PolicyPrice;
that.setData({
- dmo: dmo
+ dmo: that.data.dmo
});
});
}
@@ -91,7 +91,8 @@ Page({
rowIdx: -1,
dmo: {},
dateTimeArray1: null,
- dateTime1: null
+ dateTime1: null,
+ backPage: '',
},
onLoad: function (options) {
@@ -106,6 +107,27 @@ 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) {
+ // 在此添加货品价格的请求
+ 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
*/
@@ -360,13 +382,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/saleForecastList/Detail/Detail.wxml b/pages/saleForecastList/Detail/Detail.wxml
index 95cf5cb..fe10207 100644
--- a/pages/saleForecastList/Detail/Detail.wxml
+++ b/pages/saleForecastList/Detail/Detail.wxml
@@ -105,12 +105,41 @@
删除
-
+
+
+
+
+
+
+ 添加存货
+
+
+
+
+
+
+
+
+
+
+ 更多
+
+
+
+
+
+
+
+ 保存
+
+
+
-
+
diff --git a/pages/saleForecastList/Detail/Detail.wxss b/pages/saleForecastList/Detail/Detail.wxss
index 3049cc7..98c1b1d 100644
--- a/pages/saleForecastList/Detail/Detail.wxss
+++ b/pages/saleForecastList/Detail/Detail.wxss
@@ -225,4 +225,56 @@ page {
.text3 {
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/newBill/newBill.js b/pages/saleForecastList/newBill/newBill.js
index 41f7d4d..98973ed 100644
--- a/pages/saleForecastList/newBill/newBill.js
+++ b/pages/saleForecastList/newBill/newBill.js
@@ -104,6 +104,7 @@ Page({
var that = this;
if (this.data.backPage == "goodsNameChoosePage") {
+ this.data.backPage ="";
var goodsArr = app.globalData.goodsNameArray;
app.globalData.goodsNameArray = [];
if (goodsArr.length > 0) {