Browse Source

完善存放地点

master
yunuo970428 1 year ago
parent
commit
8f7804a20e
  1. 166
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue

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

@ -15,13 +15,13 @@
</el-select>
</el-form-item>
<el-form-item label="名称">
<el-input v-model="queryParams.params.warehouseName" placeholder="请输入名称" clearable/>
<el-input v-model="queryParams.params.warehouseName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="详细地址">
<el-input v-model="queryParams.params.warehouseAttribute" placeholder="请输入存放地点属性" clearable/>
<el-input v-model="queryParams.params.warehouseAttribute" placeholder="" clearable/>
</el-form-item>
<el-form-item label="负责人及电话">
<el-input v-model="queryParams.params.warehouseContract" placeholder="请输入负责人" clearable/>
<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">
@ -44,18 +44,18 @@
<!--Start 项目列表-->
<div class="">
<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"/>
<el-table-column width="200" prop="warehouseName" label="名称" align="center">
<el-table-column type="selection" align="center" width="50" />
<el-table-column label="序号" type="index" :index="indexMethod" align="center" width="60" />
<el-table-column prop="gressionCode" label="编码" align="center" width="120" />
<el-table-column prop="warehouseName" label="名称" align="center" min-width="200">
<template slot-scope="scope">
<span class="bluezi" @click="toInfo(scope.row)">{{ scope.row.warehouseName }}</span>
</template>
</el-table-column>
<el-table-column width="240" prop="useOrg" label="使用组织" align="center"/>
<el-table-column prop="warehouseAttribute" label="详细地址" align="center"/>
<el-table-column width="200" prop="warehouseContract" label="负责人及电话" align="center"/>
<el-table-column width="140" prop="warehouseGroupValue" label="分组" align="center"/>
<el-table-column prop="useOrg" label="使用组织" align="center" width="150" />
<el-table-column prop="warehouseAttribute" label="详细地址" align="left" header-align="center" min-width="200" />
<el-table-column prop="warehouseContract" label="负责人及电话" align="center" width="200" />
<el-table-column prop="warehouseGroupValue" label="分组" align="center" width="140" />
</el-table>
</div>
<!--End 项目列表-->
@ -68,9 +68,9 @@
</div>
<!--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>
</template>
@ -106,7 +106,6 @@ export default {
size: 10,
total: 0,
params: {
sids: [], // SID
useOrgSid: '', // 使sid
warehouseName: '', //
warehouseAttribute: '', //
@ -178,86 +177,38 @@ export default {
break
}
},
toAdd(row) {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
toEdit() {
if (this.multipleSelection.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' })
return
}
if (this.multipleSelection.length > 1) {
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' })
return
}
this.viewState = 3
const row = this.multipleSelection[0]
this.$refs['divadd'].showEdit(row)
},
doDel(row) {
if (this.multipleSelection.length === 0) {
this.$message({showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作'})
return
}
const sids = []
this.multipleSelection.forEach(row => {
sids.push(row.sid)
})
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
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()
})
}).catch(() => {
})
},
toInfo(row) {
this.$refs['divinfo'].showInfo(row)
console.log('详情回显', row)
this.viewState = 4
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams.params = {
sids: [], // SID
useOrgSid: '',
warehouseName: '', //
warehouseAttribute: '', //
warehouseContract: '', //
warehouseGroup: '' //
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
useOrgSid: '', // 使sid
warehouseName: '', //
warehouseAttribute: '', //
warehouseContract: '', //
warehouseGroup: '' //
}
}
this.queryParams.params.sid = '' // sid
this.queryParams.params.name = '' //
this.dosearch()
},
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
req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
this.queryParams.total = resp.data.total
this.dataList = resp.data.records
} else {
this.queryParams.total = 0
this.dataList = []
}
}).catch(() => {
_this.tableLoading = false
this.tableLoading = false
})
},
handleSelectionChange(val) {
@ -294,6 +245,55 @@ export default {
var pageindex = index + 1 + pagestart
return pageindex
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
toEdit() {
if (this.multipleSelection.length === 1) {
this.viewState = 3
this.$refs['divAdd'].showEdit(this.multipleSelection[0])
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' })
}
},
doDel() {
if (this.multipleSelection.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const sids = []
this.multipleSelection.forEach(row => {
sids.push(row.sid)
})
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
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()
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.loadList()
}
}).catch(e => {
loading.close()
})
}).catch(() => {
})
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)

Loading…
Cancel
Save