完善数据权限

This commit is contained in:
2024-07-17 16:55:17 +08:00
parent 89a78fde00
commit f4a203984f
25 changed files with 1633 additions and 1603 deletions

View File

@@ -92,7 +92,7 @@ export function userSingle(data) {
// 单条用户的角色列表 // 单条用户的角色列表
export function setRole(data) { export function setRole(data) {
return request({ return request({
url: '/wms/apiadmin/sysrole/listAllByUserSid/' + data.sid, url: '/wms/apiadmin/sysrole/listAllByUserSid/' + data.sid + "/" + data.orgsid,
method: 'post', method: 'post',
data: data, data: data,
headers: { headers: {

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<!--列表页面--> <!--列表页面-->
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar view-title="供应商管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> <button-bar view-title="供应商管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<!--Start查询列表部分--> <!--Start查询列表部分-->
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
@@ -10,16 +10,16 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="供应商"> <el-form-item label="供应商">
<el-input v-model="listQuery.params.supplierName" placeholder="" clearable/> <el-input v-model="listQuery.params.supplierName" placeholder="" clearable />
</el-form-item> </el-form-item>
<el-form-item label="分类"> <el-form-item label="分类">
<el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable/> <el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable />
</el-form-item> </el-form-item>
<el-form-item label="办公电话"> <el-form-item label="办公电话">
<el-input v-model="listQuery.params.contactTelePhone" placeholder="" clearable/> <el-input v-model="listQuery.params.contactTelePhone" placeholder="" clearable />
</el-form-item> </el-form-item>
<el-form-item label="联系人"> <el-form-item label="联系人">
<el-input v-model="listQuery.params.contactName" placeholder="" clearable/> <el-input v-model="listQuery.params.contactName" placeholder="" clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@@ -31,11 +31,13 @@
<!--End查询列表部分--> <!--End查询列表部分-->
<div class="listtop"> <div class="listtop">
<div class="tit">供应商列表</div> <div class="tit">供应商列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
<!--Start 主页面主要部分 --> <!--Start 主页面主要部分 -->
<div class=""> <div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> <el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50" /> <el-table-column type="selection" align="center" width="50" />
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> <el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" width="180px" align="center"> <el-table-column label="操作" width="180px" align="center">
@@ -54,9 +56,10 @@
</div> </div>
<!--End 主页面主要部分--> <!--End 主页面主要部分-->
<div class="pages"> <div class="pages">
<div class="tit"/> <div class="tit" />
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> <pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
<!--End查询列表部分--> <!--End查询列表部分-->
</div> </div>
@@ -69,202 +72,211 @@
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import req from '@/api/baseinfo/supplier/supplier.js' import req from '@/api/baseinfo/supplier/supplier.js'
import supplierAdd from './supplierAdd' import supplierAdd from './supplierAdd'
import supplierInfo from './supplierInfo' import supplierInfo from './supplierInfo'
export default { export default {
name: 'Supplier', name: 'Supplier',
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar, ButtonBar,
supplierAdd, supplierAdd,
supplierInfo supplierInfo
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
tableKey: 0,
list: [],
sids: [], // 用于导出的时候保存已选择的SIDs
FormLoading: false,
listLoading: false,
// 翻页
listQuery: {
current: 1,
size: 10,
total: 0,
params: {
supplierName: '',
supplierTypeName: '',
contactTelePhone: '',
contactName: ''
}
}
}
},
created() {
// 初始化变量
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
}, },
btnHandle(btnKey) { data() {
console.log('XXXXXXXXXXXXXXX ' + btnKey) return {
switch (btnKey) { btndisabled: false,
case 'toAdd': btnList: [{
this.toAdd() type: 'primary',
break size: 'small',
case 'doDel': icon: 'plus',
this.doDel() btnKey: 'toAdd',
break btnLabel: '新增'
case 'doClose': },
this.doClose() {
break type: 'danger',
default: size: 'small',
break icon: 'del',
} btnKey: 'doDel',
}, btnLabel: '删除'
// 信息条数 获取点击时当前的sid },
handleSelectionChange(row) { {
const aa = [] type: 'info',
row.forEach(element => { size: 'small',
aa.push(element.sid) icon: 'cross',
}) btnKey: 'doClose',
this.sids = aa btnLabel: '关闭'
},
// 表中序号
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
// 查询列表信息
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
// 查询按钮
handleFilter() {
this.listQuery.current = 1
this.getList()
},
// 点击重置
handleReset() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
supplierName: '',
supplierTypeName: '',
contactTelePhone: '',
contactName: ''
}
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.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(this.sids).then(resp => {
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
} }
this.getList() ],
loading.close() isSearchShow: false,
}).catch(e => { searchxianshitit: '显示查询条件',
loading.close() viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
tableKey: 0,
list: [],
sids: [], // 用于导出的时候保存已选择的SIDs
FormLoading: false,
listLoading: false,
// 翻页
listQuery: {
current: 1,
size: 10,
total: 0,
params: {
supplierName: '',
supplierTypeName: '',
contactTelePhone: '',
contactName: ''
}
}
}
},
created() {
// 初始化变量
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// 信息条数 获取点击时当前的sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
}) })
}).catch(() => { this.sids = aa
}) },
}, // 表中序号
// 修改、编辑、详情返回列表页面 indexMethod(index) {
resetState() { var pagestart = (this.listQuery.current - 1) * this.listQuery.size
this.viewState = 1 var pageindex = index + 1 + pagestart
}, return pageindex
doClose() { },
this.$store.dispatch('tagsView/delView', this.$route) // 查询列表信息
this.$router.go(-1) getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
// 查询按钮
handleFilter() {
this.listQuery.current = 1
this.getList()
},
// 点击重置
handleReset() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
supplierName: '',
supplierTypeName: '',
contactTelePhone: '',
contactName: ''
}
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
doDel() {
if (this.sids.length === 0) {
this.$message({
showClose: true,
type: 'error',
message: '请选择至少一条记录进行删除操作'
})
return
}
const tip = '请确认是否删除所选 ' + this.sids.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(this.sids).then(resp => {
if (resp.success) {
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
}
this.getList()
loading.close()
}).catch(e => {
loading.close()
})
}).catch(() => {})
},
// 修改、编辑、详情返回列表页面
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@@ -14,50 +14,61 @@
<el-row style="border-top: 1px solid #e0e3eb"> <el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>供应商名称</div> <div class="span-sty"><span class="icon">*</span>供应商名称</div>
<el-form-item prop="supplierName"><el-input class="addinputInfo addinputw" v-model="formobj.supplierName" clearable placeholder=""/></el-form-item> <el-form-item prop="supplierName"><el-input class="addinputInfo addinputw" v-model="formobj.supplierName"
clearable placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>供应商简称</div> <div class="span-sty"><span class="icon">*</span>供应商简称</div>
<el-form-item prop="supplierPY"><el-input class="addinputInfo addinputw" v-model="formobj.supplierPY" clearable placeholder=""/></el-form-item> <el-form-item prop="supplierPY"><el-input class="addinputInfo addinputw" v-model="formobj.supplierPY"
clearable placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>供应商编码</div> <div class="span-sty"><span class="icon">*</span>供应商编码</div>
<el-form-item prop="supplierCode"><el-input class="addinputInfo addinputw" v-model="formobj.supplierCode" clearable placeholder=""/></el-form-item> <el-form-item prop="supplierCode"><el-input class="addinputInfo addinputw" v-model="formobj.supplierCode"
clearable placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>供应商类型</div> <div class="span-sty"><span class="icon">*</span>供应商类型</div>
<el-form-item prop="supplierTypeSid"> <el-form-item prop="supplierTypeSid">
<el-select class="addinputInfo" v-model="formobj.supplierTypeSid" filterable placeholder="" @change="supplierTypeChange"> <el-select class="addinputInfo" v-model="formobj.supplierTypeSid" filterable placeholder=""
<el-option v-for="item in supplierType_list" :key="item.sid" :label="item.supplierTypeName" :value="item.sid"/> @change="supplierTypeChange">
<el-option v-for="item in supplierType_list" :key="item.sid" :label="item.supplierTypeName"
:value="item.sid" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>供应商电话</div> <div class="span-sty"><span class="icon">*</span>供应商电话</div>
<el-form-item prop="contactTelePhone"><el-input class="addinputInfo addinputw" v-model="formobj.contactTelePhone" clearable placeholder=""/></el-form-item> <el-form-item prop="contactTelePhone"><el-input class="addinputInfo addinputw"
v-model="formobj.contactTelePhone" clearable placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">传真</div> <div class="span-sty">传真</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.fax" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.fax" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">详细地址</div> <div class="span-sty">详细地址</div>
<el-form-item> <el-form-item>
<div class="addinputInfo" style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center"> <div class="addinputInfo"
<el-select v-model="formobj.province" filterable clearable placeholder="请选择省" style="width:160px" @change="provinceChange"> style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center">
<el-option v-for="item in province_list" :key="item.sid" :label="item.name" :value="item.name"/> <el-select v-model="formobj.province" filterable clearable placeholder="请选择省" style="width:160px"
@change="provinceChange">
<el-option v-for="item in province_list" :key="item.sid" :label="item.name" :value="item.name" />
</el-select> </el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" style="width:160px" @change="cityChange"> <el-select v-model="formobj.city" filterable placeholder="请选择市" style="width:160px"
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.name"/> @change="cityChange">
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.name" />
</el-select> </el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" style="width:160px" @change="countyChange"> <el-select v-model="formobj.county" filterable placeholder="请选择县" style="width:160px"
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.name"/> @change="countyChange">
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.name" />
</el-select> </el-select>
<el-input style="width: 30%" v-model="formobj.address" clearable placeholder=""/> <el-input style="width: 30%" v-model="formobj.address" clearable placeholder="" />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -65,11 +76,13 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">联系人</div> <div class="span-sty">联系人</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactName" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactName" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">联系电话</div> <div class="span-sty">联系电话</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactMobile" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactMobile" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
</el-col> </el-col>
@@ -77,53 +90,65 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">邮编</div> <div class="span-sty">邮编</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.zipCode" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.zipCode" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">电子邮件</div> <div class="span-sty">电子邮件</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.email" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.email" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">网址</div> <div class="span-sty">网址</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.website" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.website" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>开票公司名称</div> <div class="span-sty"><span class="icon">*</span>开票公司名称</div>
<el-form-item prop="billingCompanyName"><el-input class="addinputInfo addinputw" v-model="formobj.billingCompanyName" clearable placeholder=""/></el-form-item> <el-form-item prop="billingCompanyName"><el-input class="addinputInfo addinputw"
v-model="formobj.billingCompanyName" clearable placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">税号</div> <div class="span-sty">税号</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.registNum" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.registNum" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">法人</div> <div class="span-sty">法人</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.legalName" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.legalName" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">采购员</div> <div class="span-sty">采购员</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.purchaser" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.purchaser" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>开票类型</div> <div class="span-sty"><span class="icon">*</span>开票类型</div>
<el-form-item prop="billingTypeValue"> <el-form-item prop="billingTypeValue">
<el-select class="addinputInfo" v-model="formobj.billingTypeValue" filterable placeholder="" @change="billingTypeChange"> <el-select class="addinputInfo" v-model="formobj.billingTypeValue" filterable placeholder=""
<el-option v-for="item in billingType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/> @change="billingTypeChange">
<el-option v-for="item in billingType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty"><span class="icon">*</span>税率</div> <div class="span-sty"><span class="icon">*</span>税率</div>
<el-form-item prop="taxRate"><el-input class="addinputInfo addinputw" @keyup.native="formobj.taxRate = getNumber(formobj.taxRate, 2)" v-model="formobj.taxRate" clearable placeholder=""/></el-form-item> <el-form-item prop="taxRate"><el-input class="addinputInfo addinputw"
@keyup.native="formobj.taxRate = getNumber(formobj.taxRate, 2)" v-model="formobj.taxRate" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder=""/></el-form-item> <el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable
placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title titleOne"> <div class="title titleOne">
@@ -131,7 +156,7 @@
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd">新增</el-button> <el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd">新增</el-button>
</div> </div>
<el-table :key="tableKey" :data="formobj.baseSupplierBankList" :index="index" border style="width: 100%"> <el-table :key="tableKey" :data="formobj.baseSupplierBankList" :index="index" border style="width: 100%">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> <el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column fixed width="150" label="操作" align="center"> <el-table-column fixed width="150" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleEdit(scope.row, scope.$index)">编辑</el-button> <el-button type="primary" size="mini" @click="handleEdit(scope.row, scope.$index)">编辑</el-button>
@@ -139,14 +164,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="dueBankValue" label="账户类型" align="center" width="100" /> <el-table-column prop="dueBankValue" label="账户类型" align="center" width="100" />
<el-table-column prop="bankName" label="开户银行" align="center" width="120"/> <el-table-column prop="bankName" label="开户银行" align="center" width="120" />
<el-table-column prop="bankAccount" label="银行账号" align="center" width="100" /> <el-table-column prop="bankAccount" label="银行账号" align="center" width="100" />
<el-table-column prop="accountName" label="账号名称" align="center" width="160" /> <el-table-column prop="accountName" label="账号名称" align="center" width="160" />
<el-table-column prop="bankingOutlets" label="银行网点" align="center" width="100" /> <el-table-column prop="bankingOutlets" label="银行网点" align="center" width="100" />
<el-table-column prop="bankAddress" label="开户行地址" align="center" min-width="200"/> <el-table-column prop="bankAddress" label="开户行地址" align="center" min-width="200" />
<el-table-column prop="paymentLines" label="联行号" align="center" width="100"/> <el-table-column prop="paymentLines" label="联行号" align="center" width="100" />
<el-table-column prop="swiftCode" label="swifcode(银行代码)" align="center" width="170" /> <el-table-column prop="swiftCode" label="swifcode(银行代码)" align="center" width="170" />
<el-table-column prop="currency" label="币种" align="center" width="100"/> <el-table-column prop="currency" label="币种" align="center" width="100" />
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
@@ -156,320 +181,379 @@
</template> </template>
<script> <script>
import req from '@/api/baseinfo/supplier/supplier.js' import req from '@/api/baseinfo/supplier/supplier.js'
import openingbank from './relation/openingbank' import openingbank from './relation/openingbank'
import { getProvince, getCity, getCounty, typeValues } from '@/api/Common/dictcommons' import {
getProvince,
getCity,
getCounty,
typeValues
} from '@/api/Common/dictcommons'
export default { export default {
name: 'SupplierAdd', name: 'SupplierAdd',
components: { components: {
openingbank openingbank
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
supplierType_list: [],
province_list: [],
city_list: [],
county_list: [],
billingType_list: [],
formobj: {
sid: '',
supplierCode: '',
supplierName: '',
supplierPY: '',
supplierTypeSid: '',
supplierTypeName: '',
provinceSid: '',
province: '',
citySid: '',
city: '',
countySid: '',
county: '',
address: '',
contactMobile: '',
contactTelePhone: '',
contactName: '',
fax: '',
zipCode: '',
email: '',
website: '',
billingCompanyName: '',
registNum: '',
legalName: '',
purchaser: '',
sortNo: '',
billingTypeKey: '',
billingTypeValue: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
taxRate: '',
remarks: '',
baseSupplierBankList: []
},
rules: {
supplierName: [{ required: true, message: '供应商名称不能为空', trigger: 'blur' }],
supplierPY: [{ required: true, message: '供应商简称不能为空', trigger: 'blur' }],
supplierCode: [{ required: true, message: '供应商编码不能为空', trigger: 'blur' }],
supplierTypeSid: [{ required: true, message: '供应商类型不能为空', trigger: 'change' }],
contactTelePhone: [{ required: true, message: '供应商电话不能为空', trigger: 'blur' }],
billingCompanyName: [{ required: true, message: '开票公司名称不能为空', trigger: 'blur' }],
billingTypeValue: [{ required: true, message: '开票类型不能为空', trigger: 'change' }],
taxRate: [{ required: true, message: '税率不能为空', trigger: 'blur' }]
}
}
},
methods: {
init() {
typeValues({ type: 'accountType' }).then((res) => {
if (res.success) {
this.billingType_list = res.data
}
})
getProvince().then((res) => {
if (res.success) {
this.province_list = res.data
}
})
req.selSupplierType({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) {
this.supplierType_list = res.data
}
})
}, },
getNumber(val, limit) { data() {
val = val.replace(/[^0-9.]/g, '') // 保留数字 return {
val = val.replace(/^00/, '0.') // 开头不能有两个0 viewTitle: '',
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0. viewState: 1,
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个 submitdisabled: false,
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点 tableKey: 0,
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0 index: 0,
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' supplierType_list: [],
const reg = new RegExp(str) province_list: [],
if (limit === 0) { city_list: [],
// 不需要小数点 county_list: [],
val = val.replace(reg, '$1') billingType_list: [],
} else { formobj: {
// 通过正则保留小数点后指定的位数
val = val.replace(reg, '$1.$2')
}
return val
},
supplierTypeChange(value) {
const choose = this.supplierType_list.filter((item) => item.sid === value)
if (choose !== null && choose.length > 0) {
this.formobj.supplierTypeName = choose[0].supplierTypeName
}
},
provinceChange(value) {
const choose = this.province_list.filter((item) => item.name === value)
if (choose !== null && choose.length > 0) {
this.formobj.provinceSid = choose[0].sid
this.getCity(this.formobj.provinceSid)
} else {
this.formobj.provinceSid = ''
this.formobj.citySid = ''
this.formobj.city = ''
this.city_list = []
this.formobj.county = ''
this.formobj.countySid = ''
this.county_list = []
}
},
getCity(val) {
getCity({ sid: val }).then((res) => {
if (res.success) {
this.city_list = res.data
}
})
},
cityChange(value) {
const choose = this.city_list.filter((item) => item.name === value)
if (choose !== null && choose.length > 0) {
this.formobj.citySid = choose[0].sid
this.getCounty(this.formobj.citySid)
}
},
getCounty(val) {
getCounty({ sid: val }).then((res) => {
if (res.success) {
this.county_list = res.data
}
})
},
countyChange(value) {
const choose = this.county_list.filter((item) => item.name === value)
if (choose !== null && choose.length > 0) {
this.formobj.countySid = choose[0].sid
}
},
showAdd() {
this.viewTitle = '【新增】供应商'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
},
showEdit(row) {
this.viewTitle = '【编辑】供应商'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.fetchDetailsBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
billingTypeChange(value) {
const choose = this.billingType_list.filter((item) => item.dictValue === value)
if (choose !== null && choose.length > 0) {
this.formobj.billingTypeKey = choose[0].dictKey
}
},
handleAdd() {
this.viewState = 2
this.$refs['divOpen'].showAdd()
},
handleEdit(row, index) {
this.viewState = 3
this.$refs['divOpen'].showEdit(row, index)
},
handleDelete(index) {
this.formobj.baseSupplierBankList.splice(index, 1)
},
backData(value, index) {
this.viewState = 1
value = JSON.parse(JSON.stringify(value))
if (index !== '' && index !== null) {
this.formobj.baseSupplierBankList[index] = {
sid: value.sid,
supplierSid: value.supplierSid,
bankName: value.bankName,
bankAccount: value.bankAccount,
accountName: value.accountName,
dueBankKey: value.dueBankKey,
dueBankValue: value.dueBankValue,
bankingOutlets: value.bankingOutlets,
bankAddress: value.bankAddress,
paymentLines: value.paymentLines,
swiftCode: value.swiftCode,
currency: value.currency
}
} else {
this.formobj.baseSupplierBankList.push({
sid: '', sid: '',
supplierSid: value.supplierSid, supplierCode: '',
bankName: value.bankName, supplierName: '',
bankAccount: value.bankAccount, supplierPY: '',
accountName: value.accountName, supplierTypeSid: '',
dueBankKey: value.dueBankKey, supplierTypeName: '',
dueBankValue: value.dueBankValue, provinceSid: '',
bankingOutlets: value.bankingOutlets, province: '',
bankAddress: value.bankAddress, citySid: '',
paymentLines: value.paymentLines, city: '',
swiftCode: value.swiftCode, countySid: '',
currency: value.currency county: '',
}) address: '',
contactMobile: '',
contactTelePhone: '',
contactName: '',
fax: '',
zipCode: '',
email: '',
website: '',
billingCompanyName: '',
registNum: '',
legalName: '',
purchaser: '',
sortNo: '',
billingTypeKey: '',
billingTypeValue: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
taxRate: '',
remarks: '',
baseSupplierBankList: [],
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
userSid: window.sessionStorage.getItem('userSid'),
},
rules: {
supplierName: [{
required: true,
message: '供应商名称不能为空',
trigger: 'blur'
}],
supplierPY: [{
required: true,
message: '供应商简称不能为空',
trigger: 'blur'
}],
supplierCode: [{
required: true,
message: '供应商编码不能为空',
trigger: 'blur'
}],
supplierTypeSid: [{
required: true,
message: '供应商类型不能为空',
trigger: 'change'
}],
contactTelePhone: [{
required: true,
message: '供应商电话不能为空',
trigger: 'blur'
}],
billingCompanyName: [{
required: true,
message: '开票公司名称不能为空',
trigger: 'blur'
}],
billingTypeValue: [{
required: true,
message: '开票类型不能为空',
trigger: 'change'
}],
taxRate: [{
required: true,
message: '税率不能为空',
trigger: 'blur'
}]
}
} }
}, },
resetState() { methods: {
this.viewState = 1 init() {
}, typeValues({
saveOrUpdate() { type: 'accountType'
this.$refs['form_obj'].validate((valid) => { }).then((res) => {
if (valid) { if (res.success) {
this.submitdisabled = true this.billingType_list = res.data
req.saveOrUpdate(this.formobj).then((res) => { }
if (res.success) { })
this.$message({ showClose: true, type: 'success', message: '保存成功' }) getProvince().then((res) => {
this.handleReturn('true') if (res.success) {
} else { this.province_list = res.data
this.submitdisabled = false }
} })
}).catch(() => { req.selSupplierType({
this.submitdisabled = false orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.supplierType_list = res.data
}
})
},
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') // 保留数字
val = val.replace(/^00/, '0.') // 开头不能有两个0
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0.
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
// 不需要小数点
val = val.replace(reg, '$1')
} else {
// 通过正则保留小数点后指定的位数
val = val.replace(reg, '$1.$2')
}
return val
},
supplierTypeChange(value) {
const choose = this.supplierType_list.filter((item) => item.sid === value)
if (choose !== null && choose.length > 0) {
this.formobj.supplierTypeName = choose[0].supplierTypeName
}
},
provinceChange(value) {
const choose = this.province_list.filter((item) => item.name === value)
if (choose !== null && choose.length > 0) {
this.formobj.provinceSid = choose[0].sid
this.getCity(this.formobj.provinceSid)
} else {
this.formobj.provinceSid = ''
this.formobj.citySid = ''
this.formobj.city = ''
this.city_list = []
this.formobj.county = ''
this.formobj.countySid = ''
this.county_list = []
}
},
getCity(val) {
getCity({
sid: val
}).then((res) => {
if (res.success) {
this.city_list = res.data
}
})
},
cityChange(value) {
const choose = this.city_list.filter((item) => item.name === value)
if (choose !== null && choose.length > 0) {
this.formobj.citySid = choose[0].sid
this.getCounty(this.formobj.citySid)
}
},
getCounty(val) {
getCounty({
sid: val
}).then((res) => {
if (res.success) {
this.county_list = res.data
}
})
},
countyChange(value) {
const choose = this.county_list.filter((item) => item.name === value)
if (choose !== null && choose.length > 0) {
this.formobj.countySid = choose[0].sid
}
},
showAdd() {
this.viewTitle = '【新增】供应商'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
},
showEdit(row) {
this.viewTitle = '【编辑】供应商'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.fetchDetailsBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
billingTypeChange(value) {
const choose = this.billingType_list.filter((item) => item.dictValue === value)
if (choose !== null && choose.length > 0) {
this.formobj.billingTypeKey = choose[0].dictKey
}
},
handleAdd() {
this.viewState = 2
this.$refs['divOpen'].showAdd()
},
handleEdit(row, index) {
this.viewState = 3
this.$refs['divOpen'].showEdit(row, index)
},
handleDelete(index) {
this.formobj.baseSupplierBankList.splice(index, 1)
},
backData(value, index) {
this.viewState = 1
value = JSON.parse(JSON.stringify(value))
if (index !== '' && index !== null) {
this.formobj.baseSupplierBankList[index] = {
sid: value.sid,
supplierSid: value.supplierSid,
bankName: value.bankName,
bankAccount: value.bankAccount,
accountName: value.accountName,
dueBankKey: value.dueBankKey,
dueBankValue: value.dueBankValue,
bankingOutlets: value.bankingOutlets,
bankAddress: value.bankAddress,
paymentLines: value.paymentLines,
swiftCode: value.swiftCode,
currency: value.currency
}
} else {
this.formobj.baseSupplierBankList.push({
sid: '',
supplierSid: value.supplierSid,
bankName: value.bankName,
bankAccount: value.bankAccount,
accountName: value.accountName,
dueBankKey: value.dueBankKey,
dueBankValue: value.dueBankValue,
bankingOutlets: value.bankingOutlets,
bankAddress: value.bankAddress,
paymentLines: value.paymentLines,
swiftCode: value.swiftCode,
currency: value.currency
}) })
} }
}) },
}, resetState() {
handleReturn(isreload) { this.viewState = 1
if (isreload === 'true') this.$emit('reloadlist') },
this.formobj = { saveOrUpdate() {
sid: '', this.$refs['form_obj'].validate((valid) => {
supplierCode: '', if (valid) {
supplierName: '', this.submitdisabled = true
supplierPY: '', req.saveOrUpdate(this.formobj).then((res) => {
supplierTypeSid: '', if (res.success) {
supplierTypeName: '', this.$message({
provinceSid: '', showClose: true,
province: '', type: 'success',
citySid: '', message: '保存成功'
city: '', })
countySid: '', this.handleReturn('true')
county: '', } else {
address: '', this.submitdisabled = false
contactMobile: '', }
contactTelePhone: '', }).catch(() => {
contactName: '', this.submitdisabled = false
fax: '', })
zipCode: '', }
email: '', })
website: '', },
billingCompanyName: '', handleReturn(isreload) {
registNum: '', if (isreload === 'true') this.$emit('reloadlist')
legalName: '', this.formobj = {
purchaser: '', sid: '',
sortNo: '', supplierCode: '',
billingTypeKey: '', supplierName: '',
billingTypeValue: '', supplierPY: '',
useOrgSid: '', supplierTypeSid: '',
createOrgName: '', supplierTypeName: '',
createOrgSid: '', provinceSid: '',
taxRate: '', province: '',
remarks: '', citySid: '',
baseSupplierBankList: [] city: '',
countySid: '',
county: '',
address: '',
contactMobile: '',
contactTelePhone: '',
contactName: '',
fax: '',
zipCode: '',
email: '',
website: '',
billingCompanyName: '',
registNum: '',
legalName: '',
purchaser: '',
sortNo: '',
billingTypeKey: '',
billingTypeValue: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
taxRate: '',
remarks: '',
baseSupplierBankList: [],
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
userSid: window.sessionStorage.getItem('userSid'),
}
this.submitdisabled = false
this.$emit('doback')
} }
this.submitdisabled = false
this.$emit('doback')
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.addinputInfo {
margin-left: 120px !important; .addinputInfo {
} margin-left: 120px !important;
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { }
margin-left: 120px !important;
width: calc(100% - 115px); .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
} margin-left: 120px !important;
/deep/ .el-form-item__error { width: calc(100% - 115px);
margin-left: 120px !important; }
}
.titleOne { /deep/ .el-form-item__error {
padding: 7px; margin-left: 120px !important;
display: flex; }
flex-direction: row;
justify-content: space-between; .titleOne {
align-items: center; padding: 7px;
} display: flex;
/*表格列设置fixed后固定列出现下边框的设置*/ flex-direction: row;
/deep/ .el-table__fixed { justify-content: space-between;
height: 100% !important; align-items: center;
} }
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right { /*表格列设置fixed后固定列出现下边框的设置*/
height: 100% !important; /deep/ .el-table__fixed {
} height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style> </style>

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<!--列表页面--> <!--列表页面-->
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar view-title="供应商类型管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> <button-bar view-title="供应商类型管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<!--Start查询列表部分--> <!--Start查询列表部分-->
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
@@ -10,10 +10,10 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="供应商类型"> <el-form-item label="供应商类型">
<el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable/> <el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable />
</el-form-item> </el-form-item>
<el-form-item label="供应商编码"> <el-form-item label="供应商编码">
<el-input v-model="listQuery.params.supplierTypeCode" placeholder="" clearable/> <el-input v-model="listQuery.params.supplierTypeCode" placeholder="" clearable />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@@ -25,11 +25,13 @@
<!--End查询列表部分--> <!--End查询列表部分-->
<div class="listtop"> <div class="listtop">
<div class="tit">供应商类型列表</div> <div class="tit">供应商类型列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
<!--Start 主页面主要部分 --> <!--Start 主页面主要部分 -->
<div class=""> <div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> <el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50" /> <el-table-column type="selection" align="center" width="50" />
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> <el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
<el-table-column label="操作" width="180px" align="center"> <el-table-column label="操作" width="180px" align="center">
@@ -43,9 +45,10 @@
</div> </div>
<!--End 主页面主要部分--> <!--End 主页面主要部分-->
<div class="pages"> <div class="pages">
<div class="tit"/> <div class="tit" />
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> <pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
<!--End查询列表部分--> <!--End查询列表部分-->
</div> </div>
@@ -55,11 +58,13 @@
<el-row style="border-top: 1px solid #E0E3EB"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12"> <el-col :span="12">
<div class="span-sty"><span class="icon">*</span>供应商类型</div> <div class="span-sty"><span class="icon">*</span>供应商类型</div>
<el-form-item><el-input class="addinputInfo" style="width: 60%" v-model.trim="formobj.supplierTypeName" clearable placeholder="" /></el-form-item> <el-form-item><el-input class="addinputInfo" style="width: 60%" v-model.trim="formobj.supplierTypeName"
clearable placeholder="" /></el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="span-sty"><span class="icon">*</span>供应商编码</div> <div class="span-sty"><span class="icon">*</span>供应商编码</div>
<el-form-item><el-input class="addinputInfo" style="width: 60%" v-model.trim="formobj.supplierTypeCode" clearable placeholder="" /></el-form-item> <el-form-item><el-input class="addinputInfo" style="width: 60%" v-model.trim="formobj.supplierTypeCode"
clearable placeholder="" /></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@@ -72,225 +77,245 @@
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import req from '@/api/baseinfo/suppliertype/suppliertype.js' import req from '@/api/baseinfo/suppliertype/suppliertype.js'
export default { export default {
name: 'SupplierType', name: 'SupplierType',
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar ButtonBar
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
dialogVisible: false, dialogVisible: false,
btnList: [ btnList: [{
{ type: 'primary',
type: 'primary', size: 'small',
size: 'small', icon: 'plus',
icon: 'plus', btnKey: 'toAdd',
btnKey: 'toAdd', btnLabel: '新增'
btnLabel: '新增' },
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
tableKey: 0,
list: [],
sids: [], // 用于导出的时候保存已选择的SIDs
FormLoading: false,
listLoading: false,
// 翻页
listQuery: {
current: 1,
size: 10,
total: 0,
params: {
supplierTypeName: '',
supplierTypeCode: '',
orgPath: ''
}
}, },
{ formobj: {
type: 'danger', sid: '',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看
tableKey: 0,
list: [],
sids: [], // 用于导出的时候保存已选择的SIDs
FormLoading: false,
listLoading: false,
// 翻页
listQuery: {
current: 1,
size: 10,
total: 0,
params: {
supplierTypeName: '', supplierTypeName: '',
supplierTypeCode: '', supplierTypeCode: '',
orgPath: '' orgPath: window.sessionStorage.getItem('defaultDeptSid'),
userSid: window.sessionStorage.getItem('userSid'),
}
}
},
created() {
// 初始化变量
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
} }
}, },
formobj: { btnHandle(btnKey) {
sid: '', console.log('XXXXXXXXXXXXXXX ' + btnKey)
supplierTypeName: '', switch (btnKey) {
supplierTypeCode: '', case 'toAdd':
orgPath: '' this.toAdd()
} break
} case 'doDel':
}, this.doDel()
created() { break
// 初始化变量 case 'doClose':
this.getList() this.doClose()
}, break
mounted() { default:
this.$refs['btnbar'].setButtonList(this.btnList) break
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// 信息条数 获取点击时当前的sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
// 表中序号
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
// 查询列表信息
getList() {
this.listLoading = true
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
} }
}) },
}, // 信息条数 获取点击时当前的sid
// 查询按钮 handleSelectionChange(row) {
handleFilter() { const aa = []
this.listQuery.current = 1 row.forEach(element => {
this.getList() aa.push(element.sid)
}, })
// 点击重置 this.sids = aa
handleReset() { },
this.listQuery = { // 表中序号
current: 1, indexMethod(index) {
size: 10, var pagestart = (this.listQuery.current - 1) * this.listQuery.size
total: 0, var pageindex = index + 1 + pagestart
params: { return pageindex
},
// 查询列表信息
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
// 查询按钮
handleFilter() {
this.listQuery.current = 1
this.getList()
},
// 点击重置
handleReset() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
supplierTypeName: '',
supplierTypeCode: '',
orgPath: ''
}
}
this.getList()
},
toAdd() {
this.dialogVisible = true
this.formobj = {
sid: '',
supplierTypeName: '', supplierTypeName: '',
supplierTypeCode: '', supplierTypeCode: '',
orgPath: '' orgPath: window.sessionStorage.getItem('defaultDeptSid'),
userSid: window.sessionStorage.getItem('userSid'),
} }
} },
this.getList() toEdit(row) {
}, this.dialogVisible = true
toAdd() { this.formobj = {
this.dialogVisible = true sid: row.sid,
this.formobj = { supplierTypeName: row.supplierTypeName,
sid: '', supplierTypeCode: row.supplierTypeCode,
supplierTypeName: '', orgPath: window.sessionStorage.getItem('defaultDeptSid'),
supplierTypeCode: '', userSid: window.sessionStorage.getItem('userSid'),
orgPath: ''
}
},
toEdit(row) {
this.dialogVisible = true
this.formobj = {
sid: row.sid,
supplierTypeName: row.supplierTypeName,
supplierTypeCode: row.supplierTypeCode,
orgPath: ''
}
},
handleConfirm() {
if (this.formobj.supplierTypeName === '' || this.formobj.supplierTypeCode === '') {
this.$message({ showClose: true, type: 'error', message: '供应商类型或编码不能为空' })
return
}
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
req.saveOrUpdate(this.formobj).then((res) => {
if (res.success) {
this.dialogVisible = false
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.getList()
} }
}) },
}, handleConfirm() {
doDel() { if (this.formobj.supplierTypeName === '' || this.formobj.supplierTypeCode === '') {
if (this.sids.length === 0) { this.$message({
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) showClose: true,
return type: 'error',
} message: '供应商类型或编码不能为空'
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' })
this.$confirm(tip, '提示', { return
confirmButtonText: '确定', }
cancelButtonText: '取消', this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
type: 'warning' req.saveOrUpdate(this.formobj).then((res) => {
}).then(() => { if (res.success) {
const loading = this.$loading({ this.dialogVisible = false
lock: true, this.$message({
text: 'Loading', showClose: true,
spinner: 'el-icon-loading', type: 'success',
background: 'rgba(0, 0, 0, 0.7)' message: '保存成功'
}) })
req.delBySids(this.sids).then(resp => { this.getList()
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
} }
this.getList()
loading.close()
}).catch(e => {
loading.close()
}) })
}).catch(() => { },
}) doDel() {
}, if (this.sids.length === 0) {
doClose() { this.$message({
this.$store.dispatch('tagsView/delView', this.$route) showClose: true,
this.$router.go(-1) type: 'error',
message: '请选择至少一条记录进行删除操作'
})
return
}
const tip = '请确认是否删除所选 ' + this.sids.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(this.sids).then(resp => {
if (resp.success) {
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
}
this.getList()
loading.close()
}).catch(e => {
loading.close()
})
}).catch(() => {})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.span-sty { .span-sty {
width: 100px !important; width: 100px !important;
} }
.addinputInfo {
margin-left: 90px !important; .addinputInfo {
} margin-left: 90px !important;
}
</style> </style>

