Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
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
wangweidong
patzn-cloud-web-back-soil
Commits
ccdb7e46
Commit
ccdb7e46
authored
Jun 11, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了资质管理
parent
11685485
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
228 additions
and
2 deletions
+228
-2
EditModal.vue
pages/meter-entrust/go-out-test/EditModal.vue
+174
-0
MeterGoOutTestEdit.vue
pages/meter-entrust/go-out-test/MeterGoOutTestEdit.vue
+54
-2
No files found.
pages/meter-entrust/go-out-test/EditModal.vue
0 → 100644
View file @
ccdb7e46
<
template
>
<div>
<Modal
v-model=
"showUserGroupModal"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<Row>
<!--查询条件-->
<Col
span=
"24"
>
<Form
id=
"test-item-form"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
/>
<Form-item
:label-width=
"70"
label=
"检测依据"
>
<Input
v-model=
"code"
@
on-enter=
"_pageChange(1)"
placeholder=
"请输入检测依据"
style=
"width: 100%"
/>
</Form-item>
<Form-item
label=
"检测依据名称"
>
<Input
v-model=
"name"
@
on-enter=
"_pageChange(1)"
placeholder=
"请输入检测依据名称"
style=
"width: 100%"
/>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
style=
"margin-bottom: 10px"
>
<el-table
:height=
"300"
@
row-click=
"_rowChange"
@
row-dblclick=
"_dbClick"
:data=
"getPage"
border
size=
"small"
highlight-current-row
style=
"width: 100%"
>
<el-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:prop=
"item.key"
:label=
"item.title"
:min-width=
"item.width"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
].
display
:
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
</el-table>
</Col>
<Col
span=
"24"
>
<Page
:total=
"getPage.total"
:page-size=
"getPage.size"
@
on-change=
"_pageChange"
@
on-page-size-change=
"_pageRows"
placement=
"top"
show-total
show-elevator
show-sizer
/>
<div
style=
"clear: both"
/>
</Col>
</Row>
<div
slot=
"footer"
class=
"btn-width"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px"
>
取消
</Button>
<Button
@
click=
"_ok"
type=
"primary"
>
确定
</Button>
</div>
</Modal>
</div>
</template>
<
script
>
// import { meterAptitude } from '../../../api'
import
{
meterManage
}
from
'../../../api'
export
default
{
name
:
'EditModal'
,
data
()
{
return
{
loading
:
true
,
pageParams
:
{
rows
:
20
},
pageColumns
:
[{
title
:
'样品名称'
,
key
:
'name'
}],
getPage
:
[],
showUserGroupModal
:
false
,
modalTitle
:
''
,
currentRowData
:
{},
name
:
''
,
code
:
''
}
},
methods
:
{
_open
()
{
this
.
modalTitle
=
'选择检测依据'
this
.
name
=
''
this
.
code
=
''
this
.
_judge
()
},
_judge
()
{
this
.
showUserGroupModal
=
true
this
.
currentRowData
=
{}
this
.
_page
()
},
_page
:
async
function
()
{
const
result
=
await
meterManage
.
page
(
this
.
_searchParams
())
if
(
result
)
{
console
.
log
(
'查询结果'
)
console
.
log
(
result
)
this
.
getPage
=
result
.
records
this
.
loading
=
false
console
.
log
(
this
.
getPage
)
}
},
_pageChange
(
page
)
{
this
.
pageParams
.
page
=
page
this
.
_page
()
},
_pageRows
(
rows
)
{
this
.
pageParams
.
rows
=
rows
this
.
_page
()
},
_searchParams
()
{
const
data
=
this
.
$serialize
(
'test-item-form'
)
if
(
this
.
name
)
{
data
.
name
=
this
.
name
}
if
(
this
.
code
)
{
data
.
code
=
this
.
code
}
return
this
.
$extend
(
data
,
this
.
pageParams
)
},
_search
()
{
this
.
_page
()
},
_rowChange
(
data
)
{
this
.
currentRowData
=
data
// 选中的行数据;
},
_cancel
()
{
this
.
showUserGroupModal
=
false
},
_ok
()
{
if
(
JSON
.
stringify
(
this
.
currentRowData
)
===
'{}'
)
{
switch
(
this
.
modalTitle
)
{
case
'选择检测依据'
:
this
.
$Message
.
warning
(
'请选择一条检测依据!'
)
break
}
}
else
{
this
.
$emit
(
'on-result-change'
,
this
.
currentRowData
)
this
.
showUserGroupModal
=
false
}
},
// 双击
_dbClick
(
data
,
event
)
{
this
.
currentRowData
=
data
// 选中的行数据;
this
.
_ok
()
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/meter-entrust/go-out-test/MeterGoOutTestEdit.vue
View file @
ccdb7e46
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
>
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key==='name'"
@
click
.
stop=
"_handleRow(scope)"
>
<div
v-if=
"item.key==='name'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.name"
blur
placeholder=
"请输入或选择样品名称"
<el-input
v-model=
"scope.row.name"
@
on-result-change=
"_judgeBasisChange"
@
click
.
native=
"_selectjudgeBasis(scope.$rowIndex)"
blur
placeholder=
"请输入或选择样品名称"
></el-input>
></el-input>
</div>
</div>
<div
v-if=
"item.key==='spec'"
@
click
.
stop=
"_handleRow(scope)"
>
<div
v-if=
"item.key==='spec'"
@
click
.
stop=
"_handleRow(scope)"
>
...
@@ -107,6 +107,7 @@
...
@@ -107,6 +107,7 @@
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</div>
<EditModal
ref=
"EditModal"
@
on-result-change=
"_backData"
is-change
/>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
...
@@ -115,9 +116,10 @@
...
@@ -115,9 +116,10 @@
* 添加编辑分包商
* 添加编辑分包商
*/
*/
import
{
lmsBaseDict
,
meterEntrust
}
from
'../../../api'
import
{
lmsBaseDict
,
meterEntrust
}
from
'../../../api'
import
EditModal
from
'./EditModal'
export
default
{
export
default
{
components
:
{},
components
:
{
EditModal
},
data
()
{
data
()
{
return
{
return
{
formId
:
'meterSendTestEditFormId'
,
formId
:
'meterSendTestEditFormId'
,
...
@@ -147,6 +149,7 @@ export default {
...
@@ -147,6 +149,7 @@ export default {
name
:
'外观检查'
name
:
'外观检查'
}
}
],
],
index
:
0
,
id
:
''
,
id
:
''
,
modalTitle
:
''
,
modalTitle
:
''
,
subcontractorId
:
''
,
subcontractorId
:
''
,
...
@@ -189,6 +192,55 @@ export default {
...
@@ -189,6 +192,55 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
_backData
(
data
)
{
// this.formObj.code = data.code
// this.formObj.basis = data.name
// this.formObj.standardId = data.id
console
.
log
(
typeof
this
.
index
)
this
.
getPage
.
records
[
this
.
index
].
name
=
data
.
name
console
.
log
(
'返回的数据'
)
console
.
log
(
data
)
console
.
log
(
this
.
getPage
.
records
)
},
_selectjudgeBasis
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_getJudgeBasisList
(
data
)
{
const
obj
=
{
classify
:
0
}
if
(
data
)
{
obj
.
stdNum
=
data
}
// this.$store.dispatch('StandardInfo/list', obj).then(() => {
// this.judgeBasisData = this.$store.state.StandardInfo.list
// })
},
_judgeBasisChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
stdId
=
data
.
id
this
.
formObj
.
code
=
data
.
stdNum
this
.
formObj
.
name
=
data
.
name
this
.
$refs
.
formObj
.
validateField
(
'code'
)
break
case
'query'
:
this
.
formObj
.
stdId
=
''
this
.
formObj
.
code
=
data
.
stdNum
this
.
formObj
.
name
=
''
this
.
_getJudgeBasisList
(
data
.
stdNum
)
break
case
'focus'
:
this
.
_getJudgeBasisList
()
break
case
'blur'
:
if
(
this
.
formObj
.
stdId
===
''
)
{
this
.
formObj
.
code
=
''
this
.
_getJudgeBasisList
()
}
this
.
$refs
.
formObj
.
validateField
(
'code'
)
}
},
_add
()
{
_add
()
{
const
data
=
{
const
data
=
{
name
:
''
,
name
:
''
,
...
...
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