Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vanke
manage
Commits
9062f9ae
Commit
9062f9ae
authored
Jun 23, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供应商管理,库存管理
parent
6f8a889b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
415 additions
and
380 deletions
+415
-380
inventory.js
src/api/inventory.js
+84
-0
login.js
src/api/login.js
+12
-4
supplier.js
src/api/supplier.js
+40
-0
permission.js
src/store/modules/permission.js
+15
-15
user.js
src/store/modules/user.js
+1
-1
request.js
src/utils/request.js
+4
-3
DepotAdmin.vue
src/views/inv/DepotAdmin.vue
+31
-27
GoodsCateogory.vue
src/views/inv/GoodsCateogory.vue
+22
-20
StockAdmin.vue
src/views/inv/StockAdmin.vue
+12
-15
StoreList.vue
src/views/inv/StoreList.vue
+50
-33
WarehouseAdmin.vue
src/views/inv/WarehouseAdmin.vue
+18
-19
addCategory.vue
src/views/inv/modules/addCategory.vue
+22
-32
addDepot.vue
src/views/inv/modules/addDepot.vue
+25
-30
index.vue
src/views/login/index.vue
+27
-68
SupplierList.vue
src/views/ssm/SupplierList.vue
+26
-84
AddSupplier.vue
src/views/ssm/modules/AddSupplier.vue
+26
-29
No files found.
src/api/inventory.js
0 → 100644
View file @
9062f9ae
/**
* 库存管理
*/
import
request
from
'@/utils/request'
// 万科后台_入库查询分页
export
function
getInboundRecordList
(
params
)
{
return
request
({
url
:
'vankeInboundRecord/list'
,
method
:
'get'
,
params
})
}
// 万科后台_出库查询分页操作
export
function
getOutboundRecordList
(
params
)
{
return
request
({
url
:
'vankeOutboundRecord/list'
,
method
:
'get'
,
params
})
}
// 万科后台_库房分页操作
export
function
getStockRooms
(
params
)
{
return
request
({
url
:
'vankeStockRoom/list'
,
method
:
'get'
,
params
})
}
// 万科后台_库房插入操作
export
function
addDepartment
(
params
)
{
return
request
({
url
:
'vankeStockRoom/insertDepartment'
,
method
:
'post'
,
params
})
}
// 万科后台_根据库房id修改一条数据
export
function
editDepartment
(
params
)
{
return
request
({
url
:
'vankeStockRoom/updateDepartment'
,
method
:
'post'
,
params
})
}
// 万科后台_物品类别分页操作
export
function
getGoodsCategoryList
(
params
)
{
return
request
({
url
:
'vankeGoodsCategory/list'
,
method
:
'get'
,
params
})
}
// 万科后台_物品类别插入操作
export
function
addGoodsCategory
(
params
)
{
return
request
({
url
:
'vankeGoodsCategory/insertGoodsCategory'
,
method
:
'post'
,
params
})
}
// 万科后台_根据物品类别id修改一条数据
export
function
editGoodsCategory
(
params
)
{
return
request
({
url
:
'vankeGoodsCategory/updateGoodsCategory'
,
method
:
'post'
,
params
})
}
// 万科后台_物品分页操作
export
function
getGoodsList
(
params
)
{
return
request
({
url
:
'vankeGoods/list'
,
method
:
'get'
,
params
})
}
src/api/login.js
View file @
9062f9ae
import
request
from
'@/utils/request'
export
function
login
(
username
,
password
)
{
// 生成验证码,返回的是 base64
export
function
getCaptchaImage
()
{
return
request
({
url
:
'/validateCode/getCaptchaBase64'
,
method
:
'get'
,
})
}
export
function
login
(
username
,
password
,
authCode
)
{
return
request
({
url
:
'/admin/login'
,
method
:
'post'
,
data
:
{
username
,
password
password
,
authCode
}
})
}
...
...
@@ -126,4 +135,4 @@ export function logRequest(params) {
method
:
'get'
,
params
:
params
})
}
\ No newline at end of file
}
src/api/supplier.js
0 → 100644
View file @
9062f9ae
/**
* 供应商资料
*/
import
request
from
'@/utils/request'
// 万科后台_供应商分页操作
export
function
getSuppliersList
(
params
)
{
return
request
({
url
:
'vankeSupplier/list'
,
method
:
'get'
,
params
})
}
// 万科后台_供应商插入操作
export
function
addSupplier
(
params
)
{
return
request
({
url
:
'vankeSupplier/insertSupplier'
,
method
:
'post'
,
params
})
}
// 万科后台_根据供应商id修改一条数据
export
function
editSupplier
(
params
)
{
return
request
({
url
:
'vankeSupplier/updateSupplier'
,
method
:
'post'
,
params
})
}
// 万科后台_根据供应商id查询一条数据
export
function
getSupplierDetail
(
params
)
{
return
request
({
url
:
'vankeSupplier/selectById'
,
method
:
'get'
,
params
})
}
src/store/modules/permission.js
View file @
9062f9ae
...
...
@@ -81,21 +81,21 @@ const permission = {
const
{
username
}
=
data
const
accessedRouters
=
asyncRouterMap
.
filter
(
v
=>
{
// admin帐号直接返回所有菜单
//
if (username === 'admin') return true
if
(
hasPermission
(
menus
,
v
))
{
if
(
v
.
children
&&
v
.
children
.
length
>
0
)
{
v
.
children
=
v
.
children
.
filter
(
child
=>
{
if
(
hasPermission
(
menus
,
child
))
{
return
child
}
return
false
})
return
v
}
else
{
return
v
}
}
return
false
if
(
username
===
'admin'
)
return
true
//
if (hasPermission(menus, v)) {
//
if (v.children && v.children.length > 0) {
//
v.children = v.children.filter(child => {
//
if (hasPermission(menus, child)) {
//
return child
//
}
//
return false
//
})
//
return v
//
} else {
//
return v
//
}
//
}
//
return false
})
//对菜单进行排序
sortRouters
(
accessedRouters
)
...
...
src/store/modules/user.js
View file @
9062f9ae
...
...
@@ -35,7 +35,7 @@ const user = {
Login
({
commit
},
userInfo
)
{
const
username
=
userInfo
.
username
.
trim
()
return
new
Promise
((
resolve
,
reject
)
=>
{
login
(
username
,
userInfo
.
password
).
then
(
response
=>
{
login
(
username
,
userInfo
.
password
,
userInfo
.
authCode
).
then
(
response
=>
{
const
data
=
response
.
data
const
tokenStr
=
data
.
tokenHead
+
data
.
token
setToken
(
tokenStr
)
...
...
src/utils/request.js
View file @
9062f9ae
...
...
@@ -2,11 +2,11 @@ import axios from 'axios'
import
{
Message
,
MessageBox
}
from
'element-ui'
import
store
from
'../store'
import
{
getToken
}
from
'@/utils/auth'
// 创建axios实例
const
service
=
axios
.
create
({
// baseURL: process.env.BASE_API,
baseURL
:
'http://192.168.31.254:8201/mall-admin'
,
withCredentials
:
true
,
baseURL
:
'http://192.168.31.127:8201/mall-admin'
,
// baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin',
timeout
:
60000
// 请求超时时间
})
...
...
@@ -15,6 +15,8 @@ const service = axios.create({
service
.
interceptors
.
request
.
use
(
config
=>
{
if
(
store
.
getters
.
token
)
{
config
.
headers
[
'Authorization'
]
=
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
config
.
headers
[
'Access-Control-Allow-Credentials'
]
=
true
}
return
config
},
error
=>
{
...
...
@@ -63,5 +65,4 @@ service.interceptors.response.use(
return
Promise
.
reject
(
error
)
}
)
export
default
service
src/views/inv/DepotAdmin.vue
View file @
9062f9ae
...
...
@@ -4,7 +4,7 @@
<el-card
class=
"filter-container mt15"
shadow=
"never"
>
<el-row
type=
"flex"
class=
"btn-groups"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click=
"handleAdd"
>
新增
</el-button>
</el-row>
<div
class=
"table-container"
>
<el-table
:data=
"list"
...
...
@@ -15,23 +15,24 @@
align=
"center"
width=
"50"
></el-table-column>
<el-table-column
label=
"库房名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
user
name
}}
</
template
>
</el-table-column>
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
}}
</
template
>
</el-table-column>
<el-table-column
label=
"管理员"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
username
}}
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createtime
|
formatTime
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"editDetail(scope.row.id)"
>
删除
</el-button>
type=
"danger"
@
click=
"handleDelete(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -50,36 +51,24 @@
</div>
</el-card>
<!-- 弹窗-->
<add-depot
ref=
"add
Category
"
@
ok=
"getList"
></add-depot>
<add-depot
ref=
"add
Depot
"
@
ok=
"getList"
></add-depot>
</div>
</template>
<
script
>
import
moment
from
'moment'
import
{
getS
upplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit
'
import
{
getS
tockRooms
,
editDepartment
}
from
'@/api/inventory
'
import
AddDepot
from
'./modules/addDepot'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
pageSize
:
10
,
accouuntType
:
1
,
name
:
''
,
phone
:
''
,
status
:
''
pageSize
:
10
}
export
default
{
name
:
'DepotAdmin'
,
components
:
{
AddDepot
},
components
:
{
AddDepot
},
data
()
{
return
{
statusOptions
:
[{
label
:
'启用'
,
value
:
1
},
{
label
:
'禁用'
,
value
:
0
}],
listQuery
:
Object
.
assign
({},
defaultListQuery
),
list
:
[],
total
:
0
,
...
...
@@ -124,7 +113,7 @@ export default {
this
.
listLoading
=
true
//请求数据
console
.
log
(
'listQuery'
,
this
.
listQuery
)
getS
upplier
(
this
.
listQuery
).
then
(
res
=>
{
getS
tockRooms
(
this
.
listQuery
).
then
(
res
=>
{
this
.
listLoading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
...
...
@@ -132,8 +121,22 @@ export default {
this
.
listLoading
=
false
})
},
handleAdd
(){
this
.
$refs
.
addCategory
.
init
()
// 添加
handleAdd
()
{
this
.
$refs
.
addDepot
.
add
()
},
// 删除
handleDelete
(
id
){
this
.
$confirm
(
'是否删除该库房?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
editDepartment
({
id
:
id
,
deleteStatus
:
0
}).
then
(
res
=>
{
this
.
getList
()
})
}).
catch
(()
=>
{
});
}
}
}
...
...
@@ -153,7 +156,8 @@ export default {
.input-width
{
width
:
180px
;
}
.btn-groups
button
{
.btn-groups
button
{
width
:
100px
;
}
</
style
>
src/views/inv/GoodsCateogory.vue
View file @
9062f9ae
...
...
@@ -16,18 +16,18 @@
width=
"50"
></el-table-column>
<el-table-column
label=
"物品类别"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
user
name
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
}}
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createtime
|
formatTime
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"
primary
"
@
click=
"
editDetail
(scope.row.id)"
>
删除
</el-button>
type=
"
danger
"
@
click=
"
handleDelete
(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -51,16 +51,12 @@
</template>
<
script
>
import
moment
from
'moment'
import
{
get
Supplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit
'
import
{
get
GoodsCategoryList
,
editGoodsCategory
}
from
'@/api/inventory
'
import
AddCategory
from
'./modules/addCategory'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
pageSize
:
10
,
accouuntType
:
1
,
name
:
''
,
phone
:
''
,
status
:
''
pageSize
:
10
}
export
default
{
...
...
@@ -68,14 +64,6 @@ export default {
components
:
{
AddCategory
},
data
()
{
return
{
statusOptions
:
[{
label
:
'启用'
,
value
:
1
},
{
label
:
'禁用'
,
value
:
0
}],
listQuery
:
Object
.
assign
({},
defaultListQuery
),
list
:
[],
total
:
0
,
...
...
@@ -120,7 +108,7 @@ export default {
this
.
listLoading
=
true
//请求数据
console
.
log
(
'listQuery'
,
this
.
listQuery
)
get
Supplier
(
this
.
listQuery
).
then
(
res
=>
{
get
GoodsCategoryList
(
this
.
listQuery
).
then
(
res
=>
{
this
.
listLoading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
...
...
@@ -128,8 +116,22 @@ export default {
this
.
listLoading
=
false
})
},
// 添加
handleAdd
(){
this
.
$refs
.
addCategory
.
init
()
this
.
$refs
.
addCategory
.
add
()
},
// 删除
handleDelete
(
id
){
this
.
$confirm
(
'是否删除该物品类别?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
editGoodsCategory
({
id
:
id
,
deleteStatus
:
0
}).
then
(
res
=>
{
this
.
getList
()
})
}).
catch
(()
=>
{
});
}
}
}
...
...
src/views/inv/StockAdmin.vue
View file @
9062f9ae
...
...
@@ -7,7 +7,7 @@
:model=
"listQuery"
size=
"small"
>
<el-form-item
label=
"物品名称:"
>
<el-input
v-model=
"listQuery.
n
ame"
<el-input
v-model=
"listQuery.
goodsM
ame"
class=
"input-width"
placeholder=
"请输入物品名称"
></el-input>
</el-form-item>
...
...
@@ -35,23 +35,23 @@
width=
"50"
></el-table-column>
<el-table-column
label=
"物品名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
n
ame
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsN
ame
}}
</
template
>
</el-table-column>
<el-table-column
label=
"总数量"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
username
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
inboundNum
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入库人"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phon
e
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
backInboundNam
e
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"入库日期"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createtime
|
formatTime
}}
</
template
>
</el-table-column>
<el-table-column
label=
"所属库房"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
stockRoomName
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
...
...
@@ -60,10 +60,10 @@
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"success"
@
click=
"
lookDetail
(scope.row)"
>
查看详情
</el-button>
@
click=
"
handleView
(scope.row)"
>
查看详情
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"e
ditDetail
(scope.row.id)"
>
生成入库单
</el-button>
@
click=
"e
xportEntry
(scope.row.id)"
>
生成入库单
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -90,16 +90,13 @@
</template>
<
script
>
import
moment
from
'moment'
import
{
get
Supplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit
'
import
{
get
InboundRecordList
}
from
'@/api/inventory
'
import
inventoryDetailsModal
from
'./modules/inventoryDetailsModal'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
pageSize
:
10
,
accouuntType
:
1
,
name
:
''
,
phone
:
''
,
status
:
''
goodsMame
:
''
}
export
default
{
...
...
@@ -151,7 +148,7 @@ export default {
this
.
listLoading
=
true
//请求数据
console
.
log
(
'listQuery'
,
this
.
listQuery
)
get
Supplier
(
this
.
listQuery
).
then
(
res
=>
{
get
InboundRecordList
(
this
.
listQuery
).
then
(
res
=>
{
this
.
listLoading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
...
...
@@ -160,7 +157,7 @@ export default {
})
},
// 查看
lookDetail
(
row
)
{
handleView
(
id
)
{
this
.
$refs
.
detail
.
init
()
}
}
...
...
src/views/inv/StoreList.vue
View file @
9062f9ae
...
...
@@ -12,37 +12,37 @@
placeholder=
"请输入物品名称"
></el-input>
</el-form-item>
<el-form-item
label=
"物品类别:"
>
<el-select
v-model=
"listQuery.
status
"
<el-select
v-model=
"listQuery.
goodsCategoryId
"
class=
"input-width"
clearable
placeholder=
"请选择物品类别"
>
<el-option
v-for=
"item in
status
Options"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
></el-option>
<el-option
v-for=
"item in
category
Options"
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"供应商:"
>
<el-select
v-model=
"listQuery.s
tatus
"
<el-select
v-model=
"listQuery.s
upplierId
"
class=
"input-width"
clearable
placeholder=
"请选择供应商"
>
<el-option
v-for=
"item in s
tatus
Options"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
></el-option>
<el-option
v-for=
"item in s
upplier
Options"
:key=
"item.
id
"
:label=
"item.
supplierName
"
:value=
"item.
id
"
></el-option>
</el-select>
</el-form-item>
<!-- 超级管理员可见-->
<el-form-item
label=
"库房:"
>
<el-select
v-model=
"listQuery.st
atus
"
<el-select
v-model=
"listQuery.st
ockRoomId
"
class=
"input-width"
clearable
placeholder=
"请选择库房"
>
<el-option
v-for=
"item in
status
Options"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
></el-option>
<el-option
v-for=
"item in
depot
Options"
:key=
"item.
id
"
:label=
"item.
name
"
:value=
"item.
id
"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
...
...
@@ -85,23 +85,23 @@
</el-table-column>
<el-table-column
label=
"物品类别"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
usern
ame
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsCategoryN
ame
}}
</
template
>
</el-table-column>
<el-table-column
label=
"数量"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
username
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsNum
}}
</
template
>
</el-table-column>
<el-table-column
label=
"价格"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
p
hone
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
p
rict
||
0
}}
</
template
>
</el-table-column>
<el-table-column
label=
"供应商"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phon
e
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
supplierNam
e
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"所属库房"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
stockRoomName
||
'--'
}}
</
template
>
</el-table-column>
</el-table>
</div>
...
...
@@ -124,16 +124,17 @@
</template>
<
script
>
import
moment
from
'moment'
import
{
getSupplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit'
import
{
getGoodsList
,
getGoodsCategoryList
,
getStockRooms
,
getAuditDetail
,
updateMcht
}
from
'@/api/inventory'
import
{
getSuppliersList
}
from
'@/api/supplier'
import
AddGoods
from
'./modules/addGoodsModal'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
pageSize
:
10
,
accouuntType
:
1
,
name
:
''
,
phone
:
''
,
status
:
''
goodsCategoryId
:
''
,
supplierId
:
''
,
stockRoomId
:
''
}
export
default
{
...
...
@@ -141,23 +142,21 @@ export default {
components
:
{
AddGoods
},
data
()
{
return
{
statusOptions
:
[{
label
:
'启用'
,
value
:
1
},
{
label
:
'禁用'
,
value
:
0
}],
listQuery
:
Object
.
assign
({},
defaultListQuery
),
list
:
[],
total
:
0
,
listLoading
:
false
,
multipleSelection
:
[],
categoryOptions
:
[],
supplierOptions
:
[],
depotOptions
:
[]
}
},
created
()
{
this
.
getList
()
this
.
getGoodsCategoryList
()
this
.
getSuppliersList
()
this
.
getStockRooms
()
},
filters
:
{
formatTime
(
time
)
{
...
...
@@ -188,12 +187,30 @@ export default {
handleSelectionChange
(
vals
)
{
this
.
multipleSelection
=
vals
},
// 物品类别
getGoodsCategoryList
(){
getGoodsCategoryList
().
then
(
res
=>
{
this
.
categoryOptions
=
res
.
data
.
list
})
},
// 供应商
getSuppliersList
(){
getSuppliersList
().
then
(
res
=>
{
this
.
supplierOptions
=
res
.
data
.
list
})
},
// 库房
getStockRooms
(){
getStockRooms
().
then
(
res
=>
{
this
.
depotOptions
=
res
.
data
.
list
})
},
//请求数据
getList
()
{
this
.
listLoading
=
true
//请求数据
console
.
log
(
'listQuery'
,
this
.
listQuery
)
get
Supplier
(
this
.
listQuery
).
then
(
res
=>
{
get
GoodsList
(
this
.
listQuery
).
then
(
res
=>
{
this
.
listLoading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
...
...
src/views/inv/WarehouseAdmin.vue
View file @
9062f9ae
...
...
@@ -7,12 +7,12 @@
:model=
"listQuery"
size=
"small"
>
<el-form-item
label=
"物品名称:"
>
<el-input
v-model=
"listQuery.
n
ame"
<el-input
v-model=
"listQuery.
goodsM
ame"
class=
"input-width"
placeholder=
"请输入物品名称"
></el-input>
</el-form-item>
<el-form-item
label=
"物品类别:"
>
<el-select
v-model=
"listQuery.
status
"
<el-select
v-model=
"listQuery.
goodsCategoryId
"
class=
"input-width"
clearable
placeholder=
"请选择物品类别"
>
...
...
@@ -23,7 +23,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"部门:"
>
<el-select
v-model=
"listQuery.st
atus
"
<el-select
v-model=
"listQuery.st
ockRoomId
"
class=
"input-width"
clearable
placeholder=
"请选择部门"
>
...
...
@@ -69,7 +69,7 @@
width=
"50"
></el-table-column>
<el-table-column
label=
"物品名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
n
ame
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsN
ame
}}
</
template
>
</el-table-column>
<el-table-column
label=
"型号"
align=
"center"
>
...
...
@@ -81,23 +81,23 @@
</el-table-column>
<el-table-column
label=
"数量"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
username
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
outboundNum
}}
</
template
>
</el-table-column>
<el-table-column
label=
"申领人"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phon
e
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
memberNam
e
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"所属部门"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phon
e
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
departmentNam
e
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"所属库房"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
stockRoomName
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"出库日期"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createtime
|
formatTime
}}
</
template
>
</el-table-column>
</el-table>
</div>
...
...
@@ -118,7 +118,7 @@
</template>
<
script
>
import
moment
from
'moment'
import
{
get
Supplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit
'
import
{
get
OutboundRecordList
,
getGoodsCategoryList
,
getAuditDetail
,
updateMcht
}
from
'@/api/inventory
'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
...
...
@@ -134,14 +134,6 @@ export default {
components
:
{},
data
()
{
return
{
statusOptions
:
[
{
label
:
'启用'
,
value
:
1
},
{
label
:
'禁用'
,
value
:
0
}],
listQuery
:
Object
.
assign
({},
defaultListQuery
),
list
:
[],
total
:
0
,
...
...
@@ -151,6 +143,7 @@ export default {
},
created
()
{
this
.
getList
()
this
.
getGoodsCategoryList
()
},
filters
:
{
formatTime
(
time
)
{
...
...
@@ -181,12 +174,18 @@ export default {
handleSelectionChange
(
vals
)
{
this
.
multipleSelection
=
vals
},
// 物品类别
getGoodsCategoryList
(){
getGoodsCategoryList
().
then
(
res
=>
{
})
},
//请求数据
getList
()
{
this
.
listLoading
=
true
//请求数据
console
.
log
(
'listQuery'
,
this
.
listQuery
)
get
Supplier
(
this
.
listQuery
).
then
(
res
=>
{
get
OutboundRecordList
(
this
.
listQuery
).
then
(
res
=>
{
this
.
listLoading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
...
...
src/views/inv/modules/addCategory.vue
View file @
9062f9ae
...
...
@@ -26,10 +26,7 @@
</el-dialog>
</
template
>
<
script
>
import
{
getAttribute
,
changeAttribute
}
from
'@/api/attribute'
import
{
fetchAttributeTypeList
}
from
'@/api/attributeType'
import
{
fetchAttributeGroupList
}
from
'@/api/attributeGroup'
import
{
addGoodsCategory
}
from
'@/api/inventory'
// 移动属性
export
default
{
name
:
'addCategory'
,
...
...
@@ -39,51 +36,44 @@ export default {
title
:
null
,
loading
:
false
,
id
:
null
,
model
:
{
attributeTypeId
:
null
,
attributeGroupId
:
null
},
typeOptions
:
[],
groupOptions
:
[]
model
:
{}
}
},
methods
:
{
init
()
{
this
.
title
=
"新增物品类别"
this
.
model
=
{
attributeTypeId
:
null
,
attributeGroupId
:
null
name
:
null
}
this
.
visible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
attributeForm
.
clearValidate
()
})
},
detail
(
id
)
{
this
.
id
=
id
add
(){
this
.
id
=
null
this
.
title
=
"新增物品类别"
this
.
init
()
this
.
visible
=
true
this
.
title
=
'移动属性'
this
.
loading
=
true
getAttribute
(
id
).
then
(
res
=>
{
this
.
model
=
res
.
data
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
close
()
})
this
.
visible
=
true
},
// detail (id) {
// this.id = id
// this.init()
// this.visible = true
// this.title = '移动属性'
// this.loading = true
// getAttribute(id).then(res => {
// this.model = res.data
// this.loading = false
// }).catch(err => {
// this.loading = false
// this.close()
// })
// },
// 提交保存
submit
()
{
this
.
$refs
.
attributeForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 验证通过
let
params
=
{
id
:
this
.
id
,
attributeTypeId
:
this
.
model
.
attributeTypeId
,
attributeGroupId
:
this
.
model
.
attributeGroupId
}
changeAttribute
(
params
).
then
(
res
=>
{
addGoodsCategory
(
this
.
model
).
then
(
res
=>
{
this
.
loading
=
false
this
.
visible
=
false
this
.
$emit
(
'ok'
)
...
...
src/views/inv/modules/addDepot.vue
View file @
9062f9ae
...
...
@@ -5,7 +5,7 @@
width=
"500px"
>
<!-- start -->
<el-form
:model=
"model"
ref=
"
attribute
Form"
ref=
"
my
Form"
v-loading=
"loading"
label-width=
"150px"
>
<el-form-item
label=
"库房名称:"
...
...
@@ -26,9 +26,7 @@
</el-dialog>
</
template
>
<
script
>
import
{
getAttribute
,
changeAttribute
}
from
'@/api/attribute'
import
{
fetchAttributeTypeList
}
from
'@/api/attributeType'
import
{
fetchAttributeGroupList
}
from
'@/api/attributeGroup'
import
{
addDepartment
}
from
'@/api/inventory'
// 移动属性
export
default
{
...
...
@@ -40,8 +38,7 @@ export default {
loading
:
false
,
id
:
null
,
model
:
{
attributeTypeId
:
null
,
attributeGroupId
:
null
name
:
null
},
typeOptions
:
[],
groupOptions
:
[]
...
...
@@ -49,41 +46,39 @@ export default {
},
methods
:
{
init
()
{
this
.
title
=
"新增库房"
this
.
model
=
{
attributeTypeId
:
null
,
attributeGroupId
:
null
name
:
null
}
this
.
visible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
attribute
Form
.
clearValidate
()
this
.
$refs
.
my
Form
.
clearValidate
()
})
},
detail
(
id
)
{
this
.
id
=
id
add
(){
this
.
id
=
null
this
.
title
=
"新增库房"
this
.
init
()
this
.
visible
=
true
this
.
title
=
'移动属性'
this
.
loading
=
true
getAttribute
(
id
).
then
(
res
=>
{
this
.
model
=
res
.
data
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
close
()
})
this
.
visible
=
true
},
// detail (id) {
// this.id = id
// this.init()
// this.visible = true
// this.title = '移动属性'
// this.loading = true
// getAttribute(id).then(res => {
// this.model = res.data
// this.loading = false
// }).catch(err => {
// this.loading = false
// this.close()
// })
// },
// 提交保存
submit
()
{
this
.
$refs
.
attribute
Form
.
validate
((
valid
)
=>
{
this
.
$refs
.
my
Form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 验证通过
let
params
=
{
id
:
this
.
id
,
attributeTypeId
:
this
.
model
.
attributeTypeId
,
attributeGroupId
:
this
.
model
.
attributeGroupId
}
changeAttribute
(
params
).
then
(
res
=>
{
addDepartment
(
this
.
model
).
then
(
res
=>
{
this
.
loading
=
false
this
.
visible
=
false
this
.
$emit
(
'ok'
)
...
...
src/views/login/index.vue
View file @
9062f9ae
...
...
@@ -41,20 +41,15 @@
</span>
-->
</el-input>
</el-form-item>
<el-row
:gutter=
"20"
>
<el-col
:span=
"16"
>
<el-form-item
prop=
"VerificationCode"
>
<el-input
type=
"text"
v-model=
"loginForm.VerificationCode"
auto-complete=
"off"
placeholder=
"请输入验证码"
></el-input>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"15"
>
<el-form-item
prop=
"VerificationCode"
>
<el-input
type=
"text"
v-model=
"loginForm.authCode"
auto-complete=
"off"
placeholder=
"请输入验证码"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"ValidCode disabled-select"
:style=
"`width:$
{width}; height:${height}`" @click="refreshCode"
style="border: 1px solid #DCDFE6;float: right;border-radius: 4px;">
<span
v-for=
"(item, index) in codeList"
:key=
"index"
:style=
"getStyle(item)"
>
{{
item
.
code
}}
</span>
</div>
<el-col
:span=
"9"
v-if=
"captchaImage"
style=
"text-align: right;"
>
<img
style=
"width:100px; padding: 8px;border: 1px solid #DCDFE6;border-radius: 4px;"
:src=
"captchaImage"
alt=
""
@
click=
"refreshCode"
>
</el-col>
</el-row>
<el-form-item>
...
...
@@ -74,6 +69,7 @@
<
script
>
import
{
setSupport
,
getSupport
,
setCookie
,
getCookie
}
from
'@/utils/support'
import
{
getCaptchaImage
}
from
'@/api/login'
import
TopNav
from
'./components/TopNav'
import
BottomFooter
from
'./components/BottomFooter'
...
...
@@ -83,20 +79,6 @@ export default {
TopNav
,
BottomFooter
},
props
:
{
width
:
{
type
:
String
,
default
:
'80px'
},
height
:
{
type
:
String
,
default
:
'38px'
},
length
:
{
type
:
Number
,
default
:
4
}
},
data
()
{
const
validateUsername
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
...
...
@@ -112,26 +94,18 @@ export default {
callback
()
}
}
const
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请输入验证码'
))
}
else
if
(
value
!==
this
.
codeList
.
map
(
item
=>
item
.
code
).
join
(
''
))
{
callback
(
new
Error
(
'请输入正确的验证码!'
))
}
else
{
callback
()
}
}
return
{
captchaImage
:
null
,
codeList
:
[],
loginForm
:
{
username
:
''
,
password
:
''
,
VerificationCode
:
''
authCode
:
''
,
},
loginRules
:
{
username
:
[{
required
:
true
,
trigger
:
'blur'
,
validator
:
validateUsername
}],
password
:
[{
required
:
true
,
trigger
:
'blur'
,
validator
:
validatePass
}],
VerificationCode
:
[{
validator
:
validatePass2
,
trigger
:
'blur
'
}],
authCode
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'验证码不能为空
'
}],
},
loading
:
false
,
pwdType
:
...
...
@@ -147,41 +121,25 @@ export default {
if
(
password
)
{
this
.
loginForm
.
password
=
password
}
this
.
createdCod
e
()
this
.
getCaptchaImag
e
()
},
methods
:
{
refreshCode
()
{
this
.
createdCode
()
},
createdCode
()
{
let
len
=
this
.
length
,
codeList
=
[],
chars
=
'ABCDEFGHJKMNPQRSTWXYZ0123456789'
,
charsLen
=
chars
.
length
// 生成
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
let
rgb
=
[
Math
.
round
(
Math
.
random
()
*
220
),
Math
.
round
(
Math
.
random
()
*
240
),
Math
.
round
(
Math
.
random
()
*
200
)]
codeList
.
push
({
code
:
chars
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
charsLen
)),
color
:
`rgb(
${
rgb
}
)`
,
fontSize
:
`1
${[
Math
.
floor
(
Math
.
random
()
*
10
)]}
px`
,
padding
:
`
${[
Math
.
floor
(
Math
.
random
()
*
10
)]}
px`
,
transform
:
`rotate(
${
Math
.
floor
(
Math
.
random
()
*
90
)
-
Math
.
floor
(
Math
.
random
()
*
90
)}
deg)`
})
}
// 指向
// this.codeList = codeList
this
.
codeList
.
splice
(
0
,
this
.
codeList
.
length
,
codeList
);
codeList
.
forEach
((
item
,
index
)
=>
{
this
.
codeList
.
splice
(
index
,
1
,
item
)
getCaptchaImage
()
{
// axios.get('/user?ID=12345')
// .then(function (response) {
// console.log(response);
// })
// .catch(function (error) {
// console.log(error);
// });
getCaptchaImage
().
then
(
res
=>
{
console
.
log
(
res
)
this
.
captchaImage
=
res
.
data
.
url
})
console
.
log
(
'this.codeList'
,
this
.
codeList
)
// 将当前数据派发出去
this
.
$emit
(
'update:value'
,
codeList
.
map
(
item
=>
item
.
code
).
join
(
''
))
console
.
log
(
codeList
.
map
(
item
=>
item
.
code
).
join
(
''
))
},
getStyle
(
data
)
{
return
`color:
${
data
.
color
}
; font-size:
${
data
.
fontSize
}
; padding:
${
data
.
padding
}
; transform:
${
data
.
transform
}
`
refreshCode
()
{
console
.
log
(
're'
)
this
.
getCaptchaImage
()
},
showPwd
()
{
if
(
this
.
pwdType
===
'password'
)
{
...
...
@@ -194,6 +152,7 @@ export default {
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
console
.
log
(
'this.loginForm'
,
this
.
loginForm
)
this
.
$store
.
dispatch
(
'Login'
,
this
.
loginForm
).
then
(()
=>
{
this
.
loading
=
false
setCookie
(
'username'
,
this
.
loginForm
.
username
,
15
)
...
...
src/views/ssm/SupplierList.vue
View file @
9062f9ae
...
...
@@ -40,26 +40,23 @@
width=
"50"
></el-table-column>
<el-table-column
label=
"供应商名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
n
ame
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
supplierN
ame
}}
</
template
>
</el-table-column>
<el-table-column
label=
"联系人"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
user
name
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
}}
</
template
>
</el-table-column>
<el-table-column
label=
"联系方式"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phone
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
tel
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"供应物品"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
email
||
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goodsNum
||
0
}}
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<router-link
class=
"color-main"
:to=
"
{path: '/pms/product', query: {mchtId: scope.row.id, mchtName: scope.row.name}}">查看商品
</router-link>
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remarks
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"220"
...
...
@@ -67,10 +64,10 @@
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"
editDetail
(scope.row.id)"
>
编辑
</el-button>
@
click=
"
handleEdit
(scope.row.id)"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"
editDetail
(scope.row.id)"
>
删除
</el-button>
@
click=
"
handleDelete
(scope.row.id)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -96,38 +93,21 @@
</div>
</template>
<
script
>
import
moment
from
'moment'
import
{
getSupplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit'
import
{
getSuppliersList
,
editSupplier
}
from
'@/api/supplier'
import
AddSupplier
from
'./modules/AddSupplier'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
pageSize
:
10
,
accouuntType
:
1
,
name
:
''
,
phone
:
''
,
status
:
''
name
:
''
}
// 账号状态数据
const
defaultStatusOptions
=
[
{
label
:
'启用'
,
value
:
1
},
{
label
:
'禁用'
,
value
:
0
}
]
// 供应商入驻账号列表
export
default
{
name
:
'SupplierList'
,
components
:
{
AddSupplier
},
data
()
{
return
{
listQuery
:
Object
.
assign
({},
defaultListQuery
),
statusOptions
:
defaultStatusOptions
,
list
:
[],
total
:
0
,
listLoading
:
false
,
...
...
@@ -137,26 +117,7 @@ export default {
created
()
{
this
.
getList
()
},
filters
:
{
formatTime
(
time
)
{
if
(
!
time
)
{
return
'--'
}
return
moment
(
time
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
formatStatus
(
status
)
{
if
(
status
==
0
)
{
return
'禁用'
}
else
{
return
'启用'
}
}
},
methods
:
{
// 添加供应商
handleAdd
()
{
this
.
$refs
.
addSupplier
.
add
()
},
handleResetSearch
()
{
this
.
listQuery
=
Object
.
assign
({},
defaultListQuery
)
this
.
getList
()
...
...
@@ -181,7 +142,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
//请求数据
getSupplier
(
this
.
listQuery
).
then
(
res
=>
{
getSupplier
sList
(
this
.
listQuery
).
then
(
res
=>
{
this
.
listLoading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
...
...
@@ -189,44 +150,25 @@ export default {
this
.
listLoading
=
false
})
},
handleStatus
(
row
)
{
// 账号禁用
if
(
row
.
status
==
0
)
{
this
.
$confirm
(
'确定启用该账号'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
//启用接口
this
.
updateMcht
(
row
,
1
)
})
}
else
if
(
row
.
status
==
1
)
{
this
.
$confirm
(
'确定禁用该账号?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
//禁用接口
this
.
updateMcht
(
row
,
0
)
})
}
},
//供应商账户启用/禁用
updateMcht
(
row
,
status
)
{
let
params
=
{
id
:
row
.
id
,
status
:
status
}
updateMcht
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
status
==
1
?
'启用成功'
:
'禁用成功'
)
this
.
getList
()
})
// 添加供应商
handleAdd
()
{
this
.
$refs
.
addSupplier
.
add
()
},
// 查看
lookDetail
(
row
)
{
row
.
audit
=
false
row
.
flag
=
true
this
.
$router
.
push
({
name
:
'supplier'
,
params
:
row
})
// 删除
handleDelete
(
id
)
{
this
.
$confirm
(
'是否删除该供应商?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
editSupplier
({
id
:
id
,
deleteStatus
:
0
}).
then
(
res
=>
{
this
.
getList
()
})
}).
catch
(()
=>
{
});
},
//编辑
editDetail
(
id
)
{
handleEdit
(
id
)
{
this
.
$refs
.
addSupplier
.
detail
(
id
)
}
}
...
...
src/views/ssm/modules/AddSupplier.vue
View file @
9062f9ae
...
...
@@ -12,35 +12,35 @@
ref=
"scrollContainer"
>
<el-form-item
label=
"供应商名称:"
:rules=
"[
{required: true, trigger: 'blur', message: '供应商名称不能为空'}]"
prop="
n
ame">
prop="
supplierN
ame">
<el-input
size=
"small"
class=
"input-width"
v-model=
"model.
n
ame"
></el-input>
v-model=
"model.
supplierN
ame"
></el-input>
</el-form-item>
<el-form-item
label=
"联系人:"
:rules=
"[
{required: true, trigger: 'blur', message: '联系人不能为空'}]"
prop="
user
name">
prop="name">
<el-input
size=
"small"
class=
"input-width"
v-model=
"model.
user
name"
></el-input>
v-model=
"model.name"
></el-input>
</el-form-item>
<el-form-item
label=
"联系方式:"
:rules=
"[
{
required: true,
validator: validatePhone,
trigger: 'blur'
}]"
prop="phone">
:rules=
"[
{required: true,validator: validatePhone, trigger: 'blur'}]"
prop="tel">
<el-input
size=
"small"
class=
"input-width"
v-model=
"model.
phone
"
></el-input>
v-model=
"model.
tel
"
></el-input>
</el-form-item>
<el-form-item
label=
"备注:"
prop=
"personalizedSignature"
>
prop=
"remarks"
:rules=
"[
{required: true, trigger: 'blur', message: '备注不能为空'}]">
<el-input
size=
"small"
type=
"textarea"
class=
"input-width"
v-model=
"model.personalizedSignature"
></el-input>
maxlength=
"32"
show-word-limit
:autosize=
"
{ minRows: 3, maxRows: 6}"
v-model="model.remarks">
</el-input>
</el-form-item>
</div>
</el-form>
...
...
@@ -54,8 +54,7 @@
</el-dialog>
</
template
>
<
script
>
import
{
addMember
,
updateMcht
}
from
'@/api/audit'
import
{
getSupplierDetail
}
from
'../../../api/audit'
import
{
addSupplier
,
getSupplierDetail
,
editSupplier
}
from
'@/api/supplier'
// 添加编辑属性
export
default
{
...
...
@@ -84,15 +83,10 @@ export default {
methods
:
{
init
()
{
this
.
model
=
{
phone
:
null
,
username
:
null
,
supplierName
:
null
,
name
:
null
,
password
:
null
,
accouuntType
:
1
,
email
:
null
,
payType
:
null
,
cycleType
:
null
,
personalizedSignature
:
null
remarks
:
null
,
tel
:
null
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
myForm
.
clearValidate
()
...
...
@@ -127,7 +121,14 @@ export default {
if
(
this
.
id
)
{
// 修改属性
this
.
loading
=
true
updateMcht
(
this
.
model
).
then
(
res
=>
{
let
params
=
{
id
:
this
.
model
.
id
,
supplierName
:
this
.
model
.
supplierName
,
name
:
this
.
model
.
name
,
tel
:
this
.
model
.
tel
,
remarks
:
this
.
model
.
remarks
}
editSupplier
(
params
).
then
(
res
=>
{
this
.
loading
=
false
this
.
visible
=
false
this
.
$emit
(
'ok'
)
...
...
@@ -137,7 +138,7 @@ export default {
}
else
{
// 添加属性
this
.
loading
=
true
add
Memb
er
(
this
.
model
).
then
(
res
=>
{
add
Suppli
er
(
this
.
model
).
then
(
res
=>
{
this
.
loading
=
false
this
.
visible
=
false
this
.
$emit
(
'ok'
)
...
...
@@ -166,8 +167,4 @@ export default {
width
:
300px
;
}
.tip
{
color
:
#999
;
font-size
:
12px
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment