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

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

@@ -16,7 +16,7 @@
<view class="input-box">
<view class="input-item">
<up-input :placeholder="state.NoLocationListText" border="none" clearable inputAlign="left"
v-model="state.shortcut.locationStr" confirmType="next" :disabled="true">
v-model="state.shortcut.locationStr" confirmType="next" @change="locationChange">
<template #prefix>
<view class="item-title" style="margin-right: 16rpx;">{{ t('public.cwmc') }}</view>
</template>
@@ -62,7 +62,8 @@
</view>
<view class="btnListSc">
<up-button type="primary" :plain="true" :text="t('public.cz')" @click="dataResetFun"></up-button>
<up-button type="primary" :text="t('public.bc')" style="margin-left: 36rpx;" @click="dataToscanFrameFun"></up-button>
<up-button type="primary" :text="t('public.bc')" style="margin-left: 36rpx;"
@click="dataToscanFrameFun"></up-button>
</view>
<warehouse :show="state.warehouse" @warehouseClose="warehouseClosefun" @warehouseData="warehouseDataFun" />
<location :show="state.location"
@@ -78,6 +79,7 @@
import location from '../warehouse/location.vue'
import i18n from '../../locale/index'
import { useI18n } from 'vue-i18n'
import { fStockFlexDetailList } from '../../common/request/api/api';
const getI18n = useI18n()
const { t, locale } = getI18n
const eimts = defineEmits(['dataToscanFrame'])
@@ -102,6 +104,34 @@
onMounted(() => {
dataToscanFrameFun()
})
const debounceTimer = ref()
const locationChange = (e : any) => {
if (debounceTimer.value !== null) clearTimeout(debounceTimer.value)
debounceTimer.value = setTimeout(() => {
state.shortcut.locationStr = e
if (state.shortcut.locationStr !== '' && state.shortcut.warehouseStr !== '') {
fnDataList()
}
}, 500)
}
const fnDataList = () => {
let param = {
Number: state.warehouseData.FNUMBER,
queryString: state.shortcut.locationStr,
IsSortBySeq: true
};
fStockFlexDetailList(param).then(res => {
uni.hideLoading();
if (res.code == 200) {
if (res.data.list.length) {
state.locationData = res.data.list[0]
state.shortcut.locationStr = res.data.list[0].FFlexValueName
} else {
uni.$u.toast('未找到该仓位')
}
}
});
}
const close = () => { state.show = false }
const dataToscanFrameFun = () => {
if (state.shortcut.warehouseStr !== '' && state.NoLocationList && state.shortcut.locationStr === '') {
@@ -130,16 +160,21 @@
state.specialModule = specialModule
state.show = val
}
/**
* 仓库逻辑
*/
const warehouseClosefun = () => { state.warehouse = false }
const warehouseShowFun = () => { state.warehouse = true }
const warehouseShowFun = () => {
state.warehouse = true
}
const warehouseDataFun = (item : any) => {
state.warehouseData = item
state.shortcut.warehouseStr = item.FNAME
state.warehouse = false
state.locationData = {}
state.shortcut.locationStr = ""
if (state.warehouseData.FIsOpenLocation) {
state.NoLocationList = true
state.NoLocationListText = t('public.xzcw')
@@ -150,20 +185,18 @@
state.locationData = {}
}
}
/**
* 指定模块可以不需要仓库仓位
*/
const isWarehouseAndLocationState = () => {
if(state.specialModule = 'encasement'){
if (state.specialModule = 'encasement') {
return false
}
return true
}
const scanFrameShowSateSwitch = () => {
state.shortcut.scanFrameShowSate ? state.shortcut.scanFrameTextState = t('public.gdtc') : state.shortcut.scanFrameTextState = t('public.yctc')
if(isWarehouseAndLocationState()){
if (isWarehouseAndLocationState()) {
if (!state.shortcut.scanFrameShowSate) {
if (state.shortcut.warehouseStr == '' && state.NoLocationList) {
state.shortcut.scanFrameShowSate = true
@@ -175,7 +208,6 @@
}
}
}
/**
* 仓位逻辑
*/
@@ -199,7 +231,6 @@
state.location = false
}
const toPages = (url : string, data : any = {}) => {
uni.$u.route({
url: url,