Browse Source

发料申请添加优先级 2024/7/29 10:37:01

hella_vue3
zhang_li 3 months ago
parent
commit
64ea8ebeca
  1. 10
      src/api/request2.js
  2. 21
      src/common/directory.js
  3. 6
      src/common/style/new_style.css
  4. 27
      src/mycomponents/balance/level.vue
  5. 2
      src/mycomponents/job/jobComMainDetailCard.vue
  6. 272
      src/mycomponents/scan/winComScanBalanceLocation.vue
  7. 140
      src/mycomponents/scan/winScanPackLevel.vue
  8. 28
      src/pages/count/job/countJob.vue
  9. 35
      src/pages/fg/coms/comReceiptPopup.vue
  10. 5
      src/pages/fg/receiptByPlan.vue
  11. 2
      src/pages/index/index.vue
  12. 38
      src/pages/issue/coms/comIssueRequestPopup.vue
  13. 3
      src/pages/issue/request/issueRequestCreate.vue
  14. 10
      src/pages/issue/request/issueScanRequest.vue
  15. 122
      src/pages/package/coms/comScanPackagePack.vue
  16. 5
      src/pages/package/job/overPackageJobDetail.vue
  17. 6
      src/pages/package/record/overPackageRecord.vue
  18. 8
      src/pages/productionReceipt/job/productionReceiptJob.vue

10
src/api/request2.js

@ -837,10 +837,18 @@ export function putawayRecordSubmit(params) {
export function getIssueJobList(params) { export function getIssueJobList(params) {
return http.post("/wms/issue-job-detail/senior",params) return http.post("/wms/issue-job-detail/senior",params)
} }
/**
* 发料生产线查询
*/
export function getIssueJobByProductionline() { export function getIssueJobByProductionline() {
return http.get("/issue-job-mwmsain/getIssueJobByProductionline") return http.get("/issue-job-mwmsain/getIssueJobByProductionline")
} }
/**
* 发料接收生产线查询
*/
export function getProductionReceiptJobByProductionline() {
return http.get("/wms/productionreceipt-job-main/getProductionreceiptJobByProductionline")
}
/** /**
* 发料任务明细 * 发料任务明细
* @param {*} 任务id * @param {*} 任务id

21
src/common/directory.js

@ -22,6 +22,7 @@ let countStageList = [];
let locationAreaTypeList = []; let locationAreaTypeList = [];
let businessList=[]; let businessList=[];
let countScopeTypeList = []; let countScopeTypeList = [];
let priorityList = []
@ -64,6 +65,7 @@ export function clearCacheData() {
locationAreaTypeList=[]; locationAreaTypeList=[];
businessList=[]; businessList=[];
countScopeTypeList = [] countScopeTypeList = []
priorityList = []
} }
//获取字典信息 //获取字典信息
@ -608,4 +610,21 @@ export function getPackUnitName(value) {
} }
return resultInfo return resultInfo
} }
//获取优先级
export function getPriorityName(value) {
console.log(344,value)
var resultInfo = "";
if (priorityList.length == 0) {
priorityList = getDirectoryInfo("priority")
}
console.log(455,priorityList)
if (priorityList.length > 0) {
for (let item of priorityList) {
if (item.value == value) {
resultInfo = item.label
break;
}
}
}
return resultInfo
}

6
src/common/style/new_style.css

@ -2138,7 +2138,11 @@ button::after {
font-size: 32rpx; font-size: 32rpx;
padding: 5px; padding: 5px;
} }
.card_level {
color: #0689da;
padding: 5px;
font-size: 30rpx;
}
.card_supportCode { .card_supportCode {
color: #DA8910; color: #DA8910;
padding: 5px; padding: 5px;

27
src/mycomponents/balance/level.vue

@ -0,0 +1,27 @@
<template>
<view class="card_view">
<text class="card_level">{{ title }}</text>
<text class="card_big_content" style="font-size: 40rpx">{{ getPriorityName1() }}</text>
</view>
</template>
<script setup lang="ts">
import { getPriorityName } from '@/common/directory.js'
const props = defineProps({
priority: {
type: String,
default: '2'
},
title: {
type: String,
default: '优先级'
}
})
const getPriorityName1 = () => {
return getPriorityName(props.priority)
}
</script>
<style></style>

2
src/mycomponents/job/jobComMainDetailCard.vue

@ -7,6 +7,7 @@
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between u-p-b-16"> <div class="u-flex justify-between u-p-b-16">
<location v-if="isShowFromLocation && dataContent.fromLocationCode" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location> <location v-if="isShowFromLocation && dataContent.fromLocationCode" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
<level title="优先级" :priority="dataContent.priority"> </level>
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode || dataContent.locationCode"> </to-location> <to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode || dataContent.locationCode"> </to-location>
</div> </div>
<view class="card_view" v-if="isShowDeliverType"> <view class="card_view" v-if="isShowDeliverType">
@ -25,6 +26,7 @@ import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import level from '@/mycomponents/balance/level.vue'
const props = defineProps({ const props = defineProps({
dataContent: { dataContent: {

272
src/mycomponents/scan/winComScanBalanceLocation.vue

@ -0,0 +1,272 @@
<template>
<view>
<uni-popup ref="popup" :mask-click="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()"></image>
</view>
</view>
<view class="uni-flex uni-row" style="align-items: center; background-color: #fff; margin-left: 20rpx; margin-right: 20rpx; border-radius: 8rpx; height: 30px">
<view class="uni-center" style="width: 25%; font-size: 35rpx"> 来源库位 </view>
<!-- style="width: 75%;padding: 8rpx" -->
<view class="">
<!-- <input v-model="fromLocationCode" placeholder="请扫描来源库位" :focus="locationOnFocus"
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> -->
<view v-if="allowModifyLocation">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" @confirm="handleConfirm" style="height: 30rpx; border: 1px solid #fff"></uni-combox>
</view>
<view v-else>
<text style="padding: 5px; font-size: 40rpx">
{{ fromLocationCode }}
</text>
</view>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :isShowHistory="isShowHistory" :clearResult="true" :headerType="headerType"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<balance-select ref="balanceSelect" @onSelectItem="selectBalanceItem"></balance-select>
<!-- 模拟扫描功能 -->
</view>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import { getBalanceByManagementPrecisionByPacking } from '@/common/balance.js'
import { getBalanceByParams, getBasicItemByCode } from '@/api/request2.js'
import { getListLocationAreaTypeDesc, checkDirectoryItemExist, getDirectoryItemArray, getLocationAreaTypeName, getInventoryStatusDesc, getListItemTypeDesc, getItemTypeInfo } from '@/common/directory.js'
export default {
name: 'winScanPack',
emits: ['getBalance', 'onCloseScanPopup'],
components: {
winComScan,
balanceSelect
},
props: {
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: false
},
headerType: {
type: String,
default: 'HPQ,HMQ'
},
balanceFromInventoryStatuses: {
// fromInventoryStatuses
type: Boolean,
default: true
},
bussinessCode: {
type: String,
default: ''
},
//
allowModifyLocation: {
type: Boolean,
default: true
}
},
data() {
return {
scanResult: {},
show: false,
scanList: [],
expand: false,
showScanResult: {},
expendIcon: 'arrow-down',
fromLocationCode: '',
fromLocation: '',
fromLocationList: [],
fromLocationAreaTypeList: [],
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: [],
itemTypesList: [],
isCheck: false,
resultData: {}
}
},
created() {},
methods: {
openScanPopup(businessType) {
this.businessType = businessType
this.fromInventoryStatuses = getDirectoryItemArray(businessType.outInventoryStatuses)
this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom')
},
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode
this.fromLocationList = fromLocationList
if (fromLocationCode != '') {
this.packGetFocus()
} else if (this.fromLocationList.length == 0) {
this.locationGetFocus()
} else {
this.fromLocationCode = this.fromLocationList[0]
}
setTimeout((res) => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses) // 出库库存状态; //出库库存状态
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes) //
},
handleConfirm() {
this.$emit('confirm', this.fromLocationCode)
},
getScanResult(result) {
if (this.fromLocationCode == '') {
this.showErrorMessage('请选择来源库位', (res) => {})
return
}
this.resultData = result
if (!result.package) {
this.showErrorMessage(`${result.label.code}包装信息为空`)
return
}
//
this.getItemCodeType(result.package.itemCode, (callBack) => {
this.queryBalance(this.resultData)
})
},
queryBalance(result) {
const params = {
locationCode: this.fromLocationCode,
itemCode: result.package.itemCode,
batch: result.label.batch,
packingNumber: result.label.packingNumber,
parentPackingNumber: result.package.parentNumber,
inventoryStatus: this.fromInventoryStatuses,
areaType: this.fromLocationAreaTypeList,
bussinessCode: this.bussinessCode
}
getBalanceByParams(params)
.then((res) => {
uni.hideLoading()
if (res.data.length == 0) {
const status = getInventoryStatusDesc(params.inventoryStatus)
const areaType = getListLocationAreaTypeDesc(params.areaType)
const hint = `按物料号 [${params.itemCode}] <br>` + `包装号 [${params.packingNumber}] <br>` + `批次 [${params.batch}] <br>` + `状态 [${status}] <br>` + `库区 [${areaType}] <br>` + '未查找到库存余额'
this.showErrorMessage(hint)
} else if (res.data.length == 1) {
result.balance = res.data[0]
if (result.label.packingNumber != result.balance.packingNumber) {
result.balance.lableQty = result.label.qty
}
this.$emit('getBalance', result)
// this.closeScanPopup()
} else {
//
this.$refs.balanceSelect.openPopup(res.data)
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getItemCodeType(itemCode, callBack) {
uni.showLoading({
title: '加载中',
mask: true
})
getBasicItemByCode(itemCode)
.then((res) => {
if (res.data != null && res.data.list.length > 0) {
const result = res.data.list[0]
const { status } = result
const { type } = result
if (status == 'ENABLE') {
if (checkDirectoryItemExist(this.itemTypesList, type)) {
callBack()
} else {
const hint = getListItemTypeDesc(this.itemTypesList)
uni.hideLoading()
this.showErrorMessage(`扫描物料[${itemCode}]是[${getItemTypeInfo(type).label}],需要的物料类型是[${hint}]`)
}
} else {
uni.hideLoading()
this.showErrorMessage(`物料【${itemCode}】不可用`)
}
} else {
uni.hideLoading()
this.showErrorMessage(`未查找到物料【${itemCode}`)
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, (res) => {
if (res) {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus()
}
}
})
},
selectBalanceItem(item) {
this.resultData.balance = item
this.$emit('getBalance', this.resultData)
// this.closeScanPopup()
},
closeScanPopup() {
this.$refs.popup.close()
this.$emit('onCloseScanPopup')
},
getfocus() {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus()
}
},
packGetFocus() {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus()
}
},
packLoseFocus() {
if (this.$refs.comscan) {
this.$refs.comscan.losefocus()
}
}
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

140
src/mycomponents/scan/winScanPackLevel.vue

@ -0,0 +1,140 @@
<template>
<view>
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()">
</image>
</view>
</view>
<view class="uni-flex uni-row"
style="align-items: center; background-color: #fff; margin-left: 20rpx; margin-right: 20rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%; font-size: 32rpx; font-weight: bold"> 优先级 </view>
<view style="width: 100%">
<uni-data-select style="padding: 20rpx;" v-model="priorityCode" :localdata="priorityList" @change="change"
:clear="false"></uni-data-select>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
</-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onPullDownRefresh } from '@dcloudio/uni-app'
import { getLabelInfo } from '@/common/label.js'
import winComScan from '@/mycomponents/scan/winComScan.vue'
const props = defineProps({
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: 'HPQ'
}
})
const show = ref(false)
const priorityList = ref([
{
value: 0,
text: '低'
},
{
value: 1,
text: '中'
},
{
value: 2,
text: '高'
}
])
const priorityCode = ref(1)
const comscan = ref()
const simulateScan = (scanMessage) => {
getLabelInfo(scanMessage, headerType.value, (callback) => {
if (callback.success) {
getScanResult(callback)
} else {
showMessage(callback.message)
}
})
}
const openScanPopup = () => {
setTimeout((res) => {
show.value = true
}, 200)
}
const closeScanPopup = () => {
show.value = false
emit('close', '')
}
const scanClick = () => {
if (comscan.value) {
comscan.value.clickScanMsg()
}
}
const cancelClick = () => {
if (comscan.value) {
comscan.value.clearScanValue()
}
}
const getScanResult = (result) => {
if (result.success) {
result.priorityCode = priorityCode.value
emit('getResult', result)
} else {
showMessage(result.message)
}
}
const getfocus = () => {
if (comscan.value != undefined) {
comscan.value.getfocus()
}
}
const losefocus = () => {
if (comscan.value != undefined) {
comscan.value.losefocus()
}
}
const showMessage = (message) => {
comMessageRef.value.showMessage(message)
}
const change = (e) => {
console.log(e)
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

28
src/pages/count/job/countJob.vue

@ -135,11 +135,18 @@ const getList = (type) => {
action: '==', action: '==',
value: 'locationCode' value: 'locationCode'
}) })
// filters.push({
// column: 'accept_user_id', filters.push({
// action: '==', column: 'isOpenCount',
// value: store.id action: '==',
// }) value: 'TRUE'
})
filters.push({
column: 'accept_user_id',
action: '==',
value: store.id
})
const params = { const params = {
filters, filters,
pageNo: pageNo.value, pageNo: pageNo.value,
@ -271,6 +278,11 @@ const getDataListByType = (code) => {
action: '==', action: '==',
value: 'locationCode' value: 'locationCode'
}) })
filters.push({
column: 'isOpenCount',
action: '==',
value: 'TRUE'
})
filters.push({ filters.push({
column: 'accept_user_id', column: 'accept_user_id',
action: '==', action: '==',
@ -319,6 +331,12 @@ const getScanResult = (result) => {
action: '==', action: '==',
value: 'locationCode' value: 'locationCode'
}) })
filters.push({
column: 'isOpenCount',
action: '==',
value: 'TRUE'
})
filters.push({ filters.push({
column: 'countSplitCode', column: 'countSplitCode',
action: '==', action: '==',

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

@ -138,7 +138,9 @@ export default {
workStationCode: '', workStationCode: '',
planDate: '', planDate: '',
showDateSelect: false, showDateSelect: false,
planDateList: [] planDateList: [],
fgLocationCode: '',
rawLocationCode: ''
} }
}, },
props: { props: {
@ -181,6 +183,8 @@ export default {
this.planDate = '' this.planDate = ''
this.showDateSelect = false this.showDateSelect = false
this.planDateList = [] this.planDateList = []
this.fgLocationCode = ''
this.rawLocationCode = ''
}, },
closeRequestPopup() { closeRequestPopup() {
@ -233,7 +237,9 @@ export default {
planQty: this.planQty, planQty: this.planQty,
goodQty: this.goodQty, goodQty: this.goodQty,
planNumber: this.planNumber, planNumber: this.planNumber,
workStationCode: this.workStationCode workStationCode: this.workStationCode,
fgLocationCode: this.fgLocationCode,
rawLocationCode: this.rawLocationCode
} }
this.closeRequestPopup() this.closeRequestPopup()
this.$emit('confirm', item) this.$emit('confirm', item)
@ -252,6 +258,9 @@ export default {
this.productionLineName = `${data[0].label}${data[1].label}` this.productionLineName = `${data[0].label}${data[1].label}`
this.productionLineCode = data[0].value this.productionLineCode = data[0].value
this.workStationCode = data[1].value this.workStationCode = data[1].value
const parent = this.productLineList.filter((res) => res.value == this.productionLineCode)
const fgLocation = parent[0].children.filter((children) => children.value == this.workStationCode)
this.fgLocationCode = fgLocation[0].fgLocationCode
this.clearItemCode() this.clearItemCode()
this.clearPackUnit() this.clearPackUnit()
}, },
@ -322,7 +331,7 @@ export default {
uni.hideLoading() uni.hideLoading()
if (res.data && res.data.length > 0) { if (res.data && res.data.length > 0) {
res.data.forEach((item) => { res.data.forEach((item) => {
item.label = `${item.itemCode}${item.planQty}${this.getUomInfo(item.uom)})` + `(${dateFormatData(item.planDate)})` item.label = `${item.itemCode}${item.planQty}${this.getUomInfo(item.uom)})`
item.value = item item.value = item
}) })
this.itemCodeList = res.data this.itemCodeList = res.data
@ -346,6 +355,26 @@ export default {
// //
this.clearPackUnit() this.clearPackUnit()
uni.showLoading({
title: '加载中',
mask: true
})
getPackUnitByItemCode(this.itemCode)
.then((res) => {
uni.hideLoading()
if (res.data && res.data.list.length > 0) {
res.data.list.forEach((item) => {
item.value = item.packUnit
item.label = `${getPackUnitName(item.packUnit)}(${item.packQty}${this.getUomInfo(item.uom)})`
})
this.packUnitList = res.data.list
const defaultData = res.data.list.filter((item) => item.defaultPackageunit == 'TRUE')
this.confirmSelectPackUnit(defaultData)
}
})
.catch((error) => {
uni.hideLoading()
})
}, },
clearPackUnit() { clearPackUnit() {

5
src/pages/fg/receiptByPlan.vue

@ -9,6 +9,10 @@
<view class="split_line"></view> <view class="split_line"></view>
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">完工库位</view>
<view style="font-size: 30rpx; margin-top: 13rpx">{{ dataContent.fgLocationCode }} </view>
</view>
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">计划数</view> <view class="text_lightblue">计划数</view>
<view>{{ dataContent.planQty }}{{ dataContent.uom }}</view> <view>{{ dataContent.planQty }}{{ dataContent.uom }}</view>
@ -152,6 +156,7 @@ const requestConfirm = (result) => {
batch: result.batch, batch: result.batch,
packUnit: result.packUnit, packUnit: result.packUnit,
workStationCode: result.workStationCode, workStationCode: result.workStationCode,
fgLocationCode: result.fgLocationCode,
subList: [] subList: []
} }
} }

2
src/pages/index/index.vue

@ -324,7 +324,7 @@ const rightScroll = async (e) => {
} }
const getDictory = () => { const getDictory = () => {
const params = { const params = {
types: ['job_status', 'location_type', 'item_status', 'item_type', 'uom', 'inventory_status', 'container_type', 'pack_unit', 'unplanned_receipt_reason', 'unplanned_issue_reason', 'scrap_reason', 'inspect_failed_reason', 'request_status', 'inspect_type', 'next_action', 'sample_method', 'transfer_mode', 'count_stage', 'inspect_result', 'area_type', 'count_scope_type'] types: ['job_status', 'location_type', 'item_status', 'item_type', 'uom', 'inventory_status', 'container_type', 'pack_unit', 'unplanned_receipt_reason', 'unplanned_issue_reason', 'scrap_reason', 'inspect_failed_reason', 'request_status', 'inspect_type', 'next_action', 'sample_method', 'transfer_mode', 'count_stage', 'inspect_result', 'area_type', 'count_scope_type', 'priority']
} }
getDictionaryItem(params) getDictionaryItem(params)
.then((res) => { .then((res) => {

38
src/pages/issue/coms/comIssueRequestPopup.vue

@ -7,7 +7,7 @@
<view class="" style="font-size: 35rpx"> <view class="" style="font-size: 35rpx">
{{ title }} {{ title }}
</view> </view>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeRequestPopup()"></image> <image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeRequestPopup()"> </image>
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white"> <view class="uni-flex uni-column" style="background-color: white">
@ -21,8 +21,21 @@
<u-select v-model="showWareHouse" mode="single-column" :list="wareHouseList" @confirm="confirmWareHouse"></u-select> <u-select v-model="showWareHouse" mode="single-column" :list="wareHouseList" @confirm="confirmWareHouse"></u-select>
</view> </view>
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>
<view class="uni-flex uni-row" style="align-items: center; background-color: #fff; margin-right: 20rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%; font-size: 32rpx"> 优先级 </view>
<view style="width: 100%">
<uni-data-select style="padding: 20rpx" v-model="priority" :localdata="priorityList" :clear="false"></uni-data-select>
</view>
</view>
<view class="split_line"></view>
<view class="split_line"></view>
<view class="uni-flex uni-row" style="align-items: center; background-color: #fff; margin-right: 20rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%; font-size: 32rpx"> 优先级 </view>
<view style="width: 100%">
<uni-data-select style="padding: 20rpx" v-model="priority" :localdata="priorityList" :clear="false"></uni-data-select>
</view>
</view>
<view class="uni-flex uni-row padding title u-col-center"> <view class="uni-flex uni-row padding title u-col-center">
<text>位置</text> <text>位置</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect"> <view class="uni-flex u-col-center uni-row" @click="showSelect">
@ -118,6 +131,21 @@ const maxlength = ref(10)
const stdPackInfo = ref(undefined) const stdPackInfo = ref(undefined)
const wareHouseList = ref([]) const wareHouseList = ref([])
const showWareHouse = ref(false) const showWareHouse = ref(false)
const priorityList = ref([
{
value: 0,
text: '低'
},
{
value: 1,
text: '中'
},
{
value: 2,
text: '高'
}
])
const priority = ref(1) //
const isShow = ref(false) const isShow = ref(false)
const comMessageRef = ref() const comMessageRef = ref()
const scanPopup = ref() const scanPopup = ref()
@ -178,6 +206,7 @@ const initData = () => {
itemCode.value = '请扫描物料信息' itemCode.value = '请扫描物料信息'
rawLocationCode.value = '' rawLocationCode.value = ''
positionInfo.value = '请选择位置' positionInfo.value = '请选择位置'
priority.value = ''
fromWarehouseCode.value = '请选择仓库代码' fromWarehouseCode.value = '请选择仓库代码'
workshopCode.value = '' // workshopCode.value = '' //
workShopName.value = '' workShopName.value = ''
@ -212,6 +241,10 @@ const itemCodeLoseFocus = () => {
} }
const confirm = () => { const confirm = () => {
if (priority.value === '') {
showErrorMessage('请输入优先级', 'priority')
return
}
if (positionInfo.value == '请选择位置') { if (positionInfo.value == '请选择位置') {
showErrorMessage('请选择位置') showErrorMessage('请选择位置')
return return
@ -256,6 +289,7 @@ const callback = (action) => {
fgLocationCode: fgLocationCode.value, fgLocationCode: fgLocationCode.value,
fromWarehouseCode: fromWarehouseCode.value, fromWarehouseCode: fromWarehouseCode.value,
toWarehouseCode: fromWarehouseCode.value, toWarehouseCode: fromWarehouseCode.value,
priority: priority.value,
itemCode: itemCode.value, itemCode: itemCode.value,
itemName: itemName.value, itemName: itemName.value,
uom: uom.value, uom: uom.value,

3
src/pages/issue/request/issueRequestCreate.vue

@ -92,6 +92,7 @@ const requestConfirm = (action, item) => {
toLocationCode: item.rawLocationCode, toLocationCode: item.rawLocationCode,
fromWarehouseCode: item.fromWarehouseCode, fromWarehouseCode: item.fromWarehouseCode,
useOnTheWay: useOnTheWay.value, useOnTheWay: useOnTheWay.value,
priority: priority.value,
totalQty: 0, totalQty: 0,
subList: [] subList: []
} }
@ -126,7 +127,7 @@ const requestConfirm = (action, item) => {
qty: item.qty, qty: item.qty,
uom: item.uom uom: item.uom
} }
detailSource.value.priority = item.priority
detailSource.value.subList.push(subItem) detailSource.value.subList.push(subItem)
} else { } else {
// //

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

@ -4,7 +4,7 @@
<com-blank-view @goScan="goScan()"></com-blank-view> <com-blank-view @goScan="goScan()"></com-blank-view>
</view> </view>
</view> </view>
<win-scan-pack ref="scanPopup" @getResult="getScanResult" headerType="HCMQ" title="叫料标签" :isShowHistory="false"></win-scan-pack> <winScanPackLevel ref="scanPopup" @getResult="getScanResult" headerType="HCMQ" title="叫料标签" :isShowHistory="false"></winScanPackLevel>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</template> </template>
@ -26,6 +26,7 @@ import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue' import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackLevel from '@/mycomponents/scan/winScanPackLevel.vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const jobContent = ref({}) // const jobContent = ref({}) //
@ -70,13 +71,13 @@ const goScan = () => {
} }
}, 400) }, 400)
} }
const getScanResult = (data) => { const getScanResult = (result) => {
detailSource.value = { detailSource.value = {
subList: [] subList: []
} }
const labelInfo = data.label const labelInfo = result.label
var data = { const data = {
itemCode: labelInfo.itemCode, itemCode: labelInfo.itemCode,
location: labelInfo.location, location: labelInfo.location,
qty: labelInfo.qty, qty: labelInfo.qty,
@ -88,6 +89,7 @@ const getScanResult = (data) => {
detailSource.value.workStationCode = labelInfo.workStationCode detailSource.value.workStationCode = labelInfo.workStationCode
detailSource.value.warehouseCode = labelInfo.warehouseCode detailSource.value.warehouseCode = labelInfo.warehouseCode
detailSource.value.workshopCode = labelInfo.workshopCode detailSource.value.workshopCode = labelInfo.workshopCode
detailSource.value.priority = result.priorityCode
submit() submit()
} }

122
src/pages/package/coms/comScanPackagePack.vue

@ -1,77 +1,7 @@
<template> <template>
<view> <view>
<u-popup mode="bottom" v-model="show"> <winComScanBalanceLocation ref="scanPopup" @getBalance="getScanResult" @onCloseScanPopup="closeScanPopup" bussinessCode="OverPackage"></winComScanBalanceLocation>
<view class="">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描箱码 </view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()"></image>
</view>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
padding:20rpx;
border-radius: 8rpx;">
<view class="uni-center">
位置 :
</view>
<view class="" style="width: 75%;padding: 0rpx">
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 15rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList" :defaultValue="defaultValueList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view> -->
<!-- <u-line class='line_color'></u-line> -->
<view class="uni-flex uni-row" style="align-items: center; background-color: #fff; margin-left: 20rpx; margin-right: 20rpx; margin-top: 8rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%"> 来源库位 </view>
<view class="" style="width: 75%; padding: 8rpx">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请选择库位" @confirm="fromLocationUpdate"></uni-combox>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" headerType="HPQ,HMQ" :isShowHistory="false"> </win-com-scan>
<view style="width: 100%">
<view style="width: 100%" v-if="issueRecord.length > 0">
<view class="uni-flex uni-row space-between u-col-center">
<view class="" style="padding: 10rpx"> 历史记录 </view>
<view class="" style="padding-right: 10rpx">
<u-icon :name="expendIcon" size="35rpx" @click="expands()"></u-icon>
</view>
</view>
<u-line class="line_color" style="padding-top: 10rpx; padding-bottom: 20rpx"> </u-line>
<scroll-view scroll-y="true" class="scroll-view" v-if="expand && issueRecord.length > 0">
<view class="uni-flex u-col" v-for="(record, index) in issueRecord">
<view style="width: 100%">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event, record, index)" :right-options="scanOptions">
<view style="padding: 0px 10px">
<balance :dataContent="record" :isShowFromLocation="false" :isShowStdPack="false"></balance>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line class="line_color"></u-line>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</view>
</view>
</u-popup>
<balance-select ref="balanceSelect" @onSelectItem="selectBalanceItem"></balance-select> <balance-select ref="balanceSelect" @onSelectItem="selectBalanceItem"></balance-select>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> <balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
@ -84,14 +14,14 @@ import winComScan from '@/mycomponents/scan/winComScan.vue'
import balance from '@/mycomponents/balance/balance.vue' import balance from '@/mycomponents/balance/balance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import winComScanBalanceLocation from '@/mycomponents/scan/winComScanBalanceLocation.vue'
import { getDetailOption, getDetailEditRemoveOption } from '@/common/array.js' import { getDetailOption, getDetailEditRemoveOption } from '@/common/array.js'
import { getWorkShopLineStation } from '@/api/request2.js' import { getWorkShopLineStation } from '@/api/request2.js'
import { calc } from '@/common/calc.js' import { calc } from '@/common/calc.js'
import { getBalanceByManagementPrecision } from '@/common/balance.js' import { getDirectoryItemArray } from '@/common/directory'
import { getDirectoryItemArray } from '../../../common/directory'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const props = defineProps({ const props = defineProps({
@ -102,7 +32,6 @@ const props = defineProps({
}) })
const dataContent = ref({}) const dataContent = ref({})
const jobContent = ref({}) const jobContent = ref({})
const expendIcon = ref('arrow-down')
const show = ref(false) const show = ref(false)
const scanList = ref([]) const scanList = ref([])
const toLocation = ref(null) const toLocation = ref(null)
@ -114,9 +43,6 @@ const issueRecord = ref([]) // 发料历史
const expand = ref(true) const expand = ref(true)
const scanOptions = ref({}) const scanOptions = ref({})
const editItem = ref({}) const editItem = ref({})
const positionInfo = ref('请选择位置')
const positionList = ref([])
const defaultValueList = ref([])
const fromInventoryStatuses = ref('') const fromInventoryStatuses = ref('')
const packageInfo = ref({}) const packageInfo = ref({})
const label = ref({}) const label = ref({})
@ -133,11 +59,7 @@ const openScanPopup = (content, jobcontent) => {
dataContent.value = content dataContent.value = content
jobContent.value = jobcontent jobContent.value = jobcontent
initData() initData()
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + scanPopup.value.openScanPopupForJob(fromLocationCode.value, fromLocationList.value, jobContent.value)
// "-" + this.jobContent.subList[0].workStationCode
setTimeout((res) => {
show.value = true
}, 500)
} }
const closeScanPopup = () => { const closeScanPopup = () => {
show.value = false show.value = false
@ -180,6 +102,20 @@ const fromLocationUpdate = (fromlocation) => {
showErrorMessage(`发料库位【${fromlocation}】不存在`) showErrorMessage(`发料库位【${fromlocation}】不存在`)
} }
} }
const getScanResult = (result) => {
const { balance } = result
const packageInfo = result.package
const { itemCode } = balance
const item = toLocation.value.Items.find((r) => r.itemCode == itemCode)
if (item == undefined) {
showErrorMessage(`未查找到物料【${itemCode}】的翻包明细`, (res) => {
getfocus()
})
} else {
afterGetBalance(result.label, balance, packageInfo)
}
}
const onScan = (result) => { const onScan = (result) => {
try { try {
if (fromLocationCode.value == '') { if (fromLocationCode.value == '') {
@ -312,8 +248,9 @@ const creatRecord = (label, balance, packageInfo) => {
balance.packUnit = packageInfo.packUnit balance.packUnit = packageInfo.packUnit
const record = { const record = {
scaned: true, scaned: true,
itemCode: label.itemCode, itemCode: label.itemCode
packingNumber: label.packingNumber, packingNumber: packageInfo.number,
parentPackingNumber:packageInfo.parentNumber,
batch: label.batch, batch: label.batch,
qty: Number(balance.qty), qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), // qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
@ -341,20 +278,17 @@ const addRecord = (batch, label, balance, packageInfo) => {
getfocus() getfocus()
} }
const getfocus = () => { const getfocus = () => {
if (!comscan.value) { if (scanPopup.value) {
comscan.value.getfocus() scanPopup.value.getfocus()
} }
} }
const losefocus = () => { const losefocus = () => {
if (comscan.value != undefined) { if (scanPopup.value ) {
comscan.value.losefocus() scanPopup.value.losefocus()
} }
} }
const expands = () => {
expand.value = !expand.value
expendIcon.value = expand.value == true ? 'arrow-down' : 'arrow-up'
}
const swipeClick = (params, item) => { const swipeClick = (params, item) => {
const { text } = scanOptions.value[params[1]] const { text } = scanOptions.value[params[1]]
if (text == '详情') { if (text == '详情') {
@ -396,10 +330,10 @@ const remove = (record, index) => {
}) })
} }
const packGetFocus = () => { const packGetFocus = () => {
comscan.value.getfocus() scanPopup.value.getfocus()
} }
const packLoseFocus = () => { const packLoseFocus = () => {
comscan.value.losefocus() scanPopup.value.losefocus()
} }
const showMessage = (message, callback) => { const showMessage = (message, callback) => {
setTimeout((r) => { setTimeout((r) => {

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

@ -51,7 +51,7 @@ import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { takeOverPageJob, cancleTakeOverPageJob, getOverPageJobDetail, overPageSubmit, getPackageLabel } from '@/api/request2.js' import { takeOverPageJob, cancleTakeOverPageJob, getOverPageJobDetail, overPageSubmit, getPackageLabel } from '@/api/request2.js'
import { goHome, updateTitle, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryItemArray, getPackingNumberAndBatch } from '@/common/basic.js' import { goHome, updateTitle, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryItemArray, getPackingNumberAndBatch, deepCopyData } from '@/common/basic.js'
import { getDataSource } from '@/pages/package/js/package.js' import { getDataSource } from '@/pages/package/js/package.js'
@ -278,6 +278,7 @@ const setParams = () => {
record.handleQty = r.qty record.handleQty = r.qty
record.fromPackingNumber = r.packingNumber record.fromPackingNumber = r.packingNumber
record.fromParentPackingNumber = r.parentPackingNumber
record.fromBatch = r.batch record.fromBatch = r.batch
record.fromContainerNumber = r.ContainerNumber record.fromContainerNumber = r.ContainerNumber
@ -302,7 +303,7 @@ const setParams = () => {
} }
subItem.recordList.push(record) subItem.recordList.push(record)
}) })
subList.push(subItem) subList.push(deepCopyData(subItem))
} }
} }
}) })

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

@ -294,7 +294,11 @@ const commit = () => {
} }
const checkSubmit = () => { const checkSubmit = () => {
const tempHandleQty = detailSource.value[0].subList[0].handleQty // submitJob()
let tempHandleQty = 0
detailSource.value.forEach((res) => {
tempHandleQty += res.handleQty
})
// //
if (tempHandleQty % toPackQty.value > 0) { if (tempHandleQty % toPackQty.value > 0) {
comMessageRef.value.showQuestionMessage(`扫描数量【${tempHandleQty}】,将有1个非整包,是否提交?`, (res) => { comMessageRef.value.showQuestionMessage(`扫描数量【${tempHandleQty}】,将有1个非整包,是否提交?`, (res) => {

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

@ -22,7 +22,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue' import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { getProductionReceiptJobList, cancleTakeProductionReceiptJob, getIssueJobByProductionline } from '@/api/request2.js' import { getProductionReceiptJobList, cancleTakeProductionReceiptJob, getProductionReceiptJobByProductionline } from '@/api/request2.js'
import { goHome, updateTitle } from '@/common/basic.js' import { goHome, updateTitle } from '@/common/basic.js'
@ -70,7 +70,7 @@ onShow(() => {
}) })
onLoad((option) => { onLoad((option) => {
title.value = option.title title.value = option.title
getIssueJobByProductionline() getProductionReceiptJobByProductionline()
}) })
onReady(() => { onReady(() => {
detailOptions.value = getDetailOption() detailOptions.value = getDetailOption()
@ -107,8 +107,8 @@ const productionLineCode = (productionLineCode) => {
productionLine.value = productionLineCode productionLine.value = productionLineCode
getList('refresh', productionLine.value) getList('refresh', productionLine.value)
} }
const getIssueJobByProductionline = () => { const getProductionReceiptJobByProductionline = () => {
getIssueJobByProductionline().then((res) => { getProductionReceiptJobByProductionline().then((res) => {
console.log('生产线', res) console.log('生产线', res)
if (res.code == 0) { if (res.code == 0) {
productionLineList.value = res.data.map((item) => ({ productionLineList.value = res.data.map((item) => ({

Loading…
Cancel
Save