Browse Source

完善存放地点

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

Loading…
Cancel
Save