注释
This commit is contained in:
@@ -52,7 +52,7 @@ export function submitError(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sunbmitDeatil(query) {
|
export function submitDetail(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/out/submit/list',
|
url: '/out/submit/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
this.subOrderInfo = null
|
this.subOrderInfo = null
|
||||||
},
|
},
|
||||||
handleQuantityInput(value) {
|
handleQuantityInput(value) {
|
||||||
|
console.log(this.subOrderInfo.quantity)
|
||||||
const numValue = Number(value)
|
const numValue = Number(value)
|
||||||
if (numValue <= 0) {
|
if (numValue <= 0) {
|
||||||
this.inQuantity = ''
|
this.inQuantity = ''
|
||||||
@@ -536,26 +537,26 @@
|
|||||||
}
|
}
|
||||||
this.inQuantity = String(numValue)
|
this.inQuantity = String(numValue)
|
||||||
},
|
},
|
||||||
handleQuantityInput(value) {
|
// handleQuantityInput(value) {
|
||||||
const numValue = Number(value)
|
// const numValue = Number(value)
|
||||||
if (numValue <= 0) {
|
// if (numValue <= 0) {
|
||||||
this.inQuantity = ''
|
// this.inQuantity = ''
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: this.$t('inbound.bindMsg.quantityGreaterThanZero'),
|
// title: this.$t('inbound.bindMsg.quantityGreaterThanZero'),
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (numValue > this.subOrderInfo.quantity) {
|
// if (numValue > this.subOrderInfo.quantity) {
|
||||||
this.inQuantity = String(this.subOrderInfo.quantity)
|
// this.inQuantity = String(this.subOrderInfo.quantity)
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: this.$t('inbound.bindMsg.notExceedMaxQuantity'),
|
// title: this.$t('inbound.bindMsg.notExceedMaxQuantity'),
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
this.inQuantity = String(numValue)
|
// this.inQuantity = String(numValue)
|
||||||
},
|
// },
|
||||||
// 处理绑定子单据事件
|
// 处理绑定子单据事件
|
||||||
async handleBindSubOrder() {
|
async handleBindSubOrder() {
|
||||||
// 验证必填信息
|
// 验证必填信息
|
||||||
|
|||||||
@@ -34,7 +34,13 @@
|
|||||||
<view v-for="(material, mIndex) in item.materials" :key="mIndex" class="material-item">
|
<view v-for="(material, mIndex) in item.materials" :key="mIndex" class="material-item">
|
||||||
<view class="material-row" :class="{'checked': material.stockStatus === '1'}">
|
<view class="material-row" :class="{'checked': material.stockStatus === '1'}">
|
||||||
<!-- <text class="material-code">{{ material.productId }}</text> -->
|
<!-- <text class="material-code">{{ material.productId }}</text> -->
|
||||||
<text class="material-name">{{ material.extraField.materialDesc }}</text>
|
<view>
|
||||||
|
<text class="material-name">{{ material.extraField.materialDesc }}</text>
|
||||||
|
<text class="material-status" :class="{'status-checked': material.stockStatus == '1'}">
|
||||||
|
{{ material.stockStatus == '1' ? $t('inbound.qualityCheck.checked') : $t('inbound.qualityCheck.unchecked') }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="material-quantity">
|
<view class="material-quantity">
|
||||||
<text>{{ $t('inbound.qualityCheck.quantity') }}</text>
|
<text>{{ $t('inbound.qualityCheck.quantity') }}</text>
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
@@ -42,12 +48,10 @@
|
|||||||
type="number"
|
type="number"
|
||||||
|
|
||||||
@input="handleQuantityChange(index, mIndex, $event)"
|
@input="handleQuantityChange(index, mIndex, $event)"
|
||||||
style="width: 200rpx; display: inline-block;"
|
style="width: 180rpx; display: inline-block;"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<text class="material-status" :class="{'status-checked': material.stockStatus == '1'}">
|
|
||||||
{{ material.stockStatus == '1' ? $t('inbound.qualityCheck.checked') : $t('inbound.qualityCheck.unchecked') }}
|
|
||||||
</text>
|
|
||||||
<button class="check-button" @click="handleQualityCheck(index, mIndex)">{{ $t('inbound.qualityCheck.check') }}</button>
|
<button class="check-button" @click="handleQualityCheck(index, mIndex)">{{ $t('inbound.qualityCheck.check') }}</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -195,12 +199,31 @@ export default {
|
|||||||
// 质检操作
|
// 质检操作
|
||||||
async handleQualityCheck(index, mIndex) {
|
async handleQualityCheck(index, mIndex) {
|
||||||
const material = this.orderList[index].materials[mIndex]
|
const material = this.orderList[index].materials[mIndex]
|
||||||
|
// if(material.stockStatus == 1)
|
||||||
|
// {
|
||||||
|
// uni.showToast({
|
||||||
|
// title:"该物料已质检",
|
||||||
|
// icon: "error"
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(material.quantity <= 0)
|
||||||
|
{
|
||||||
|
uni.showToast({
|
||||||
|
title:"请输入正确数量",
|
||||||
|
icon: "error"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const response = await updateReceiveStockinStatus({
|
const response = await updateReceiveStockinStatus({
|
||||||
stockinDetailId: material.stockinDetailId,
|
stockinDetailId: material.stockinDetailId,
|
||||||
quantity: material.quantity,
|
quantity: material.quantity,
|
||||||
stockinGuid:material.stockinGuid,
|
stockinGuid:material.stockinGuid,
|
||||||
stockStatus: '1'
|
stockStatus: '1'
|
||||||
})
|
})
|
||||||
|
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `${material.extraField.materialDesc} ${this.$t('inbound.qualityCheck.checkSuccess')}`,
|
title: `${material.extraField.materialDesc} ${this.$t('inbound.qualityCheck.checkSuccess')}`,
|
||||||
@@ -299,7 +322,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.material-detail {
|
.material-detail {
|
||||||
margin: 0 24rpx 24rpx;
|
margin: 0rpx 10rpx 10rpx;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
max-height: 600rpx;
|
max-height: 600rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@@ -320,6 +343,7 @@ export default {
|
|||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: #3a8ee6;
|
background-color: #3a8ee6;
|
||||||
|
background: linear-gradient(to bottom, #537bff 0%, #318aff 70%,);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -331,7 +355,7 @@ export default {
|
|||||||
.material-row {
|
.material-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 15rpx;
|
||||||
gap: 20rpx;
|
gap: 20rpx;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
|
||||||
@@ -343,9 +367,10 @@ export default {
|
|||||||
|
|
||||||
.material-name {
|
.material-name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 28rpx;
|
display: flex;
|
||||||
|
font-size: 26rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
min-width: 200rpx;
|
min-width: 148rpx;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -354,7 +379,7 @@ export default {
|
|||||||
.material-quantity {
|
.material-quantity {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
width: 250rpx;
|
width: 230rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10rpx;
|
gap: 10rpx;
|
||||||
@@ -366,13 +391,14 @@ export default {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
padding: 12rpx 24rpx;
|
padding: 5rpx 24rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
min-width: 100rpx;
|
min-width: 100rpx;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: #3a8ee6;
|
background-color: #3a8ee6;
|
||||||
|
background: linear-gradient(to bottom, #537bff 0%, #318aff 70%,);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.button-disabled {
|
&.button-disabled {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { sunbmitDeatil, bindDetail,bindShelf } from '@/api/out/productOut.js'
|
import { submitDetail, bindDetail,bindShelf } from '@/api/out/productOut.js'
|
||||||
import { getBasWarehouList } from '@/api/bas/bas.js'
|
import { getBasWarehouList } from '@/api/bas/bas.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -239,7 +239,7 @@ export default {
|
|||||||
params.exitId = this.selectedExit
|
params.exitId = this.selectedExit
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await sunbmitDeatil(params)
|
const response = await submitDetail(params)
|
||||||
|
|
||||||
if (response && response.code === 200) {
|
if (response && response.code === 200) {
|
||||||
this.materialList = (response.rows || []).map(item => ({
|
this.materialList = (response.rows || []).map(item => ({
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export default {
|
|||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
animation: slideInFromBottom 0.3s ease-out forwards;
|
animation: slideInFromBottom 0.2s ease-out forwards;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|||||||
@@ -202,10 +202,15 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
|||||||
try {
|
try {
|
||||||
List<String> stockinGuidList = receiveStockCreateInVo.getStockinGuidList();
|
List<String> stockinGuidList = receiveStockCreateInVo.getStockinGuidList();
|
||||||
if (CollUtil.isNotEmpty(stockinGuidList)){
|
if (CollUtil.isNotEmpty(stockinGuidList)){
|
||||||
|
//遍历所有符合条件【guid】的收货单据
|
||||||
for (String receiveStockinGuid : stockinGuidList) {
|
for (String receiveStockinGuid : stockinGuidList) {
|
||||||
|
//通过【guid】获取主单
|
||||||
ReceiveStockin receiveStockin = selectReceiveStockinByStockinGuid(receiveStockinGuid);
|
ReceiveStockin receiveStockin = selectReceiveStockinByStockinGuid(receiveStockinGuid);
|
||||||
|
//设置主单明细【guid】
|
||||||
ReceiveStockinDetail receiveStockinDetailParam = new ReceiveStockinDetail();
|
ReceiveStockinDetail receiveStockinDetailParam = new ReceiveStockinDetail();
|
||||||
receiveStockinDetailParam.setStockinGuid(receiveStockinGuid);
|
receiveStockinDetailParam.setStockinGuid(receiveStockinGuid);
|
||||||
|
|
||||||
|
//获取每个单据的子单明细
|
||||||
List<ReceiveStockinDetail> list = iReceiveStockinDetailService.selectReceiveStockinDetailList(receiveStockinDetailParam);
|
List<ReceiveStockinDetail> list = iReceiveStockinDetailService.selectReceiveStockinDetailList(receiveStockinDetailParam);
|
||||||
if (CollUtil.isNotEmpty(list)){
|
if (CollUtil.isNotEmpty(list)){
|
||||||
Optional<ReceiveStockinDetail> first = list.stream().filter(x -> x.getStockStatus().equals("0")).findFirst();
|
Optional<ReceiveStockinDetail> first = list.stream().filter(x -> x.getStockStatus().equals("0")).findFirst();
|
||||||
@@ -215,6 +220,7 @@ public class ReceiveStockinServiceImpl implements IReceiveStockinService
|
|||||||
return AjaxResult.error(MessageUtils.message("error.message29"));
|
return AjaxResult.error(MessageUtils.message("error.message29"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//生成基于收货单据属性的入库单据属性
|
||||||
InStockin inStockin = getInStockinByReceiveStockin(receiveStockin);
|
InStockin inStockin = getInStockinByReceiveStockin(receiveStockin);
|
||||||
//插入入库单据
|
//插入入库单据
|
||||||
inStockinServicel.insertInStockin(inStockin);
|
inStockinServicel.insertInStockin(inStockin);
|
||||||
|
|||||||
@@ -81,20 +81,23 @@ public class ReceiveStockinDetailServiceImpl implements IReceiveStockinDetailSer
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int updateReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail) {
|
public int updateReceiveStockinDetail(ReceiveStockinDetail receiveStockinDetail) {
|
||||||
try {
|
try {
|
||||||
receiveStockinDetailMapper.updateReceiveStockinDetail(receiveStockinDetail);
|
//更新指定收货子单
|
||||||
|
receiveStockinDetailMapper.updateReceiveStockinDetail(receiveStockinDetail);
|
||||||
ReceiveStockinDetail receiveStockinDetail1 = new ReceiveStockinDetail();
|
ReceiveStockinDetail receiveStockinDetail1 = new ReceiveStockinDetail();
|
||||||
|
|
||||||
receiveStockinDetail1.setStockinId(receiveStockinDetail.getStockinGuid());
|
receiveStockinDetail1.setStockinId(receiveStockinDetail.getStockinGuid());
|
||||||
List<ReceiveStockinDetail> receiveStockinDetails = receiveStockinDetailMapper.selectReceiveStockinDetailList(receiveStockinDetail1);
|
List<ReceiveStockinDetail> receiveStockinDetails = receiveStockinDetailMapper.selectReceiveStockinDetailList(receiveStockinDetail1);
|
||||||
//过滤掉receiveStockinDetails中stockStatus等于1的数据
|
|
||||||
|
//过滤掉receiveStockinDetails中【stockStatus】等于1的数据
|
||||||
receiveStockinDetails = receiveStockinDetails.stream()
|
receiveStockinDetails = receiveStockinDetails.stream()
|
||||||
.filter(detail -> !"1".equals(detail.getStockStatus()))
|
.filter(detail -> !"1".equals(detail.getStockStatus()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (receiveStockinDetails.isEmpty()) {
|
if (receiveStockinDetails.isEmpty()) {
|
||||||
ReceiveStockCreateInVo receiveStockCreateInVo = new ReceiveStockCreateInVo();
|
ReceiveStockCreateInVo receiveStockCreateInVo = new ReceiveStockCreateInVo();
|
||||||
List<String> strings = new ArrayList<>();
|
List<String> guids = new ArrayList<>();
|
||||||
strings.add(receiveStockinDetail.getStockinGuid());
|
guids.add(receiveStockinDetail.getStockinGuid());
|
||||||
receiveStockCreateInVo.setStockinGuidList(strings);
|
receiveStockCreateInVo.setStockinGuidList(guids);
|
||||||
receiveStockinService.createStockin(receiveStockCreateInVo);
|
receiveStockinService.createStockin(receiveStockCreateInVo);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user