View File

@@ -69,11 +69,8 @@
locationName: '', locationName: '',
locationSid: '', locationSid: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
warehouseList: [], warehouseList: [],
warehouseAreaList: [], warehouseAreaList: [],
@@ -85,7 +82,7 @@
methods: { methods: {
initData() { initData() {
var parpams = { var parpams = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'), orgPath: window.sessionStorage.getItem('orgSid'),
} }
req2.getAllWarehouse(parpams).then(resp => { req2.getAllWarehouse(parpams).then(resp => {
this.warehouseList = resp.data this.warehouseList = resp.data
@@ -125,9 +122,7 @@
locationName: '', locationName: '',
locationSid: '', locationSid: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -15,18 +15,8 @@
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
<el-button <el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
type="primary" <el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
size="small"
icon="el-icon-search"
@click="dosearch"
>查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
>重置</el-button>
</div> </div>
</div> </div>
</div> </div>
@@ -46,12 +36,12 @@
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> --> <!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否可用" align="center" width="140"> <el-table-column label="是否可用" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1" <el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" /> inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rackName" label="库位名称" align="center" /> <el-table-column prop="rackName" label="库位名称" align="center" />
<el-table-column prop="rackCode" label="库位编码" align="center" /> <el-table-column prop="rackCode" label="库位编码" align="center" />
<el-table-column prop="warehouseName" label="所属仓库" align="center" /> <el-table-column prop="warehouseName" label="所属仓库" align="center" />
@@ -62,14 +52,8 @@
<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"
v-show="dataList.length > 0" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -80,165 +64,168 @@
</template> </template>
<script> <script>
import req from '@/api/baseinfo/goodsShelves/goodsShelves.js' import req from '@/api/baseinfo/goodsShelves/goodsShelves.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import divAdd from './goodsShelvesAdd.vue' import divAdd from './goodsShelvesAdd.vue'
export default { export default {
components: { components: {
ButtonBar, ButtonBar,
Pagination, Pagination,
pageye, pageye,
divAdd divAdd
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 viewState: 1, // 1、列表 2、添加 3、修改 4、查看
isSearchShow: false, isSearchShow: false,
searchxianshitit: '显示查询条件', searchxianshitit: '显示查询条件',
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
btnList: [{ btnList: [{
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: 'plus', icon: 'plus',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
}, },
{ {
type: 'info', type: 'info',
size: 'small', size: 'small',
icon: 'cross', icon: 'cross',
btnKey: 'doClose', btnKey: 'doClose',
btnLabel: '关闭' btnLabel: '关闭'
} }
], ],
queryParams: { queryParams: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
}, },
sids: [] sids: []
} }
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
created() { created() {
this.loadList() this.loadList()
}, },
methods: { methods: {
// 搜索条件效果 // 搜索条件效果
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) { if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件' this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
btnHandle(btnKey) { btnHandle(btnKey) {
switch (btnKey) { switch (btnKey) {
case 'toAdd': case 'toAdd':
this.toAdd() this.toAdd()
break break
case 'doClose': case 'doClose':
this.doClose() this.doClose()
break break
default: default:
break break
} }
}, },
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
req.listPage(this.queryParams).then((resp) => { this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.tableLoading = false this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
if (resp.success) { this.queryParams.params.menuUrl = this.$route.path
const data = resp.data req.listPage(this.queryParams).then((resp) => {
this.queryParams.total = data.total this.tableLoading = false
this.dataList = data.records if (resp.success) {
} else { const data = resp.data
// 根据resp.code进行异常情况处理 this.queryParams.total = data.total
this.dataList = [] this.dataList = data.records
this.queryParams.total = 0 } else {
} // 根据resp.code进行异常情况处理
}).catch(() => { this.dataList = []
this.tableLoading = false this.queryParams.total = 0
}) }
}, }).catch(() => {
this.tableLoading = false
})
},
// 序号 // 序号
indexMethod(index) { indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
dosearch() { dosearch() {
this.queryParams.current = 1 this.queryParams.current = 1
this.loadList() this.loadList()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
} }
this.loadList() this.loadList()
}, },
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
doClose() { doClose() {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1) this.$router.go(-1)
}, },
toRelevancy(row) { toRelevancy(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divadd'].showEdit(row) this.$refs['divadd'].showEdit(row)
}, },
toRelevancyInfo(row) { toRelevancyInfo(row) {
const tip = '请确认是否删除所选品牌?' const tip = '请确认是否删除所选品牌?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.deleteGoods(row.sid).then((resp) => { req.deleteGoods(row.sid).then((resp) => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: resp.msg, message: resp.msg,
showClose: true showClose: true
}) })
this.loadList() this.loadList()
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
} }
}).catch(e => { }).catch(e => {
loading.close() loading.close()
}) })
}).catch(() => {}) }).catch(() => {})
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
enableChange(sid, state) { enableChange(sid, state) {
console.log('sid', sid) console.log('sid', sid)
console.log('state', state) console.log('state', state)
@@ -255,8 +242,8 @@
console.log(e) console.log(e)
}) })
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@@ -15,18 +15,8 @@
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
<el-button <el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
type="primary" <el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
size="small"
icon="el-icon-search"
@click="dosearch"
>查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
>重置</el-button>
</div> </div>
</div> </div>
</div> </div>
@@ -57,7 +47,7 @@
<el-table-column prop="manager" label="仓库主管" align="center" /> <el-table-column prop="manager" label="仓库主管" align="center" />
<el-table-column prop="telephone" label="联系电话" align="center" /> <el-table-column prop="telephone" label="联系电话" align="center" />
<el-table-column prop="squareMeter" label="占地面积" align="center" /> <el-table-column prop="squareMeter" label="占地面积" align="center" />
<el-table-column prop="address" label="仓库地址" align="center" /> <el-table-column prop="address" label="仓库地址" align="center" />
<el-table-column prop="sortNo" label="排序" align="center" /> <el-table-column prop="sortNo" label="排序" align="center" />
</el-table> </el-table>
</div> </div>
@@ -65,14 +55,8 @@
<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"
v-show="dataList.length > 0" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -83,168 +67,168 @@
</template> </template>
<script> <script>
import req from '@/api/baseinfo/warehouse/warehouse.js' import req from '@/api/baseinfo/warehouse/warehouse.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import divAdd from './warehouseAdd.vue' import divAdd from './warehouseAdd.vue'
export default { export default {
components: { components: {
ButtonBar, ButtonBar,
Pagination, Pagination,
pageye, pageye,
divAdd divAdd
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 viewState: 1, // 1、列表 2、添加 3、修改 4、查看
isSearchShow: false, isSearchShow: false,
searchxianshitit: '显示查询条件', searchxianshitit: '显示查询条件',
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
btnList: [{ btnList: [{
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: 'plus', icon: 'plus',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
}, },
{ {
type: 'info', type: 'info',
size: 'small', size: 'small',
icon: 'cross', icon: 'cross',
btnKey: 'doClose', btnKey: 'doClose',
btnLabel: '关闭' btnLabel: '关闭'
} }
], ],
queryParams: { queryParams: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
}, },
sids: [] sids: []
} }
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
created() { created() {
this.loadList() this.loadList()
}, },
methods: { methods: {
// 搜索条件效果 // 搜索条件效果
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) { if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件' this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
btnHandle(btnKey) { btnHandle(btnKey) {
switch (btnKey) { switch (btnKey) {
case 'toAdd': case 'toAdd':
this.toAdd() this.toAdd()
break break
case 'doClose': case 'doClose':
this.doClose() this.doClose()
break break
default: default:
break break
} }
}, },
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false
if (resp.success) { if (resp.success) {
const data = resp.data const data = resp.data
this.queryParams.total = data.total this.queryParams.total = data.total
this.dataList = data.records this.dataList = data.records
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.dataList = [] this.dataList = []
this.queryParams.total = 0 this.queryParams.total = 0
} }
}).catch(() => { }).catch(() => {
this.tableLoading = false this.tableLoading = false
}) })
}, },
// 序号 // 序号
indexMethod(index) { indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
dosearch() { dosearch() {
this.queryParams.current = 1 this.queryParams.current = 1
this.loadList() this.loadList()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
} }
this.loadList() this.loadList()
}, },
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
doClose() { doClose() {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1) this.$router.go(-1)
}, },
toRelevancy(row) { toRelevancy(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divadd'].showEdit(row) this.$refs['divadd'].showEdit(row)
}, },
toRelevancyInfo(row) { toRelevancyInfo(row) {
const tip = '请确认是否删除所选品牌?' const tip = '请确认是否删除所选品牌?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.deleteGoods(row.sid).then((resp) => { req.deleteGoods(row.sid).then((resp) => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: resp.msg, message: resp.msg,
showClose: true showClose: true
}) })
this.loadList() this.loadList()
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
} }
}).catch(e => { }).catch(e => {
loading.close() loading.close()
}) })
}).catch(() => {}) }).catch(() => {})
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
enableChange(sid, state) { enableChange(sid, state) {
console.log('sid', sid) console.log('sid', sid)
console.log('state', state) console.log('state', state)
@@ -261,8 +245,8 @@
console.log(e) console.log(e)
}) })
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@@ -105,9 +105,7 @@
sortNo: '', sortNo: '',
remarks: '', remarks: '',
warehouseType: "0", warehouseType: "0",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
} }
@@ -137,25 +135,23 @@
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.formobj = { this.formobj = {
sid: '', sid: '',
warehouseName: '', warehouseName: '',
warehouseCode: '', warehouseCode: '',
contacts: "", contacts: "",
mob: "", mob: "",
telephone: "", telephone: "",
manager: '', manager: '',
longitude: '', longitude: '',
latitude: '', latitude: '',
usageStatus: "", usageStatus: "",
address: '', address: '',
squareMeter: '', squareMeter: '',
sortNo: '', sortNo: '',
remarks: '', remarks: '',
warehouseType: "0", warehouseType: "0",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')
}, },

