Commit 72ddf67c authored by 沈翠玲's avatar 沈翠玲

销售出库

parent 2b79b371
......@@ -18,12 +18,12 @@
</view>
<view class="right">
<u-icon name="plus" color="#000" size="32" @click="addKC(ele)"></u-icon>
<view class="items">{{outQuantity(ele.materialNo)}}/{{ele.deliverQuantity}}pcs</view>
<view class="items">{{outQuantity(ele.materialNo, ele.deliverQuantity)}}/{{ele.deliverQuantity}}pcs</view>
</view>
</view>
<view class="detail-box">
<template v-for="(item, index) in list">
<view class="detail-line-wrap" v-if="item.materialNo === ele.materialNo && item.outQuantity" :key="item.materialNo + '444' + index" @click="handleDetail(item)">
<view class="detail-line-wrap" v-if="item.materialNo === ele.materialNo && item.deliverQuantity === ele.deliverQuantity && item.outQuantity" :key="item.materialNo + '444' + index" @click="handleDetail(item)">
<view class="detail-line">
<text>{{item.warehouse}}|{{item.location}}</text>
<text style="margin-left: auto">{{item.outQuantity}}pcs</text>
......@@ -110,32 +110,6 @@ export default {
saleOutNo: this.order
})
.then(({data}) => {
data = {
"applyNo": "20250315003",
"data": [
{
"materialNo": "G000000015",
"materialName": "1A7312932M(焊丝)",
"planOutDate": "20250401",
"unit": "Kg",
"deliverQuantity": 1660.000000
},
{
"materialNo": "G000000015",
"materialName": "1A7312932M(焊丝)",
"planOutDate": "20250401",
"unit": "Kg",
"deliverQuantity": 2694.000000
},
{
"materialNo": "G000000015",
"materialName": "1A7312932M(焊丝)",
"planOutDate": "20250401",
"unit": "Kg",
"deliverQuantity": 646.000000
}
]
}
if (data && data.applyNo) {
this.applyNo = data.applyNo
this.list = data.data
......@@ -198,9 +172,9 @@ export default {
const arr = y.filter(i => i.materialNo = materialNo)
return arr.reduce((pre, cur) => pre + Number(cur.deliverQuantity), 0)
},
outQuantity(materialNo) {
outQuantity(materialNo, deliverQuantity) {
const y = JSON.parse(JSON.stringify(this.list))
const arr = y.filter(i => i.materialNo === materialNo)
const arr = y.filter(i => i.materialNo === materialNo && i.deliverQuantity === deliverQuantity)
const num = arr.reduce((pre, cur) => pre + (cur.outQuantity ? Number(cur.outQuantity) : 0), 0)
return isNaN(num) ? 0 : num
},
......
......@@ -92,7 +92,6 @@ import i18n from '../../lang/index'
return;
}
const data = JSON.parse(JSON.stringify(this.goodsList));
console.log('datadatadata0', data)
uni.$emit('sendkcData', data, this.info);
uni.navigateBack();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment