出库对接

This commit is contained in:
zx
2026-04-14 08:46:29 +08:00
parent b16dd22d70
commit 6f1db0f92e
30 changed files with 1366 additions and 458 deletions

View File

@@ -1,6 +1,8 @@
<!-- 仓库/存储区选择 -->
<template>
<view class="content">
<navigation :title="isWarehousing.value ? '仓库选择' : '存储区选择'" :back-url="backUrl"></navigation>
<view class="contentBox">
<view class="topSearch">
<uni-easyinput type="text" v-model="queryParams.keyword" prefixIcon="search" :inputBorder="false"
@iconClick="getList" placeholder="请输入搜索内容" />
@@ -56,11 +58,13 @@
</view>
</template>
<script setup>
import { ref, toRefs } from 'vue';
import { computed, ref, toRefs } from 'vue';
import { onShow } from "@dcloudio/uni-app";
import { getWarehousingInfo } from '../../api/system';
import { getWarehousingInfo } from '@/api/system';
import getRepository from "@/api/getRepository";
import { objectToQuery } from '../until';
import Navigation from '../components/Navigation.vue';
import { watch } from 'vue';
const props = defineProps({
// 是否为仓库查询
@@ -69,12 +73,6 @@ const props = defineProps({
default: true,
required: true
},
// 返回出库开单/入库开单
backStr: {
type: String,
default: true,
required: true
},
pathParams: {
type: Object,
default: null,
@@ -82,11 +80,14 @@ const props = defineProps({
}
})
const { isWarehousing, backStr, pathParams } = toRefs(props)
const { isWarehousing, pathParams } = toRefs(props)
// 数据:查询关键字
const queryParams = ref({
keyword: ''
})
const backUrl = ref('')
// stockIn 入库单开单 stockIn_Detail入库单编辑 issueUniqueCode唯一码 issueUniqueCode_inbound入库生成唯一码
const keyType = computed(() => pathParams.value.type || pathParams.value.back)
// 绑定:加载屏
const pagingRef = ref(null)
// 数据:仓库/存储区
@@ -132,25 +133,27 @@ const getRepositoryInfo = async () => {
}
// 返回路径
const toBack = (back) => {
const toBack = (keyType) => {
console.log('监听', keyType);
let url = ''
switch (back) {
switch (keyType) {
case 'stockIn':
// 入库单开单
url = '/pages/warehousing/stockIn/create'
break;
case 'stockOut':
// 出库单开单
url = ''
url = '/pages/warehousing/stockOut/create'
break;
case 'stockOut-outbound':
// 出库单出库
url = '/pages/warehousing/stockOut/components/outAway'
break;
}
let params = pathParams.value
delete params.backStr
delete params.flag
const query = objectToQuery(params)
uni.navigateTo({
url: `${url}${query}`
})
const query = objectToQuery(pathParams.value)
backUrl.value = `${url}${query}`
}
// 选择:仓库/存储区
const onChecked = (val) => {
@@ -166,9 +169,25 @@ const onChecked = (val) => {
}
// 返回list
toBack(backStr.value)
uni.navigateTo({
url: backUrl.value
})
}
// 监听:确保 pathParams 变化时一定执行 toBack()
watch(
() => pathParams.value,
(d) => {
console.log('pathParams 变化:', d);
if (!d) return
const type = d.type || d.back;
console.log(type, 'eeeeeee');
toBack(type)
},
{ deep: true, immediate: true }
)
onShow(() => {
pagingRef.value?.reload?.()
})
@@ -177,7 +196,7 @@ onShow(() => {
<style scoped lang="scss">
.topSearch {
position: fixed;
top: 0;
top: 65rpx;
left: 0;
right: 0;
z-index: 999;
@@ -188,7 +207,7 @@ onShow(() => {
}
.containerBox {
padding-top: 44px;
padding-top: 120rpx !important;
width: 100%;
height: 100%;
box-sizing: border-box;
@@ -199,12 +218,10 @@ onShow(() => {
}
::v-deep.listBox {
.uni-list {
background-color: #F8F8FF;
}
background-color: #F8F8FF;
.uni-list-item {
margin-bottom: 1rpx;
margin-bottom: 8rpx;
}
.uni-list-item__container {

View File

@@ -5,7 +5,7 @@
<view class="line title">
<p> {{ typeName + '单号' }}{{ detailInfo?.billNo }}</p>
<span :style="getColor(detailInfo?.billType)">
{{ getBillType(detailInfo?.billType,detailInfo?.status) }}
{{ getBillType(detailInfo?.billType, detailInfo?.status, flag) }}
</span>
</view>
@@ -44,7 +44,7 @@
import { getBillType, formatDate, getColor } from '../until'
import { computed, toRefs } from 'vue';
import MaterialList from './MaterialList.vue'
import { includes } from 'lodash';
const props = defineProps({
// 查询列表类型 stockIn:入库 stockOut出库
type: {
@@ -60,10 +60,8 @@ const props = defineProps({
})
const { type, detailInfo } = toRefs(props)
const typeName = computed(() => type.value == 'stockIn' ? '入库单' : '出库单')
console.log(detailInfo, 'detailInfo');
const typeName = computed(() => includes(type.value, 'stockIn') ? '入库单' : '出库单')
const flag = computed(() => includes(type.value, 'stockIn') ? 0 : 1)
</script>
<style scoped lang="scss">

View File

@@ -1,12 +1,12 @@
<template>
<!-- 物料列表 - 添加物料 -->
<view class="materialList">
<view class="remarkLine">
<text>物料列表</text>
<uv-button type="primary" v-if="isAddMaterial" :plain="true"
size="small" text="添加物料" @click="toMaterial"></uv-button>
<view v-if="isEdit == 5" class="flex align-center justify-between">
<uv-button type="primary" v-if="isAddMaterial" :plain="true" size="small" text="添加物料"
@click="toMaterial"></uv-button>
<view v-if="isShowRqCode" class="flex align-center justify-between">
<span class="f-12 mr-16 grey" style="font-size: 12px;" v-if="num > 0">
剩余<span style="color: red;">
{{ num }}
@@ -15,7 +15,7 @@
<uv-button type="primary" :plain="true" size="small" text="快速生成唯一码"
@click="toGenerateUniqueCodeQuickly"></uv-button>
</view>
<!-- <p class="btn-link" v-if="isEdit == 2" @click="toEdit">修改</p> -->
</view>
<!-- 物料列表-->
@@ -52,7 +52,7 @@
</view>
</view>
<!-- 库存状态 -->
<view class="flex justify-between mb-2 " v-if="isEdit == 3">
<view class="flex justify-between mb-2 " v-if="isEdit == 3 && isStockIn">
<p style="font-size: 13px;">
已入库
<span style="color:green">{{ getStockQuantity(item, 'complete') }}</span>
@@ -62,6 +62,16 @@
<span style="color:red">{{ getStockQuantity(item, 'remaining') }}</span>
</p>
</view>
<view class="flex justify-between mb-2 " v-if="isEdit == 3 && !isStockIn">
<p style="font-size: 13px;">
已出库
<span style="color:green">{{ getStockQuantity(item, 'complete') }}</span>
</p>
<p style="font-size: 13px;">
剩余
<span style="color:red">{{ getStockQuantity(item, 'remaining') }}</span>
</p>
</view>
<!-- 备注 -->
<view class="remark-row">
<uni-forms-item :name="`material[${idx}].remark`" label="备注:">
@@ -98,29 +108,39 @@
</template>
<script setup>
import { computed, onMounted, ref, toRefs } from 'vue';
import { assign, findIndex ,includes} from 'lodash';
import { computed, ref, toRefs } from 'vue';
import { assign, findIndex, includes } from 'lodash';
import { getStockQuantity, objectToQuery } from '../until';
import { getTypeParentNames } from '../warehousing/uniqueCode/until';
import { onLoad, onShow } from "@dcloudio/uni-app";
const OPERATE_CONFIG = {
// 唯一码创建 /唯一码编辑 /唯一码详情 /入库单开单
issueUniqueCode: {
toMaterialUrl: '/pages/warehousing/uniqueCode/issueUniqueCode/materialSelection',
title: '入库单开单'
},
// 入库单入库
stockIn: {
toMaterialUrl: '/pages/warehousing/uniqueCode/issueUniqueCode/index',
title: '入库单开单'
},
}
const props = defineProps({
formData: { type: Object, default: () => ({ material: [], remark: '' }), required: true },//物料信息
isEdit: { type: Boolean, default: true, required: true }, //编辑1 / 物料只读2 / 入库单只读3 /入库生成唯一码编辑4 /5数量不可编辑 备注可编辑
backStr: { type: String, default: '' }, //选择物料返回页面的标识
pathParams: { type: Object, default: {} }, //只读时传入对应的code、id
extendData: { type: Object, default: {} }, //其他额外参数
})
const { formData, isEdit, backStr, pathParams, extendData } = toRefs(props)
const { formData, isEdit, pathParams, extendData } = toRefs(props)
const keyType = computed(() => pathParams.value.type)
//是否为编辑状态
const edit = computed(() => {
if (`${isEdit.value}` === '1') return '1';
else if (`${isEdit.value}` === '4') return '4';
else return false;
})
const edit = computed(() => includes(['1', '4', '5'], `${isEdit.value}`))
// 显示添加物料按钮 isEdit编辑、
const isAddMaterial = computed(() => isEdit == 1 && pathParams.back != 'issueUniqueCode_inbound' && !includes(backStr.value,'stockOut'))
const isAddMaterial = computed(() => `${isEdit.value}` === '1' && keyType != 'issueUniqueCode_inbound' && !includes(keyType.value, 'stockOut'))
// 显示快速生成唯一码 isShowRqCode
const isShowRqCode = computed(() => `${isEdit.value}` === '5' && !includes(keyType.value, 'stockOut'))
const isStockIn = computed(() => includes(keyType.value, 'stockIn'))
// 删除:数据
const delItem = ref(null)
// 删除:开关
@@ -134,16 +154,15 @@ const modalRef = ref()
// 按钮:添加物料
const toMaterial = () => {
if (backStr.value == 'stockIn') { // 入库单开单 - 添加物料可选择手输入/无线液位计
if (keyType.value == 'stockIn') { // 入库单开单 - 添加物料可选择手输入/无线液位计
modalRef.value.open()
} else {
const path = objectToQuery({ ...pathParams.value, back: backStr?.value })
const path = objectToQuery(pathParams.value)
// 唯一码 - 编辑/新增
let url = '/pages/warehousing/uniqueCode/issueUniqueCode/materialSelection';
const value = uni.getStorageSync('app_material');
uni.setStorageSync('app_material', [{ ...value[0], uniqueCodeRemark: formData.value?.remark }]); // 将最新的唯一码备注写入缓存
uni.navigateTo({
url: `${url}${path}`
url: `${OPERATE_CONFIG.issueUniqueCode.toMaterialUrl}${path}`
})
}
}
@@ -151,9 +170,9 @@ const toMaterial = () => {
const toMaterialSelection = (type) => {
// 0无线液 1手动输入
let url = ''
const path = objectToQuery({ ...pathParams.value, back: backStr.value })
const path = objectToQuery(pathParams.value)
if (type === '1') {
url = '/pages/warehousing/uniqueCode/issueUniqueCode/materialSelection'
url = `${OPERATE_CONFIG.issueUniqueCode.toMaterialUrl}`
}
uni.navigateTo({
url: `${url}${path}`
@@ -161,9 +180,11 @@ const toMaterialSelection = (type) => {
}
// 快速生成唯一码 -
const toGenerateUniqueCodeQuickly = () => {
const path = objectToQuery({ ...pathParams.value, back: 'inbound' })
const path = objectToQuery(pathParams.value)
console.log(path, 'path==>');
uni.navigateTo({
url: `/pages/warehousing/uniqueCode/issueUniqueCode/index${path}`
url: `${OPERATE_CONFIG.stockIn.toMaterialUrl}${path}`
})
}
@@ -188,7 +209,8 @@ const dialogConfirm = () => {
const getMaterialList = () => {
const params = formData.value?.material?.map((i) => ({
const material = formData.value?.material || []
const params = material?.map((i) => ({
...i,
material: {
//? 这里的判断是为了区分 =详情带出的物料以及新增的物料 详情带出的物料有id以及materialId 新增物料id为物料id materialId无值

View File

@@ -1,10 +1,10 @@
<template>
<!-- 状态栏占位 -->
<view class="nav-placeholder" :style="{ height: navHeight + 'px' }"></view>
<!-- <view class="nav-placeholder" :style="{ height: 35 + 'px' }"></view> -->
<view class="navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="navbar" :style="{ height: navHeight + 'rpx' }">
<view class="left" @click="goBack">
<uni-icons type="left" size="18" />
<uni-icons type="left" size="18" v-if="showBack" />
</view>
<!-- 标题 -->
@@ -16,14 +16,14 @@
</view>
</view>
<view class="content"></view>
<!-- <view class="contentBox"></view> -->
</template>
<script setup>
import { ref, onMounted, toRefs } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getTabBarList } from '../until'
import { find, findIndex } from 'lodash'
import { findIndex } from 'lodash'
const props = defineProps({
title: {
@@ -54,9 +54,11 @@ const isTabBar = ref('')
onMounted(() => {
try {
const res = uni.getSystemInfoSync()
statusBarHeight.value = res.statusBarHeight || 0
console.log(statusBarHeight, 'statusBarHeight==>');
// 标准导航栏高度 44px + 状态栏 = 总高度
navHeight.value = statusBarHeight.value + 44
navHeight.value = statusBarHeight.value + 60
} catch (e) {
console.warn('获取系统信息失败', e)
}
@@ -66,6 +68,7 @@ onMounted(() => {
onLoad(() => {
const tabList = getTabBarList()
const isTabBarNav = findIndex(tabList, (i) => i.pagePath == backUrl.value) != -1
console.log(tabList, backUrl, isTabBarNav);
isTabBar.value = isTabBarNav
if (backUrl.value) {
@@ -101,7 +104,6 @@ const goBack = () => {
</script>
<style scoped lang="scss">
/* 导航栏占位:撑开页面内容,不被遮挡 */
.nav-placeholder {
width: 100%;
}
@@ -112,8 +114,6 @@ const goBack = () => {
top: 0;
left: 0;
width: 100%;
// 高度由 状态栏 + 44px 决定,不要写死 70px
height: 44px;
background: #fff;
display: flex;
align-items: center;
@@ -132,8 +132,9 @@ const goBack = () => {
}
.title {
font-size: 16rpx;
font-weight: bold;
font-size: 16px;
font-weight: 600;
text-align: center;
color: #333;
max-width: 400rpx;
overflow: hidden;

View File

@@ -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 {

View File

@@ -1,6 +1,6 @@
<!-- 获取仓库数据 -->
<template>
<view class="content">
<view>
<uv-form ref="formRef" class="form" :model="formData" label-width="150rpx">
<!-- 仓库 -->
<uv-form-item label="仓库" prop="warehouse">
@@ -70,8 +70,7 @@ onShow(() => {
// 点击事件:选择仓库/选择存储区
const onClick = (type) => {
uni.setStorageSync('app_billRemark', formData.value.remark)
let query = { ...pathParams.value, backStr: 'stockIn' }
let query = { ...pathParams.value }
if (type == 'warehouse') {
query = objectToQuery({ ...query, flag: 'warehousing' })
} else if (type == 'storageArea') {

View File

@@ -1,6 +1,6 @@
<!-- 底部导航栏首页 -->
<template>
<view class="content">
<view class="contentBox">
首页
</view>
</template>

View File

@@ -1,6 +1,6 @@
<!-- 底部导航栏智能 -->
<template>
<view class="content">
<view class="contentBox">
智能
</view>
</template>

View File

@@ -1,6 +1,6 @@
<!-- 底部导航栏我的 -->
<template>
<view class="content">
<view class="contentBox">
<view class="userInfo">
<uv-image src="../../static/avatar.png" width="120rpx" height="120rpx" shape="circle" />

View File

@@ -5,20 +5,12 @@ import numeral from "numeral";
const billTypeMenu = [
{
value: "0",
label: "入库单已提交",
label: "已提交",
},
{
value: "1",
label: "已完成",
},
{
value: "2",
label: "出库单已提交",
},
{
value: "3",
label: "已完成",
},
{
value: "4",
label: "已取消",
@@ -29,7 +21,7 @@ const billTypeMenu = [
const billStatueMenu = [
{
value: "0",
label: "库单已提交",
label: "库单已提交",
},
{
value: "1",
@@ -37,7 +29,7 @@ const billStatueMenu = [
},
{
value: "2",
label: "物料部分入库",
label: "物料部分",
},
];
// 物料状态
@@ -51,15 +43,41 @@ const materialType = [
label: "已提交",
},
];
/**
* 获取入库/出库单状态展示文本
* @param {any} val - 状态
* @param {string|number} status - 物料状态
* @param {number} flag - 1=出库 0=入库
* @returns {string} 状态文本
*/
export const getBillType = (val, status, flag) => {
const valStr = String(val);
const statusStr = String(status);
// 入/出库单状态的label
export const getBillType = (val, status) => {
if (val === "0") {
return billStatueMenu.find((i) => i.value == `${status}`)?.label;
if (valStr === "0") {
const statusItem = billStatueMenu.find((item) => item.value === statusStr);
if (!statusItem) return "";
const isOut = flag === 1;
const stateVal = statusItem.value;
// 状态 0前缀拼接 入/出
if (stateVal === "0") {
return isOut ? "出" + statusItem.label : "入" + statusItem.label;
}
// 状态 2后缀拼接 入库/出库
if (stateVal === "2") {
return isOut ? statusItem.label + "出库" : statusItem.label + "入库";
}
// 其他状态直接返回
return statusItem.label;
}
return billTypeMenu.find((i) => i.value == `${val}`)?.label;
};
// 非0走普通单据类型菜单
return billTypeMenu.find((item) => item.value === valStr)?.label || "";
};
// 获取出入库单的状态以及tag颜色
export const getColor = (val) => {
@@ -101,7 +119,6 @@ export const getStockQuantity = (item, type) => {
}
};
// 清楚缓存 - 将所有需要清楚的缓存写入此处不要写登录信息
export const removeStorage = () => {
uni.removeStorageSync("app_warehousing");
@@ -124,8 +141,28 @@ export const objectToQuery = (params) => {
// 获取配置的导航路由
export const getTabBarList = () => {
// 1. 从 uni-app 全局配置中读取 tabBar
const tabBarConfig = __uniConfig.tabBar || {}
const tabBarConfig = __uniConfig.tabBar || {};
// 2. 获取 list 数组
const tabList = tabBarConfig.list || []
return tabList
}
const tabList = tabBarConfig.list || [];
return tabList;
};
// ======================
// 工具函数blobUrl 转 可上传的临时文件路径
// ======================
export function blobToTempFilePath(blobUrl) {
return new Promise((resolve, reject) => {
// 1. 下载 blob 数据
uni.downloadFile({
url: blobUrl,
success: (res) => {
if (res.statusCode === 200) {
resolve(res.tempFilePath);
} else {
reject("下载失败");
}
},
fail: reject,
});
});
}

View File

@@ -5,19 +5,25 @@
<view class="right-btn flex align-center justify-center ">
<uv-image @click="onPrinter" src="../../../../static/printer.png" width="20px" height="20px"
style="margin-top:10rpx" />
<uv-image @click="onEdit" src="../../../../static/edit.png" class="ml-24" width="20px" height="20px"
style="margin-top:10rpx" />
<uv-image @click="toEditOrAway('2')" src="../../../../static/edit.png" class="ml-24" width="20px"
height="20px" style="margin-top:10rpx" />
</view>
</template>
</navigation>
<!-- 详情信息 -->
<detail-info type="stockIn" :detailInfo="detailInfo" />
<view class="contentBox">
<!-- 详情信息 -->
<detail-info :type="pathParams.value?.type" :detailInfo="detailInfo" />
<view v-if="detailInfo?.billType == '0'"
:class="getBillType(detailInfo?.billType, detailInfo?.status) != '物料部分入库' ? 'bottom' : 'bottom1'">
<uv-button type="error" v-if="getBillType(detailInfo?.billType, detailInfo?.status) != '物料部分入库'" text="作废"
@click="toObsolete"></uv-button>
<uv-button type="primary" text="入库单入库" @click="toPutAway"></uv-button>
<!-- 底部按钮 -->
<view v-if="detailInfo?.billType == '0' && !flag"
:class="getBillType(detailInfo?.billType, detailInfo?.status) != '物料部分入库' ? 'bottom' : 'bottom1'">
<uv-button type="error" v-if="getBillType(detailInfo?.billType, detailInfo?.status, flag) != '物料部分入库'"
text="作废" @click="toObsolete"></uv-button>
<uv-button type="primary" text="入库单入库" @click="toEditOrAway('1')"></uv-button>
</view>
<view v-if="detailInfo?.billType == '0' && flag" class="bottom1">
<uv-button type="primary" text="出库单出库" @click="toEditOrAway('1')"></uv-button>
</view>
</view>
</template>
<script setup>
@@ -25,101 +31,139 @@ import _ from 'lodash';
import { ref, computed } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import { objectToQuery, getBillType } from '../../../until';
import { stockInDetail, inboundBillVoid } from '../../../../api/stockIn';
import { stockOutDetail } from '@/api/stockOut';
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('')
// 数据:详情
const detailInfo = ref('')
// 数据:类型 stockIn:入库 stockIn-putAway入库单入库 stockOut出库
const type = computed(() => pathParams.value.type)
// 方法:获取详情 - 将isDelete写入
const getDetailInfo = () => {
stockInDetail({ billNo: pathParams.value.billNo }).then((res) => {
detailInfo.value = res.data
})
// type
const OPERATE_CONFIG = {
// url:入库/出库 地址 back导航栏返回地址 editUrl编辑地址
stockIn: {// 入库单开单
type: 'stockIn',
url: '/pages/warehousing/stockOut/components/outAway',
back: '/pages/warehousing/stockIn/my',
editUrl: '/pages/warehousing/stockIn/create',
},
stockIn_inbound: { // 入库单入库
type: 'stockIn_inbound',
url: '/pages/warehousing/stockIn/components/inbound',
back: '/pages/warehousing/stockIn/putAway',
editUrl: '/pages/warehousing/stockIn/create',
},
stockOut: { // 出库单开单
type: 'stockOut',
url: '/pages/warehousing/stockOut/components/outAway',
back: '/pages/warehousing/stockOut/my',
editUrl: '/pages/warehousing/stockOut/create',
},
stockOut_outAway: { // 出库单入库
type: 'stockOut_outAway',
url: '/pages/warehousing/stockOut/components/outAway',
back: '/pages/warehousing/stockOut/outbound',
editUrl: '/pages/warehousing/stockOut/create',
},
}
const flag = computed(() => _.includes(pathParams.value.type, 'stockIn') ? 0 : 1)
// 打印
const onPrinter = () => {
const onPrinter = () => { }
// 获取详情 - 将isDelete写入
const getDetailInfo = () => {
if (flag.value == 1) {
stockOutDetail({ billNo: pathParams.value.billNo }).then((res) => {
detailInfo.value = res.data
})
} else {
stockInDetail({ billNo: pathParams.value.billNo }).then((res) => {
detailInfo.value = res.data
})
}
}
const toObsolete = () => {
const params = {
inboundBillVoid({
billNo: pathParams.value?.billNo,
billType: '5'
}
inboundBillVoid(params).then((res) => {
// /pages/warehousing/stockIn/my
}).then((res) => {
uni.navigateTo({
url: `/pages/warehousing/stockIn/my`
});
})
}
/**
* 详情信息存入本地缓存
* @param {any} type - 类型标识,控制物料存储逻辑
*/
const setDetailInfoToStorage = (type) => {
const data = detailInfo.value || {}
// 仓库信息
uni.setStorageSync('app_warehousing', [{
deptName: detailInfo.value?.warehouseName,
deptCode: detailInfo.value?.warehouseCode,
deptName: data.warehouseName || '',
deptCode: data.warehouseCode || ''
}])
// 库区信息
uni.setStorageSync('app_storageArea', [{
deptName: detailInfo.value?.areaName,
deptCode: detailInfo.value?.areaCode,
deptName: data.areaName || '',
deptCode: data.areaCode || ''
}])
if (type) {
const material = _.filter(detailInfo.value?.itemList, (i) => i?.uniqueCode && i.status == '0')
const materialSelectList = _.filter(detailInfo.value?.itemList, (i) => !i?.uniqueCode && i.status == '0')
// 单据备注
uni.setStorageSync('app_billRemark', data.billRemark || '')
// 物料列表
const itemList = data.itemList || []
if (!type) {
// 无 type筛选出状态=0 的数据,分两组
const material = _.filter(itemList, i => i?.uniqueCode && i.status === '0')
const materialSelectList = _.filter(itemList, i => !i?.uniqueCode && i.status === '0')
uni.setStorageSync('app_material', material)
uni.setStorageSync('app_material_select_list', materialSelectList)
} else {
uni.setStorageSync('app_material', detailInfo.value?.itemList)
// 有 type直接存储全部 itemList
uni.setStorageSync('app_material', itemList)
}
uni.setStorageSync('app_billRemark', detailInfo.value?.billRemark,)
}
// 按钮:入库单入库
const toPutAway = () => {
setDetailInfoToStorage('1')
const query = objectToQuery(pathParams.value)
uni.navigateTo({
url: `/pages/warehousing/stockIn/components/inbound${query}`
});
}
// 编辑
const onEdit = () => {
setDetailInfoToStorage()
const query = objectToQuery(pathParams.value)
let url = `/pages/warehousing/stockIn/create${query}`
uni.navigateTo({
url: url
});
}
// 接收路径参数billNo
/**
* 路径跳转操作 入库、出库、编辑
* @param {any} type - 类型标识1 出入库操作 2 编辑
*/
const toEditOrAway = (key) => {
const config = flag.value ? OPERATE_CONFIG.stockOut_outAway : OPERATE_CONFIG.stockIn_inbound; // 获取配置flag 区分入库/出库)
console.log(config, 'config===>');
const queryParams = { ...pathParams.value, type: config.type } // 拼接路径参数
const queryStr = objectToQuery(queryParams)
const targetUrl = key === '1' ? config.url : config.editUrl // 区分跳转:操作 / 编辑
setDetailInfoToStorage(key === '1' ? flag.value : undefined)// 存储数据
uni.navigateTo({
url: targetUrl + queryStr
}).catch(err => {
console.error('页面跳转失败:', err)
})
}
// 接收路径参数
onLoad((options) => {
if (!options.billNo) {
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
const query = objectToQuery(pathParams.value)
backUrl.value = OPERATE_CONFIG?.[pathParams.value.type]?.back + `${query}`
getDetailInfo()
})
</script>
<style scoped lang="scss">
/* 底部按钮 */
// 底部按钮
.bottom {
position: fixed;

View File

@@ -2,12 +2,11 @@
<template>
<view class="page">
<navigation title="入库" :back-url="backUrl"></navigation>
<!-- 仓库信息 - 仓库存储区 -->
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo" :pathParams="pathParams" />
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo"
:pathParams="{ ...pathParams, back: 'stockIn' }" />
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" isEdit="5" backStr="stockIn" :pathParams="pathParams"
:extendData="{ selectMaterialList }" />
<material-list ref="materialRef" :formData="formData" isEdit="5" :pathParams="pathParams":extendData="{ selectMaterialList }" />
<!-- 底部操作栏 -->
<view class="bottom">
<uv-button type="primary" @click="submitForm">入库</uv-button>
@@ -16,32 +15,25 @@
</template>
<script setup>
import _ from 'lodash';
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import { objectToQuery } from '../../../until';
import { inboundFinish, stockInDetail } from '@/api/stockIn';
import Navigation from '../../../components/Navigation.vue';
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';
// stockIn-putAway入库单入库编辑
const backUrl = ref('')
// 数据:路径参数
const pathParams = ref('')
// 标志:是否为编辑
const isEdit = ref('')
// 标志:区分页面 进入页面的状态 null新建 stockIn:入库编辑 stockIn-putAway入库单入库编辑
const flag = ref('')
// ref物料绑定
const materialRef = ref([])
// ref仓库信息绑定
const warehousingInfoRef = ref([])
// ref:选中的物料
const selectMaterialList = ref([])
const detailInfo = ref('')
// 数据:物料列表
const formData = ref([{ remark: '', material: [] }])
// 数据:仓库信息
@@ -69,7 +61,6 @@ const getMaterialList = () => {
}
// 方法:获取详情 - 更新物料得值 获取唯一码后回来
const getDetailInfo = () => {
stockInDetail({ billNo: pathParams.value.billNo }).then((res) => {
@@ -102,32 +93,27 @@ const submitForm = () => {
billRemark: info.remark,
itemList: _.map(_materialInfo, (i) => ({ ...i.material }))
}
try {
inboundFinish(params).then((res) => {
uni.navigateTo({ url: backUrl.value });
})
} catch (err) {
console.log('入库单入库失败==》', err);
}
inboundFinish(params).then((res) => {
// stockIn
// /pages/warehousing/stockIn/components/detail
uni.navigateTo({
url: backUrl.value
});
console.log(res, '入库单入库');
})
}
// 数据:路径参数
onLoad((options) => {
console.log(options, 'options', _.includes(options?.type, 'stockIn'));
if (!options.billNo) {
uni.showToast({ title: '参数错误,无唯一码ID', icon: 'none' })
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')
})
onMounted(() => {

View File

@@ -1,8 +1,9 @@
<template>
<view class="page">
<navigation :title="title" :back-url="backUrl"></navigation>
<navigation :title="title" :back-url="backUrl"></navigation>
<view class="contentBox">
<!-- 仓库信息 - 仓库存储区 -->
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo" :pathParams="pathParams" />
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo"
:pathParams="{ ...pathParams, type: 'stockIn' }" />
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" isEdit="1" backStr="stockIn" :pathParams="pathParams" />
<!-- 底部操作栏 -->
@@ -24,18 +25,26 @@ import { getMaterialUnique } from '@/api/uniqueCode';
import MaterialList from '../../components/MaterialList.vue';
import WarehousingInfo from '../../components/WarehousingInfo.vue';
import Navigation from '../../components/Navigation.vue';
import { includes } from 'lodash';
const OPERATE_CONFIG = {
// 创建
list: {
back: 'pages/warehousing/index',
title: '入库单开单'
},
// 编辑/入库
stockIn: {
back: '/pages/warehousing/stockIn/components/detail',
title: ''
}
}
// 数据:路径参数
const pathParams = ref('')
// 标志:是否为编辑
const isEdit = ref('')
// 标志:区分页面 进入页面的状态 null新建 stockIn:入库编辑 stockIn-putAway入库单入库编辑
const flag = ref('')
// ref标题
const title = ref('入库单开单')
const backUrl = ref('pages/warehousing/index')
const title = ref('')
const backUrl = ref('')
// ref物料绑定
const materialRef = ref([])
@@ -49,20 +58,19 @@ const warehouseInfo = ref({ warehousing: {}, storageArea: {}, remark: '' })
// 数据:获取缓存信息
const getMaterialList = () => {
// 获取仓库信息
// 仓库信息
const warehouse = uni.getStorageSync('app_warehousing');
warehouseInfo.value.warehousing = warehouse
// 获取存储区信息
// 存储区信息
const storageArea = uni.getStorageSync('app_storageArea');
warehouseInfo.value.storageArea = storageArea
// 获取物料信息
// 物料信息
const material = uni.getStorageSync('app_material');
formData.value.material = material
// 获取入库单备注
// 入库单备注
const billRemark = uni.getStorageSync('app_billRemark');
warehouseInfo.value.remark = billRemark
}
@@ -128,65 +136,56 @@ const submitForm = () => {
billRemark: info.remark,
itemList: _.map(materialInfo, (i) => ({ ...i.material }))
}
console.log(params, isEdit, !isEdit, info, materialInfo, '入参params');
// 新建
if (!isEdit.value) {
addStockIn(params).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '入库单创建成功',
mask: true,
icon: 'success',
})
uni.navigateTo({
url: `/pages/warehousing/stockIn/my`,
});
}
})
} else if (isEdit.value) {
// 编辑
params.billNo = pathParams.value?.billNo
params.billId = pathParams.value?.billId
const query = objectToQuery(pathParams.value)
stockInUpdate(params).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '入库单编辑成功',
mask: true,
icon: 'success',
})
let url = `/pages/warehousing/stockIn/components/detail${query}`
uni.navigateTo({
url: url,
});
}
})
try {
if (!isEdit.value) {
// 新增
addStockIn(params).then((res) => {
if (res.code == 200) {
uni.showToast({ title: '入库单创建成功', icon: 'success', mask: true })
uni.navigateTo({ url: OPERATE_CONFIG.list.back })
}
})
} else {
// 编辑
params.billNo = pathParams.value?.billNo;
params.billId = pathParams.value?.billId;
const queryStr = objectToQuery(pathParams.value)
stockInUpdate(params).then((res) => {
if (res.code == 200) {
uni.showToast({ title: '入库单编辑成功', icon: 'success', mask: true })
uni.navigateTo({ url: OPERATE_CONFIG.stockIn.back + queryStr })
}
})
}
} catch (err) {
console.error('提交失败:', err)
uni.showToast({ title: '提交失败', icon: 'none' })
}
}
// 数据:路径参数
onLoad((options) => {
console.log(options, 'options', _.includes(options?.type, 'stockIn'));
pathParams.value = options
flag.value = options.type
isEdit.value = _.includes(options?.type, 'stockIn')
})
// 修改标题若有billNo传入 修改标题
onShow(() => {
const query = objectToQuery(pathParams.value)
if (pathParams.value.billNo) {
title.value = pathParams.value.billNo
}
if ( includes(pathParams.value.type,'stockIn') ) {
backUrl.value = `/pages/warehousing/stockIn/components/detail${query}`
console.log('options==>', options);
// 若有billNo传入 修改标题且为编辑 stockIn:入库编辑 stockIn-putAway入库单入库编辑
if (options?.billNo) {
const query = objectToQuery(options)
title.value = options.billNo
backUrl.value = OPERATE_CONFIG.stockIn.back + query;
isEdit.value = true
} else {
isEdit.value = false
title.value = OPERATE_CONFIG.list.title;
backUrl.value = OPERATE_CONFIG.list.back;
}
})
</script>
<style lang="scss" scoped>
.page {
.contentBox {
background: #f5f5f5;
min-height: 100vh;
}

View File

@@ -0,0 +1,170 @@
<!-- 选择 -->
<template>
<navigation title="我提交的技术鉴定表" :back-url="backUrl"></navigation>
<view class="contentBox">
<view class="topSearch">
<uni-easyinput type="text" v-model="queryParams.keyword" prefixIcon="search" :inputBorder="false"
@iconClick="getTechnicalList" placeholder="请输入搜索内容" />
</view>
<!-- 列表 -->
<z-paging ref="pagingRef" class="containerBox" v-model="infoList" @query="getTechnicalList">
<uni-list class="listBox">
<uni-list-item v-for="item in infoList" :key="item.id" clickable @click="onChecked(item)">
<template v-slot:body>
<view style="display: flex; flex-direction: column; width: 100%;">
<view class="line title">
<p>技术鉴定表</p>
<p>{{ item?.appraisalNo }}</p>
</view>
<view class="line content">
<uv-upload :fileList="item?.fileUrlList" name="3" multiple :maxCount="6"
:previewFullImage="true"></uv-upload>
</view>
<view class="line content">
<p>备注</p>
<p>
<span v-if="item?.appraisalDesc">{{ item?.appraisalDesc }}</span>
<span v-else class="empty">未填写</span>
</p>
</view>
<view class="line content">
<p>创建时间</p>
<view>{{ formatDate(item?.createTime) }}</view>
</view>
</view>
</template>
</uni-list-item>
</uni-list>
</z-paging>
</view>
</template>
<script setup>
import { ref, toRefs } from 'vue';
import { onShow, onLoad } from "@dcloudio/uni-app";
import { myList } from '@/api/stockOut';
import { formatDate, objectToQuery } from '../../../until';
import Navigation from '../../../components/Navigation.vue';
const props = defineProps({
pathParams: {
type: Object,
default: null,
required: false
}
})
const { pathParams } = toRefs(props)
// 数据:查询关键字
const queryParams = ref({
keyword: ''
})
// 数据:返回路径
const backUrl = ref('')
// 绑定:加载屏
const pagingRef = ref(null)
// 数据
const infoList = ref([])
// 选中技术鉴定表
const onChecked = (item) => {
if (item.appraisalNo) {
uni.setStorageSync('app_technical', item);
uni.navigateTo({
url: backUrl.value
});
}
}
// 列表
const getTechnicalList = (pageNo, pageSize) => {
queryParams.value.pageNum = pageNo
myList(queryParams.value).then(res => {
res.rows.forEach(e => {
e.showMore = false;
});
infoList.value = res.rows
pagingRef.value.complete(res.rows)
}).catch(res => {
pagingRef.value.complete(false)
})
}
// 数据:路径参数
onLoad((options) => {
pathParams.value = options
const query = objectToQuery(options)
backUrl.value = `/pages/warehousing/stockOut/components/technicalEvaluation${query}`
})
onShow(() => {
pagingRef.value?.reload?.()
})
const onDownLoad = () => {
}
</script>
<style scoped lang="scss">
.topSearch {
position: fixed;
top: 65rpx;
left: 0;
right: 0;
z-index: 999;
padding: 4rpx;
background-color: #fff;
border-bottom: 1px solid #eee;
box-sizing: border-box;
}
.containerBox {
padding-top: 125rpx !important;
width: 100%;
height: 100%;
box-sizing: border-box;
.zp-l-text-rpx {
font-size: 12px;
}
}
::v-deep.listBox {
.uni-list {
background-color: #F8F8FF;
}
.uv-upload {
flex: none !important;
}
.uni-list-item {
margin-bottom: 1rpx;
}
.uni-list-item__container {
padding: 0;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
padding: 12rpx;
}
.title {
font-weight: 600;
font-size: 14px;
}
.content {
font-weight: 500;
font-size: 13px;
}
.empty {
color: #D3D3D3;
}
}
</style>

View File

@@ -0,0 +1,204 @@
<!--点击出库单出库后的出库页面 -->
<template>
<navigation title="出库" :back-url="backUrl"></navigation>
<view class="contentBox">
<!-- 技术鉴定表 -->
<uv-form ref="formRef" class="form" :model="technicalEvaluationList" label-width="150rpx">
<uv-form-item label="技术鉴定表" prop="fileList" @click="toTechnical">
<u-cell>
<view slot="title" class="u-slot-title">
<text class="u-cell-text" v-if="technicalEvaluationList">
{{ technicalEvaluationList?.appraisalNo }}
</text>
<text class="placeholder" v-else> 请添加技术鉴定表</text>
<uni-icons type="right" size="10" />
</view>
</u-cell>
</uv-form-item>
</uv-form>
<!-- 仓库信息 - 仓库存储区 -->
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo"
:pathParams="{ ...pathParams, back: 'stockOut' }" />
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" isEdit="5" backStr="stockOut" :pathParams="pathParams" />
<!-- 底部操作栏 -->
<view class="bottom">
<uv-button type="primary" @click="submitForm">出库</uv-button>
</view>
</view>
</template>
<script setup>
import _ from 'lodash';
import { ref } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import { outBoundFinish } from '@/api/stockOut';
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('')
// ref物料绑定
const materialRef = ref([])
// ref仓库信息绑定
const warehousingInfoRef = ref([])
// 数据:物料列表
const formData = ref([{ remark: '', material: [] }])
// 数据:仓库信息
const warehouseInfo = ref({ warehousing: {}, storageArea: {}, remark: '' })
// 技术鉴定表
const technicalEvaluationList = ref({
appraisalNo: '',
fileList: [],
remark:''
})
// 数据:获取缓存信息
const getMaterialList = () => {
// 获取仓库信息
const warehouse = uni.getStorageSync('app_warehousing');
warehouseInfo.value.warehousing = warehouse
// 获取存储区信息
const storageArea = uni.getStorageSync('app_storageArea');
warehouseInfo.value.storageArea = storageArea
// 获取出库单备注
const billRemark = uni.getStorageSync('app_billRemark');
warehouseInfo.value.remark = billRemark
// 获取技术鉴定表数据
const list = uni.getStorageSync('app_technical');
technicalEvaluationList.value.appraisalNo = list.appraisalNo
// 获取物料信息 - 有uniqueCode
const material = uni.getStorageSync('app_material');
formData.value.material = material
}
// 出库:提交表单
const submitForm = () => {
const info = warehousingInfoRef.value.getWarehousingInfo()
const materialInfo = materialRef.value.getMaterialList()
// 过滤出已删除的物料
const _materialInfo = _.filter(materialInfo, { isDelete: '0' })
let params = {
billType: '1',//0出库申请 1出库成功 2出库申请 3出库成功 4出库单已作废 5出库单已作废
billNo: pathParams.value.billNo,
warehouseCode: info.warehousing?.[0].deptCode || info.warehousing?.[0].deptId,
warehouseName: info.warehousing?.[0].deptName,
areaCode: info.storageArea?.[0].deptCode || info.storageArea?.[0].deptId,
areaName: info.storageArea?.[0].deptName,
remark: info.remark,
billRemark: info.remark,
itemList: _.map(_materialInfo, (i) => ({ ...i.material }))
}
outBoundFinish(params).then((res) => {
// /pages/warehousing/stockOut/components/detail
uni.navigateTo({
url: backUrl.value
});
console.log(res, '出库单出库');
})
}
// 数据:路径参数
onLoad((options) => {
console.log(options, 'options', _.includes(options?.type, 'stockOut'));
if (!options.billNo) {
uni.showToast({ title: '参数错误,无唯一码ID', icon: 'none' })
return
}
pathParams.value = options
// stockOut-putAway
// stockOut
const query = objectToQuery(pathParams.value)
backUrl.value = `/pages/warehousing/stockIn/components/detail${query}`
})
onMounted(() => {
getMaterialList()
})
const toTechnical = () => {
const query = objectToQuery(pathParams.value)
uni.navigateTo({
url: `/pages/warehousing/stockOut/components/technicalEvaluation${query}`
})
}
</script>
<style lang="scss" scoped>
.page {
background: #f5f5f5;
min-height: 100vh;
}
/* 底部按钮 */
::v-deep .bottom {
position: fixed;
bottom: 0;
height: 60rpx;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
.uv-button-wrapper {
width: 100%;
border-radius: 0;
}
}
::v-deep .form {
// background-color: #fff;
padding: 0;
.uv-input__content {
.uv-input__content__field-wrapper__field {
text-align: right !important;
}
}
.uv-form-item__body {
background-color: #fff;
padding: 12rpx;
margin-bottom: 2rpx;
align-items: center;
}
.uv-form-item__body__left__content__label {
font-size: 14px;
}
.uv-line {
border-bottom: 0 !important;
}
.uv-form-item__body__right__content__slot {
justify-content: flex-end;
align-items: center;
}
.uv-cell__body {
padding: 0
}
.uni-icons {
display: block;
}
.u-slot-title {
display: flex;
align-items: center;
}
}
</style>

View File

@@ -0,0 +1,145 @@
<template>
<navigation title="技术鉴定表详情" :back-url="backUrl">
<template #right>
<my-link @click="toMyTechnicalList" style="font-size: 14px;">我的</my-link>
</template>
</navigation>
<view class="contentBox">
<uv-form labelPosition="top" :model="formModel" class="technicalForm" ref="technicalEvaluationRef"
labelWidth="auto">
<uv-form-item label="技术鉴定表" prop="fileList" style="margin-top: 16rpx;">
<uv-upload :fileList="formModel?.fileList" name="1" multiple :maxCount="6" @afterRead="afterRead"
@delete="deleteImg" :previewFullImage="true"></uv-upload>
</uv-form-item>
<uv-form-item label="技术鉴定表备注说明" prop="remark" style="margin-top: 16rpx;">
<uv-textarea v-model="formModel.remark" placeholder="请输入技术鉴定表备注说明..." border="none"></uv-textarea>
</uv-form-item>
</uv-form>
<view class="bottom">
<uv-button type="primary" @click="submitForm">提交信息</uv-button>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import { objectToQuery } from '../../../until';
import Navigation from '../../../components/Navigation.vue';
import { uploadTechnicalFile, addWithFiles } from '@/api/stockOut'
import _ from 'lodash';
const queryParams = ref('')
const formModel = ref({
billNo: null,
remark: '',
fileList: [],
})
const backUrl = ref('')
const afterRead = async (event) => {
// scene = outbound
// bizType = technical_appraisal
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
console.log(event, '上传')
let files = event.file?.map(file => file.url);
// console.log('files', files);
let formData = {
scene: 'OUTBOUND',
bizType: 'TECHNICAL_APPRAISAL',
}
// files = files.map(p => ({ name: "files", uri: p }))
uploadTechnicalFile(files, formData).then(res => {
const some = _.some(res, { success: false })
console.log(some,'上传接口调取成功', res)
if (some) return;
if (!formModel.value.fileList || formModel.value.fileList.length == 0) {
formModel.value.fileList = []
}
res?.data?.fileUrlList.forEach(item => {
formModel.value.fileList.push({ url: item?.url, name: item?.name, scene: 'OUTBOUND', bizType: 'TECHNICAL_APPRAISAL' })
})
})
}
// 删除图片
const deleteImg = (index, type) => {
formModel.value.fileList?.splice(index, 1)
}
// 提交
const submitForm = () => {
console.log(formModel, 'formModel==>');
addWithFiles({ ...formModel.value, billNo: queryParams.value.billNo }).then((res) => {
if (res.code == 200) {
console.log(res.data);
}
})
}
// 数据:路径参数
onLoad((options) => {
const query = objectToQuery(options)
queryParams.value = options
backUrl.value = `/pages/warehousing/stockOut/components/outAway${query}`
})
const toMyTechnicalList = () => {
console.log('1111111111');
const query = objectToQuery(queryParams.value)
uni.navigateTo({
url: `/pages/warehousing/stockOut/components/myTechnicalEvaluation${query}`
});
}
// 获取技术鉴定编数据
const getTechnicalList = () => {
const list = uni.getStorageSync('app_technical');
formModel.value.fileList = list?.fileList
formModel.value.remark = list?.remark
}
getTechnicalList()
</script>
<style scoped lang="scss">
::v-deep.technicalForm {
.uv-form-item {
background-color: #fff;
padding: 0 24rpx;
}
.uv-form-item__body__left__content__label {
margin-bottom: 8px;
}
.uv-form-item__body {
background-color: #fff;
padding: 12rpx;
margin-bottom: 2rpx;
}
.uv-textarea {
padding: 0;
}
}
/* 底部按钮 */
::v-deep .bottom {
position: fixed;
bottom: 0;
height: 60rpx;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
.uv-button-wrapper {
width: 100%;
border-radius: 0;
}
.uv-button--info {
background-color: #07c160;
color: #fff;
}
}
</style>

View File

@@ -1,10 +1,12 @@
<template>
<view class="page">
<navigation :title="title" :back-url="backUrl"></navigation>
<navigation :title="title" :back-url="backUrl"></navigation>
<view class="contentBox">
<!-- 仓库信息 - 仓库存储区 -->
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo" :pathParams="pathParams" />
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo"
:pathParams="{ ...pathParams, type: 'stockOut' }" />
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" isEdit="1" backStr="stockOut" :pathParams="pathParams" />
<material-list ref="materialRef" :formData="formData" :isEdit="flag == 'stockOut' ? 5 : 1"
:pathParams="{...pathParams.value, type: 'stockOut' }" />
<!-- 底部操作栏 -->
<view class="bottom">
<uv-button @click="scanCode">扫码添加</uv-button>
@@ -17,10 +19,10 @@
import _ from 'lodash';
import { ref } from 'vue';
import { objectToQuery } from '../../until';
import { objectToQuery, removeStorage } from '../../until';
import { onLoad, onShow } from "@dcloudio/uni-app";
import { addStockIn, stockInUpdate } from '@/api/stockIn';
import { getMaterialUnique } from '@/api/uniqueCode';
import { addStockOut, stockOutUpdate } from '@/api/stockOut';
import { getMaterialByQrCodeInfo } from '@/api/uniqueCode';
import MaterialList from '../../components/MaterialList.vue';
import WarehousingInfo from '../../components/WarehousingInfo.vue';
import Navigation from '../../components/Navigation.vue';
@@ -30,12 +32,14 @@ import { includes } from 'lodash';
const pathParams = ref('')
// 标志:是否为编辑
const isEdit = ref('')
// 标志:区分页面 进入页面的状态 null新建 stockIn:入库编辑 stockIn-putAway库单库编辑
// 标志:区分页面 进入页面的状态 null新建 stockOut:出库编辑 stockOut-putAway库单库编辑
const flag = ref('')
// ref标题
const title = ref('库单开单')
const title = ref('库单开单')
const backUrl = ref('pages/warehousing/index')
//ref:已经扫过的code
const existList = ref([])
// ref物料绑定
const materialRef = ref([])
@@ -49,7 +53,6 @@ const warehouseInfo = ref({ warehousing: {}, storageArea: {}, remark: '' })
// 数据:获取缓存信息
const getMaterialList = () => {
// 获取仓库信息
const warehouse = uni.getStorageSync('app_warehousing');
warehouseInfo.value.warehousing = warehouse
@@ -62,44 +65,53 @@ const getMaterialList = () => {
const material = uni.getStorageSync('app_material');
formData.value.material = material
// 获取库单备注
// 获取库单备注
const billRemark = uni.getStorageSync('app_billRemark');
warehouseInfo.value.remark = billRemark
}
getMaterialList();
const scanResult = ref('')
// 扫码添加
const scanCode = () => {
// 先校验是否支持扫码
uni.scanCode({
scanType: ['qrCode', 'barCode'], // 支持二维码 + 条形码
success: (res) => {
scanResult.value = res.result;
console.log('二维码code====>', res.result);
const idx = includes(existList, res.result)
if (idx) {
uni.showToast({
title: '该物料已添加,请勿重复添加!',
mask: true,
icon: 'none',
})
return
}
if (res.result) {
getMaterialUnique({ code: res.result }).then((response) => {
console.log('物料内容:', response);
getMaterialByQrCodeInfo({ code: res.result, existList: existList.value }).then((response) => {
console.log('物料内容====>', response);
if (`${response.code}` === '200') {
const material = uni.getStorageSync('app_material');
// 处理物料信息 合并
const materialInfo = _.filter(material, { isDelete: '0' });
console.log('materialInfo', materialInfo);
console.log('materialInfo====>', materialInfo);
const materialId = response.data?.[0]?.materialId;
console.log('materialId', materialId);
const idx = _.findIndex(materialInfo, (i) => i.materialId ? i.materialId == materialId : i.id == materialId);
console.log('已选中是否有重复数据', idx);
console.log('materialId====>', materialId);
// const idx = _.findIndex(materialInfo, (i) => i.materialId ? i.materialId == materialId : i.id == materialId);
// console.log('已选中是否有重复数据====>', idx);
if (idx != -1) {
uni.showToast({
title: '该物料已添加,请勿重复添加!',
mask: true,
icon: 'none',
})
} else {
let _material = [...materialInfo, { ...response.data[0], uniqueCode: res.result }]
console.log('新的物料数组', _material);
formData.value.material = _material
uni.setStorageSync('app_material', formData.value.material)
}
// if (idx != -1) {
// uni.showToast({
// title: '该物料已添加,请勿重复添加!',
// mask: true,
// icon: 'none',
// })
// } else {
let _material = [...materialInfo, { ...response.data[0], uniqueCode: res.result }]
console.log('新的物料数组====>', _material);
formData.value.material = _material
uni.setStorageSync('app_material', formData.value.material)
existList.value.push(res.result)
// }
} else {
console.log(response.code, 'response.code');
}
@@ -118,7 +130,9 @@ const scanCode = () => {
const submitForm = () => {
const info = warehousingInfoRef.value.getWarehousingInfo()
const materialInfo = materialRef.value.getMaterialList()
if (!info.warehousing?.[0].deptCode) {
console.log(info, 'info==>');
if (!info.warehousing?.[0]?.deptName) {
uni.showToast({
title: '请填写仓库信息',
mask: true,
@@ -126,7 +140,7 @@ const submitForm = () => {
})
return
}
if (!info.storageArea?.[0].deptName) {
if (!info.storageArea?.[0]?.deptName) {
uni.showToast({
title: '请填写存储区信息',
mask: true,
@@ -146,15 +160,16 @@ const submitForm = () => {
console.log(params, isEdit, !isEdit, info, materialInfo, '入参params');
// 新建
if (!isEdit.value) {
addStockIn(params).then((res) => {
addStockOut(params).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '库单创建成功',
title: '库单创建成功',
mask: true,
icon: 'success',
})
removeStorage()
uni.navigateTo({
url: `/pages/warehousing/stockIn/my`,
url: `/pages/warehousing/stockOut/my`,
});
}
@@ -164,14 +179,14 @@ const submitForm = () => {
params.billNo = pathParams.value?.billNo
params.billId = pathParams.value?.billId
const query = objectToQuery(pathParams.value)
stockInUpdate(params).then((res) => {
stockOutUpdate(params).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '库单编辑成功',
title: '库单编辑成功',
mask: true,
icon: 'success',
})
let url = `/pages/warehousing/stockIn/components/detail${query}`
let url = `/pages/warehousing/stockOut/components/detail${query}`
uni.navigateTo({
url: url,
});
@@ -182,21 +197,23 @@ const submitForm = () => {
}
// 数据:路径参数
onLoad((options) => {
console.log(options, 'options', _.includes(options?.type, 'stockIn'));
console.log(options, 'options', _.includes(options?.type, 'stockOut'));
pathParams.value = options
flag.value = options.type
isEdit.value = _.includes(options?.type, 'stockIn')
isEdit.value = _.includes(options?.type, 'stockOut')
})
// 修改标题若有billNo传入 修改标题
onShow(() => {
const query = objectToQuery(pathParams.value)
if (pathParams.value.billNo) {
title.value = pathParams.value.billNo
}
// /pages/warehousing/stockIn/components/detail?billNo=DL1775619567111&type=stockOut
if (includes(pathParams.value.type, 'stockOut')) {
backUrl.value = `/pages/warehousing/stockIn/components/detail${query}`
}
if (pathParams.value.billNo) {
title.value = pathParams.value.billNo
}
})
</script>

View File

@@ -4,5 +4,4 @@
</template>
<script setup>
import SearchList from '../../components/SearchList.vue';
</script>

View File

@@ -1,6 +1,8 @@
<!-- 底部导航栏仓库 -->
<template>
<view class="content">
<navigation title="仓储" :showBack="false"></navigation>
<view class="contentBox">
<uni-card v-for="(item, index) in menuList" :key="item.id" :title="item.title" :isFull="true"
class="custom-card">
<view v-for="value in item.menuItem" :key="value.id" class="card_items" @click="value.click">
@@ -14,6 +16,8 @@
<script setup>
import { onShow } from '@dcloudio/uni-app';
import { removeStorage } from '../until';
import Navigation from '../components/Navigation.vue';
const menuList = [
{
id: 'inventory',
@@ -152,7 +156,7 @@ const menuList = [
click: () => {
console.log('入库单入库')
uni.navigateTo({
url: '/pages/warehousing/stockIn/putaway'
url: '/pages/warehousing/stockIn/putAway'
});
}

View File

@@ -1,6 +1,6 @@
<!-- 仓库信息选择 -->
<template>
<choose-list :isWarehousing="isWarehousing" :backStr="pathParams.backStr" :pathParams="pathParams" />
<choose-list :isWarehousing="isWarehousing" :backStr="pathParams.back" :pathParams="pathParams" />
</template>
<script setup>
import { computed, ref } from 'vue'

View File

@@ -1,64 +1,65 @@
<!-- 唯一码发放页面 - 唯一码发放唯一码编辑入库单快速生成唯一码 -->
<template>
<view class="content">
<navigation :title="title" :back-url="backUrl"></navigation>
<navigation :title="title" :back-url="backUrl"></navigation>
<view class="contentBox">
<view class="remarkLine">
<span>备注</span>
<uni-easyinput type="text" v-model="formData.remark" :inputBorder="false" placeholder="请输入备注" />
</view>
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" :remark="formData.remark" isEdit="1" :backStr="backStr"
<material-list ref="materialRef" :formData="formData" :remark="formData.remark" isEdit="1"
:pathParams="pathParams" />
<button class="bottom-btn" type="primary" @click="handleSubmit">提交</button>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { onLoad } from '@dcloudio/uni-app';
import { addUniqueCode, editUniqueCode } from '@/api/uniqueCode';
import MaterialList from '../../../components/MaterialList.vue';
import Navigation from '../../../components/Navigation.vue';
import { objectToQuery } from '../../../until';
import { computed } from 'vue';
import _ from 'lodash';
import { includes } from 'lodash';
const OPERATE_CONFIG = {
// 唯一码创建
issueUniqueCode: {
title: '唯一码发放',
back: 'pages/warehousing/index'
},
//唯一码编辑
issueUniqueCode_edit: {
title: '',
back: '/pages/warehousing/uniqueCode/myUniqueCode'
},
//入库单入库
stockIn_inbound: {
title: '快速生成唯一码',
back: '/pages/warehousing/stockIn/components/inbound'
},
}
// ref标题
const title = ref('入库单开单')
const backUrl = ref('pages/warehousing/index')
const title = ref('')
const backUrl = ref('')
// 数据:路径参数
const pathParams = ref('')
// 数据:物料、备注
const formData = ref({ remark: '', material: [] })
// ref:绑定物料列表
const materialRef = ref([])
const backStr = computed(() => pathParams.value.back == 'inbound' ? `issueUniqueCode_inbound` : 'issueUniqueCode')
// 接收路径参数 - 修改标题- 携带code、id、materialId
onLoad((options) => {
const query = objectToQuery(options)
pathParams.value = options
const config = options.type ? OPERATE_CONFIG[options.type] : OPERATE_CONFIG.issueUniqueCode
title.value = config.title ? config.title : options.title
backUrl.value = config.back + query
})
onShow(() => {
// 唯一码发放、唯一码编辑、入库单快速生成唯一码
const query = objectToQuery(pathParams.value)
if (pathParams.value.title) {
// 唯一码编辑 /pages/warehousing/uniqueCode/myUniqueCode/detail?id=64&code=600064
title.value = pathParams.value.title
backUrl.value = `/pages/warehousing/uniqueCode/myUniqueCode${query}`
} else if (includes(pathParams.value.back, 'inbound')) {
// 入库单快速生成唯一码 /pages/warehousing/uniqueCode/issueUniqueCode/index?billNo=WR1775527275119&back=inbound
title.value = '快速生成唯一码'
backUrl.value = `/pages/warehousing/stockIn/components/inbound${query}`
} else {
title.value = '唯一码发放'
backUrl.value = 'pages/warehousing/index'
}
})
onMounted(() => {
// 快速生成唯一码时 已选择的物料列表初始为空 点击添加物料 去选择
if (pathParams.value.back != 'inbound') {
if (pathParams.value.type != 'inbound') {
getMaterialList();
}
@@ -67,12 +68,12 @@ onMounted(() => {
const handleSubmit = () => {
// 物料最新编辑数据
const material = materialRef.value.getMaterialList()?.[0]
const query = objectToQuery(pathParams.value)
const params = {
remark: formData.value.remark,
material: { ...material.material, unitId: '23' }
}
if (pathParams.value.back == `issueUniqueCode_inbound`) {
if (pathParams.value.type == `issueUniqueCode_inbound`) {
params.billNo = pathParams.value.billNo
}
if (pathParams.value.id) {
@@ -87,7 +88,7 @@ const handleSubmit = () => {
icon: 'success',
})
uni.navigateTo({
url: `/pages/warehousing/uniqueCode/myUniqueCode/detail?id=${pathParams.value.id}&title=${pathParams.value.title}`,
url: OPERATE_CONFIG.issueUniqueCode_edit.back + query
});
}
@@ -100,17 +101,15 @@ const handleSubmit = () => {
mask: true,
icon: 'success',
})
if (_.includes(pathParams.value?.back, 'inbound')) {
// /pages/warehousing/uniqueCode/myUniqueCode/detail?id=38&code=600038
if (_.includes(pathParams.value?.type, 'inbound')) {
uni.navigateTo({
url: `/pages/warehousing/stockIn/components/inbound?billNo=${pathParams.value.billNo}`,
url: OPERATE_CONFIG.stockIn_inbound.back + query
});
} else {
uni.switchTab({
url: "/pages/warehousing/index"
url: OPERATE_CONFIG.issueUniqueCode.back
})
}
// /pages/warehousing/stockIn/components/inbound?billNo=WR1775032495153
}

View File

@@ -1,14 +1,14 @@
<!-- 物料选择 -->
<template>
<view class="content">
<view class="topSearch" v-if="!backUrl.includes('inbound')">
<view class="contentBox">
<view class="topSearch" v-if="!isInbound">
<uni-easyinput type="text" v-model="queryParams.keyword" prefixIcon="search" :inputBorder="false"
@iconClick="getMaterialList" placeholder="请输入搜索内容" />
</view>
<!-- 物料列表 -->
<z-paging ref="pagingRef" class="containerBox" v-model="materialList" @query="getMaterialList"
v-if="!backUrl.includes('inbound')">
v-if="!isInbound">
<uni-list>
<uni-list-item v-for="item in materialList" :key="item.id" clickable class="material-card"
@click="onMaterial(item)">
@@ -33,7 +33,7 @@
</uni-list>
</z-paging>
<view v-if="backUrl.includes('inbound')">
<view v-if="isInbound">
<uni-list>
<uni-list-item v-for="item in materialList" :key="item.id" clickable class="material-card"
@click="onMaterial(item)">
@@ -66,7 +66,28 @@ import { getTypeParentNames, } from '../until';
import { objectToQuery } from '../../../until';
import { getMaterial } from '@/api/uniqueCode'
import { onShow, onLoad } from "@dcloudio/uni-app";
const OPERATE_CONFIG = {
// 唯一码创建
issueUniqueCode: {
back: '/pages/warehousing/uniqueCode/issueUniqueCode/index'
},
//唯一码编辑
issueUniqueCode_edit: {
back: '/pages/warehousing/uniqueCode/issueUniqueCode/index'
},
//入库单开单
stockIn: {
back: '/pages/warehousing/stockIn/create'
},
//入库单入库
stockIn_inbound: {
back: '/pages/warehousing/uniqueCode/issueUniqueCode/index'
},
//入库单编辑
stockIn_detail: {
back: '/pages/warehousing/stockIn/create'
},
}
// ref:下拉加载
const pagingRef = ref(null)
// 数据:查询参数
@@ -77,9 +98,9 @@ const queryParams = ref({
const materialList = ref([])
// 数据:路径参数
const pathParams = ref('')
// 数据:返回路径标识 stockIn 入库单开单 stockInDetail入库单编辑 issueUniqueCode唯一码 issueUniqueCode_inbound入库生成唯一码
const backUrl = computed(() => pathParams?.value?.back)
// 数据:返回路径标识
const keyType = computed(() => pathParams?.value?.type)
const isInbound = computed(() => _.includes(pathParams?.value?.type, 'inbound'))
// 方法:获取列表
const getMaterialList = () => {
getMaterial(queryParams.value).then(res => {
@@ -94,10 +115,7 @@ const getMaterialList = () => {
// 方法:获取列表 - 入库生成唯一码
const getMaterialListInbound = () => {
const list = uni.getStorageSync('app_material_select_list')
console.log('list',list);
materialList.value=list
materialList.value = list
}
onShow(() => {
@@ -118,76 +136,39 @@ const getStorageMaterial = (val) => {
}
return [{ ...val, quantity: 1 }]
}
// 方法:返回路径
const toBack = (back) => {
const path = objectToQuery({ ...pathParams.value })
let url = ''
switch (back) {
case 'stockIn':
// 入库单开单添加物料进入
url = `/pages/warehousing/stockIn/create`
break
case 'issueUniqueCode':
case 'issueUniqueCode_inbound':
// 唯一码发放/入库生成唯一码
url = `/pages/warehousing/uniqueCode/issueUniqueCode/index`
break
case 'stockInDetail':
//我的入库单/入库单入库
url = `/pages/warehousing/stockIn/components/detail`
break
}
uni.navigateTo({
url: `${url}${path}`
})
}
// 方法:选择物料
const onMaterial = (val) => {
let materialChecked = uni.getStorageSync('app_material');
const path = objectToQuery(pathParams.value)
if (!Array.isArray(materialChecked)) {
materialChecked = [];
}
console.log(materialChecked, 'materialChecked==>');
const item = _.find(materialChecked, (i) => i.materialId ? i.materialId === val.id : i.id === val.id)
console.log(item, 'item==>');
const idx = _.findIndex(materialChecked, (i) => i.materialId ? i.materialId === val.id : i.id === val.id)
console.log(idx, 'idx==>', idx != -1 && item?.isDelete == '0', backUrl.value);
if (idx != -1 && item?.isDelete == '0') { // isDelete为0表示未删除 1为已删除数据不在对比范围内
console.log(backUrl.value == 'stockIn', '11111111111111111111111111');
if (backUrl.value == 'stockIn') {
console.log(111111111111);
if (keyType.value === 'stockIn') {
uni.showToast({
title: '该物料已添加,请勿重复添加!',
mask: true,
icon: 'none',
})
}
//! 现在仅允许添加一条物料打印一个唯一码 但保留可添加多个
// uni.showToast({
// title: '该物料已添加,请勿重复添加!',
// mask: true,
// icon: 'none',
// })
toBack(backUrl.value)
} else {
console.log('执行到这里');
} else {
if (val) {
if (backUrl.value == 'stockIn') {
if (keyType.value == 'stockIn') {
materialChecked = [...materialChecked, { ...val, quantity: 1, isDelete: '0' }];
} else {
materialChecked = getStorageMaterial(val)
}
uni.setStorageSync('app_material', materialChecked);
}
toBack(backUrl.value)
}
uni.navigateTo({
url: OPERATE_CONFIG?.[keyType.value].back + path
})
}
</script>

View File

@@ -136,7 +136,7 @@ const toTraceability = () => {
// 修改:唯一码的物料信息 - 携带title和唯一码id
const toEdit = () => {
uni.navigateTo({
url: `/pages/warehousing/uniqueCode/issueUniqueCode/index?title=${pathParams.value.code}&id=${pathParams.value.id}`,
url: `/pages/warehousing/uniqueCode/issueUniqueCode/index?title=${pathParams.value.code}&id=${pathParams.value.id}type=issueUniqueCode_edit`,
});
}

View File

@@ -1,11 +1,11 @@
<!-- 唯一码 -->
<template>
<view class="content">
<navigation title="唯一码" back-url="pages/warehousing/index"></navigation>
<navigation title="唯一码" back-url="pages/warehousing/index"></navigation>
<view class="contentBox">
<view class="topSearch">
<uni-easyinput type="text" v-model="queryParams.code" prefixIcon="search" :inputBorder="false"
@iconClick="getMaterialList" placeholder="请输入关键词搜索" />
</view>
<!-- 唯一码列表 -->
@@ -61,11 +61,11 @@
</template>
<script setup>
import { ref } from 'vue';
import { getStatusName, getDetail } from '../until';
import { onShow } from "@dcloudio/uni-app";
import { getUniqueCodeList, delUniqueCode, detailUniqueCode } from '@/api/uniqueCode'
import QrCodeModal from './QrCodeModal.vue';
import { getStatusName, getDetail } from '../until';
import Navigation from '../../../components/Navigation.vue';
import { getUniqueCodeList, delUniqueCode, detailUniqueCode } from '@/api/uniqueCode'
const queryParams = ref({
code: ''
@@ -144,10 +144,10 @@ const getDetailInfo = (row) => {
<style scoped lang="scss">
.topSearch {
position: fixed;
top: var(--nav-height); /* 关键:自动在导航栏下方 */
top: var(--nav-height);
left: 0;
right: 0;
z-index: 99; /* 比导航栏小 */
z-index: 99;
padding: 8rpx 16rpx;
background-color: #fff;
border-bottom: 1px solid #eee;
@@ -155,8 +155,7 @@ const getDetailInfo = (row) => {
}
.containerBox {
// padding: 0 12rpx;
padding-top: 90px !important; /* 撑开:导航栏+搜索框高度 */
padding-top: 100px !important;
width: 100%;
height: 100%;
box-sizing: border-box;

View File

@@ -13,7 +13,7 @@ const statusMenu = [
},
{
value: 1,
label: "已打印",
label: "入库单开单",
},
{
value: 2,
@@ -21,11 +21,15 @@ const statusMenu = [
},
{
value: 3,
label: "出库,",
label: "出库单开单",
},
{
value: 3,
label: "已配送,",
value: 4,
label: "已出库",
},
{
value: 9,
label: "已作废",
},
];
export const getStatusName = (val) => {