View File

@@ -15,18 +15,8 @@
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
<el-button <el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
type="primary" <el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
size="small"
icon="el-icon-search"
@click="dosearch"
>查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
>重置</el-button>
</div> </div>
</div> </div>
</div> </div>
@@ -46,12 +36,12 @@
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> --> <!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否可用" align="center" width="140"> <el-table-column label="是否可用" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1" <el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" /> inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="areaName" label="库区名称" align="center" /> <el-table-column prop="areaName" label="库区名称" align="center" />
<el-table-column prop="areaCode" label="库区编码" align="center" /> <el-table-column prop="areaCode" label="库区编码" align="center" />
<el-table-column prop="volume" label="库区容量" align="center" /> <el-table-column prop="volume" label="库区容量" align="center" />
@@ -64,14 +54,8 @@
<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"
v-show="dataList.length > 0" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -82,168 +66,168 @@
</template> </template>
<script> <script>
import req from '@/api/baseinfo/warehouseArea/warehouseArea.js' import req from '@/api/baseinfo/warehouseArea/warehouseArea.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import divAdd from './warehouseAreaAdd.vue' import divAdd from './warehouseAreaAdd.vue'
export default { export default {
components: { components: {
ButtonBar, ButtonBar,
Pagination, Pagination,
pageye, pageye,
divAdd divAdd
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 viewState: 1, // 1、列表 2、添加 3、修改 4、查看
isSearchShow: false, isSearchShow: false,
searchxianshitit: '显示查询条件', searchxianshitit: '显示查询条件',
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
btnList: [{ btnList: [{
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: 'plus', icon: 'plus',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
}, },
{ {
type: 'info', type: 'info',
size: 'small', size: 'small',
icon: 'cross', icon: 'cross',
btnKey: 'doClose', btnKey: 'doClose',
btnLabel: '关闭' btnLabel: '关闭'
} }
], ],
queryParams: { queryParams: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
}, },
sids: [] sids: []
} }
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
created() { created() {
this.loadList() this.loadList()
}, },
methods: { methods: {
// 搜索条件效果 // 搜索条件效果
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) { if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件' this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
btnHandle(btnKey) { btnHandle(btnKey) {
switch (btnKey) { switch (btnKey) {
case 'toAdd': case 'toAdd':
this.toAdd() this.toAdd()
break break
case 'doClose': case 'doClose':
this.doClose() this.doClose()
break break
default: default:
break break
} }
}, },
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false
if (resp.success) { if (resp.success) {
const data = resp.data const data = resp.data
this.queryParams.total = data.total this.queryParams.total = data.total
this.dataList = data.records this.dataList = data.records
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.dataList = [] this.dataList = []
this.queryParams.total = 0 this.queryParams.total = 0
} }
}).catch(() => { }).catch(() => {
this.tableLoading = false this.tableLoading = false
}) })
}, },
// 序号 // 序号
indexMethod(index) { indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
dosearch() { dosearch() {
this.queryParams.current = 1 this.queryParams.current = 1
this.loadList() this.loadList()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
} }
this.loadList() this.loadList()
}, },
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
doClose() { doClose() {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1) this.$router.go(-1)
}, },
toRelevancy(row) { toRelevancy(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divadd'].showEdit(row) this.$refs['divadd'].showEdit(row)
}, },
toRelevancyInfo(row) { toRelevancyInfo(row) {
const tip = '请确认是否删除所选品牌?' const tip = '请确认是否删除所选品牌?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.deleteGoods(row.sid).then((resp) => { req.deleteGoods(row.sid).then((resp) => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: resp.msg, message: resp.msg,
showClose: true showClose: true
}) })
this.loadList() this.loadList()
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
} }
}).catch(e => { }).catch(e => {
loading.close() loading.close()
}) })
}).catch(() => {}) }).catch(() => {})
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
enableChange(sid, state) { enableChange(sid, state) {
console.log('sid', sid) console.log('sid', sid)
console.log('state', state) console.log('state', state)
@@ -260,8 +244,8 @@
console.log(e) console.log(e)
}) })
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@@ -81,11 +81,8 @@
warehouseSid: '', warehouseSid: '',
areaTypeSid: "", areaTypeSid: "",
areaTypeName: "", areaTypeName: "",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
warehouseList: [], warehouseList: [],
warehouseTypeList: [], warehouseTypeList: [],
@@ -97,7 +94,7 @@
methods: { methods: {
initData() { initData() {
var parpams = { var parpams = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'), orgPath: window.sessionStorage.getItem('orgSid'),
} }
req2.getAllWarehouse(parpams).then(resp => { req2.getAllWarehouse(parpams).then(resp => {
this.warehouseList = resp.data this.warehouseList = resp.data
@@ -137,10 +134,8 @@
remarks: '', remarks: '',
areaTypeSid: "", areaTypeSid: "",
areaTypeName: "", areaTypeName: "",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'), userSid: window.sessionStorage.getItem('userSid'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -15,18 +15,8 @@
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
<el-button <el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
type="primary" <el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
size="small"
icon="el-icon-search"
@click="dosearch"
>查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
>重置</el-button>
</div> </div>
</div> </div>
</div> </div>
@@ -46,12 +36,12 @@
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> --> <!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否可用" align="center" width="140"> <el-table-column label="是否可用" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1" <el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1"
inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" /> inactive-value="2" @change="enableChange(scope.row.sid,scope.row.isEnable)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseAreaTypeName" label="库区类型名称" align="center" /> <el-table-column prop="warehouseAreaTypeName" label="库区类型名称" align="center" />
<el-table-column prop="createTime" label="创建时间" align="center" /> <el-table-column prop="createTime" label="创建时间" align="center" />
<el-table-column prop="remarks" label="库区类型备注" align="center" /> <el-table-column prop="remarks" label="库区类型备注" align="center" />
@@ -61,14 +51,8 @@
<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"
v-show="dataList.length > 0" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -79,168 +63,168 @@
</template> </template>
<script> <script>
import req from '@/api/baseinfo/warehouseAreaType/warehouseAreaType.js' import req from '@/api/baseinfo/warehouseAreaType/warehouseAreaType.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import divAdd from './warehouseAreaTypeAdd.vue' import divAdd from './warehouseAreaTypeAdd.vue'
export default { export default {
components: { components: {
ButtonBar, ButtonBar,
Pagination, Pagination,
pageye, pageye,
divAdd divAdd
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 viewState: 1, // 1、列表 2、添加 3、修改 4、查看
isSearchShow: false, isSearchShow: false,
searchxianshitit: '显示查询条件', searchxianshitit: '显示查询条件',
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
btnList: [{ btnList: [{
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: 'plus', icon: 'plus',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
}, },
{ {
type: 'info', type: 'info',
size: 'small', size: 'small',
icon: 'cross', icon: 'cross',
btnKey: 'doClose', btnKey: 'doClose',
btnLabel: '关闭' btnLabel: '关闭'
} }
], ],
queryParams: { queryParams: {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
}, },
sids: [] sids: []
} }
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) this.$refs['btnbar'].setButtonList(this.btnList)
}, },
created() { created() {
this.loadList() this.loadList()
}, },
methods: { methods: {
// 搜索条件效果 // 搜索条件效果
clicksearchShow() { clicksearchShow() {
this.isSearchShow = !this.isSearchShow this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) { if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件' this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
btnHandle(btnKey) { btnHandle(btnKey) {
switch (btnKey) { switch (btnKey) {
case 'toAdd': case 'toAdd':
this.toAdd() this.toAdd()
break break
case 'doClose': case 'doClose':
this.doClose() this.doClose()
break break
default: default:
break break
} }
}, },
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false
if (resp.success) { if (resp.success) {
const data = resp.data const data = resp.data
this.queryParams.total = data.total this.queryParams.total = data.total
this.dataList = data.records this.dataList = data.records
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
this.dataList = [] this.dataList = []
this.queryParams.total = 0 this.queryParams.total = 0
} }
}).catch(() => { }).catch(() => {
this.tableLoading = false this.tableLoading = false
}) })
}, },
// 序号 // 序号
indexMethod(index) { indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
dosearch() { dosearch() {
this.queryParams.current = 1 this.queryParams.current = 1
this.loadList() this.loadList()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '' name: ''
} }
} }
this.loadList() this.loadList()
}, },
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
doClose() { doClose() {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1) this.$router.go(-1)
}, },
toRelevancy(row) { toRelevancy(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divadd'].showEdit(row) this.$refs['divadd'].showEdit(row)
}, },
toRelevancyInfo(row) { toRelevancyInfo(row) {
const tip = '请确认是否删除所选品牌?' const tip = '请确认是否删除所选品牌?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.deleteGoods(row.sid).then((resp) => { req.deleteGoods(row.sid).then((resp) => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: resp.msg, message: resp.msg,
showClose: true showClose: true
}) })
this.loadList() this.loadList()
} else { } else {
// 根据resp.code进行异常情况处理 // 根据resp.code进行异常情况处理
} }
}).catch(e => { }).catch(e => {
loading.close() loading.close()
}) })
}).catch(() => {}) }).catch(() => {})
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
enableChange(sid, state) { enableChange(sid, state) {
console.log('sid', sid) console.log('sid', sid)
console.log('state', state) console.log('state', state)
@@ -257,8 +241,8 @@
console.log(e) console.log(e)
}) })
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@@ -44,12 +44,9 @@
sid: '', sid: '',
warehouseAreaTypeName: '', warehouseAreaTypeName: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
} }
}, },
@@ -78,9 +75,7 @@
sid: '', sid: '',
warehouseAreaTypeName: '', warehouseAreaTypeName: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }

View File

@@ -121,9 +121,7 @@
remarks: '', remarks: '',
letter: '', letter: '',
image: "", image: "",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
@@ -230,9 +228,7 @@
remarks: '', remarks: '',
letter: '', letter: '',
image: "", image: "",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -183,7 +183,7 @@
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false

View File

@@ -173,9 +173,7 @@
pname: '', pname: '',
sortNo: '', sortNo: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
@@ -303,9 +301,7 @@
pname: '', pname: '',
sortNo: '', sortNo: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -16,8 +16,7 @@
<el-input v-model="queryParams.params.code" placeholder="" clearable /> <el-input v-model="queryParams.params.code" placeholder="" clearable />
</el-form-item> </el-form-item>
<el-form-item label="是否一物一码"> <el-form-item label="是否一物一码">
<el-select v-model="queryParams.params.goodID" placeholder="请选择" <el-select v-model="queryParams.params.goodID" placeholder="请选择" @change="selectIsGoodIDChange">
@change="selectIsGoodIDChange">
<el-option v-for="item in isGoodIDList" :key="item.sid" :label="item.name" :value="item.sid" /> <el-option v-for="item in isGoodIDList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -47,7 +46,7 @@
@selection-change="selectionLineChangeHandle"> @selection-change="selectionLineChangeHandle">
<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 label="操作" align="center" width="100"> <!-- <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button> <el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
</template> </template>
@@ -219,9 +218,9 @@
case 'doDel': case 'doDel':
this.doDel() this.doDel()
break break
case 'toEdit': case 'toEdit':
this.toEdit() this.toEdit()
break break
case 'doClose': case 'doClose':
this.doClose() this.doClose()
break break
@@ -232,7 +231,7 @@
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false
@@ -266,10 +265,10 @@
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
name: '', name: '',
code: '', code: '',
goodID: '', goodID: '',
outStockRule: '', outStockRule: '',
} }
} }
this.loadList() this.loadList()

