剩余模块:生产入库,销售出库

This commit is contained in:
2025-05-12 09:31:38 +08:00
parent bf88fcb395
commit 14a5fa371b
410 changed files with 11041 additions and 6820 deletions

View File

@@ -1,16 +1,14 @@
<template>
<view class="app loginBox">
<view class="header-tabs">
<view class="header-tabs-title" :class="{active:state.tabCurrent === 0}"> Maxcess inspection App </view>
<view class="header-tabs-title" :class="{active:state.tabCurrent === 0}"> Maxcess Barcode Syssten </view>
</view>
<view class="form-body">
<view class="form-item form-item1">
<up-input @tap="languageShowFun" :placeholder="t('login.Language')" border="bottom"
v-model="state.languageText" disabled disabledColor="rgba(0, 0, 0, 0)">
<template #prefix>
<up-icon name="map" color="#ffffff" size="23" style="margin-right: 4rpx;"></up-icon>
</template>
</up-input>
<view class="form-item form-item1" @tap="languageShowFun">
<view style="border-bottom: 1rpx solid #CAD9E6;width: 100%;display: flex;box-sizing: border-box;padding: 16rpx;align-items: center;">
<up-icon name="../../../static/icons/mine/guoji.png" color="#ffffff" size="22" style="margin-right: 4rpx;"></up-icon>
<view style="margin-left: 8rpx;"> {{ state.languageText }} </view>
</view>
</view>
<view class="form-item form-item2 u-m-t-32">
<up-input :placeholder="t('login.usedName')" border="bottom" v-model="state.ruleForm.userName">

View File

@@ -1,7 +1,9 @@
<template>
<view class="app status-bar-gap">
<view class="page">
<l-header title="生产装箱" sticky></l-header>
<l-header title="生产装箱" sticky #right>
<view style="margin-right: 32rpx;" @click="fnToUrl()">添加</view>
</l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.djbh')" border="none" clearable inputAlign="left"
@@ -16,9 +18,8 @@
<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" v-for="(item, index) in state.dataList" :key="index">
<view class="tit">装箱单单号{{item.FBillNo}}</view>
<view class="line-p"></view>
<view class="b-font">{{ t('receive.rq') }}{{item.FDateFormat}}</view>
</view>
@@ -37,7 +38,7 @@
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
import { PRD_MORPTList, SAL_DELIVERYNOTICEList, receiveBillList } from '../../common/request/api/api';
import { BarcodePackBillList, PRD_MORPTList, SAL_DELIVERYNOTICEList, receiveBillList } from '../../common/request/api/api';
const listBoxRef = ref(null)
const getI18n = useI18n()
const { t, locale } = getI18n
@@ -72,8 +73,8 @@
}, 500);
}
}
const fnToUrl = (item : any) => {
toPages('/pages/encasement/material',{id:item.FID,fBillNo:item.FBillNo})
const fnToUrl = () => {
toPages('/pages/encasement/material')
}
const debounceTimer = ref()
const changeFun = (e : any) => {

View File

@@ -4,53 +4,56 @@
<l-header title="生成装箱" sticky #right>
<view style="margin-right: 32rpx;" @click="dataPushNotification">{{ t('receive.tj') }}</view>
</l-header>
<view class="input-box">
<up-tabs :scrollable="false" :list="state.tabsList"></up-tabs>
</view>
<view class="input-box">
<view class="input-item">
<up-input placeholder="生产订单编号" border="none" clearable inputAlign="left" 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':'#ffffff'},{'margin-bottom':index + 1 === state.dataList.length ? '80px' : '20px'}]"
:key="index">
<view class="text" style="margin-bottom: 20px;display: flex;">
<view>{{ 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.MaterialNo }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ph')}}</view>
<view class="zongjian"></view>
<view>{{ item.Lot }}</view>
</view>
<view class="itemBox">
<view>仓库</view>
<view class="zongjian"></view>
<view>{{ item.MultiLanguageText }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ys')}}</view>
<view class="zongjian"></view>
<view>{{ item.CheckJoinQty }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ws')}}</view>
<view class="zongjian"></view>
<view>{{ item.NoCheckQty }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.yss')}}</view>
<view class="zongjian"></view>
<view>{{ item.CheckQty }}</view>
</view>
</view>
<view style="text-align: center;color: #F5F5F5;height: 20px;"></view>
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true" :style="{'height':state.scrollHeight+'px'}">
<view class="list-box-list">
<uni-swipe-action>
<uni-swipe-action-item :right-options="state.options" v-for="(item, index) in state.dataList">
<template #right>
<view class="itemRight" @click="fStockFlexDetailDeleteFun(item)">
<up-icon name="trash" color="#ffffff" size="28"></up-icon>
</view>
</template>
<view class="data-item" :style="[{'background-color':'#ffffff'}]" :key="index">
<view class="text" style="margin-bottom: 20px;display: flex;">
<view>{{ item['FVHUBMaterial.FName'] }}</view>
</view>
<view class="itemBox">
<view>物料编码</view>
<view class="zongjian"></view>
<view>{{ item.FVHUBMaterialNumber }}</view>
</view>
<view class="itemBox">
<view>数量</view>
<view class="zongjian"></view>
<view>{{ item.FVHUBScanQty }}</view>
</view>
<view class="itemBox">
<view>仓库</view>
<view class="zongjian"></view>
<view>{{ item['FVHUBStock.FName'] }}</view>
</view>
<view class="itemBox">
<view>批号</view>
<view class="zongjian"></view>
<view>{{ item.FVHUBFlot }}</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<view v-if="state.dataList.length==0">
<up-empty mode="list"></up-empty>
@@ -58,13 +61,6 @@
</scroll-view>
</view>
</view>
<listPopup ref="listPopupRef" @toViewPopupData="toViewPopupDataFun"/>
<viewPopup ref="viewPopupRef" @listPopupData="getReceiveBillScanData"/>
<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" type="encasement" @defaultPopup="defaultPopupFun" @scanRecord="scanRecordFun" @alternativeDocument="alternativeDocumentFun"/>
</view>
</template>
@@ -72,33 +68,33 @@
import { reactive, nextTick, onMounted, ref, computed, watch } from 'vue';
import { onLoad, onShow, onReachBottom, } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { SAL_DELIVERYNOTICEPush, temporaryScanList, fStockFlexDetailDelete, PRD_MORPTScanData, temporaryScanDraftSave } from '../../common/request/api/api';
import { parseTime } from '../../utils/tools.js';
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 tools from '../../components/tools/tools.vue'
import shortcut from '../../components/tools/shortcut.vue'
import listPopup from './listPopup.vue'
import viewPopup from './viewPopup.vue'
import { encasement } from '../../stores/encasement'
const DBEncasement = encasement()
const inputRef = ref()
const scanFrameRef = ref()
const shortcutRef = ref()
const listPopupRef = ref()
const viewPopupRef = ref()
const getI18n = useI18n()
const { t, locale } = getI18n
const state = reactive({
queryString: '',
dataList: [],
scrollHeight: 0,
FBillNo: '',
materialId: '',
supplierName: '',
inputFocus: true,
listPopupShow: true,
scanFrameDataFeedback: {},
shortcutDataFeedback: {},
scanFrameDataFeedback: {}, //传回的扫描弹框数据
shortcutDataFeedback: {}, //传回的默认值数据
tabsList: [
{ name: computed(() => '包装'), type: '1' },
{ name: computed(() => '单独物料'), type: '2' },
],
options: []
})
onLoad(() => { })
onShow(() => {
// DBEncasement.injectEncasementMaterialList('132132')
onShow(() => {
fnDataList()
})
onMounted(() => {
const query = uni.createSelectorQuery().in(this);
@@ -106,173 +102,148 @@
state.scrollHeight = data.height
}).exec();
})
/**
* 数据逻辑
*/
const interpolation = (item : any) => {
if (item.CheckJoinQty === 0 && item.CheckJoinQty + item.NoCheckQty === item.CheckQty) {
return '#ffffff'
}
if (item.CheckJoinQty !== 0 && item.NoCheckQty !== 0 && item.CheckJoinQty + item.NoCheckQty === item.CheckQty) {
return 'rgb(254 227 87)'
}
if (item.CheckJoinQty === item.CheckQty) {
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_MORPTScanData({
BarcodePackBillScanData({
FBarCode: val,
FBillNo: state.FBillNo,
IsPack: 'true'
}).then((res : any) => {
if (res.data !== null) {
console.log(res,val);
if (res.code === 200) {
debugger
scanFrameRef.value.getreceiveBillScanData({ ...res.data, queryString: val, scanFrameShowSate: state.shortcutDataFeedback.scanFrameShowSate, stashVerify: true })
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('并没有该条数据')
state.queryString = ''
postTemporaryScanDraftSaveFun(res.data.Entry[0])
}
})
}
//数据记录暂存
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: "SAL_DELIVERYNOTICE", //数据类型
FVHUBFBillNo: state.FBillNo, //单据编号
FVHUBScanNumber: state.queryString, //条
FVHUBMaterialNumber: item.articlesStr, //物料编码
FVHUBScanQty: item.quantityStr + '', //扫描数量
FVHUBEntryId: scanFrameRef.value.state.receiveBillScanData.Id, //物料ID
FVHUBFlot: item.batchNumberStr, //批号
FType: "pack",
FVHUBFormId: "VHUB_BarcodePackBill", //数据类型
FVHUBScanNumber: state.queryString, //条码
FVHUBMaterialNumber: item.MaterialNumber, //物料编
FVHUBScanQty: item.BarCodeQty + '', //扫描数量
FVHUBEntryId: item.Id, //行ID
FVHUBFlot: item.FLot_Text, //批号
FVHUBStock: {
FNUMBER: item.warehouseData.FNUMBER //仓库编号
FNUMBER: item.StockId.Number //仓库编号
},
FVHUBMaterial: {
FNUMBER: item.articlesStr
FNUMBER: item.MaterialNumber, //物料编码
},
...JSON.parse(str),
}).then((res : any) => {
console.log(res);
state.queryString = ''
if (res.data.IsSuccess) {
uni.$u.toast('成功')
scanFrameRef.value.stateShow(false)
fnDataList();
uni.$u.toast(t('public.cg'))
}
})
}
/**
* 弹窗逻辑
*/
const scanFrameCnfirmation = (row : any) => {
//固定弹窗数据传输
state.scanFrameDataFeedback = row
//删除数据
const fStockFlexDetailDeleteFun = (item : any) => {
uni.showModal({
title: '提示', content: '确定要删除该条数据吗?', cancelText: '取消', confirmText: '确定',
success(res) {
if (res.confirm) {
fStockFlexDetailDelete({ Ids: item.FID + '' }).then((res : any) => {
if (res.code === 200) {
uni.$u.toast('已删除')
fnDataList()
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
const dataToscanFrameFun = (res : object) => {
//默认值传递
state.shortcutDataFeedback = res
scanFrameRef.value.getComponentsData(res)
shortcutRef.value.stateShow(false,'encasement')
}
const defaultPopupFun = () => {
//唤起默认值弹窗
shortcutRef.value.stateShow(true,'encasement')
}
const scanFrameErrFun = () => {
//异常弹出
scanFrameRef.value.stateShow(true)
}
const scanRecordFun = () => {
toPages('/pages/records/index', {
FormId: 'SAL_DELIVERYNOTICE',
FbillNo: state.FBillNo
})
}
const alternativeDocumentFun = () => {
//唤起选单弹窗
listPopupRef.value.openFun()
}
const toViewPopupDataFun = (row:any) => {
//唤起物料弹窗
state.FBillNo = row.FBillNo
listPopupRef.value.close()
viewPopupRef.value.openFun(row)
}
/**
* 数据推送
*/
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 EntryIds : any = []
let ids : any = []
let ScanEntry : any = []
let items : any = []
let param = {
FormId: 'SAL_DELIVERYNOTICE',
FormId: 'VHUB_BarcodePackBill',
UserId: uni.getStorageSync('userInfo').Context.UserId,
FbillNo: state.FBillNo,
FType: "pack",
};
uni.showLoading({ mask: true });
//获取扫描数据里的所有数据
temporaryScanList(param).then(res => {
temporaryScanList(param).then((res:any) => {
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
items.push({
Ids:item.FVHUBEntryId,
FBarCode:item.FVHUBScanNumber,
FQty:item.FVHUBScanQty
})
ids.push(item.FID)
})
//推送数据
SAL_DELIVERYNOTICEPush({
EntryIds: EntryIds.toString(),
TargetFormId: 'VHUB_BarcodePackBill',
IsEnableDefaultRule: 'true',
CustomParams: {
AutoAudit: 'true',
ScanEntry: ScanEntry
}
}).then((res : any) => {
if (res.code === 200) {
fStockFlexDetailDelete({ Ids: ids.toString() }).then((res : any) => {
if (res.code === 200) {
uni.$u.toast('操作成功')
BarcodePackBillSave({
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'))
}
})
}
})
} else {
uni.$u.toast('暂无扫描数据')
uni.$u.toast(t('public.noDataMessage'))
}
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
/**
* 数据请求
*/
const fnDataList = () => {
uni.showLoading({ mask: true });
temporaryScanList({
FormId: 'VHUB_BarcodePackBill',
UserId: uni.getStorageSync('userInfo').Context.UserId,
}).then((res : any) => {
if (res.code == 200) {
state.dataList = res.data.list
}
});
}
//中英切换
const formatLangTextValue = (val : any) => {
let lang_Id = uni.getStorageSync('locale')
@@ -291,6 +262,10 @@
</script>
<style lang="scss">
:deep(.button-group--right) {
height: calc(100% - 16rpx) !important;
}
.app {
background-color: #F5F5F5;
@@ -341,6 +316,14 @@
.list-box-list {
width: 100%;
.itemRight {
display: flex;
align-items: center;
padding: 34rpx;
background-color: #ff5a5d;
border-radius: 20rpx;
}
.data-item {
border: 1px solid #efeaea;
border-radius: 20rpx;

View File

@@ -5,36 +5,48 @@
<view></view>
</l-header>
<view class="type-bc">
<!-- <view class="type-item type-item-gc" @tap="toPages('/pages/receive/index')">
<view class="type-item-text">采购收料</view>
</view> -->
<view class="type-item type-item-hy" @tap="toPages('/pages/verify/index')">
<view class="type-item-text">{{ t('home.llyz') }}</view>
</view>
<view class="type-item type-item-jz" @tap="toPages('/pages/purchase/index')">
<view class="type-item-text">{{ t('home.cgrk') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/material/index')">
<view class="type-item-text">{{ t('home.scfl') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/supplement/index')">
<view class="type-item-text">{{ t('home.scbl') }}</view>
</view>
<view class="type-item type-item-hl" @tap="putInProdClisk()">
<view class="type-item-text">{{ t('home.sctc') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/encasement/material')">
<view class="type-item-text">{{ t('home.sczx') }}</view>
</view>
<!-- <view class="type-item type-item-hl" @tap="toPages('/pages/inLove/loveList')">
<view class="type-item-text">生产汇报</view>
</view> -->
<view class="type-item type-item-hl" @tap="toPages('/pages/productionStorage/index')">
<view class="type-item-text">{{ t('home.scrk') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/outOftock/index')">
<view class="type-item-text">{{ t('home.xxck') }}</view>
</view>
<!-- 珠海模块 -->
<template v-if="state.patternId === '101'">
<view class="type-item type-item-hy" @tap="toPages('/pages/verify/index')">
<view class="type-item-text">{{ t('home.llyz') }}</view>
</view>
<view class="type-item type-item-jz" @tap="toPages('/pages/purchase/index')">
<view class="type-item-text">{{ t('home.cgrk') }}</view>
</view>
</template>
<!-- 泰国模块 -->
<template v-if="state.patternId === '103'">
<view class="type-item type-item-hy" @tap="toPages('/pages/verifyTa/index')">
<view class="type-item-text">{{ t('home.llyz') }}</view>
</view>
<view class="type-item type-item-jz" @tap="toPages('/pages/purchaseTa/index')">
<view class="type-item-text">{{ t('home.cgrk') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/material/index')">
<view class="type-item-text">{{ t('home.scfl') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/supplement/index')">
<view class="type-item-text">{{ t('home.scbl') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/ruleClaim/index')">
<view class="type-item-text">成套领料</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/ruleValidation/index')">
<view class="type-item-text">成套验证</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/putInProd/index')">
<view class="type-item-text">{{ t('home.sctc') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/encasement/index')">
<view class="type-item-text">{{ t('home.sczx') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/productionStorage/index')">
<view class="type-item-text">{{ t('home.scrk') }}</view>
</view>
<view class="type-item type-item-hl" @tap="toPages('/pages/outOftock/index')">
<view class="type-item-text">{{ t('home.xxck') }}</view>
</view>
</template>
</view>
</view>
<u-overlay :show="state.typeBoxShow" @click="state.typeBoxShow = false">
@@ -55,13 +67,16 @@
const { t, locale } = getI18n
const state = reactive({
carouselList: [],
typeBoxShow:false
typeBoxShow:false,
appConfig:{},
patternId:''
})
onShow(() => {})
const putInProdClisk = () => {
state.typeBoxShow = true
}
onShow(() => {
state.appConfig = uni.getStorageSync('appLoginInfo')
state.patternId = state.appConfig.organizationObj['FOrgOrgId.FNumber']
console.log(state.patternId);
})
const toPages = (url : string, data : any = {}) => {
uni.$u.route({
url: url,

View File

@@ -8,12 +8,11 @@
radius="136rpx"></up-image>
</view>
<view>
<view class="nameTitle">#ERP1</view>
<view class="gysName">美塞斯测试账套</view>
<view class="nameTitle"># {{ state.userInfo.UserName }}</view>
<view class="gysName">{{ state.userInfo.CustomName }}</view>
</view>
</view>
<view class="common">
<!-- <view class="title">常用功能</view> -->
<view class="type-bc">
<view class="type-item type-item-gc" @tap="toPages('/pages/receive/index')">
<view class="type-item-text">采购收料</view>
@@ -35,14 +34,14 @@
<view class="item-title">扫描记录</view>
<up-icon name="play-right-fill" size="8"></up-icon>
</view>
<!-- <view class="input-item u-flex" style="justify-content: space-between;align-items: center">
<view class="item-title">离线记录</view>
<up-icon name="play-right-fill" size="8"></up-icon>
</view> -->
<view class="input-item u-flex" style="justify-content: space-between;align-items: center">
<view class="item-title">检查更新</view>
<view>0.0.1</view>
</view>
<!-- <view class="input-item u-flex" style="justify-content: space-between;align-items: center">
<view class="item-title">语言切换</view>
<up-icon name="play-right-fill" size="8"></up-icon>
</view>
</view> -->
<!-- <view class="input-item u-flex" style="justify-content: space-between;align-items: center">
<view class="item-title">语音播报</view>
<up-icon name="play-right-fill" size="8"></up-icon>
@@ -57,6 +56,14 @@
import { reactive, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app'
import { logout } from "../../common/request/api/api";
const state = reactive({
userInfo:{}
})
onShow(() => {
console.log(uni.getStorageSync('userInfo').Context);
state.userInfo = uni.getStorageSync('userInfo').Context
console.log(state.userInfo);
})
const toPages = (url : string, data : any = {}) => {
uni.$u.route({
url: url,
@@ -64,7 +71,6 @@
})
}
const outLoginFun = () => {
// uni.clearStorageSync()
logout({}).then((res:any) => {
uni.removeStorageSync('userInfo')
uni.removeStorageSync('TOKEN')
@@ -106,7 +112,7 @@
}
.gysName {
font-size: 32rpx;
font-size: 28rpx;
margin-top: 8rpx;
// font-weight: 600;
}

View File

@@ -18,7 +18,7 @@
<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="tit">生产用料清单单号{{item.FBillNo}}</view>
<view class="line-p"></view>
<view class="b-font">{{ t('receive.rq') }}{{item.FDateFormat}}</view>
</view>

View File

@@ -7,7 +7,7 @@
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
inputmode="none" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
</template>
@@ -39,11 +39,6 @@
<view class="zongjian"></view>
<view>{{ item.Lot }}</view>
</view>
<view class="itemBox">
<view>仓库</view>
<view class="zongjian"></view>
<view>{{ item.MultiLanguageText }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ys')}}</view>
<view class="zongjian"></view>
@@ -62,7 +57,7 @@
</view>
<view style="text-align: center;color: #F5F5F5;height: 20px;"></view>
</view>
<view v-if="state.dataList.length==0">
<view v-if="state.dataList.length==0">
<up-empty mode="list"></up-empty>
</view>
</scroll-view>
@@ -71,7 +66,7 @@
</view>
<scanFrame ref="scanFrameRef" @confirmation="scanFrameCnfirmation"
@scanFrameDataFeedback="(res:object)=>{state.scanFrameDataFeedback = res}"
@fast="(row:any)=>{state.scanFrameDataFeedback = row}" @err="scanFrameErrFun"/>
@fast="(row:any)=>{state.scanFrameDataFeedback = row}" @err="scanFrameErrFun" />
<shortcut ref="shortcutRef" @dataToscanFrame="dataToscanFrameFun" />
<tools ref="toolsRef" @defaultPopup="defaultPopupFun" @scanRecord="scanRecordFun" />
</template>
@@ -115,7 +110,7 @@
fnDataList(state.materialId);
})
onShow(() => {
if(state.materialId){
if (state.materialId) {
fnDataList(state.materialId);
}
})
@@ -155,7 +150,7 @@
PRDPPBOMScanData({
FBarCode: val,
FBillNo: state.FBillNo,
IsFeed:'true'
IsFeed: 'true'
}).then((res : any) => {
if (res.data !== null) {
console.log(res);
@@ -186,8 +181,8 @@
//数据记录暂存
const postTemporaryScanDraftSaveFun = (item : any) => {
const obj = {};
if (item.warehouseData.FIsOpenLocation) {
const key = `FVHUBSTOCKFLEX__FF${item.warehouseData.FFlexId}`; //仓位Id
if (item.warehouseData.FIsOpenLocation && Object.keys(item.locationData).length != 0) {
const key = `FVHUBSTOCKFLEX__FF${item.locationData.FID}`; //仓位Id
obj[key] = { FNumber: item.locationData.FlexEntryId.Number }; //仓位编码
}
const str = JSON.stringify(obj);
@@ -276,15 +271,15 @@
ScanEntry: ScanEntry
}
}).then((res : any) => {
if(res.code === 200){
fStockFlexDetailDelete({Ids:ids.toString()}).then((res:any) => {
if(res.code === 200) {
if (res.code === 200) {
fStockFlexDetailDelete({ Ids: ids.toString() }).then((res : any) => {
if (res.code === 200) {
fnDataList(state.materialId);
uni.$u.toast('操作成功')
}
})
}
})
} else {
uni.$u.toast('暂无扫描数据')

View File

@@ -2,6 +2,9 @@
<view class="app status-bar-gap">
<view class="page">
<l-header title="销售出库" sticky></l-header>
<view class="input-box">
<up-tabs :scrollable="false" :list="state.tabsList"></up-tabs>
</view>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.djbh')" border="none" clearable inputAlign="left"
@@ -16,14 +19,13 @@
<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="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="line-p"></view>
<view class="b-font">{{ t('receive.rq') }}{{item.FDateFormat}}</view>
</view>
</view>
<view v-if="state.dataList.length==0">
<view v-if="state.dataList.length==0">
<up-empty mode="list"></up-empty>
</view>
</scroll-view>
@@ -33,7 +35,7 @@
</template>
<script lang="ts" setup>
import { reactive, nextTick, onMounted, ref } from 'vue';
import { reactive, nextTick, onMounted, ref,computed } from 'vue';
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
@@ -49,7 +51,11 @@
pageIndex: 1,
pageSize: 200,
totalCount: 0
}
},
tabsList: [
{ name: computed(() => '包装'), type: '1' },
{ name: computed(() => '单独物料'), type: '2' },
]
})
onShow(() => {
@@ -63,10 +69,10 @@
fnDataList()
})
const fnScrollBottom = () => {
console.log(state.page.pageIndex * state.page.pageSize,state.page.totalCount);
console.log(state.page.pageIndex * state.page.pageSize, state.page.totalCount);
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
debugger
state.page.pageIndex ++;
state.page.pageIndex++;
uni.showLoading({ mask: true });
setTimeout(() => {
fnDataList();
@@ -74,7 +80,7 @@
}
}
const fnToUrl = (item : any) => {
toPages('/pages/outOftock/material',{id:item.FID,fBillNo:item.FBillNo})
toPages('/pages/outOftock/material', { id: item.FID, fBillNo: item.FBillNo })
}
const debounceTimer = ref()
const changeFun = (e : any) => {
@@ -174,25 +180,29 @@
.receive-listBox {
flex: 1;
.list-box-list{
.list-box-list {
width: 100%;
// margin: 20rpx auto;
.data-item{
.data-item {
border: 1px solid #efeaea;
border-radius: 20rpx;
box-shadow: 0rpx 15rpx 15rpx #efeaea;
box-shadow: 0rpx 15rpx 15rpx #efeaea;
padding: 20rpx 20rpx 0;
margin-bottom: 20rpx;
background-color: #ffffff;
.tit{
.tit {
font-size: 30rpx;
font-weight: bold;
padding: 20rpx 0;
}
.line-p{
.line-p {
border: 1px solid #efeaea;
}
.b-font{
.b-font {
font-size: 25rpx;
padding: 20rpx 0;
}
@@ -201,5 +211,4 @@
}
}
}
</style>

View File

@@ -6,7 +6,7 @@
</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('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>

View File

@@ -2,6 +2,9 @@
<view class="app status-bar-gap">
<view class="page">
<l-header title="生产入库" sticky></l-header>
<view class="input-box">
<up-tabs :scrollable="false" :list="state.tabsList"></up-tabs>
</view>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.djbh')" border="none" clearable inputAlign="left"
@@ -33,7 +36,7 @@
</template>
<script lang="ts" setup>
import { reactive, nextTick, onMounted, ref } from 'vue';
import { reactive, nextTick, onMounted, ref,computed } from 'vue';
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
@@ -49,7 +52,11 @@
pageIndex: 1,
pageSize: 200,
totalCount: 0
}
},
tabsList: [
{ name: computed(() => '包装'), type: '1' },
{ name: computed(() => '单独物料'), type: '2' },
]
})
onShow(() => {

View File

@@ -6,7 +6,7 @@
</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('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>

View File

@@ -6,7 +6,7 @@
</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('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
@@ -223,6 +223,7 @@
FVHUBStockFlex:{
...JSON.parse(str),
}
}).then((res : any) => {
state.queryString = ''
if (res.data.IsSuccess) {

View File

@@ -24,6 +24,10 @@
<uni-datetime-picker hasInput :show="state.FProReportTimeShow" v-model="state.FProReportTimes" :visibleItemCount="3" disabled
mode="datetime"></uni-datetime-picker>
</view>
<view class="timebox" v-if="state.type === '1'">
<view>开始投产个数</view>
<up-input placeholder="请输入开始投产个数" clearable inputmode="numeric" v-memo="state.qty"></up-input>
</view>
</view>
<view class="btnList">
<up-button v-show="state.type === '1'" class="btnItem" type="primary" shape="circle"
@@ -56,9 +60,9 @@
FProReportTimes: '',//开始汇报时间
EnterIntoProData: {},
type: '',
qty:''
})
onShow(() => {
console.log(pageDataInfoCom.userInfos);
let pageData = pageDataInfoCom.userInfos
state.EnterIntoProData = pageData
state.id = pageData.FID
@@ -115,13 +119,15 @@
}
const PRD_MOPushIntoProFun = () => {
PRD_MOPushIntoPro({
Ids: state.id + '',
EntryIds: state.id + '',
TargetFormId: "PRD_MORPT",
IsEnableDefaultRule: "true",
CustomParams: {
ScanEntry: [
{
FStartProTimes: state.FStartProTimes
FStartProTimes: state.FStartProTimes,
FENTRYID: state.id + '',
Qty: Number(state.qty)
}
]
}

View File

@@ -2,9 +2,12 @@
<view class="app status-bar-gap">
<view class="page">
<l-header title="生产投产" sticky></l-header>
<view class="input-box">
<up-tabs :scrollable="state.scrollableTabState" :list="state.tabsList" @click="setScrollableTabStateFun"></up-tabs>
</view>
<view class="input-box">
<view class="input-item">
<up-input placeholder="生产订单编号" border="none" clearable inputAlign="left" :focus="state.inputFocus"
<up-input placeholder="生产订单编号" border="none" clearable inputAlign="left"
v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
@@ -32,7 +35,7 @@
</template>
<script lang="ts" setup>
import { reactive, nextTick, onMounted, ref } from 'vue';
import { reactive, nextTick, onMounted, ref,computed } from 'vue';
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
@@ -45,6 +48,7 @@
const { t, locale } = getI18n
const state = reactive({
queryString: '',
scrollableTabState: locale.value === 'en',
dataList: [],
inputFocus: true,
scrollHeight: 0,
@@ -53,24 +57,26 @@
pageSize: 200,
totalCount: 0
},
type: ''
})
onLoad((pageData : any) => {
state.type = pageData.type
type: '1',
tabsList: [
{ name: computed(() => t('home.kssc')),type: '1' },
{ name: computed(() => t('home.kscs')),type: '3' },
{ name: computed(() => t('home.kshb')),type: '2' },
]
})
onShow(() => {
state.queryString = ''
fnDataList()
console.log(pageDataInfo);
})
onMounted(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".receive-listBox").boundingClientRect((data) => {
state.scrollHeight = data.height
}).exec();
})
const setScrollableTabStateFun = (item:any) => {
state.type = item.type
}
const fnScrollBottom = () => {
console.log(state.page.pageIndex * state.page.pageSize, state.page.totalCount);
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
@@ -97,8 +103,8 @@
Number: state.queryString
}).then((res : any) => {
if (res.code === 200) {
pageDataInfoCom.putInProdPageData({ ...res.data, ...item, time: new Date().getTime(),type:state.type })
route({url: '/pages/putInProd/details'})
pageDataInfoCom.putInProdPageData({ ...res.data, ...item, time: new Date().getTime(), type: state.type })
route({ url: '/pages/putInProd/details' })
}
})
@@ -131,7 +137,7 @@
if (state.dataList.length == state.page.totalCount) { }
if (scanData && state.dataList.length === 1) {
if(state.dataList[0].FBillNo == state.queryString){
if (state.dataList[0].FBillNo == state.queryString) {
viewIntoProFun(state.dataList[0])
}
}

View File

@@ -5,8 +5,8 @@
<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"
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>

View File

@@ -18,7 +18,7 @@
<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="tit">生产用料清单单号{{item.FBillNo}}</view>
<view class="line-p"></view>
<view class="b-font">{{ t('receive.rq') }}{{item.FDateFormat}}</view>
</view>

View File

@@ -6,7 +6,7 @@
</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('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
@@ -39,11 +39,6 @@
<view class="zongjian"></view>
<view>{{ item.Lot }}</view>
</view>
<view class="itemBox">
<view>仓库</view>
<view class="zongjian"></view>
<view>{{ item.MultiLanguageText }}</view>
</view>
<view class="itemBox">
<view>{{t('receive.ys')}}</view>
<view class="zongjian"></view>
@@ -192,8 +187,8 @@
//数据记录暂存
const postTemporaryScanDraftSaveFun = (item : any) => {
const obj = {};
if (item.warehouseData.FIsOpenLocation) {
const key = `FVHUBSTOCKFLEX__FF${item.warehouseData.FFlexId}`; //仓位Id
if (item.warehouseData.FIsOpenLocation && Object.keys(item.locationData).length != 0) {
const key = `FVHUBSTOCKFLEX__FF${item.locationData.FID}`; //仓位Id
obj[key] = { FNumber: item.locationData.FlexEntryId.Number }; //仓位编码
}
const str = JSON.stringify(obj);

View File

@@ -6,8 +6,8 @@
</l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('verify.tm')" border="none" clearable inputAlign="left"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<up-input :placeholder="t('verify.tm')" 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>
@@ -122,7 +122,7 @@
query.select(".material-listBox").boundingClientRect((data) => {
state.scrollHeight = data.height
}).exec();
// scanFrameRef.value.stateShow(true)
})
/**
@@ -175,18 +175,18 @@
const postTemporaryScanDraftSaveFun = (item : any) => {
console.log(item);
temporaryScanDraftSave({
FVHUBFormId: "PUR_ReceiveBill", //数据类型
FVHUBFBillNo: state.FBillNo, //单据编号
FVHUBScanNumber: state.queryString, //条码
FVHUBFormId: "PUR_ReceiveBill", //数据类型
FVHUBFBillNo: state.FBillNo, //单据编号
FVHUBScanNumber: state.queryString, //条码
FVHUBMaterialNumber: item.MaterialNumber, //物料编码
FVHUBScanQty: item.BarCodeQty + '', //扫描数量
FVHUBEntryId: item.Id, //行ID
FVHUBFlot: item.FLot_Text, //批号
FVHUBScanQty: item.BarCodeQty + '', //扫描数量
FVHUBEntryId: item.Id, //行ID
FVHUBFlot: item.FLot_Text, //批号
FVHUBStock: {
FNUMBER: "" //仓库编号
},
FVHUBMaterial: {
FNUMBER: item.MaterialNumber //物料编码
FNUMBER: item.MaterialNumber //物料编码
},
// ...JSON.parse(str),''
}).then((res : any) => {
@@ -225,7 +225,7 @@
success(res) {
if (res.confirm) {
let ids : any = []
let checkIds : any = []
// let checkIds : any = []
let param = {
FormId: 'PUR_ReceiveBill',
UserId: uni.getStorageSync('userInfo').Context.UserId,
@@ -233,23 +233,25 @@
};
uni.showLoading({ mask: true });
//获取扫描数据里的所有数据
temporaryScanList(param).then(res => {
if (res.code == 200) {
if (res.data.list.length != 0) {
res.data.list.forEach((item : any) => {
ids.push(item.FID)
temporaryScanList(param).then(resScanList => {
if (resScanList.code == 200) {
if (resScanList.data.list.length != 0) {
resScanList.data.list.forEach((item : any) => {
ids.push(item.FVHUBEntryId)
})
console.log(ids);
// debugger
//推送数据
state.dataList.forEach((item : any) => {
checkIds.push(item.Id)
})
// state.dataList.forEach((item : any) => {
// checkIds.push(item.Id)
// })
PURReceiveBillScanCheck({
EntryIds: checkIds.toString(),
EntryIds: ids.toString(),
Ids: state.materialId
}).then((res : any) => {
if (res.code === 200) {
fStockFlexDetailDelete({ Ids: ids.toString() }).then((res : any) => {
if (res.code === 200) {
}).then((resCheck : any) => {
if (resCheck.code === 200) {
fStockFlexDetailDelete({ Ids: ids.toString() }).then((resDelete : any) => {
if (resDelete.code === 200) {
fnDataList(state.materialId);
uni.$u.toast(t('public.cg'))
}