feat: 更新版本号至1.3.23并新增真实库区选择器组件
refactor(warehouse-picker): 重构逻辑库区选择器组件 feat(actual-warehouse-picker): 新增真实库区选择器组件 fix(easycode.vue): 调整钢卷质量状态校验逻辑 style(search.vue): 优化表单样式和字段显示
This commit is contained in:
@@ -500,73 +500,11 @@
|
||||
this.$refs.shipPopup.open('bottom');
|
||||
this.currentAction = 'ship';
|
||||
this.coilDetail = coilRes.data
|
||||
|
||||
// uni.showModal({
|
||||
// cancelText: '取消',
|
||||
// confirmText: '确认',
|
||||
// title: '确定要将钢卷号为:' + coilRes.data.currentCoilNo + '发货吗?',
|
||||
// showCancel: true,
|
||||
// success: async (res) => {
|
||||
// console.log(res)
|
||||
// if (res.cancel) {
|
||||
// uni.showToast({
|
||||
// title: '已取消发货',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
// try {
|
||||
// // 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||
// if (!['A+', 'A', 'A-', 'B+'].includes(coilRes.data.qualityStatus)) {
|
||||
// uni.showToast({
|
||||
// title: '只能发货B+以上品质的钢卷',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// // 1. 更新钢卷状态为已发货
|
||||
// await exportCoil(coilRes.data.coilId);
|
||||
|
||||
// // 2. 插入一条已完成的待操作记录
|
||||
// await addPendingAction({
|
||||
// coilId: coilRes.data.coilId,
|
||||
// currentCoilNo: coilRes.data.currentCoilNo,
|
||||
// actionType: 402, // 402=发货
|
||||
// actionStatus: 2, // 直接标记为完成状态
|
||||
// scanTime: new Date(),
|
||||
// scanDevice: this.getDeviceInfo(),
|
||||
// priority: 0, // 0=普通
|
||||
// sourceType: 'scan',
|
||||
// warehouseId: coilRes.data.warehouseId,
|
||||
// processTime: new Date(),
|
||||
// completeTime: new Date()
|
||||
// });
|
||||
|
||||
// uni.showToast({
|
||||
// title: '发货成功',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.error('发货失败:', error);
|
||||
// uni.showToast({
|
||||
// title: error?.message || '发货失败',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// fail() {
|
||||
// uni.showToast({
|
||||
// title: '已取消发货',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// uni.hideLoading();
|
||||
},
|
||||
|
||||
async handleShipSubmit() {
|
||||
try {
|
||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+,B,B-其中之一
|
||||
if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.coilDetail.qualityStatus)
|
||||
&& !(this.coilDetail.qualityStatus == null
|
||||
|| this.coilDetail.qualityStatus == undefined
|
||||
|
||||
@@ -7,23 +7,22 @@
|
||||
</view>
|
||||
|
||||
<!-- 当前钢卷号 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item form-item-optional">
|
||||
<text class="form-label">入场钢卷号</text>
|
||||
<input v-model="form.enterCoilNo" placeholder="请输入当前钢卷号" class="form-input"
|
||||
:disabled="coilDetail.dataType === 0" :class="{ 'form-input-disabled': coilDetail.dataType === 0 }" />
|
||||
:disabled="coilDetail.dataType === 0" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="form-item form-item-optional">
|
||||
<text class="form-label">当前钢卷号</text>
|
||||
<input v-model="form.currentCoilNo" placeholder="请输入当前钢卷号" class="form-input"
|
||||
:disabled="coilDetail.dataType === 0" :class="{ 'form-input-disabled': coilDetail.dataType === 0 }" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 班组 -->
|
||||
<view class="form-item">
|
||||
<view class="form-item form-item-optional">
|
||||
<text class="form-label">班组</text>
|
||||
<input v-model="form.team" placeholder="请输入班组名称" class="form-input" :disabled="coilDetail.dataType === 0"
|
||||
:class="{ 'form-input-disabled': coilDetail.dataType === 0 }" />
|
||||
<input v-model="form.team" placeholder="请输入班组名称" class="form-input" />
|
||||
</view>
|
||||
|
||||
<!-- 库区选择 -->
|
||||
@@ -32,11 +31,11 @@
|
||||
<klp-warehouse-picker v-model="form.warehouseId" :disabled="coilDetail.dataType === 0" placeholder="请选择目标库区" />
|
||||
</view>
|
||||
|
||||
<!-- <view class="form-item form-item-optional">
|
||||
<view class="form-item form-item-optional">
|
||||
<text class="form-label-optional">真实库区</text>
|
||||
<klp-warehouse-picker v-model="form.actualWarehouseId" :disabled="coilDetail.dataType === 0"
|
||||
placeholder="请选择目标库区" ware-type="actual" />
|
||||
</view> -->
|
||||
<klp-actual-warehouse-picker v-model="form.actualWarehouseId" :disabled="coilDetail.dataType === 0"
|
||||
placeholder="请选择目标库区" />
|
||||
</view>
|
||||
|
||||
<!-- 物品类型、产品、原材料选择(使用封装组件) -->
|
||||
<klp-material-picker
|
||||
@@ -84,15 +83,12 @@
|
||||
<!-- 长度 -->
|
||||
<view class="form-item form-item-optional">
|
||||
<text class="form-label-optional">长度 (米)</text>
|
||||
<input v-model="form.length" type="digit" placeholder="请输入长度(选填)" class="form-input"
|
||||
<input v-model="form.length" type="digit" placeholder="请输入长度" class="form-input"
|
||||
:disabled="coilDetail.dataType === 0" :class="{ 'form-input-disabled': coilDetail.dataType === 0 }" />
|
||||
</view>
|
||||
<!-- ✅ 移除原查询按钮 -->
|
||||
</view>
|
||||
|
||||
<view v-show='currentView == "list"' class="list-wrap">
|
||||
<!-- ✅ 移除原重新查找按钮的外层容器 -->
|
||||
|
||||
<!-- 列表中尽可能多的展示信息 -->
|
||||
<uni-list v-if="list.length > 0">
|
||||
<uni-list-item
|
||||
@@ -131,7 +127,7 @@
|
||||
<text class="item-value">{{ coilDetail.currentCoilNo || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">供应商卷号</text>
|
||||
<text class="item-label">厂家卷号</text>
|
||||
<text class="item-value">{{ coilDetail.supplierCoilNo || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
@@ -563,11 +559,11 @@
|
||||
margin-bottom: 15rpx;
|
||||
font-weight: 500;
|
||||
|
||||
&::before {
|
||||
content: '*';
|
||||
color: #ff4d4f;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
// &::before {
|
||||
// content: '*';
|
||||
// color: #ff4d4f;
|
||||
// margin-right: 6rpx;
|
||||
// }
|
||||
}
|
||||
|
||||
.form-label-optional {
|
||||
|
||||
Reference in New Issue
Block a user