Browse Source

page/unPlanned 文件迁移 8/8-10/25

hella_vue3
王志国 3 weeks ago
parent
commit
da792b67bd
  1. 10
      src/pages/unPlanned/coms/comIssueJobCard.vue
  2. 185
      src/pages/unPlanned/coms/comReceiptDetailCardBatch.vue
  3. 9
      src/pages/unPlanned/record/issueRecord.vue
  4. 12
      src/pages/unPlanned/record/receiptRecord.vue
  5. 13
      src/pages/unPlanned/request/issueRequestCreate.vue
  6. 2
      src/pages/unPlanned/request/receiptRequestCreate.vue

10
src/pages/unPlanned/coms/comIssueJobCard.vue

@ -1,6 +1,14 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent" :isShowToLocation="false"></jobComMainDetailCard>
<view class="task_item" style="margin-left:22rpx;">
<view class="task_text">
<view class="card_view">
<text class="card_packing_code ">目的地</text>
<text class="card_content" style="word-wrap: break-word; word-break: break-all;" >{{dataContent.destination}}</text>
</view>
</view>
</view>
</job-com-main-card> </job-com-main-card>
</template> </template>

185
src/pages/unPlanned/coms/comReceiptDetailCardBatch.vue

@ -0,0 +1,185 @@
<template>
<view class="" style="background-color: #fff;">
<!-- <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showBalanceQty="false">
</item-qty> -->
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false">
</item-compare-qty>
<view class="" v-for="(item,index) in dataContent.subList">
<u-swipe-action ref="swipeAction" v-if="index == 0"
:options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
:class="item.scaned?'scan_view':''"
@click="(...event)=>swipeClick(event,item)">
<view style="display: flex;">
<view style="flex: 1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode">
</location>
<to-location v-if="item.toLocationCode" title="目标库位" :locationCode="item.toLocationCode">
</to-location>
</view>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</view>
</u-swipe-action>
</view>
<recommend-qty-edit ref="receiptEditRef" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<win-scan-location ref="scanLocationCodeRef" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<detail-info-popup ref="detailInfoPopupRef"></detail-info-popup>
<comMessage ref="messageRef"></comMessage>
</view>
</template>
<script setup lang="ts">
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import config from '@/static/config.js'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
import { ref, watch, onMounted } from 'vue';
const props = defineProps({
dataContent: {
type: Object,
default: () => ({})
},
settingParam: {
type: Object,
default: () => ({})
},
isShowLocation: {
type: Boolean,
default: false
},
locationAreaTypeList: {
type: Object,
default: null
},
isEdit: {
type: Boolean,
default: true
}
});
const emit = defineEmits(['updateData', 'remove']);
const showItem = ref({});
const editItem = ref({ record: {} });
const detailOptions = ref([]);
const scanOptions = ref([]);
const options = ref([]);
const removeOptions = ref([]);
const editAndRemoveOptions = ref([]);
const locatonItem = ref(null);
const collapse1Ref = ref(null);
const receiptEditRef = ref(null);
const scanLocationCodeRef = ref(null);
const detailInfoPopupRef = ref(null);
const messageRef = ref(null);
watch(() => props.dataContent, (newDataContent) => {
if (newDataContent.subList.length > 0) {
setTimeout(() => {
if (collapse1Ref.value) {
collapse1Ref.value.resize();
}
}, 500);
}
}, { immediate: true, deep: true });
onMounted(() => {
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value = getEditRemoveOption();
});
const swipeClick = (e, item) => {
if (e.content.text === "详情") {
detail(item);
} else if (e.content.text === "编辑") {
edit(item);
} else if (e.content.text === "库位") {
showLocation(item);
} else if (e.content.text === "移除") {
remove(item);
}
};
const edit = (item) => {
editItem.value = item;
receiptEditRef.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
};
const showLocation = (item) => {
locatonItem.value = item;
scanLocationCodeRef.value.openScanPopup();
};
const getLocation = (location, code) => {
locatonItem.value.toLocationCode = code;
emit('updateData');
};
const detail = (item) => {
showItem.value = item;
detailInfoPopupRef.value.openPopup(item);
};
const remove = (item) => {
messageRef.value.showQuestionMessage("确定移除扫描信息?", res => {
if (res) {
item.scaned = false;
item.handleQty = null;
emit('remove', item);
}
});
};
const confirm = (qty) => {
editItem.value.handleQty = qty;
emit('updateData');
};
const isDevlement = () => {
return config.isDevelopment;
};
const copy = (detail) => {
const content = `HPQ;V1.0;I${detail.itemCode};P${detail.packingNumber};B${detail.batch};Q${detail.qty}`;
// #ifdef H5
navigator.clipboard.writeText(content).then(() => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
});
});
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
});
}
});
// #endif
};
</script>
<style>
</style>

9
src/pages/unPlanned/record/issueRecord.vue

