This commit is contained in:
2025-04-29 13:26:19 +08:00
parent 6e1ae24845
commit bf88fcb395
73 changed files with 12939 additions and 4637 deletions

View File

@@ -1,10 +1,10 @@
<template>
<view class="app status-bar-gap">
<view class="page">
<l-header title="来料验证" sticky></l-header>
<l-header :title="t('home.llyz')" sticky></l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.djbh')" border="none" clearable inputAlign="left"
<up-input :placeholder="t('verify.grn')" border="none" clearable inputAlign="left"
v-model="state.queryString" @change="changeFun">
<template #prefix>
<up-icon name="search" color="#2979ff" size="24"></up-icon>
@@ -16,11 +16,10 @@
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true"
:style="{'height':state.scrollHeight+'px'}" @scrolltolower="fnScrollBottom()">
<view class="list-box-list" v-if="state.dataList.length > 0">
<view class="data-item" @click.stop="fnToUrl(item)"
v-for="(item, index) in state.dataList" :key="index">
<view class="tit">{{ t('receive.djbh') }}{{item.FBillNo}}</view>
<view class="data-item" @click.stop="fnToUrl(item)" v-for="(item, index) in state.dataList" :key="index">
<view class="tit">{{ t('verify.grn') }}{{item.FBillNo}}</view>
<view class="line-p"></view>
<view class="b-font">{{ t('receive.rq') }}{{item.FDateFormat}}</view>
<view class="b-font">{{ t('verify.date') }}{{item.FDateFormat}}</view>
</view>
</view>
<view v-if="state.dataList.length==0">
@@ -52,9 +51,7 @@
}
})
onShow(() => {
})
onShow(() => { })
onMounted(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".receive-listBox").boundingClientRect((data) => {

View File

@@ -2,11 +2,11 @@
<view class="app status-bar-gap">
<view class="page">
<l-header :title="state.FBillNo" sticky #right>
<view style="margin-right: 32rpx;" @click="dataPushNotification">{{ t('receive.tj') }}</view>
<view style="margin-right: 32rpx;" @click="dataPushNotification">{{ t('verify.tj') }}</view>
</l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left"
<up-input :placeholder="t('verify.tm')" border="none" clearable inputAlign="left"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
@@ -25,37 +25,37 @@
<view>{{ item.MaterialName }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.gys')}}</view>
<view>{{t('verify.gys')}}</view>
<view class="zongjian"></view>
<view>{{ state.supplierName }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.djbh')}}</view>
<view>{{t('verify.grn')}}</view>
<view class="zongjian"></view>
<view>{{ state.FBillNo }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.wlbm')}}</view>
<view>{{t('verify.wlbm')}}</view>
<view class="zongjian"></view>
<view>{{ item.MaterialNo }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ph')}}</view>
<view>{{t('verify.mmsph')}}</view>
<view class="zongjian"></view>
<view>{{ item.Lot }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ys')}}</view>
<view>{{t('public.ys')}}</view>
<view class="zongjian"></view>
<view>{{ item.CheckJoinQty }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ws')}}</view>
<view>{{t('public.ws')}}</view>
<view class="zongjian"></view>
<view>{{ item.NoCheckQty }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.yss')}}</view>
<view>{{t('public.yss')}}</view>
<view class="zongjian"></view>
<view>{{ item.CheckQty }}</view>
</view>
@@ -73,7 +73,7 @@
@scanFrameDataFeedback="(res:object)=>{state.scanFrameDataFeedback = res}"
@fast="(row:any)=>{state.scanFrameDataFeedback = row}" @err="scanFrameErrFun" />
<shortcut ref="shortcutRef" @dataToscanFrame="dataToscanFrameFun" />
<tools ref="toolsRef" @defaultPopup="defaultPopupFun" @scanRecord="scanRecordFun" />
<tools :type="['scanRecord']" ref="toolsRef" @defaultPopup="defaultPopupFun" @scanRecord="scanRecordFun" />
</template>
<script lang="ts" setup>
@@ -85,8 +85,6 @@
import scanFrame from '../../components/scan-frame/scan-frame.vue'
import tools from '../../components/tools/tools.vue'
import shortcut from '../../components/tools/shortcut.vue'
import { sqlite } from '../../stores/sqlite'
const DB = sqlite()
const inputRef = ref()
const scanFrameRef = ref()
const shortcutRef = ref()
@@ -105,8 +103,8 @@
materialId: '',
supplierName: '',
inputFocus: true,
scanFrameDataFeedback: {},
shortcutDataFeedback: {},
scanFrameDataFeedback: {}, //传回的扫描弹框数据
shortcutDataFeedback: {}, //传回的默认值数据
})
onLoad((pageData : any) => {
console.log(pageData);
@@ -115,7 +113,7 @@
fnDataList(state.materialId);
})
onShow(() => {
if(state.materialId){
if (state.materialId) {
fnDataList(state.materialId);
}
})
@@ -157,20 +155,10 @@
FBillNo: state.FBillNo,
IsInStock: 'false'
}).then((res : any) => {
if (res.data !== null) {
console.log(res);
scanFrameRef.value.getreceiveBillScanData({ ...res.data, queryString: state.queryString, scanFrameShowSate: state.shortcutDataFeedback.scanFrameShowSate })
if (Object.keys(state.shortcutDataFeedback).length) {
if (state.shortcutDataFeedback.scanFrameShowSate) {
scanFrameRef.value.stateShow(true)
} else {
postTemporaryScanDraftSaveFun(state.scanFrameDataFeedback)
}
} else {
scanFrameRef.value.stateShow(true)
}
if (res.code === 200) {
postTemporaryScanDraftSaveFun(res.data)
} else {
uni.$u.toast('并没有该条数据')
uni.$u.toast(t('verify.noDataMessage'))
state.queryString = ''
}
})
@@ -185,34 +173,28 @@
}
//数据记录暂存
const postTemporaryScanDraftSaveFun = (item : any) => {
const obj = {};
if (item.warehouseData.FIsOpenLocation) {
const key = `FVHUBSTOCKFLEX__FF${item.warehouseData.FFlexId}`; //仓位Id
obj[key] = { FNumber: item.locationData.FlexEntryId.Number }; //仓位编码
}
const str = JSON.stringify(obj);
console.log(item);
temporaryScanDraftSave({
FVHUBFormId: "PUR_ReceiveBill", //数据类型
FVHUBFBillNo: state.FBillNo, //单据编号
FVHUBScanNumber: state.queryString, //条码
FVHUBMaterialNumber: item.articlesStr, //物料编码
FVHUBScanQty: item.quantityStr + '', //扫描数量
FVHUBEntryId: scanFrameRef.value.state.receiveBillScanData.Id, //物料ID
FVHUBFlot: item.batchNumberStr, //批号
FVHUBMaterialNumber: item.MaterialNumber, //物料编码
FVHUBScanQty: item.BarCodeQty + '', //扫描数量
FVHUBEntryId: item.Id, //ID
FVHUBFlot: item.FLot_Text, //批号
FVHUBStock: {
FNUMBER: item.warehouseData.FNUMBER //仓库编号
FNUMBER: "" //仓库编号
},
FVHUBMaterial: {
FNUMBER: item.articlesStr
FNUMBER: item.MaterialNumber //物料编码
},
...JSON.parse(str),
// ...JSON.parse(str),''
}).then((res : any) => {
console.log(res);
state.queryString = ''
if (res.data.IsSuccess) {
fnDataList(state.materialId);
uni.$u.toast('成功')
uni.$u.toast(t('public.cg'))
scanFrameRef.value.stateShow(false)
}
})
@@ -239,7 +221,7 @@
const dataPushNotification = () => {
uni.showModal({
title: '提示', content: '确定要推送此次数据吗', cancelText: '取消', confirmText: '确定',
title: t('public.ts'), content: t('public.tjMessage'), cancelText: t('public.cancel'), confirmText: t('public.confirm'),
success(res) {
if (res.confirm) {
let ids : any = []
@@ -269,14 +251,14 @@
fStockFlexDetailDelete({ Ids: ids.toString() }).then((res : any) => {
if (res.code === 200) {
fnDataList(state.materialId);
uni.$u.toast('操作成功')
uni.$u.toast(t('public.cg'))
}
})
}
})
} else {
uni.$u.toast('暂无扫描数据')
uni.$u.toast(t('public.noDataMessage'))
}
}