完善数据权限
This commit is contained in:
@@ -92,7 +92,7 @@ export function userSingle(data) {
|
||||
// 单条用户的角色列表
|
||||
export function setRole(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/sysrole/listAllByUserSid/' + data.sid,
|
||||
url: '/wms/apiadmin/sysrole/listAllByUserSid/' + data.sid + "/" + data.orgsid,
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<!--列表页面-->
|
||||
<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查询列表部分-->
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
@@ -10,16 +10,16 @@
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||
<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 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 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 label="联系人">
|
||||
<el-input v-model="listQuery.params.contactName" placeholder="" clearable/>
|
||||
<el-input v-model="listQuery.params.contactName" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
@@ -31,11 +31,13 @@
|
||||
<!--End查询列表部分-->
|
||||
<div class="listtop">
|
||||
<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>
|
||||
<!--Start 主页面主要部分 -->
|
||||
<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 label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" width="180px" align="center">
|
||||
@@ -54,9 +56,10 @@
|
||||
</div>
|
||||
<!--End 主页面主要部分-->
|
||||
<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>
|
||||
<!--End查询列表部分-->
|
||||
</div>
|
||||
@@ -69,202 +72,211 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
import supplierAdd from './supplierAdd'
|
||||
import supplierInfo from './supplierInfo'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
import supplierAdd from './supplierAdd'
|
||||
import supplierInfo from './supplierInfo'
|
||||
|
||||
export default {
|
||||
name: 'Supplier',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar,
|
||||
supplierAdd,
|
||||
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 = '显示查询条件'
|
||||
}
|
||||
export default {
|
||||
name: 'Supplier',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar,
|
||||
supplierAdd,
|
||||
supplierInfo
|
||||
},
|
||||
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
|
||||
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 })
|
||||
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: '关闭'
|
||||
}
|
||||
this.getList()
|
||||
loading.close()
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
],
|
||||
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) {
|
||||
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(() => {
|
||||
})
|
||||
},
|
||||
// 修改、编辑、详情返回列表页面
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
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.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>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -14,50 +14,61 @@
|
||||
<el-row style="border-top: 1px solid #e0e3eb">
|
||||
<el-col :span="8">
|
||||
<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 :span="8">
|
||||
<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 :span="8">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>供应商类型</div>
|
||||
<el-form-item prop="supplierTypeSid">
|
||||
<el-select class="addinputInfo" v-model="formobj.supplierTypeSid" filterable placeholder="" @change="supplierTypeChange">
|
||||
<el-option v-for="item in supplierType_list" :key="item.sid" :label="item.supplierTypeName" :value="item.sid"/>
|
||||
<el-select class="addinputInfo" v-model="formobj.supplierTypeSid" filterable placeholder=""
|
||||
@change="supplierTypeChange">
|
||||
<el-option v-for="item in supplierType_list" :key="item.sid" :label="item.supplierTypeName"
|
||||
:value="item.sid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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 :span="8">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">详细地址</div>
|
||||
<el-form-item>
|
||||
<div class="addinputInfo" style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center">
|
||||
<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"/>
|
||||
<div class="addinputInfo"
|
||||
style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center">
|
||||
<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 v-model="formobj.city" filterable placeholder="请选择市" style="width:160px" @change="cityChange">
|
||||
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.name"/>
|
||||
<el-select v-model="formobj.city" filterable placeholder="请选择市" style="width:160px"
|
||||
@change="cityChange">
|
||||
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.name" />
|
||||
</el-select>
|
||||
<el-select v-model="formobj.county" filterable placeholder="请选择县" style="width:160px" @change="countyChange">
|
||||
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.name"/>
|
||||
<el-select v-model="formobj.county" filterable placeholder="请选择县" style="width:160px"
|
||||
@change="countyChange">
|
||||
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.name" />
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -65,11 +76,13 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<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 :span="8">
|
||||
<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 :span="8">
|
||||
</el-col>
|
||||
@@ -77,53 +90,65 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<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 :span="8">
|
||||
<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 :span="8">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<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 :span="8">
|
||||
<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 :span="8">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<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 :span="8">
|
||||
<div class="span-sty"><span class="icon">*</span>开票类型</div>
|
||||
<el-form-item prop="billingTypeValue">
|
||||
<el-select class="addinputInfo" v-model="formobj.billingTypeValue" filterable placeholder="" @change="billingTypeChange">
|
||||
<el-option v-for="item in billingType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
|
||||
<el-select class="addinputInfo" v-model="formobj.billingTypeValue" filterable placeholder=""
|
||||
@change="billingTypeChange">
|
||||
<el-option v-for="item in billingType_list" :key="item.dictKey" :label="item.dictValue"
|
||||
:value="item.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<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-row>
|
||||
<div class="title titleOne">
|
||||
@@ -131,7 +156,7 @@
|
||||
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd">新增</el-button>
|
||||
</div>
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="handleEdit(scope.row, scope.$index)">编辑</el-button>
|
||||
@@ -139,14 +164,14 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="accountName" label="账号名称" align="center" width="160" />
|
||||
<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="paymentLines" label="联行号" align="center" width="100"/>
|
||||
<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="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-form>
|
||||
</div>
|
||||
@@ -156,320 +181,379 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
import openingbank from './relation/openingbank'
|
||||
import { getProvince, getCity, getCounty, typeValues } from '@/api/Common/dictcommons'
|
||||
import req from '@/api/baseinfo/supplier/supplier.js'
|
||||
import openingbank from './relation/openingbank'
|
||||
import {
|
||||
getProvince,
|
||||
getCity,
|
||||
getCounty,
|
||||
typeValues
|
||||
} from '@/api/Common/dictcommons'
|
||||
|
||||
export default {
|
||||
name: 'SupplierAdd',
|
||||
components: {
|
||||
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
|
||||
}
|
||||
})
|
||||
export default {
|
||||
name: 'SupplierAdd',
|
||||
components: {
|
||||
openingbank
|
||||
},
|
||||
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({
|
||||
data() {
|
||||
return {
|
||||
viewTitle: '',
|
||||
viewState: 1,
|
||||
submitdisabled: false,
|
||||
tableKey: 0,
|
||||
index: 0,
|
||||
supplierType_list: [],
|
||||
province_list: [],
|
||||
city_list: [],
|
||||
county_list: [],
|
||||
billingType_list: [],
|
||||
formobj: {
|
||||
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
|
||||
})
|
||||
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: [],
|
||||
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() {
|
||||
this.viewState = 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.saveOrUpdate(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({ showClose: true, type: 'success', message: '保存成功' })
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
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) {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.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: []
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitdisabled = true
|
||||
req.saveOrUpdate(this.formobj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: '保存成功'
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.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: [],
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.submitdisabled = false
|
||||
this.$emit('doback')
|
||||
}
|
||||
this.submitdisabled = false
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
||||
margin-left: 120px !important;
|
||||
width: calc(100% - 115px);
|
||||
}
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
.titleOne {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
/*表格列设置fixed后固定列出现下边框的设置*/
|
||||
/deep/ .el-table__fixed {
|
||||
height: 100% !important;
|
||||
}
|
||||
/*表格列设置fixed后固定列出现下边框的设置*/
|
||||
/deep/ .el-table__fixed-right {
|
||||
height: 100% !important;
|
||||
}
|
||||
.span-sty {
|
||||
width: 130px !important;
|
||||
}
|
||||
|
||||
.addinputInfo {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
|
||||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
||||
margin-left: 120px !important;
|
||||
width: calc(100% - 115px);
|
||||
}
|
||||
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
|
||||
.titleOne {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/*表格列设置fixed后固定列出现下边框的设置*/
|
||||
/deep/ .el-table__fixed {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
/*表格列设置fixed后固定列出现下边框的设置*/
|
||||
/deep/ .el-table__fixed-right {
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<!--列表页面-->
|
||||
<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查询列表部分-->
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
@@ -10,10 +10,10 @@
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
|
||||
<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 label="供应商编码">
|
||||
<el-input v-model="listQuery.params.supplierTypeCode" placeholder="" clearable/>
|
||||
<el-input v-model="listQuery.params.supplierTypeCode" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
@@ -25,11 +25,13 @@
|
||||
<!--End查询列表部分-->
|
||||
<div class="listtop">
|
||||
<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>
|
||||
<!--Start 主页面主要部分 -->
|
||||
<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 label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" width="180px" align="center">
|
||||
@@ -43,9 +45,10 @@
|
||||
</div>
|
||||
<!--End 主页面主要部分-->
|
||||
<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>
|
||||
<!--End查询列表部分-->
|
||||
</div>
|
||||
@@ -55,11 +58,13 @@
|
||||
<el-row style="border-top: 1px solid #E0E3EB">
|
||||
<el-col :span="12">
|
||||
<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 :span="12">
|
||||
<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-row>
|
||||
</el-form>
|
||||
@@ -72,225 +77,245 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/baseinfo/suppliertype/suppliertype.js'
|
||||
export default {
|
||||
name: 'SupplierType',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
dialogVisible: false,
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import req from '@/api/baseinfo/suppliertype/suppliertype.js'
|
||||
export default {
|
||||
name: 'SupplierType',
|
||||
components: {
|
||||
Pagination,
|
||||
pageye,
|
||||
ButtonBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
dialogVisible: 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: {
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
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: {
|
||||
formobj: {
|
||||
sid: '',
|
||||
supplierTypeName: '',
|
||||
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: {
|
||||
sid: '',
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
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)
|
||||
})
|
||||
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
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询按钮
|
||||
handleFilter() {
|
||||
this.listQuery.current = 1
|
||||
this.getList()
|
||||
},
|
||||
// 点击重置
|
||||
handleReset() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
},
|
||||
// 信息条数 获取点击时当前的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.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: '',
|
||||
supplierTypeCode: '',
|
||||
orgPath: ''
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
toAdd() {
|
||||
this.dialogVisible = true
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
supplierTypeName: '',
|
||||
supplierTypeCode: '',
|
||||
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()
|
||||
},
|
||||
toEdit(row) {
|
||||
this.dialogVisible = true
|
||||
this.formobj = {
|
||||
sid: row.sid,
|
||||
supplierTypeName: row.supplierTypeName,
|
||||
supplierTypeCode: row.supplierTypeCode,
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
})
|
||||
},
|
||||
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 })
|
||||
},
|
||||
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()
|
||||
}
|
||||
this.getList()
|
||||
loading.close()
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
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(() => {})
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.span-sty {
|
||||
width: 100px !important;
|
||||
}
|
||||
.addinputInfo {
|
||||
margin-left: 90px !important;
|
||||
}
|
||||
.span-sty {
|
||||
width: 100px !important;
|
||||
}
|
||||
|
||||
.addinputInfo {
|
||||
margin-left: 90px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -69,11 +69,8 @@
|
||||
locationName: '',
|
||||
locationSid: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
},
|
||||
warehouseList: [],
|
||||
warehouseAreaList: [],
|
||||
@@ -85,7 +82,7 @@
|
||||
methods: {
|
||||
initData() {
|
||||
var parpams = {
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||
}
|
||||
req2.getAllWarehouse(parpams).then(resp => {
|
||||
this.warehouseList = resp.data
|
||||
@@ -125,9 +122,7 @@
|
||||
locationName: '',
|
||||
locationSid: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -15,18 +15,8 @@
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="dosearch"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,12 +36,12 @@
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<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)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<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)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rackName" label="库位名称" align="center" />
|
||||
<el-table-column prop="rackCode" label="库位编码" align="center" />
|
||||
<el-table-column prop="warehouseName" label="所属仓库" align="center" />
|
||||
@@ -62,14 +52,8 @@
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination
|
||||
v-show="dataList.length > 0"
|
||||
:total="queryParams.total"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size"
|
||||
class="pagination"
|
||||
@pagination="loadList"
|
||||
/>
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,165 +64,168 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/goodsShelves/goodsShelves.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './goodsShelvesAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
import req from '@/api/baseinfo/goodsShelves/goodsShelves.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './goodsShelvesAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
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) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
@@ -255,8 +242,8 @@
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -15,18 +15,8 @@
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="dosearch"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,7 +47,7 @@
|
||||
<el-table-column prop="manager" label="仓库主管" align="center" />
|
||||
<el-table-column prop="telephone" 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>
|
||||
</div>
|
||||
@@ -65,14 +55,8 @@
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination
|
||||
v-show="dataList.length > 0"
|
||||
:total="queryParams.total"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size"
|
||||
class="pagination"
|
||||
@pagination="loadList"
|
||||
/>
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,168 +67,168 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/warehouse/warehouse.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './warehouseAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
import req from '@/api/baseinfo/warehouse/warehouse.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './warehouseAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
@@ -261,8 +245,8 @@
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -105,9 +105,7 @@
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
warehouseType: "0",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
},
|
||||
}
|
||||
@@ -137,25 +135,23 @@
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
sid: '',
|
||||
warehouseName: '',
|
||||
warehouseCode: '',
|
||||
contacts: "",
|
||||
mob: "",
|
||||
telephone: "",
|
||||
manager: '',
|
||||
longitude: '',
|
||||
latitude: '',
|
||||
usageStatus: "",
|
||||
address: '',
|
||||
squareMeter: '',
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
warehouseType: "0",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
sid: '',
|
||||
warehouseName: '',
|
||||
warehouseCode: '',
|
||||
contacts: "",
|
||||
mob: "",
|
||||
telephone: "",
|
||||
manager: '',
|
||||
longitude: '',
|
||||
latitude: '',
|
||||
usageStatus: "",
|
||||
address: '',
|
||||
squareMeter: '',
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
warehouseType: "0",
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
@@ -15,18 +15,8 @@
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="dosearch"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,12 +36,12 @@
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<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)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<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)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="areaName" label="库区名称" align="center" />
|
||||
<el-table-column prop="areaCode" label="库区编码" align="center" />
|
||||
<el-table-column prop="volume" label="库区容量" align="center" />
|
||||
@@ -64,14 +54,8 @@
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination
|
||||
v-show="dataList.length > 0"
|
||||
:total="queryParams.total"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size"
|
||||
class="pagination"
|
||||
@pagination="loadList"
|
||||
/>
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,168 +66,168 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/warehouseArea/warehouseArea.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './warehouseAreaAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
import req from '@/api/baseinfo/warehouseArea/warehouseArea.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './warehouseAreaAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
@@ -260,8 +244,8 @@
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -81,11 +81,8 @@
|
||||
warehouseSid: '',
|
||||
areaTypeSid: "",
|
||||
areaTypeName: "",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
},
|
||||
warehouseList: [],
|
||||
warehouseTypeList: [],
|
||||
@@ -97,7 +94,7 @@
|
||||
methods: {
|
||||
initData() {
|
||||
var parpams = {
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||
}
|
||||
req2.getAllWarehouse(parpams).then(resp => {
|
||||
this.warehouseList = resp.data
|
||||
@@ -137,10 +134,8 @@
|
||||
remarks: '',
|
||||
areaTypeSid: "",
|
||||
areaTypeName: "",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -15,18 +15,8 @@
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="dosearch"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-refresh"
|
||||
@click="resetQuery"
|
||||
>重置</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,12 +36,12 @@
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<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)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否可用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<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)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseAreaTypeName" label="库区类型名称" align="center" />
|
||||
<el-table-column prop="createTime" label="创建时间" align="center" />
|
||||
<el-table-column prop="remarks" label="库区类型备注" align="center" />
|
||||
@@ -61,14 +51,8 @@
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination
|
||||
v-show="dataList.length > 0"
|
||||
:total="queryParams.total"
|
||||
:page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size"
|
||||
class="pagination"
|
||||
@pagination="loadList"
|
||||
/>
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -79,168 +63,168 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/baseinfo/warehouseAreaType/warehouseAreaType.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './warehouseAreaTypeAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
import req from '@/api/baseinfo/warehouseAreaType/warehouseAreaType.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './warehouseAreaTypeAdd.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
const tip = '请确认是否删除所选品牌?'
|
||||
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.deleteGoods(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
@@ -257,8 +241,8 @@
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
@@ -44,12 +44,9 @@
|
||||
sid: '',
|
||||
warehouseAreaTypeName: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -78,9 +75,7 @@
|
||||
sid: '',
|
||||
warehouseAreaTypeName: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
}
|
||||
|
||||
@@ -121,9 +121,7 @@
|
||||
remarks: '',
|
||||
letter: '',
|
||||
image: "",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
},
|
||||
@@ -230,9 +228,7 @@
|
||||
remarks: '',
|
||||
letter: '',
|
||||
image: "",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
|
||||
@@ -173,9 +173,7 @@
|
||||
pname: '',
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
|
||||
},
|
||||
@@ -303,9 +301,7 @@
|
||||
pname: '',
|
||||
sortNo: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
<el-input v-model="queryParams.params.code" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否一物一码">
|
||||
<el-select v-model="queryParams.params.goodID" placeholder="请选择"
|
||||
@change="selectIsGoodIDChange">
|
||||
<el-select v-model="queryParams.params.goodID" placeholder="请选择" @change="selectIsGoodIDChange">
|
||||
<el-option v-for="item in isGoodIDList" :key="item.sid" :label="item.name" :value="item.sid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -47,7 +46,7 @@
|
||||
@selection-change="selectionLineChangeHandle">
|
||||
<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 label="操作" align="center" width="100">
|
||||
<!-- <el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
@@ -219,9 +218,9 @@
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
case 'toEdit':
|
||||
this.toEdit()
|
||||
break
|
||||
case 'toEdit':
|
||||
this.toEdit()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
@@ -232,7 +231,7 @@
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
@@ -266,10 +265,10 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
code: '',
|
||||
goodID: '',
|
||||
outStockRule: '',
|
||||
name: '',
|
||||
code: '',
|
||||
goodID: '',
|
||||
outStockRule: '',
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div class="span-sty"><span class="must">*</span> 厂家名称</div>
|
||||
<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-col>
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
|
||||
<div class="span-sty"><span class="must">*</span> 排序</div>
|
||||
<el-form-item prop="sortNo">
|
||||
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="16">
|
||||
<div class="span-sty">备注</div>
|
||||
<el-form-item >
|
||||
<el-form-item>
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -56,7 +56,7 @@
|
||||
</el-form>
|
||||
|
||||
|
||||
<!-- <el-card class="box-card">
|
||||
<!-- <el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text"><span class="must">*</span> 厂家名称:</span>
|
||||
<el-input v-model="formobj.manufacturerName" placeholder="" class="item_input" clearable />
|
||||
@@ -94,9 +94,7 @@
|
||||
manufacturerCode: '',
|
||||
sortNo: '',
|
||||
remarks: "",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
},
|
||||
rules: {
|
||||
@@ -180,9 +178,7 @@
|
||||
manufacturerCode: '',
|
||||
sortNo: '',
|
||||
remarks: "",
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<!-- <el-row>
|
||||
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<!-- <el-row>
|
||||
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<!-- <el-row>
|
||||
|
||||
|
||||
|
||||
@@ -791,9 +791,7 @@
|
||||
goodsDescription: ""
|
||||
},
|
||||
baseGoodsSkus: [],
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
},
|
||||
brandList: [],
|
||||
@@ -814,8 +812,8 @@
|
||||
methods: {
|
||||
initData() {
|
||||
|
||||
var parpams ={
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
var parpams = {
|
||||
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||
}
|
||||
|
||||
req2.getAllBrand(parpams).then(resp => {
|
||||
@@ -882,9 +880,7 @@
|
||||
goodsDescription: ""
|
||||
},
|
||||
baseGoodsSkus: [],
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
},
|
||||
initData() {
|
||||
var parpams = {
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
orgPath: window.sessionStorage.getItem('orgSid'),
|
||||
}
|
||||
req2.getAllBrand(parpams).then(resp => {
|
||||
this.brandList = resp.data
|
||||
|
||||
@@ -281,6 +281,9 @@
|
||||
},
|
||||
loadList() {
|
||||
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) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
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
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
|
||||
@@ -62,9 +62,7 @@
|
||||
sid: '',
|
||||
unitName: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
},
|
||||
rules: {
|
||||
@@ -119,9 +117,7 @@
|
||||
sid: '',
|
||||
unitName: '',
|
||||
remarks: '',
|
||||
useOrgSid: window.sessionStorage.getItem('departmentSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
|
||||
createOrgSid: window.sessionStorage.getItem('orgSid'),
|
||||
orgPath: window.sessionStorage.getItem('defaultDeptSid'),
|
||||
userSid: window.sessionStorage.getItem('userSid'),
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
|
||||
<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 :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>
|
||||
@@ -34,7 +36,8 @@
|
||||
<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="请输入验证码"
|
||||
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>
|
||||
@@ -49,9 +52,9 @@
|
||||
|
||||
<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>
|
||||
<span @click="registerClick">去注册</span>
|
||||
<span @click="registerClick" style="cursor:pointer;">去注册</span>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -81,13 +84,14 @@
|
||||
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="请输入验证码"
|
||||
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 style="display: flex;flex-direction: row;align-items: center;width: 100%; margin-top: 5px;"
|
||||
@click="goLogin">
|
||||
<span>已有账号?</span>
|
||||
<span style="color: #5084D2;">登录</span>
|
||||
<span style="color: #5084D2;cursor:pointer;">登录</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -98,9 +102,9 @@
|
||||
<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>
|
||||
<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;cursor:pointer;">《隐私协议》</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -115,7 +119,7 @@
|
||||
style="display: flex;flex-direction: column;width: 100%;">
|
||||
<div style="display: flex;flex-direction: row;align-items: center;
|
||||
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;
|
||||
margin-left: 10px;margin-right: 10px;" />
|
||||
<span style="flex: 1;margin-right: 10px;">{{item.orgName}}</span>
|
||||
@@ -216,7 +220,8 @@
|
||||
check: false,
|
||||
registerInfo: {
|
||||
mobile: '',
|
||||
userSid: ""
|
||||
userSid: "",
|
||||
sourceSid: 'd936f1ba-03c3-11ec-bf08-48452053aa33', // wms 资源sid
|
||||
},
|
||||
loginForm: {
|
||||
userName: '',
|
||||
@@ -509,7 +514,6 @@
|
||||
|
||||
loading.close()
|
||||
|
||||
|
||||
window.sessionStorage.setItem('token', response.data.token)
|
||||
window.sessionStorage.setItem('staffSid', response.data.staffSid)
|
||||
window.sessionStorage.setItem('userSid', response.data.sid)
|
||||
@@ -523,7 +527,8 @@
|
||||
window.sessionStorage.setItem('defaultRoleName', response.data.defaultRoleName)
|
||||
window.sessionStorage.setItem('defaultRoleSid', response.data.defaultRoleSid)
|
||||
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
|
||||
.pNameAndDepartmentNameAndPostName)
|
||||
}
|
||||
@@ -571,7 +576,8 @@
|
||||
window.sessionStorage.setItem('defaultRoleName', response.data.defaultRoleName)
|
||||
window.sessionStorage.setItem('defaultRoleSid', response.data.defaultRoleSid)
|
||||
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
|
||||
.pNameAndDepartmentNameAndPostName)
|
||||
}
|
||||
|
||||
@@ -433,6 +433,7 @@
|
||||
this.roleDialog = true
|
||||
this.roleForm.sid = row.sid
|
||||
this.roleForm.userSid = row.sid
|
||||
this.roleForm.orgsid = window.sessionStorage.getItem('orgSid')
|
||||
setRole(this.roleForm).then(res => {
|
||||
this.roleList = res.data
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user