Browse Source

修改发料和发料接收任务筛选2024/7/23 16:52:17

hella_vue3
zhang_li 2 months ago
parent
commit
323b67c8ad
  1. 12
      src/mycomponents/detail/comDetailCard.vue
  2. 13
      src/mycomponents/job/jobFilter.vue
  3. 2
      src/pages/fg/coms/comReceiptPopup.vue
  4. 4
      src/pages/fg/receiptByPlan.vue
  5. 4
      src/pages/issue/coms/comIssueJobCard.vue
  6. 50
      src/pages/issue/job/issueJob.vue
  7. 10
      src/pages/package/record/overPackageRecord.vue
  8. 4
      src/pages/productionReceipt/coms/comProductionJobCard.vue
  9. 52
      src/pages/productionReceipt/job/productionReceiptJob.vue
  10. 4
      src/pages/putaway/job/putawayDetail.vue
  11. 30
      src/pages/putaway/job/putawayJob.vue

12
src/mycomponents/detail/comDetailCard.vue

@ -90,12 +90,12 @@ watch(
}
)
onMounted(() => {
// if (detailOptions.value.length == 0) {
// detailOptions.value = getDetailOption()
// }
// if (scanOptions.value.length == 0) {
// scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false)
// }
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(settingParam.value.allowModifyQty, false)
}
nextTick((res) => {
collapse.value.init()
})

13
src/mycomponents/job/jobFilter.vue

@ -101,13 +101,8 @@ watch(
)
// 线
const productionLineCodeConfirm = () => {
let lineCode = ''
productionline.value.forEach((item) => {
if (item.text == productionLineCode.value) {
lineCode = item.value
}
})
const productionLineCodeConfirm = (e) => {
const lineCode = e
emit('productionLineCode', productionLineCode.value)
}
//
@ -144,9 +139,11 @@ const switchChangeWait = (isOn) => {
}
const scanNumberClick = () => {
scanNumber.value.openScanPopup()
closeScanPopup()
}
const scanOtherClick = () => {
scanAsnNumber.value.openScanPopup()
closeScanPopup()
}
const getScanAsNumber = (val) => {
emit('onScanAsnNumber', val)
@ -158,7 +155,7 @@ const getScanNumber = (val) => {
scanNumber.value.closeScanPopup()
closeScanPopup()
}
const emit = defineEmits(['switchChangeToday', 'switchChangeWait', 'onScanNumber', 'onScanAsnNumber', 'productionLineCode', 'fromLocationCode'])
const emit = defineEmits(['switchChangeToday', 'switchChangeWait', 'onScanNumber', 'onScanAsnNumber', 'productionLineCode', 'fromLocationCode', 'fromLocationCodeConfirm'])
defineExpose({ openFilter })
</script>
<style lang="scss">

2
src/pages/fg/coms/comReceiptPopup.vue

@ -322,7 +322,7 @@ export default {
uni.hideLoading()
if (res.data && res.data.length > 0) {
res.data.forEach((item) => {
item.label = `${item.itemCode}${item.planQty}${item.uom})` + `(${dateFormatData(item.planDate)})`
item.label = `${item.itemCode}${item.planQty}${this.getUomInfo(item.uom)})` + `(${dateFormatData(item.planDate)})`
item.value = item
})
this.itemCodeList = res.data

4
src/pages/fg/receiptByPlan.vue

@ -187,7 +187,7 @@ const submit = () => {
}
if (allList.value.length < dataContent.value.packQty) {
comMessageRef.value.showQuestionMessage('扫描数量小于计划数量,是否提交?', (res) => {
comMessageRef.value.showQuestionMessage('扫描数量小于包装规格数量,是否提交?', (res) => {
if (res) {
commit()
}
@ -271,7 +271,7 @@ const commit = async () => {
throw new Error('未查找到单据信息')
}
uni.hideLoading()
showCommitSuccessMessage('提交成功<br>生成报工记录<br>', list)
showCommitSuccessMessage('提交成功<br>生成装配收货记录<br>', list)
} catch (error) {
uni.hideLoading()
const hint = error.message ? error.message : error

4
src/pages/issue/coms/comIssueJobCard.vue

@ -1,6 +1,10 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class="">
<text style="font-size: 32rpx; margin-left: 35rpx">生产线</text>
<text style="font-size: 35rpx; margin-left: 10rpx; font-weight: bold">{{ dataContent.productionLineCode }}</text>
</view>
</job-com-main-card>
</template>

50
src/pages/issue/job/issueJob.vue

@ -1,7 +1,7 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length == 0"></com-empty-view>
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionline" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> </job-filter>
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> </job-filter>
<view v-if="jobList.length > 0" class="u-m-20">
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in jobList" :key="index" :options="item.status == '2' ? detailGiveupOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="swipeClick">
<com-issue-job-card :dataContent="item" @click="openJobDetail(item)"></com-issue-job-card>
@ -53,8 +53,10 @@ const todayTime = ref('')
const status = ref('1,2') //
const detailOptions = ref([])
const detailGiveupOptions = ref([])
const productionline = ref([])
const productionlineList = ref([])
const title = ref('')
const productionLine = ref('')
const fromLocation = ref('')
const filter = ref()
const scanMessage = ref('')
const comMessageRef = ref()
@ -64,7 +66,7 @@ const scanPopup = ref()
const jobListRef = ref()
onShow(() => {
nextTick(() => {
getList('refresh')
getList('refresh', fromLocation.value, productionLine.value)
})
})
onLoad((option) => {
@ -80,10 +82,10 @@ onReachBottom(() => {
if (loadingType.value == 'loading' || loadingType.value == 'nomore') {
return
}
getList('more')
getList('more', productionLine.value)
})
onPullDownRefresh(() => {
getList('refresh')
getList('refresh', productionLine.value)
})
// 退
onBackPress((options) => {
@ -106,16 +108,20 @@ const getIssueJobByProductionline1 = () => {
getIssueJobByProductionline().then((res) => {
console.log('生产线', res)
if (res.code == 0) {
productionline.value = res.data.map((item) => ({
productionlineList.value = res.data.map((item) => ({
value: item.value,
text: item.name
}))
productionlineList.value.unshift({
value: '',
text: '全部'
})
} else {
productionline.value = []
productionlineList.value = []
}
})
}
const getList = (type, fromLocationCode = '', productionLineCode = '') => {
const getList = (type, fromLocation = '', productionLine = '') => {
proxy.$modal.loading('加载中­....')
loadingType.value = 'loading'
if (type === 'refresh') {
@ -142,20 +148,20 @@ const getList = (type, fromLocationCode = '', productionLineCode = '') => {
action: '==',
value: store.id
})
if (fromLocationCode != '') {
if (fromLocation) {
//
filters.push({
column: 'fromLocationCode',
action: '==',
value: fromLocationCode
value: fromLocation
})
}
if (productionLineCode != '') {
if (productionLine) {
// 线
filters.push({
column: 'productionLineCode',
action: '==',
value: productionLineCode
value: productionLine
})
}
const params = {
@ -223,13 +229,14 @@ const swipeClick = (index, index1) => {
})
}
}
const fromLocationCode = (fromLocationCode) => {
getList('refresh', fromLocationCode, '')
const fromLocationCode = (fromLocationParams) => {
fromLocation.value = fromLocationParams
getList('refresh', fromLocation.value, productionLine.value)
}
const productionLineCode = (productionLineCode) => {
console.log('productionLineCode', productionLineCode)
getList('refresh', '', productionLineCode)
productionLine.value = productionLineCode
getList('refresh', fromLocation.value, productionLine.value)
}
const getByAsnNumber = (code) => {
proxy.$modal.loading('加载中­....')
@ -258,7 +265,7 @@ const cancleJob = (id) => {
cancleTakeIssueJob(id)
.then((res) => {
if (res.data) {
getList('refresh')
getList('refresh', fromLocation.value, productionLine.value)
uni.showToast({
title: '放弃任务成功'
})
@ -273,12 +280,12 @@ const cancleJob = (id) => {
const switchChangeToday = (state, creationTime) => {
checkedToday.value = state
todayTime.value = creationTime
getList('refresh')
getList('refresh', fromLocation.value, productionLine.value)
}
const switchChangeWait = (state, jobStatus) => {
checkedWaitTask.value = state
status.value = jobStatus
getList('refresh')
getList('refresh', fromLocation.value, productionLine.value)
}
const getScanNumber = (code) => {
getDataListByType(code)
@ -296,6 +303,11 @@ const getDataListByType = (code) => {
action: '==',
value: code
})
filters.push({
column: 'accept_user_id',
action: '==',
value: store.id
})
const params = {
filters,
pageNo: 1,

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

@ -208,6 +208,8 @@ const setData = (result) => {
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
newDetail.parentNumber = pack.parentNumber
newDetail.packingNumber = pack.number
itemp.subList.push(newDetail)
detailSource.value.push(itemp)
itemCode.value = balance.itemCode
@ -225,6 +227,8 @@ const setData = (result) => {
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
newDetail.parentNumber = pack.parentNumber
newDetail.packingNumber = pack.number
item.subList.push(newDetail)
scanPopupGetFocus()
} else if (detail.scaned == true) {
@ -349,8 +353,7 @@ const setParams = () => {
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
const subItem = {}
Object.assign(subItem, detail)
const subItem = deepCopyData(detail)
subItem.itemCode = detail.itemCode
subItem.itemName = detail.package.itemName
subItem.itemDesc1 = detail.package.itemDesc1
@ -358,6 +361,7 @@ const setParams = () => {
subItem.fromInventoryStatus = detail.inventoryStatus
subItem.fromQty = detail.handleQty
subItem.fromParentPackingNumber = detail.parentNumber
subItem.fromPackingNumber = detail.packingNumber
subItem.fromBatch = detail.batch
subItem.fromLocationCode = detail.locationCode
@ -406,6 +410,8 @@ const showCommitSuccessMessage = (hint, pointData) => {
fromLocationCode.value = ''
dataContent.value = {}
itemCode.value = ''
toPackUnitShow.value = '请选择'
toPackQty.value = ''
if (pointData.length > 0) {
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`

4
src/pages/productionReceipt/coms/comProductionJobCard.vue

@ -1,6 +1,10 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class="">
<text style="font-size: 32rpx; margin-left: 35rpx">生产线</text>
<text style="font-size: 35rpx; margin-left: 10rpx; font-weight: bold">{{ dataContent.productionLineCode }}</text>
</view>
</job-com-main-card>
</template>

52
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -1,7 +1,7 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length == 0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"> </job-filter>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" @productionLineCode="productionLineCode" :productionline="productionLineList"> </job-filter>
<view v-if="jobList.length > 0" class="u-m-20">
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in jobList" :key="index" :options="item.status == '2' ? detailGiveupOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="swipeClick">
<com-production-job-card :dataContent="item" @click="openJobDetail(item)"> </com-production-job-card>
@ -22,7 +22,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { getProductionReceiptJobList, cancleTakeProductionReceiptJob } from '@/api/request2.js'
import { getProductionReceiptJobList, cancleTakeProductionReceiptJob, getIssueJobByProductionline } from '@/api/request2.js'
import { goHome, updateTitle } from '@/common/basic.js'
@ -57,17 +57,20 @@ const detailGiveupOptions = ref([])
const filter = ref()
const title = ref('')
const scanMessage = ref('')
const productionLineList = ref([])
const productionLine = ref('')
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
const jobListRef = ref()
onShow(() => {
nextTick(() => {
getList('refresh')
getList('refresh', productionLine.value)
})
})
onLoad((option) => {
title.value = option.title
getIssueJobByProductionline()
})
onReady(() => {
detailOptions.value = getDetailOption()
@ -78,10 +81,10 @@ onReachBottom(() => {
if (loadingType.value == 'loading' || loadingType.value == 'nomore') {
return
}
getList('more')
getList('more', productionLine.value)
})
onPullDownRefresh(() => {
getList('refresh')
getList('refresh', productionLine.value)
})
// 退
onBackPress((options) => {
@ -100,7 +103,28 @@ onNavigationBarButtonTap((e) => {
filter.value.openFilter()
}
})
const getList = (type) => {
const productionLineCode = (productionLineCode) => {
productionLine.value = productionLineCode
getList('refresh', productionLine.value)
}
const getIssueJobByProductionline = () => {
getIssueJobByProductionline().then((res) => {
console.log('生产线', res)
if (res.code == 0) {
productionLineList.value = res.data.map((item) => ({
value: item.value,
text: item.name
}))
productionLineList.value.unshift({
value: '',
text: '全部'
})
} else {
productionLineList = []
}
})
}
const getList = (type, productionLine = '') => {
proxy.$modal.loading('加载中­....')
loadingType.value = 'loading'
if (type === 'refresh') {
@ -127,6 +151,14 @@ const getList = (type) => {
action: '==',
value: store.id
})
if (productionLine) {
// 线
filters.push({
column: 'productionLineCode',
action: '==',
value: productionLine
})
}
const params = {
filters,
pageNo: pageNo.value,
@ -161,7 +193,7 @@ const getList = (type) => {
})
}
const openJobDetail = (item, scanMessage = '') => {
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${title.value}`)
scanMessage.value = ''
}
const selectedItem = (item) => {
@ -198,7 +230,7 @@ const cancleJob = (id) => {
cancleTakeProductionReceiptJob(id)
.then((res) => {
if (res.data) {
getList('refresh')
getList('refresh', productionLine.value)
uni.showToast({
title: '放弃任务成功'
})
@ -213,12 +245,12 @@ const cancleJob = (id) => {
const switchChangeToday = (state, creationTime) => {
checkedToday.value = state
todayTime.value = creationTime
getList('refresh')
getList('refresh', productionLine.value)
}
const switchChangeWait = (state, jobStatus) => {
checkedWaitTask.value = state
status.value = jobStatus
getList('refresh')
getList('refresh', productionLine.value)
}
const getScanNumber = (code) => {
getDataListByType(code)

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

@ -264,6 +264,10 @@ const getScanResult = (result) => {
const { itemCode } = result.label
const locationCode = result.fromLocationCode
// const inventoryStatus = 'OK'
if (!result.balance) {
showMessage(`箱码【${packingNumber}】没有库存余额`)
return
}
const detail = detailSource.value.find((r) => r.itemCode == itemCode)
if (detail == undefined) {

30
src/pages/putaway/job/putawayJob.vue

@ -307,14 +307,14 @@ const getScanResult = (result) => {
{
column: 'status',
action: 'in',
value: '1,2'
},
{
column: 'accept_user_id',
action: '==',
value: store.id
value: '1,2,3'
}
// {
// column: 'accept_user_id',
// action: '==',
// value: store.id
// }
// {
// column: 'fromLocationCode',
// action: '==',
// value: result.label.fromLocationCode
@ -339,10 +339,22 @@ const getScanResult = (result) => {
list.push(item)
}
})
if (list.length > 1) {
jobListRef.value.openList(list)
if (list.length == 1) {
//
if (list[0].status == 1) {
selectItem(list[0])
} else if (list[0].status == 2) {
//
if (list[0].acceptUserId == store.id) {
selectItem(list[0])
} else {
showMessage(`该任务已经被[${list[0].acceptUserName}]承接` + `<br>任务号[${list[0].number}]扫描[${result.scanMessage}]`)
}
} else if (list[0].status == 3) {
showMessage(`该任务已经完成<br>承接人[${list[0].acceptUserName}]<br>任务号[${list[0].number}]扫描[${result.scanMessage}]`)
}
} else {
selectItem(list[0])
showMessage('查询到多条任务<br>' + `扫描[${result.scanMessage}]`)
}
} else {
showMessage('未查找到任务<br>' + `扫描[${result.scanMessage}]`)

Loading…
Cancel
Save