|
|
@@ -17,10 +17,12 @@ Page({
|
|
|
}],
|
|
|
minDate: new Date().getTime(),
|
|
|
contentList: [{
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
}, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
code: 'amount',
|
|
|
content: 0,
|
|
|
type: 'number'
|
|
|
@@ -126,6 +128,9 @@ Page({
|
|
|
if (card.code === 'amount') {
|
|
|
card.content = 0
|
|
|
}
|
|
|
+ if (card.code === 'goodsCount') {
|
|
|
+ card.quantity = 0
|
|
|
+ }
|
|
|
})
|
|
|
this.setData({
|
|
|
cardList: cardList_,
|
|
|
@@ -201,6 +206,9 @@ Page({
|
|
|
if (card.code === 'amount') {
|
|
|
card.content = choooseItemList.sum("itemAmt")
|
|
|
}
|
|
|
+ if (card.code === 'goodsCount') {
|
|
|
+ card.quantity = choooseItemList.sum("itemQty")
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
choooseItemList.forEach(element => {
|
|
|
@@ -240,6 +248,9 @@ Page({
|
|
|
if (card.code === 'amount') {
|
|
|
card.content = 0
|
|
|
}
|
|
|
+ if (card.code === 'goodsCount') {
|
|
|
+ card.quantity = 0
|
|
|
+ }
|
|
|
})
|
|
|
cardList.forEach(card => {
|
|
|
if (card.name === 'items') {
|
|
|
@@ -307,10 +318,12 @@ Page({
|
|
|
if (!data.flgAutoHandle) {
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
}, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
code: 'amount',
|
|
|
content: 0,
|
|
|
type: 'number'
|
|
|
@@ -320,10 +333,12 @@ Page({
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) {
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
}, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
code: 'amount',
|
|
|
content: 0,
|
|
|
type: 'number'
|
|
|
@@ -337,10 +352,12 @@ Page({
|
|
|
type: 'checkbox'
|
|
|
},
|
|
|
{
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
}, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
code: 'amount',
|
|
|
content: 0,
|
|
|
type: 'number'
|
|
|
@@ -387,8 +404,8 @@ Page({
|
|
|
}
|
|
|
element.sumPrice = element.pricePur * element.itemQty
|
|
|
// 原仓库ID 240701
|
|
|
- element.whIdPri = element.whId||''
|
|
|
- element.nonStdCodePri = element.nonStdCode||''
|
|
|
+ element.whIdPri = element.whId || ''
|
|
|
+ element.nonStdCodePri = element.nonStdCode || ''
|
|
|
});
|
|
|
data.supName = data.supplierName
|
|
|
let cardList_ = this.data.cardList
|
|
|
@@ -404,6 +421,9 @@ Page({
|
|
|
if (card.code === 'amount') {
|
|
|
card.content = data.goodsList.sum("itemAmt")
|
|
|
}
|
|
|
+ if (card.code === 'goodsCount') {
|
|
|
+ card.quantity = data.goodsList.sum("itemQty")
|
|
|
+ }
|
|
|
})
|
|
|
let searchEditList = data.goodsList
|
|
|
searchEditList.forEach(element => {
|
|
|
@@ -456,6 +476,9 @@ Page({
|
|
|
if (card.code === 'amount') {
|
|
|
card.content = totalAmout
|
|
|
}
|
|
|
+ if (card.code === 'goodsCount') {
|
|
|
+ card.quantity = formData.goodsList.sum("itemQty")
|
|
|
+ }
|
|
|
})
|
|
|
// 明细的合计金额
|
|
|
cardList.forEach(card => { //循环出商品总共价格
|
|
|
@@ -616,7 +639,7 @@ Page({
|
|
|
pricePur: element.pricePur || '',
|
|
|
skuSpec: element.skuSpec || '',
|
|
|
nonStdCode: element.nonStdCode || '',
|
|
|
- whId: element.whId || '',
|
|
|
+ whId: element.whId || '',
|
|
|
})
|
|
|
});
|
|
|
newList_.forEach(element => {
|
|
|
@@ -629,7 +652,7 @@ Page({
|
|
|
pricePur: element.pricePur || '',
|
|
|
skuSpec: element.skuSpec || '',
|
|
|
nonStdCode: element.nonStdCode || '',
|
|
|
- whId: element.whId || '',
|
|
|
+ whId: element.whId || '',
|
|
|
})
|
|
|
});
|
|
|
console.log('searchEditList', oldList);
|
|
|
@@ -836,10 +859,12 @@ Page({
|
|
|
if (!that.data.flgAutoHandle) {
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
}, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
code: 'amount',
|
|
|
content: 0,
|
|
|
type: 'number'
|
|
|
@@ -849,10 +874,12 @@ Page({
|
|
|
if (this.data.gradeCode == Constants.gradeCode.STD) {
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
}, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
code: 'amount',
|
|
|
content: 0,
|
|
|
type: 'number'
|
|
|
@@ -861,20 +888,20 @@ Page({
|
|
|
} else {
|
|
|
this.setData({
|
|
|
contentList: [{
|
|
|
- code: 'flag',
|
|
|
- title: mixins.$t("purInBoundFlag"),
|
|
|
- type: 'checkbox'
|
|
|
- },
|
|
|
- {
|
|
|
- code: 'need',
|
|
|
- title: mixins.$t('totalAmount'), //'合集金额',
|
|
|
- type: 'str'
|
|
|
- }, {
|
|
|
- code: 'amount',
|
|
|
- content: 0,
|
|
|
- type: 'number'
|
|
|
- }
|
|
|
- ],
|
|
|
+ code: 'flag',
|
|
|
+ title: mixins.$t("purInBoundFlag"),
|
|
|
+ type: 'checkbox'
|
|
|
+ }, {
|
|
|
+ code: 'goodsCount',
|
|
|
+ countName: mixins.$t('goodsQuantity'), //'商品数量',
|
|
|
+ type: 'count',
|
|
|
+ quantity: 0,
|
|
|
+ }, {
|
|
|
+ title: mixins.$t('totalAmount'), //'合计金额',
|
|
|
+ code: 'amount',
|
|
|
+ content: 0,
|
|
|
+ type: 'number'
|
|
|
+ }],
|
|
|
})
|
|
|
}
|
|
|
}
|