退料接口对接
This commit is contained in:
parent
6b49fd314d
commit
57fcfc0145
|
|
@ -126,11 +126,23 @@
|
|||
"navigationBarTitleText": "退料编码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/back/backCodeDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "退料编码查看"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/back/backNum",
|
||||
"style": {
|
||||
"navigationBarTitleText": "退料数量"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/back/backNumDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "退料数量查看"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@
|
|||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getUnitList,getProjectList } from '../../services/back.js';
|
||||
import { getUnitList,getProjectList,insertApp,getAgreementInfoById } from '../../services/back.js';
|
||||
const formData = ref({})
|
||||
const unitId = ref("")
|
||||
const proId = ref("")
|
||||
const agreementId = ref("")
|
||||
const unitList = ref([])
|
||||
const proList = ref([])
|
||||
const backPerson = ref("")
|
||||
|
|
@ -53,6 +54,7 @@ const getUnit = () => {
|
|||
text:option.unitName,
|
||||
}
|
||||
});
|
||||
getAgreement()
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
|
|
@ -70,10 +72,30 @@ const getProject = () => {
|
|||
text:option.proName,
|
||||
}
|
||||
});
|
||||
getAgreement()
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
//协议
|
||||
const getAgreement = () => {
|
||||
let obj = {
|
||||
"unitId":unitId.value,
|
||||
"projectId":proId.value
|
||||
}
|
||||
getAgreementInfoById(obj).then(res => {
|
||||
console.log(res)
|
||||
if(res.code==200){
|
||||
agreementId.value=res.data.agreementId
|
||||
}else{
|
||||
agreementId.value=""
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//清空
|
||||
const clearForm = () => {
|
||||
unitId.value=""
|
||||
|
|
@ -85,8 +107,27 @@ const clearForm = () => {
|
|||
|
||||
}
|
||||
//确认
|
||||
const confirmAdd = () => {
|
||||
|
||||
const confirmAdd = () => {
|
||||
let obj = {
|
||||
"backApplyInfo":{
|
||||
"agreementId":agreementId.value,
|
||||
"backPerson":backPerson.value,
|
||||
"phone":phone.value
|
||||
}
|
||||
}
|
||||
insertApp(obj).then(res => {
|
||||
console.log(res)
|
||||
if(res.code==200){
|
||||
uni.showToast({ title: '新增成功', icon: 'none' })
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回到已存在的页面
|
||||
});
|
||||
}else{
|
||||
uni.showToast({ title: res.msg, icon: 'none' })
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options)=>{
|
||||
|
|
|
|||
|
|
@ -1,22 +1,89 @@
|
|||
<template>
|
||||
<view class="accept page-common">
|
||||
<div class="card">
|
||||
<uni-forms :model="formData" label-width="100" :border="true">
|
||||
<!-- <uni-forms-item label="物资名称:" name="maTypeName">
|
||||
<span>{{ formData.maTypeName }}</span>
|
||||
<div>任务信息</div>
|
||||
<uni-forms :model="formData" label-width="160rpx" :border="true">
|
||||
<uni-forms-item label="退料单位" name="unitName">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.unitName }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="物资规格:" name="typeName">
|
||||
<span>{{ formData.typeName }}</span>
|
||||
<uni-forms-item label="退料工程:" name="proName">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.proName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料单号:" name="code">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.code }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料人员:" name="backPerson">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.backPerson }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="联系电话:" name="phone">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ formData.phone }}</span>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="到货数量:" name="purchaseNum">
|
||||
<span>{{ formData.purchaseNum }}</span>
|
||||
</uni-forms-item> -->
|
||||
|
||||
|
||||
</uni-forms>
|
||||
</div>
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">接收方式:</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">编码识别</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">编码识别</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn">二维码识别</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<div>扫码识别</div>
|
||||
<div style="width: 94%;height: 120px;margin: 10px;border: 1px solid #ccc;">
|
||||
|
||||
</div>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center;margin-bottom: 10px;">
|
||||
<uni-col :span="6">设备编码:</uni-col>
|
||||
<uni-col :span="12">
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view
|
||||
class="coding-btn"
|
||||
style="padding: 10rpx 0;
|
||||
color: #fe9a09;
|
||||
background-color: #fff7eb;
|
||||
border: 1px solid #fe9a09;"
|
||||
>编码检索</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center;margin-bottom: 10px;">
|
||||
<uni-col :span="6">物资类型:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center;margin-bottom: 10px;">
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center;margin-bottom: 10px;">
|
||||
<uni-col :span="6">外观判定:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center;margin-bottom: 10px;">
|
||||
<uni-col :span="6">附件:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<div class="upload" @click="uploadImg" v-if="imgBeseUrl==''">+</div>
|
||||
<div class="upload" @click="uploadImg" v-else>
|
||||
<image :src="imgBeseUrl" style="width: 160rpx;height: 160rpx;" mode=""></image>
|
||||
</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<!-- <button class="btn-cont" @click="reject">取消</button> -->
|
||||
|
|
@ -28,13 +95,58 @@
|
|||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { baseURL } from '@/utils/http'
|
||||
const formData = ref({})
|
||||
const imgBeseUrl = ref("")
|
||||
const bmFileInfos = ref([])//请求图片参数
|
||||
|
||||
|
||||
|
||||
//上传
|
||||
const uploadImg = () => {
|
||||
uni.chooseImage({
|
||||
count: 1, //图片可选择数量
|
||||
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera',], //album 从相册选图,camera 使用相机,默认二者都有。
|
||||
success: res => {
|
||||
console.log(res)
|
||||
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
||||
imgBeseUrl.value = imgFiles[0]
|
||||
// console.log('本地地址', imgFiles)
|
||||
// console.log('请求地址', baseURL+"/file/upload")
|
||||
uni.uploadFile({
|
||||
// url: baseURL+"/file/upload",//app
|
||||
url: "/file/upload",//h5
|
||||
filePath: imgFiles[0],
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
res = JSON.parse(res.data)
|
||||
console.log('上传成功', res.code);
|
||||
console.log('上传成功', res.data);
|
||||
if(res.code&&res.code==200){
|
||||
let obj = {
|
||||
"name":res.data.name,
|
||||
"url":res.data.url,
|
||||
"taskType":"10"
|
||||
}
|
||||
// console.log(obj)
|
||||
bmFileInfos.value = [obj]
|
||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||
}else{
|
||||
bmFileInfos.value = []
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('上传失败', err);
|
||||
}
|
||||
});
|
||||
// this.$refs.vForm.clearValidate()
|
||||
}
|
||||
})
|
||||
}
|
||||
onLoad((options)=>{
|
||||
console.log(options)
|
||||
formData.value = JSON.parse(options.taskInfo)
|
||||
console.log(formData.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
@ -50,6 +162,14 @@ onLoad((options)=>{
|
|||
border-radius: 6px;
|
||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.coding-btn {
|
||||
padding: 5rpx 0;
|
||||
background-color: #409eff;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
.upload {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
|
|
@ -76,9 +196,9 @@ onLoad((options)=>{
|
|||
color: #fff;
|
||||
border-radius: 20px;
|
||||
// 取消按钮淡蓝色
|
||||
&:first-child {
|
||||
background-color: #aacefb;
|
||||
}
|
||||
// &:first-child {
|
||||
// background-color: #aacefb;
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,209 @@
|
|||
<template>
|
||||
<view class="accept page-common">
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="12">
|
||||
<view><uni-easyinput placeholder="请输入内容" v-model="searchValue"/></view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="search" @click="getTableList()">查询</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="addBtn" @click="goCode">编码退料</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<div class="card" style="margin-top: 10px;">
|
||||
<div>退料物资</div>
|
||||
<uni-forms :model="rowData" label-width="160rpx" :border="true">
|
||||
<uni-forms-item label="物资名称:" name="unitName">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ rowData.typeName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="规格型号:" name="proName">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ rowData.typeModel }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="已退数量:" name="code">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ rowData.preNum }}</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
|
||||
<div style="width: 92%;height: auto;margin: 10px;">
|
||||
<uni-table border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th width="100px" align="center">设备编码</uni-th>
|
||||
<uni-th width="100px" align="center">外观</uni-th>
|
||||
<uni-th width="100px" align="center">操作</uni-th>
|
||||
</uni-tr>
|
||||
<!-- 表格数据行 -->
|
||||
<uni-tr v-for="(item,index) in codeList" :key="item.id">
|
||||
<uni-td>{{item.maCode}}</uni-td>
|
||||
<uni-td>
|
||||
<span>{{item.apDetection}}</span>
|
||||
</uni-td>
|
||||
<uni-td>
|
||||
<view class="uni-group">
|
||||
<button class="uni-button" size="mini" type="primary">上传</button>
|
||||
<button class="uni-button" size="mini" type="warn">删除</button>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn">
|
||||
<!-- <button class="btn-cont" @click="reject">取消</button> -->
|
||||
<button class="btn-cont">确认</button>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { baseURL } from '@/utils/http'
|
||||
const searchValue = ref('')
|
||||
const taskInfo = ref({})
|
||||
const rowData = ref({})
|
||||
const codeList = ref([])
|
||||
const imgBeseUrl = ref("")
|
||||
const bmFileInfos = ref([])//请求图片参数
|
||||
const goCode = () => {
|
||||
uni.navigateTo({ url: `/pages/back/backCode?taskInfo=${JSON.stringify(taskInfo.value)}` })
|
||||
}
|
||||
//上传
|
||||
const uploadImg = () => {
|
||||
uni.chooseImage({
|
||||
count: 1, //图片可选择数量
|
||||
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera',], //album 从相册选图,camera 使用相机,默认二者都有。
|
||||
success: res => {
|
||||
console.log(res)
|
||||
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
||||
imgBeseUrl.value = imgFiles[0]
|
||||
// console.log('本地地址', imgFiles)
|
||||
// console.log('请求地址', baseURL+"/file/upload")
|
||||
uni.uploadFile({
|
||||
// url: baseURL+"/file/upload",//app
|
||||
url: "/file/upload",//h5
|
||||
filePath: imgFiles[0],
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
res = JSON.parse(res.data)
|
||||
console.log('上传成功', res.code);
|
||||
console.log('上传成功', res.data);
|
||||
if(res.code&&res.code==200){
|
||||
let obj = {
|
||||
"name":res.data.name,
|
||||
"url":res.data.url,
|
||||
"taskType":"10"
|
||||
}
|
||||
// console.log(obj)
|
||||
bmFileInfos.value = [obj]
|
||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||
}else{
|
||||
bmFileInfos.value = []
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('上传失败', err);
|
||||
}
|
||||
});
|
||||
// this.$refs.vForm.clearValidate()
|
||||
}
|
||||
})
|
||||
}
|
||||
onLoad((options)=>{
|
||||
console.log(options)
|
||||
taskInfo.value = JSON.parse(options.taskInfo)
|
||||
console.log(taskInfo.value)
|
||||
rowData.value = JSON.parse(options.rowData)
|
||||
console.log(rowData.value)
|
||||
codeList.value = rowData.value.maCodeList
|
||||
console.log(codeList.value)
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.accept {
|
||||
padding: 10px;
|
||||
height: 95vh;
|
||||
word-break: break-all;
|
||||
}
|
||||
.card {
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.coding-btn {
|
||||
padding: 5rpx 0;
|
||||
background-color: #409eff;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
.upload {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 20px;
|
||||
color: #ccc;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.search-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: content-box;
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.search {
|
||||
height: 60rpx;
|
||||
background-color: #3784fb;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.addBtn {
|
||||
height: 60rpx;
|
||||
background-color: #3784fb;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 30px;
|
||||
|
||||
.btn-cont {
|
||||
width: 40%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
background-color: #3784fb;
|
||||
color: #fff;
|
||||
border-radius: 20px;
|
||||
// 取消按钮淡蓝色
|
||||
// &:first-child {
|
||||
// background-color: #aacefb;
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,27 +2,72 @@
|
|||
<view class="accept page-common">
|
||||
<div class="card">
|
||||
<div>任务信息</div>
|
||||
<uni-forms :model="formData" label-width="160rpx" :border="true">
|
||||
<uni-forms :model="taskInfo" label-width="160rpx" :border="true">
|
||||
<uni-forms-item label="退料单位" name="unitName">
|
||||
<span>{{ formData.unitName }}</span>
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.unitName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料工程:" name="proName">
|
||||
<span>{{ formData.proName }}</span>
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.proName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料单号:" name="code">
|
||||
<span>{{ formData.code }}</span>
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.code }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料人员:" name="backPerson">
|
||||
<span>{{ formData.backPerson }}</span>
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.backPerson }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="联系电话:" name="phone">
|
||||
<span>{{ formData.phone }}</span>
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.phone }}</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div>任务信息</div>
|
||||
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<div>退料物资</div>
|
||||
<div style="width: 92%;height: auto;margin: 10px;" >
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center">
|
||||
<uni-col :span="10">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
</view>
|
||||
</uni-col>
|
||||
<uni-col :span="10">
|
||||
<view>
|
||||
<uni-easyinput placeholder="请输入内容" />
|
||||
</view>
|
||||
</uni-col>
|
||||
|
||||
</uni-row>
|
||||
</div>
|
||||
<div style="width: 92%;height: auto;margin: 10px;">
|
||||
<uni-table border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th width="100px" align="center">类型名称</uni-th>
|
||||
<uni-th width="100px" align="center">规格型号</uni-th>
|
||||
<uni-th width="100px" align="center">在用数</uni-th>
|
||||
<uni-th width="100px" align="center">退料数</uni-th>
|
||||
<uni-th width="100px" align="center">外观</uni-th>
|
||||
<uni-th width="100px" align="center">操作</uni-th>
|
||||
</uni-tr>
|
||||
<!-- 表格数据行 -->
|
||||
<uni-tr v-for="(item,index) in typeList" :key="item.id">
|
||||
<uni-td>{{item.typeName}}</uni-td>
|
||||
<uni-td>{{item.typeModel}}</uni-td>
|
||||
<uni-td>{{item.num}}</uni-td>
|
||||
<uni-td>
|
||||
<uni-easyinput placeholder="退料数" v-model="item.preNum"/>
|
||||
</uni-td>
|
||||
<uni-td>
|
||||
<uni-easyinput placeholder="外观" v-model="item.apDetection"/>
|
||||
</uni-td>
|
||||
<uni-td>
|
||||
<view class="uni-group">
|
||||
<button class="uni-button" size="mini" type="primary">上传</button>
|
||||
<button class="uni-button" size="mini" type="warn">删除</button>
|
||||
</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
|
|
@ -35,21 +80,21 @@
|
|||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const formData = ref({})
|
||||
|
||||
const taskInfo = ref({})
|
||||
const typeList = ref([])
|
||||
|
||||
|
||||
onLoad((options)=>{
|
||||
console.log(options)
|
||||
formData.value = JSON.parse(options.taskInfo)
|
||||
console.log(formData.value)
|
||||
taskInfo.value = JSON.parse(options.taskInfo)
|
||||
console.log(taskInfo.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.accept {
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
height: 95vh;
|
||||
word-break: break-all;
|
||||
}
|
||||
.card {
|
||||
|
|
@ -84,9 +129,9 @@ onLoad((options)=>{
|
|||
color: #fff;
|
||||
border-radius: 20px;
|
||||
// 取消按钮淡蓝色
|
||||
&:first-child {
|
||||
background-color: #aacefb;
|
||||
}
|
||||
// &:first-child {
|
||||
// background-color: #aacefb;
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,121 @@
|
|||
<template>
|
||||
<view class="accept page-common">
|
||||
<div class="card">
|
||||
<div>任务信息</div>
|
||||
<uni-forms :model="taskInfo" label-width="160rpx" :border="true">
|
||||
<uni-forms-item label="退料单位" name="unitName">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.unitName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料工程:" name="proName">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.proName }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料单号:" name="code">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.code }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料人员:" name="backPerson">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.backPerson }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="联系电话:" name="phone">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.phone }}</span>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</div>
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<div>退料物资</div>
|
||||
<div style="width: 92%;height: auto;margin: 10px;">
|
||||
<uni-table border stripe emptyText="暂无更多数据" >
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th width="100px" align="center">类型名称</uni-th>
|
||||
<uni-th width="100px" align="center">规格型号</uni-th>
|
||||
<uni-th width="100px" align="center">在用数</uni-th>
|
||||
<uni-th width="100px" align="center">退料数</uni-th>
|
||||
<uni-th width="100px" align="center">外观</uni-th>
|
||||
</uni-tr>
|
||||
<!-- 表格数据行 -->
|
||||
<uni-tr v-for="(item,index) in typeList" :key="item.id">
|
||||
<uni-td>{{item.typeName}}</uni-td>
|
||||
<uni-td>{{item.typeModel}}</uni-td>
|
||||
<uni-td>{{item.num}}</uni-td>
|
||||
<uni-td>
|
||||
<span>{{item.preNum}}</span>
|
||||
</uni-td>
|
||||
<uni-td>
|
||||
<span>{{item.apDetection}}</span>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<!-- <button class="btn-cont" @click="reject">取消</button> -->
|
||||
<!-- <button class="btn-cont">确认</button> -->
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const taskInfo = ref({})
|
||||
const rowData = ref({})
|
||||
const typeList = ref([])
|
||||
|
||||
|
||||
onLoad((options)=>{
|
||||
console.log(options)
|
||||
taskInfo.value = JSON.parse(options.taskInfo)
|
||||
console.log(taskInfo.value)
|
||||
rowData.value = JSON.parse(options.rowData)
|
||||
console.log(rowData.value)
|
||||
typeList.value = [rowData.value]
|
||||
console.log(typeList.value)
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.accept {
|
||||
padding: 10px;
|
||||
height: 95vh;
|
||||
word-break: break-all;
|
||||
}
|
||||
.card {
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.upload {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 20px;
|
||||
color: #ccc;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 30px;
|
||||
|
||||
.btn-cont {
|
||||
width: 40%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
background-color: #3784fb;
|
||||
color: #fff;
|
||||
border-radius: 20px;
|
||||
// 取消按钮淡蓝色
|
||||
// &:first-child {
|
||||
// background-color: #aacefb;
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
<view class="search" @click="getTableList()">查询</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="addBtn" >编码退料</view>
|
||||
<view class="addBtn" @click="goCode">编码退料</view>
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="addBtn" >数量退料</view>
|
||||
<view class="addBtn" @click="goNum">数量退料</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<div class="table-list-item"
|
||||
|
|
@ -87,11 +87,17 @@ const search = () => {
|
|||
const handleItem = (item) => {
|
||||
console.log('🚀 ~ handleItem ~ item:', item)
|
||||
if (item.manageType == 0) {//编码管理
|
||||
uni.navigateTo({ url: `/pages/back/backCode?taskInfo=${JSON.stringify(taskInfo.value)}` })
|
||||
uni.navigateTo({ url: `/pages/back/backCodeDetail?taskInfo=${JSON.stringify(taskInfo.value)}&rowData=${JSON.stringify(item)}` })
|
||||
} else if(item.manageType == 1) {//数量管理
|
||||
uni.navigateTo({ url: `/pages/back/backNum?taskInfo=${JSON.stringify(taskInfo.value)}` })
|
||||
uni.navigateTo({ url: `/pages/back/backNumDetail?taskInfo=${JSON.stringify(taskInfo.value)}&rowData=${JSON.stringify(item)}` })
|
||||
}
|
||||
}
|
||||
const goCode = () => {
|
||||
uni.navigateTo({ url: `/pages/back/backCode?taskInfo=${JSON.stringify(taskInfo.value)}` })
|
||||
}
|
||||
const goNum = () => {
|
||||
uni.navigateTo({ url: `/pages/back/backNum?taskInfo=${JSON.stringify(taskInfo.value)}` })
|
||||
}
|
||||
onLoad((options)=>{
|
||||
console.log(options)
|
||||
id.value = options.id
|
||||
|
|
@ -105,7 +111,7 @@ onShow(()=>{
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.accept {
|
||||
height: 100%;
|
||||
height: 95vh;
|
||||
word-break: break-all;
|
||||
overflow-y: auto;
|
||||
.complete-btn {
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ onLoad((options) => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.accept {
|
||||
height: 100%;
|
||||
height: 95vh;
|
||||
word-break: break-all;
|
||||
.complete-btn {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,21 @@ export const getBackInfo = (id) => {
|
|||
data:data,
|
||||
})
|
||||
}
|
||||
// 获取协议id
|
||||
export const getAgreementInfoById = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/select/getAgreementInfoById',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增退料单
|
||||
export const insertApp = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/back_apply_info/insertApp',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export default defineConfig({
|
|||
// 在此处编写代理规则
|
||||
'/api': {
|
||||
// target: 'http://192.168.2.76:18080',
|
||||
// target: 'http://192.168.2.246:18080',
|
||||
target: 'http://localhost:18080',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue