2023-12-20 15:15:23 +08:00
|
|
|
<template>
|
|
|
|
|
<view>
|
2024-04-20 17:39:08 +08:00
|
|
|
<view class="search-bar">
|
|
|
|
|
<uni-easyinput suffixIcon="search" v-model="exitIpt" placeholder="请输入关键字" @iconClick="searchKeyword"></uni-easyinput>
|
|
|
|
|
</view>
|
2024-03-13 17:55:34 +08:00
|
|
|
<uni-swipe-action>
|
|
|
|
|
<uni-swipe-action-item
|
|
|
|
|
:right-options="options"
|
|
|
|
|
class="single-fetch"
|
|
|
|
|
v-for="(fetch, index) in fetchMaterialList"
|
|
|
|
|
:key="index"
|
|
|
|
|
@click="optionClick($event, fetch.id)"
|
2023-12-23 23:21:42 +08:00
|
|
|
>
|
2024-03-13 17:55:34 +08:00
|
|
|
<view class="fetch-upper">
|
|
|
|
|
<!-- {{ fetch.taskStatus }} -->
|
|
|
|
|
<!-- <checkbox-group
|
|
|
|
|
v-show="fetch.taskStatus != '35'"
|
|
|
|
|
style="margin-right: 15rpx;"
|
|
|
|
|
@change="checkClick(fetch)"
|
|
|
|
|
>
|
|
|
|
|
<checkbox :checked="fetch.checked" />
|
|
|
|
|
</checkbox-group> -->
|
|
|
|
|
<view class="upper-lef">
|
2024-04-07 09:39:22 +08:00
|
|
|
{{ fetch.backPerson == null ? '' : fetch.backPerson.slice(0, 1) }}
|
2024-03-13 17:55:34 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="upper-rig">
|
|
|
|
|
<h4 style="font-size: 16px;">{{ fetch.backPerson }}</h4>
|
|
|
|
|
<h4 style="color: #989898;">{{ fetch.unitName }}</h4>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view
|
|
|
|
|
class="fetch-lower"
|
|
|
|
|
@click="seeDetail(fetch)"
|
|
|
|
|
>
|
|
|
|
|
<view>
|
|
|
|
|
<span>退料单号</span>
|
|
|
|
|
<h4>{{ fetch.code }}</h4>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<span>退料工程</span>
|
|
|
|
|
<h4>{{ fetch.lotName }}</h4>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<span>工机具类型</span>
|
|
|
|
|
<h4>{{ fetch.typeName }}</h4>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<span>申请日期</span>
|
|
|
|
|
<h4>{{ fetch.backTime }}</h4>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="fetch-btns">
|
|
|
|
|
<view
|
|
|
|
|
style="background-color: #3788FF;"
|
|
|
|
|
@click="seeDetail(fetch.taskId)"
|
|
|
|
|
v-show="fetch.taskStatus != '33'"
|
|
|
|
|
>
|
|
|
|
|
<uni-icons style="color: #fff;" type="eye" size="36"></uni-icons>
|
|
|
|
|
查看
|
|
|
|
|
</view>
|
|
|
|
|
<view
|
|
|
|
|
style="background-color: #FCA30D;"
|
|
|
|
|
v-show="fetch.taskStatus != '33'"
|
|
|
|
|
@click="seeExam(fetch)"
|
|
|
|
|
>
|
|
|
|
|
<uni-icons style="color: #fff;" type="auth" size="36"></uni-icons>
|
|
|
|
|
审核
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
<view class="sticky-area">
|
|
|
|
|
<!-- <image src="/static/passed.png" v-show="fetch.taskStatus == '40'" mode=""></image> -->
|
|
|
|
|
<!-- <image src="/static/noPass.png" v-show="fetch.taskStatus == '40'" mode=""></image> -->
|
|
|
|
|
<image src="/static/accomplished.png" v-show="fetch.taskStatus == '40'" mode=""></image>
|
|
|
|
|
<image src="/static/notAccomplished.png" v-show="fetch.taskStatus != '40'" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-swipe-action-item>
|
|
|
|
|
</uni-swipe-action>
|
2023-12-20 15:15:23 +08:00
|
|
|
<!-- <view class="btm-sticky">
|
|
|
|
|
<view class="checked">
|
|
|
|
|
<checkbox-group @tap="checkAll" style="margin-right: 15rpx;">
|
|
|
|
|
<checkbox :checked="allChecked" />
|
|
|
|
|
</checkbox-group>
|
|
|
|
|
<text>全选</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view
|
|
|
|
|
class="exam"
|
|
|
|
|
@click="toggleExam"
|
|
|
|
|
>
|
|
|
|
|
审核
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-12-23 23:21:42 +08:00
|
|
|
import { basePath } from '../../public'
|
2023-12-20 15:15:23 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
allChecked: false,
|
|
|
|
|
fetchMaterialList: [
|
2023-12-23 23:21:42 +08:00
|
|
|
|
2023-12-20 15:15:23 +08:00
|
|
|
],
|
2024-03-13 17:55:34 +08:00
|
|
|
examList: [],
|
|
|
|
|
exitIpt: '',
|
|
|
|
|
options:[
|
|
|
|
|
{
|
|
|
|
|
text: '查看',
|
|
|
|
|
style: {
|
|
|
|
|
backgroundColor: '#007aff'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
listData: function () {
|
|
|
|
|
if (!this.exitIpt) {
|
|
|
|
|
return this.fetchMaterialList;
|
|
|
|
|
}
|
|
|
|
|
return this.fetchMaterialList.filter((item) => {
|
|
|
|
|
return item.backPerson.includes(this.exitIpt);
|
|
|
|
|
});
|
2023-12-20 15:15:23 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-03-13 17:55:34 +08:00
|
|
|
optionClick (e, id) {
|
|
|
|
|
console.log(id);
|
2023-12-20 15:15:23 +08:00
|
|
|
uni.navigateTo({
|
2024-03-13 17:55:34 +08:00
|
|
|
url: `/pages/seeBackMaterialDetail/seeBackMaterialDetail?id=${id}`
|
2023-12-20 15:15:23 +08:00
|
|
|
})
|
|
|
|
|
},
|
2024-03-13 17:55:34 +08:00
|
|
|
seeDetail (item) {
|
|
|
|
|
if (item.taskStatus == 40) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: '退料已完成,请勿再点击!'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/backMaterialReceiveDetail/backMaterialReceiveDetail?id=${item.id}&taskId=${item.taskId}&taskStatus=${item.taskStatus}`
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-12-20 15:15:23 +08:00
|
|
|
/* checkAll() {
|
|
|
|
|
this.allChecked = !this.allChecked
|
|
|
|
|
if (this.allChecked) {
|
|
|
|
|
this.fetchMaterialList.map(item => {
|
|
|
|
|
if (item.checked == false) {
|
|
|
|
|
item.checked = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.fetchMaterialList.map(item => {
|
|
|
|
|
if (item.checked == true) {
|
|
|
|
|
item.checked = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
checkClick(item) {
|
|
|
|
|
item.checked = !item.checked
|
|
|
|
|
if (!item.checked) {
|
|
|
|
|
this.allChecked = false
|
|
|
|
|
} else {
|
|
|
|
|
const goods = this.fetchMaterialList.every(item => {
|
|
|
|
|
return item.checked === true
|
|
|
|
|
})
|
|
|
|
|
if (goods) {
|
|
|
|
|
this.allChecked = true
|
|
|
|
|
} else {
|
|
|
|
|
this.allChecked = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, */
|
|
|
|
|
toggleExam () {
|
|
|
|
|
let that = this
|
|
|
|
|
that.examList = that.fetchMaterialList.filter((item) => {
|
|
|
|
|
return item.checked == true
|
|
|
|
|
}).map((subItem) => {
|
|
|
|
|
return {
|
|
|
|
|
name: subItem['name'],
|
|
|
|
|
number: subItem['fetchNum']
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log(that.examList);
|
|
|
|
|
},
|
|
|
|
|
closePopup () {
|
|
|
|
|
this.$refs.popup.close()
|
|
|
|
|
},
|
|
|
|
|
seeExam (name) {
|
|
|
|
|
console.log(name);
|
|
|
|
|
this.$refs.popup.open()
|
|
|
|
|
},
|
|
|
|
|
formSubmit () {
|
|
|
|
|
let that = this
|
|
|
|
|
that.$refs.examForm.validate().then(formData => {
|
|
|
|
|
console.log(formData);
|
|
|
|
|
that.$refs.popup.close()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
ifPassChange (e) {
|
|
|
|
|
let that = this
|
|
|
|
|
console.log(e);
|
|
|
|
|
if (e == 1) {
|
|
|
|
|
that.rules = {
|
|
|
|
|
ifPass: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
errorMessage: '请选择是否通过!'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
noPassReason: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
errorMessage: '请填写不通过原因!'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
that.examFormData.noPassReason = ''
|
|
|
|
|
that.rules = {
|
|
|
|
|
ifPass: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
errorMessage: '请选择是否通过!'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-20 17:39:08 +08:00
|
|
|
},
|
|
|
|
|
getList (keyWord) {
|
2024-05-06 15:54:50 +08:00
|
|
|
console.log(keyWord);
|
2024-04-20 17:39:08 +08:00
|
|
|
let that = this
|
|
|
|
|
// 获取退料接收列表
|
|
|
|
|
that.$api.backMaterialReceive.backMaterialReceiveList({
|
|
|
|
|
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
|
|
|
|
flag: 0,
|
|
|
|
|
keyWord
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
if (res.data.data.length == 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: '未查询到相关数据!'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
that.fetchMaterialList = res.data.data
|
|
|
|
|
console.log("fetchMaterialList",that.fetchMaterialList)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2024-03-13 17:55:34 +08:00
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
2024-04-20 17:39:08 +08:00
|
|
|
title: res.data.msg
|
2024-03-13 17:55:34 +08:00
|
|
|
})
|
|
|
|
|
}
|
2024-04-20 17:39:08 +08:00
|
|
|
}).catch(err => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
searchKeyword () {
|
|
|
|
|
this.getList(this.exitIpt)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.getList('')
|
2023-12-20 15:15:23 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
body{
|
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding-bottom: 10vh;
|
|
|
|
|
}
|
2024-03-13 17:55:34 +08:00
|
|
|
.search-bar{
|
|
|
|
|
width: 95%;
|
2024-04-22 13:18:44 +08:00
|
|
|
margin: 20rpx auto;
|
2024-03-13 17:55:34 +08:00
|
|
|
}
|
2023-12-20 15:15:23 +08:00
|
|
|
.single-fetch{
|
|
|
|
|
width: 95%;
|
|
|
|
|
margin: 20rpx auto;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
box-sizing: border-box;
|
2024-03-13 17:55:34 +08:00
|
|
|
padding: 5rpx;
|
2023-12-20 15:15:23 +08:00
|
|
|
position: relative;
|
|
|
|
|
.fetch-upper{
|
|
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
border-bottom: 1px solid #D7D7D7;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.upper-lef{
|
|
|
|
|
width: 12%;
|
|
|
|
|
height: 5vh;
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: #3789FD;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
}
|
|
|
|
|
.upper-rig{
|
|
|
|
|
flex: 1;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 10rpx 20rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
h4{
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.fetch-lower{
|
|
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
view{
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 15rpx;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
span{
|
|
|
|
|
color: #9D9D9D;
|
|
|
|
|
padding-right: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
h4{
|
|
|
|
|
color: #000;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
view:last-child{
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-12-23 23:21:42 +08:00
|
|
|
.fetch-btns{
|
2023-12-20 15:15:23 +08:00
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
view{
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 8rpx 25rpx;
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
margin-right: 15rpx;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
view:last-child{
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
}
|
2023-12-23 23:21:42 +08:00
|
|
|
}
|
2023-12-20 15:15:23 +08:00
|
|
|
.sticky-area{
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 0;
|
2024-03-13 17:55:34 +08:00
|
|
|
width: 10vh;
|
|
|
|
|
height: 9vh;
|
2023-12-20 15:15:23 +08:00
|
|
|
image{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* .btm-sticky{
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15rpx 30rpx;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.checked{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.exam{
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 10rpx 50rpx;
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
background-color: #3788FF;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.popup{
|
|
|
|
|
width: 80vw;
|
|
|
|
|
height: 60vh;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
|
|
|
|
|
.pop-top{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 5vh;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 0 25rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.select-area{
|
|
|
|
|
width: 85%;
|
|
|
|
|
margin: 40rpx auto;
|
|
|
|
|
.submit-btn{
|
|
|
|
|
background-color: #409EFF;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
</style>
|