Browse Source

完善存放地点

zhanglei
yunuo970428 2 years ago
parent
commit
19dcd2784e
  1. 135
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue

135
anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue

@ -10,8 +10,7 @@
<div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header">
<el-form-item label="使用组织">
<el-select v-model="queryParams.params.useOrgSid" placeholder="请选择" filterable clearable
class="addinputw">
<el-select v-model="queryParams.params.useOrgSid" placeholder="请选择" filterable clearable class="addinputw">
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
</el-form-item>
@ -25,14 +24,13 @@
<el-input v-model="queryParams.params.warehouseContract" placeholder="请输入负责人" clearable/>
</el-form-item>
<el-form-item label="分组">
<el-select v-model="queryParams.params.warehouseGroupKey" placeholder="请选择" clearable
class="addinputw">
<el-select v-model="queryParams.params.warehouseGroupKey" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in warehouseGroup_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="dosearch">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="dosearch">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</div>
</div>
@ -40,14 +38,12 @@
<!--Start 项目列表头部-->
<div class="listtop">
<div class="tit">存放地点列表</div>
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
</div>
<!--End 项目列表头部-->
<!--Start 项目列表-->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="240" prop="gressionCode" label="编码" align="center"/>
@ -66,22 +62,13 @@
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination
v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
</div>
</div>
</div>
<!--End 查询和其列表部分-->
<!--新增修改部分组件-->
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getUseOrg"/>
<!--详情部分组件-->
<div-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/>
</div>
@ -95,7 +82,7 @@ import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './scmwarehouseAdd'
import divInfo from './scmwarehouseInfo'
import { typeValues } from '@/api/cheliang/dictcommons'
import { typeValues, selectOrgByLevel } from '@/api/cheliang/dictcommons'
export default {
name: 'ScmWarehouseIndex',
@ -113,8 +100,8 @@ export default {
isSearchShow: false,
tableLoading: false,
dataList: [],
useOrg_list:[],
warehouseGroup_list:[],
useOrg_list: [],
warehouseGroup_list: [],
useOrg: '', // 使
useOrgSid: '', // 使sid
queryParams: {
@ -164,7 +151,6 @@ export default {
}
},
created() {
// this.loadList()
this.getType()
this.getUseOrg()
this.getListOrgAll()
@ -214,40 +200,34 @@ export default {
},
doDel(row) {
if (this.multipleSelection.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'})
return
}
const _this = this
const sids = []
this.multipleSelection.forEach(row => {
sids.push(row.sid)
})
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(sids).then(resp => {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.loadList()
}).catch(e => {
loading.close()
})
.then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req
.delBySids(sids)
.then(resp => {
loading.close()
_this.$message({ type: 'success', message: resp.msg, showClose: true })
_this.loadList()
})
.catch(e => {
loading.close()
})
})
.catch(() => {
})
}).catch(() => {
})
},
toInfo(row) {
this.$refs['divinfo'].showInfo(row)
@ -275,25 +255,22 @@ export default {
loadList() {
const _this = this
this.tableLoading = true
req
.listPage(this.queryParams)
.then(resp => {
_this.tableLoading = false
const data = resp.data
_this.queryParams.total = data.total
_this.dataList = data.records
})
.catch(() => {
_this.tableLoading = false
})
req.listPage(this.queryParams).then(resp => {
_this.tableLoading = false
const data = resp.data
_this.queryParams.total = data.total
_this.dataList = data.records
}).catch(() => {
_this.tableLoading = false
})
},
handleSelectionChange(val) {
this.multipleSelection = val
console.log('点击数据', this.multipleSelection)
},
getType(){
typeValues({type:'locationGroup'}).then((res) => {
if (res.success){
getType() {
typeValues({ type: 'locationGroup' }).then((res) => {
if (res.success) {
this.warehouseGroup_list = res.data
}
})
@ -312,7 +289,7 @@ export default {
},
//
getListOrgAll() {
req.getListOrg().then((res) => {
selectOrgByLevel({ orgSidPath: window.sessionStorage.getItem('orgSidPath') }).then((res) => {
if (res.success) {
this.useOrg_list = res.data
}
@ -330,24 +307,24 @@ export default {
}
}
}
}
</script>
<style scoped>
/deep/ .el-collapse {
border-top: 0 solid #e6ebf5;
border-bottom: 0 solid #e6ebf5;
}
/deep/ .el-collapse {
border-top: 0 solid #e6ebf5;
border-bottom: 0 solid #e6ebf5;
}
/deep/ .el-collapse-item__content {
margin: 0;
padding: 0;
}
/deep/ .el-collapse-item__content {
margin: 0;
padding: 0;
}
/deep/ .el-collapse-item__wrap {
border-bottom: 0 solid #ebeef5;
}
/deep/ .el-collapse-item__wrap {
border-bottom: 0 solid #ebeef5;
}
/deep/ .el-collapse-item__header {
border-bottom: 0 solid #e6ebf5;
}
/deep/ .el-collapse-item__header {
border-bottom: 0 solid #e6ebf5;
}
</style>

Loading…
Cancel
Save