完善采购入库
This commit is contained in:
@@ -24,14 +24,32 @@ export default {
|
||||
},
|
||||
|
||||
// 获取组织下所有的预约单
|
||||
getReservationBill: function(data) {
|
||||
getReservationBill: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/purchaseInStorage/getReservationBill/' + data,
|
||||
method: 'get'
|
||||
url: '/wms/apiadmin/purchaseInStorage/getReservationBill',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 生成入库单
|
||||
createInStorageBill: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/purchaseInStorage/createInStorageBill',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
// // 查询分页列表
|
||||
// listPage: function(params) {
|
||||
// return request({
|
||||
|
||||
@@ -125,7 +125,7 @@ export function saveRoleMenuList(data) {
|
||||
// 菜单授权
|
||||
export function roleMenuTree(data) {
|
||||
return request({
|
||||
url: `/wms/apiadmin/sysmenu/listAllByRoleSid`,
|
||||
url: `/wms/apiadmin/sysmenu/listAllByRoleSidG`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -11,28 +11,27 @@
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
v-for="child in item.children"
|
||||
:key="child.path"
|
||||
:is-nest="true"
|
||||
:item="child"
|
||||
:base-path="resolvePath(child.path)"
|
||||
class="nest-menu"
|
||||
/>
|
||||
<sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child"
|
||||
:base-path="resolvePath(child.path)" class="nest-menu" />
|
||||
</el-submenu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import path from 'path'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import {
|
||||
isExternal
|
||||
} from '@/utils/validate'
|
||||
import Item from './Item'
|
||||
import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
components: { Item, AppLink },
|
||||
components: {
|
||||
Item,
|
||||
AppLink
|
||||
},
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
||||
// route object
|
||||
@@ -79,7 +78,11 @@ export default {
|
||||
|
||||
// Show parent if there are no child router to display
|
||||
if (showingChildren.length === 0) {
|
||||
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
||||
this.onlyOneChild = {
|
||||
...parent,
|
||||
path: '',
|
||||
noShowingChildren: true
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -47,15 +47,34 @@
|
||||
// return this.$router.options.routes
|
||||
// },
|
||||
activeMenu() {
|
||||
// console.log('aaaaaaaaaaa', this.$route)
|
||||
// console.log("val>>>>>>>>>>>>>>>>.", this.$route.query.index); // 页面获取
|
||||
// this.$route.query.index = [{
|
||||
// sid: '11',
|
||||
// name: "ssss"
|
||||
// }, {
|
||||
// sid: '22',
|
||||
// name: "aaa"
|
||||
// }, {
|
||||
// sid: '33',
|
||||
// name: "bbb"
|
||||
// }]
|
||||
const route = this.$route
|
||||
const {
|
||||
meta,
|
||||
path
|
||||
path,
|
||||
// query,
|
||||
} = route
|
||||
|
||||
// this.$route.query = {
|
||||
// index: '1'
|
||||
// }
|
||||
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu
|
||||
}
|
||||
// console.log('bbbbbbb', path)
|
||||
return path
|
||||
},
|
||||
showLogo() {
|
||||
|
||||
1034
src/views/inStorage/receivingGoods/index - 副本.vue
Normal file
1034
src/views/inStorage/receivingGoods/index - 副本.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -169,22 +169,22 @@
|
||||
style="width:150%;margin-left: -20%;">
|
||||
<el-form :inline="true" style="margin-top: -30px;">
|
||||
<el-form-item label="外部单号">
|
||||
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable />
|
||||
<el-input v-model="dialogParams.params.sourceBillNo" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库状态">
|
||||
<el-select v-model="queryParams.params.billState" placeholder="请选择" style="width: 200px;">
|
||||
<el-select v-model="dialogParams.params.billState" placeholder="请选择" style="width: 200px;">
|
||||
<el-option v-for="(item,i) in billStateList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-select v-model="queryParams.params.supplierSid" placeholder="请选择" style="width: 200px;">
|
||||
<el-select v-model="dialogParams.params.supplierSid" placeholder="请选择" style="width: 200px;">
|
||||
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间">
|
||||
<el-date-picker v-model="queryParams.params.inStotageStartTime" type="date" placeholder="选择日期"
|
||||
<el-date-picker v-model="dialogParams.params.inStotageStartTime" type="date" placeholder="选择日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>至
|
||||
<el-date-picker v-model="queryParams.params.inStotageEndTime" type="date" placeholder="选择日期"
|
||||
@@ -192,14 +192,14 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品">
|
||||
<el-select v-model="queryParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;">
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.name" :value="item.sid">
|
||||
<el-select v-model="dialogParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;">
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.goodsName" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left: 50px;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch1">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||
</el-form-item>
|
||||
<!-- <div class="btn" style="text-align: center;margin-bottom: 30px;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
@@ -208,14 +208,14 @@
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-table :data="billList" border style="width: 100%" @selection-change="selectionLineChangeHandle"
|
||||
@row-click="rowItemClick">
|
||||
<el-table :data="billList" border style="width: 100%" @selection-change="handleSelectionChange" ref="main"
|
||||
@select-all="mainSelectAll" @select="mainSelect">
|
||||
<el-table-column fixed width="50" type="selection" align="center" />
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="scope.row.goodsLsit" border stripe size="small" :ref="'sub' + scope.$index"
|
||||
@select="subSelect" @select-all="subSelectAll">
|
||||
<el-table :data="scope.row.goodsList" border stripe size="small" :ref="'sub' + scope.$index"
|
||||
@select="subSelect" @select-all="subSelectAll(scope.$index,$event)">
|
||||
<el-table-column type="selection" width="100" align="center" />
|
||||
<el-table-column prop="goodsCode" label="商品编码" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="goodsBarCode" label="商品条码" align="center" show-overflow-tooltip />
|
||||
@@ -265,6 +265,7 @@
|
||||
import divAddupShelfRecord from './upShelfAddRecord.vue'
|
||||
import {
|
||||
// getTypeValueList,
|
||||
typeValues,
|
||||
choiceSupplierInfo
|
||||
} from '@/api/Common/dictcommons'
|
||||
export default {
|
||||
@@ -327,7 +328,19 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
"inStotageBillNo": "",
|
||||
"sourceBillNo": "",
|
||||
"preBillNo": "",
|
||||
"warehouseRackName": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"carrierName": "",
|
||||
"waybillNumber": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
@@ -337,24 +350,24 @@
|
||||
goodsDetailList: [],
|
||||
billRemarks: {},
|
||||
operationList: [],
|
||||
billStateList: [{
|
||||
name: "在途",
|
||||
sid: "0"
|
||||
},
|
||||
{
|
||||
name: "部分收货",
|
||||
sid: "1"
|
||||
},
|
||||
{
|
||||
name: "收货完成",
|
||||
sid: "2"
|
||||
},
|
||||
{
|
||||
name: "关闭",
|
||||
sid: "3"
|
||||
billStateList: [],
|
||||
billList: [],
|
||||
subIds: [],
|
||||
dialogParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
"sourceBillNo": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
}
|
||||
],
|
||||
billList: []
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -367,18 +380,18 @@
|
||||
methods: {
|
||||
|
||||
init() {
|
||||
var query = {
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||
|
||||
typeValues({
|
||||
type: 'receiveState'
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.billStateList = res.data
|
||||
}
|
||||
// req2.warehouserackListAll(query).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.warehouseRackList = res.data
|
||||
})
|
||||
|
||||
// console.log("aaaaaa", this.warehouseRackList);
|
||||
|
||||
// }
|
||||
// })
|
||||
req3.getGoodsListAllByOrg(query).then((res) => {
|
||||
req3.getGoodsListAllByOrg({
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.goodsList = res.data
|
||||
}
|
||||
@@ -516,14 +529,29 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
"inStotageBillNo": "",
|
||||
"sourceBillNo": "",
|
||||
"preBillNo": "",
|
||||
"warehouseRackName": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"carrierName": "",
|
||||
"waybillNumber": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
|
||||
req.getReservationBill(window.sessionStorage.getItem('orgSidPath')).then((resp) => {
|
||||
this.dialogParams.params.userSid = window.sessionStorage.getItem('userSid')
|
||||
this.dialogParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
|
||||
this.dialogParams.params.menuUrl = this.$route.path
|
||||
req.getReservationBill(this.dialogParams).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.billList = resp.data
|
||||
this.dialogVisible = true
|
||||
@@ -567,12 +595,183 @@
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
|
||||
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
|
||||
handleSelectionChange() {
|
||||
|
||||
},
|
||||
//主table全选
|
||||
mainSelectAll(selection) {
|
||||
console.log("selection", selection)
|
||||
var datas = this.$refs.main.data;
|
||||
datas.forEach((item, index) => {
|
||||
|
||||
this.$refs['main'].toggleRowExpansion(item, true)
|
||||
|
||||
item.check = selection.length != 0
|
||||
|
||||
item.goodsList.forEach((childItem) => {
|
||||
childItem.check = selection.length != 0
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs[`sub${index}`].toggleRowSelection(childItem, selection.length != 0);
|
||||
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
//主table的单选
|
||||
mainSelect(selection, row) {
|
||||
console.log("selection", selection)
|
||||
console.log("row", row)
|
||||
|
||||
const selectIndex = this.billList.findIndex((choose) => choose.sid == row.sid)
|
||||
let selected = selection.length && selection.indexOf(row) !== -1;
|
||||
//为true时选中,为 0 时(false)未选中
|
||||
|
||||
row.check = selected
|
||||
this.$refs['main'].toggleRowExpansion(this.billList[selectIndex], true)
|
||||
this.$refs.main.toggleRowSelection(this.billList[selectIndex], selected)
|
||||
|
||||
row.goodsList.forEach((childItem) => {
|
||||
|
||||
childItem.check = selected
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs[`sub${selectIndex}`].toggleRowSelection(childItem, selected);
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
//子表格勾选 --->联动一级表格
|
||||
subSelectAll(pIndex, selection) {
|
||||
console.log("pIndex", pIndex)
|
||||
console.log("selection", selection)
|
||||
|
||||
let selected = selection.length != 0;
|
||||
//为true时选中,为 0 时(false)未选中
|
||||
|
||||
this.$refs.main.toggleRowSelection(this.billList[pIndex], selected)
|
||||
|
||||
selection.forEach((childItem) => {
|
||||
this.$refs[`sub${pIndex}`].toggleRowSelection(childItem, selected);
|
||||
childItem.check = selected
|
||||
})
|
||||
},
|
||||
|
||||
//子table单选
|
||||
subSelect(selection, row) {
|
||||
|
||||
console.log("row", row)
|
||||
console.log("selection", selection)
|
||||
let selected = selection.length && selection.indexOf(row) !== -1;
|
||||
row.check = selected
|
||||
|
||||
if (selection.length == 0) {
|
||||
const selectIndex = this.billList.findIndex((choose) => choose.sid == row.billSid)
|
||||
this.$refs.main.toggleRowSelection(this.billList[selectIndex], false)
|
||||
this.billList[selectIndex].check = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
dosearch1() {
|
||||
// console.log(" dosearch1", this.selectList);
|
||||
|
||||
this.dialogParams.current = 1
|
||||
this.toAdd()
|
||||
|
||||
|
||||
},
|
||||
resetQuery1() {
|
||||
|
||||
this.dialogParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
"sourceBillNo": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
}
|
||||
}
|
||||
this.toAdd()
|
||||
|
||||
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
"sourceBillNo": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
}
|
||||
}
|
||||
|
||||
var datas = this.$refs.main.data;
|
||||
this.$refs[`main`].clearSelection()
|
||||
datas.forEach((item, index) => {
|
||||
item.check = false
|
||||
this.$refs['main'].toggleRowExpansion(item, true)
|
||||
this.$nextTick(() => {
|
||||
this.$refs[`sub${index}`].clearSelection()
|
||||
})
|
||||
item.goodsList.forEach((childItem) => {
|
||||
childItem.check = false
|
||||
})
|
||||
})
|
||||
|
||||
this.dialogVisible = false
|
||||
|
||||
|
||||
|
||||
},
|
||||
saveData() {
|
||||
|
||||
this.subIds = []
|
||||
var datas = this.$refs.main.data;
|
||||
datas.forEach((item, index) => {
|
||||
item.goodsList.forEach((childItem) => {
|
||||
if (childItem.check && Number(childItem.unInStorageNum) != 0) {
|
||||
this.subIds.push(childItem.goodsSid)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
console.log(" dosearch1", this.subIds);
|
||||
|
||||
req.createInStorageBill(this.subIds).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.dialogVisible = false
|
||||
this.loadList()
|
||||
} else {}
|
||||
}).catch(() => {})
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -531,6 +531,8 @@
|
||||
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
|
||||
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
||||
.pNameAndDepartmentNameAndPostName)
|
||||
} else {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
}).catch(() => {
|
||||
@@ -580,8 +582,12 @@
|
||||
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
|
||||
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
||||
.pNameAndDepartmentNameAndPostName)
|
||||
|
||||
} else {
|
||||
loading.close()
|
||||
}
|
||||
|
||||
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<tr>
|
||||
<td>类型分类</td>
|
||||
<td>
|
||||
<el-radio-group v-model="editMenuType" @change="menuTypeChangeRadio">
|
||||
<el-radio-group v-model="editMenuType" @change="menuTypeChangeRadio" style="width:300px">
|
||||
<el-radio :label="'0'">目录</el-radio>
|
||||
<el-radio :label="'1'">菜单</el-radio>
|
||||
<el-radio :label="'2'">按钮</el-radio>
|
||||
@@ -115,43 +115,49 @@
|
||||
<tr>
|
||||
<td>菜单名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.name" />
|
||||
<el-input v-model="form.name" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>路由名称</td>
|
||||
<td>
|
||||
<el-input v-model="form.menuUrl" />
|
||||
<el-input v-model="form.menuUrl" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>路由路径</td>
|
||||
<td>
|
||||
<el-input v-model="form.pageUrl" />
|
||||
<el-input v-model="form.pageUrl" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>菜单图片</td>
|
||||
<td>
|
||||
<el-input v-model="form.iconUrl" />
|
||||
<el-input v-model="form.iconUrl" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>组件路径</td>
|
||||
<td>
|
||||
<el-input v-model="form.pageName" />
|
||||
<el-input v-model="form.pageName" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="editMenuType=='2'">
|
||||
<td>按钮Key</td>
|
||||
<td>
|
||||
<el-input v-model="form.btnKey" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="editMenuType=='2'">
|
||||
<td>权限标识</td>
|
||||
<td>
|
||||
<el-input v-model="form.cid" />
|
||||
<el-input v-model="form.cid" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否手机端权限</td>
|
||||
<td>
|
||||
<el-radio-group v-model="editPhoneFunction" @change="changeRadio4">
|
||||
<el-radio-group v-model="editPhoneFunction" @change="changeRadio4" style="width:300px">
|
||||
<el-radio :label="'0'">否</el-radio>
|
||||
<el-radio :label="'1'">是</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -160,7 +166,7 @@
|
||||
<tr>
|
||||
<td>是否可见</td>
|
||||
<td>
|
||||
<el-radio-group v-model="editShow" @change="changeRadio">
|
||||
<el-radio-group v-model="editShow" @change="changeRadio" style="width:300px">
|
||||
<el-radio :label="'0'">否</el-radio>
|
||||
<el-radio :label="'1'">是</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -169,7 +175,7 @@
|
||||
<tr>
|
||||
<td>排序号</td>
|
||||
<td>
|
||||
<el-input v-model="form.sortNo" />
|
||||
<el-input v-model="form.sortNo" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -258,10 +264,16 @@
|
||||
<el-input v-model="form.pageName" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="addMenuType=='2'">
|
||||
<td>按钮Key</td>
|
||||
<td>
|
||||
<el-input v-model="form.btnKey" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="addMenuType=='2'">
|
||||
<td>权限标识</td>
|
||||
<td>
|
||||
<el-input v-model="form.cid" />
|
||||
<el-input v-model="form.cid" style="width:300px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -336,6 +348,7 @@
|
||||
remarks: '',
|
||||
sortNo: 0,
|
||||
cid: '',
|
||||
btnKey: "",
|
||||
sourceName: 'wms',
|
||||
phoneFunction: "0",
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||
@@ -414,10 +427,18 @@
|
||||
|
||||
menuTypeChangeRadio(val) {
|
||||
console.log('menuTypeChangeRadio', val)
|
||||
if (val != '2') {
|
||||
this.form.btnKey = ""
|
||||
}
|
||||
this.form.menuType = val
|
||||
},
|
||||
menuTypeChangeRadio2(val) {
|
||||
console.log('menuTypeChangeRadio2', val)
|
||||
|
||||
if (val != '2') {
|
||||
this.form.btnKey = ""
|
||||
}
|
||||
|
||||
this.form.menuType = val
|
||||
},
|
||||
changeRadio(val) {
|
||||
@@ -468,6 +489,7 @@
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
if (tab.name == 'addrole') {
|
||||
this.form = {}
|
||||
this.dialogTitle = '新增'
|
||||
this.form.isShow = '1'
|
||||
this.form.menuType = '0'
|
||||
@@ -482,6 +504,7 @@
|
||||
}
|
||||
},
|
||||
add(row) {
|
||||
|
||||
this.activeName = 'addrole'
|
||||
// if(row == 0){
|
||||
// this.isadd = false
|
||||
@@ -493,8 +516,8 @@
|
||||
this.form.isShow = '1'
|
||||
this.form.menuType = '0'
|
||||
// this.form.psid = row.sid || 0
|
||||
this.form.pname = ''
|
||||
this.form.psid = ''
|
||||
this.form.pname = row.name
|
||||
this.form.psid = row.sid
|
||||
this.form.sourceName = row.sourceName
|
||||
this.form.sourceSid = row.sourceSid
|
||||
if (row.isSource == '1') {
|
||||
@@ -502,6 +525,10 @@
|
||||
} else {
|
||||
this.form.psid = row.sid
|
||||
}
|
||||
let arr = []
|
||||
arr = [row.sid];
|
||||
this.$refs.Tree.setCheckedKeys(arr);
|
||||
|
||||
},
|
||||
editRow(row) {
|
||||
console.log("editRow", row);
|
||||
@@ -511,12 +538,37 @@
|
||||
|
||||
this.editShow = this.form.isShow
|
||||
this.editMenuType = this.form.menuType
|
||||
let arr = []
|
||||
arr = [row.sid];
|
||||
this.$refs.Tree.setCheckedKeys(arr);
|
||||
|
||||
// this.form.isShow = 1
|
||||
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
|
||||
},
|
||||
save() {
|
||||
|
||||
if (this.form.name == '') {
|
||||
this.$message({
|
||||
message: '菜单名称不能为空',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (this.form.menuType == '2') {
|
||||
|
||||
if (this.form.btnKey == '') {
|
||||
this.$message({
|
||||
message: '按钮Key不能为空',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (this.form.sid) {
|
||||
|
||||
putMenusInfo(this.form).then(res => {
|
||||
this.editDialog = false
|
||||
this.getPageList()
|
||||
|
||||
@@ -212,14 +212,18 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="角色授权" :visible.sync="charactarDialog" width="70%">
|
||||
<el-dialog title="角色授权" :visible.sync="charactarDialog" width="70%" :before-close="dialogClose">
|
||||
<el-tabs v-model="charactarName" type="card" style="margin-top: -30px;" @tab-click="handleCharactar">
|
||||
<el-tab-pane label="菜单权限" name="first">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>角色名称</td>
|
||||
<td>
|
||||
<el-input v-model="roleForm.name" readonly></el-input>
|
||||
<div style="display: flex;flex-direction: row;align-items: center;">
|
||||
<el-input v-model="roleForm.name" readonly style="flex: 6;"></el-input>
|
||||
<el-checkbox style="flex: 1;margin-left: 50px;" v-model="checkStrictly">父子级联动</el-checkbox>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -227,7 +231,8 @@
|
||||
<td>
|
||||
<div style="height:230px;overflow:auto;overflow-x:hidden;">
|
||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
||||
:default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange">
|
||||
:default-checked-keys="checkedId" :props="defaultProps" @check-change="checkchange"
|
||||
:check-strictly="!checkStrictly">
|
||||
</el-tree>
|
||||
</div>
|
||||
</td>
|
||||
@@ -235,7 +240,7 @@
|
||||
</table>
|
||||
<div style="margin-top: 10px" class="text-center">
|
||||
<el-button type="primary" @click="getCheckedKeys">保 存</el-button>
|
||||
<el-button @click="charactarDialog = false">关 闭</el-button>
|
||||
<el-button @click="dialogClose">关 闭</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="功能权限" name="second">
|
||||
@@ -476,6 +481,7 @@
|
||||
sid: "4"
|
||||
}
|
||||
],
|
||||
checkStrictly: true, // true 父子节点不关联
|
||||
|
||||
}
|
||||
},
|
||||
@@ -752,7 +758,8 @@
|
||||
this.loading = true
|
||||
let params = {
|
||||
roleSid: row.sid,
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33',
|
||||
orgSid: window.sessionStorage.getItem('orgSid')
|
||||
}
|
||||
roleMenuTree(params).then(res => {
|
||||
let data1 = res.data
|
||||
@@ -953,6 +960,10 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
dialogClose() {
|
||||
this.charactarDialog = false
|
||||
this.checkStrictly = true
|
||||
},
|
||||
// 菜单授权
|
||||
getCheckedKeys() {
|
||||
let roleMenus = []
|
||||
@@ -980,6 +991,7 @@
|
||||
saveorgrolemenus(params).then(res => {
|
||||
this.roleDialog = false
|
||||
this.charactarDialog = false
|
||||
this.checkStrictly = true
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
|
||||
Reference in New Issue
Block a user