Browse Source

修改预生产收货任务 提交报错 2024/6/14 18:54:02

hella_vue3
zhang_li 3 months ago
parent
commit
922a6ca3ea
  1. 6
      src/mycomponents/detail/comDetailCard.vue
  2. 6
      src/mycomponents/detail/comJobDetailCard.vue
  3. 2
      src/mycomponents/package/packageList.vue
  4. 2
      src/mycomponents/record/recordComDetailCard.vue
  5. 82
      src/pages/issue/record/directIssue.vue
  6. 2
      src/pages/login/index.vue
  7. 2
      src/pages/productPutaway/job/productPutawayDetail.vue
  8. 2
      src/pages/productPutaway/record/productPutawayRecord.vue
  9. 5
      src/pages/productReceipt/job/productReceiptDetail.vue
  10. 2
      src/pages/putaway/job/putawayDetail.vue

6
src/mycomponents/detail/comDetailCard.vue

@ -6,7 +6,7 @@
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty> <item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty>
</template> </template>
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)"> <u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<recommend :detail="item" :isShowToLocation="false"> </recommend> <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false"> </recommend>
</u-swipe-action> </u-swipe-action>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
@ -52,6 +52,10 @@ const props = defineProps({
queryBalance: { queryBalance: {
type: Boolean, type: Boolean,
default: true default: true
},
isShowStatus: {
type: Boolean,
default: true
} }
}) })
const option = ref([]) const option = ref([])

6
src/mycomponents/detail/comJobDetailCard.vue

@ -5,7 +5,7 @@
<template v-slot:title> <template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true" style="flex: 1"></itemCompareQty> <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true" style="flex: 1"></itemCompareQty>
</template> </template>
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty == 'TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData"></package-list> <package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty == 'TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData" :isShowStatus="isShowStatus"></package-list>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit> <recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit>
@ -34,6 +34,10 @@ const props = defineProps({
locationAreaTypeList: { locationAreaTypeList: {
type: Object, type: Object,
default: null default: null
},
isShowStatus: {
type: Boolean,
default: true
} }
}) })
const showItem = ref({}) const showItem = ref({})

2
src/mycomponents/package/packageList.vue

@ -4,7 +4,7 @@
<u-collapse ref="collapse2"> <u-collapse ref="collapse2">
<u-collapse-item :disabled="false" @change="collapseChange"> <u-collapse-item :disabled="false" @change="collapseChange">
<template v-slot:title> <template v-slot:title>
<package-card :dataContent="item" :isShowLocation="false" :isShowFromLocation="isShowFromLocation" style="flex: 1"></package-card> <package-card :dataContent="item" :isShowLocation="false" :isShowFromLocation="isShowFromLocation" :isShowStatus="isShowStatus" style="flex: 1"></package-card>
</template> </template>
<u-swipe-action :show="item.show" :index="index" v-for="(cur, key) in item.packList" :key="index" :options="cur.scaned && isEdit ? editAndRemoveOptions : cur.scaned ? removeOptions : options" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, cur)"> <u-swipe-action :show="item.show" :index="index" v-for="(cur, key) in item.packList" :key="index" :options="cur.scaned && isEdit ? editAndRemoveOptions : cur.scaned ? removeOptions : options" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, cur)">
<package-card :dataContent="cur" :isShowLocation="false" :isShowFromLocation="false" :isShowToLocation="false" :isShowBatch="false"></package-card> <package-card :dataContent="cur" :isShowLocation="false" :isShowFromLocation="false" :isShowToLocation="false" :isShowBatch="false"></package-card>

2
src/mycomponents/record/recordComDetailCard.vue

@ -8,7 +8,7 @@
</u-swipe-action> </u-swipe-action>
</template> </template>
<u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)"> <u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance> <balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance>
</u-swipe-action> </u-swipe-action>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>

82
src/pages/issue/record/directIssue.vue

