From 0589b2340939c4c46e9d76e7c145df3183356d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com>
Date: Wed, 30 Oct 2024 13:25:12 +0800
Subject: [PATCH] =?UTF-8?q?page/inventoryMove/coms=20=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E8=BF=81=E7=A7=BB=208/8-10/25?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../coms/comInventoryDetailCard.vue | 28 ++-
.../coms/comInventoryDetailCardBatch.vue | 186 ++++++++++++++++++
src/pages/inventoryMove/coms/comMove.vue | 4 +-
src/pages/inventoryMove/coms/comMoveJob.vue | 46 ++++-
.../inventoryMove/coms/comMoveRecord.vue | 73 ++++---
.../inventoryMove/coms/comMoveRecordCard.vue | 8 +-
6 files changed, 313 insertions(+), 32 deletions(-)
create mode 100644 src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue
diff --git a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
index cb9600e3..a1ca2af0 100644
--- a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
+++ b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
@@ -11,8 +11,8 @@
-
-
+
+
@@ -36,8 +36,30 @@ const props = defineProps({
settingParam: {
type: Object,
default: {}
+ },
+ allowEditQty: {
+ type: Boolean,
+ default: false
+ },
+ locationAreaTypeList: {
+ type: Array,
+ default: []
}
})
+watch(()=> props.dataContent, (newName, oldName)=>{
+ if (dataContent.value.subList.length > 0) {
+ nextTick(res => {
+ setTimeout(() => {
+ if (collapse1.value) {
+ collapse1.value.init();
+ }
+ }, 200)
+ })
+ }
+},{
+ immediate: true,
+ deep: true
+})
const option = ref([])
const title = ref('推荐详情')
const showItem = ref({})
@@ -53,7 +75,7 @@ const scanLocationCode = ref('')
const winHint = ref()
const dataContent = ref(props.dataContent)
const collapse1 = ref()
-
+const locatonItem = ref({})
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
diff --git a/src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue b/src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue
new file mode 100644
index 00000000..e7997e46
--- /dev/null
+++ b/src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/inventoryMove/coms/comMove.vue b/src/pages/inventoryMove/coms/comMove.vue
index 3d5ca05e..4fa3b88e 100644
--- a/src/pages/inventoryMove/coms/comMove.vue
+++ b/src/pages/inventoryMove/coms/comMove.vue
@@ -228,7 +228,7 @@
newDetail.toInventoryStatus = this.toInventoryStatus
item.subList.push(newDetail);
} else {
- this.showErrorMessage(balance.packingNumber + "已经在列表中")
+ this.showErrorMessage(balance.packingNumber + "重复扫描")
}
}
calcHandleQty(this.detailSource);
@@ -307,7 +307,7 @@
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
- this.showCommitSuccessMessage("提交成功
生成" + this.title + "记录
" +
+ this.showCommitSuccessMessage("提交成功\n生成" + this.title + "记录\n" +
res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
diff --git a/src/pages/inventoryMove/coms/comMoveJob.vue b/src/pages/inventoryMove/coms/comMoveJob.vue
index ab73e708..cc3b890e 100644
--- a/src/pages/inventoryMove/coms/comMoveJob.vue
+++ b/src/pages/inventoryMove/coms/comMoveJob.vue
@@ -1,7 +1,11 @@
-
+
@@ -41,7 +45,15 @@ const props = defineProps({
title: {
type: String,
default: ''
- }
+ },
+ isShowItemCode: {
+ type: Boolean,
+ default: false
+ },
+ isShowQurery: {
+ type: Boolean,
+ default: false
+ },
})
const jobList = ref([])
@@ -59,6 +71,7 @@ const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
+const filterItemCode = ref('')
onMounted(() => {
nextTick(() => {
detailOptions.value = getDetailOption()
@@ -121,6 +134,14 @@ const getList = (type) => {
action: 'in',
value: status.value
})
+ if(filterItemCode.value){
+ // 物料代码
+ filters.push({
+ column: "itemCode",
+ action: "like",
+ value: filterItemCode.value
+ })
+ }
filters.push({
column: 'accept_user_id',
action: '==',
@@ -147,11 +168,11 @@ const getList = (type) => {
const { list } = res.data
totalCount.value = res.data.total
loadingType.value = 'loadmore'
+ jobList.value = type === "refresh" ? list : jobList.value.concat(list);
if (list == null || list.length == 0) {
loadingType.value = 'nomore'
return
}
- jobList.value = type === 'refresh' ? list : jobList.value.concat(list)
console.log(jobList.value)
pageNo.value++
updateTitle()
@@ -217,6 +238,25 @@ const cancleJob = (id) => {
showMessage(error)
})
}
+const getListByFilter = (params)=> {
+ console.log('getListByFilter',params)
+ if (params.itemCode) {
+ // 物料代码
+ filterItemCode.value = params.itemCode
+ }else{
+ filterItemCode.value = ''
+ }
+ if (params.status) {
+ status.value = params.status
+ }else{
+ status.value = "1,2"
+ }
+ if(params.creationTime == ""){
+ checkedToday.value = false;
+ }
+ todayTime.value = params.creationTime
+ getList('refresh')
+}
const switchChangeToday = (state, creationTime) => {
checkedToday.value = state
todayTime.value = creationTime
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index 718b97fe..3b47a208 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -46,7 +46,7 @@ import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import { inventoryMoveRecordSubmit, getBasicLocationByCode } from '@/api/request2.js'
-import { getDirectoryItemArray } from '@/common/directory.js'
+import { getDirectoryItemArray,getInventoryStatusName } from '@/common/directory.js'
import { getPrecisionStrategyList } from '@/common/balance.js'
@@ -222,7 +222,7 @@ const getScanResult = (result) => {
detailSource.value.push(itemp)
} else {
const detail = item.subList.find((r) => {
- if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.fromLocationCode == balance.locationCode && r.toInventoryStatus == balance.inventoryStatus && r.scaned == true) {
+ if (r.packingNumber == pack.number && r.batch == pack.batch && r.fromLocationCode == balance.locationCode && r.toInventoryStatus == balance.inventoryStatus && r.scaned == true) {
return r
}
})
@@ -235,18 +235,30 @@ const getScanResult = (result) => {
} else {
newDetail.toInventoryStatus = toInventoryStatus.value;
}
+ if (newDetail.packingNumber == '') {
+ newDetail.packingNumber = pack.number;
+ }
newDetail.toLocationCode = toLocationCode.value
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail)
} else {
- showErrorMessage(`${balance.packingNumber}已经在列表中`)
+ showErrorMessage("包装[" + detail.packingNumber + "]\n" +
+ "批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
+ "库存状态[" + getInventoryStatusName(detail.toInventoryStatus) + "]\n" +
+ "重复扫描")
}
}
calcHandleQty(detailSource.value)
}
const showErrorMessage = (message) => {
+ if(scanPopup.value){
+ scanPopup.value.packLoseFocus()
+ }
comMessageRef.value.showErrorMessage(message, (res) => {
if (res) {
+ if(scanPopup.value){
+ scanPopup.value.packGetFocus()
+ }
}
})
}
@@ -307,21 +319,8 @@ const commit = () => {
getPrecisionStrategyList(precisionStrategParams, (res) => {
if (res.success) {
managementList.value = res.list
- const params = setParams()
- // console.log("提交" + JSON.stringify(params))
- inventoryMoveRecordSubmit(params)
- .then((res) => {
- uni.hideLoading()
- if (res.data) {
- showCommitSuccessMessage(`提交成功
生成${title.value}
${res.data}`)
- } else {
- showErrorMessage(`提交失败[${res.msg}]`)
- }
- })
- .catch((error) => {
- uni.hideLoading()
- showErrorMessage(error)
- })
+ submit()
+
} else {
uni.hideLoading()
showErrorMessage(res.message)
@@ -331,15 +330,45 @@ const commit = () => {
showErrorMessage('没有要提交的数据,请先扫描')
}
}
-
+const submit = ()=>{
+ const params = setParams()
+ let hint = ""
+ dataContent.value.subList.forEach(res => {
+ if (res.fromLocationCode == res.toLocationCode) {
+ if (res.fromInventoryStatus == res.toInventoryStatus) {
+ let resultHint = res.fromPackingNumber ? `包装号【${res.fromPackingNumber}】` : ""
+ hint += resultHint + `来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
+ }
+ }
+ })
+ if (hint) {
+ uni.hideLoading()
+ comMessageRef.value.showQuestionMessage1(hint, 'red', res => {
+ if (res) {}
+ });
+ return;
+ }
+ // console.log("提交" + JSON.stringify(params))
+ inventoryMoveRecordSubmit(params)
+ .then((res) => {
+ uni.hideLoading()
+ if (res.data) {
+ showCommitSuccessMessage(`提交成功\n生成${title.value}\n${res.data}`)
+ } else {
+ showErrorMessage(`提交失败[${res.msg}]`)
+ }
+ })
+ .catch((error) => {
+ uni.hideLoading()
+ showErrorMessage(error)
+ })
+}
const setPrecisionStrategParams = () => {
const itemList = []
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
- if (detail.toLocationCode == '') {
- detail.toLocationCode = toLocationCode.value
- }
+ detail.toLocationCode = toLocationCode.value
const filterResult = itemList.filter((res) => {
if (res.itemCode == item.itemCode && detail.toLocationCode == res.locationCode) {
return res
diff --git a/src/pages/inventoryMove/coms/comMoveRecordCard.vue b/src/pages/inventoryMove/coms/comMoveRecordCard.vue
index f8a31a7a..93810398 100644
--- a/src/pages/inventoryMove/coms/comMoveRecordCard.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecordCard.vue
@@ -28,7 +28,7 @@
-->
swipeClick(event, item)">
-
+
@@ -74,7 +74,11 @@ const props = defineProps({
allowEditStatus: {
type: Boolean,
default: false
- }
+ },
+ allowEditQty: {
+ type: Boolean,
+ default: false
+ },
})
const collapse1 = ref()
watch(