|
|
@@ -420,6 +420,18 @@ Page({
|
|
|
//采购退货
|
|
|
if (this.data.item == Constants.billType.purReturn) {
|
|
|
this.setData({
|
|
|
+ contentList: [{
|
|
|
+ code: 'amount',
|
|
|
+ content: 0,
|
|
|
+ type: 'number',
|
|
|
+ title: mixins.$t("totalAmount")
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'count',
|
|
|
+ code: 'count',
|
|
|
+ quantity: 0
|
|
|
+ }
|
|
|
+ ],
|
|
|
popContent: [{
|
|
|
code: 'itemQty',
|
|
|
type: 'step',
|
|
|
@@ -433,11 +445,11 @@ Page({
|
|
|
title: mixins.$t("packageBox"),
|
|
|
},
|
|
|
{
|
|
|
- code: 'priceStandard',
|
|
|
+ code: 'priceInto',
|
|
|
type: 'number',
|
|
|
title: mixins.$t("purReturnPrice"),
|
|
|
required: true,
|
|
|
- readonly: true,
|
|
|
+ readonly: false,
|
|
|
center: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -446,7 +458,7 @@ Page({
|
|
|
choosePopupType: '',
|
|
|
title: mixins.$t("warehouseId"),
|
|
|
type: 'choose',
|
|
|
- urlKey: 'selectInventorySku',
|
|
|
+ urlKey: 'openingInventory',
|
|
|
},
|
|
|
{
|
|
|
code: 'nonStdCode',
|
|
|
@@ -883,7 +895,8 @@ Page({
|
|
|
item.sumPrice = item.priceOut * item.itemQty
|
|
|
}
|
|
|
if (this.data.item == Constants.billType.purReturn) { //采购退货
|
|
|
- item.sumPrice = item.priceStandard ? item.priceStandard * item.itemQty : 0
|
|
|
+ item.priceInto = item.pricePurchase ? item.pricePurchase : 0 //采购价
|
|
|
+ item.sumPrice = item.priceInto * item.itemQty
|
|
|
}
|
|
|
if(this.data.item == Constants.billType.sale){
|
|
|
item = this.priceSystem(item, 'priceSale') //根据价格体系取值
|
|
|
@@ -1102,7 +1115,7 @@ Page({
|
|
|
dataItem.sumPrice = dataItem.priceOut * dataItem.itemQty
|
|
|
}
|
|
|
if (this.data.item == Constants.billType.purReturn) {
|
|
|
- dataItem.sumPrice = dataItem.priceStandard * dataItem.itemQty
|
|
|
+ dataItem.sumPrice = dataItem.priceInto * dataItem.itemQty
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1204,7 +1217,7 @@ Page({
|
|
|
choosedGoodsList: choosedGoodsList
|
|
|
})
|
|
|
//销售订单需要计算底部按钮
|
|
|
- if (this.data.item == Constants.billType.sale || this.data.item == Constants.billType.saleOut || this.data.item == Constants.billType.saleOutReturn|| this.data.item == Constants.billType.inventory ) {
|
|
|
+ if (this.data.item == Constants.billType.sale || this.data.item == Constants.billType.saleOut || this.data.item == Constants.billType.saleOutReturn|| this.data.item == Constants.billType.inventory || this.data.item == Constants.billType.purReturn) {
|
|
|
this.calculateParameters()
|
|
|
}
|
|
|
},
|
|
|
@@ -1242,6 +1255,8 @@ Page({
|
|
|
sumPrice += (Number(res.priceOut) * Number(res.itemQty))
|
|
|
} else if (this.data.billType == 'sale') {
|
|
|
sumPrice += (Number(res.priceSale) * Number(res.itemQty))
|
|
|
+ }else if (this.data.billType == 'purReturn') {
|
|
|
+ sumPrice += (Number(res.priceInto) * Number(res.itemQty))
|
|
|
}
|
|
|
|
|
|
sumQty += Number(res.itemQty)
|