将每一步的钢卷二维码进行保存,新步骤采用新码
This commit is contained in:
@@ -32,9 +32,18 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 历史码提示 -->
|
||||
<view class="warning-card" v-if="form.coilId && qrcodeStatus === 0">
|
||||
<view class="warning-icon">⚠️</view>
|
||||
<view class="warning-content">
|
||||
<text class="warning-title">历史二维码</text>
|
||||
<text class="warning-desc">此二维码已失效,不允许进行分卷操作</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 分卷列表 -->
|
||||
<view class="form-card" v-if="form.coilId" @click="closeWarehouseList">
|
||||
<view class="form-card" v-if="form.coilId && qrcodeStatus === 1" @click="closeWarehouseList">
|
||||
<view class="card-title">
|
||||
<text class="title-dot"></text>
|
||||
<text class="title-text">分卷配置</text>
|
||||
@@ -215,7 +224,8 @@ export default {
|
||||
warehouseSearchKeyword: '',
|
||||
filteredWarehousesInPicker: [],
|
||||
currentPickerItemIndex: -1,
|
||||
loading: false
|
||||
loading: false,
|
||||
qrcodeStatus: 1 // 二维码状态:0=历史码,1=当前有效码
|
||||
}
|
||||
},
|
||||
|
||||
@@ -348,6 +358,19 @@ export default {
|
||||
const enterCoilNo = content.enter_coil_no;
|
||||
const currentCoilNo = content.current_coil_no;
|
||||
|
||||
// 保存二维码状态
|
||||
this.qrcodeStatus = qrcodeRecord.status || 1;
|
||||
|
||||
// 如果是历史码,直接拒绝
|
||||
if (this.qrcodeStatus === 0) {
|
||||
uni.showModal({
|
||||
title: '历史二维码',
|
||||
content: '此二维码已失效,不允许进行分卷操作,请使用最新二维码',
|
||||
showCancel: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!enterCoilNo) {
|
||||
throw new Error('二维码中未包含有效的入场钢卷号');
|
||||
}
|
||||
@@ -478,6 +501,16 @@ export default {
|
||||
|
||||
// 提交分卷
|
||||
handleConfirm() {
|
||||
// 历史二维码不允许分卷
|
||||
if (this.qrcodeStatus === 0) {
|
||||
uni.showModal({
|
||||
title: '历史二维码',
|
||||
content: '此二维码已失效,不允许进行分卷操作,请使用最新二维码',
|
||||
showCancel: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 验证所有分卷都有钢卷号和班组
|
||||
for (let i = 0; i < this.splitCoils.length; i++) {
|
||||
if (!this.splitCoils[i].currentCoilNo) {
|
||||
|
||||
Reference in New Issue
Block a user