@ -13,7 +13,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<recordDetailCard :dataContent="item" :index="index" :settingParam="dataContent" :isShowFromLocation="false" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </recordDetailCard> <record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" :isShowFromLocation="false" @removeItem="removeItem(index, item)" :isShowToLocation="false" @updateData="updateData" @removePack="removePack"> </record-com-detail-card>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -53,7 +53,7 @@ import { calc } from '@/common/calc.js'
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js' import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcTreeHandleQty } from '@/common/record.js' import { getBusinessType, createItemInfo, createDetailInfo, calcTreeHandleQty, calcHandleQty } from '@/common/record.js'
import { getManagementPrecisions, getPrecisionStrategyList, getPrecisionStrategyParams } from '@/common/balance.js' import { getManagementPrecisions, getPrecisionStrategyList, getPrecisionStrategyParams } from '@/common/balance.js'
@ -139,6 +139,8 @@ const getScanResult = (result) => {
const { balance } = result const { balance } = result
const { label } = result const { label } = result
const pack = result.package const pack = result.package
const { packUnit } = pack
const { packQty } = pack
const item = detailSource.value.find((res) => { const item = detailSource.value.find((res) => {
if (res.itemCode == balance.itemCode) { if (res.itemCode == balance.itemCode) {
return res return res
@ -148,34 +150,29 @@ const getScanResult = (result) => {
fromWarehouseCode.value = balance.warehouseCode fromWarehouseCode.value = balance.warehouseCode
} }
if (item == undefined) { if (item == undefined) {
//
// this.getRecommendLocation(balance, pack, toLocation => {
const itemp = createItemInfo(balance, pack) const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) // const newDetail = createDetailInfo(balance, pack)
// newDetail.toLocationCode = toLocation.code; newDetail.packUnit = packUnit || ''
// newDetail.toWarehouseCode = toLocation.warehouseCode; newDetail.packQty = packQty || ''
itemp.subList.push(newDetail) itemp.subList.push(newDetail)
const dataList = pack.subList
detailSource.value.push(itemp) detailSource.value.push(itemp)
detailSource.value.forEach((res) => { calcHandleQty(detailSource.value)
res.subList.forEach((pack) => {
pack.packList = dataList.filter((c) => c.parentNumber == pack.packingNumber)
pack.packList.forEach((pac) => {
pac.parentPackingNumber = pac.parentNumber
pac.packingNumber = pac.number
pac.inventoryStatus = 'OK'
pac.scaned = true
})
})
})
// })
} else { } else {
const itemDetail = item.subList.find((r) => r.packingNumber == balance.packingNumber && r.batch == balance.batch) const detail = item.subList.find((r) => {
if (itemDetail != undefined) { if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) {
return r
}
})
if (detail == undefined) {
const newDetail = createDetailInfo(balance, pack)
newDetail.packUnit = packUnit
newDetail.packQty = packQty
item.subList.push(newDetail)
calcHandleQty(detailSource.value)
} else if (detail.scaned == true) {
showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`)
} }
} }
// calcTreeHandleQty(this.detailSource);
} }
// //
@ -272,10 +269,6 @@ const confirmSelect = (e) => {
}) })
} }
// const updateData = () => {
// calcTreeHandleQty()
// }
const removeItem = (index, item) => { const removeItem = (index, item) => {
detailSource.value.splice(index, 1) detailSource.value.splice(index, 1)
} }
@ -343,33 +336,6 @@ const commit = () => {
}) })
} }
const getItemAndLocationRelations = () => {
const itemList = []
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
detail.toLocationCode = toLocationCode
const filterResult = itemList.filter((res) => {
if (res.itemCode == item.itemCode && res.locationCode == detail.toLocationCode && res.batch == detail.batch && res.inventoryStatus == detail.inventoryStatus) {
return res
}
})
//
if (filterResult.length == 0) {
const result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode,
batch: detail.batch,
inventoryStatus: detail.inventoryStatus
}
itemList.push(result)
}
}
})
})
return itemList
}
const setRecordParams = () => { const setRecordParams = () => {
const subList = [] const subList = []
const creator = store.id const creator = store.id
@ -402,7 +368,11 @@ const setRecordParams = () => {
toBatch: info.batch, toBatch: info.batch,
fromLocationCode: detail.locationCode, fromLocationCode: detail.locationCode,
toLocationCode: detail.toLocationCode, toLocationCode: detail.toLocationCode,
handleQty: detail.handleQty handleQty: detail.handleQty,
fromPackUnit: detail.packUnit,
toPackUnit: detail.packUnit,
fromPackQty: detail.packQty,
toPackQty: detail.packQty
} }
] ]
subList.push(submitItem) subList.push(submitItem)
@ -468,7 +438,7 @@ const showCommitSuccessMessage = (hint) => {
} }
const updateData = () => { const updateData = () => {
// this.calcTreeHandleQty(); calcHandleQty(detailSource.value)
for (let i = 0; i < detailSource.value.length; i++) { for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i] const item = detailSource.value[i]
if (item.qty == 0) { if (item.qty == 0) {

2
src/pages/login/index.vue

@ -101,7 +101,7 @@ onLoad(() => {
uni.clearStorage() // uni.clearStorage() //
if (import.meta.env.VITE_USER_NODE_ENV === 'development') { if (import.meta.env.VITE_USER_NODE_ENV === 'development') {
username.value = 'admin' username.value = 'admin'
password.value = '123456' password.value = 'win123456'
} }
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#ffffff', frontColor: '#ffffff',

2
src/pages/productPutaway/job/productPutawayDetail.vue

@ -12,7 +12,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" @remove="updateData" @updateData="updateData" @openDetail="openDetail" :locationAreaTypeList="toLocationAreaTypeList"> </com-detail-card> <com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" :isShowStatus="false" @remove="updateData" @updateData="updateData" @openDetail="openDetail" :locationAreaTypeList="toLocationAreaTypeList"> </com-detail-card>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>

2
src/pages/productPutaway/record/productPutawayRecord.vue

@ -9,7 +9,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </record-com-detail-card> <record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" :isShowStatus="false" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </record-com-detail-card>
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>
</view> </view>

5
src/pages/productReceipt/job/productReceiptDetail.vue

@ -178,7 +178,10 @@ const getDetail = () => {
detailSource.value = getDataSource(subList.value) detailSource.value = getDataSource(subList.value)
detailSource.value.forEach((r) => { detailSource.value.forEach((r) => {
r.subList.forEach((s) => { r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) s.scaned = true if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true
s.handleQty = s.qty
}
}) })
}) })
} else { } else {

2
src/pages/putaway/job/putawayDetail.vue

@ -14,7 +14,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comJobDetailCard :dataContent="item" :index="index" :settingParam="jobContent" @remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> </comJobDetailCard> <comJobDetailCard :dataContent="item" :index="index" :settingParam="jobContent" :isShowStatus="false" @remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> </comJobDetailCard>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>

Loading…
Cancel
Save