|
|
@@ -24,7 +24,7 @@ Page({
|
|
|
* @author : 于继渤
|
|
|
*/
|
|
|
getData(params) {
|
|
|
- return this.excute(this.data.orderService, this.data.orderService.selectTotalSingleTapeDetailPage, params);
|
|
|
+ return this.excute(this.data.service, this.data.service.selectByCondDetail, params);
|
|
|
},
|
|
|
/**
|
|
|
* @desc : 设置查询参数
|
|
|
@@ -33,7 +33,8 @@ Page({
|
|
|
*/
|
|
|
setSearchParams(params) {
|
|
|
//销售状态
|
|
|
- params.outStatusList = [Constants.outStatus.outBounded]
|
|
|
+ params.outStatus = Constants.outStatus.outBounded
|
|
|
+ params.outType = Constants.outType.sale
|
|
|
return params
|
|
|
},
|
|
|
|
|
|
@@ -47,14 +48,14 @@ setSearchParams(params) {
|
|
|
let index = e.currentTarget.dataset.index
|
|
|
tableData.forEach(res=>{
|
|
|
res.checked = false
|
|
|
- res.orderItemResponseList.forEach(item=>{
|
|
|
+ res.goodsList.forEach(item=>{
|
|
|
item.checked = false
|
|
|
})
|
|
|
})
|
|
|
tableData[index].checked = !tableData[index].checked
|
|
|
- let orderItemResponseList = tableData[index].orderItemResponseList
|
|
|
- if (orderItemResponseList && orderItemResponseList.length > 0) {
|
|
|
- orderItemResponseList.forEach(res => {
|
|
|
+ let goodsList = tableData[index].goodsList
|
|
|
+ if (goodsList && goodsList.length > 0) {
|
|
|
+ goodsList.forEach(res => {
|
|
|
res.checked = tableData[index].checked
|
|
|
})
|
|
|
}
|
|
|
@@ -76,11 +77,11 @@ setSearchParams(params) {
|
|
|
console.log(index, index_)
|
|
|
tableData.forEach(res=>{
|
|
|
res.checked = false
|
|
|
- // res.orderItemResponseList.forEach(item=>{
|
|
|
+ // res.goodsList.forEach(item=>{
|
|
|
// item.checked = false
|
|
|
// })
|
|
|
})
|
|
|
- tableData[index].orderItemResponseList[index_].checked = !tableData[index].orderItemResponseList[index_].checked
|
|
|
+ tableData[index].goodsList[index_].checked = !tableData[index].goodsList[index_].checked
|
|
|
|
|
|
this.setData({
|
|
|
tableData: tableData
|
|
|
@@ -100,8 +101,8 @@ setSearchParams(params) {
|
|
|
let tableData = this.data.tableData
|
|
|
tableData.forEach(res => {
|
|
|
res.checked = checked
|
|
|
- if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
|
|
|
- res.orderItemResponseList.forEach(item => {
|
|
|
+ if (res.goodsList && res.goodsList.length > 0) {
|
|
|
+ res.goodsList.forEach(item => {
|
|
|
item.checked = checked
|
|
|
})
|
|
|
}
|
|
|
@@ -124,12 +125,12 @@ setSearchParams(params) {
|
|
|
let returnTotalAmount = Number(0)
|
|
|
//过滤出已选数据
|
|
|
tableData.forEach(res => {
|
|
|
- if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
|
|
|
- res.orderItemResponseList.forEach(item => {
|
|
|
+ if (res.goodsList && res.goodsList.length > 0) {
|
|
|
+ res.goodsList.forEach(item => {
|
|
|
if (item.checked) {
|
|
|
- item.priceOut = item.priceStandard
|
|
|
- item.outQty = item.itemQty
|
|
|
- item.outAmt = item.priceOut * item.itemQty
|
|
|
+ // item.priceOut = item.priceStandard
|
|
|
+ item.outQty = item.outQty
|
|
|
+ item.outAmt = item.priceOut * item.outQty
|
|
|
delete item['priceLimited']
|
|
|
delete item['pricePurchase']
|
|
|
delete item['priceWholesale']
|
|
|
@@ -140,7 +141,7 @@ setSearchParams(params) {
|
|
|
})
|
|
|
if (choooseInboundItemList && choooseInboundItemList.length > 0) {
|
|
|
choooseInboundItemList.forEach(res => {
|
|
|
- returnTotalAmount += Number(res.itemQty * res.priceSale)
|
|
|
+ returnTotalAmount += Number(res.outQty * res.priceOut)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -159,7 +160,7 @@ setSearchParams(params) {
|
|
|
toAdd() {
|
|
|
let itemList = this.data.choooseInboundItemList
|
|
|
const eventChannel = this.getOpenerEventChannel();
|
|
|
- eventChannel.emit('bindData', { itemList: itemList,fromNo: itemList[0].orderNo})
|
|
|
+ eventChannel.emit('bindData', { itemList: itemList,fromNo: itemList[0].outNo})
|
|
|
wx.navigateBack({
|
|
|
data: 1
|
|
|
})
|