新增仓管可以查看待审核的配件申请单
This commit is contained in:
parent
56305348d1
commit
780b080efe
@ -64,20 +64,12 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
projectName() {
|
||||
if (this.order && this.order.projectList && this.order.projectList.length > 0) {
|
||||
return this.order.projectList.map(m => m.name).join(',')
|
||||
}
|
||||
return ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
soStatusText:'',
|
||||
soiIds:[],
|
||||
goodsNames:'',
|
||||
soTime:'',
|
||||
soiCount:'',
|
||||
goodsList:[]
|
||||
}
|
||||
},
|
||||
@ -88,29 +80,6 @@ export default {
|
||||
onLoad() {
|
||||
},
|
||||
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(){
|
||||
request({
|
||||
url: '/admin-api/repair/so/get',
|
||||
@ -119,8 +88,6 @@ export default {
|
||||
id: this.order.id
|
||||
}
|
||||
}).then(res => {
|
||||
console.log('这是子表',res)
|
||||
console.log(res)
|
||||
res.data.goodsList.forEach(item => {
|
||||
this.soiIds.push(item.id)
|
||||
})
|
||||
@ -134,12 +101,7 @@ export default {
|
||||
params: {
|
||||
ids: this.soiIds.join(',')
|
||||
}
|
||||
}).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);
|
||||
}).then((res) => {
|
||||
this.goodsList = res.data
|
||||
})
|
||||
}
|
||||
|
@ -2,23 +2,6 @@
|
||||
<view class="container">
|
||||
<VNavigationBar background-color="#fff" title="入库单" title-color="#333"></VNavigationBar>
|
||||
<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">
|
||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
@ -245,7 +228,7 @@ export default {
|
||||
.orderList {
|
||||
//padding: 30rpx 0;
|
||||
padding-top: 10rpx;
|
||||
height: calc(100% - 90rpx);
|
||||
height: calc(100% - 30rpx);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
|
@ -15,14 +15,15 @@
|
||||
</view>
|
||||
<view class="msg-box" @click="gotoMsg">
|
||||
<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>
|
||||
<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 class="notice-dom" v-if="noticeNum>0" @click="gotoNotice">
|
||||
<view class="notice-box">
|
||||
<image class="left-img" src="@/pages-home/static/notice.png" ></image>
|
||||
<image class="left-img" src="@/pages-home/static/notice.png"></image>
|
||||
<view class="center-text">你有{{ noticeNum }}条来自平台的通知公告</view>
|
||||
<u-icon style="width: 20rpx" color="#999" name="arrow-right" size="12"></u-icon>
|
||||
</view>
|
||||
@ -30,12 +31,14 @@
|
||||
|
||||
<view class="body-top">
|
||||
<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">
|
||||
<text @click="onRefresherrefresh">搜索</text>
|
||||
</view>
|
||||
<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">
|
||||
{{ item.name }}
|
||||
<view v-if="index === active" class="activeLine"></view>
|
||||
@ -51,7 +54,7 @@
|
||||
<view v-for="(item, index) in ticketWares" :key="index" class="orderItem">
|
||||
<view class="order-top">
|
||||
<view class="order-top-left">
|
||||
<text class="order-top-name">{{ item.repairName}}{{'配件申请单'}}</text>
|
||||
<text class="order-top-name">{{ item.repairName }}{{ '配件申请单' }}</text>
|
||||
<text class="order-top-date">{{ item.createTimeStr }}</text>
|
||||
</view>
|
||||
<text class="order-status">{{ item.statusStr }}</text>
|
||||
@ -66,11 +69,15 @@
|
||||
</view>
|
||||
|
||||
<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 class="order-btn yes">采购</view>-->
|
||||
<!-- <view class="order-btn yes">采购</view>-->
|
||||
</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>
|
||||
</template>
|
||||
</view>
|
||||
@ -98,7 +105,7 @@ import {
|
||||
getTenantId,
|
||||
setJSONData
|
||||
} from '@/utils/auth'
|
||||
import {getDictTextByCodeAndValue,formatDate,formatTimestamp} from "@/utils/utils";
|
||||
import {getDictTextByCodeAndValue, formatDate, formatTimestamp} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -115,16 +122,19 @@ export default {
|
||||
{
|
||||
name: '退配件'
|
||||
},
|
||||
{
|
||||
name: '待审核'
|
||||
},
|
||||
],
|
||||
//配件单查询条件
|
||||
queryParams:{
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
query: null,
|
||||
type: "01",
|
||||
},
|
||||
//配件单列表
|
||||
ticketWares:[],
|
||||
ticketWares: [],
|
||||
//数量
|
||||
total: 0,
|
||||
//下拉刷新状态
|
||||
@ -135,6 +145,7 @@ export default {
|
||||
avatar: undefined,
|
||||
nickname: ''
|
||||
},
|
||||
isShow: true,
|
||||
|
||||
active: 0,
|
||||
|
||||
@ -144,9 +155,9 @@ export default {
|
||||
richTextHtml: null,
|
||||
defaultAvatar: require('@/static/icons/avatar.png'),
|
||||
//未读消息数量
|
||||
noReadNum:0,
|
||||
noReadNum: 0,
|
||||
//通知公告数量
|
||||
noticeNum:0,
|
||||
noticeNum: 0,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -174,7 +185,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
gotoMsg(){
|
||||
gotoMsg() {
|
||||
//去消息中心
|
||||
uni.navigateTo({
|
||||
url: '/pages-home/msg/message'
|
||||
@ -183,12 +194,20 @@ export default {
|
||||
/**
|
||||
* 领配件、退配件Tab页
|
||||
*/
|
||||
activeTab(index){
|
||||
activeTab(index) {
|
||||
this.active = index
|
||||
if (index == 1){
|
||||
if (index == 1) {
|
||||
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
|
||||
} else {
|
||||
this.isShow = true
|
||||
this.queryParams.isBack = undefined
|
||||
this.queryParams.isToBeReviewed = undefined
|
||||
}
|
||||
this.onRefresherrefresh()
|
||||
},
|
||||
@ -206,15 +225,15 @@ export default {
|
||||
/**
|
||||
* 配件单查询
|
||||
*/
|
||||
async getTicketWares(){
|
||||
async getTicketWares() {
|
||||
request({
|
||||
url: '/admin-api/repair/tw/page',
|
||||
method: 'get',
|
||||
params: this.queryParams
|
||||
}).then((res)=>{
|
||||
if (res.code == 200){
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.rows.map((item) => {
|
||||
getDictTextByCodeAndValue("ticket_wares_status",item.status).then(value => {
|
||||
getDictTextByCodeAndValue("ticket_wares_status", item.status).then(value => {
|
||||
item.statusStr = value
|
||||
}).catch(error => {
|
||||
item.statusStr = "未知"
|
||||
@ -252,18 +271,18 @@ export default {
|
||||
/**
|
||||
* 配件出库
|
||||
*/
|
||||
inOutWareHouse(formData,isReceive){
|
||||
inOutWareHouse(formData, isReceive) {
|
||||
formData.isReceive = isReceive
|
||||
setJSONData("applyWaresForm",formData)
|
||||
setJSONData("applyWaresForm", formData)
|
||||
uni.navigateTo({
|
||||
url: '/pages-warehouse/inOutWarehouse/inOutWarehouse'
|
||||
url: '/pages-warehouse/inOutWarehouse/inOutWarehouse?isToBeReviewed=' + this.isShow
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 配件出库操作
|
||||
*/
|
||||
handlePass(row){
|
||||
handlePass(row) {
|
||||
//组装提交参数
|
||||
const formData = {...row}
|
||||
|
||||
@ -287,20 +306,20 @@ export default {
|
||||
* 获取未读消息数量
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getNoReadNum(){
|
||||
async getNoReadNum() {
|
||||
await request({
|
||||
url: "/admin-api/system/notify-message/get-unread-count",
|
||||
method: "GET"
|
||||
}).then((res) => {
|
||||
if(res.code==200){
|
||||
this.noReadNum = res.data>99?99:res.data
|
||||
if (res.code == 200) {
|
||||
this.noReadNum = res.data > 99 ? 99 : res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转通知公告列表页
|
||||
*/
|
||||
gotoNotice(){
|
||||
gotoNotice() {
|
||||
uni.navigateTo({
|
||||
url: '/pages-home/notice/notice'
|
||||
})
|
||||
@ -308,20 +327,20 @@ export default {
|
||||
/**
|
||||
* 查通知公告--查数量
|
||||
*/
|
||||
async getNoticeList(){
|
||||
async getNoticeList() {
|
||||
const res = await request({
|
||||
url: "/admin-api/base/notice/page",
|
||||
method: "get",
|
||||
params: {
|
||||
pageNo:1,
|
||||
pageSize:1,
|
||||
type:1,
|
||||
pageNo: 1,
|
||||
pageSize: 1,
|
||||
type: 1,
|
||||
parentServer: "weixiu",
|
||||
server: "app"
|
||||
},
|
||||
tenantIdFlag:false
|
||||
tenantIdFlag: false
|
||||
})
|
||||
if(res.code==200){
|
||||
if (res.code == 200) {
|
||||
this.noticeNum = res.data.total
|
||||
}
|
||||
},
|
||||
@ -374,19 +393,20 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.notice-box{
|
||||
.notice-box {
|
||||
display: flex;
|
||||
|
||||
.left-img{
|
||||
.left-img {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.center-text{
|
||||
|
||||
.center-text {
|
||||
width: calc(100% - 130rpx);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
padding:0 20rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -420,10 +440,11 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.msg-box{
|
||||
.msg-box {
|
||||
position: relative;
|
||||
margin-right: 40rpx;
|
||||
.msg-num{
|
||||
|
||||
.msg-num {
|
||||
position: absolute;
|
||||
right: -15rpx;
|
||||
color: white;
|
||||
@ -656,6 +677,7 @@ export default {
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
padding: 0 30rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.order-top {
|
||||
padding: 30rpx 0;
|
||||
display: flex;
|
||||
@ -721,6 +743,7 @@ export default {
|
||||
font-size: 28rpx;
|
||||
border: 2rpx solid #0174F6;
|
||||
color: #0174F6;
|
||||
|
||||
&.no {
|
||||
color: #333;
|
||||
border: 2rpx solid #858BA0;
|
||||
|
@ -17,7 +17,7 @@
|
||||
<text class="repairDesc">申请数量:
|
||||
<text class="repairUnit">{{ item.waresCount }}</text>
|
||||
</text>
|
||||
<view class="repairBtns">
|
||||
<view class="repairBtns" v-if="isToBeReviewed">
|
||||
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
|
||||
<text class="repairNum">{{ item.thisNum }}</text>
|
||||
<u-icon color="#0174F6" name="plus-circle-fill" size="24" @click="addNum(item)"></u-icon>
|
||||
@ -35,7 +35,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view class="footer" v-if="isToBeReviewed">
|
||||
<text class="label"></text>
|
||||
<text class="repairNum"></text>
|
||||
<!-- <view class="submit" @click="toPart">采购</view>-->
|
||||
@ -64,7 +64,8 @@ export default {
|
||||
isReceive:true,
|
||||
//父组件传入的数据
|
||||
formData:{},
|
||||
active: ''
|
||||
active: '',
|
||||
isToBeReviewed:true
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
@ -74,6 +75,9 @@ export default {
|
||||
this.twId = this.formData.id
|
||||
this.init()
|
||||
}
|
||||
if (data.isToBeReviewed) {
|
||||
this.isToBeReviewed = JSON.parse(data.isToBeReviewed)
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
Loading…
Reference in New Issue
Block a user