master
parent
d338558464
commit
3e1cdec1a0
@ -0,0 +1,191 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 0 20px">
|
||||||
|
|
||||||
|
<div ref="lxHeader">
|
||||||
|
<lx-header icon="md-apps" text="入库管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||||
|
<slot>
|
||||||
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||||
|
<!-- <Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
|
||||||
|
<Button type="primary" @click="getActivities">查询</Button> -->
|
||||||
|
<Button icon="ios-add" type="primary" style="margin-left: 10px;" @click="$refs['addRuku'].isShow = true,$refs['addRuku'].type = 'add'">添加</Button>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</lx-header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<xy-table
|
||||||
|
:list="list"
|
||||||
|
:total="total"
|
||||||
|
@pageSizeChange="e => select.pageSize = e"
|
||||||
|
@pageIndexChange="pageChange"
|
||||||
|
:table-item="table">
|
||||||
|
<template v-slot:btns>
|
||||||
|
<el-table-column fixed="right" label="操作" width="260" header-align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <Button type="primary" size="small" @click="editorActivity(scope.row.id,'editor')">编辑</Button>
|
||||||
|
<Button style="margin-left: 10px;" type="primary" size="small" @click="checkActivity(scope.row.id)">审核</Button>
|
||||||
|
<Button type="primary" size="small" style="margin-left: 10px;" @click="editorActivity(scope.row.id,'copy')">复制新增</Button> -->
|
||||||
|
<Poptip
|
||||||
|
transfer
|
||||||
|
confirm
|
||||||
|
title="确认要删除吗?"
|
||||||
|
@on-ok="deleteRuku(scope.row)">
|
||||||
|
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
|
||||||
|
</Poptip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</xy-table>
|
||||||
|
<addRuku ref="addRuku"></addRuku>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {index,destory} from "@/api/system/baseForm.js"
|
||||||
|
import addRuku from "./component/addRuku.vue"
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
addRuku
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
select:{
|
||||||
|
pageSize:10,
|
||||||
|
pageIndex:1,
|
||||||
|
keyword:""
|
||||||
|
},
|
||||||
|
|
||||||
|
total:0,
|
||||||
|
list:[],
|
||||||
|
table:[
|
||||||
|
{
|
||||||
|
label:"编号",
|
||||||
|
width: 220,
|
||||||
|
prop:'bianhao',
|
||||||
|
align:'left',
|
||||||
|
fixed:'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"状态",
|
||||||
|
width: 220,
|
||||||
|
prop:'zhuangtai',
|
||||||
|
align:'center',
|
||||||
|
// formatter:(cell,data,value)=>{
|
||||||
|
// if(cell.merchant){
|
||||||
|
// return cell.merchant.username
|
||||||
|
// }else{
|
||||||
|
// return ""
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"入库时间",
|
||||||
|
width: 180,
|
||||||
|
prop:'rukushijian',
|
||||||
|
align:'center',
|
||||||
|
// formatter:(cell,data,value)=>{
|
||||||
|
// return value==0 ? '待审核':(value==1 ?'通过':'不通过')
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"经办人",
|
||||||
|
width: 120,
|
||||||
|
prop:'jingbanren',
|
||||||
|
align:'center',
|
||||||
|
// customFn: (row) => {
|
||||||
|
// return ( <input class = 'sortinput el-input__inner'
|
||||||
|
// type='number'
|
||||||
|
// on = {
|
||||||
|
// {
|
||||||
|
// ["keyup"]: (e) => (this.updateSort(e, row.id, row))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// value = {
|
||||||
|
// row.sort
|
||||||
|
// }> </input>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"记录人员",
|
||||||
|
width: 220,
|
||||||
|
prop:'jilurenyuan',
|
||||||
|
align:'left',
|
||||||
|
// customFn:(row)=>{
|
||||||
|
// if(row.company_ids){
|
||||||
|
// let companys = JSON.parse(row.company_ids)
|
||||||
|
// return(
|
||||||
|
// <div>
|
||||||
|
// {
|
||||||
|
// companys.map((item,index)=>{
|
||||||
|
// return(
|
||||||
|
// <div>{item['type_name']}:{item['name']}</div>
|
||||||
|
// )
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// label:"主办方",
|
||||||
|
// width: 140,
|
||||||
|
// prop:'sponsor'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label:"保管人员",
|
||||||
|
width: 140,
|
||||||
|
prop:'baoguanrenyuan',
|
||||||
|
// customFn:(row)=>{
|
||||||
|
// if(row.sponsor_logo){
|
||||||
|
// return (<el-image style={{'height':'90px'}} src={row.sponsor_logo}></el-image>)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"备注",
|
||||||
|
width: 200,
|
||||||
|
prop:'beizhu',
|
||||||
|
align:'left'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getindex(){
|
||||||
|
const res = await index({
|
||||||
|
rows:this.select.pageSize,
|
||||||
|
page:this.select.pageIndex,
|
||||||
|
table_name:'stocks',
|
||||||
|
keyword:this.select.keyword
|
||||||
|
})
|
||||||
|
this.list = res.data
|
||||||
|
this.total = res.total
|
||||||
|
},
|
||||||
|
pageChange(e){
|
||||||
|
this.select.pageIndex = e
|
||||||
|
},
|
||||||
|
deleteRuku(row){
|
||||||
|
destroy({id:row.id}).then(res => {
|
||||||
|
Message({
|
||||||
|
type:'success',
|
||||||
|
message:'删除成功'
|
||||||
|
})
|
||||||
|
this.getindex()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getindex()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
Loading…
Reference in new issue