feat(库位管理): 添加强制释放库位功能并更新版本至1.3.24
- 在actualWarehouse.js中添加forceReleaseLocation API - 在easycode.vue中添加释放库位按钮及相关逻辑 - 更新应用版本号至1.3.24 - 完善钢卷详情显示逻辑,支持显示更多信息
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
<button class="type-btn move-btn" @click="handleTranfer">移库</button>
|
||||
<button class="type-btn see-btn" @click="handleSee">查看存储钢卷</button>
|
||||
<button class="type-btn packing-btn" @click="handlePack">打包</button>
|
||||
<button class="type-btn release-btn" @click="handleRelease">释放库位</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -122,25 +123,33 @@
|
||||
<text class="item-label">当前钢卷号</text>
|
||||
<text class="item-value">{{ coilDetail.currentCoilNo || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">逻辑库区</text>
|
||||
<text class="item-value">{{ coilDetail.warehouseName || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">实际库区</text>
|
||||
<text class="item-value">{{ coilDetail.actualWarehouseName || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">重量</text>
|
||||
<text class="item-value">{{ coilDetail.netWeight || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">厂家</text>
|
||||
<text class="item-value">{{ coilDetail.product && coilDetail.product.manufacturer || '-' }}</text>
|
||||
<text class="item-value">{{ (coilDetail.product && coilDetail.product.manufacturer) || (coilDetail.rawMaterial && coilDetail.rawMaterial.manufacturer) || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">材质</text>
|
||||
<text class="item-value">{{ coilDetail.product && coilDetail.product.material || '-' }}</text>
|
||||
<text class="item-value">{{ (coilDetail.product && coilDetail.product.material) || (coilDetail.rawMaterial && coilDetail.rawMaterial.material) || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">规格</text>
|
||||
<text class="item-value">{{ coilDetail.product && coilDetail.product.specification || '-' }}</text>
|
||||
<text class="item-value">{{ (coilDetail.product && coilDetail.product.specification) || (coilDetail.rawMaterial && coilDetail.rawMaterial.specification) || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="item-label">品名</text>
|
||||
<text class="item-value">{{ coilDetail.product && coilDetail.product.productName || '-' }}</text>
|
||||
<text class="item-value">{{ (coilDetail.product && coilDetail.product.productName) || (coilDetail.rawMaterial && coilDetail.rawMaterial.productName) || '-' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -159,6 +168,13 @@
|
||||
@click="handleShipSubmit">
|
||||
发货
|
||||
</button>
|
||||
<button
|
||||
v-if="currentAction == 'release'"
|
||||
:disabled="buttonLoading"
|
||||
:loading="buttonLoading"
|
||||
@click="handleReleaseSubmit">
|
||||
释放库位
|
||||
</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
@@ -183,7 +199,8 @@
|
||||
addPendingAction
|
||||
} from '@/api/wms/pendingAction.js'
|
||||
import {
|
||||
getActualWarehouse
|
||||
getActualWarehouse,
|
||||
forceReleaseLocation
|
||||
} from '@/api/wms/actualWarehouse.js'
|
||||
|
||||
export default {
|
||||
@@ -196,7 +213,7 @@
|
||||
targetWarehouse: null, // 存储选中的目标库区信息
|
||||
bomDialogShow: false, // BOM参数弹窗控制(原有功能补充),
|
||||
mode: 'pda', // pda或camera
|
||||
currentAction: '',
|
||||
currentAction: '', // ship,withdrawShip,release
|
||||
buttonLoading: false,
|
||||
}
|
||||
},
|
||||
@@ -338,6 +355,55 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async handleRelease() {
|
||||
const actualWarehouseId = await this.scan();
|
||||
// 查询真实库区在此处的钢卷
|
||||
const res = await listMaterialCoil({
|
||||
actualWarehouseId,
|
||||
dataType: 1
|
||||
})
|
||||
if (res.total == 0) {
|
||||
uni.showToast({
|
||||
title: '该库区未发现钢卷',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
};
|
||||
if (res.rows.length == 1) {
|
||||
this.coilDetail = res.rows[0]
|
||||
this.currentAction = 'release';
|
||||
this.$refs.shipPopup.open('bottom');
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '数据异常',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async handleReleaseSubmit() {
|
||||
this.buttonLoading = true;
|
||||
try {
|
||||
const res = await forceReleaseLocation(this.coilDetail.actualWarehouseId);
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '释放成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.$refs.shipPopup.close()
|
||||
} else {
|
||||
throw new Error()
|
||||
}
|
||||
} catch {
|
||||
uni.showToast({
|
||||
title: '库区释放失败',
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
this.buttonLoading = false;
|
||||
}
|
||||
},
|
||||
|
||||
// 扫码并创建待操作(原有方法不变)
|
||||
async handleScan(actionType) {
|
||||
|
||||
Reference in New Issue
Block a user