配件申请单左下角添加【入库单】按钮,点击后,跳转到采购单列表,列出配件申请单关联的所有采购单,能点击入库,查看入库单详情

This commit is contained in:
xiaofajia 2024-11-26 10:33:26 +08:00
parent 9210d98ff8
commit 82fdf4b73d
3 changed files with 20 additions and 1 deletions

View File

@ -121,9 +121,15 @@ export default {
cusFromValueList:[''],
//
cusFromIndex:0,
twId: null,
}
},
onLoad(){
onLoad(data){
if (data && data.twId){
this.twId = data.twId
}else {
this.twId = null
}
if(!getToken()){
uni.reLaunch({
url: '/pages/login/login'
@ -372,6 +378,9 @@ export default {
userId: this.userInfo.id,
soType: "01"
}
if (this.twId){
paramsObj.twId = this.twId
}
request({
url: '/admin-api/repair/so/page',
method: 'get',

View File

@ -50,6 +50,7 @@
<text class="label"></text>
<text class="repairNum"></text>
<view class="submit" @click="toPart">采购</view>
<view class="submit" @click="toInWares">入库单</view>
<view class="submit" @click="submitBefore">{{ isReceive ? '通知领料' : '通知退料' }}</view>
</view>
@ -122,6 +123,11 @@ export default {
computed: {},
methods: {
toInWares(){
uni.navigateTo({
url: '/pages-order/orderList/orderList?twId=' + this.twId
})
},
async submitBefore(){
if (!this.selectRows || this.selectRows.length === 0){
uni.showToast({

View File

@ -166,6 +166,7 @@ export default {
if (getJSONData("applyWaresForm")) {
this.formData = getJSONData("applyWaresForm")
this.wares = this.formData.items
this.twId = this.formData.id
this.init()
}
}
@ -387,6 +388,9 @@ export default {
}
})]
data.waresList = [...values.map(item => item.wares)]
if (this.twId){
data.twId = this.twId
}
request({
url: '/admin-api/repair/so/create',
method: 'post',