剩余模块:生产退料
This commit is contained in:
@@ -1,19 +1,11 @@
|
||||
<template>
|
||||
<view class="app status-bar-gap">
|
||||
<view class="page">
|
||||
<l-header :title="t('index.zxddh')" sticky #right>
|
||||
<l-header :title="t('index.sczx')" sticky #right>
|
||||
<view style="margin-right: 32rpx;" @click="fnToUrl()">{{ t('index.tj') }}</view>
|
||||
</l-header>
|
||||
<view class="input-box">
|
||||
<view class="input-item">
|
||||
<up-input :placeholder="t('index.zxddh')" 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>
|
||||
<architecture ref="architectureRef" :dataType="t('index.zxddh')" :placeholder="t('index.zxddh')"
|
||||
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun" />
|
||||
<view class="receive-listBox" ref="listBoxRef">
|
||||
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true" :style="{'height':state.scrollHeight+'px'}"
|
||||
@scrolltolower="fnScrollBottom()">
|
||||
@@ -39,6 +31,7 @@
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { parseTime } from '../../utils/tools.js';
|
||||
import { BarcodePackBillList, PRD_MORPTList, SAL_DELIVERYNOTICEList, receiveBillList } from '../../common/request/api/api';
|
||||
const architectureRef = ref()
|
||||
const listBoxRef = ref(null)
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
@@ -63,6 +56,13 @@
|
||||
}).exec();
|
||||
fnDataList()
|
||||
})
|
||||
const scanConfirmFun = (e : any) => {
|
||||
state.queryString = e
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList()
|
||||
architectureRef.value.closeFun()
|
||||
}
|
||||
const fnScrollBottom = () => {
|
||||
console.log(state.page.pageIndex * state.page.pageSize, state.page.totalCount);
|
||||
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
|
||||
@@ -88,7 +88,7 @@
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList()
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
const fnDataList = () => {
|
||||
let param = {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<l-header :title="t('index.sczx')" sticky #right>
|
||||
<view style="margin-right: 32rpx;" @click="dataPushNotification">{{ t('receive.tj') }}</view>
|
||||
</l-header>
|
||||
<view class="input-box">
|
||||
<!-- <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" ref="inputRef">
|
||||
@@ -13,7 +13,9 @@
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<architecture ref="architectureRef" :dataType="t('index.sczx')" icon="scan" :placeholder="t('receive.code')"
|
||||
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun" />
|
||||
<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">
|
||||
@@ -69,6 +71,7 @@
|
||||
import { BarcodePackBillList, BarcodePackBillSave, BarcodePackBillScanData, PURReceiveBillScanCheck, PURReceiveBillScanData, PURReceiveBillView, fStockFlexDetailDelete, temporaryScanDraftSave, temporaryScanList } from '../../common/request/api/api';
|
||||
import scanFrame from '../../components/scan-frame/scan-frame.vue'
|
||||
import shortcut from '../../components/tools/shortcut.vue'
|
||||
const architectureRef = ref()
|
||||
const inputRef = ref()
|
||||
const scanFrameRef = ref()
|
||||
const shortcutRef = ref()
|
||||
@@ -99,6 +102,9 @@
|
||||
state.scrollHeight = data.height
|
||||
}).exec();
|
||||
})
|
||||
const scanConfirmFun = (e : any) => {
|
||||
getReceiveBillScanData(e)
|
||||
}
|
||||
/**
|
||||
* 数据逻辑
|
||||
*/
|
||||
@@ -120,7 +126,7 @@
|
||||
debounceTimer.value = setTimeout(() => {
|
||||
state.queryString = e
|
||||
if (state.queryString !== '') getReceiveBillScanData(e)
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
//查询录入
|
||||
const getReceiveBillScanData = (val : string) => {
|
||||
@@ -130,6 +136,7 @@
|
||||
if (res.code === 200) {
|
||||
postTemporaryScanDraftSaveFun(res.data.Entry[0])
|
||||
}
|
||||
architectureRef.value.closeFun()
|
||||
})
|
||||
}
|
||||
//数据记录暂存
|
||||
@@ -142,7 +149,7 @@
|
||||
FVHUBScanQty: item.BarCodeQty + '', //扫描数量
|
||||
FVHUBEntryId: item.Id, //行ID
|
||||
FVHUBFlot: item.FLot_Text, //批号
|
||||
FVHUBJSON:item.MaxcessSNo, //序列号
|
||||
FVHUBJSON: item.MaxcessSNo, //序列号
|
||||
FVHUBStock: {
|
||||
FNUMBER: item.StockId.Number //仓库编号
|
||||
},
|
||||
@@ -152,7 +159,7 @@
|
||||
}).then((res : any) => {
|
||||
console.log(res);
|
||||
state.queryString = ''
|
||||
if(res.code === 200) {
|
||||
if (res.code === 200) {
|
||||
if (res.data.IsSuccess) {
|
||||
fnDataList();
|
||||
uni.$u.toast(t('public.cg'))
|
||||
@@ -160,7 +167,6 @@
|
||||
} else {
|
||||
uni.$u.toast(res.msg)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
//删除数据
|
||||
@@ -197,29 +203,29 @@
|
||||
};
|
||||
uni.showLoading({ mask: true });
|
||||
//获取扫描数据里的所有数据
|
||||
temporaryScanList(param).then((res:any) => {
|
||||
temporaryScanList(param).then((res : any) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.list.length != 0) {
|
||||
res.data.list.forEach((item : any) => {
|
||||
items.push({
|
||||
Ids:item.FVHUBEntryId,
|
||||
FBarCode:item.FVHUBScanNumber,
|
||||
FQty:item.FVHUBScanQty
|
||||
Ids: item.FVHUBEntryId,
|
||||
FBarCode: item.FVHUBScanNumber,
|
||||
FQty: item.FVHUBScanQty
|
||||
})
|
||||
ids.push(item.FID)
|
||||
})
|
||||
BarcodePackBillSave({
|
||||
Items:items
|
||||
Items: items
|
||||
}).then((BPRes : any) => {
|
||||
if (BPRes.code === 200) {
|
||||
fStockFlexDetailDelete({ Ids: ids.toString() }).then((FDRes : any) => {
|
||||
if (FDRes.code === 200) {
|
||||
fnDataList();
|
||||
uni.$u.toast(t('public.cg'))
|
||||
console.log('===================================================',BPRes.data.SuccessEntitys);
|
||||
toPages('/pages/encasement/print',{
|
||||
type:'Arr',
|
||||
list:JSON.stringify(BPRes.data.SuccessEntitys)
|
||||
console.log('===================================================', BPRes.data.SuccessEntitys);
|
||||
toPages('/pages/encasement/print', {
|
||||
type: 'Arr',
|
||||
list: JSON.stringify(BPRes.data.SuccessEntitys)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user