新购验收
This commit is contained in:
parent
c1be060973
commit
0ba77429b0
|
|
@ -69,6 +69,13 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "领料出库"
|
"navigationBarTitleText": "领料出库"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "pages/back/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "退料任务"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,209 @@
|
||||||
|
<template>
|
||||||
|
<!-- 退料任务 -->
|
||||||
|
<view class="accept page-common">
|
||||||
|
<view class="complete-btn">
|
||||||
|
<view class="btn" @click="changeTab(1)">
|
||||||
|
<span>已完成</span>
|
||||||
|
<div v-if="active == 1" class="bt-line"></div>
|
||||||
|
</view>
|
||||||
|
<view class="btn" style="margin-left: 120rpx" @click="changeTab(2)">
|
||||||
|
<span>未完成</span>
|
||||||
|
<div v-if="active == 2" class="bt-line"></div>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-row :gutter="24" class="search-form">
|
||||||
|
<uni-col :span="10">
|
||||||
|
<view>
|
||||||
|
<uni-datetime-picker
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
:clear-icon="false"
|
||||||
|
@maskClick="maskClick"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</uni-col>
|
||||||
|
<uni-col :span="10">
|
||||||
|
<view>
|
||||||
|
<uni-easyinput placeholder="请输入项目名称" />
|
||||||
|
</view>
|
||||||
|
</uni-col>
|
||||||
|
<uni-col :span="4">
|
||||||
|
<view class="search" @click="getTableList()">搜索</view>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="table-list-item"
|
||||||
|
v-for="(item, index) in tableList"
|
||||||
|
:key="index"
|
||||||
|
@click="handleItem(item)"
|
||||||
|
>
|
||||||
|
<div class="title">
|
||||||
|
<span style="font-size: 15px; font-weight: 800">退料任务</span>
|
||||||
|
<span :style="{ color: active == 1 ? '#3784fb' : '#ff4d4f' }">{{active == 1 ? '已完成' : '未完成'}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="line"></div>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">申请时间:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.createTime }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">退料单号:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.code }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">退料物资:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.typeName }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">退料单位:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.unitName }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">工程名称:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.proName }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">退料人:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.backPerson }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">联系电话:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.phone }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">已退数量:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
<uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">备注:</uni-col>
|
||||||
|
<uni-col :span="18"
|
||||||
|
><div class="cont">{{ item.remark }}</div></uni-col
|
||||||
|
>
|
||||||
|
</uni-row>
|
||||||
|
|
||||||
|
<!-- <uni-row :gutter="24">
|
||||||
|
<uni-col :span="6">验收数量:</uni-col>
|
||||||
|
<uni-col :span="18"><div class="cont"></div></uni-col>
|
||||||
|
</uni-row> -->
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { getBackList } from '../../services/back.js'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
const active = ref(1)
|
||||||
|
const tableList = ref([])
|
||||||
|
const taskStatus = ref("2")
|
||||||
|
|
||||||
|
const getTableList = () => {
|
||||||
|
let obj = {
|
||||||
|
"pageNum":"1",
|
||||||
|
"pageSize":"10",
|
||||||
|
"taskStatus":taskStatus.value
|
||||||
|
}
|
||||||
|
console.log(obj)
|
||||||
|
getBackList(obj).then(res => {
|
||||||
|
tableList.value = res.rows;
|
||||||
|
console.log(tableList.value)
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeTab = (index) => {
|
||||||
|
active.value = index
|
||||||
|
if (index == 1) {
|
||||||
|
taskStatus.value = '2'
|
||||||
|
getTableList()
|
||||||
|
} else if (index == 2) {
|
||||||
|
taskStatus.value = '0'
|
||||||
|
getTableList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const maskClick = () => {}
|
||||||
|
const handleItem = (item) => {
|
||||||
|
console.log('🚀 ~ handleItem ~ item:', item)
|
||||||
|
uni.navigateTo({ url: `/pages/new-purchase/accept/acceptDetails?id=${item.id}&taskId=${item.taskId}` })
|
||||||
|
}
|
||||||
|
onLoad((options) => {
|
||||||
|
getTableList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.accept {
|
||||||
|
height: 100%;
|
||||||
|
word-break: break-all;
|
||||||
|
.complete-btn {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
.btn {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
.bt-line {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 4rpx;
|
||||||
|
background-color: #3784fb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search {
|
||||||
|
height: 70rpx;
|
||||||
|
background-color: #3784fb;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 70rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.table-list-item {
|
||||||
|
margin: 20rpx 0;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
min-height: 300rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.cont {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
line-height: 1.9;
|
||||||
|
}
|
||||||
|
.line {
|
||||||
|
margin: 20rpx 0;
|
||||||
|
height: 1px;
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -47,6 +47,7 @@ import { getPurchaseInfo } from '../../../services/purchase.js';
|
||||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const searchValue = ref('')
|
const searchValue = ref('')
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
const taskId = ref('')
|
const taskId = ref('')
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,14 @@
|
||||||
<span>{{ formData.purchaseNum }}</span>
|
<span>{{ formData.purchaseNum }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<!-- <uni-forms-item label="质保材料:" name="warrantyMaterial">
|
<uni-forms-item label="质保材料:" name="warnDocuments">
|
||||||
<uni-easyinput v-model="warrantyMaterial" placeholder="请输入质保材料" />
|
<uni-easyinput v-model="warnDocuments" placeholder="请输入质保材料" />
|
||||||
</uni-forms-item> -->
|
</uni-forms-item>
|
||||||
|
|
||||||
<uni-forms-item label="验收结论:" name="checkResult">
|
<uni-forms-item label="验收结论:" name="checkResult">
|
||||||
<uni-easyinput v-model="checkResult" placeholder="请输入验收结论" />
|
<uni-data-select v-model="checkResult"
|
||||||
|
:localdata="range">
|
||||||
|
</uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<uni-forms-item label="原因:" name="reason">
|
<uni-forms-item label="原因:" name="reason">
|
||||||
|
|
@ -27,7 +29,11 @@
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<uni-forms-item label="上传图片:" name="imgList">
|
<uni-forms-item label="上传图片:" name="imgList">
|
||||||
<div class="upload">+</div>
|
<!-- <uni-file-picker fileMediatype="image" :image-styles="imageStyles"/> -->
|
||||||
|
<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-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -43,8 +49,18 @@
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { innerVerify } from '../../../services/purchase.js';
|
import { innerVerify } from '../../../services/purchase.js';
|
||||||
|
import { baseURL } from '@/utils/http'
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const checkResult = ref("")
|
const checkResult = ref("合格")
|
||||||
|
const warnDocuments = ref("")
|
||||||
|
const reason = ref("")
|
||||||
|
const imgBeseUrl = ref("")//页面展示选中图片
|
||||||
|
const bmFileInfos = ref([])//请求图片参数
|
||||||
|
|
||||||
|
|
||||||
|
const range = reactive([{value:"合格",text:"合格"},{value:"不合格",text:"不合格" },])
|
||||||
|
|
||||||
|
|
||||||
//合格
|
//合格
|
||||||
const pass = () => {
|
const pass = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
|
|
@ -53,6 +69,9 @@ const pass = () => {
|
||||||
"manageType":formData.value.manageType,
|
"manageType":formData.value.manageType,
|
||||||
"status":3,
|
"status":3,
|
||||||
"checkResult":checkResult.value,
|
"checkResult":checkResult.value,
|
||||||
|
"reason":reason.value,
|
||||||
|
"warnDocuments":warnDocuments.value,
|
||||||
|
"bmFileInfos":bmFileInfos.value
|
||||||
}
|
}
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
let param = {
|
let param = {
|
||||||
|
|
@ -83,6 +102,9 @@ const reject = () => {
|
||||||
"manageType":formData.value.manageType,
|
"manageType":formData.value.manageType,
|
||||||
"status":1,
|
"status":1,
|
||||||
"checkResult":checkResult.value,
|
"checkResult":checkResult.value,
|
||||||
|
"reason":reason.value,
|
||||||
|
"warnDocuments":warnDocuments.value,
|
||||||
|
"bmFileInfos":bmFileInfos.value
|
||||||
}
|
}
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
let param = {
|
let param = {
|
||||||
|
|
@ -105,6 +127,54 @@ const reject = () => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传
|
||||||
|
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)=>{
|
onLoad((options)=>{
|
||||||
console.log(options)
|
console.log(options)
|
||||||
formData.value = JSON.parse(options.item)
|
formData.value = JSON.parse(options.item)
|
||||||
|
|
@ -124,8 +194,8 @@ onLoad((options)=>{
|
||||||
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2upx 4upx 0 rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
.upload {
|
.upload {
|
||||||
width: 60px;
|
width: 80px;
|
||||||
height: 60px;
|
height: 80px;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { http } from '@/utils/http'
|
||||||
|
|
||||||
|
// 退料任务列表接口
|
||||||
|
export const getBackList = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'GET',
|
||||||
|
url: '/material/back_apply_info/list',
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6,8 +6,7 @@ import { useMemberStore } from '@/stores'
|
||||||
* baseURL 设置请求ip地址和端口
|
* baseURL 设置请求ip地址和端口
|
||||||
*/
|
*/
|
||||||
const ENV = process.env.NODE_ENV
|
const ENV = process.env.NODE_ENV
|
||||||
const baseURL = ENV === 'development' ? 'http://192.168.2.246:18080' : '***'
|
export const baseURL = ENV === 'development' ? '/api' : '***'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||||
*/
|
*/
|
||||||
|
|
@ -96,4 +95,4 @@ export const http = (options) => {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue