编码管理页面完善
This commit is contained in:
parent
dc234efd1e
commit
4779830b4a
|
|
@ -44,13 +44,20 @@
|
|||
"navigationBarTitleText": "新购绑定"
|
||||
}
|
||||
},
|
||||
// 详情
|
||||
// 1. 详情
|
||||
{
|
||||
"path": "pages/new-purchase/bind/details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新购绑定详情"
|
||||
}
|
||||
},
|
||||
// 2. 编码绑定
|
||||
{
|
||||
"path": "pages/new-purchase/bind/coding-bind",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编码绑定"
|
||||
}
|
||||
},
|
||||
// 入库
|
||||
{
|
||||
"path": "pages/new-purchase/entry/index",
|
||||
|
|
@ -132,7 +139,6 @@
|
|||
"navigationBarTitleText": "退料数量"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#2c2c2c",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,351 @@
|
|||
<template>
|
||||
<!-- 编码绑定-->
|
||||
<view class="page-container">
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ queryParams.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">物资规格:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ queryParams.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">到货数量:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><view class="cont">{{ queryParams.purchaseNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">待绑定数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont" style="color: #ee0a24">{{ waitBindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y>
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center">
|
||||
<uni-col :span="4">
|
||||
<view>
|
||||
<text style="color: #ee0a24">*</text>
|
||||
前缀
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="10">
|
||||
<view>
|
||||
<uni-easyinput
|
||||
v-model="queryBindForm.codePrefix"
|
||||
placeholder="请输入编码前缀"
|
||||
/>
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view
|
||||
class="coding-btn"
|
||||
@tap="onHandleBinding"
|
||||
style="padding: 10rpx 0; color: #fff; background-color: #1989fa"
|
||||
>绑定
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view
|
||||
class="coding-btn"
|
||||
style="padding: 10rpx 0; color: #fff; background-color: #2bc54f"
|
||||
@tap="onCodeIdentify"
|
||||
>OCR绑定
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center; margin-top: 10rpx">
|
||||
<uni-col :span="4">
|
||||
<view>
|
||||
<text style="color: #ee0a24">*</text>
|
||||
后缀
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="8">
|
||||
<view>
|
||||
<uni-easyinput
|
||||
v-model="queryBindForm.codeSuffixStart"
|
||||
type="number"
|
||||
placeholder="开始值"
|
||||
/>
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="8">
|
||||
<view>
|
||||
<uni-easyinput
|
||||
v-model="queryBindForm.codeSuffixEnd"
|
||||
type="number"
|
||||
placeholder="结束值"
|
||||
/>
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view
|
||||
class="coding-btn"
|
||||
@tap="onHandlerFill"
|
||||
style="padding: 10rpx 0; color: #1989fa; background-color: #bfd4fa"
|
||||
>填充
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
<uni-row
|
||||
:gutter="24"
|
||||
style="display: flex; align-items: center; margin-top: 10rpx; font-size: 20rpx"
|
||||
v-for="(item, index) in codeBindingList"
|
||||
:key="index"
|
||||
>
|
||||
<uni-col :span="1">
|
||||
<view> {{ index + 1 }} </view>
|
||||
</uni-col>
|
||||
<uni-col :span="3">
|
||||
<view> 编码</view>
|
||||
</uni-col>
|
||||
<uni-col :span="7">
|
||||
<view>
|
||||
<uni-easyinput v-model="item.maCode" placeholder="请输入" />
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view> 出厂编码 </view>
|
||||
</uni-col>
|
||||
<uni-col :span="7">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入" />
|
||||
</view>
|
||||
</uni-col>
|
||||
<!-- <uni-col :span="3">
|
||||
<view> 出厂时间 </view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view>
|
||||
<uni-datetime-picker
|
||||
type="date"
|
||||
:clear-icon="false"
|
||||
@maskClick="maskClick"
|
||||
/>
|
||||
</view>
|
||||
</uni-col> -->
|
||||
<uni-col :span="2">
|
||||
<view @tap="onHandelDelete(index)">
|
||||
<uni-icons type="trash" size="22" style="color: #ee0a24"></uni-icons>
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { setBindCodingAPI } from '@/services/new-purchase/bind.js'
|
||||
import { debounce } from 'lodash-es'
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
const queryParams = JSON.parse(query.queryParams)
|
||||
const codeBindingList = ref([])
|
||||
|
||||
const queryBindForm = ref({
|
||||
typeId: '', // 物资typeId
|
||||
typeName: queryParams.typeName, // 规格型号
|
||||
codePrefix: '', // 编码前缀
|
||||
maTypeName: queryParams.maTypeName, // 物资名称
|
||||
codeSuffixEnd: '', // 后缀结束
|
||||
codeSuffixStart: '', // 后缀开始
|
||||
})
|
||||
|
||||
// 计算待绑定数量
|
||||
const waitBindNum = computed(() => {
|
||||
return queryParams.checkNum - queryParams.bindNum
|
||||
})
|
||||
|
||||
// 绑定按钮
|
||||
const onHandleBinding = debounce(async () => {
|
||||
if (codeBindingList.value.length < 1) {
|
||||
uni.showToast({
|
||||
title: '请填充编码',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 组装参数
|
||||
const bindParams = {
|
||||
typeId: queryParams.typeId,
|
||||
taskId: queryParams.taskId,
|
||||
dtoList: codeBindingList.value,
|
||||
}
|
||||
|
||||
console.log('绑定参数', bindParams)
|
||||
|
||||
const res = await setBindCodingAPI(bindParams)
|
||||
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '编码绑定成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
// 返回上一个页面
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
success() {
|
||||
uni.$emit('onUpdate')
|
||||
},
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}, 500)
|
||||
|
||||
// 填充按钮
|
||||
const onHandlerFill = () => {
|
||||
const { codeSuffixEnd, codeSuffixStart, codePrefix, typeName, maTypeName } = queryBindForm.value
|
||||
|
||||
if (!codePrefix) {
|
||||
uni.showToast({
|
||||
title: '请填写编码前缀',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!codeSuffixStart) {
|
||||
uni.showToast({
|
||||
title: '请填写后缀开始值',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!codeSuffixEnd) {
|
||||
uni.showToast({
|
||||
title: '请填写后缀结束值',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
const regex = /^[1-9][0-9]*$/
|
||||
if (!regex.test(codeSuffixStart)) {
|
||||
uni.showToast({
|
||||
title: '后缀开始值不符合要求,请填写大于0且不能以0开头的正整数',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!regex.test(codeSuffixEnd)) {
|
||||
uni.showToast({
|
||||
title: '后缀结束值不符合要求,请填写大于0且不能以0开头的正整数',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (parseInt(codeSuffixEnd) < parseInt(codeSuffixStart)) {
|
||||
uni.showToast({
|
||||
title: '结束值不可小于开始值',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 可编码数量 如相减大于代编码数量 则取待编码数量 如小于待编码数量 则取相减后值
|
||||
let passCodeNUm =
|
||||
codeSuffixEnd - codeSuffixStart + 1 > waitBindNum.value
|
||||
? waitBindNum.value
|
||||
: codeSuffixEnd - codeSuffixStart + 1
|
||||
|
||||
codeBindingList.value = []
|
||||
// 循环生成编码
|
||||
for (let i = 0; i < passCodeNUm; i++) {
|
||||
const codeItem = {
|
||||
typeName,
|
||||
maTypeName,
|
||||
outFacCode: '',
|
||||
// productDate: "",
|
||||
maCode: `${codePrefix}${parseInt(codeSuffixStart) + i}`,
|
||||
}
|
||||
|
||||
codeBindingList.value.push(codeItem)
|
||||
}
|
||||
}
|
||||
|
||||
// 删除
|
||||
const onHandelDelete = (index) => {
|
||||
codeBindingList.value.splice(index, 1)
|
||||
}
|
||||
|
||||
// 编码识别按钮
|
||||
const onCodeIdentify = () => {
|
||||
console.log('编码识别--')
|
||||
|
||||
// 只允许通过相机扫码
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType: ['qrCode', 'pdf417'],
|
||||
success: function (res) {
|
||||
console.log('条码类型:' + res.scanType)
|
||||
console.log('条码内容:' + res.result)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const maskClick = () => {}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: 0 15rpx;
|
||||
flex-direction: column;
|
||||
background-color: #e8f5fb;
|
||||
|
||||
.table-list-item {
|
||||
margin: 5rpx 0;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.coding-btn {
|
||||
padding: 5rpx 0;
|
||||
background-color: #409eff;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 加载提示文字
|
||||
.loading-text {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.outbound-btn {
|
||||
position: fixed;
|
||||
bottom: 15rpx;
|
||||
left: 15%;
|
||||
width: 70%;
|
||||
height: 65rpx;
|
||||
line-height: 65rpx;
|
||||
text-align: center;
|
||||
background-color: #19be6b;
|
||||
border-radius: 12rpx;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -13,84 +13,83 @@
|
|||
</uni-row>
|
||||
|
||||
<scroll-view scroll-y class="scroll-container">
|
||||
<view
|
||||
v-for="(item, index) in detailsList"
|
||||
:key="index"
|
||||
class="table-list-item"
|
||||
@tap="onCodingItem(item)"
|
||||
>
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">物资数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.purchaseNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">已绑数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.bindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">待绑数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.checkNum - item.bindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">管理模式:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
text="编码"
|
||||
type="warning"
|
||||
v-if="item.manageType === 0"
|
||||
size="small"
|
||||
/>
|
||||
<uni-tag
|
||||
text="数量"
|
||||
type="success"
|
||||
v-if="item.manageType === 1"
|
||||
size="small"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">状态:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
text="未完成"
|
||||
type="warning"
|
||||
size="small"
|
||||
v-if="item.status == 3"
|
||||
/>
|
||||
<uni-tag
|
||||
text="已完成"
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="item.status == 2"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<view v-for="(item, index) in detailsList" :key="index" class="table-list-item">
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action-item @click="onClick($event, item)" :right-options="options">
|
||||
<view class="line"></view>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.maTypeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">物资数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.purchaseNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">已绑数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.bindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">待绑数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.checkNum - item.bindNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">管理模式:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
text="编码"
|
||||
type="warning"
|
||||
v-if="item.manageType === 0"
|
||||
size="small"
|
||||
/>
|
||||
<uni-tag
|
||||
text="数量"
|
||||
type="success"
|
||||
v-if="item.manageType === 1"
|
||||
size="small"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">状态:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-tag
|
||||
text="未完成"
|
||||
type="warning"
|
||||
size="small"
|
||||
v-if="item.status == 3"
|
||||
/>
|
||||
<uni-tag
|
||||
text="已完成"
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="item.status == 2"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
@ -103,6 +102,34 @@ import { onLoad } from '@dcloudio/uni-app'
|
|||
const detailsList = ref([])
|
||||
const query = defineProps() // 获取上级页面传递的路由参数
|
||||
|
||||
// 右滑按钮组
|
||||
const options = ref([
|
||||
{
|
||||
text: '编码绑定',
|
||||
style: {
|
||||
backgroundColor: '#84c649',
|
||||
color: '#fff',
|
||||
fontSize: '30rpx',
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '二维码绑定',
|
||||
style: {
|
||||
backgroundColor: '#65a1ff',
|
||||
color: '#fff',
|
||||
fontSize: '30rpx',
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '驳回',
|
||||
style: {
|
||||
backgroundColor: '#ed6042',
|
||||
color: '#fff',
|
||||
fontSize: '30rpx',
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
|
|
@ -114,70 +141,50 @@ const queryParams = ref({
|
|||
|
||||
// 领料单位,参数等信息
|
||||
const leaseApplyInfo = ref({
|
||||
leaseUnit: '', // 领料单位
|
||||
leaseProject: '', // 领料工程
|
||||
maTypeName: '', // 物资类型
|
||||
typeName: '', // 规格型号
|
||||
unitName: '', // 单位
|
||||
storageNum: '', // 库存数量
|
||||
preNum: '', // 预领数量
|
||||
parentId: query.id, // 出库时所需参数 取列表 id
|
||||
id: '', // 出库时所需参数 取详情接口 id
|
||||
typeId: '', // 出库时所需参数 取详情接口 typeId
|
||||
manageType: '', // 出库时所需参数 取详情接口 manageType
|
||||
maTypeName: '', // 物资类型
|
||||
typeName: '', // 规格型号
|
||||
purchaseNum: '', // 到货数量
|
||||
bindNum: '', // 已绑数量
|
||||
checkNum: '', // 应绑数量
|
||||
typeId: '', // 出库时所需参数 取详情接口 typeId
|
||||
taskId: query.taskId, // 出库时所需参数 取详情接口 taskId
|
||||
})
|
||||
|
||||
// 获取列表详情
|
||||
const getOutboundDetailsData = async () => {
|
||||
console.log('queryParams参数', queryParams.value)
|
||||
const { data: res } = await getPurchaseBindDetailsAPI(queryParams.value)
|
||||
// console.log('res详情', res)
|
||||
detailsList.value = res.purchaseCheckDetailsList
|
||||
// leaseApplyInfo.value.leaseUnit = res.leaseApplyInfo.leaseUnit
|
||||
// leaseApplyInfo.value.leaseProject = res.leaseApplyInfo.leaseProject
|
||||
// console.log('详情数据', res)
|
||||
}
|
||||
|
||||
// 点击跳转出库页面
|
||||
const onCodingItem = (item) => {
|
||||
// 解构所需要的数据
|
||||
const {
|
||||
status,
|
||||
manageType,
|
||||
maTypeName,
|
||||
typeName,
|
||||
storageNum,
|
||||
preNum,
|
||||
alNum,
|
||||
unitName,
|
||||
id,
|
||||
typeId,
|
||||
} = item
|
||||
// 右滑按钮事件
|
||||
|
||||
const onClick = (e, item) => {
|
||||
const { maTypeName, typeName, purchaseNum, bindNum, checkNum, typeId } = item
|
||||
|
||||
leaseApplyInfo.value.maTypeName = maTypeName
|
||||
leaseApplyInfo.value.typeName = typeName
|
||||
leaseApplyInfo.value.unitName = unitName
|
||||
leaseApplyInfo.value.storageNum = storageNum
|
||||
leaseApplyInfo.value.preNum = preNum
|
||||
leaseApplyInfo.value.alNum = alNum
|
||||
leaseApplyInfo.value.id = id
|
||||
leaseApplyInfo.value.purchaseNum = purchaseNum
|
||||
leaseApplyInfo.value.bindNum = bindNum
|
||||
leaseApplyInfo.value.checkNum = checkNum
|
||||
leaseApplyInfo.value.typeId = typeId
|
||||
leaseApplyInfo.value.manageType = manageType
|
||||
|
||||
if (status == 2) {
|
||||
uni.showToast({ title: '该物资已完成出库!', icon: 'none' })
|
||||
return
|
||||
}
|
||||
let codingUrl = ''
|
||||
if (manageType === 0) {
|
||||
codingUrl = '/pages/picking/outbound/code-outbound' // 编码出库
|
||||
}
|
||||
if (manageType == 1) {
|
||||
codingUrl = '/pages/picking/outbound/num-outbound' // 数量出库
|
||||
}
|
||||
const { index } = e
|
||||
|
||||
// 把 leaseApplyInfo 领料信息转成 json 传递到下个页面
|
||||
uni.navigateTo({ url: `${codingUrl}?queryParams=${JSON.stringify(leaseApplyInfo.value)}` })
|
||||
// 1. 编码绑定
|
||||
if (index === 0) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/new-purchase/bind/coding-bind?queryParams=${JSON.stringify(
|
||||
leaseApplyInfo.value,
|
||||
)}`,
|
||||
})
|
||||
}
|
||||
// 2. 二维码绑定
|
||||
if (index === 1) {
|
||||
}
|
||||
// 3. 驳回
|
||||
if (index === 2) {
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载完毕
|
||||
|
|
@ -251,4 +258,9 @@ onUnmounted(() => {
|
|||
color: #666;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
::v-deep .uni-swipe_button {
|
||||
writing-mode: vertical-rl;
|
||||
padding: 0 18rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<!-- 新购绑定 -->
|
||||
<view class="page-container">
|
||||
<view class="complete-btn">
|
||||
<!-- <view class="complete-btn">
|
||||
<view class="btn" @click="changeTab(1)">
|
||||
<span>已完成</span>
|
||||
<div v-if="active == 1" class="bt-line"></div>
|
||||
|
|
@ -10,8 +10,8 @@
|
|||
<span>未完成</span>
|
||||
<div v-if="active == 2" class="bt-line"></div>
|
||||
</view>
|
||||
</view>
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
</view> -->
|
||||
<uni-row :gutter="24" class="search-form" style="margin-top: 10rpx">
|
||||
<uni-col :span="12">
|
||||
<view>
|
||||
<uni-datetime-picker
|
||||
|
|
|
|||
|
|
@ -20,3 +20,13 @@ export const getPurchaseBindDetailsAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 新购绑定 ---- 列表查询
|
||||
*/
|
||||
export const setBindCodingAPI = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/purchase/bind/bind',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,4 +122,5 @@ a:hover {
|
|||
page {
|
||||
/* height: 100%; */
|
||||
font-size: 28rpx;
|
||||
background-color: #e8f5fb;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import { useMemberStore } from '@/stores'
|
|||
* baseURL 设置请求ip地址和端口
|
||||
*/
|
||||
const ENV = process.env.NODE_ENV
|
||||
export const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
|
||||
export const baseURL = ENV === 'development' ? '/api' : '***'
|
||||
/**
|
||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||
*/
|
||||
|
|
@ -65,12 +66,12 @@ export const http = (options) => {
|
|||
url: '/pages/login/index',
|
||||
})
|
||||
reject(res)
|
||||
} else if (res.data.code === 500) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: `${res.data.msg}`,
|
||||
})
|
||||
}
|
||||
} else if (res.data.code === 500) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: `${res.data.msg}`,
|
||||
})
|
||||
}
|
||||
} else if (res.statusCode === 401) {
|
||||
// 2. 401 表示token过期 去往登录页重新登录
|
||||
const memberStore = useMemberStore()
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default defineConfig({
|
|||
// 在此处编写代理规则
|
||||
'/api': {
|
||||
// target: 'http://192.168.2.76:18080',
|
||||
target: 'http://localhost:18080',
|
||||
target: 'http://192.168.2.246:18080',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/\/api/, '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue