This commit is contained in:
Vinjor 2024-12-04 14:51:44 +08:00
parent 0b05a021a7
commit 9a4290a469
3 changed files with 30 additions and 4 deletions

View File

@ -25,6 +25,9 @@
<view v-if="addWares" @click="addNewWares" class="navigationBarIcon" style="position: absolute;right: 22px;font-size: 18px">
新增
</view>
<view v-if="houseAddNewWares" @click="addNewWaresHouse" class="navigationBarIcon" style="position: absolute;right: 22px;font-size: 18px">
新增配件
</view>
</template>
<view class="navigationBarBackExtra">
<slot name="extra">
@ -61,6 +64,10 @@ export default {
addWares:{
type: Boolean,
default: false
},
houseAddNewWares:{
type: Boolean,
default: false
}
},
mounted() {
@ -99,6 +106,9 @@ export default {
},
addNewWares(){
this.$emit('addNewWares')
},
addNewWaresHouse(){
this.$emit('addNewWaresHouse')
}
}
}

View File

@ -139,6 +139,7 @@
this.userInfo = getUserInfo()
this.ticketId = data.ticketId
this.twId = data.twId
this.ifHouse = data.ifHouse
},
onShow() {
this.init()
@ -176,6 +177,9 @@
name: item.name
}
})]
if(this.ifHouse){
dataObj.ifHouseAdd = true
}
request({
url: "/admin-api/repair/twi/addTwi",
method: 'post',

View File

@ -1,6 +1,6 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="单据处理" title-color="#333"></VNavigationBar>
<VNavigationBar background-color="#fff" title="单据处理" title-color="#333" :houseAddNewWares="true" @addNewWaresHouse="addWares"></VNavigationBar>
<!-- <view class="tabs">-->
<!-- <view v-for="(item, index) in tabs" :key="index" :class="{'active': item.value === active}" class="tab-item">-->
<!-- {{ item.name }}-->
@ -14,6 +14,9 @@
<text @click="handleSearch">搜索</text>
</view>
</view>
<!-- <view class="header">-->
<!-- <view style="float: right; color: #0174F6" @click="addWares">添加配件</view>-->
<!-- </view>-->
<view class="listBox">
<view class="list">
<view v-for="(item, index) in wares" :key="index" class="listItem">
@ -41,7 +44,8 @@
<text class="repairDesc">已领取
<text class="repairUnit">{{ item.waresAlreadyCount }}</text>
</text>
<view class="repairBtns"></view>
<view class="repairBtns"><text v-if="item.ifHouseAdd" style="color: red">仓管添加</text></view>
</view>
</view>
</view>
@ -114,15 +118,23 @@ export default {
this.twId = this.formData.id
this.ticketId = this.formData.ticketId
this.nowStaffId = this.formData.repairId
this.init()
// this.init()
}
if (data.isToBeReviewed) {
this.isToBeReviewed = JSON.parse(data.isToBeReviewed)
}
},
onShow(){
this.init()
},
computed: {},
methods: {
addWares(){
//
uni.navigateTo({
url: '/pages-repair/apply/applyForm?twId=' + this.twId+'&ifHouse=true'
})
},
toInWares(){
uni.navigateTo({
url: '/pages-order/orderList/orderListByIn?twId=' + this.twId