Browse Source

inventoryMove文件迁移,action:betweeen改成between Vue2升级Vue3 10/25-11/8

hella_vue3
王志国 2 weeks ago
parent
commit
40b32f5456
  1. 2
      src/pages/inspect/job/inspectJob.vue
  2. 6
      src/pages/inventoryMove/coms/comInventoryDetailCard.vue
  3. 2
      src/pages/inventoryMove/coms/comMoveJob.vue
  4. 209
      src/pages/inventoryMove/coms/comMoveRecord.vue
  5. 7
      src/pages/inventoryMove/coms/comMoveRecordCard.vue
  6. 261
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue
  7. 169
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  8. 2
      src/pages/inventoryMove/job/inventoryMoveJob.vue
  9. 2
      src/pages/issue/job/issueJob.vue
  10. 4
      src/pages/issue/job/issueJob0816.vue
  11. 2
      src/pages/package/job/overPackageJob.vue
  12. 2
      src/pages/productDismantle/job/productDismantleJob.vue
  13. 2
      src/pages/productPutaway/job/productPutawayJob.vue
  14. 2
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  15. 2
      src/pages/productReceipt/job/completeReceiveJob.vue
  16. 2
      src/pages/productReceipt/job/productReceiptJob.vue
  17. 2
      src/pages/productRecycle/job/productRecycleJob.vue
  18. 2
      src/pages/productionReceipt/job/productionReceiptJob.vue
  19. 2
      src/pages/productionReturn/job/returnJob.vue
  20. 2
      src/pages/purchaseReceipt/job/receiptJob.vue
  21. 2
      src/pages/purchaseReturn/job/returnJob.vue
  22. 2
      src/pages/putaway/job/putawayJob.vue
  23. 2
      src/pages/repleinsh/job/repleinshJob.vue
  24. 2
      src/pages/scrap/job/scrapJob.vue
  25. 2
      src/pages/stockUp/job/stockUpJob.vue
  26. 2
      src/pages/supplierDeliver/record/supplierDeliverRecord.vue
  27. 2
      src/pages/transfer/job/issueJob.vue
  28. 2
      src/pages/transfer/job/receiptJob.vue
  29. 2
      src/pages/unPlanned/job/issueJob.vue
  30. 2
      src/pages/unPlanned/job/receiptJob.vue

2
src/pages/inspect/job/inspectJob.vue

@ -112,7 +112,7 @@ export default {
if (this.checkedToday) { if (this.checkedToday) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: this.todayTime value: this.todayTime
}) })
} }

6
src/pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -4,7 +4,10 @@
<u-collapse-item :open="true"> <u-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<view style="flex: 1"> <view style="flex: 1">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <!-- <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>-->
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
</view> </view>
</template> </template>
<view class="split_line"></view> <view class="split_line"></view>
@ -23,6 +26,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, nextTick, watch } from 'vue' import { ref, onMounted, nextTick, watch } from 'vue'
import itemQty from '@/mycomponents/item/itemQty.vue' import itemQty from '@/mycomponents/item/itemQty.vue'
import ItemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'

2
src/pages/inventoryMove/coms/comMoveJob.vue

@ -124,7 +124,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

