zhusiyu 3 years ago
parent f55c0ea0cb
commit bb70a3137c

@ -116,7 +116,7 @@ export const moduleData=[
purview_code:"hbg_rcbg",menu_name:["newOfficeCar","applyCar"],show_oneLevel:false},
{module_id:'real_time_inventory', module_name:'即时库存', relative_crm:['daliyOffice','goodsUseManagement','inventoryManagement'],
icon:"icon-jishikucun",module_url_small:'',module_url_large:'',
icon:"icon-jishikucun",module_url_small:'oa/stock/stock.vue',module_url_large:'oa/stock/stockLarge.vue',
purview_code:"hbg_rcbg",menu_name:["goodsUseManagement","inventoryManagement"],show_oneLevel:false},
{module_id:'item_usage_statistics', module_name:'物品使用统计', relative_crm:['daliyOffice','goodsUseManagement','itemUsageStatistics'],

@ -1,4 +1,13 @@
export default {
/*
* y-获取即时库存数据
* */
"getStock":{
url:'/intellioa/supplies/info/treelist',
method:'post',
isTestLogin:true
},
/*
* 获取公车预约情况
* */

@ -0,0 +1,128 @@
<template>
<div class="stock">
<vue-scroll :ops="listScroll" style="height:19rem" v-if="!showLoading && stockData.length > 0"
class="score-list-div">
<!--:expandIcon="expandIcon"-->
<a-table
class="stockAtable"
:columns="columns"
:data-source="stockData"
rowKey="name"
/>
</vue-scroll>
</div>
</template>
<script>
import {Table, Icon} from 'ant-design-vue';
import InterConfig from '../officeCar/interConfig';
export default{
data(){
return {
listScroll: this.StaticParams.scrollOption,
showLoading: true,
columns: [
{title: '类别编码', dataIndex: 'supplies_code', width: 100, key: 'supplies_code',},
{title: '物品(分类)', dataIndex: 'name', width: 120, key: 'name',},
{title: '计量单位', dataIndex: 'measurement_unit', width: 100, key: 'measurement_unit',},
{title: '现余库存', dataIndex: 'current_stock', width: 100, key: 'current_stock',},
// {
// title: '',
// dataIndex: 'cumulative_stock',
// width: 150,
// key: 'cumulative_stock',
// align: 'center'
// },
// {
// title: '',
// dataIndex: 'storage_location',
// width: 150,
// key: 'storage_location',
// align: 'center'
// },
// {title: '', dataIndex: 'is_use', width: 150, key: 'is_use', align: 'center'},
// {title: '', dataIndex: 'is_deleted', width: 150, key: 'is_deleted', align: 'center'},
// {title: '', dataIndex: 'supplies_type', width: 150, key: 'supplies_type', align: 'center'},
// {title: '', dataIndex: 'used_times', width: 150, key: 'used_times', align: 'center'},
],
// supplies_code: '',
// name: '',
// measurement_unit: '',
// current_stock: '',
// cumulative_stock: '',
// storage_location: '',
// is_use: '',
// is_deleted: '',
// supplies_type: '',
// used_times: ''
stockData: [],
}
},
components: {
ATable: Table,
AIcon: Icon
},
created(){
this.getStockData()
},
methods: {
expandIcon(props){
console.log('propppppppppppppppppppppps', props)
// if (!props.expanded&&props.record.children.length!=0) {
// return '<a-icon type="caret-right" @click="(e)=>{props.onExpand(props.record, e)}"/>'
// } else {
// return '<a-icon type="caret-down" />'
// }
},
getStockData(){
let param = {
org_id: this.BaseConfig.person_info_my.bureau_id,
person_id: this.BaseConfig.userInfo.person_id,
list_or_child: 2,
// org_id //id
//person_id //ID
// parent_id int //ID
//supplies_type //1
//list_or_child//1list2children
//is_use//12
}
this.InterfaceConfig.callInterface([{
url: InterConfig.getStock.url,
params: param,
method: InterConfig.getStock.method,
isTestLogin: InterConfig.getStock.isTestLogin,
}], (result) => {
//console.log('', result)
if (result[0].data.code === 2000) {
this.showLoading = false
const {list, msg} = result[0].data.data
this.stockData = list
//console.log('111111', this.stockData)
}
})
}
},
}
</script>
<style scoped lang="scss">
.stock {
width: 96%;
min-height: 19rem;
margin: 10px;
.score-list-div {
width: 100%;
height: 15rem;
display: flex;
flex-direction: column;
}
.stockAtable {
width: 100%;
height: 100%;
/*overflow-y: scroll;*/
/*overflow-x: scroll;*/
border: 1px solid #1a5cd7;
border-radius: 10px;
background-color: #e9e9e9;
}
}
</style>

@ -0,0 +1,126 @@
<template>
<div class="stock">
<vue-scroll :ops="listScroll" style="height:19rem" v-if="!showLoading && stockData.length > 0"
class="score-list-div">
<!--:expandIcon="expandIcon"-->
<a-table
class="stockAtable"
:columns="columns"
:data-source="stockData"
/>
</vue-scroll>
</div>
</template>
<script>
import {Table, Icon} from 'ant-design-vue';
import InterConfig from '../officeCar/interConfig';
export default{
data(){
return {
listScroll: this.StaticParams.scrollOption,
showLoading: true,
columns: [
{title: '类别编码', dataIndex: 'supplies_code', width: 100, key: 'supplies_code',},
{title: '物品(分类)', dataIndex: 'name', width: 120, key: 'name',},
{title: '计量单位', dataIndex: 'measurement_unit', width: 100, key: 'measurement_unit',},
{title: '现余库存', dataIndex: 'current_stock', width: 100, key: 'current_stock',},
// {
// title: '',
// dataIndex: 'cumulative_stock',
// width: 150,
// key: 'cumulative_stock',
// align: 'center'
// },
// {
// title: '',
// dataIndex: 'storage_location',
// width: 150,
// key: 'storage_location',
// align: 'center'
// },
// {title: '', dataIndex: 'is_use', width: 150, key: 'is_use', align: 'center'},
// {title: '', dataIndex: 'is_deleted', width: 150, key: 'is_deleted', align: 'center'},
// {title: '', dataIndex: 'supplies_type', width: 150, key: 'supplies_type', align: 'center'},
// {title: '', dataIndex: 'used_times', width: 150, key: 'used_times', align: 'center'},
],
// supplies_code: '',
// name: '',
// measurement_unit: '',
// current_stock: '',
// cumulative_stock: '',
// storage_location: '',
// is_use: '',
// is_deleted: '',
// supplies_type: '',
// used_times: ''
stockData: [],
}
},
components: {
ATable: Table,
AIcon: Icon
},
created(){
this.getStockData()
},
methods: {
expandIcon(props){
console.log('propppppppppppppppppppppps', props)
// if (!props.expanded&&props.record.children.length!=0) {
// return '<a-icon type="caret-right" @click="(e)=>{props.onExpand(props.record, e)}"/>'
// } else {
// return '<a-icon type="caret-down" />'
// }
},
getStockData(){
let param = {
org_id: this.BaseConfig.person_info_my.bureau_id,
person_id: this.BaseConfig.userInfo.person_id,
list_or_child: 2,
// org_id //id
//person_id //ID
// parent_id int //ID
//supplies_type //1
//list_or_child//1list2children
//is_use//12
}
this.InterfaceConfig.callInterface([{
url: InterConfig.getStock.url,
params: param,
method: InterConfig.getStock.method,
isTestLogin: InterConfig.getStock.isTestLogin,
}], (result) => {
//console.log('', result)
if (result[0].data.code === 2000) {
this.showLoading = false
const {list, msg} = result[0].data.data
this.stockData = list
//console.log('111111', this.stockData)
}
})
}
},
}
</script>
<style scoped lang="scss">
.stock {
width: 96%;
min-height: 19rem;
margin: 10px;
.score-list-div {
width: 100%;
height: 15rem;
display: flex;
flex-direction: column;
}
.stockAtable {
width: 100%;
height: 100%;
/*overflow-y: scroll;*/
/*overflow-x: scroll;*/
border: 1px solid #1a5cd7;
border-radius: 10px;
background-color: #e9e9e9;
}
}
</style>
Loading…
Cancel
Save