剩余模块:生产入库,销售出库
This commit is contained in:
203
pages/ruleValidation/checklist.vue
Normal file
203
pages/ruleValidation/checklist.vue
Normal file
@@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<view class="app status-bar-gap">
|
||||
<view class="page">
|
||||
<l-header :title="state.fbillNo" sticky></l-header>
|
||||
<view class="input-box">
|
||||
<view class="input-item">
|
||||
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left"
|
||||
v-model="state.queryString" @change="changeFun">
|
||||
<template #prefix>
|
||||
<up-icon name="search" color="#2979ff" size="24"></up-icon>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="receive-listBox" ref="listBoxRef">
|
||||
<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('index.csllddh') }}:{{item.FBillNo}}</view>
|
||||
<view class="line-p"></view>
|
||||
<view class="b-font">{{ t('verify.date') }}:{{item.FDateFormat}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="state.dataList.length==0">
|
||||
<up-empty mode="list"></up-empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, nextTick, onMounted, ref } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { parseTime } from '../../utils/tools.js';
|
||||
import { PRDPPBOMList, PRD_MOList, PRD_PickMtrlList } from '../../common/request/api/api';
|
||||
const listBoxRef = ref(null)
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const state = reactive({
|
||||
queryString: '',
|
||||
fbillNo:'',
|
||||
dataList: [],
|
||||
scrollHeight: 0,
|
||||
page: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200,
|
||||
totalCount: 0
|
||||
}
|
||||
})
|
||||
onLoad((pageData:any) => {
|
||||
state.fbillNo = pageData.fBillNo
|
||||
fnDataList()
|
||||
})
|
||||
onMounted(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select(".receive-listBox").boundingClientRect((data) => {
|
||||
state.scrollHeight = data.height
|
||||
}).exec();
|
||||
})
|
||||
const fnScrollBottom = () => {
|
||||
console.log(state.page.pageIndex * state.page.pageSize,state.page.totalCount);
|
||||
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
|
||||
state.page.pageIndex ++;
|
||||
uni.showLoading({ mask: true });
|
||||
setTimeout(() => {
|
||||
fnDataList();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
const fnToUrl = (item : any) => {
|
||||
toPages('/pages/ruleValidation/verification',{id:item.FID,fBillNo:item.FBillNo})
|
||||
}
|
||||
const debounceTimer = ref()
|
||||
const changeFun = (e : any) => {
|
||||
if (debounceTimer.value !== null) clearTimeout(debounceTimer.value)
|
||||
debounceTimer.value = setTimeout(() => {
|
||||
state.queryString = e
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList()
|
||||
}, 500)
|
||||
}
|
||||
const fnDataList = () => {
|
||||
let param = {
|
||||
queryString: state.queryString,
|
||||
FbillNo:state.fbillNo,
|
||||
pageIndex: state.page.pageIndex,
|
||||
pageSize: state.page.pageSize,
|
||||
};
|
||||
if (state.page.pageIndex == 1) {
|
||||
uni.showLoading({ mask: true });
|
||||
}
|
||||
PRD_PickMtrlList(param).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 200) {
|
||||
let result = res.data;
|
||||
let dataArray = result.list;
|
||||
dataArray.forEach((p:any) => {
|
||||
p.FDateFormat = parseTime(p.FCREATEDATE, '{y}-{m}-{d}');
|
||||
});
|
||||
if (state.page.pageIndex == 1) {
|
||||
state.dataList = dataArray;
|
||||
}
|
||||
else {
|
||||
state.dataList = state.dataList.concat(dataArray);
|
||||
}
|
||||
state.page.totalCount = result.total;
|
||||
|
||||
if (state.dataList.length == state.page.totalCount) {
|
||||
// more_status.value = 'nomore';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
const toPages = (url : string, data : any = {}) => {
|
||||
uni.$u.route({
|
||||
url: url,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.page {
|
||||
padding: 18px 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
|
||||
.input-box {
|
||||
background-color: white;
|
||||
box-sizing: border-box;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 24rpx;
|
||||
margin: 0 0 32rpx 0;
|
||||
|
||||
.u-textarea {
|
||||
padding: 0 !important;
|
||||
font-size: 24rpx !important;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
.input-item {
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 0;
|
||||
color: #222222;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
|
||||
.item-title {
|
||||
//font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.item-text {
|
||||
font-weight: 400;
|
||||
font-size: 27rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.receive-listBox {
|
||||
flex: 1;
|
||||
|
||||
.list-box-list{
|
||||
width: 100%;
|
||||
// margin: 20rpx auto;
|
||||
.data-item{
|
||||
border: 1px solid #efeaea;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0rpx 15rpx 15rpx #efeaea;
|
||||
padding: 20rpx 20rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #ffffff;
|
||||
.tit{
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.line-p{
|
||||
border: 1px solid #efeaea;
|
||||
}
|
||||
.b-font{
|
||||
font-size: 25rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
200
pages/ruleValidation/index.vue
Normal file
200
pages/ruleValidation/index.vue
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<view class="app status-bar-gap">
|
||||
<view class="page">
|
||||
<l-header :title="t('index.ctllyz')" sticky></l-header>
|
||||
<view class="input-box">
|
||||
<view class="input-item">
|
||||
<up-input :placeholder="t('index.scdd')" border="none" clearable inputAlign="left"
|
||||
v-model="state.queryString" @change="changeFun">
|
||||
<template #prefix>
|
||||
<up-icon name="search" color="#2979ff" size="24"></up-icon>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="receive-listBox" ref="listBoxRef">
|
||||
<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('index.scddbh') }}:{{item.FBillNo}}</view>
|
||||
<view class="line-p"></view>
|
||||
<view class="b-font">{{ t('verify.date') }}:{{item.FDateFormat}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="state.dataList.length==0">
|
||||
<up-empty mode="list"></up-empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, nextTick, onMounted, ref } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { parseTime } from '../../utils/tools.js';
|
||||
import { PRDPPBOMList, PRD_MOList } from '../../common/request/api/api';
|
||||
const listBoxRef = ref(null)
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const state = reactive({
|
||||
queryString: '',
|
||||
dataList: [],
|
||||
scrollHeight: 0,
|
||||
page: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200,
|
||||
totalCount: 0
|
||||
}
|
||||
})
|
||||
onShow(() => { })
|
||||
onMounted(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select(".receive-listBox").boundingClientRect((data) => {
|
||||
state.scrollHeight = data.height
|
||||
}).exec();
|
||||
fnDataList()
|
||||
})
|
||||
const fnScrollBottom = () => {
|
||||
console.log(state.page.pageIndex * state.page.pageSize,state.page.totalCount);
|
||||
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
|
||||
state.page.pageIndex ++;
|
||||
uni.showLoading({ mask: true });
|
||||
setTimeout(() => {
|
||||
fnDataList();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
const fnToUrl = (item : any) => {
|
||||
toPages('/pages/ruleValidation/checklist',{id:item.FID,fBillNo:item.FBillNo})
|
||||
}
|
||||
const debounceTimer = ref()
|
||||
const changeFun = (e : any) => {
|
||||
if (debounceTimer.value !== null) clearTimeout(debounceTimer.value)
|
||||
debounceTimer.value = setTimeout(() => {
|
||||
state.queryString = e
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList()
|
||||
}, 500)
|
||||
}
|
||||
const fnDataList = () => {
|
||||
let param = {
|
||||
queryString: state.queryString,
|
||||
pageIndex: state.page.pageIndex,
|
||||
pageSize: state.page.pageSize,
|
||||
};
|
||||
if (state.page.pageIndex == 1) {
|
||||
uni.showLoading({ mask: true });
|
||||
}
|
||||
PRD_MOList(param).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 200) {
|
||||
let result = res.data;
|
||||
let dataArray = result.list;
|
||||
dataArray.forEach((p:any) => {
|
||||
p.FDateFormat = parseTime(p.FDate, '{y}-{m}-{d}');
|
||||
});
|
||||
|
||||
if (state.page.pageIndex == 1) {
|
||||
state.dataList = dataArray;
|
||||
}
|
||||
else {
|
||||
state.dataList = state.dataList.concat(dataArray);
|
||||
}
|
||||
state.page.totalCount = result.total;
|
||||
|
||||
if (state.dataList.length == state.page.totalCount) {
|
||||
// more_status.value = 'nomore';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
const toPages = (url : string, data : any = {}) => {
|
||||
uni.$u.route({
|
||||
url: url,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.page {
|
||||
padding: 18px 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
|
||||
.input-box {
|
||||
background-color: white;
|
||||
box-sizing: border-box;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 24rpx;
|
||||
margin: 0 0 32rpx 0;
|
||||
|
||||
.u-textarea {
|
||||
padding: 0 !important;
|
||||
font-size: 24rpx !important;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
.input-item {
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 0;
|
||||
color: #222222;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
|
||||
.item-title {
|
||||
//font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.item-text {
|
||||
font-weight: 400;
|
||||
font-size: 27rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.receive-listBox {
|
||||
flex: 1;
|
||||
|
||||
.list-box-list{
|
||||
width: 100%;
|
||||
// margin: 20rpx auto;
|
||||
.data-item{
|
||||
border: 1px solid #efeaea;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0rpx 15rpx 15rpx #efeaea;
|
||||
padding: 20rpx 20rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #ffffff;
|
||||
.tit{
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.line-p{
|
||||
border: 1px solid #efeaea;
|
||||
}
|
||||
.b-font{
|
||||
font-size: 25rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
404
pages/ruleValidation/verification.vue
Normal file
404
pages/ruleValidation/verification.vue
Normal file
@@ -0,0 +1,404 @@
|
||||
<template>
|
||||
<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>
|
||||
</l-header>
|
||||
<view class="input-box">
|
||||
<view class="input-item">
|
||||
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
|
||||
v-model="state.queryString" @change="changeFun" ref="inputRef">
|
||||
<template #prefix>
|
||||
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="material-listBox">
|
||||
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true"
|
||||
:style="{'height':state.scrollHeight+'px'}">
|
||||
<view class="list-box-list" v-if="state.dataList.length > 0">
|
||||
<view class="data-item" v-for="(item, index) in state.dataList"
|
||||
:style="[{'background-color':interpolation(item)},{'margin-bottom':index + 1 === state.dataList.length ? '80px' : '20px'}]"
|
||||
:key="index">
|
||||
<view class="text" style="margin-bottom: 20px;display: flex;">
|
||||
<view>{{ formatLangTextValue(item.MaterialName) }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{t('receive.djbh')}}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ state.FBillNo }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{t('receive.wlbm')}}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ item.MaterialNumber }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{t('receive.ph')}}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ item.FLot_Text }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{ t('index.ck') }}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ formatLangTextValue(item.StockId.Name) }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{t('public.ys')}}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ item.ScanedQty }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{t('public.ws')}}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ item.UnScanQty }}</view>
|
||||
</view>
|
||||
<view class="itemBox">
|
||||
<view>{{ t('public.qty') }}</view>
|
||||
<view class="zongjian"></view>
|
||||
<view>{{ item.Qty }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center;color: #F5F5F5;height: 20px;"></view>
|
||||
</view>
|
||||
<view v-if="state.dataList.length==0">
|
||||
<up-empty mode="list"></up-empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scanFrame ref="scanFrameRef" @confirmation="scanFrameCnfirmation"
|
||||
@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" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, nextTick, onMounted, ref, computed, watch } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom, } from '@dcloudio/uni-app'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { parseTime } from '../../utils/tools.js';
|
||||
import { PRD_PickMtrlCheck, PRD_PickMtrlScanData, PRD_PickMtrlView, PURReceiveBillScanData, PURReceiveBillScanPush, PURReceiveBillView, fStockFlexDetailDelete, temporaryScanDraftSave, temporaryScanList } from '../../common/request/api/api';
|
||||
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()
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const state = reactive({
|
||||
queryString: '',
|
||||
dataList: [],
|
||||
scrollHeight: 0,
|
||||
page: {
|
||||
pageIndex: 1,
|
||||
pageSize: 200,
|
||||
totalCount: 0
|
||||
},
|
||||
FBillNo: '',
|
||||
materialId: '',
|
||||
supplierName: '',
|
||||
inputFocus: true,
|
||||
scanFrameDataFeedback: {},
|
||||
shortcutDataFeedback: {},
|
||||
})
|
||||
onLoad((pageData : any) => {
|
||||
console.log(pageData);
|
||||
state.materialId = pageData.id
|
||||
state.FBillNo = pageData.fBillNo
|
||||
fnDataList(state.materialId);
|
||||
})
|
||||
onShow(() => {
|
||||
if(state.materialId){
|
||||
fnDataList(state.materialId);
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select(".material-listBox").boundingClientRect((data) => {
|
||||
state.scrollHeight = data.height
|
||||
}).exec();
|
||||
// scanFrameRef.value.stateShow(true)
|
||||
|
||||
})
|
||||
/**
|
||||
* 数据逻辑
|
||||
*/
|
||||
const interpolation = (item : any) => {
|
||||
if (item.ScanedQty === 0 && item.ScanedQty + item.UnScanQty === item.Qty) {
|
||||
return '#ffffff'
|
||||
}
|
||||
if (item.ScanedQty !== 0 && item.UnScanQty !== 0 && item.ScanedQty + item.UnScanQty === item.Qty) {
|
||||
return 'rgb(254 227 87)'
|
||||
}
|
||||
if (item.ScanedQty === item.Qty) {
|
||||
return 'rgb(87 191 254)'
|
||||
}
|
||||
}
|
||||
|
||||
//防抖输入
|
||||
const debounceTimer = ref()
|
||||
const changeFun = (e : any) => {
|
||||
if (debounceTimer.value !== null) clearTimeout(debounceTimer.value)
|
||||
debounceTimer.value = setTimeout(() => {
|
||||
state.queryString = e
|
||||
if (state.queryString !== '') getReceiveBillScanData(e)
|
||||
}, 500)
|
||||
}
|
||||
//查询录入
|
||||
const getReceiveBillScanData = (val : string) => {
|
||||
PRD_PickMtrlScanData({
|
||||
FBarCode: val,
|
||||
FBillNo: state.FBillNo,
|
||||
}).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
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)
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast(t('verify.noDataMessage'))
|
||||
state.queryString = ''
|
||||
}
|
||||
})
|
||||
}
|
||||
//固定弹窗数据传输
|
||||
const scanFrameCnfirmation = (row : any) => {
|
||||
state.scanFrameDataFeedback = row
|
||||
console.log(row);
|
||||
|
||||
postTemporaryScanDraftSaveFun(state.scanFrameDataFeedback)
|
||||
}
|
||||
//数据异常窗口弹出
|
||||
const scanFrameErrFun = () => {
|
||||
scanFrameRef.value.stateShow(true)
|
||||
}
|
||||
//数据记录暂存
|
||||
const postTemporaryScanDraftSaveFun = (item : any) => {
|
||||
console.log(item);
|
||||
temporaryScanDraftSave({
|
||||
FVHUBFormId: "PRD_PickMtrl", //数据类型
|
||||
FVHUBFBillNo: state.FBillNo, //单据编号
|
||||
FVHUBScanNumber: state.queryString, //条码
|
||||
FVHUBMaterialNumber: item.articlesStr, //物料编码
|
||||
FVHUBScanQty: item.quantityStr, //扫描数量
|
||||
FVHUBEntryId: item.id, //行ID
|
||||
FVHUBFlot: item.batchNumberStr, //批号
|
||||
FVHUBStock: {
|
||||
FNUMBER: "" //仓库编号
|
||||
},
|
||||
FVHUBMaterial: {
|
||||
FNUMBER: item.articlesStr //物料编码
|
||||
},
|
||||
|
||||
}).then((res : any) => {
|
||||
state.queryString = ''
|
||||
if (res.data.IsSuccess) {
|
||||
fnDataList(state.materialId);
|
||||
uni.$u.toast(t('public.cg'))
|
||||
scanFrameRef.value.stateShow(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
//默认值传递
|
||||
const dataToscanFrameFun = (res : object) => {
|
||||
state.shortcutDataFeedback = res
|
||||
scanFrameRef.value.getComponentsData(res)
|
||||
shortcutRef.value.stateShow(false)
|
||||
}
|
||||
//唤起默认值弹窗
|
||||
const defaultPopupFun = () => {
|
||||
shortcutRef.value.stateShow(true)
|
||||
}
|
||||
const scanRecordFun = () => {
|
||||
toPages('/pages/records/index', {
|
||||
FormId: 'PRD_PickMtrl',
|
||||
FbillNo: state.FBillNo
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 数据推送
|
||||
*/
|
||||
|
||||
const dataPushNotification = () => {
|
||||
uni.showModal({
|
||||
title: t('public.ts'), content: t('public.tjMessage'), cancelText: t('public.cancel'), confirmText: t('public.confirm'),
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
let EntryIds : any = []
|
||||
let ids : any = []
|
||||
let ScanEntry : any = []
|
||||
let param = {
|
||||
FormId: 'PRD_PickMtrl',
|
||||
UserId: uni.getStorageSync('userInfo').Context.UserId,
|
||||
FbillNo: state.FBillNo
|
||||
};
|
||||
uni.showLoading({ mask: true });
|
||||
//获取扫描数据里的所有数据
|
||||
temporaryScanList(param).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.list.length != 0) {
|
||||
res.data.list.forEach((item : any) => {
|
||||
EntryIds.push(item.FVHUBEntryId)
|
||||
ids.push(item.FID)
|
||||
ScanEntry.push({
|
||||
FENTRYID: item.FVHUBEntryId,
|
||||
Qty: item.FVHUBScanQty,
|
||||
Flot: item.FVHUBFlot,
|
||||
StockId: item.FVHUBStock,
|
||||
StockFlex: item.FVHUBStockFlex
|
||||
})
|
||||
})
|
||||
//推送数据
|
||||
PRD_PickMtrlCheck({
|
||||
EntryIds: EntryIds.toString(),
|
||||
Ids:state.materialId
|
||||
}).then((res : any) => {
|
||||
console.log();
|
||||
if(res.code === 200){
|
||||
fStockFlexDetailDelete({Ids:ids.toString()}).then((res:any) => {
|
||||
if(res.code === 200) {
|
||||
fnDataList(state.materialId);
|
||||
uni.$u.toast(t('public.cg'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast(t('verify.noDataMessage'))
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据请求
|
||||
*/
|
||||
const fnDataList = (FBillNo : any, statesItem : boolean = false) => {
|
||||
let param = {
|
||||
id: FBillNo,
|
||||
};
|
||||
uni.showLoading({ mask: true });
|
||||
PRD_PickMtrlView(param).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 200) {
|
||||
state.dataList = []
|
||||
state.dataList = res.data.Entry;
|
||||
}
|
||||
});
|
||||
}
|
||||
//中英切换
|
||||
const formatLangTextValue = (val : any) => {
|
||||
let lang_Id = uni.getStorageSync('locale')
|
||||
let item = val.find(p => p.Key == (lang_Id == 'cn' ? 2052 : 1033));
|
||||
if (item != null) {
|
||||
return item.Value;
|
||||
}
|
||||
return val[0].Value;
|
||||
}
|
||||
const toPages = (url : string, data : any = {}) => {
|
||||
uni.$u.route({
|
||||
url: url,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.page {
|
||||
padding: 18px 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
|
||||
.input-box {
|
||||
background-color: white;
|
||||
box-sizing: border-box;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 24rpx;
|
||||
margin: 0 0 32rpx 0;
|
||||
|
||||
.u-textarea {
|
||||
padding: 0 !important;
|
||||
font-size: 24rpx !important;
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
.input-item {
|
||||
box-sizing: border-box;
|
||||
padding: 16rpx 0;
|
||||
color: #222222;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
|
||||
.item-title {
|
||||
//font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.item-text {
|
||||
font-weight: 400;
|
||||
font-size: 27rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.material-listBox {
|
||||
flex: 1;
|
||||
|
||||
.list-box-list {
|
||||
width: 100%;
|
||||
|
||||
.data-item {
|
||||
border: 1px solid #efeaea;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0rpx 15rpx 15rpx #efeaea;
|
||||
padding: 20rpx 22rpx;
|
||||
margin-bottom: 16rpx;
|
||||
background-color: #ffffff;
|
||||
|
||||
.itemBox {
|
||||
line-height: 50rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.zongjian {
|
||||
height: 1px;
|
||||
flex: 1;
|
||||
background-color: #f0f0f0;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user