新增仓管可以查看待审核的配件申请单

This commit is contained in:
许允枞 2024-10-28 18:04:27 +08:00
parent 56305348d1
commit 780b080efe
4 changed files with 74 additions and 102 deletions

View File

@ -64,20 +64,12 @@ export default {
} }
}, },
computed: { computed: {
projectName() {
if (this.order && this.order.projectList && this.order.projectList.length > 0) {
return this.order.projectList.map(m => m.name).join(',')
}
return ''
}
}, },
data() { data() {
return { return {
soStatusText:'', soStatusText:'',
soiIds:[], soiIds:[],
goodsNames:'',
soTime:'', soTime:'',
soiCount:'',
goodsList:[] goodsList:[]
} }
}, },
@ -88,29 +80,6 @@ export default {
onLoad() { onLoad() {
}, },
methods: { methods: {
getDictTextByCodeAndValue(soStatus) {
getDictTextByCodeAndValue('repair_so_status', soStatus)
.then(value => {
this.soStatusText = value; // data
})
.catch(error => {
this.soStatusText = "未知";
console.error(error);
});
},
/**
* 查看详情
*/
gotoDetail() {
uni.navigateTo({
url: '/pages-warehouse/inOutWarehouse/part?soId=' + this.order.id
})
},
gotoInWare(){
uni.navigateTo({
url: '/pages-order/inWare/inWare?soId=' + this.order.id
})
},
getSoiDetail(){ getSoiDetail(){
request({ request({
url: '/admin-api/repair/so/get', url: '/admin-api/repair/so/get',
@ -119,8 +88,6 @@ export default {
id: this.order.id id: this.order.id
} }
}).then(res => { }).then(res => {
console.log('这是子表',res)
console.log(res)
res.data.goodsList.forEach(item => { res.data.goodsList.forEach(item => {
this.soiIds.push(item.id) this.soiIds.push(item.id)
}) })
@ -134,12 +101,7 @@ export default {
params: { params: {
ids: this.soiIds.join(',') ids: this.soiIds.join(',')
} }
}).then((res) => { // }).then((res) => {
console.log('配件信息', res.data)
// const names = []
const names = res.data.map(item => item.repairWares.name);
this.goodsNames = names.join(', ');
this.soiCount = res.data.reduce((sum, item) => sum + (item.inCount || 0), 0);
this.goodsList = res.data this.goodsList = res.data
}) })
} }

View File

@ -2,23 +2,6 @@
<view class="container"> <view class="container">
<VNavigationBar background-color="#fff" title="入库单" title-color="#333"></VNavigationBar> <VNavigationBar background-color="#fff" title="入库单" title-color="#333"></VNavigationBar>
<view class="body"> <view class="body">
<!-- <view class="tabList">-->
<!-- <view v-for="(item, index) in tabList" :key="index" :class="{actived: item.id === activeKey}" class="tabItem"-->
<!-- @click.stop="changeTabFun(item.id)">-->
<!-- {{ item.title }}-->
<!-- <view v-if="activeKey === item.id" class="activeLine"></view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="orderList" v-if="!isRepairWarehouse">-->
<!-- <scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"-->
<!-- refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">-->
<!-- <order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh"-->
<!-- @startWork="startWork"></order-card>-->
<!-- <view style="text-align: center" v-if="orderList.length==0">-->
<!-- <image class="" src="@/static/images/nothing.png"></image>-->
<!-- </view>-->
<!-- </scroll-view>-->
<!-- </view>-->
<view class="orderList"> <view class="orderList">
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus" <scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered"> refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
@ -245,7 +228,7 @@ export default {
.orderList { .orderList {
//padding: 30rpx 0; //padding: 30rpx 0;
padding-top: 10rpx; padding-top: 10rpx;
height: calc(100% - 90rpx); height: calc(100% - 30rpx);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
row-gap: 20rpx; row-gap: 20rpx;

View File

@ -17,7 +17,8 @@
<image mode="aspectFita" src="@/pages-home/static/msg.png" style="width: 48rpx;height: 48rpx"></image> <image mode="aspectFita" src="@/pages-home/static/msg.png" style="width: 48rpx;height: 48rpx"></image>
<view class="msg-num" v-if="noReadNum>0">{{ noReadNum }}</view> <view class="msg-num" v-if="noReadNum>0">{{ noReadNum }}</view>
</view> </view>
<image @click="showUserDetail" mode="aspectFita" src="/static/icons/more.png" style="width: 48rpx;height: 48rpx"></image> <image @click="showUserDetail" mode="aspectFita" src="/static/icons/more.png"
style="width: 48rpx;height: 48rpx"></image>
</view> </view>
<!-- 通知公告 --> <!-- 通知公告 -->
<view class="notice-dom" v-if="noticeNum>0" @click="gotoNotice"> <view class="notice-dom" v-if="noticeNum>0" @click="gotoNotice">
@ -30,12 +31,14 @@
<view class="body-top"> <view class="body-top">
<view class="body-top-search"> <view class="body-top-search">
<input class="body-top-search-input" v-model="queryParams.query" placeholder="工单号、车牌号、联系电话" placeholder-style="font-size: 28rpx" <input class="body-top-search-input" v-model="queryParams.query" placeholder="工单号、车牌号、联系电话"
placeholder-style="font-size: 28rpx"
type="text"> type="text">
<text @click="onRefresherrefresh">搜索</text> <text @click="onRefresherrefresh">搜索</text>
</view> </view>
<view class="body-top-tab"> <view class="body-top-tab">
<view v-for="(item, index) in tabList" @click="activeTab(index)" :key="index" :class="{ active: active === index }" <view v-for="(item, index) in tabList" @click="activeTab(index)" :key="index"
:class="{ active: active === index }"
class="body-top-tab-item"> class="body-top-tab-item">
{{ item.name }} {{ item.name }}
<view v-if="index === active" class="activeLine"></view> <view v-if="index === active" class="activeLine"></view>
@ -66,11 +69,15 @@
</view> </view>
<view class="order-footer"> <view class="order-footer">
<template v-if="!queryParams.isBack"> <template v-if="!queryParams.isBack && isShow">
<view @click="inOutWareHouse(item,true)" class="order-btn yes">通知领料</view> <view @click="inOutWareHouse(item,true)" class="order-btn yes">通知领料</view>
<!-- <view class="order-btn yes">采购</view>--> <!-- <view class="order-btn yes">采购</view>-->
</template> </template>
<template v-else> <template v-else-if="!queryParams.isBack && !isShow">
<view @click="inOutWareHouse(item,true)" class="order-btn yes">查看申请</view>
<!-- <view class="order-btn yes">采购</view>-->
</template>
<template v-else-if="queryParams.isBack && isShow">
<view @click="inOutWareHouse(item,false)" class="order-btn yes">通知退料</view> <view @click="inOutWareHouse(item,false)" class="order-btn yes">通知退料</view>
</template> </template>
</view> </view>
@ -115,6 +122,9 @@ export default {
{ {
name: '退配件' name: '退配件'
}, },
{
name: '待审核'
},
], ],
// //
queryParams: { queryParams: {
@ -135,6 +145,7 @@ export default {
avatar: undefined, avatar: undefined,
nickname: '' nickname: ''
}, },
isShow: true,
active: 0, active: 0,
@ -187,8 +198,16 @@ export default {
this.active = index this.active = index
if (index == 1) { if (index == 1) {
this.queryParams.isBack = true this.queryParams.isBack = true
} else { this.queryParams.isToBeReviewed = undefined
this.isShow = true
} else if (index == 2) {
this.isShow = false
this.queryParams.isToBeReviewed = true
this.queryParams.isBack = undefined this.queryParams.isBack = undefined
} else {
this.isShow = true
this.queryParams.isBack = undefined
this.queryParams.isToBeReviewed = undefined
} }
this.onRefresherrefresh() this.onRefresherrefresh()
}, },
@ -256,7 +275,7 @@ export default {
formData.isReceive = isReceive formData.isReceive = isReceive
setJSONData("applyWaresForm", formData) setJSONData("applyWaresForm", formData)
uni.navigateTo({ uni.navigateTo({
url: '/pages-warehouse/inOutWarehouse/inOutWarehouse' url: '/pages-warehouse/inOutWarehouse/inOutWarehouse?isToBeReviewed=' + this.isShow
}) })
}, },
@ -381,6 +400,7 @@ export default {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
} }
.center-text { .center-text {
width: calc(100% - 130rpx); width: calc(100% - 130rpx);
overflow: hidden; overflow: hidden;
@ -423,6 +443,7 @@ export default {
.msg-box { .msg-box {
position: relative; position: relative;
margin-right: 40rpx; margin-right: 40rpx;
.msg-num { .msg-num {
position: absolute; position: absolute;
right: -15rpx; right: -15rpx;
@ -656,6 +677,7 @@ export default {
border-radius: 8rpx 8rpx 8rpx 8rpx; border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 0 30rpx 30rpx; padding: 0 30rpx 30rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.order-top { .order-top {
padding: 30rpx 0; padding: 30rpx 0;
display: flex; display: flex;
@ -721,6 +743,7 @@ export default {
font-size: 28rpx; font-size: 28rpx;
border: 2rpx solid #0174F6; border: 2rpx solid #0174F6;
color: #0174F6; color: #0174F6;
&.no { &.no {
color: #333; color: #333;
border: 2rpx solid #858BA0; border: 2rpx solid #858BA0;

View File

@ -17,7 +17,7 @@
<text class="repairDesc">申请数量 <text class="repairDesc">申请数量
<text class="repairUnit">{{ item.waresCount }}</text> <text class="repairUnit">{{ item.waresCount }}</text>
</text> </text>
<view class="repairBtns"> <view class="repairBtns" v-if="isToBeReviewed">
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon> <u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
<text class="repairNum">{{ item.thisNum }}</text> <text class="repairNum">{{ item.thisNum }}</text>
<u-icon color="#0174F6" name="plus-circle-fill" size="24" @click="addNum(item)"></u-icon> <u-icon color="#0174F6" name="plus-circle-fill" size="24" @click="addNum(item)"></u-icon>
@ -35,7 +35,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer" v-if="isToBeReviewed">
<text class="label"></text> <text class="label"></text>
<text class="repairNum"></text> <text class="repairNum"></text>
<!-- <view class="submit" @click="toPart">采购</view>--> <!-- <view class="submit" @click="toPart">采购</view>-->
@ -64,7 +64,8 @@ export default {
isReceive:true, isReceive:true,
// //
formData:{}, formData:{},
active: '' active: '',
isToBeReviewed:true
}; };
}, },
onLoad(data) { onLoad(data) {
@ -74,6 +75,9 @@ export default {
this.twId = this.formData.id this.twId = this.formData.id
this.init() this.init()
} }
if (data.isToBeReviewed) {
this.isToBeReviewed = JSON.parse(data.isToBeReviewed)
}
}, },
computed: {}, computed: {},