@ -121,9 +121,10 @@ const getDataSource = (result) => {
// newDetail.inventoryStatus = 'OK' // newDetail.inventoryStatus = 'OK'
itemp.subList.push(newDetail) itemp.subList.push(newDetail)
detailSource.value.push(itemp) detailSource.value.push(itemp)
packGetFocus()
} else { } else {
const detail = item.subList.find((r) => { const detail = item.subList.find((r) => {
if (r.packingNumber == result.packingNumber && r.batch == result.batch && r.locationCode == result.locationCode && r.inventoryStatus == result.inventoryStatus && r.scaned == true) { if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus && r.scaned == true) {
return r return r
} }
}) })
@ -131,12 +132,16 @@ const getDataSource = (result) => {
if (detail == undefined) { if (detail == undefined) {
const newDetail = createDetailInfo(balance, pack) const newDetail = createDetailInfo(balance, pack)
item.subList.push(newDetail) item.subList.push(newDetail)
packGetFocus()
} else { } else {
showErrorMessage(`${result.packingNumber}已经在列表中`) showErrorMessage(`箱码[${balance.packingNumber}]批次[${balance.batch}]已经扫描`)
} }
} }
handleCalcHandleQty() handleCalcHandleQty()
} }
const packGetFocus = ()=>{
scanPopup.value?.packGetFocus()
}
const handleCalcHandleQty = () => { const handleCalcHandleQty = () => {
calcHandleQty(detailSource.value) calcHandleQty(detailSource.value)
} }

12
src/pages/unPlanned/record/receiptRecord.vue

@ -111,9 +111,10 @@ const getScanResult = (result) => {
const newDetail = createDetailInfo(label, pack) const newDetail = createDetailInfo(label, pack)
itemp.subList.push(newDetail) itemp.subList.push(newDetail)
detailSource.value.push(itemp) detailSource.value.push(itemp)
getfocus()
} else { } else {
const detail = item.subList.find((r) => { const detail = item.subList.find((r) => {
if (r.packingNumber == result.number && r.batch == result.batch) { if (r.packingNumber == pack.number && r.batch == pack.batch) {
return r return r
} }
}) })
@ -121,13 +122,16 @@ const getScanResult = (result) => {
if (detail == undefined) { if (detail == undefined) {
const newDetail = createDetailInfo(label, pack) const newDetail = createDetailInfo(label, pack)
item.subList.push(newDetail) item.subList.push(newDetail)
getfocus()
} else if (detail.scaned) { } else if (detail.scaned) {
showErrorMessage(`箱码[${result.Number}]批次[${result.batch}]已经扫描`) showErrorMessage(`箱码[${pack.Number}]批次[${pack.batch}]已经扫描`)
} }
} }
calcHandleQty() calcHandleQty()
} }
const getfocus = ()=>{
scanPopup.value?.getfocus()
}
const createItemInfo = (label, pack) => { const createItemInfo = (label, pack) => {
const item = { const item = {
itemCode: pack.itemCode, itemCode: pack.itemCode,
@ -217,7 +221,7 @@ const commit = () => {
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成计划外入库记录<br>${res.data}`) showCommitSuccessMessage(`提交成功\n生成计划外入库记录\n${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }

13
src/pages/unPlanned/request/issueRequestCreate.vue

@ -122,9 +122,10 @@ const getDataSource = (result) => {
const newDetail = createDetailInfo(balance, pack) // const newDetail = createDetailInfo(balance, pack) //
itemp.subList.push(newDetail) itemp.subList.push(newDetail)
detailSource.value.push(itemp) detailSource.value.push(itemp)
packGetFocus()
} else { } else {
const detail = item.subList.find((r) => { const detail = item.subList.find((r) => {
if (r.packingNumber == result.packingNumber && r.batch == result.batch && r.locationCode == result.locationCode && r.inventoryStatus == result.inventoryStatus && r.scaned == true) { if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus && r.scaned == true) {
return r return r
} }
}) })
@ -132,13 +133,16 @@ const getDataSource = (result) => {
if (detail == undefined) { if (detail == undefined) {
const newDetail = createDetailInfo(balance, pack) const newDetail = createDetailInfo(balance, pack)
item.subList.push(newDetail) item.subList.push(newDetail)
packGetFocus()
} else { } else {
showErrorMessage(`${result.packingNumber}已经在列表中`) showErrorMessage(`包装[${balance.packingNumber}]批次[balance.batch${balance.batch}]重复扫描`)
} }
} }
handleCalcHandleQty() handleCalcHandleQty()
} }
const packGetFocus = ()=>{
scanPopup.value?.packGetFocus()
}
const handleCalcHandleQty = () => { const handleCalcHandleQty = () => {
calcHandleQty(detailSource.value) calcHandleQty(detailSource.value)
} }
@ -146,6 +150,7 @@ const handleCalcHandleQty = () => {
const showErrorMessage = (message) => { const showErrorMessage = (message) => {
comMessageRef.value.showErrorMessage(message, (res) => { comMessageRef.value.showErrorMessage(message, (res) => {
if (res) { if (res) {
packGetFocus()
} }
}) })
} }
@ -181,7 +186,7 @@ const commit = () => {
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成计划外出库申请<br>${res.data}`) showCommitSuccessMessage(`提交成功\n生成计划外出库申请\n${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }

2
src/pages/unPlanned/request/receiptRequestCreate.vue

@ -147,7 +147,7 @@ const submit = () => {
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成计划外入库申请<br>${res.data}`) showCommitSuccessMessage(`提交成功\n生成计划外入库申请\n${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }

Loading…
Cancel
Save