退货口入库\异常口入库\导航

This commit is contained in:
2024-07-03 17:27:52 +08:00
parent 6d456e5382
commit 7d2d0a556c
5 changed files with 124 additions and 13 deletions

View File

@@ -1,8 +1,14 @@
<template>
<view class="zd_container">
<nav-bar title="退货入库"></nav-bar>
<nav-bar title="退货入库"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">单据类型</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">木箱号</span>
@@ -23,7 +29,7 @@
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2}" :disabled="disabled" @tap="_twoPdaReturnIn">入库</button>
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !index || !val1 || !val2}" :disabled="disabled" @tap="_twoPdaReturnIn">入库</button>
</view>
</view>
</template>
@@ -39,20 +45,25 @@
},
data() {
return {
options: [{value: '1', text: '返检入库'}, {value: '2', text: '改切入库'}, {value: '0001', text: '生产入库'}, {value: '0009', text: '手工入库'}],
index: '',
val1: '',
val2: '',
disabled: false
};
},
methods: {
selectChange (e) {
this.index = e
},
async _twoPdaReturnIn () {
this.disabled = true
if (!this.val1 || !this.val2) {
if (!this.index || !this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let res = await twoPdaReturnIn(this.val1, this.val2)
let res = await twoPdaReturnIn(this.index, this.val1, this.val2)
uni.showToast({
title: res.message,
icon: 'none'
@@ -65,6 +76,7 @@
clearUp () {
this.val1 = ''
this.val2 = ''
this.index = ''
}
}
}

View File

@@ -53,7 +53,7 @@
},
data() {
return {
options: [{value: '1', text: '返检入库'}, {value: '2', text: '改切入库'}],
options: [{value: '1', text: '返检入库'}, {value: '2', text: '改切入库'}, {value: '0001', text: '生产入库'}, {value: '0009', text: '手工入库'}],
index: '',
val1: '',
val2: '',

View File

@@ -43,12 +43,14 @@
</template>
<script>
import {allAuthority} from '@/utils/mork2.js'
import {authority} from '@/utils/getData2.js'
// import {authority} from '@/utils/mork2.js'
export default {
data() {
return {
userName: '',
rf_menu0: [],
rf_menu1: [],
menuList: [],
menuList1: [],
menuList2: [],
@@ -63,19 +65,82 @@
if (this.$store.getters.userInfo) {
this.userName = JSON.parse(this.$store.getters.userInfo).username
}
this._authority()
this._allAuthority()
},
methods: {
// async _authority () {
// let res = await authority()
// if (res.code === '1') {
// if (res.result.hasOwnProperty('rf_menu0')) {
// this.menuList1 = [...res.result.rf_menu0.sonTree]
// } else {
// this.tab = 2
// }
// if (res.result.hasOwnProperty('rf_menu1')) {
// this.menuList2 = [...res.result.rf_menu1.sonTree]
// } else {
// this.tab = 1
// }
// if (this.tab === 2) {
// this.menuList = [...this.menuList2]
// } else {
// this.menuList = [...this.menuList1]
// }
// } else {
// uni.showToast({
// title: res.desc,
// icon: 'none'
// })
// }
// },
async _allAuthority () {
let res = await allAuthority()
this.rf_menu0 = res.result.rf_menu0.sonTree
this.rf_menu1 = res.result.rf_menu1.sonTree
this._authority()
},
async _authority () {
let res = await authority()
if (res.code === '1') {
if (res.result.hasOwnProperty('rf_menu0')) {
this.menuList1 = [...res.result.rf_menu0.sonTree]
let arr = [...res.result.rf_menu0.sonTree]
let arr1 = this.rf_menu0.filter(item1 =>
arr.some(item2 => item2.title === item1.title)
)
arr1.map(e => {
let carr = []
arr.map(ele => {
if (ele.title === e.title) {
carr = ele.sonTree
}
})
let carr1 = e.sonTree.filter(item1 =>
carr.some(item2 => item2.title === item1.title)
)
e.sonTree = carr1
})
this.menuList1 = arr1
} else {
this.tab = 2
}
if (res.result.hasOwnProperty('rf_menu1')) {
this.menuList2 = [...res.result.rf_menu1.sonTree]
let arr = [...res.result.rf_menu1.sonTree]
let arr1 = this.rf_menu1.filter(item1 =>
arr.some(item2 => item2.title === item1.title)
)
arr1.map(e => {
let carr = []
arr.map(ele => {
if (ele.title === e.title) {
carr = ele.sonTree
}
})
let carr1 = e.sonTree.filter(item1 =>
carr.some(item2 => item2.title === item1.title)
)
e.sonTree = carr1
})
this.menuList2 = arr1
} else {
this.tab = 1
}
@@ -90,7 +155,6 @@
icon: 'none'
})
}
},
changeTab (type) {
if (type === 1) {

View File

@@ -102,9 +102,10 @@ export const createOrder = (code, name) => request({
/**
* 二期退货入库
*/
export const twoPdaReturnIn = (no, pcode) => request({
export const twoPdaReturnIn = (type, no, pcode) => request({
url:'api/twoPda/vehicle/returnIn',
data: {
bill_type: type,
box_no: no,
point_code: pcode
}

View File

@@ -1,4 +1,4 @@
export const authority = () => {
export const allAuthority = () => {
let res = {
code: '1',
result: {
@@ -90,7 +90,7 @@ export const authority = () => {
{menu_id: '2', title: '异常出库解锁', path: '/pages/SecondPhase/point/ErrorOutUnlock'}
]},
{menu_id: '7', path: 'RF06', title: '成品入库', sonTree: [
{menu_id: '1', title: '退货入库', path: '/pages/SecondPhase/finished/ReturnToStore'},
{menu_id: '1', title: '退货入库', path: '/pages/SecondPhase/finished/ReturnToStore'},
{menu_id: '2', title: '异常口入库', path: '/pages/SecondPhase/finished/abnorToStore'},
{menu_id: '3', title: '木箱称重', path: '/pages/SecondPhase/finished/BoxWeight'}
]}
@@ -99,6 +99,40 @@ export const authority = () => {
}}
return res
}
export const authority = () => {
let res = {
code: '1',
result: {
rf_menu0: {
sonTree: [
{title: '生产管理',sonTree: [{title: '生箔生产进度'},{title: '生箔工序'},{title: '烘烤工序'},{title: '人工烘烤'}]},
{title: '半成品管理',sonTree: [{title: '半成品入库'},{title: '半成品出库'}]},
{title: '分切管理',sonTree: [{title: '分切上料'},{title: '空轴套管'},{title: '空轴配送'},{title: '空轴进站'},{title: '子卷出站'}]},
{title: '点位管理',sonTree: [{title: '点位管理'},{title: '异常出库解锁'}]},
{title: '纸管/FRP管管理', sonTree: [{title: '空管入库'},{title: '空管出库'}]},
{title: '成品管理',sonTree: [{title: '生产入库'},{title: '退货入库'},{title: '报废入库'},{title: '拆分入库'},{title: '生产区发货'},{title: '虚拟区发货'},{title: '贴标捆扎'}]},
{title: '在库管理', sonTree: [{title: '盘点管理'}]},
{title: '载具管理', sonTree: [{title: '空载具入库'},{title: '空载具出库'}]},
{title: '打印管理', sonTree: [{title: '客户标签打印'}]},
{title: '调度管理', sonTree: [{title: '任务管理'},{title: 'RGV状态查询'}]}
]
},
rf_menu1: {
sonTree: [
{title: '载具入库',sonTree: [{title: '空载具入库'}]},
{title: '空木箱入库',sonTree: [{title: '空木箱入库'}]},
{title: '发货区',sonTree: [{title: '发货区解绑'}]},
{title: '生产管理',sonTree: [{title: '生箔生产进度'},{title: '生箔工序'},{title: '烘烤工序'},{title: '表处工序'},{title: '人工烘烤'},{title: '子卷质检'}]},
{title: '分切管理', sonTree: [{title: '分切上料'},{title: '分切下料'},{title: '空轴套管'},{title: '空轴配送'},{title: '空轴进站'},{title: '子卷出站'},{title: '穿拔轴初始化'},{title: '纸管绑定'},{title: '分切暂存下料'},{title: '分切暂存清除'}]},
{title: '点位管理', sonTree: [{title: '点位管理'},{title: '异常出库解锁'}]},
{title: '成品入库', sonTree: [{title: '退货口入库'},{title: '异常口入库'},{title: '木箱称重'}]}
]
}
}
}
return res
}
export const twoPdaIvtQuery = (no, code) => {
let res = {
data: [{bill_code: '1', bill_status: 'ljdjldj'}, {bill_code: '2'}, {bill_code: '3', bill_status: 'ljdjldj'}, {bill_code: '4'}, {bill_code: '5', bill_status: 'ljdjldj'}, {bill_code: '6'}, {bill_code: '7', bill_status: 'ljdjldj'}, {bill_code: '8'}, {bill_code: '9', bill_status: 'ljdjldj'}, {bill_code: '12', confirm_time: '2020-10-20'}]