完善入库跳转以及出库创建页面
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 自定义导航栏 -->
|
||||
<navigation :title="pathParams.billNo">
|
||||
<navigation :title="pathParams.billNo" :back-url="backUrl">
|
||||
<template #right>
|
||||
<view class="right-btn flex align-center justify-center ">
|
||||
<uv-image @click="onPrinter" src="../../../../static/printer.png" width="20px" height="20px"
|
||||
@@ -9,7 +9,7 @@
|
||||
style="margin-top:10rpx" />
|
||||
</view>
|
||||
</template>
|
||||
</Navigation>
|
||||
</navigation>
|
||||
<!-- 详情信息 -->
|
||||
<detail-info type="stockIn" :detailInfo="detailInfo" />
|
||||
|
||||
@@ -28,6 +28,8 @@ import { objectToQuery, getBillType } from '../../../until';
|
||||
import { stockInDetail, inboundBillVoid } from '../../../../api/stockIn';
|
||||
import DetailInfo from '../../../components/DetailInfo.vue';
|
||||
import Navigation from '../../../components/Navigation.vue';
|
||||
// ref:返回路径
|
||||
const backUrl = ref('')
|
||||
|
||||
// 数据:路径参数
|
||||
const pathParams = ref('')
|
||||
@@ -83,8 +85,9 @@ const setDetailInfoToStorage = (type) => {
|
||||
// 按钮:入库单入库
|
||||
const toPutAway = () => {
|
||||
setDetailInfoToStorage('1')
|
||||
const query = objectToQuery(pathParams.value)
|
||||
uni.navigateTo({
|
||||
url: `/pages/warehousing/stockIn/components/inbound?billNo=${pathParams.value.billNo}`
|
||||
url: `/pages/warehousing/stockIn/components/inbound${query}`
|
||||
});
|
||||
}
|
||||
// 编辑
|
||||
@@ -103,6 +106,11 @@ onLoad((options) => {
|
||||
uni.showToast({ title: '参数错误,无唯一码ID', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (options.type == 'stockIn') {
|
||||
backUrl.value = '/pages/warehousing/stockIn/my'
|
||||
} else if (options.type == 'stockIn-putAway') {
|
||||
backUrl.value = '/pages/warehousing/stockIn/putaway'
|
||||
}
|
||||
pathParams.value = options
|
||||
getDetailInfo()
|
||||
})
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<!--点击入库单入库后的入库页面 -->
|
||||
<template>
|
||||
<view class="page">
|
||||
<navigation title="入库" :back-url="backUrl"></navigation>
|
||||
|
||||
<!-- 仓库信息 - 仓库、存储区 -->
|
||||
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo" :pathParams="pathParams" />
|
||||
<!-- 物料列表 - 添加物料 -->
|
||||
@@ -17,12 +19,14 @@
|
||||
|
||||
import _ from 'lodash';
|
||||
import { ref } from 'vue';
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { inboundFinish, stockInDetail,inboundBillVoid } from '@/api/stockIn';
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { inboundFinish, stockInDetail } from '@/api/stockIn';
|
||||
import MaterialList from '../../../components/MaterialList.vue';
|
||||
import WarehousingInfo from '../../../components/WarehousingInfo.vue';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
import Navigation from '../../../components/Navigation.vue';
|
||||
import {objectToQuery} from '../../../until';
|
||||
const backUrl = ref('')
|
||||
// 数据:路径参数
|
||||
const pathParams = ref('')
|
||||
// 标志:是否为编辑
|
||||
@@ -103,7 +107,7 @@ const submitForm = () => {
|
||||
// stockIn
|
||||
// /pages/warehousing/stockIn/components/detail
|
||||
uni.navigateTo({
|
||||
url: `/pages/warehousing/stockIn/components/detail?billNo=${pathParams.value.billNo}&type=stockIn`
|
||||
url: backUrl.value
|
||||
});
|
||||
console.log(res, '入库单入库');
|
||||
})
|
||||
@@ -117,16 +121,15 @@ onLoad((options) => {
|
||||
return
|
||||
}
|
||||
pathParams.value = options
|
||||
// stockIn-putAway
|
||||
// stockIn
|
||||
const query = objectToQuery(pathParams.value)
|
||||
backUrl.value = `/pages/warehousing/stockIn/components/detail${query}`
|
||||
getDetailInfo()
|
||||
flag.value = options.type
|
||||
isEdit.value = _.includes(options?.type, 'stockIn')
|
||||
})
|
||||
// 修改标题:若有billNo传入 修改标题
|
||||
onShow(() => {
|
||||
if (pathParams.value.billNo) {
|
||||
uni.setNavigationBarTitle({ title: pathParams.value.billNo })
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getMaterialList()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user