Commit 35dacb14 by wangweidong

分包方管理

parent 97f04518
......@@ -7,9 +7,10 @@ import http from '../http'
export default {
// page
page: data => http.post('meter/v1/subcontractor/page', data).then(res => res),
getById: data => http.get('meter/v1/subcontractor/' + data).then(res => res),
// 保存
save: data => http.post('meter/v1/subcontractor/', data).then(res => res),
// 编辑
edit: data =>
http.post('meter/v1/subcontractor/' + data.id, data.obj).then(res => res)
http.put('meter/v1/subcontractor/' + data.id, data.obj).then(res => res)
}
......@@ -68,24 +68,21 @@ export default {
],
iconMsg: [
{
type: 'compose',
type: 'ios-clock',
id: '',
name: '编辑',
componentName: 'FoodSubcontracterEdit'
name: '编辑'
},
{
type: 'stats-bars',
type: 'ios-clock',
id: '',
name: '资质项目',
componentName: 'FoodSubcontracterItem'
name: '资质项目'
},
{ type: 'cloud', id: '', name: '附件', componentName: 'FileManage' },
{ type: 'trash-a', id: '', name: '删除' },
{ type: 'ios-clock', id: '', name: '附件' },
{ type: 'ios-clock', id: '', name: '删除' },
{
type: 'ios-clock',
id: '',
name: '操作日志',
componentName: 'FoodSubRecord'
name: '操作日志'
}
],
formObj: {
......@@ -207,6 +204,8 @@ export default {
_editModal(edit, id) {
if (edit) {
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
......@@ -220,6 +219,12 @@ export default {
_upload(id) {
// 上传文件
this.$refs.refModal._open(id, 'subcontractorId')
},
_getById: async function(id) {
const result = await meterSubcontractor.getById(id)
if (result) {
this.$refs.editSubcontractorModal._open(result)
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment