zhang_li
3 months ago
16 changed files with 806 additions and 464 deletions
@ -0,0 +1,119 @@ |
|||||
|
<template> |
||||
|
<u-popup v-model="show" @click="show = false" mode="right" width="450rpx"> |
||||
|
<view class="maskbox" @tap="maskClick"></view> |
||||
|
<view class="uni-flex uni-column center" style="background-color: white; width: 200px; height: auto; padding: 20rpx; z-index: 100; position: relative; top: 100rpx; right: 20rpx; left: 30rpx; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); border-radius: 10rpx"> |
||||
|
<view class="uni-flex" style="justify-content: center; font-size: 35rpx; font-weight: bold"> 筛选条件 </view> |
||||
|
|
||||
|
<view class="uni-flex" style="flex-direction: column; width: 100%; margin-top: 10rpx"> |
||||
|
<view class="" style="font-size: 35rpx; margin-bottom: 10rpx"> 库位 </view> |
||||
|
<u-input style="margin-left: 0rpx" confirmType="search" v-model="locationCode" :border="true" placeholder="请输入库位" :focus="true" /> |
||||
|
</view> |
||||
|
<view class="" style="font-size: 35rpx; margin-top: 10rpx; margin-bottom: 10rpx"> |
||||
|
库存状态 : |
||||
|
<uni-data-checkbox mode="tag" multiple v-model="state" :localdata="stateList"></uni-data-checkbox> |
||||
|
</view> |
||||
|
<view class="" style="margin-top: 30rpx; margin-left: 30rpx; margin-right: 30rpx"> |
||||
|
<button type="primary" size="default" @click="confirm">确认</button> |
||||
|
</view> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue' |
||||
|
import { getTodayDate } from '@/common/basic.js' |
||||
|
|
||||
|
import { getInventoryStatusList } from '@/common/directory.js' |
||||
|
|
||||
|
const props = defineProps({ |
||||
|
checkedToday: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
checkedWaitTask: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
otherTitle: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
isShowAsn: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
isShowJob: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
isShowFromLocationCode: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
isShowProductionLineCode: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
productionline: { |
||||
|
type: Array, |
||||
|
default: [] |
||||
|
} |
||||
|
}) |
||||
|
const stateList = ref([]) |
||||
|
const state = ref([]) |
||||
|
const show = ref(false) |
||||
|
const scanNumber = ref() |
||||
|
const locationCode = ref() |
||||
|
|
||||
|
// 点击遮罩 |
||||
|
const maskClick = () => { |
||||
|
// 如果不允许点击遮罩,直接返回 |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
const openFilter = () => { |
||||
|
stateList.value = getInventoryStatusList() |
||||
|
stateList.value.forEach((res) => { |
||||
|
res.text = res.label |
||||
|
}) |
||||
|
show.value = true |
||||
|
} |
||||
|
|
||||
|
const closeScanPopup = () => { |
||||
|
show.value = false |
||||
|
} |
||||
|
|
||||
|
const switchChangeToday = (isOn) => { |
||||
|
let creationTime = '' |
||||
|
if (isOn) { |
||||
|
creationTime = getTodayDate() |
||||
|
} |
||||
|
|
||||
|
emit('switchChangeToday', isOn, creationTime) |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
|
||||
|
const scanNumberClick = () => { |
||||
|
scanNumber.value.openScanPopup() |
||||
|
} |
||||
|
|
||||
|
const scanOtherClick = () => { |
||||
|
scanAsnNumber.value.openScanPopup() |
||||
|
} |
||||
|
|
||||
|
const confirm = () => { |
||||
|
emit('onConfirmClick', locationCode.value, state.value) |
||||
|
closeScanPopup() |
||||
|
} |
||||
|
// 传递给父类 |
||||
|
const emit = defineEmits(['onConfirmClick', 'switchChangeToday']) |
||||
|
</script> |
||||
|
<style lang="scss"> |
||||
|
.maskbox { |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
z-index: 0; |
||||
|
} |
||||
|
</style> |
@ -1,83 +1,75 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<u-popup v-model="isShow" mode='bottom'> |
<u-popup v-model="isShow" mode="bottom"> |
||||
<view class="popup_box"> |
<view class="popup_box"> |
||||
<view class="pop_title uni-flex space-between"> |
<view class="pop_title uni-flex space-between"> |
||||
<view class=""> |
<view class=""> 扫描{{ title }} </view> |
||||
扫描{{title}} |
<view class=""> |
||||
</view> |
<image class="icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()"></image> |
||||
<view class=""> |
</view> |
||||
<image class=" icons_scan_close" src="/static/icons/icons_scan_close.svg" |
</view> |
||||
@click="closeScanPopup()"></image> |
<view class=""> |
||||
</view> |
<view class=""> |
||||
</view> |
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder="title" :clearResult="false" :isShowHistory="false"> </win-com-scan> |
||||
<view class=""> |
</view> |
||||
<view class=""> |
</view> |
||||
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false" :isShowHistory="false"> |
</view> |
||||
</win-com-scan> |
</u-popup> |
||||
</view> |
</view> |
||||
</view> |
|
||||
</view> |
|
||||
</u-popup> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { |
import { ref, getCurrentInstance } from 'vue' |
||||
ref, |
import winComScan from '@/mycomponents/scan/winComScan.vue' |
||||
getCurrentInstance |
|
||||
} from 'vue' |
const props = defineProps({ |
||||
import winComScan from '@/mycomponents/scan/winComScan.vue' |
title: { |
||||
const props = defineProps({ |
type: String, |
||||
title: { |
default: '' |
||||
type: String, |
}, |
||||
default: '' |
isShowRecord: { |
||||
}, |
type: Boolean, |
||||
isShowRecord: { |
default: true |
||||
type: Boolean, |
} |
||||
default: true |
}) |
||||
} |
const code = ref('') |
||||
}) |
const isShow = ref(false) |
||||
const code = ref('') |
const expand = ref(false) |
||||
const isShow = ref(false) |
const scanList = ref([]) |
||||
const expand = ref(false) |
const expendIcon = ref('arrow-down') |
||||
const scanList = ref([]) |
const scan = ref() |
||||
const expendIcon = ref('arrow-down') |
const openScanPopup = () => { |
||||
const scan = ref() |
setTimeout((res) => { |
||||
const openScanPopup = () => { |
isShow.value = true |
||||
setTimeout(res => { |
}, 500) |
||||
isShow.value = true |
} |
||||
}, 500) |
const closeScanPopup = () => { |
||||
} |
isShow.value = false |
||||
const closeScanPopup = () => { |
} |
||||
isShow.value = false |
const getfocus = () => { |
||||
} |
if (isShow.value) { |
||||
const getfocus = () => { |
scan.value.getfocus() |
||||
if (isShow.value) { |
} |
||||
scan.value.getfocus() |
} |
||||
} |
const scanClick = () => { |
||||
} |
scan.value.handelScanMsg() |
||||
const scanClick = () => { |
} |
||||
scan.value.handelScanMsg() |
const cancelClick = () => { |
||||
} |
scan.value.clearScanValue() |
||||
const cancelClick = () => { |
} |
||||
scan.value.clearScanValue() |
const getScanResult = (result) => { |
||||
} |
if (result.label.barType === 'BarCode') { |
||||
const getScanResult = (result) => { |
code.value = result.label.code |
||||
if (result.label.barType === 'BarCode') { |
} |
||||
code.value = result.label.code; |
callBack() |
||||
} |
} |
||||
callBack(); |
const callBack = () => { |
||||
} |
scan.value.clear() |
||||
const callBack = () => { |
emit('getScanCode', code.value) |
||||
scan.value.clear() |
} |
||||
emit("getScanCode", code.value); |
// 传递给父类 |
||||
} |
const emit = defineEmits(['getScanCode']) |
||||
// 传递给父类 |
defineExpose({ openScanPopup, closeScanPopup }) |
||||
const emit = defineEmits(['getScanCode']) |
|
||||
defineExpose({openScanPopup,closeScanPopup}) |
|
||||
|
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,85 +1,77 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<u-popup v-model="isShow" mode='bottom'> |
<u-popup v-model="isShow" mode="bottom"> |
||||
<view class="popup_box"> |
<view class="popup_box"> |
||||
<view class="pop_title uni-flex space-between"> |
<view class="pop_title uni-flex space-between"> |
||||
<view class=""> |
<view class=""> 扫描{{ title }} </view> |
||||
扫描{{title}} |
<view class=""> |
||||
</view> |
<image class="icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()"></image> |
||||
<view class=""> |
</view> |
||||
<image class=" icons_scan_close" src="/static/icons/icons_scan_close.svg" |
</view> |
||||
@click="closeScanPopup()"></image> |
<view class=""> |
||||
</view> |
<view class=""> |
||||
</view> |
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder="title" :clearResult="true" :isShowHistory="false" headerType=""> </win-com-scan> |
||||
<view class=""> |
</view> |
||||
<view class=""> |
</view> |
||||
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false" |
</view> |
||||
:isShowHistory="false" headerType=""> |
</u-popup> |
||||
</win-com-scan> |
</view> |
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
</u-popup> |
|
||||
</view> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { |
import { ref, getCurrentInstance } from 'vue' |
||||
ref, |
import winComScan from '@/mycomponents/scan/winComScan.vue' |
||||
getCurrentInstance |
|
||||
} from 'vue' |
const { proxy } = getCurrentInstance() |
||||
import winComScan from '@/mycomponents/scan/winComScan.vue' |
// defineOptions({ name: 'winScanJobNumber' }) |
||||
const { proxy } = getCurrentInstance() |
const props = defineProps({ |
||||
// defineOptions({ name: 'winScanJobNumber' }) |
title: { |
||||
const props = defineProps({ |
type: String, |
||||
title: { |
default: '' |
||||
type: String, |
}, |
||||
default: '' |
isShowRecord: { |
||||
}, |
type: Boolean, |
||||
isShowRecord: { |
default: true |
||||
type: Boolean, |
} |
||||
default: true |
}) |
||||
} |
const code = ref('') |
||||
}) |
const isShow = ref(false) |
||||
const code = ref('') |
const expand = ref(false) |
||||
const isShow = ref(false) |
const scanList = ref([]) |
||||
const expand = ref(false) |
const expendIcon = ref('arrow-down') |
||||
const scanList = ref([]) |
const scan = ref() |
||||
const expendIcon = ref('arrow-down') |
const openScanPopup = () => { |
||||
const scan = ref() |
setTimeout((res) => { |
||||
const openScanPopup = () => { |
isShow.value = true |
||||
setTimeout(res => { |
}, 500) |
||||
isShow.value = true |
} |
||||
}, 500) |
const closeScanPopup = () => { |
||||
} |
isShow.value = false |
||||
const closeScanPopup = () => { |
} |
||||
isShow.value = false |
const getfocus = () => { |
||||
} |
if (isShow.value) { |
||||
const getfocus = () => { |
scan.value.getfocus() |
||||
if (isShow.value) { |
} |
||||
scan.value.getfocus() |
} |
||||
} |
const scanClick = () => { |
||||
} |
scan.value.handelScanMsg() |
||||
const scanClick = () => { |
} |
||||
scan.value.handelScanMsg() |
const cancelClick = () => { |
||||
} |
scan.value.clearScanValue() |
||||
const cancelClick = () => { |
} |
||||
scan.value.clearScanValue() |
const getScanResult = (result) => { |
||||
} |
if (result.label.barType === 'BarCode') { |
||||
const getScanResult = (result) => { |
code.value = result.label.code |
||||
if (result.label.barType === 'BarCode') { |
} |
||||
code.value = result.label.code; |
callBack() |
||||
} |
} |
||||
callBack(); |
const callBack = () => { |
||||
} |
scan.value.clear() |
||||
const callBack = () => { |
emit('getScanCode', code.value) |
||||
scan.value.clear() |
} |
||||
emit("getScanCode", code.value); |
// 传递给父类 |
||||
} |
const emit = defineEmits(['getScanCode']) |
||||
// 传递给父类 |
defineExpose({ openScanPopup, closeScanPopup }) |
||||
const emit = defineEmits(['getScanCode']) |
|
||||
defineExpose({openScanPopup,closeScanPopup}) |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style></style> |
||||
</style> |
|
||||
|
@ -1,270 +1,422 @@ |
|||||
<!-- 基于z-paging封装个性化分页组件演示(vue) --> |
<!-- 基于z-paging封装个性化分页组件演示(vue) --> |
||||
<template> |
<template> |
||||
<view class=""> |
<view class="uni-flex" style="flex-direction: column"> |
||||
<com-blank-view @goScan="openScanPopup" v-if="itemCode == ''"></com-blank-view> |
<itemFilter ref="filter" @onConfirmClick="confirm"> </itemFilter> |
||||
<!-- 这里就很整洁了,只要设置ref,绑定query事件,绑定list就可以了 --> |
<view class="top" style=""> |
||||
<my-paging v-show="itemCode != ''" ref="paging" v-model="dataList" @query="queryList"> |
<com-blank-view @goScan="openScanPopup" v-if="itemCode == ''"></com-blank-view> |
||||
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中,如果需要跟着滚动,则不要设置slot="top" --> |
<item-info v-if="itemDetail" :itemdetail="itemDetail"></item-info> |
||||
<template #top> |
<z-tabs v-if="itemCode" :list="tabList" @change="tabChange" /> |
||||
<view v-if="itemDetail != undefined"> |
</view> |
||||
<item-info :itemdetail="itemDetail"></item-info> |
|
||||
<view class="split_line"></view> |
<view style="padding-top: 230rpx; width: 100%"> |
||||
<z-tabs :list="tabList" @change="tabChange" /> |
<view v-if="totalCount > 0" style="margin: 10rpx; font-size: 35rpx; font-weight: bold">总数 : {{ totalCount }} |
||||
</view> |
</view> |
||||
</template> |
<view v-for="(item, index) in dataList" style="width: 100%" :key="index"> |
||||
<view class="" style="padding-bottom: 50rpx"> |
<view class="uni-flex uni-row" |
||||
<comItemDetailCard v-if="tabIndex == 0" :itemList="dataList" :isShowPack="false" style="margin: 20rpx"> </comItemDetailCard> |
style="align-items: center; background-color: #fff; border-radius: 10rpx; margin: 10rpx"> |
||||
<comItemDetailCard v-if="tabIndex == 1" :itemList="dataList" style="margin: 20rpx"> </comItemDetailCard> |
<view class="" style="font-size: 35rpx"> ({{ index + 1 }}) </view> |
||||
<comItemDetailCard v-if="tabIndex == 2" :itemList="dataList" :isShowLocation="false" :isShowBusiness="true" style="margin: 20rpx"></comItemDetailCard> |
<comItemDetailCard :isShowPack="false" :dataContent="item" style="margin: 10rpx"> </comItemDetailCard> |
||||
<comItemDetailCard v-if="tabIndex == 3" :itemList="dataList" :isShowLocation="false" :isShowBusiness="true" style="margin: 20rpx"> </comItemDetailCard> |
</view> |
||||
</view> |
</view> |
||||
</my-paging> |
<uni-load-more :status="loadingType" v-if="dataList.length > 0" /> |
||||
<win-scan-button @goScan="openScanPopup" v-if="itemCode != ''"></win-scan-button> |
</view> |
||||
<win-scan-item ref="scanPopup" title="物料代码" @getScanResult="getScanCode"> </win-scan-item> |
<win-scan-button @goScan="openScanPopup" v-if="itemCode != ''"></win-scan-button> |
||||
<com-message ref="comMessageRef" /> |
<win-scan-item ref="scanPopup" title="物料代码" @getScanResult="getScanCode"> </win-scan-item> |
||||
</view> |
<com-message ref="comMessageRef" /> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
||||
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
||||
import { getExpectoutByItemcode, getExpectinByItemcode, getBalanceByItemCode, getBasicItemByCode, getBalanceSummary } from '@/api/request2.js' |
import { getExpectoutByItemcode, getExpectinByItemcode, getBalanceByItemCode, getBasicItemByCode, getBalanceSummary } from '@/api/request2.js' |
||||
import { goHome } from '@/common/basic.js' |
import { goHome } from '@/common/basic.js' |
||||
import itemInfo from '@/mycomponents/item/itemInfo.vue' |
import itemInfo from '@/mycomponents/item/itemInfo.vue' |
||||
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
||||
import winScanItem from '@/mycomponents/scan/winScanItem.vue' |
import winScanItem from '@/mycomponents/scan/winScanItem.vue' |
||||
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
||||
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' |
import comItemDetailCard from '@/pages/query/coms/comItemDetailCard.vue' |
||||
|
import itemFilter from '@/mycomponents/item/itemFilter.vue' |
||||
const { proxy } = getCurrentInstance() |
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' |
||||
|
|
||||
const dataList = ref([]) |
const { proxy } = getCurrentInstance() |
||||
const tabList = ref(['汇总', '明细', '预计入', '预计出']) |
|
||||
const tabIndex = ref(0) |
const dataList = ref([]) |
||||
const itemDetail = ref(undefined) |
const tabList = ref(['汇总', '明细', '预计入', '预计出']) |
||||
const itemCode = ref('') |
const tabIndex = ref(0) |
||||
const balances = ref([]) |
const itemDetail = ref(undefined) |
||||
const scanPopup = ref() |
const itemCode = ref('') |
||||
const paging = ref() |
const balances = ref([]) |
||||
const comMessageRef = ref() |
const loadingType = ref('nomore') |
||||
onNavigationBarButtonTap((e) => { |
const totalCount = ref(0) |
||||
if (e.index === 0) { |
const locationCode = ref('') |
||||
goHome() |
const inventoryStatus = ref('') |
||||
} |
const pageSize = ref(10) |
||||
}) |
const pageNo = ref(1) |
||||
onMounted(() => { |
const scanPopup = ref() |
||||
openScanPopup() |
const paging = ref() |
||||
}) |
const comMessageRef = ref() |
||||
const openScanPopup = (val) => { |
const filter = ref() |
||||
scanPopup.value.openScanPopup() |
onNavigationBarButtonTap((e) => { |
||||
} |
if (e.index === 0) { |
||||
const closeScanPopup = () => { |
goHome() |
||||
scanPopup.value.closeScanPopup() |
} else if (e.index == 1) { |
||||
} |
filter.value.openFilter() |
||||
const getScanCode = (code) => { |
} |
||||
if (code == '') { |
}) |
||||
showMessage('物料号不能为空') |
onMounted(() => { |
||||
return |
openScanPopup() |
||||
} |
}) |
||||
itemCode.value = '' |
onReachBottom(() => { |
||||
getItemInfo(code) |
console.log('底部') |
||||
} |
// 避免多次触发 |
||||
const getItemInfo = (code) => { |
if (loadingType.value == 'loading' || loadingType.value == 'nomore') { |
||||
proxy.$modal.loading('正在查询物料信息....') |
return |
||||
|
} |
||||
getBasicItemByCode(code) |
getContentByTab(tabIndex.value, pageNo.value, pageSize.value, 'more') |
||||
.then((res) => { |
}) |
||||
uni.hideLoading() |
onPullDownRefresh(() => { |
||||
if (res.data.list.length > 0) { |
getContentByTab(tabIndex.value, pageNo.value, pageSize.value, 'refresh') |
||||
closeScanPopup() |
}) |
||||
itemCode.value = res.data.list[0].code |
const openScanPopup = (val) => { |
||||
itemDetail.value = res.data.list[0] |
scanPopup.value.openScanPopup() |
||||
tabChange(0) |
} |
||||
} else { |
const closeScanPopup = () => { |
||||
showMessage(`未查找到物料【${code}】`) |
scanPopup.value.closeScanPopup() |
||||
} |
} |
||||
}) |
const getScanCode = (code) => { |
||||
.catch((error) => { |
if (code == '') { |
||||
uni.hideLoading() |
showMessage('物料号不能为空') |
||||
itemCode.value = '' |
return |
||||
showMessage(error) |
} |
||||
}) |
itemCode.value = '' |
||||
} |
getItemInfo(code) |
||||
|
} |
||||
// 汇总 |
const getItemInfo = (code) => { |
||||
const getSummary = (pageNo, pageSize) => { |
proxy.$modal.loading('正在查询物料信息....') |
||||
proxy.$modal.loading('加载中....') |
|
||||
const params = { |
getBasicItemByCode(code) |
||||
itemCode: itemCode.value, |
.then((res) => { |
||||
pageNo, |
uni.hideLoading() |
||||
pageSize |
if (res.data.list.length > 0) { |
||||
} |
closeScanPopup() |
||||
getBalanceSummary(params) |
itemCode.value = res.data.list[0].code |
||||
.then((res) => { |
itemDetail.value = res.data.list[0] |
||||
uni.hideLoading() |
tabChange(0) |
||||
if (res.data.list.length > 0) { |
} else { |
||||
paging.value.complete(res.data.list) |
showMessage(`未查找到物料【${code}】`) |
||||
} else { |
} |
||||
paging.value.complete(false) |
}) |
||||
showMessage(`未查找到物料【${itemCode.value}】`) |
.catch((error) => { |
||||
} |
uni.hideLoading() |
||||
}) |
itemCode.value = '' |
||||
.catch((error) => { |
showMessage(error) |
||||
paging.value.complete(false) |
}) |
||||
uni.hideLoading() |
} |
||||
showMessage(error) |
|
||||
}) |
const getSummary = (pageNo, pageSize, type) => { |
||||
} |
uni.showLoading({ |
||||
// 明细 |
title: "加载中...", |
||||
const getDetailList = (pageNo, pageSize) => { |
mask: true |
||||
proxy.$modal.loading('加载中....') |
}); |
||||
const params = { |
loadingType.value = "loading"; |
||||
itemCode: itemCode.value, |
if (type === "refresh") { |
||||
pageNo, |
pageNo.value = 1; |
||||
pageSize |
dataList.value = []; |
||||
} |
} |
||||
getBalanceByItemCode(params) |
|
||||
.then((res) => { |
var filters = []; |
||||
uni.hideLoading() |
filters.push({ |
||||
if (res.data.list.length > 0) { |
column: "itemCode", |
||||
paging.value.complete(res.data.list) |
action: "==", |
||||
} else { |
value: itemCode.value |
||||
paging.value.complete(false) |
}) |
||||
showMessage(`未查找到物料【${itemCode.value}】`) |
if (locationCode.value) { |
||||
} |
filters.push({ |
||||
}) |
column: "locationCode", |
||||
.catch((error) => { |
action: "==", |
||||
paging.value.complete(false) |
value: locationCode.value |
||||
uni.hideLoading() |
}) |
||||
showMessage(error) |
} |
||||
}) |
|
||||
} |
if (inventoryStatus.value) { |
||||
const ontabtap = (e) => { |
filters.push({ |
||||
const index = e.target.dataset.current || e.currentTarget.dataset.current |
column: "inventoryStatus", |
||||
tabIndex.value = index |
action: "in", |
||||
getContentByTab(index) |
value: inventoryStatus.value |
||||
} |
}) |
||||
|
} |
||||
const getContentByTab = (index, pageNo, pageSize) => { |
|
||||
if (index === 0) getSummary(pageNo, pageSize) |
var params = { |
||||
else if (index === 1) getDetailList(pageNo, pageSize) |
filters: filters, |
||||
else if (index === 2) { |
pageNo: pageNo.value, |
||||
getExpectin(pageNo, pageSize) |
pageSize: pageSize |
||||
} else if (index == 3) { |
} |
||||
getExpectout(pageNo, pageSize) |
getBalanceByItemCode(params).then(res => { |
||||
} |
uni.hideLoading(); |
||||
} |
|
||||
// 预计入 |
if (type === "refresh") { |
||||
const getExpectin = (pageNo, pageSize) => { |
uni.stopPullDownRefresh(); |
||||
proxy.$modal.loading('加载中....') |
} |
||||
const params = { |
var list = res.data.list; |
||||
itemCode: itemCode.value, |
totalCount.value = res.data.total |
||||
pageNo, |
loadingType.value = "loadmore"; |
||||
pageSize |
if (list == null || list.length == 0) { |
||||
} |
loadingType.value = "nomore"; |
||||
getExpectinByItemcode(params) |
return; |
||||
.then((res) => { |
} |
||||
uni.hideLoading() |
list.forEach(item => { |
||||
if (res.data.total > 0) { |
item.packingNumber = "" |
||||
paging.value.complete(res.data.list) |
}) |
||||
} else { |
|
||||
paging.value.complete(false) |
dataList.value = type === "refresh" ? list : dataList.value..valueconcat(list); |
||||
showMessage(`未查找到物料【${itemCode.value}】`) |
pageNo.value++; |
||||
} |
|
||||
}) |
}).catch(error => { |
||||
.catch((error) => { |
paging.value.complete(false); |
||||
paging.value.complete(false) |
uni.hideLoading(); |
||||
uni.hideLoading() |
showMessage(error); |
||||
showMessage(error) |
}) |
||||
}) |
} |
||||
} |
//明细 |
||||
|
const getDetailList = (pageNo, pageSize, type) => { |
||||
// 预计出 |
uni.showLoading({ |
||||
const getExpectout = (pageNo, pageSize) => { |
title: "加载中...", |
||||
proxy.$modal.loading('加载中....') |
mask: true |
||||
const params = { |
}); |
||||
itemCode: itemCode.value, |
loadingType.value = "loading"; |
||||
pageNo, |
if (type === "refresh") { |
||||
pageSize |
pageNo.value = 1; |
||||
} |
dataList.value = []; |
||||
getExpectoutByItemcode(params) |
} |
||||
.then((res) => { |
|
||||
uni.hideLoading() |
var filters = []; |
||||
console.log(res) |
filters.push({ |
||||
if (res.data.total > 0) { |
column: "itemCode", |
||||
paging.value.complete(res.data.list) |
action: "==", |
||||
} else { |
value: itemCode.value |
||||
paging.value.complete(false) |
}) |
||||
showMessage(`未查找到物料【${itemCode.value}】`) |
if (locationCode.value) { |
||||
} |
filters.push({ |
||||
}) |
column: "locationCode", |
||||
.catch((error) => { |
action: "==", |
||||
paging.value.complete(false) |
value: locationCode.value |
||||
uni.hideLoading() |
}) |
||||
showMessage(error) |
} |
||||
}) |
|
||||
} |
if (inventoryStatus.value) { |
||||
|
filters.push({ |
||||
const showMessage = (message) => { |
column: "inventoryStatus", |
||||
comMessageRef.value.showErrorMessage(message, (res) => { |
action: "in", |
||||
if (res) { |
value: inventoryStatus.value |
||||
afterCloseMessage() |
}) |
||||
} |
} |
||||
}) |
|
||||
} |
var params = { |
||||
|
filters: filters, |
||||
const afterCloseMessage = () => { |
pageNo: pageNo.value, |
||||
if (scanPopup.value != undefined) { |
pageSize: pageSize |
||||
scanPopup.value.getfocus() |
} |
||||
} |
getBalanceByItemCode(params).then(res => { |
||||
} |
uni.hideLoading(); |
||||
const tabChange = (index) => { |
|
||||
console.log(index) |
if (type === "refresh") { |
||||
tabIndex.value = index |
uni.stopPullDownRefresh(); |
||||
paging.value.reload(true) |
} |
||||
} |
var list = res.data.list; |
||||
const queryList = (pageNo, pageSize) => { |
totalCount.value = res.data.total |
||||
if (itemCode.value != '') { |
loadingType.value = "loadmore"; |
||||
getContentByTab(tabIndex.value, pageNo, pageSize) |
if (list == null || list.length == 0) { |
||||
} |
loadingType.value = "nomore"; |
||||
} |
return; |
||||
|
} |
||||
const itemClick = (item) => {} |
dataList.value = type === "refresh" ? list : dataList.value.concat(list); |
||||
|
pageNo.value++; |
||||
|
|
||||
|
}).catch(error => { |
||||
|
uni.hideLoading(); |
||||
|
showMessage(error); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
const getContentByTab = (index, pageNo, pageSize, type) => { |
||||
|
if (index === 0) getSummary(pageNo, pageSize, type); |
||||
|
else if (index === 1) getDetailList(pageNo, pageSize, type); |
||||
|
else if (index === 2) { |
||||
|
getExpectin(pageNo, pageSize, type); |
||||
|
} else if (index == 3) { |
||||
|
getExpectout(pageNo, pageSize, type); |
||||
|
} |
||||
|
} |
||||
|
//预计入 |
||||
|
const getExpectin = (pageNo, pageSize, type) { |
||||
|
uni.showLoading({ |
||||
|
title: "加载中...", |
||||
|
mask: true |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
loadingType.value = "loading"; |
||||
|
if (type === "refresh") { |
||||
|
pageNo.value = 1; |
||||
|
dataList.value = []; |
||||
|
} |
||||
|
|
||||
|
var filters = []; |
||||
|
filters.push({ |
||||
|
column: "itemCode", |
||||
|
action: "==", |
||||
|
value: itemCode.value |
||||
|
}) |
||||
|
if (locationCode.value) { |
||||
|
filters.push({ |
||||
|
column: "locationCode", |
||||
|
action: "==", |
||||
|
value: locationCode.value |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
if (inventoryStatus.value) { |
||||
|
filters.push({ |
||||
|
column: "inventoryStatus", |
||||
|
action: "in", |
||||
|
value: inventoryStatus.value |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
var params = { |
||||
|
filters: filters, |
||||
|
pageNo: pageNo.value, |
||||
|
pageSize: pageSize |
||||
|
} |
||||
|
getExpectinByItemcode(params).then(res => { |
||||
|
uni.hideLoading(); |
||||
|
|
||||
|
if (type === "refresh") { |
||||
|
uni.stopPullDownRefresh(); |
||||
|
} |
||||
|
var list = res.data.list; |
||||
|
totalCount.value = res.data.total |
||||
|
loadingType.value = "loadmore"; |
||||
|
if (list == null || list.length == 0) { |
||||
|
loadingType.value = "nomore"; |
||||
|
return; |
||||
|
} |
||||
|
dataList.value = type === "refresh" ? list : dataList.value.concat(list); |
||||
|
pageNo.value++; |
||||
|
}).catch(error => { |
||||
|
uni.hideLoading(); |
||||
|
showMessage(error); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
//预计出 |
||||
|
const getExpectout = (pageNo, pageSize, type) => { |
||||
|
uni.showLoading({ |
||||
|
title: "加载中...", |
||||
|
mask: true |
||||
|
}); |
||||
|
|
||||
|
loadingType.value = "loading"; |
||||
|
if (type === "refresh") { |
||||
|
pageNo.value = 1; |
||||
|
dataList.value = []; |
||||
|
} |
||||
|
|
||||
|
var filters = []; |
||||
|
filters.push({ |
||||
|
column: "itemCode", |
||||
|
action: "==", |
||||
|
value: itemCode.value |
||||
|
}) |
||||
|
if (locationCode.value) { |
||||
|
filters.push({ |
||||
|
column: "locationCode", |
||||
|
action: "==", |
||||
|
value: locationCode.value |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
if (inventoryStatus.value) { |
||||
|
filters.push({ |
||||
|
column: "inventoryStatus", |
||||
|
action: "in", |
||||
|
value: inventoryStatus.value |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
var params = { |
||||
|
filters: filters, |
||||
|
pageNo: pageNo.value, |
||||
|
pageSize: pageSize |
||||
|
} |
||||
|
getExpectoutByItemcode(params).then(res => { |
||||
|
uni.hideLoading(); |
||||
|
if (type === "refresh") { |
||||
|
uni.stopPullDownRefresh(); |
||||
|
} |
||||
|
var list = res.data.list; |
||||
|
totalCount.value = res.data.total |
||||
|
loadingType.value = "loadmore"; |
||||
|
if (list == null || list.length == 0) { |
||||
|
loadingType.value = "nomore"; |
||||
|
return; |
||||
|
} |
||||
|
dataList.value = type === "refresh" ? list : dataList.value.concat(list); |
||||
|
pageNo.value++; |
||||
|
|
||||
|
}).catch(error => { |
||||
|
uni.hideLoading(); |
||||
|
showMessage(error); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
const showMessage = (message) => { |
||||
|
comMessageRef.value.showErrorMessage(message, res => { |
||||
|
if (res) { |
||||
|
afterCloseMessage() |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
const afterCloseMessage = () => { |
||||
|
if (scanPopup.value != undefined) { |
||||
|
scanPopup.value.getfocus(); |
||||
|
} |
||||
|
} |
||||
|
const tabChange = (index) => { |
||||
|
tabIndex.value = index; |
||||
|
getContentByTab(index, pageNo.value, pageSize.value, "refresh") |
||||
|
} |
||||
|
|
||||
|
const confirm = (locationCodeParams, status) => { |
||||
|
locationCode.value = locationCodeParams; |
||||
|
if (status.length > 0) { |
||||
|
var arrayItems = status.join(',') |
||||
|
inventoryStatus.value = arrayItems |
||||
|
} else { |
||||
|
inventoryStatus.value = "" |
||||
|
} |
||||
|
tabChange(tabIndex.value) |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
.notice { |
page { |
||||
background-color: red; |
height: 100%; |
||||
color: white; |
} |
||||
display: flex; |
.top{ |
||||
flex-direction: column; |
width: 100%; |
||||
padding: 12rpx 20rpx; |
position: fixed; |
||||
font-size: 24rpx; |
/* #ifdef APP */ |
||||
} |
top: 0rpx; |
||||
|
/* #endif */ |
||||
.item { |
|
||||
position: relative; |
/* #ifdef H5 */ |
||||
height: 150rpx; |
top: 80rpx; |
||||
display: flex; |
/* #endif */ |
||||
align-items: center; |
|
||||
justify-content: space-between; |
right: 0; |
||||
padding: 0rpx 30rpx; |
</style> |
||||
} |
|
||||
|
|
||||
.item-detail { |
|
||||
padding: 5rpx 15rpx; |
|
||||
border-radius: 10rpx; |
|
||||
font-size: 28rpx; |
|
||||
color: white; |
|
||||
background-color: #007aff; |
|
||||
} |
|
||||
|
|
||||
.item-line { |
|
||||
position: absolute; |
|
||||
bottom: 0rpx; |
|
||||
left: 0rpx; |
|
||||
height: 1px; |
|
||||
width: 100%; |
|
||||
background-color: #eeeeee; |
|
||||
} |
|
||||
</style> |
|
Loading…
Reference in new issue