feat(钢卷管理): 添加撤回发货功能并更新版本号至1.3.20
- 在钢卷管理页面新增撤回发货按钮及相关处理逻辑 - 添加撤回发货API接口cancelExportCoil - 重构发货操作弹窗,支持发货和撤回发货两种操作 - 更新应用版本号至1.3.20,涉及config.js、manifest.json等文件
This commit is contained in:
@@ -75,3 +75,11 @@ export function exportCoil(coilId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 撤回钢卷发货
|
||||||
|
export function cancelExportCoil(coilId) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/materialCoil/withdrawExportCoil/' + coilId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
// 应用名称
|
// 应用名称
|
||||||
name: "ruoyi-app",
|
name: "ruoyi-app",
|
||||||
// 应用版本
|
// 应用版本
|
||||||
version: "1.3.19",
|
version: "1.3.20",
|
||||||
// 应用logo
|
// 应用logo
|
||||||
logo: "/static/logo.jpg",
|
logo: "/static/logo.jpg",
|
||||||
// 官方网站
|
// 官方网站
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name" : "科伦普",
|
"name" : "科伦普",
|
||||||
"appid" : "__UNI__E781B49",
|
"appid" : "__UNI__E781B49",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.3.19",
|
"versionName" : "1.3.20",
|
||||||
"versionCode" : 1,
|
"versionCode" : 1,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="btn-grid quick-grid">
|
<view class="btn-grid quick-grid">
|
||||||
<button class="type-btn ship-btn" @click="handleShip">发货</button>
|
<button class="type-btn ship-btn" @click="handleShip">发货</button>
|
||||||
|
<button class="type-btn cancelship-btn" @click="handleCancelShip">撤回发货</button>
|
||||||
<button class="type-btn move-btn" @click="handleTranfer">移库</button>
|
<button class="type-btn move-btn" @click="handleTranfer">移库</button>
|
||||||
<button class="type-btn see-btn" @click="handleSee">查看存储钢卷</button>
|
<button class="type-btn see-btn" @click="handleSee">查看存储钢卷</button>
|
||||||
<button class="type-btn packing-btn" @click="handlePack">打包</button>
|
<button class="type-btn packing-btn" @click="handlePack">打包</button>
|
||||||
@@ -108,6 +109,58 @@
|
|||||||
|
|
||||||
<!-- <klp-scaner></klp-scaner> -->
|
<!-- <klp-scaner></klp-scaner> -->
|
||||||
<qs-scanlistener ref='pda'></qs-scanlistener>
|
<qs-scanlistener ref='pda'></qs-scanlistener>
|
||||||
|
|
||||||
|
<uni-popup ref="shipPopup" type="bottom">
|
||||||
|
<view style="background-color: white; padding: 20rpx;">
|
||||||
|
<view class="info-card" v-if="coilDetail.coilId">
|
||||||
|
<view class="info-grid">
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="item-label">入场钢卷号</text>
|
||||||
|
<text class="item-value">{{ coilDetail.enterCoilNo || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<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.netWeight || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="item-label">厂家</text>
|
||||||
|
<text class="item-value">{{ coilDetail.product && coilDetail.product.manufacturer || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="item-label">材质</text>
|
||||||
|
<text class="item-value">{{ coilDetail.product && coilDetail.product.material || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="item-label">规格</text>
|
||||||
|
<text class="item-value">{{ coilDetail.product && coilDetail.product.specification || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-item">
|
||||||
|
<text class="item-label">品名</text>
|
||||||
|
<text class="item-value">{{ coilDetail.product && coilDetail.product.productName || '-' }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<button
|
||||||
|
v-if="currentAction == 'withdrawShip'"
|
||||||
|
:disabled="buttonLoading"
|
||||||
|
:loading="buttonLoading"
|
||||||
|
@click="handleCancelShipSubmit">
|
||||||
|
撤回发货
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="currentAction == 'ship'"
|
||||||
|
:disabled="buttonLoading"
|
||||||
|
:loading="buttonLoading"
|
||||||
|
@click="handleShipSubmit">
|
||||||
|
发货
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -123,7 +176,8 @@
|
|||||||
updateMaterialCoilSimple,
|
updateMaterialCoilSimple,
|
||||||
listMaterialCoil,
|
listMaterialCoil,
|
||||||
updateMaterialCoil,
|
updateMaterialCoil,
|
||||||
exportCoil
|
exportCoil,
|
||||||
|
cancelExportCoil
|
||||||
} from '@/api/wms/coil.js'
|
} from '@/api/wms/coil.js'
|
||||||
import {
|
import {
|
||||||
addPendingAction
|
addPendingAction
|
||||||
@@ -141,7 +195,9 @@
|
|||||||
form: {},
|
form: {},
|
||||||
targetWarehouse: null, // 存储选中的目标库区信息
|
targetWarehouse: null, // 存储选中的目标库区信息
|
||||||
bomDialogShow: false, // BOM参数弹窗控制(原有功能补充),
|
bomDialogShow: false, // BOM参数弹窗控制(原有功能补充),
|
||||||
mode: 'pda' // pda或camera
|
mode: 'pda', // pda或camera
|
||||||
|
currentAction: '',
|
||||||
|
buttonLoading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -169,6 +225,54 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async handleCancelShip() {
|
||||||
|
// 撤回发货
|
||||||
|
this.currentAction = 'withdrawShip';
|
||||||
|
const content = await this.getQRCodeContent()
|
||||||
|
let coilId = content.current_coil_id && content.current_coil_id !== 'null' ? content
|
||||||
|
.current_coil_id : null;
|
||||||
|
if (!coilId) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '二维码异常',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const coilRes = await getMaterialCoil(coilId);
|
||||||
|
if (coilRes.data.status == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '钢卷还未发货',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.coilDetail = coilRes.data;
|
||||||
|
this.$refs.shipPopup.open('bottom');
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleCancelShipSubmit() {
|
||||||
|
if (!this.coilDetail.coilId) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '钢卷标识缺失',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const res = await cancelExportCoil(this.coilDetail.coilId)
|
||||||
|
console.log(res)
|
||||||
|
if (res.code != 200) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: res.message || '撤回失败请重试'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
title: this.coilDetail.currentCoilNo + '发货已撤回'
|
||||||
|
})
|
||||||
|
this.$refs.shipPopup.close()
|
||||||
|
},
|
||||||
|
|
||||||
scan(mode = 'camera') {
|
scan(mode = 'camera') {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (mode == 'camera') {
|
if (mode == 'camera') {
|
||||||
@@ -393,68 +497,121 @@
|
|||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.$refs.shipPopup.open('bottom');
|
||||||
|
this.currentAction = 'ship';
|
||||||
|
this.coilDetail = coilRes.data
|
||||||
|
|
||||||
uni.showModal({
|
// uni.showModal({
|
||||||
cancelText: '取消',
|
// cancelText: '取消',
|
||||||
confirmText: '确认',
|
// confirmText: '确认',
|
||||||
title: '确定要将钢卷号为:' + coilRes.data.currentCoilNo + '发货吗?',
|
// title: '确定要将钢卷号为:' + coilRes.data.currentCoilNo + '发货吗?',
|
||||||
showCancel: true,
|
// showCancel: true,
|
||||||
success: async (res) => {
|
// success: async (res) => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.cancel) {
|
// if (res.cancel) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '已取消发货',
|
// title: '已取消发货',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
try {
|
// try {
|
||||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
// // 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||||
if (!['A+', 'A', 'A-', 'B+'].includes(coilRes.data.qualityStatus)) {
|
// if (!['A+', 'A', 'A-', 'B+'].includes(coilRes.data.qualityStatus)) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '只能发货B+以上品质的钢卷',
|
// title: '只能发货B+以上品质的钢卷',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
});
|
// });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
// 1. 更新钢卷状态为已发货
|
// // 1. 更新钢卷状态为已发货
|
||||||
await exportCoil(coilRes.data.coilId);
|
// await exportCoil(coilRes.data.coilId);
|
||||||
|
|
||||||
// 2. 插入一条已完成的待操作记录
|
// // 2. 插入一条已完成的待操作记录
|
||||||
await addPendingAction({
|
// await addPendingAction({
|
||||||
coilId: coilRes.data.coilId,
|
// coilId: coilRes.data.coilId,
|
||||||
currentCoilNo: coilRes.data.currentCoilNo,
|
// currentCoilNo: coilRes.data.currentCoilNo,
|
||||||
actionType: 402, // 402=发货
|
// actionType: 402, // 402=发货
|
||||||
actionStatus: 2, // 直接标记为完成状态
|
// actionStatus: 2, // 直接标记为完成状态
|
||||||
scanTime: new Date(),
|
// scanTime: new Date(),
|
||||||
scanDevice: this.getDeviceInfo(),
|
// scanDevice: this.getDeviceInfo(),
|
||||||
priority: 0, // 0=普通
|
// priority: 0, // 0=普通
|
||||||
sourceType: 'scan',
|
// sourceType: 'scan',
|
||||||
warehouseId: coilRes.data.warehouseId,
|
// warehouseId: coilRes.data.warehouseId,
|
||||||
processTime: new Date(),
|
// processTime: new Date(),
|
||||||
completeTime: new Date()
|
// completeTime: new Date()
|
||||||
});
|
// });
|
||||||
|
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '发货成功',
|
// title: '发货成功',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
});
|
// });
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.error('发货失败:', error);
|
// console.error('发货失败:', error);
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: error?.message || '发货失败',
|
// title: error?.message || '发货失败',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
fail() {
|
// fail() {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '已取消发货',
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// uni.hideLoading();
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleShipSubmit() {
|
||||||
|
try {
|
||||||
|
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||||
|
if (!['A+', 'A', 'A-', 'B+'].includes(this.coilDetail.qualityStatus)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '已取消发货',
|
title: '只能发货B+以上品质的钢卷',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
// 1. 更新钢卷状态为已发货
|
||||||
uni.hideLoading();
|
const res = await exportCoil(this.coilDetail.coilId);
|
||||||
|
|
||||||
|
// 2. 插入一条已完成的待操作记录
|
||||||
|
await addPendingAction({
|
||||||
|
coilId: this.coilDetail.coilId,
|
||||||
|
currentCoilNo: this.coilDetail.currentCoilNo,
|
||||||
|
actionType: 402, // 402=发货
|
||||||
|
actionStatus: 2, // 直接标记为完成状态
|
||||||
|
scanTime: new Date(),
|
||||||
|
scanDevice: this.getDeviceInfo(),
|
||||||
|
priority: 0, // 0=普通
|
||||||
|
sourceType: 'scan',
|
||||||
|
warehouseId: this.coilDetail.warehouseId,
|
||||||
|
processTime: new Date(),
|
||||||
|
completeTime: new Date()
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res.code != 200) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: res.message || '发货失败请重试'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
title: '发货成功',
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
this.$refs.shipPopup.close()
|
||||||
|
} catch (error) {
|
||||||
|
console.error('发货失败:', error);
|
||||||
|
uni.showToast({
|
||||||
|
title: error?.message || '发货失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 移库操作:第一步 - 扫描钢卷,打开移库弹窗(原有方法优化)
|
// 移库操作:第一步 - 扫描钢卷,打开移库弹窗(原有方法优化)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ function checkStorageSpace() {
|
|||||||
function checkUpdate(forceCheck = false) {
|
function checkUpdate(forceCheck = false) {
|
||||||
// 1. 准备本地版本信息
|
// 1. 准备本地版本信息
|
||||||
const localVersion = plus.runtime.version; // 基座版本
|
const localVersion = plus.runtime.version; // 基座版本
|
||||||
const staticVersion = '1.3.19'; // 静态默认版本
|
const staticVersion = '1.3.20'; // 静态默认版本
|
||||||
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本(从存储获取或用默认)
|
const localWgtVersion = uni.getStorageSync('wgtVersion') || staticVersion; // 本地wgt版本(从存储获取或用默认)
|
||||||
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
|
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0
|
||||||
? localWgtVersion
|
? localWgtVersion
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "klp 1.3.19",
|
"version": "klp 1.3.20",
|
||||||
"wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt",
|
"wgtUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.wgt",
|
||||||
"apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk"
|
"apkUrl": "http://49.232.154.205:10900/fadapp-update/klp/klp.apk"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user