出库对接
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<!-- 我的入库单/我的出库单/入库单入库/出库单出库-->
|
||||
<navigation :title="title" back-url="pages/warehousing/index"></navigation>
|
||||
|
||||
<view class="content">
|
||||
<view class="contentBox">
|
||||
<!-- 搜索框 -->
|
||||
<view class="topSearch">
|
||||
<uni-easyinput type="text" v-model="queryParams.keyword" prefixIcon="search" :input-border="false"
|
||||
@@ -18,14 +18,15 @@
|
||||
<view class="line title">
|
||||
<p> {{ typeName }}编号:{{ item.billNo }}</p>
|
||||
<span :style="getColor(item?.billType)">
|
||||
{{ getBillType(item?.billType, item?.status) }}
|
||||
{{ getBillType(item?.billType, item?.status, flag) }}
|
||||
</span>
|
||||
</view>
|
||||
<p class="line content">{{ typeName }}类型:
|
||||
<span>{{ getOrderType(item.status) }}</span>
|
||||
</p>
|
||||
<p class="line content">库位:
|
||||
<span>{{ item.areaName }}</span>
|
||||
<span v-if="item.warehouseName">{{ item.warehouseName }}/</span>
|
||||
<span v-if="item.areaName"> {{ item.areaName }}</span>
|
||||
</p>
|
||||
<p class="line content">开单时间:
|
||||
<span>{{ item.createTime }}</span>
|
||||
@@ -39,10 +40,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import _, { includes } from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import { computed, toRefs, ref } from 'vue';
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import { stockList } from '../../api/stockIn';
|
||||
import { stockList } from '@/api/stockIn';
|
||||
import { stockOutList } from '@/api/stockOut';
|
||||
import { getBillType, getColor } from '../until';
|
||||
import Navigation from '../components/Navigation.vue';
|
||||
|
||||
@@ -65,7 +67,8 @@ const { type, query } = toRefs(props)
|
||||
const pagingRef = ref(null)
|
||||
const list = ref([])
|
||||
|
||||
const typeName = computed(() => includes(type.value, 'stockIn') ? '入库单' : '出库单')
|
||||
const flag = computed(() => _.includes(type.value, 'stockIn') ? 0 : 1)
|
||||
const typeName = computed(() => _.includes(type.value, 'stockIn') ? '入库单' : '出库单')
|
||||
const title = computed(() => {
|
||||
if (type.value == 'stockIn') return '我的入库单'
|
||||
else if (type.value == 'stockIn-putAway') return '入库单入库'
|
||||
@@ -73,7 +76,7 @@ const title = computed(() => {
|
||||
else return '出库单出库'
|
||||
})
|
||||
const getOrderType = () => {
|
||||
return includes(type.value, 'stockIn') ? '入库单入库' : '出库单出库'
|
||||
return _.includes(type.value, 'stockIn') ? '入库单入库' : '出库单出库'
|
||||
}
|
||||
|
||||
const queryParams = ref({
|
||||
@@ -85,11 +88,9 @@ onShow(() => {
|
||||
})
|
||||
|
||||
const onDetail = (val) => {
|
||||
if (_.includes(type.value, 'stockIn')) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/warehousing/stockIn/components/detail?billNo=${val.billNo}&type=${type.value}`,
|
||||
});
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/warehousing/stockIn/components/detail?billNo=${val.billNo}&type=${type.value}`,
|
||||
});
|
||||
}
|
||||
|
||||
const getList = (pageNo, pageSize) => {
|
||||
@@ -103,8 +104,15 @@ const getList = (pageNo, pageSize) => {
|
||||
}).catch(() => {
|
||||
pagingRef.value.complete(false)
|
||||
})
|
||||
}else{
|
||||
|
||||
} else {
|
||||
stockOutList({ ...queryParams.value, ...query.value }).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
e.showMore = false;
|
||||
});
|
||||
pagingRef.value.complete(res.rows)
|
||||
}).catch(() => {
|
||||
pagingRef.value.complete(false)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -113,21 +121,19 @@ const getList = (pageNo, pageSize) => {
|
||||
/* 搜索框:放在导航栏下面,不覆盖 */
|
||||
.topSearch {
|
||||
position: fixed;
|
||||
top: var(--nav-height);
|
||||
/* 关键:自动在导航栏下方 */
|
||||
top: 65rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
/* 比导航栏小 */
|
||||
padding: 8rpx 16rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #eee;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
|
||||
.containerBox {
|
||||
padding-top: 90px !important;
|
||||
/* 撑开:导航栏+搜索框高度 */
|
||||
padding-top: 125rpx !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
@@ -143,6 +149,10 @@ const getList = (pageNo, pageSize) => {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uni-list--border-bottom {
|
||||
padding: 8px 12px 8px 15px;
|
||||
}
|
||||
|
||||
.uni-list {
|
||||
background-color: #F8F8FF;
|
||||
}
|
||||
@@ -154,7 +164,7 @@ const getList = (pageNo, pageSize) => {
|
||||
.line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12rpx 20rpx;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
||||
Reference in New Issue
Block a user