完善采购入库
This commit is contained in:
@@ -24,14 +24,32 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 获取组织下所有的预约单
|
// 获取组织下所有的预约单
|
||||||
getReservationBill: function(data) {
|
getReservationBill: function(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/apiadmin/purchaseInStorage/getReservationBill/' + data,
|
url: '/wms/apiadmin/purchaseInStorage/getReservationBill',
|
||||||
method: 'get'
|
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) {
|
// listPage: function(params) {
|
||||||
// return request({
|
// return request({
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export function saveRoleMenuList(data) {
|
|||||||
// 菜单授权
|
// 菜单授权
|
||||||
export function roleMenuTree(data) {
|
export function roleMenuTree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/wms/apiadmin/sysmenu/listAllByRoleSid`,
|
url: `/wms/apiadmin/sysmenu/listAllByRoleSidG`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -11,107 +11,110 @@
|
|||||||
<template slot="title">
|
<template slot="title">
|
||||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||||
</template>
|
</template>
|
||||||
<sidebar-item
|
<sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child"
|
||||||
v-for="child in item.children"
|
:base-path="resolvePath(child.path)" class="nest-menu" />
|
||||||
:key="child.path"
|
|
||||||
:is-nest="true"
|
|
||||||
:item="child"
|
|
||||||
:base-path="resolvePath(child.path)"
|
|
||||||
class="nest-menu"
|
|
||||||
/>
|
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { isExternal } from '@/utils/validate'
|
import {
|
||||||
import Item from './Item'
|
isExternal
|
||||||
import AppLink from './Link'
|
} from '@/utils/validate'
|
||||||
import FixiOSBug from './FixiOSBug'
|
import Item from './Item'
|
||||||
|
import AppLink from './Link'
|
||||||
|
import FixiOSBug from './FixiOSBug'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SidebarItem',
|
name: 'SidebarItem',
|
||||||
components: { Item, AppLink },
|
components: {
|
||||||
mixins: [FixiOSBug],
|
Item,
|
||||||
props: {
|
AppLink
|
||||||
// route object
|
|
||||||
item: {
|
|
||||||
type: Object,
|
|
||||||
required: true
|
|
||||||
},
|
},
|
||||||
isNest: {
|
mixins: [FixiOSBug],
|
||||||
type: Boolean,
|
props: {
|
||||||
default: false
|
// route object
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
isNest: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
basePath: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
basePath: {
|
data() {
|
||||||
type: String,
|
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
|
||||||
default: ''
|
// TODO: refactor with render function
|
||||||
}
|
this.onlyOneChild = null
|
||||||
},
|
return {
|
||||||
data() {
|
// onlyOneChild:null
|
||||||
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
|
}
|
||||||
// TODO: refactor with render function
|
},
|
||||||
this.onlyOneChild = null
|
methods: {
|
||||||
return {
|
hasOneShowingChild(children = [], parent) {
|
||||||
// onlyOneChild:null
|
// debugger
|
||||||
}
|
// var tempItem=null
|
||||||
},
|
const showingChildren = children.filter(item => {
|
||||||
methods: {
|
if (item.hidden) {
|
||||||
hasOneShowingChild(children = [], parent) {
|
return false
|
||||||
// debugger
|
} else {
|
||||||
// var tempItem=null
|
// Temp set(will be used if only has one showing child)
|
||||||
const showingChildren = children.filter(item => {
|
this.onlyOneChild = item
|
||||||
if (item.hidden) {
|
return true
|
||||||
return false
|
}
|
||||||
} else {
|
})
|
||||||
// Temp set(will be used if only has one showing child)
|
|
||||||
this.onlyOneChild = item
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// When there is only one child
|
// When there is only one child
|
||||||
// if (showingChildren.length === 1) {
|
// if (showingChildren.length === 1) {
|
||||||
// this.onlyOneChild=item()
|
// this.onlyOneChild=item()
|
||||||
// return true
|
// return true
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Show parent if there are no child router to display
|
// Show parent if there are no child router to display
|
||||||
if (showingChildren.length === 0) {
|
if (showingChildren.length === 0) {
|
||||||
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
this.onlyOneChild = {
|
||||||
return true
|
...parent,
|
||||||
}
|
path: '',
|
||||||
|
noShowingChildren: true
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
resolvePath(routePath) {
|
resolvePath(routePath) {
|
||||||
if (isExternal(routePath)) {
|
if (isExternal(routePath)) {
|
||||||
return routePath
|
return routePath
|
||||||
|
}
|
||||||
|
if (isExternal(this.basePath)) {
|
||||||
|
return this.basePath
|
||||||
|
}
|
||||||
|
return path.resolve(this.basePath, routePath)
|
||||||
}
|
}
|
||||||
if (isExternal(this.basePath)) {
|
|
||||||
return this.basePath
|
|
||||||
}
|
|
||||||
return path.resolve(this.basePath, routePath)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/deep/ .el-submenu__title {
|
/deep/ .el-submenu__title {
|
||||||
height: 40px !important;
|
height: 40px !important;
|
||||||
line-height: 40px !important;
|
line-height: 40px !important;
|
||||||
font-size: 15px!important;
|
font-size: 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-submenu .el-menu-item {
|
/deep/ .el-submenu .el-menu-item {
|
||||||
height: 40px !important;
|
height: 40px !important;
|
||||||
line-height: 40px !important;
|
line-height: 40px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-menu-item {
|
/deep/ .el-menu-item {
|
||||||
height: 40px !important;
|
height: 40px !important;
|
||||||
line-height: 40px !important;
|
line-height: 40px !important;
|
||||||
font-size: 15px!important;
|
font-size: 15px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -47,15 +47,34 @@
|
|||||||
// return this.$router.options.routes
|
// return this.$router.options.routes
|
||||||
// },
|
// },
|
||||||
activeMenu() {
|
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 route = this.$route
|
||||||
const {
|
const {
|
||||||
meta,
|
meta,
|
||||||
path
|
path,
|
||||||
|
// query,
|
||||||
} = route
|
} = route
|
||||||
|
|
||||||
|
// this.$route.query = {
|
||||||
|
// index: '1'
|
||||||
|
// }
|
||||||
|
|
||||||
// if set path, the sidebar will highlight the path you set
|
// if set path, the sidebar will highlight the path you set
|
||||||
if (meta.activeMenu) {
|
if (meta.activeMenu) {
|
||||||
return meta.activeMenu
|
return meta.activeMenu
|
||||||
}
|
}
|
||||||
|
// console.log('bbbbbbb', path)
|
||||||
return path
|
return path
|
||||||
},
|
},
|
||||||
showLogo() {
|
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%;">
|
style="width:150%;margin-left: -20%;">
|
||||||
<el-form :inline="true" style="margin-top: -30px;">
|
<el-form :inline="true" style="margin-top: -30px;">
|
||||||
<el-form-item label="外部单号">
|
<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>
|
||||||
<el-form-item label="入库状态">
|
<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 v-for="(item,i) in billStateList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="供应商">
|
<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 v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="申请时间">
|
<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;">
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
|
||||||
</el-date-picker>至
|
</el-date-picker>至
|
||||||
<el-date-picker v-model="queryParams.params.inStotageEndTime" type="date" placeholder="选择日期"
|
<el-date-picker v-model="queryParams.params.inStotageEndTime" type="date" placeholder="选择日期"
|
||||||
@@ -192,14 +192,14 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品">
|
<el-form-item label="商品">
|
||||||
<el-select v-model="queryParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;">
|
<el-select v-model="dialogParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;">
|
||||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.name" :value="item.sid">
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.goodsName" :value="item.sid">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="margin-left: 50px;">
|
<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-search" @click="dosearch1">查询</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-refresh" @click="resetQuery1">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <div class="btn" style="text-align: center;margin-bottom: 30px;">
|
<!-- <div class="btn" style="text-align: center;margin-bottom: 30px;">
|
||||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||||
@@ -208,14 +208,14 @@
|
|||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table :data="billList" border style="width: 100%" @selection-change="selectionLineChangeHandle"
|
<el-table :data="billList" border style="width: 100%" @selection-change="handleSelectionChange" ref="main"
|
||||||
@row-click="rowItemClick">
|
@select-all="mainSelectAll" @select="mainSelect">
|
||||||
<el-table-column fixed width="50" type="selection" align="center" />
|
<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 fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-table :data="scope.row.goodsLsit" border stripe size="small" :ref="'sub' + scope.$index"
|
<el-table :data="scope.row.goodsList" border stripe size="small" :ref="'sub' + scope.$index"
|
||||||
@select="subSelect" @select-all="subSelectAll">
|
@select="subSelect" @select-all="subSelectAll(scope.$index,$event)">
|
||||||
<el-table-column type="selection" width="100" align="center" />
|
<el-table-column type="selection" width="100" align="center" />
|
||||||
<el-table-column prop="goodsCode" label="商品编码" align="center" show-overflow-tooltip />
|
<el-table-column prop="goodsCode" label="商品编码" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="goodsBarCode" 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 divAddupShelfRecord from './upShelfAddRecord.vue'
|
||||||
import {
|
import {
|
||||||
// getTypeValueList,
|
// getTypeValueList,
|
||||||
|
typeValues,
|
||||||
choiceSupplierInfo
|
choiceSupplierInfo
|
||||||
} from '@/api/Common/dictcommons'
|
} from '@/api/Common/dictcommons'
|
||||||
export default {
|
export default {
|
||||||
@@ -327,7 +328,19 @@
|
|||||||
size: 10,
|
size: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
params: {
|
params: {
|
||||||
name: ''
|
"inStotageBillNo": "",
|
||||||
|
"sourceBillNo": "",
|
||||||
|
"preBillNo": "",
|
||||||
|
"warehouseRackName": "",
|
||||||
|
"inStotageStartTime": "",
|
||||||
|
"inStotageEndTime": "",
|
||||||
|
"carrierName": "",
|
||||||
|
"waybillNumber": "",
|
||||||
|
"goodsSkuSid": "",
|
||||||
|
"supplierSid": "",
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sids: [],
|
sids: [],
|
||||||
@@ -337,24 +350,24 @@
|
|||||||
goodsDetailList: [],
|
goodsDetailList: [],
|
||||||
billRemarks: {},
|
billRemarks: {},
|
||||||
operationList: [],
|
operationList: [],
|
||||||
billStateList: [{
|
billStateList: [],
|
||||||
name: "在途",
|
billList: [],
|
||||||
sid: "0"
|
subIds: [],
|
||||||
},
|
dialogParams: {
|
||||||
{
|
current: 1,
|
||||||
name: "部分收货",
|
size: 10,
|
||||||
sid: "1"
|
total: 0,
|
||||||
},
|
params: {
|
||||||
{
|
"sourceBillNo": "",
|
||||||
name: "收货完成",
|
"inStotageStartTime": "",
|
||||||
sid: "2"
|
"inStotageEndTime": "",
|
||||||
},
|
"goodsSkuSid": "",
|
||||||
{
|
"supplierSid": "",
|
||||||
name: "关闭",
|
"menuUrl": "",
|
||||||
sid: "3"
|
"orgPath": "",
|
||||||
|
"userSid": ""
|
||||||
}
|
}
|
||||||
],
|
},
|
||||||
billList: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -367,18 +380,18 @@
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
var query = {
|
|
||||||
|
typeValues({
|
||||||
|
type: 'receiveState'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.billStateList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
req3.getGoodsListAllByOrg({
|
||||||
orgPath: window.sessionStorage.getItem('orgSidPath')
|
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||||
}
|
}).then((res) => {
|
||||||
// req2.warehouserackListAll(query).then((res) => {
|
|
||||||
// if (res.success) {
|
|
||||||
// this.warehouseRackList = res.data
|
|
||||||
|
|
||||||
// console.log("aaaaaa", this.warehouseRackList);
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
req3.getGoodsListAllByOrg(query).then((res) => {
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.goodsList = res.data
|
this.goodsList = res.data
|
||||||
}
|
}
|
||||||
@@ -516,14 +529,29 @@
|
|||||||
size: 10,
|
size: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
params: {
|
params: {
|
||||||
name: ''
|
"inStotageBillNo": "",
|
||||||
|
"sourceBillNo": "",
|
||||||
|
"preBillNo": "",
|
||||||
|
"warehouseRackName": "",
|
||||||
|
"inStotageStartTime": "",
|
||||||
|
"inStotageEndTime": "",
|
||||||
|
"carrierName": "",
|
||||||
|
"waybillNumber": "",
|
||||||
|
"goodsSkuSid": "",
|
||||||
|
"supplierSid": "",
|
||||||
|
"menuUrl": "",
|
||||||
|
"orgPath": "",
|
||||||
|
"userSid": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loadList()
|
this.loadList()
|
||||||
},
|
},
|
||||||
toAdd() {
|
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) {
|
if (resp.success) {
|
||||||
this.billList = resp.data
|
this.billList = resp.data
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
@@ -567,12 +595,183 @@
|
|||||||
this.$store.dispatch('tagsView/delView', this.$route)
|
this.$store.dispatch('tagsView/delView', this.$route)
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
resetState() {
|
resetState() {
|
||||||
this.viewState = 1
|
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>
|
</script>
|
||||||
|
|||||||
@@ -531,6 +531,8 @@
|
|||||||
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
|
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
|
||||||
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
||||||
.pNameAndDepartmentNameAndPostName)
|
.pNameAndDepartmentNameAndPostName)
|
||||||
|
} else {
|
||||||
|
loading.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@@ -580,8 +582,12 @@
|
|||||||
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
|
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
|
||||||
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
|
||||||
.pNameAndDepartmentNameAndPostName)
|
.pNameAndDepartmentNameAndPostName)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
loading.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
loading.close()
|
loading.close()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>类型分类</td>
|
<td>类型分类</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="'0'">目录</el-radio>
|
||||||
<el-radio :label="'1'">菜单</el-radio>
|
<el-radio :label="'1'">菜单</el-radio>
|
||||||
<el-radio :label="'2'">按钮</el-radio>
|
<el-radio :label="'2'">按钮</el-radio>
|
||||||
@@ -115,43 +115,49 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>菜单名称</td>
|
<td>菜单名称</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.name" />
|
<el-input v-model="form.name" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>路由名称</td>
|
<td>路由名称</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.menuUrl" />
|
<el-input v-model="form.menuUrl" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>路由路径</td>
|
<td>路由路径</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.pageUrl" />
|
<el-input v-model="form.pageUrl" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>菜单图片</td>
|
<td>菜单图片</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.iconUrl" />
|
<el-input v-model="form.iconUrl" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>组件路径</td>
|
<td>组件路径</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-show="editMenuType=='2'">
|
<tr v-show="editMenuType=='2'">
|
||||||
<td>权限标识</td>
|
<td>权限标识</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.cid" />
|
<el-input v-model="form.cid" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>是否手机端权限</td>
|
<td>是否手机端权限</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="'0'">否</el-radio>
|
||||||
<el-radio :label="'1'">是</el-radio>
|
<el-radio :label="'1'">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@@ -160,7 +166,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>是否可见</td>
|
<td>是否可见</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="'0'">否</el-radio>
|
||||||
<el-radio :label="'1'">是</el-radio>
|
<el-radio :label="'1'">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@@ -169,7 +175,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>排序号</td>
|
<td>排序号</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.sortNo" />
|
<el-input v-model="form.sortNo" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -258,10 +264,16 @@
|
|||||||
<el-input v-model="form.pageName" style="width:300px" />
|
<el-input v-model="form.pageName" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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'">
|
<tr v-show="addMenuType=='2'">
|
||||||
<td>权限标识</td>
|
<td>权限标识</td>
|
||||||
<td>
|
<td>
|
||||||
<el-input v-model="form.cid" />
|
<el-input v-model="form.cid" style="width:300px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -336,6 +348,7 @@
|
|||||||
remarks: '',
|
remarks: '',
|
||||||
sortNo: 0,
|
sortNo: 0,
|
||||||
cid: '',
|
cid: '',
|
||||||
|
btnKey: "",
|
||||||
sourceName: 'wms',
|
sourceName: 'wms',
|
||||||
phoneFunction: "0",
|
phoneFunction: "0",
|
||||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
||||||
@@ -414,10 +427,18 @@
|
|||||||
|
|
||||||
menuTypeChangeRadio(val) {
|
menuTypeChangeRadio(val) {
|
||||||
console.log('menuTypeChangeRadio', val)
|
console.log('menuTypeChangeRadio', val)
|
||||||
|
if (val != '2') {
|
||||||
|
this.form.btnKey = ""
|
||||||
|
}
|
||||||
this.form.menuType = val
|
this.form.menuType = val
|
||||||
},
|
},
|
||||||
menuTypeChangeRadio2(val) {
|
menuTypeChangeRadio2(val) {
|
||||||
console.log('menuTypeChangeRadio2', val)
|
console.log('menuTypeChangeRadio2', val)
|
||||||
|
|
||||||
|
if (val != '2') {
|
||||||
|
this.form.btnKey = ""
|
||||||
|
}
|
||||||
|
|
||||||
this.form.menuType = val
|
this.form.menuType = val
|
||||||
},
|
},
|
||||||
changeRadio(val) {
|
changeRadio(val) {
|
||||||
@@ -468,6 +489,7 @@
|
|||||||
},
|
},
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
if (tab.name == 'addrole') {
|
if (tab.name == 'addrole') {
|
||||||
|
this.form = {}
|
||||||
this.dialogTitle = '新增'
|
this.dialogTitle = '新增'
|
||||||
this.form.isShow = '1'
|
this.form.isShow = '1'
|
||||||
this.form.menuType = '0'
|
this.form.menuType = '0'
|
||||||
@@ -482,6 +504,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
add(row) {
|
add(row) {
|
||||||
|
|
||||||
this.activeName = 'addrole'
|
this.activeName = 'addrole'
|
||||||
// if(row == 0){
|
// if(row == 0){
|
||||||
// this.isadd = false
|
// this.isadd = false
|
||||||
@@ -493,8 +516,8 @@
|
|||||||
this.form.isShow = '1'
|
this.form.isShow = '1'
|
||||||
this.form.menuType = '0'
|
this.form.menuType = '0'
|
||||||
// this.form.psid = row.sid || 0
|
// this.form.psid = row.sid || 0
|
||||||
this.form.pname = ''
|
this.form.pname = row.name
|
||||||
this.form.psid = ''
|
this.form.psid = row.sid
|
||||||
this.form.sourceName = row.sourceName
|
this.form.sourceName = row.sourceName
|
||||||
this.form.sourceSid = row.sourceSid
|
this.form.sourceSid = row.sourceSid
|
||||||
if (row.isSource == '1') {
|
if (row.isSource == '1') {
|
||||||
@@ -502,6 +525,10 @@
|
|||||||
} else {
|
} else {
|
||||||
this.form.psid = row.sid
|
this.form.psid = row.sid
|
||||||
}
|
}
|
||||||
|
let arr = []
|
||||||
|
arr = [row.sid];
|
||||||
|
this.$refs.Tree.setCheckedKeys(arr);
|
||||||
|
|
||||||
},
|
},
|
||||||
editRow(row) {
|
editRow(row) {
|
||||||
console.log("editRow", row);
|
console.log("editRow", row);
|
||||||
@@ -511,12 +538,37 @@
|
|||||||
|
|
||||||
this.editShow = this.form.isShow
|
this.editShow = this.form.isShow
|
||||||
this.editMenuType = this.form.menuType
|
this.editMenuType = this.form.menuType
|
||||||
|
let arr = []
|
||||||
|
arr = [row.sid];
|
||||||
|
this.$refs.Tree.setCheckedKeys(arr);
|
||||||
|
|
||||||
// this.form.isShow = 1
|
// this.form.isShow = 1
|
||||||
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
|
this.form.pname = row.psid == '0' ? '顶级菜单' : row.pname
|
||||||
},
|
},
|
||||||
save() {
|
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) {
|
if (this.form.sid) {
|
||||||
|
|
||||||
putMenusInfo(this.form).then(res => {
|
putMenusInfo(this.form).then(res => {
|
||||||
this.editDialog = false
|
this.editDialog = false
|
||||||
this.getPageList()
|
this.getPageList()
|
||||||
|
|||||||
@@ -212,14 +212,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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-tabs v-model="charactarName" type="card" style="margin-top: -30px;" @tab-click="handleCharactar">
|
||||||
<el-tab-pane label="菜单权限" name="first">
|
<el-tab-pane label="菜单权限" name="first">
|
||||||
<table class="e-table" cellspacing="0">
|
<table class="e-table" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>角色名称</td>
|
<td>角色名称</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -227,7 +231,8 @@
|
|||||||
<td>
|
<td>
|
||||||
<div style="height:230px;overflow:auto;overflow-x:hidden;">
|
<div style="height:230px;overflow:auto;overflow-x:hidden;">
|
||||||
<el-tree v-loading="loading" :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
|
<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>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -235,7 +240,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<div style="margin-top: 10px" class="text-center">
|
<div style="margin-top: 10px" class="text-center">
|
||||||
<el-button type="primary" @click="getCheckedKeys">保 存</el-button>
|
<el-button type="primary" @click="getCheckedKeys">保 存</el-button>
|
||||||
<el-button @click="charactarDialog = false">关 闭</el-button>
|
<el-button @click="dialogClose">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="功能权限" name="second">
|
<!-- <el-tab-pane label="功能权限" name="second">
|
||||||
@@ -476,6 +481,7 @@
|
|||||||
sid: "4"
|
sid: "4"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
checkStrictly: true, // true 父子节点不关联
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -752,7 +758,8 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
let params = {
|
let params = {
|
||||||
roleSid: row.sid,
|
roleSid: row.sid,
|
||||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33'
|
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33',
|
||||||
|
orgSid: window.sessionStorage.getItem('orgSid')
|
||||||
}
|
}
|
||||||
roleMenuTree(params).then(res => {
|
roleMenuTree(params).then(res => {
|
||||||
let data1 = res.data
|
let data1 = res.data
|
||||||
@@ -953,6 +960,10 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
dialogClose() {
|
||||||
|
this.charactarDialog = false
|
||||||
|
this.checkStrictly = true
|
||||||
|
},
|
||||||
// 菜单授权
|
// 菜单授权
|
||||||
getCheckedKeys() {
|
getCheckedKeys() {
|
||||||
let roleMenus = []
|
let roleMenus = []
|
||||||
@@ -980,6 +991,7 @@
|
|||||||
saveorgrolemenus(params).then(res => {
|
saveorgrolemenus(params).then(res => {
|
||||||
this.roleDialog = false
|
this.roleDialog = false
|
||||||
this.charactarDialog = false
|
this.charactarDialog = false
|
||||||
|
this.checkStrictly = true
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
Reference in New Issue
Block a user