From 19dcd2784ebc166395d6edf20d1c8ffc1e84489c Mon Sep 17 00:00:00 2001
From: yunuo970428 <405378304@qq.com>
Date: Mon, 14 Nov 2022 19:05:30 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AD=98=E6=94=BE=E5=9C=B0?=
=?UTF-8?q?=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../anruiscm/scmwarehouse/scmwarehouse.vue | 135 ++++++++----------
1 file changed, 56 insertions(+), 79 deletions(-)
diff --git a/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue b/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue
index 0c83ec5f1e..357bd59ea3 100644
--- a/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouse.vue
@@ -10,8 +10,7 @@
@@ -40,14 +38,12 @@
-
-
@@ -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 {
}
}
- }
+}