Commit 9d0acf99 authored by Hagsn3's avatar Hagsn3

修改

parent 381515da
import request from '@/utils/request'
import Qs from 'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
export function listOutcomeWmsJbapplyTemp(query) {
return request({
url: '/outcomewmsjbapplytemp/list',
method: 'get',
params: query
})
}
export function getOutcomeWmsJbapplyTemp(businessId) {
return request({
url: '/outcomewmsjbapplytemp/detail/' + businessId,
method: 'get'
})
}
export function addOutcomeWmsJbapplyTemp(data) {
data = Qs.stringify(data)
return request({
url: '/outcomewmsjbapplytemp/add',
method: 'post',
data: data
})
}
export function updateOutcomeWmsJbapplyTemp(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/outcomewmsjbapplytemp/update/' + businessId,
method: 'put',
data
})
}
export function delOutcomeWmsJbapplyTemp(businessId) {
return request({
url: '/outcomewmsjbapplytemp/deleteLogical/' + businessId,
method: 'delete'
})
}
export function exportOutcomeWmsJbapplyTemp(query) {
return request({
url: '/outcomewmsjbapplytemp/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 校验
export function validNumber(query) {
return request({
url: '/outcomewmsjbapplytemp/validNumber',
method: 'get',
params: query
})
}
// 查询标签信息
export function querykindsNumber() {
return request({
url: '/outcomewmsjbapplytemp/querykindsNumber',
method: 'get'
})
}
// 处理
export function handleOutWarehouse(query) {
return request({
url: '/outcomewmsjbapplytemp/handleOutWarehouse',
method: 'get',
params: query
})
}
......@@ -4,7 +4,7 @@ import { getInfo } from '@/api/login'
import Layout from '@/layout/index'
// pathList: 是要隐藏菜单的集合 system元素:一级菜单的路径(path)
const pathList = ['system','system/log','production','equipment','process','/none2','sample','tlias','/test','/inspect','/controlPlatform/control','/template/planeGraph']
const pathList = ['system', 'system/log', 'production', 'equipment', 'process', '/none2', 'sample', 'tlias', '/test', '/inspect', '/controlPlatform/control', '/template/planeGraph', '/demoData/demoData1']
const permission = {
state: {
......@@ -26,7 +26,7 @@ const permission = {
var menus = []
res.data.menus.forEach(item => {
if (!pathList.includes(item.path)) {
menus.push(item)
menus.push(item)
}
})
const accessedRoutes = filterAsyncRouter(menus)
......
This diff is collapsed.
<template>
<div class="application">
<!-- 第一部分 -->
<div class="oneRegion">
<div class="top">
<div v-if="tabList[0].number == 0" class="oneButtion">
<div class="spanTest">
<div class="testContent">{{ tabList[0].label }}</div>
</div>
</div>
<div v-if="tabList[0].number > 0" class="oneButtion">
<el-button
:class="actionIndex === 0 ? 'button_rowBtn_action' : 'button_rowBtn'"
type="primary"
@click="handleToggle(tabList[0],0)"
>
<div class="buttionText">
<span>{{ tabList[0].label }}</span>
<span style="color: red">({{ tabList[0].number }})</span>
</div>
</el-button>
</div>
<!-- <div v-if="tabList[1].number == 0" class="oneButtion">-->
<!-- <div class="spanTest"><div class="testContent">{{ tabList[1].label }}</div></div>-->
<!-- </div>-->
<!-- <div v-if="tabList[1].number > 0" class="oneButtion">-->
<!-- <el-button-->
<!-- :class="actionIndex === 1 ? 'button_rowBtn_action' : 'button_rowBtn'"-->
<!-- type="primary"-->
<!-- @click="handleToggle(tabList[1],1)"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>{{ tabList[1].label }}</span>-->
<!-- <span style="color: red">({{ tabList[1].number }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- </div>-->
</div>
<!-- <div class="top">-->
<!-- <div v-if="tabList[2].number == 0" class="oneButtion">-->
<!-- <div class="spanTest"><div class="testContent">{{ tabList[2].label }}</div></div>-->
<!-- </div>-->
<!-- <div v-if="tabList[2].number > 0" class="oneButtion">-->
<!-- <el-button-->
<!-- :class="actionIndex === 2 ? 'button_rowBtn_action' : 'button_rowBtn'"-->
<!-- type="primary"-->
<!-- @click="handleToggle(tabList[2],2)"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>{{ tabList[2].label }}</span>-->
<!-- <span style="color: red">({{ tabList[2].number }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- </div>-->
<!-- <div v-if="tabList[3].number == 0" class="oneButtion">-->
<!-- <div class="spanTest"><div class="testContent">{{ tabList[3].label }}</div></div>-->
<!-- </div>-->
<!-- <div v-if="tabList[3].number > 0" class="oneButtion">-->
<!-- <el-button-->
<!-- :class="actionIndex === 3 ? 'button_rowBtn_action' : 'button_rowBtn'"-->
<!-- type="primary"-->
<!-- @click="handleToggle(tabList[3],3)"-->
<!-- >-->
<!-- <div class="buttionText">-->
<!-- <span>{{ tabList[3].label }}</span>-->
<!-- <span style="color: red">({{ tabList[3].number }})</span>-->
<!-- </div>-->
<!-- </el-button>-->
<!-- </div>-->
<!-- </div>-->
</div>
<!-- 清空按钮 -->
<div class="clearRegion">
<el-button class="button_rowBtn" type="warning" @click="handleClear">刷新</el-button>
</div>
<!-- 第三部分-->
<div class="threeTable">
<hr class="tableHr">
<el-table :data="tableList">
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="pn">
<template slot-scope="scope">
<span>{{ scope.row.pn || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template slot-scope="scope">
<span style="color: #46BCF3;cursor: pointer" @click="handleDispose(scope.row)">处理</span>
</template>
</el-table-column>
</el-table>
<app-pagination
v-show="total>0"
:total="total"
:page.sync="queryparams.page"
:limit.sync="queryparams.rows"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import appPagination from '@/views/components/appPagination'
import AppPagination from '@/views/components/appPagination'
import { listOutcomeWmsJbapplyTemp, validNumber, querykindsNumber } from '@/api/outcomeWmsJbapplyTemp'
export default {
name: 'ApplicationTable',
comments: [appPagination],
components: { AppPagination },
data() {
return {
loading: false,
total: 0,
queryparams: {
page: 1,
rows: 10,
ptype: '',
dealStatus: '0'
},
// 选中的下坐表
actionIndex: null,
// 标签集合
tabList: [],
// 对应标签下的列表数据
tableList: []
}
},
created() {
this.getTabList()
},
methods: {
// 获取申请分类的数量
getTabList() {
querykindsNumber().then(res => {
if (res.code === 200) {
this.tabList = res.data
console.log('检查列表', this.tabList)
this.getTableAndIndex(res.data).then(() => {})
}
})
},
// 切换分类
handleToggle(value, index) {
this.queryparams.ptype = value.type
this.actionIndex = index
this.loading = true
listOutcomeWmsJbapplyTemp(this.queryparams).then(res => {
this.tableList = res.rows
this.total = res.total
this.loading = false
})
},
// 重置
handleClear() {
this.getTabList()
},
/**
* @description: 根据list 获取第一number不为0的数据
* @author: gaoyu
* @param: list
**/
async getTableAndIndex(list) {
var tempIndexList = []
var tempTypeList = []
list.forEach((item, index) => {
if (item.number > 0 || item.number === '0') {
tempIndexList.push(index)
tempTypeList.push(item.type)
}
})
console.log('tempIndexList', tempIndexList)
console.log('tempTypeList', tempTypeList)
if (tempIndexList.length > 0) {
this.actionIndex = tempIndexList[0]
}
if (tempTypeList.length > 0) {
this.queryparams.ptype = tempTypeList[0]
const obj = {
page: 1,
rows: 10,
ptype: tempTypeList[0],
dealStatus: '0'
}
try {
console.log('传给后端获取的值', obj)
const res = await listOutcomeWmsJbapplyTemp(obj)
this.tableList = res.rows
console.log('获取的数据', this.tableList)
this.total = res.total
} catch (error) {
console.error('Error fetching data:', error)
}
}
},
getList() {
this.loading = true
listOutcomeWmsJbapplyTemp(this.queryparams).then(res => {
this.tableList = res.rows
this.total = res.total
this.loading = false
})
},
// 处理
handleDispose(item) {
const obj = {
businessId: item.businessId
}
validNumber(obj).then(res => {
console.log('res', res)
if (res.data) {
this.$router.push({
path: '/setup/checkTheApplicationForExit',
query: {
businessId: item.businessId
}
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.application {
.oneRegion {
.top {
display: flex;
justify-content: center;
margin-bottom: 20px;
.oneButtion {
margin-right: 10px;
.divTest {
}
.spanTest {
cursor: pointer;
background: #808080;
color: #FFFFFF;
border-radius: 4px;
height: 30px;
width: 140px;
display: flex;
justify-content: center;
align-items: center;
.testContent{
width: 108px;
height: 18px;
}
}
.button_rowBtn {
width: 140px;
background: #808080;
border: #808080;
.buttionText {
display: flex;
justify-content: space-between;
}
}
.button_rowBtn_action {
width: 140px;
.buttionText {
display: flex;
justify-content: space-between;
}
}
}
}
}
.clearRegion {
display: flex;
justify-content: center;
margin-bottom: 20px;
.button_rowBtn {
width: 140px;
}
}
.threeTable{
width: 92%;
margin: 4%;
.tableHr{
margin-bottom: 20px;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment