feat(库位管理): 添加强制释放库位功能并更新版本至1.3.24
- 在actualWarehouse.js中添加forceReleaseLocation API - 在easycode.vue中添加释放库位按钮及相关逻辑 - 更新应用版本号至1.3.24 - 完善钢卷详情显示逻辑,支持显示更多信息
This commit is contained in:
@@ -52,3 +52,16 @@ export function treeActualWarehouseTwoLevel(query) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 强制释放库位
|
||||
*/
|
||||
export function forceReleaseLocation(actualWarehouseId) {
|
||||
if (!actualWarehouseId) {
|
||||
throw new Error('actualWarehouseId is required');
|
||||
}
|
||||
return request({
|
||||
url: '/wms/actualWarehouse/release/' + actualWarehouseId,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
// 应用名称
|
||||
name: "ruoyi-app",
|
||||
// 应用版本
|
||||
version: "1.3.23",
|
||||
version: "1.3.24",
|
||||
// 应用logo
|
||||
logo: "/static/logo.jpg",
|
||||
// 官方网站
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name" : "科伦普",
|
||||
"appid" : "__UNI__E781B49",
|
||||
"description" : "",
|
||||
"versionName" : "1.3.23",
|
||||
"versionName" : "1.3.24",
|
||||
"versionCode" : 1,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -73,13 +73,12 @@ function checkStorageSpace() {
|
||||
function checkUpdate(forceCheck = false) {
|
||||
// 1. 准备本地版本信息
|
||||
const localVersion = plus.runtime.version; // 基座版本
|
||||
const staticVersion = '1.3.23'; // 静态默认版本
|
||||
const staticVersion = '1.3.24'; // 静态默认版本
|
||||
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本(从存储获取或用默认)
|
||||
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
|
||||
? localWgtVersion
|
||||
: localVersion; // 当前有效版本(取两者较高者)
|
||||
|
||||
|
||||
// 2. 请求远程版本信息
|
||||
uni.request({
|
||||
url: `${baseURL}/version.json?t=${Date.now()}`, // 加时间戳防缓存
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "klp 1.3.23",
|
||||
"version": "klp 1.3.24",
|
||||
"wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt",
|
||||
"apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk"
|
||||
}
|
||||
Reference in New Issue
Block a user