209
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -9,7 +9,11 @@
<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-move-record-card :dataContent="item" :index="index" @removeData="removeData" :isShowStatus="isShowStatus" @updateData="updateData" @removePack="removePack" :allowEditStatus="allowEditStatus"> </com-move-record-card> <com-move-record-card :dataContent="item" :index="index"
@removeData="removeData" :isShowStatus="isShowStatus"
@updateData="updateData" @removePack="removePack"
:allowEditQty="true" :allowEditStatus="allowEditStatus">
</com-move-record-card>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -26,10 +30,20 @@
</view> </view>
</view> </view>
</view> </view>
<win-scan-button @goScan="openScanPopup"></win-scan-button> <win-scan-button @goScan="showFromLocationPopup"></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :title="'箱码'"> </win-scan-pack-and-location> <okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop'
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation="getFromLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> @showFromLocationPopup='showFromLocationPopup'
@itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm'
@getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'
@clickBtnClearFromLocation='clearFromLocation'
@clickBtnClearItemCode='clearItemCode'>
</okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" @clearItemCode='clearItemCode' :title="'箱码'"></win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位"
@getLocation="getFromLocation" :locationAreaTypeList="fromLocationAreaTypeList"
@clearFromLocation='clearFromLocation'>
</win-scan-location>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
@ -44,12 +58,15 @@ import comMoveRecordCard from '@/pages/inventoryMove/coms/comMoveRecordCard.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import OkToHoldRecordPack from '@/pages/inventoryMove/coms/okToHoldRecordPack.vue'
import { inventoryMoveRecordSubmit, getBasicLocationByCode } from '@/api/request2.js' import { inventoryMoveRecordSubmit, getBasicLocationByCode } from '@/api/request2.js'
import { getDirectoryItemArray,getInventoryStatusName } from '@/common/directory.js' import { getDirectoryItemArray,getInventoryStatusName } from '@/common/directory.js'
import { getPrecisionStrategyList } from '@/common/balance.js' import { getPrecisionStrategyList } from '@/common/balance.js'
import {
calc
} from '@/common/calc.js';
import { getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js' import { getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js' import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js'
@ -73,7 +90,12 @@ const props = defineProps({
myTitle: { myTitle: {
type: String, type: String,
default: '' default: ''
} },
//
showOnePop: {
type: Boolean,
default: false
},
}) })
const fromLocationCode = ref('') const fromLocationCode = ref('')
const fromLocationInfo = ref({}) const fromLocationInfo = ref({})
@ -89,6 +111,8 @@ const fromLocationAreaTypeList = ref([])
const toLocationAreaTypeList = ref([]) const toLocationAreaTypeList = ref([])
const isShowEditLocation = ref(false) const isShowEditLocation = ref(false)
const scanFromLocationCode = ref() const scanFromLocationCode = ref()
const getResult = ref({})
const managementType = ref('')
const scanPopup = ref() const scanPopup = ref()
const businessTypeCode = ref(props.businessTypeCode) const businessTypeCode = ref(props.businessTypeCode)
@ -96,6 +120,7 @@ const managementList = ref()
const comMessageRef = ref() const comMessageRef = ref()
const subList = ref([]) const subList = ref([])
const toWarehouseCode = ref('') const toWarehouseCode = ref('')
const okToHoldRecordPackRef = ref(null)
onMounted(() => { onMounted(() => {
getBusinessType(props.businessTypeCode, (res) => { getBusinessType(props.businessTypeCode, (res) => {
if (res.success) { if (res.success) {
@ -182,20 +207,70 @@ const openScanPopup = () => {
scanPopup.value.openScanPopupForType(fromLocationCode.value, businessType.value) scanPopup.value.openScanPopupForType(fromLocationCode.value, businessType.value)
} }
const showFromLocationPopup = () => { const showFromLocationPopup = () => {
nextTick(() => { setTimeout(()=>{
if(props.showOnePop){
okToHoldRecordPackRef.value.fromLocationCode = ''
okToHoldRecordPackRef.value.itemCode = ''
okToHoldRecordPackRef.value.batch = ''
okToHoldRecordPackRef.value.handleQty = 0
okToHoldRecordPackRef.value.showOne = true
}else{
scanFromLocationCode.value.openScanPopup() scanFromLocationCode.value.openScanPopup()
}) }
},200)
} }
const getFromLocation = (location) => { const getFromLocation = (location) => {
fromLocationCode.value = location.code fromLocationCode.value = location.code
fromLocationInfo.value = location fromLocationInfo.value = location
if(!props.showOnePop){
openScanPopup() openScanPopup()
}else{
//
// itemCode.value =''
// batch.value =''
}
} }
const getToLocation = (location, code) => { const getToLocation = (location, code) => {
toLocationCode.value = code toLocationCode.value = code
toLocationInfo.value = location toLocationInfo.value = location
} }
const getScanResult = (result) => { const getScanResult = (result,managementTypeParams)=> {
managementType.value = managementTypeParams
if(props.showOnePop){
okToHoldRecordPackRef.value.itemCode= result.balance.itemCode
okToHoldRecordPackRef.value.batch = result.balance.batch
getResult.value = result//
scanPopup.value.closeScanPopup()
}else{
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
getScanResultAfterBatch(result,managementTypeParams)
}else{
getScanResultAfter(result,managementTypeParams)
}
}
}
const okToHoldRecordPackConfirm = (obj)=>{
// this.getResult. = result//
if(!obj.fromLocationCode){
comMessageRef.value.showErrorMessage('请选择来源库位');
return;
}
if(!obj.itemCode){
comMessageRef.value.showErrorMessage('请选择零件');
return;
}
if(!obj.handleQty){
comMessageRef.value.showErrorMessage('请输入数量');
return;
}
// this.getResult.fromLocationCode = obj.fromLocationCode
getResult.value.label.batch = obj.handleQty
getResult.value.label.qty = obj.handleQty
getScanResultAfterBatch(getResult.value,managementType.value)
}
const getScanResultAfter = (result) => {
const { balance } = result const { balance } = result
const pack = result.package const pack = result.package
const item = detailSource.value.find((res) => { const item = detailSource.value.find((res) => {
@ -250,6 +325,114 @@ const getScanResult = (result) => {
} }
calcHandleQty(detailSource.value) calcHandleQty(detailSource.value)
} }
const getScanResultAfterBatch = (result,managementTypeParams)=> {
const balance = result.balance;
const balanceInfo = result.balance;
const pack = result.package;
let item = detailSource.value.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
let itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack);
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
if (businessTypeCode.value == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = toInventoryStatus.value;
}
newDetail.toLocationCode = toLocationCode.value;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail);
detailSource.value.push(itemp)
clearFromLocation()
okToHoldRecordPackRef.value.handleQty = 0
okToHoldRecordPackRef.value.showOne = false
} else {
let detail = ''
console.log(9988,managementTypeParams)
if(managementTypeParams == 'BY_QUANTITY'){
detail = item.subList.find(r => {
if (r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}else if(managementTypeParams == 'BY_BATCH'){
detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}
console.log(detail)
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
if (businessTypeCode.value == "Move") {
newDetail.toInventoryStatus = balance.inventoryStatus;
} else {
newDetail.toInventoryStatus = toInventoryStatus.value;
}
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = toLocationCode.value;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
clearFromLocation()
okToHoldRecordPackRef.value.handleQty = 0
okToHoldRecordPackRef.value.showOne = false
} else {
// console.log(999,detail.handleQty)
// detail.handleQty =calc.add(detail.handleQty, result.label.qty)
if(managementTypeParams == 'BY_QUANTITY'){
showErrorMessage(
"批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}else if(managementTypeParams == 'BY_BATCH'){
showErrorMessage(
"批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}
}
}
calcHandleQty(detailSource);
}
const getInputMsgResult = (result,fromWitch)=> {
if(fromWitch == 'fromLocationScanMsg'){
// isClearFromLocationCode = false//
scanFromLocationCode.value.getScanResult(result)
}else if(fromWitch == 'itemCodeScanMsg'){
result.fromLocationCode = fromLocationCode.value
scanPopup.value.getScanResult(result)
}
}
//
const clearFromLocation = (fromLocationCodeParams)=>{
okToHoldRecordPackRef.value.fromLocationCode = ''
okToHoldRecordPackRef.value.itemCode =''
okToHoldRecordPackRef.value.batch =''
// this.isClearFromLocationCode = true
}
//
const clearItemCode = (label)=>{
okToHoldRecordPackRef.value.itemCode =''
okToHoldRecordPackRef.value.batch =''
}
const showErrorMessage = (message) => { const showErrorMessage = (message) => {
if(scanPopup.value){ if(scanPopup.value){
scanPopup.value.packLoseFocus() scanPopup.value.packLoseFocus()
@ -349,6 +532,12 @@ const submit = ()=>{
return; return;
} }
// console.log("" + JSON.stringify(params)) // console.log("" + JSON.stringify(params))
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
comMessageRef.value.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
inventoryMoveRecordSubmit(params) inventoryMoveRecordSubmit(params)
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
@ -405,7 +594,7 @@ const setParams = () => {
submitItem.fromPackingNumber = info.packingNumber submitItem.fromPackingNumber = info.packingNumber
submitItem.toPackingNumber = info.packingNumber submitItem.toPackingNumber = info.packingNumber
submitItem.packingNumber = info.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber submitItem.fromContainerNumber = detail.containerNumber
submitItem.toContainerNumber = detail.containerNumber submitItem.toContainerNumber = detail.containerNumber

7
src/pages/inventoryMove/coms/comMoveRecordCard.vue

@ -28,7 +28,12 @@
<view class='split_line'></view> <view class='split_line'></view>
</view> --> </view> -->
<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)">
<comMovebalance :dataContent="item" :isShowStdPack="false" :isShowPack="true" :fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus" :isShowLocation="true" :allowEditStatus="allowEditStatus" :allowEditQty="allowEditQty"></comMovebalance> <comMovebalance :dataContent="item" :isShowStdPack="false"
:fromInventoryStatus="item.inventoryStatus"
:toInventoryStatus="item.toInventoryStatus"
:isShowLocation="true" :allowEditStatus='allowEditStatus'
:isShowPack='item.managementTypeParams == "BY_PACKAGING"'>
</comMovebalance>
</u-swipe-action> </u-swipe-action>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>

261
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -0,0 +1,261 @@
<template>
<view class="">
<u-popup v-model="showOne" mode="bottom" border-radius="14" z-index='12'>
<view class="title">
<view class="title-txt">
需求信息
</view>
<u-icon name="close" color="#4f4f4f" size="28" @click="showOne = false"></u-icon>
</view>
<view class="item">
<view class="label">来源库位</view>
<view class="value">
<u-input v-model="fromLocationCode" @blur="fromLocationScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearFromLocation"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/>
</view>
</view>
<view class="item">
<view class="label">零件</view>
<view class="value">
<u-input v-model="itemCode" @blur="itemCodeScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearItemCode"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/>
</view>
</view>
<view class="item">
<view class="label">批次</view>
<view class="value">
<u-input v-model='batch'></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="batch = ''"></u-icon>
</view>
<view class="searchIcon"></view>
</view>
<view class="item">
<view class="label">数量</view>
<view class="value1">
<u-number-box v-model="handleQty" @change="valChange"></u-number-box>
<view class="uom">EA</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="showOne = false">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</u-popup>
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> -->
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script setup>
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getBusinessType
} from '@/common/record.js';
import {
getLabelInfo
} from '@/common/label.js';
import {ref, onMounted} from 'vue';
const props = defineProps({
showOnePop: {
type: Boolean,
default: false
}
});
const handleQty = ref(0)
const fromLocationCode = ref('')
const itemCode = ref('')
const batch = ref('')
const showOne = ref(false)
//
const boxfocus = ref(false)
const scanMsg = ref('')
const fromWitch = ref('')
const scanList = ref([])
const isShowHistory = ref('')
const headerType = ref('')
const scanLocationCode = ref(null);
const comMessage = ref(null);
const emit = defineEmits(['showFromLocationPopup', 'itemCodeClick', 'confirm', 'getInputMsgResult', 'clickBtnClearFromLocation', 'clickBtnClearItemCode']);
onMounted(() => {
});
const fromLocationClick = () => {
emit('showFromLocationPopup');
};
const itemCodeClick = () => {
if (!fromLocationCode.value) {
comMessage.value.showMessage("请先扫描来源库位");
return;
}
emit('itemCodeClick');
};
const confirm = () => {
const obj = {
fromLocationCode: fromLocationCode.value,
itemCode: itemCode.value,
batch: batch.value,
handleQty: handleQty.value,
};
emit('confirm', obj);
};
const fromLocationScanMsg = () => {
if (fromLocationCode.value) {
scanMsg.value = fromLocationCode.value;
fromWitch.value = 'fromLocationScanMsg';
handelScanMsg();
}
};
const itemCodeScanMsg = () => {
if (itemCode.value) {
if (!fromLocationCode.value) {
comMessage.value.showMessage("请先扫描来源库位");
return;
}
fromWitch.value = 'itemCodeScanMsg';
scanMsg.value = itemCode.value;
handelScanMsg();
}
};
const handelScanMsg = () => {
if (scanMsg.value) {
setTimeout(() => {
losefocus();
let content = uni.$u.trim(scanMsg.value);
if (content === "") {
comMessage.value.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) {
scanMsg.value = "";
getfocus();
}
});
return;
}
if (isShowHistory.value) {
scanList.value.unshift(content);
}
getLabelInfo(content, headerType.value, callback => {
let scanResult = callback;
scanResult.scanMessage = content;
if (scanResult.success) {
console.log(scanResult);
emit('getInputMsgResult', scanResult, fromWitch.value);
} else {
losefocus();
comMessage.value.showErrorMessage(scanResult.message, res => {
if (res) {
getfocus();
}
});
}
});
}, 200);
}
};
const losefocus = () => {
boxfocus.value = false;
};
const clickBtnClearFromLocation = () => {
emit('clickBtnClearFromLocation');
};
const clickBtnClearItemCode = () => {
emit('clickBtnClearItemCode');
};
</script>
<style lang="scss">
.title {
padding: 30rpx 20rpx;
display: flex;
border-bottom: 1px solid rgba(230, 230, 230, 1);
.title-txt {
flex: 1;
font-weight: bold;
font-size: 32rpx;
}
}
.select {
display: flex;
}
.border {
border: 1px solid rgba(230, 230, 230, 1)
}
::v-deep .u-input__right-icon__clear {
display: flex;
align-items: center;
justify-content: center;
color: #a7a7a7;
}
.item {
display: flex;
align-items: center;
padding: 20rpx;
border-bottom: 1px solid #dedede;
.value {
flex: 1;
width: 0px;
height: 80rpx;
border: 1px solid #dedede;
display: flex;
align-items: center;
font-size: 32rpx;
padding: 0px 20rpx;
}
.value1 {
flex: 1;
width: 0px;
height: 80rpx;
display: flex;
align-items: center;
font-size: 32rpx;
}
.searchIcon {
width: 40rpx;
margin-left: 20rpx;
image {
width: 40rpx;
height: 40rpx
}
}
.uom {
margin-left: 10rpx;
}
}
</style>

169
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -12,15 +12,10 @@
<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="">
<comInventoryDetailCardBatch :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData'
:locationAreaTypeList="toLocationAreaTypeList"
@openDetail="openDetail" v-if="managementType=='BY_BATCH'">
</comInventoryDetailCardBatch>
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData" <comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList" @updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList"
:allowEditQty ="jobContent.allowModifyQty=='TRUE'?true:false" :allowEditQty ="jobContent.allowModifyQty=='TRUE'?true:false"
@openDetail="openDetail" v-else> @openDetail="openDetail">
</comInventoryDetailCard> </comInventoryDetailCard>
</view> </view>
</view> </view>
@ -48,14 +43,15 @@ 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 { getInventoryMoveJobDetail, takeInventoryMoveJob, cancleTakeInventoryMoveJob, inventoryMoveSubmit } from '@/api/request2.js' import { getInventoryMoveJobDetail, takeInventoryMoveJob, cancleTakeInventoryMoveJob, inventoryMoveSubmit } from '@/api/request2.js'
import { getManagementPrecisions, getPrecisionStrategyList } from '@/common/balance.js' import { getManagementPrecisions, getPrecisionStrategyList } from '@/common/balance.js'
import {
calc
} from '@/common/calc.js';
import { getDataSource, getScanCount, calcHandleQty } from '@/common/detail.js' import { getDataSource, getScanCount, calcHandleQty } from '@/common/detail.js'
import { goHome, navigateBack, getCurrDateTime, getPackingNumberAndBatchByList, getInventoryStatusName } from '@/common/basic.js' import { goHome, navigateBack, getCurrDateTime, getPackingNumberAndBatchByList, getInventoryStatusName } from '@/common/basic.js'
import {getDirectoryItemArray} from '@/common/directory.js'; import {getDirectoryItemArray} from '@/common/directory.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue' import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue'
import comInventoryDetailCardBatch from '@/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -257,8 +253,90 @@ const openScanPopup = () => {
scanPopup.value.openScanPopupForJob(fromlocationCode, fromlocationList, jobContent.value) scanPopup.value.openScanPopupForJob(fromlocationCode, fromlocationList, jobContent.value)
} }
const getScanResult = (result,managementPrecision)=> { const getScanResult = (result,managementPrecision)=> {
managementType.value = managementPrecision
if(managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY' ){
setDataBatch(result,managementPrecision)
}else{
setData(result,managementPrecision)
}
}
const setDataBatch = (result,managementPrecision)=>{
try {
let packingNumber = result.label.packingNumber;
let batch = result.label.batch;
let qty = result.label.qty;
let itemCode = result.label.itemCode;
let detail = detailSource.value.find(r => r.itemCode == itemCode);
if (detail == undefined) {
showMessage("物料号【" + itemCode + "】不在列表中")
} else {
let itemDetail = {}
if(managementPrecision == 'BY_QUANTITY'){
itemDetail = detail.subList.find(r => {
return r.itemCode == result.label.itemCode
})
}else{
itemDetail = detail.subList.find(r => {
return r.batch == batch
})
}
if (itemDetail == undefined && managementPrecision != 'BY_QUANTITY') {
showErrorMessage( "批次[" + batch + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showMessage("" + batch + "")
itemDetail.handleQty = calc.add(itemDetail.handleQty,Number(result.label.qty));
calcHandleQty();
} else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (jobContent.value.allowModifyInventoryStatus == "TRUE") {
showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续转移?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
calcHandleQty();
} else {
scanPopupGetFocus();
}
});
} else {
showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
calcHandleQty();
}
}
}
}
scanPopupGetFocus();
} catch (e) {
showErrorMessage(e.message);
}
}
const setData = (result,managementPrecision) => {
try { try {
const { packingNumber } = result.label const { packingNumber } = result.label
const { batch } = result.label const { batch } = result.label
@ -324,22 +402,43 @@ const getScanResult = (result,managementPrecision) => {
} }
} }
const commit = () => { const commit = async () => {
scanCount.value = getScanCount(subList.value) scanCount.value = getScanCount(subList.value)
if (scanCount.value == 0) { if (scanCount.value == 0) {
showErrorMessage('扫描数为0,请先扫描') showErrorMessage('扫描数为0,请先扫描')
return return
} }
//
managementList.value = [];
let precisionStrategParams = setPrecisionStrategParams()
await getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
managementList.value = res.list;
managementType.value = managementList.value&& managementList.value[0]&& managementList.value[0].ManagementPrecision ? managementList.value[0].ManagementPrecision : 'BY_PACKAGING'
console.log(11,this.managementType)
} else {
uni.hideLoading();
showErrorMessage(res.message);
}
})
// //
// //
if (scanCount.value == subList.value.length) { if (scanCount.value == subList.value.length) {
if(managementType.value == 'BY_BATCH' || managementType.value == 'BY_QUANTITY'){
checkCountBatch();
}else{
checkCount(); checkCount();
}
} else if (scanCount.value < subList.value.length) { } else if (scanCount.value < subList.value.length) {
// //
if (jobContent.value.allowPartialComplete == "TRUE") { if (jobContent.value.allowPartialComplete == "TRUE") {
// //
if(managementType.value == 'BY_BATCH' || managementType.value == 'BY_QUANTITY' ){
checkCountBatch();
}else{
checkCount(); checkCount();
}
} else { } else {
// //
comMessageRef.value.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { comMessageRef.value.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@ -377,16 +476,49 @@ const checkCount = ()=>{
submitJob() submitJob()
} }
} }
const checkCountBatch = ()=> {
//
let str = ''
let str1 = ''
detailSource.value.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
let tempHandleQty = 0
if (cur.handleQty) {
tempHandleQty = cur.handleQty
} else {
tempHandleQty = 0
}
str +=
`批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
if( cur.handleQty > cur.balance.balanceQty){
console.log(2333,cur.handleQty)
console.log(2333,cur.balance.balanceQty)
str1 +=
`批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}`
}
}
})
})
if(str1){
comMessageRef.value.showConfirmWarningModal(str1)
return
}
if (str) {
str = '任务明细未全部完成,是否提交?\n' + str
comMessageRef.value.showQuestionMessage1(str, 'red', res => {
if (res) {
submitJob()
}
});
} else {
submitJob()
}
}
const submitJob = () => { const submitJob = () => {
proxy.$modal.loading('提交中...') proxy.$modal.loading('提交中...')
// //
managementList.value = []
const precisionStrategParams = setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, (res) => {
if (res.success) {
managementList.value = res.list
const params = setParams() const params = setParams()
inventoryMoveSubmit(params) inventoryMoveSubmit(params)
.then((res) => { .then((res) => {
@ -405,11 +537,6 @@ const submitJob = () => {
uni.hideLoading() uni.hideLoading()
showErrorMessage(error) showErrorMessage(error)
}) })
} else {
uni.hideLoading()
showErrorMessage(res.message)
}
})
} }
const setPrecisionStrategParams = () => { const setPrecisionStrategParams = () => {

2
src/pages/inventoryMove/job/inventoryMoveJob.vue

@ -90,7 +90,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

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

@ -229,7 +229,7 @@ const setQueryParam = ()=>{
if (queryParams.creationTime ) { if (queryParams.creationTime ) {
filterParams.push({ filterParams.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "between",
value: queryParams.creationTime value: queryParams.creationTime
}) })
} }

4
src/pages/issue/job/issueJob0816.vue

@ -234,7 +234,7 @@
if (this.checkedToday) { if (this.checkedToday) {
filters.push({ filters.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "between",
value: this.todayTime value: this.todayTime
}) })
} }
@ -333,7 +333,7 @@
// if (this.checkedToday) { // if (this.checkedToday) {
// filters.push({ // filters.push({
// column: "create_time", // column: "create_time",
// action: "betweeen", // action: "between",
// value: this.todayTime // value: this.todayTime
// }) // })
// } // }

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

@ -137,7 +137,7 @@ const setQueryParam = ()=> {
if (queryParams.creationTime ) { if (queryParams.creationTime ) {
filterParams.push({ filterParams.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "between",
value: queryParams.creationTime value: queryParams.creationTime
}) })
} }

2
src/pages/productDismantle/job/productDismantleJob.vue

@ -117,7 +117,7 @@ export default {
if (this.checkedToday) { if (this.checkedToday) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: this.todayTime value: this.todayTime
}) })
} }

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

@ -111,7 +111,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -126,7 +126,7 @@
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/productReceipt/job/completeReceiveJob.vue

@ -116,7 +116,7 @@ export default {
if (this.checkedToday) { if (this.checkedToday) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: this.todayTime value: this.todayTime
}) })
} }

2
src/pages/productReceipt/job/productReceiptJob.vue

@ -101,7 +101,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'request_time', column: 'request_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/productRecycle/job/productRecycleJob.vue

@ -102,7 +102,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

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

@ -191,7 +191,7 @@ const setQueryParam = () => {
if (queryParams.creationTime) { if (queryParams.creationTime) {
filterParams.push({ filterParams.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "between",
value: queryParams.creationTime value: queryParams.creationTime
}) })
} }

2
src/pages/productionReturn/job/returnJob.vue

@ -109,7 +109,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

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

@ -112,7 +112,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/purchaseReturn/job/returnJob.vue

@ -104,7 +104,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

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

@ -111,7 +111,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/repleinsh/job/repleinshJob.vue

@ -144,7 +144,7 @@ const setQueryParam = ()=> {
if (queryParams.creationTime ) { if (queryParams.creationTime ) {
filterParams.push({ filterParams.push({
column: "create_time", column: "create_time",
action: "betweeen", action: "between",
value: queryParams.creationTime value: queryParams.creationTime
}) })
} }

2
src/pages/scrap/job/scrapJob.vue

@ -101,7 +101,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/stockUp/job/stockUpJob.vue

@ -100,7 +100,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/supplierDeliver/record/supplierDeliverRecord.vue

@ -108,7 +108,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/transfer/job/issueJob.vue

@ -112,7 +112,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/transfer/job/receiptJob.vue

@ -102,7 +102,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/unPlanned/job/issueJob.vue

@ -105,7 +105,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

2
src/pages/unPlanned/job/receiptJob.vue

@ -112,7 +112,7 @@ const getList = (type) => {
if (checkedToday.value) { if (checkedToday.value) {
filters.push({ filters.push({
column: 'create_time', column: 'create_time',
action: 'betweeen', action: 'between',
value: todayTime.value value: todayTime.value
}) })
} }

Loading…
Cancel
Save