fix: 李红攀:V2.0.008采购入库库位推荐的同步

This commit is contained in:
2026-05-23 16:42:27 +08:00
parent 5f9b83dbda
commit 2169fec9c1
10 changed files with 802 additions and 165 deletions

View File

@@ -74,9 +74,17 @@
<text class="text-28rpx text-[#333] font-semibold">{{ item.productName || '-' }}</text>
<text v-if="item.productBarCode" class="ml-12rpx text-22rpx text-[#999]">{{ item.productBarCode }}</text>
</view>
<text v-if="item.warehouseName" class="text-24rpx text-[#1890ff]">{{ item.warehouseName }}</text>
<view class="flex items-center">
<text v-if="item.warehouseName" class="text-24rpx text-[#1890ff]">{{ item.warehouseName }}</text>
<text v-if="item.locationCode" class="ml-8rpx text-22rpx text-[#52c41a]">[{{ item.locationCode }}]</text>
</view>
</view>
<view class="p-24rpx">
<!-- 批次号 -->
<view v-if="item.batchNo" class="mb-12rpx flex items-center text-26rpx text-[#666]">
<text class="mr-8rpx text-[#999]">批次号</text>
<text class="text-[#e6a23c]">{{ item.batchNo }}</text>
</view>
<!-- 产品规格 -->
<view v-if="item.productSpec" class="mb-12rpx flex items-center text-26rpx text-[#666]">
<text class="mr-8rpx text-[#999]">规格</text>
@@ -170,15 +178,19 @@
<!-- 审核弹窗 -->
<wd-popup v-model="auditVisible" position="bottom" closable @close="auditVisible = false">
<view class="p-32rpx">
<view class="text-32rpx text-[#333] font-semibold mb-32rpx text-center">
<view class="mb-32rpx text-center text-32rpx text-[#333] font-semibold">
采购入库审核
</view>
<view class="mb-24rpx">
<view class="text-26rpx text-[#666] mb-12rpx">是否合格</view>
<view class="mb-12rpx text-26rpx text-[#666]">
是否合格
</view>
<wd-switch v-model="auditForm.isQualified" @change="handleQualifiedChange" />
</view>
<view v-if="!auditForm.isQualified" class="mb-24rpx">
<view class="text-26rpx text-[#666] mb-12rpx">返回方式</view>
<view class="mb-12rpx text-26rpx text-[#666]">
返回方式
</view>
<wd-radio-group v-model="auditForm.returnType" shape="button">
<wd-radio
v-for="opt in RETURN_TYPE_OPTIONS"
@@ -190,14 +202,16 @@
</wd-radio-group>
</view>
<view v-if="!auditForm.isQualified" class="mb-24rpx">
<view class="text-26rpx text-[#666] mb-12rpx">返回备注</view>
<view class="mb-12rpx text-26rpx text-[#666]">
返回备注
</view>
<wd-textarea
v-model="auditForm.returnRemark"
placeholder="请输入返回方式备注"
:maxlength="200"
/>
</view>
<view class="flex gap-24rpx mt-32rpx">
<view class="mt-32rpx flex gap-24rpx">
<wd-button class="flex-1" plain @click="auditVisible = false">
取消
</wd-button>
@@ -246,23 +260,30 @@ const auditForm = reactive({
/** 获取状态文本 */
function getStatusText(status?: number, isQualified?: boolean) {
if (status === 10) return '未审核'
if (status === 20) return isQualified ? '审核' : '不合格'
if (status === 30) return '不合格'
if (status === 10)
return '审核'
if (status === 20)
return isQualified ? '已审核' : '不合格'
if (status === 30)
return '不合格'
return '未知'
}
/** 获取状态样式 */
function getStatusClass(status?: number, isQualified?: boolean) {
if (status === 10) return 'bg-[#fff7e6] text-[#fa8c16]'
if (status === 20) return isQualified ? 'bg-[#f6ffed] text-[#52c41a]' : 'bg-[#fff1f0] text-[#f5222d]'
if (status === 30) return 'bg-[#fff1f0] text-[#f5222d]'
if (status === 10)
return 'bg-[#fff7e6] text-[#fa8c16]'
if (status === 20)
return isQualified ? 'bg-[#f6ffed] text-[#52c41a]' : 'bg-[#fff1f0] text-[#f5222d]'
if (status === 30)
return 'bg-[#fff1f0] text-[#f5222d]'
return 'bg-[#f5f5f5] text-[#999]'
}
/** 获取返回方式标签 */
function getReturnTypeLabel(value?: string | null) {
if (!value) return '-'
if (!value)
return '-'
const option = RETURN_TYPE_OPTIONS.find(opt => opt.value === value)
return option ? option.label : value
}
@@ -310,7 +331,8 @@ function handleQualifiedChange(val: boolean) {
/** 提交审核 */
async function submitAudit() {
if (!props.id) return
if (!props.id)
return
if (!auditForm.isQualified && !auditForm.returnType) {
toast.warning('请选择返回方式')
return