View File

@@ -23,7 +23,7 @@
<div class="span-sty"><span class="must">*</span> 厂家名称</div> <div class="span-sty"><span class="must">*</span> 厂家名称</div>
<el-form-item prop="manufacturerName"> <el-form-item prop="manufacturerName">
<el-input v-model="formobj.manufacturerName" placeholder="" class="addinputw addinputInfo" clearable /> <el-input v-model="formobj.manufacturerName" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -40,14 +40,14 @@
<div class="span-sty"><span class="must">*</span> 排序</div> <div class="span-sty"><span class="must">*</span> 排序</div>
<el-form-item prop="sortNo"> <el-form-item prop="sortNo">
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable <el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<div class="span-sty">备注</div> <div class="span-sty">备注</div>
<el-form-item > <el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable /> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -56,7 +56,7 @@
</el-form> </el-form>
<!-- <el-card class="box-card"> <!-- <el-card class="box-card">
<div class="item"> <div class="item">
<span class="item_text"><span class="must">*</span> 厂家名称</span> <span class="item_text"><span class="must">*</span> 厂家名称</span>
<el-input v-model="formobj.manufacturerName" placeholder="" class="item_input" clearable /> <el-input v-model="formobj.manufacturerName" placeholder="" class="item_input" clearable />
@@ -94,9 +94,7 @@
manufacturerCode: '', manufacturerCode: '',
sortNo: '', sortNo: '',
remarks: "", remarks: "",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
rules: { rules: {
@@ -180,9 +178,7 @@
manufacturerCode: '', manufacturerCode: '',
sortNo: '', sortNo: '',
remarks: "", remarks: "",
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -172,7 +172,7 @@
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false

View File

@@ -72,7 +72,7 @@
</el-row> </el-row>
<!-- <el-row> <!-- <el-row>
@@ -144,7 +144,7 @@
</el-row> </el-row>
<!-- <el-row> <!-- <el-row>
@@ -205,7 +205,7 @@
</el-row> </el-row>
<!-- <el-row> <!-- <el-row>
@@ -791,9 +791,7 @@
goodsDescription: "" goodsDescription: ""
}, },
baseGoodsSkus: [], baseGoodsSkus: [],
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
brandList: [], brandList: [],
@@ -814,8 +812,8 @@
methods: { methods: {
initData() { initData() {
var parpams ={ var parpams = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'), orgPath: window.sessionStorage.getItem('orgSid'),
} }
req2.getAllBrand(parpams).then(resp => { req2.getAllBrand(parpams).then(resp => {
@@ -882,9 +880,7 @@
goodsDescription: "" goodsDescription: ""
}, },
baseGoodsSkus: [], baseGoodsSkus: [],
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -344,7 +344,7 @@
}, },
initData() { initData() {
var parpams = { var parpams = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'), orgPath: window.sessionStorage.getItem('orgSid'),
} }
req2.getAllBrand(parpams).then(resp => { req2.getAllBrand(parpams).then(resp => {
this.brandList = resp.data this.brandList = resp.data

View File

@@ -281,6 +281,9 @@
}, },
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false
if (resp.success) { if (resp.success) {

View File

@@ -172,7 +172,7 @@
loadList() { loadList() {
this.tableLoading = true this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.queryParams.params.orgPath = window.sessionStorage.getItem('orgSidPath')
this.queryParams.params.menuUrl = this.$route.path this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => { req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false this.tableLoading = false

View File

@@ -62,9 +62,7 @@
sid: '', sid: '',
unitName: '', unitName: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
}, },
rules: { rules: {
@@ -119,9 +117,7 @@
sid: '', sid: '',
unitName: '', unitName: '',
remarks: '', remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'), orgPath: window.sessionStorage.getItem('defaultDeptSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'), userSid: window.sessionStorage.getItem('userSid'),
} }
this.$emit('doback') this.$emit('doback')

View File

@@ -15,9 +15,11 @@
<div class="main-right-table"> <div class="main-right-table">
<div :class="tableIndex == 1 ? 'main-right-table-text1' : 'main-right-table-text3'" @click="tableClick(1)"> <div style="cursor:pointer;" :class="tableIndex == 1 ? 'main-right-table-text1' : 'main-right-table-text3'"
@click="tableClick(1)">
密码登录</div> 密码登录</div>
<div :class="tableIndex == 2 ? 'main-right-table-text2' : 'main-right-table-text4'" @click="tableClick(2)"> <div style="cursor:pointer;" :class="tableIndex == 2 ? 'main-right-table-text2' : 'main-right-table-text4'"
@click="tableClick(2)">
验证码登录</div> 验证码登录</div>
</div> </div>
@@ -34,7 +36,8 @@
<div style="display: flex;flex-direction: row;align-items: center;width: 100%;"> <div style="display: flex;flex-direction: row;align-items: center;width: 100%;">
<el-input class="input" style="flex: 1; margin-right: 10px;" maxlength="6" placeholder="请输入验证码" <el-input class="input" style="flex: 1; margin-right: 10px;" maxlength="6" placeholder="请输入验证码"
v-model="loginForm.verifyCode" /> v-model="loginForm.verifyCode" />
<span :class="sendCodeType ? 'sendCode1' : 'sendCode2'" @click="sendCode">{{sendCodeText}}</span> <span :class="sendCodeType ? 'sendCode1' : 'sendCode2'" style="cursor:pointer;"
@click="sendCode">{{sendCodeText}}</span>
</div> </div>
</div> </div>
@@ -49,9 +52,9 @@
<div class="main-right-bom-right"> <div class="main-right-bom-right">
<span @click="forgetClick">忘记密码</span> <span @click="forgetClick" style="cursor:pointer;">忘记密码</span>
<div style="margin-left: 8px;margin-right: 8px;width: 1px; height: 18px;background: #999;"></div> <div style="margin-left: 8px;margin-right: 8px;width: 1px; height: 18px;background: #999;"></div>
<span @click="registerClick">去注册</span> <span @click="registerClick" style="cursor:pointer;">去注册</span>
</div> </div>
@@ -81,13 +84,14 @@
style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;margin-left: -10px;"> style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;margin-left: -10px;">
<el-input class="input" style="flex: 1; margin-right: 10px;" maxlength="6" placeholder="请输入验证码" <el-input class="input" style="flex: 1; margin-right: 10px;" maxlength="6" placeholder="请输入验证码"
v-model="registerInfo.code" /> v-model="registerInfo.code" />
<span :class="sendCodeType2 ? 'sendCode1' : 'sendCode2'" @click="sendCode2">{{sendCodeText2}}</span> <span :class="sendCodeType2 ? 'sendCode1' : 'sendCode2'" @click="sendCode2"
style="cursor:pointer;">{{sendCodeText2}}</span>
</div> </div>
<div style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;" <div style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;"
@click="goLogin"> @click="goLogin">
<span>已有账号</span> <span>已有账号</span>
<span style="color: #5084D2;">登录</span> <span style="color: #5084D2;cursor:pointer;">登录</span>
</div> </div>
@@ -98,9 +102,9 @@
<div style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 10px;"> <div style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 10px;">
<el-checkbox style="margin-right: 5px;" v-model="check"></el-checkbox> <el-checkbox style="margin-right: 5px;" v-model="check"></el-checkbox>
<span style="font-size: 12px;">我已阅读并同意</span> <span style="font-size: 12px;">我已阅读并同意</span>
<span style="font-size: 12px;">宇信通服务协议</span> <span style="font-size: 12px;cursor:pointer;">宇信通服务协议</span>
<span style="font-size: 12px;"></span> <span style="font-size: 12px;"></span>
<span style="font-size: 12px;">隐私协议</span> <span style="font-size: 12px;cursor:pointer;">隐私协议</span>
</div> </div>
</div> </div>
@@ -115,7 +119,7 @@
style="display: flex;flex-direction: column;width: 100%;"> style="display: flex;flex-direction: column;width: 100%;">
<div style="display: flex;flex-direction: row;align-items: center; <div style="display: flex;flex-direction: row;align-items: center;
background: #EDF1F7; border-radius: 8px;width: 100%;margin-bottom: 20px; background: #EDF1F7; border-radius: 8px;width: 100%;margin-bottom: 20px;
height: 50px;"> height: 50px;cursor:pointer;">
<img src="../../assets/images/company_icon.png" style="width: 25px; height: 25px; <img src="../../assets/images/company_icon.png" style="width: 25px; height: 25px;
margin-left: 10px;margin-right: 10px;" /> margin-left: 10px;margin-right: 10px;" />
<span style="flex: 1;margin-right: 10px;">{{item.orgName}}</span> <span style="flex: 1;margin-right: 10px;">{{item.orgName}}</span>
@@ -216,7 +220,8 @@
check: false, check: false,
registerInfo: { registerInfo: {
mobile: '', mobile: '',
userSid: "" userSid: "",
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33', // wms 资源sid
}, },
loginForm: { loginForm: {
userName: '', userName: '',
@@ -509,7 +514,6 @@
loading.close() loading.close()
window.sessionStorage.setItem('token', response.data.token) window.sessionStorage.setItem('token', response.data.token)
window.sessionStorage.setItem('staffSid', response.data.staffSid) window.sessionStorage.setItem('staffSid', response.data.staffSid)
window.sessionStorage.setItem('userSid', response.data.sid) window.sessionStorage.setItem('userSid', response.data.sid)
@@ -523,7 +527,8 @@
window.sessionStorage.setItem('defaultRoleName', response.data.defaultRoleName) window.sessionStorage.setItem('defaultRoleName', response.data.defaultRoleName)
window.sessionStorage.setItem('defaultRoleSid', response.data.defaultRoleSid) window.sessionStorage.setItem('defaultRoleSid', response.data.defaultRoleSid)
window.sessionStorage.setItem('orgSidPath', response.data.orgSidPath) window.sessionStorage.setItem('orgSidPath', response.data.orgSidPath)
window.sessionStorage.setItem('defaultOrgPath', response.data.departmentSid) window.sessionStorage.setItem('defaultOrgPath', response.data.defaultOrgPath)
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
.pNameAndDepartmentNameAndPostName) .pNameAndDepartmentNameAndPostName)
} }
@@ -571,7 +576,8 @@
window.sessionStorage.setItem('defaultRoleName', response.data.defaultRoleName) window.sessionStorage.setItem('defaultRoleName', response.data.defaultRoleName)
window.sessionStorage.setItem('defaultRoleSid', response.data.defaultRoleSid) window.sessionStorage.setItem('defaultRoleSid', response.data.defaultRoleSid)
window.sessionStorage.setItem('orgSidPath', response.data.orgSidPath) window.sessionStorage.setItem('orgSidPath', response.data.orgSidPath)
window.sessionStorage.setItem('defaultOrgPath', response.data.departmentSid) window.sessionStorage.setItem('defaultOrgPath', response.data.defaultOrgPath)
window.sessionStorage.setItem('defaultOrgPathName', response.data.defaultOrgPathName)
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', response.data
.pNameAndDepartmentNameAndPostName) .pNameAndDepartmentNameAndPostName)
} }

View File

@@ -433,6 +433,7 @@
this.roleDialog = true this.roleDialog = true
this.roleForm.sid = row.sid this.roleForm.sid = row.sid
this.roleForm.userSid = row.sid this.roleForm.userSid = row.sid
this.roleForm.orgsid = window.sessionStorage.getItem('orgSid')
setRole(this.roleForm).then(res => { setRole(this.roleForm).then(res => {
this.roleList = res.data this.roleList = res.data
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {