Browse Source

增加头部信息 后端添加过滤承接人条件2024/6/25 09:43:11

hella_vue3
zhang_li 3 months ago
parent
commit
cf7d600add
  1. 1
      src/api/http.ts
  2. 2
      src/mycomponents/balance/handleBalance.vue
  3. 17
      src/mycomponents/common/comMessage.vue
  4. 4
      src/mycomponents/job/jobFilter.vue
  5. 5
      src/pages/issue/request/issueScanRequest.vue
  6. 2
      src/pages/package/job/overPackageJobDetail.vue
  7. 2
      src/pages/package/record/overPackageRecord.vue
  8. 4
      src/pages/pointPutawayJob/index.vue
  9. 2
      src/pages/purchaseReceipt/job/receiptDetail.vue
  10. 5
      src/pages/purchaseReceipt/job/receiptJob.vue
  11. 52
      src/pages/repleinsh/coms/comScanReplishPack.vue
  12. 130
      src/pages/repleinsh/record/directRepleinshRecord.vue
  13. 1
      src/pages/transfer/coms/comReceiptDetailCard.vue

1
src/api/http.ts

@ -49,6 +49,7 @@ instance.interceptors.request.use((config) => {
const headers : any = {
token: getAccessToken(),
"tenant-id": tenantId,
"dataSource":"PDA",
'Authorization': 'Bearer ' + getAccessToken()
}
if (uni.getStorageSync('openId')) {

2
src/mycomponents/balance/handleBalance.vue

@ -2,7 +2,7 @@
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff">
<view class="space_between center">
<view style="word-break: break-all; width: 60%">
<pack title="外包装" v-if="detail.parentPackingNumber != undefined && detail.parentPackingNumber != ''" :packingCode="detail.parentPackingNumber"></pack>
<pack title="外包装" v-if="detail.parentPackingNumber" :packingCode="detail.parentPackingNumber"></pack>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>

17
src/mycomponents/common/comMessage.vue

@ -1,6 +1,9 @@
<template name="show-modal">
<view>
<u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
<view class="" style="width: 100%; display: flex; align-items: center; justify-content: center; margin-top: 10rpx">
<view class="" style=""> 版本号 : {{ version }} </view>
</view>
<view class="slot-content">
<slot name="icon">
<image class="icon" :src="icon" />
@ -31,7 +34,7 @@
* modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */
import { ref, getCurrentInstance } from 'vue'
import { ref, getCurrentInstance, onMounted } from 'vue'
const timer = ref(null)
const show = ref(false) //
@ -53,6 +56,18 @@ const cancel = ref(false) // 为 true 时,表示用户点击了取消
const isDisabled = ref(true) // true
const seconds = ref(0)
const success = ref(() => {})
const version = ref('')
onMounted(() => {
const systemInfo = uni.getSystemInfoSync()
// #ifdef H5
version.value = systemInfo.appVersion
console.log(systemInfo.appVersion, '版本号')
// #endif
// #ifdef APP
version.value = systemInfo.appWgtVersion
// #endif
})
const open = () => {
show.value = true
isDisabled.value = true

4
src/mycomponents/job/jobFilter.vue

@ -14,11 +14,11 @@
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 生产线 </view>
<!-- <u-input style="margin-left: 20rpx" v-model="productionLineCode" :border="true" placeholder="请输入生产线" @confirm="productionLineCodeConfirm" /> -->
<uni-data-select class="uni-data-select" style="margin-left: 20rpx" placeholder="请输入生产线" v-model="productionLineCode" :clear="false" :localdata="productionline" @change="productionLineCodeConfirm"></uni-data-select>
<uni-data-select class="uni-data-select" style="margin-left: 50rpx" placeholder="请输入生产线" v-model="productionLineCode" :clear="false" :localdata="productionline" @change="productionLineCodeConfirm"></uni-data-select>
</view>
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 来源库位 </view>
<u-input type="textarea" style="margin-left: 20rpx" v-model="fromLocationCode" :border="true" placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
<u-input style="margin-left: 20rpx" confirmType="search" v-model="fromLocationCode" :border="true" placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</view>
<view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowAsn">

5
src/pages/issue/request/issueScanRequest.vue

@ -61,6 +61,11 @@ onLoad((option) => {
})
const goScan = () => {
scanPopup.value.openScanPopup()
setTimeout((res) => {
if (scanPopup.value != undefined) {
scanPopup.value.getfocus()
}
}, 400)
}
const getScanResult = (data) => {
detailSource.value = {

2
src/pages/package/job/overPackageJobDetail.vue

@ -388,7 +388,7 @@ const showCommitSuccess = () => {
const showCommitSuccessMessage = (hint, pointData) => {
comMessageRef.value.showSuccessMessage(hint, (res) => {
if (pointData.length > 0) {
uni.navigateTo({
uni.redirectTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
})
} else {

2
src/pages/package/record/overPackageRecord.vue

@ -397,7 +397,7 @@ const showCommitSuccessMessage = (hint, pointData) => {
fromLocationCode.value = ''
dataContent.value = {}
if (pointData.length > 0) {
uni.navigateTo({
uni.redirectTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
})
}

4
src/pages/pointPutawayJob/index.vue

@ -18,7 +18,7 @@
</view>
<view class="mb-right">
<view class="mb-text">
数量<view>{{ item.packQty }}</view>
数量<view>{{ item.qty }}</view>
</view>
</view>
</view>
@ -201,7 +201,7 @@ export default {
</div>
<div class="mb-right">
<div class="mb-text">
数量<div>${item.packQty}</div>
数量<div>${item.qty}</div>
</div>
</div>
</div>

2
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -438,7 +438,7 @@ const submitJob = () => {
ids: res1.data.list.map((item) => item.masterId).join(',')
}
console.log(dataParams)
uni.navigateTo({
uni.redirectTo({
url: `/pages/pointPutawayJob/index?data=${encodeURIComponent(JSON.stringify(dataParams))}`
})
}

5
src/pages/purchaseReceipt/job/receiptJob.vue

@ -288,6 +288,11 @@ const getScanResult = (result) => {
column: 'asn_number',
action: '==',
value: result.label.code
},
{
column: 'status',
action: 'in',
value: '1,2'
}
]
} else {

52
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -207,30 +207,57 @@ const onScan = (result) => {
getBalance(result.label, packageInfo, (balances) => {
//
const s = ''
if (result.package.parentNumber == null || result.package.parentNumber == '') {
if (!result.package.parentNumber) {
if (balances.list.length == 0) {
showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
const newBalances = balances.list.filter((b) => b.locationCode == fromLocationCode.value)
console.log(22222222)
const newBalances = balances.list.filter((b) => b.locationCode == that.fromLocationCode)
if (newBalances.length == 0) {
console.log(333333)
showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else if (newBalances.length == 1) {
console.log(44444444)
const balance1 = newBalances[0]
afterGetBalance(result.label, balance1, packageInfo)
} else {
console.log(5555555)
showBalanceSelect(newBalances)
}
}
} else {
//
if (balances.list.length == 0) {
afterGetBalance(result.label, null, packageInfo)
showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
//
const subPackitems = balances.list.filter((r) => r.packingNumber == packageInfo.number)
//
const subParentPackitems = balances.list.filter((r) => r.packingNumber == packageInfo.parentNumber && r.locationCode == fromLocationCode.value)
//
if (subPackitems.length == 0) {
//
if (subParentPackitems.length > 0) {
if (subParentPackitems.length == 1) {
const balance = subParentPackitems[0]
balance.qty = packageInfo.qty
afterGetBalance(result.label, balance, packageInfo)
} else {
showBalanceSelect(subParentPackitems)
}
} else {
showErrorMessage(`按外包装【${packageInfo.parentNumber}】和子包装【${packageInfo.number}】都未查找到库存余额`)
}
} else {
showErrorMessage(`该包装在库位【${balances.list[0].locationCode}】已经有库存余额,请重新扫描`)
let locationCode = fromLocationCode.value
if (balances.list == 1) {
locationCode = balances.list[0].locationCode
} else {
const manyBlances = balances.list.filter((r) => r.locationCode != fromLocationCode.value)
if (manyBlances.length > 0) {
locationCode = manyBlances[0].locationCode
}
}
showErrorMessage(`该包装【${packageInfo.number}】在库位【${locationCode}】已经有库存余额,请重新扫描`)
}
}
}
uni.hideLoading()
@ -243,7 +270,7 @@ const onScan = (result) => {
const getBalance = (labelParams, packageInfo, callback) => {
const filters = []
if (packageInfo.parentNumber) {
const packingNumber = `${packageInfo.parentNumber},${packageInfo.packingNumber}`
const packingNumber = `${packageInfo.parentNumber},${labelParams.packingNumber}`
filters.push({
column: 'packingNumber',
action: 'in',
@ -253,7 +280,7 @@ const getBalance = (labelParams, packageInfo, callback) => {
filters.push({
column: 'packingNumber',
action: '==',
value: packageInfo.packingNumber
value: labelParams.packingNumber
})
}
filters.push({
@ -410,8 +437,9 @@ const creatRecordByBalance = (balanceParams, packageInfo) => {
const record = {
scaned: true,
itemCode: balanceParams.itemCode,
packingNumber: balanceParams.packingNumber,
batch: balanceParams.batch,
packingNumber: packageInfo.number,
parentPackingNumber: packageInfo.parentNumber,
batch: packageInfo.batch,
qty: Number(balanceParams.qty),
// qty: Number(label.qty)>Number(balance.qty)?Number(balance.qty):Number(label.qty),
uom: balanceParams.uom,

130
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -30,16 +30,17 @@
</view>
<win-scan-button @goScan="openScanPopup"></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false"> </win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false" :queryBalance="false"> </win-scan-pack-and-location>
<com-message ref="comMessageRef" />
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation="getLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<balance-select ref="balanceSelectRef" @onSelectItem="selectBalanceItem"></balance-select>
</view>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { repleinshRecordSubmit, validateItemAndLocation, getPutawayRecommendLocation } from '@/api/request2.js'
import { repleinshRecordSubmit, validateItemAndLocation, getPutawayRecommendLocation, getBalanceByFilter } from '@/api/request2.js'
import { goHome, updateTitle, getCurrDateTime, getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js'
@ -59,6 +60,7 @@ import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import { useCountStore } from '@/store'
// store
const store = useCountStore()
@ -78,6 +80,9 @@ const recommendLocationList = ref([]) // 推荐库位列表
const fromWarehouseCode = ref('') //
const businessTypeCode = ref('Repleinment')
const toLocationCode = ref('')
const resultData = ref({})
const balanceSelectRef = ref({})
const managementList = ref([])
// const positionList = ref([])
// const show = ref(false)
@ -105,8 +110,129 @@ onNavigationBarButtonTap((e) => {
goHome()
}
})
const getBalance = (label, packageInfo, callback) => {
const filters = []
if (packageInfo.parentNumber) {
const packingNumber = `${packageInfo.parentNumber},${label.packingNumber}`
filters.push({
column: 'packingNumber',
action: 'in',
value: packingNumber
})
} else {
filters.push({
column: 'packingNumber',
action: '==',
value: label.packingNumber
})
}
filters.push({
column: 'itemCode',
action: '==',
value: label.itemCode
})
filters.push({
column: 'batch',
action: '==',
value: label.batch
})
if (fromInventoryStatuses.value != null && fromInventoryStatuses.value != '') {
filters.push({
column: 'inventoryStatus',
action: 'in',
value: fromInventoryStatuses.value
})
}
const params = {
filters,
pageNo: 1,
pageSize: 100
}
getBalanceByFilter(params)
.then((res) => {
callback(res.data)
})
.catch((err) => {
showErrorMessage(err.message)
})
}
const getScanResult = (result) => {
resultData.value = result
const packageInfo = result.package
getBalance(result.label, packageInfo, (balances) => {
//
const s = ''
if (!result.package.parentNumber) {
if (balances.list.length == 0) {
showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
const newBalances = balances.list.filter((b) => b.locationCode == fromLocationCode.value)
if (newBalances.length == 0) {
showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else if (newBalances.length == 1) {
const balance = newBalances[0]
result.balance = balance
afterGetBalance(result)
} else {
showBalanceSelect(newBalances)
}
}
} else {
//
if (balances.list.length == 0) {
showErrorMessage('未查找到该包装的库存信息,请重新扫描')
} else {
//
const subPackitems = balances.list.filter((r) => r.packingNumber == packageInfo.number)
//
const subParentPackitems = balances.list.filter((r) => r.packingNumber == packageInfo.parentNumber && r.locationCode == fromLocationCode.value)
//
if (subPackitems.length == 0) {
//
if (subParentPackitems.length > 0) {
if (subParentPackitems.length == 1) {
const balance = subParentPackitems[0]
balance.qty = packageInfo.qty
result.balance = balance
afterGetBalance(result)
} else {
showBalanceSelect(subParentPackitems)
}
} else {
showErrorMessage(`按外包装【${packageInfo.parentNumber}】和子包装【${packageInfo.number}】都未查找到库存余额`)
}
} else {
let locationCode = fromLocationCode.value
if (balances.list == 1) {
locationCode = balances.list[0].locationCode
} else {
const manyBlances = balances.list.filter((r) => r.locationCode != fromLocationCode.value)
if (manyBlances.length > 0) {
locationCode = manyBlances[0].locationCode
}
}
showErrorMessage(`该包装【${packageInfo.number}】在库位【${locationCode}】已经有库存余额,请重新扫描`)
}
}
}
})
}
const showBalanceSelect = (items) => {
balanceSelectRef.value.openPopup(items)
}
const selectBalanceItem = (balance) => {
afterGetBalance(resultData.value, balance)
}
const afterGetBalance = (result) => {
const { balance } = result
const { label } = result
const pack = result.package

1
src/pages/transfer/coms/comReceiptDetailCard.vue

@ -37,6 +37,7 @@ import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
const props = defineProps({
dataContent: {

Loading…
Cancel
Save