| | |
| | | // utils.requestFail(errmsg,'/shopping/getEmployeePerformanceList.do'); |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | |
| | | |
| | | detailId = options.doccode; |
| | | formid = options.formid || ''; |
| | | console.log(detailId,formid); |
| | | |
| | | |
| | | }, |
| | | getOrderDetail(){ |
| | | wx.showLoading(); |
| | |
| | | orderDetail: res.data, |
| | | PayableAmount:res.data.PayableAmount, |
| | | TransCosts:res.data.TransCosts, |
| | | // orderStatus: |
| | | // orderStatus: |
| | | }) |
| | | this.newTotalMoney(); |
| | | orderStatus = res.data.StatusWhenSharing |
| | |
| | | handleOrderData(){ |
| | | this.data.orderDetail |
| | | }, |
| | | |
| | | showDialog(){ |
| | | let dialogLayer = this.selectComponent('#dialogLayer'); |
| | | dialogLayer.showDialog(); |
| | | }, |
| | | //立即购买 |
| | | goPay: function(e) { |
| | | wx.navigateTo({ |
| | |
| | | let matcode = e.currentTarget.dataset.matcode; |
| | | let rowid = e.currentTarget.dataset.rowid; |
| | | let quantity = e.currentTarget.dataset.quantity; |
| | | let index = e.currentTarget.dataset.index; |
| | | let list = this.data.orderDetail.list; |
| | | let skuIds = {} |
| | | let data = { |
| | | matcode, |
| | | quantity, |
| | | formid |
| | | }; |
| | | if (list[index].skuId1){ |
| | | for (let i = 0; i < 10; i++) { |
| | | let item = list[index]['skuId'+(i +1)]; |
| | | if (item){ |
| | | skuIds['skuId'+(i +1)] = list[index]['skuId'+(i +1)] |
| | | } else{ |
| | | skuIds['skuId'+(i +1)] = '' |
| | | } |
| | | } |
| | | console.log(skuIds); |
| | | data = { |
| | | matcode, |
| | | quantity, |
| | | formid, |
| | | ...skuIds |
| | | } |
| | | } |
| | | |
| | | wx.showLoading(); |
| | | wx.request({ |
| | |
| | | header: { |
| | | "Cookie": "JSESSIONID=" + wx.getStorageSync('sessionID') |
| | | }, |
| | | data: { |
| | | matcode, |
| | | quantity, |
| | | formid |
| | | }, |
| | | data, |
| | | success: res=> { |
| | | wx.hideLoading(); |
| | | if(!utils.requestError(res)){ |
| | |
| | | // }) |
| | | // }, |
| | | goReceipt: function(e) { |
| | | |
| | | |
| | | wx.showLoading(); |
| | | wx.request({ |
| | | url: utils.getUrl('/shopping/orderReceipt.do'), |
| | |
| | | title: '收货成功', |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | fail: function(errmsg) { |
| | | utils.requestFail(errmsg,'/shopping/orderReceipt.do'); |
| | |
| | | // }, |
| | | // success: res => { |
| | | // utils.requestError(res); |
| | | |
| | | |
| | | // if (res.data.isLogin) { |
| | | // this.setData({ |
| | | // cltcode:res.data.cltcode |
| | |
| | | let price = e.detail.value; |
| | | if(price.trim()==''||parseFloat(price)<0){ |
| | | price = 0; |
| | | |
| | | |
| | | } |
| | | // if(price<0){ |
| | | // price = 0 |
| | |
| | | // console.log(this.data.orderDetail); |
| | | this.handleRequest(); |
| | | } |
| | | }) |
| | | }) |
| | | } catch (error) { |
| | | console.log(error); |
| | | this.handleRequest(); |
| | |
| | | // // utils.showModal(resData['error']['warning'],'提示',false); |
| | | // // return false; |
| | | // // } |
| | | |
| | | |
| | | |
| | | // // }, |
| | | // // fail: function ({ errMsg }) { |
| | |
| | | // // console.log(res.data) |
| | | // let data = JSON.parse(res.data); |
| | | // this.setData({ |
| | | |
| | | |
| | | // }) |
| | | // // wx.hideLoading() |
| | | // // wx.navigateTo({ |
| | |
| | | // } |
| | | // }, |
| | | |
| | | |
| | | |
| | | |
| | | // TotalMoney(){ |
| | | // let total = this.orderDetail.TotalMoney + 1 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }) |