Browse Source

完善数据权限

master
guoxing 11 months ago
parent
commit
f4a203984f
  1. 2
      src/api/system/userManage/index.js
  2. 394
      src/views/baseInfo/supplier/supplier/supplier.vue
  3. 748
      src/views/baseInfo/supplier/supplier/supplierAdd.vue
  4. 445
      src/views/baseInfo/supplier/suppliertype/suppliertype.vue
  5. 11
      src/views/baseInfo/warehouses/goodsShelves/goodsShelvesAdd.vue
  6. 357
      src/views/baseInfo/warehouses/goodsShelves/index.vue
  7. 346
      src/views/baseInfo/warehouses/warehouse/index.vue
  8. 40
      src/views/baseInfo/warehouses/warehouse/warehouseAdd.vue
  9. 356
      src/views/baseInfo/warehouses/warehouseArea/index.vue
  10. 13
      src/views/baseInfo/warehouses/warehouseArea/warehouseAreaAdd.vue
  11. 356
      src/views/baseInfo/warehouses/warehouseAreaType/index.vue
  12. 9
      src/views/baseInfo/warehouses/warehouseAreaType/warehouseAreaTypeAdd.vue
  13. 8
      src/views/goods/brands/brandsAdd.vue
  14. 2
      src/views/goods/brands/index.vue
  15. 8
      src/views/goods/category/categoryAdd.vue
  16. 21
      src/views/goods/category/index.vue
  17. 18
      src/views/goods/factory/factoryAdd.vue
  18. 2
      src/views/goods/factory/index.vue
  19. 18
      src/views/goods/goods/goodsAdd.vue
  20. 2
      src/views/goods/goods/goodsAdd2.vue
  21. 3
      src/views/goods/goods/index.vue
  22. 2
      src/views/goods/unit/index.vue
  23. 8
      src/views/goods/unit/unitAdd.vue
  24. 34
      src/views/login/login.vue
  25. 1
      src/views/system/userManage/userManageList.vue

2
src/api/system/userManage/index.js

@ -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: {

394
src/views/baseInfo/supplier/supplier/supplier.vue

@ -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
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: ''
}
}
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
created() {
//
this.getList()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
//
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
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.list = []
this.listQuery.total = 0
this.searchxianshitit = '显示查询条件'
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
supplierName: '',
supplierTypeName: '',
contactTelePhone: '',
contactName: ''
},
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
}
}
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)'
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
req.delBySids(this.sids).then(resp => {
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
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
}
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)
},
//
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>

748
src/views/baseInfo/supplier/supplier/supplierAdd.vue

@ -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
}
})
},
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
}
export default {
name: 'SupplierAdd',
components: {
openingbank
},
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
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: [],
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'
}]
}
})
},
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
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')
}
})
},
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
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
}
})
},
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
},
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 = []
}
} 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
},
getCity(val) {
getCity({
sid: val
}).then((res) => {
if (res.success) {
this.city_list = res.data
}
})
}
},
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
},
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>

445
src/views/baseInfo/supplier/suppliertype/suppliertype.vue

@ -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: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
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: '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'),
}
},
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
created() {
//
this.getList()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
//
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
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.list = []
this.listQuery.total = 0
this.searchxianshitit = '显示查询条件'
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
},
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.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>

11
src/views/baseInfo/warehouses/goodsShelves/goodsShelvesAdd.vue

@ -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')

357
src/views/baseInfo/warehouses/goodsShelves/index.vue

@ -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>

346
src/views/baseInfo/warehouses/warehouse/index.vue

@ -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>

40
src/views/baseInfo/warehouses/warehouse/warehouseAdd.vue

@ -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')
},

356
src/views/baseInfo/warehouses/warehouseArea/index.vue

@ -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>

13
src/views/baseInfo/warehouses/warehouseArea/warehouseAreaAdd.vue

@ -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')

356
src/views/baseInfo/warehouses/warehouseAreaType/index.vue

@ -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>

9
src/views/baseInfo/warehouses/warehouseAreaType/warehouseAreaTypeAdd.vue

@ -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'),
}

8
src/views/goods/brands/brandsAdd.vue

@ -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')

2
src/views/goods/brands/index.vue

@ -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

8
src/views/goods/category/categoryAdd.vue

@ -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')

21
src/views/goods/category/index.vue

@ -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()

18
src/views/goods/factory/factoryAdd.vue

@ -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')

2
src/views/goods/factory/index.vue

@ -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

18
src/views/goods/goods/goodsAdd.vue

@ -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')

2
src/views/goods/goods/goodsAdd2.vue

@ -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

3
src/views/goods/goods/index.vue

@ -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) {

2
src/views/goods/unit/index.vue

@ -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

8
src/views/goods/unit/unitAdd.vue

@ -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')

34
src/views/login/login.vue

@ -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)
}

1
src/views/system/userManage/userManageList.vue

@ -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++) {

Loading…
Cancel
Save