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
60fd52b9
Commit
60fd52b9
authored
Jul 25, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
21ce9f9b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
895 additions
and
19 deletions
+895
-19
meter-contract.js
api/meter/meter-contract.js
+2
-0
MeterContractRegisterEdit.vue
...-contract/contract-register/MeterContractRegisterEdit.vue
+58
-10
VerificationModal.vue
pages/meter-contract/contract-register/VerificationModal.vue
+190
-0
MeterContractReviewHis.vue
...meter-contract/contract-review/MeterContractReviewHis.vue
+51
-8
MeterContractReviewRecord.vue
...er-contract/contract-review/MeterContractReviewRecord.vue
+593
-0
MeterSendTestEdit.vue
pages/meter-entrust/send-test/MeterSendTestEdit.vue
+1
-1
No files found.
api/meter/meter-contract.js
View file @
60fd52b9
...
...
@@ -167,6 +167,8 @@ export default {
getReviewById
:
data
=>
http
.
get
(
'meter/v1/contract/review/'
+
data
).
then
(
res
=>
res
),
getReviewDTOById
:
data
=>
http
.
get
(
'meter/v1/contract/review_record/'
+
data
).
then
(
res
=>
res
),
getReviewRecordById
:
data
=>
http
.
get
(
'meter/v1/contract/review_record/'
+
data
).
then
(
res
=>
res
)
}
pages/meter-contract/contract-register/MeterContractRegisterEdit.vue
View file @
60fd52b9
...
...
@@ -44,10 +44,10 @@
<Input
v-model=
"formObj.discount"
name=
"discount"
placeholder=
"折扣"
/>
</Form-item>
<Form-item
label=
"检定/校准执行规程/规范:"
prop=
"requirements"
style=
"width: 99.8%"
>
<Input
v-model=
"formObj.requirements"
:rows=
"3"
name=
"requirements"
type=
"textarea"
placeholder=
"请输入检定/校准执行规程/规范"
/
>
</Form-item
>
<!--
<Form-item
label=
"检定/校准执行规程/规范:"
prop=
"requirements"
style=
"width: 99.8%"
>
--
>
<!--
<Input
v-model=
"formObj.requirements"
:rows=
"3"
name=
"requirements"
type=
"textarea"
--
>
<!-- placeholder="请输入检定/校准执行规程/规范"/>--
>
<!--
</Form-item>
--
>
<Form-item
label=
"备注:"
prop=
"remark"
style=
"width: 99.8%"
>
<Input
v-model=
"formObj.remark"
:rows=
"3"
name=
"remark"
type=
"textarea"
placeholder=
"请输入备注"
/>
...
...
@@ -84,6 +84,10 @@
></el-input>
<a
style=
"font-size: 18px;"
class=
""
@
on-result-change=
"_judgeBasisChange"
@
click=
"_selectjudgeBasis(scope.$rowIndex)"
>
+
</a>
</div>
<div
v-if=
"item.key==='verification'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.verification"
placeholder=
"请输入检定依据"
style=
"width: 85%"
></el-input>
<a
style=
"font-size: 18px;width: 15%"
class=
""
@
on-result-change=
"_judgeBasisChange"
@
click=
"_selectverification(scope.$rowIndex)"
>
+
</a>
</div>
<div
v-else-if=
"item.key==='spec'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.spec"
blur
placeholder=
"请输入或选择型号规格"
></el-input>
...
...
@@ -132,6 +136,7 @@
</Modal>
<EditModal
ref=
"EditModal"
is-change
@
on-result-change=
"_backData"
/>
<importModal
ref=
"importModal"
aptitude-item
@
on-result-change=
"_inputBack"
></importModal>
<VerificationModal
ref=
"VerificationModal"
@
on-result-change=
"_backVerification"
></VerificationModal>
</div>
</template>
<
script
>
...
...
@@ -143,9 +148,15 @@ import CityNameCascader from '../../../components/base/CityNameCascader'
import
AutoComplete
from
'../../../components/base/AutoCompletes'
import
importModal
from
'../../../components/import/DownloadTemplateImport'
import
EditModal
from
'./EditModal'
import
VerificationModal
from
'./VerificationModal'
export
default
{
components
:
{
CityNameCascader
,
EditModal
,
AutoComplete
,
importModal
},
components
:
{
CityNameCascader
,
EditModal
,
AutoComplete
,
importModal
,
VerificationModal
},
data
()
{
const
validateRemark
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
testedCityData
.
length
===
0
)
{
...
...
@@ -182,6 +193,7 @@ export default {
{
title
:
'名称'
,
key
:
'name'
,
width
:
180
},
{
title
:
'型号'
,
key
:
'spec'
},
{
title
:
'是否资质内可检'
,
key
:
'aptituded'
,
width
:
130
},
{
title
:
'检定/校准依据'
,
key
:
'verification'
,
width
:
200
},
{
title
:
'数量'
,
key
:
'quantity'
,
width
:
130
},
{
title
:
'技术参数'
,
key
:
'technicalParameter'
},
{
title
:
'生产厂家'
,
key
:
'manufacturer'
},
...
...
@@ -242,7 +254,31 @@ export default {
testedStreet
:
''
}
},
formObjPre
:
{
client
:
''
,
linkman
:
''
,
salesCode
:
''
,
tel
:
''
,
email
:
''
,
address
:
''
,
remark
:
''
,
province
:
''
,
city
:
''
,
county
:
''
,
requirements
:
''
,
discount
:
''
,
street
:
''
,
edate
:
''
,
odate
:
''
,
person
:
''
,
fax
:
''
,
testedTemp
:
{
testedProvince
:
''
,
testedCity
:
''
,
testedCounty
:
''
,
testedStreet
:
''
}
},
ruleValidate
:
{
client
:
[
{
...
...
@@ -346,6 +382,11 @@ export default {
this
.
$refs
.
formObj
.
validateField
(
'code'
)
}
},
_selectverification
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
this
.
$refs
.
VerificationModal
.
_open
()
},
_selectjudgeBasis
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
...
...
@@ -355,11 +396,17 @@ export default {
console
.
log
(
typeof
this
.
index
)
this
.
getPage
.
records
[
this
.
index
].
name
=
data
.
name
this
.
getPage
.
records
[
this
.
index
].
aptitudeId
=
data
.
id
this
.
getPage
.
records
[
this
.
index
].
verification
=
(
undefined
===
data
.
code
?
''
:
data
.
code
)
+
(
undefined
===
data
.
basis
?
''
:
data
.
basis
)
console
.
log
(
'返回的数据'
)
console
.
log
(
data
)
console
.
log
(
this
.
getPage
.
records
)
},
_backVerification
(
data
)
{
this
.
$forceUpdate
()
this
.
getPage
.
records
[
this
.
index
].
verification
=
data
.
verification
},
_inputBack
(
data
)
{
if
(
undefined
!==
data
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
...
...
@@ -563,13 +610,14 @@ export default {
},
_open
(
formObj
)
{
this
.
showModal
=
true
this
.
formObj
=
this
.
formObjPre
this
.
_getList
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
_emptyProvince
()
this
.
_hideLoading
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
getPage
.
records
=
[]
this
.
id
=
''
this
.
id
=
undefined
this
.
modalTitle
=
'合同新增'
}
else
{
this
.
id
=
formObj
.
id
...
...
@@ -633,7 +681,7 @@ export default {
]
this
.
formObj
.
province
=
result
[
0
].
province
this
.
formObj
.
city
=
result
[
0
].
city
this
.
formObj
.
county
=
result
[
0
].
county
this
.
formObj
.
county
=
result
[
0
].
area
}
},
_getAptitudeList
:
async
function
()
{
...
...
pages/meter-contract/contract-register/VerificationModal.vue
0 → 100644
View file @
60fd52b9
<
template
>
<div>
<Modal
v-model=
"showUserGroupModal"
width=
"800"
>
<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
:data=
"getPage"
@
row-click=
"_rowChange"
@
row-dblclick=
"_dbClick"
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
{
meterAptitude
}
from
'../../../api'
export
default
{
name
:
'EditModal'
,
data
()
{
return
{
formObj
:
{
name
:
undefined
,
code
:
undefined
},
loading
:
true
,
pageParams
:
{
rows
:
20
},
pageColumns
:
[
{
title
:
'检定依据'
,
key
:
'verification'
,
width
:
120
},
{
title
:
'检定依据名称'
,
key
:
'name'
,
width
:
140
}
// { title: '传真', key: 'fax', width: 120 },
// { title: '详细地址', key: 'address', width: 250 },
// { title: '登记日期', key: 'edate', width: 120, date: true },
// { title: '要求完成时间', key: 'odate', width: 120, date: true },
// { title: '折扣', key: 'discount', width: 120 },
// { title: '总价', key: 'totalPrice', width: 120 },
// { title: '折扣价', key: 'discountPrice', width: 120 },
// { title: '备注', key: 'remark' }
],
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
meterAptitude
.
page
(
this
.
formObj
)
if
(
result
)
{
this
.
getPage
=
result
.
records
console
.
log
(
this
.
getPage
)
for
(
let
i
=
0
;
i
<
this
.
getPage
.
length
;
i
++
)
{
this
.
getPage
[
i
].
verification
=
this
.
getPage
[
i
].
code
+
this
.
getPage
[
i
].
name
}
this
.
loading
=
false
}
},
_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-contract/contract-review/MeterContractReviewHis.vue
View file @
60fd52b9
...
...
@@ -49,6 +49,7 @@
<MeterReviewHisHisOperation
ref=
"operationModal"
></MeterReviewHisHisOperation>
<FileManage
ref=
"FileManage"
></FileManage>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<MeterContractReviewAddEdit
ref=
"addEditModal"
@
on-result-change=
"_page"
></MeterContractReviewAddEdit>
</div>
</template>
<
script
>
...
...
@@ -56,8 +57,13 @@ import http from '../../../api/http'
import
{
meterContract
,
meterSubcontractor
}
from
'../../../api'
import
MeterReviewHisHisOperation
from
'../../../components/operation/Operation'
import
MeterSubcontractorEdit
from
'./MeterContractReviewEdit'
import
MeterContractReviewAddEdit
from
'./MeterContractReviewRecord'
export
default
{
components
:
{
MeterSubcontractorEdit
,
MeterReviewHisHisOperation
},
components
:
{
MeterSubcontractorEdit
,
MeterReviewHisHisOperation
,
MeterContractReviewAddEdit
},
data
()
{
return
{
currentComponent
:
''
,
...
...
@@ -73,6 +79,11 @@ export default {
type
:
'success'
,
id
:
'meter-contract-review-his-export'
,
name
:
'导出项目统计表'
},
{
type
:
'success'
,
id
:
''
,
name
:
'导出合同评审记录'
}
],
iconMsg
:
[
...
...
@@ -92,9 +103,9 @@ export default {
name
:
'附件'
},
{
type
:
'md-
remove-circl
e'
,
id
:
'
meter-contract-review-his-remove-operation
'
,
name
:
'
删除
'
type
:
'md-
creat
e'
,
id
:
''
,
name
:
'
评审记录
'
},
{
type
:
'ios-clock'
,
...
...
@@ -147,6 +158,9 @@ export default {
case
'导出项目统计表'
:
this
.
_exportContractTable
()
break
case
'导出合同评审记录'
:
this
.
_exportContractReviewRecord
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
...
...
@@ -155,10 +169,10 @@ export default {
},
_exportContractTable
()
{
//
if (this.selectIds.length === 0) {
//
this.$Message.warning('请选择要导出的数据!')
//
return false
//
}
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择要导出的数据!'
)
return
false
}
const
sampleIds
=
this
.
selectIds
.
join
(
','
)
const
data
=
this
.
formObj
data
.
idsStr
=
sampleIds
...
...
@@ -173,6 +187,22 @@ export default {
}
})
},
_exportContractReviewRecord
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择要导出的数据!'
)
return
false
}
const
sampleIds
=
this
.
selectIds
.
join
(
','
)
const
data
=
this
.
formObj
data
.
idsStr
=
sampleIds
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出数据?'
,
onOk
:
()
=>
{
http
.
open
(
'/meter/v1/contract/export_contract_review_record/'
,
data
)
}
})
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
...
...
@@ -193,9 +223,22 @@ export default {
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
case
'评审记录'
:
this
.
_reviewContract
(
data
.
id
)
break
}
})
},
// 编辑&添加
_reviewContract
(
id
)
{
this
.
_getContractReview
(
id
)
},
_getContractReview
:
async
function
(
id
)
{
const
result
=
await
meterContract
.
getReviewDTOById
(
id
)
if
(
result
)
{
this
.
$refs
.
addEditModal
.
_openEdit
(
result
)
}
},
_record
(
id
)
{
this
.
$refs
.
operationModal
.
_open
(
id
)
},
...
...
pages/meter-contract/contract-review/MeterContractReviewRecord.vue
0 → 100644
View file @
60fd52b9
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"1000"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"110"
label-position=
"left"
inline
>
<Form-item
label=
"委托单位"
prop=
"client"
style=
"width: 100%;margin-bottom: 5px;"
>
<Input
v-model=
"formObj.client"
name=
"content"
readonly
/>
</Form-item>
<Form-item
label=
"项目、内容"
prop=
"content"
style=
"width: 100%;margin-bottom: 5px;"
>
<Input
v-model=
"formObj.content"
:rows=
"3"
type=
"textarea"
name=
"content"
readonly
/>
</Form-item>
<Form-item
label=
"检定/校准执行规程/规范:"
prop=
"requirements"
style=
"width: 100%;margin-bottom: 5px;"
>
<Input
v-model=
"formObj.requirements"
:rows=
"2"
readonly
name=
"requirements"
type=
"textarea"
placeholder=
"请输入要求"
/>
</Form-item>
<Form-item
label=
"要求完成时间"
prop=
"odate"
style=
"width: 100%;margin-bottom: 5px;"
>
<span>
{{
formObj
.
odate
?
$dateformat
(
formObj
.
odate
,
'yyyy-mm-dd'
):
''
}}
</span>
</Form-item>
<Form-item
label=
"资质能否满足要求"
prop=
"operation.aptituded"
class=
"width-48"
style=
"margin-bottom: 0px;"
>
<span
>
{{
formObj
.
operation
.
aptituded
===
1
?
"是"
:
"否"
}}
</span>
</Form-item>
<Form-item
label=
"设备及环境条件是否满足要求"
prop=
"operation.environmented"
class=
"width-48"
style=
"margin-bottom: 0px;"
>
<span
>
{{
formObj
.
operation
.
environmented
===
1
?
"是"
:
"否"
}}
</span>
</Form-item>
<Form-item
label=
"规程/规范是否符合客户要求"
prop=
"operation.standarded"
class=
"width-48"
style=
"margin-bottom: 0px;"
>
<span
>
{{
formObj
.
operation
.
standarded
===
1
?
"是"
:
"否"
}}
</span>
</Form-item>
<Form-item
label=
"人员是否具有能力"
prop=
"operation.capable"
class=
"width-48"
style=
"margin-bottom: 0px;"
>
<span
>
{{
formObj
.
operation
.
capable
===
1
?
"是"
:
"否"
}}
</span>
</Form-item>
<Form-item
label=
"是否需要分包和分包方的能力评审"
prop=
"operation.subcontracted"
class=
"width-48"
style=
"margin-bottom: 0px;"
>
<span
>
{{
formObj
.
operation
.
subcontracted
===
1
?
"是"
:
"否"
}}
</span>
</Form-item>
<Form-item
label=
"是否能在客户要求的时间内完成"
prop=
"operation.completed"
class=
"width-48"
style=
"margin-bottom: 0px;"
>
<span
>
{{
formObj
.
operation
.
completed
===
1
?
"是"
:
"否"
}}
</span>
</Form-item>
<Form-item
label=
"其他问题的解决"
prop=
"operation.otherQuestions"
style=
"width: 99.8%;margin-bottom: 5px;"
>
<Input
v-model=
"formObj.operation.otherQuestions"
:rows=
"2"
name=
"other"
type=
"textarea"
placeholder=
"请输入解决的问题"
/>
</Form-item>
<Form-item
label=
"评审结论"
prop=
"operation.reviewConclusion"
style=
"width: 99.8%;margin-bottom: 5px;"
>
<Input
v-model=
"formObj.operation.reviewConclusion"
:rows=
"2"
name=
"verdict"
readonly
type=
"textarea"
placeholder=
"请输入评审结论"
/>
</Form-item>
<Form-item
label=
"备注:"
prop=
"operation.remark"
style=
"width: 99.8%;margin-bottom: 5px;"
>
<Input
v-model=
"formObj.operation.remark"
:rows=
"2"
readonly
type=
"textarea"
name=
"remark"
placeholder=
"请输入备注"
/>
</Form-item>
</Form>
<!--操作-->
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<importModal
ref=
"importModal"
aptitude-item
@
on-result-change=
"_inputBack"
></importModal>
</div>
</
template
>
<
script
>
/**
* 添加编辑分包商
*/
import
{
lmsBaseDict
,
meterEntrust
,
meterContract
}
from
'../../../api'
import
importModal
from
'../../../components/import/DownloadTemplateImport'
export
default
{
components
:
{
importModal
},
data
()
{
const
validateRemark
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
testedCityData
.
length
===
0
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validateClient
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
client
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
return
{
formId
:
'meterSendTestEditFormId'
,
getPage
:
{
records
:
[]
},
menusList
:
[{
name
:
'是'
,
value
:
'1'
},
{
name
:
'否'
,
value
:
'0'
}],
searchOpen
:
false
,
customerData
:
[],
cityData
:
[],
testedCityData
:
[],
judgeType
:
[{
value
:
1
,
name
:
'是'
},
{
value
:
0
,
name
:
'否'
}],
iconMsg
:
[
{
type
:
'ios-clock'
,
id
:
'review-meter-contract-review-add-edit-edit-o'
,
name
:
'编辑'
},
{
type
:
'ios-clock'
,
id
:
'review-meter-contract-review-add-edit-remove-o'
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'型号'
,
key
:
'spec'
},
{
title
:
'数量'
,
key
:
'quantity'
},
{
title
:
'技术参数'
,
key
:
'technicalParameter'
},
{
title
:
'生产厂家'
,
key
:
'manufacturer'
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'上次检定校准日期'
,
key
:
'lastTime'
,
date
:
true
},
{
title
:
'收费单位'
,
key
:
'unit'
},
{
title
:
'单价/元'
,
key
:
'price'
},
{
title
:
'总价/元'
,
key
:
'totalPrice'
},
{
title
:
'备注'
,
key
:
'remark'
}
],
options
:
[],
btn
:
[],
contractId
:
''
,
modalTitle
:
''
,
subcontractorId
:
''
,
formObj
:
{
operation
:
{},
reviewTime
:
''
,
otherQuestions
:
''
,
completed
:
''
,
subcontracted
:
''
,
capable
:
''
,
environmented
:
''
,
aptituded
:
''
,
standarded
:
''
,
reviewConclusion
:
''
,
contractId
:
''
,
client
:
''
,
linkman
:
''
,
tel
:
''
,
email
:
''
,
address
:
''
,
remark
:
''
,
province
:
''
,
city
:
''
,
county
:
''
,
requirements
:
''
,
discount
:
''
,
street
:
''
,
edate
:
''
,
odate
:
''
,
person
:
''
,
fax
:
''
,
testedTemp
:
{
testedProvince
:
''
,
testedCity
:
''
,
testedCounty
:
''
,
testedStreet
:
''
}
},
ruleValidate
:
{
client
:
[
{
required
:
true
,
message
:
'委托单位不能为空'
,
validator
:
validateClient
,
trigger
:
'blur'
}
],
// person: [
// { required: true, message: '联系人不能为空', trigger: 'blur' }
// ],
// tel: [{ required: true, message: '联系电话不能为空', trigger: 'blur' }],
testedCityData
:
[
{
required
:
true
,
message
:
'省市区不能为空'
,
validator
:
validateRemark
,
trigger
:
'blur'
}
]
},
clearingWayList
:
[
'款到后测试'
,
'先测试后付款'
,
'其他情况()'
],
clearingWayListTemp
:
[
'款到后测试'
,
'先测试后付款'
,
'其他情况()'
],
showModal
:
false
,
footerList
:
[{
id
:
''
,
name
:
'关闭'
,
type
:
''
}],
aptitudeData
:
[]
}
},
// created() {
// this.$set(
// this.formObj,
// 'tested',
// JSON.parse(JSON.stringify(this.testedTemp))
// )
// },
methods
:
{
_cusNameChange
(
msg
,
data
)
{
// this.financeObj = {} // 清空维护发票信息的数据
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加的时候选择单位
switch
(
msg
)
{
case
'select'
:
this
.
_customerMatch
(
data
)
break
case
'query'
:
this
.
_cusNameQuery
(
data
)
break
}
}
else
{
}
},
_customerMatch
(
data
)
{
this
.
_getQueryList
(
data
)
console
.
log
(
data
)
},
_cusNameQuery
(
query
)
{
this
.
formObj
.
client
=
query
console
.
log
(
query
)
},
_ctimeChange
(
data
)
{
console
.
log
(
'时间'
,
data
)
this
.
formObj
.
odate
=
data
// this.formObj.ctimeBegin = data[0]
// this.formObj.ctimeEnd = data[1]
},
_reviewTime
(
data
)
{
console
.
log
(
'时间'
,
data
)
this
.
formObj
.
reviewTime
=
data
// this.formObj.ctimeBegin = data[0]
// this.formObj.ctimeEnd = data[1]
},
_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'
)
}
},
_selectjudgeBasis
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_backData
(
data
)
{
console
.
log
(
typeof
this
.
index
)
this
.
getPage
.
records
[
this
.
index
].
name
=
data
.
name
this
.
getPage
.
records
[
this
.
index
].
aptitudeId
=
data
.
id
console
.
log
(
'返回的数据'
)
console
.
log
(
data
)
console
.
log
(
this
.
getPage
.
records
)
},
_inputBack
(
data
)
{
if
(
undefined
!==
data
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
getPage
.
records
.
push
(
data
[
i
])
}
}
},
_add
()
{
const
data
=
{
name
:
''
,
spec
:
''
,
factoryNumber
:
''
,
quantity
:
''
,
type
:
''
}
this
.
getPage
.
records
.
unshift
(
data
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
// this.getPage = this.$store.state.FoodJudgeBasis.page
break
case
'selectIds'
:
// this.selectIds = data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
rowIndex
)
break
}
},
_btnClick
(
msg
)
{
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'导入'
:
this
.
_import
()
break
case
'添加'
:
this
.
_add
()
break
case
'提交'
:
this
.
_submitToReview
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_import
()
{
const
data
=
{
importUrl
:
'/meter/v1/sample_quote/import'
,
downloadUrl
:
'/food/v1/excel/template/FoodAptitudeItem'
,
title
:
'导入'
}
this
.
$refs
.
importModal
.
_open
(
data
,
'资质项目管理导入'
)
},
// 省 市 区
_cascaderResult
(
name
,
data
,
msg
)
{
switch
(
name
)
{
case
'cus'
:
this
.
_casChange
(
data
,
msg
)
break
case
'tested'
:
this
.
_testedChange
(
data
,
msg
)
break
}
},
_emptyProvince
()
{
this
.
cityData
=
[]
this
.
testedCityData
=
[]
// this.formObj.tested.testedProvince = ''
// this.formObj.tested.testedCity = ''
// this.formObj.tested.testedCounty = ''
// this.formObj.testedTemp.testedProvince = ''
// this.formObj.testedTemp.testedCity = ''
// this.formObj.testedTemp.testedCounty = ''
},
_testedChange
(
data
,
msg
)
{
// 省、市、区
if
(
msg
===
'clear'
)
{
// this.formObj.tested.testedProvince = ''
// this.formObj.tested.testedCity = ''
// this.formObj.tested.testedCounty = ''
this
.
formObj
.
testedTemp
.
testedProvince
=
''
this
.
formObj
.
testedTemp
.
testedCity
=
''
this
.
formObj
.
testedTemp
.
testedCounty
=
''
this
.
formObj
.
province
=
''
this
.
formObj
.
city
=
''
this
.
formObj
.
county
=
''
this
.
testedCityData
=
[]
}
else
{
// this.formObj.tested.testedProvince = data.value[0]
// this.formObj.tested.testedCity = data.value[1]
// this.formObj.tested.testedCounty = data.value[2]
this
.
formObj
.
province
=
data
.
value
[
0
]
this
.
formObj
.
city
=
data
.
value
[
1
]
this
.
formObj
.
county
=
data
.
value
[
2
]
this
.
testedCityData
=
[
data
.
value
[
0
],
data
.
value
[
1
],
data
.
value
[
2
]]
}
},
_iconClick
(
res
,
data
,
index
)
{
switch
(
res
)
{
case
'编辑'
:
// this._editModal(true, data.id)
break
case
'删除'
:
// this._deleteById(data.id)
console
.
log
(
'点击了删除按钮'
)
console
.
log
(
index
)
this
.
getPage
.
records
.
splice
(
index
,
1
)
break
case
'操作日志'
:
// this._record(data.id)
break
}
},
_selectAptitude
(
data
)
{
console
.
log
(
data
)
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'驳回'
:
this
.
_back
()
break
case
'关闭'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
this
.
showModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
},
_ok
()
{
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
)
},
_back
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form'
)
Object
.
assign
(
this
.
formObj
,
data
)
// 添加
const
updateData
=
this
.
formObj
updateData
.
contractId
=
this
.
contractId
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要把这条记录评审驳回?'
,
onOk
:
()
=>
{
this
.
_contractReviewBack
(
updateData
)
}
})
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_contractReviewBack
:
async
function
(
data
)
{
const
result
=
await
meterContract
.
contractReviewBack
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'评审驳回成功!'
)
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_contractReviewPass
:
async
function
(
data
)
{
console
.
log
(
'--_contractReviewPass--'
,
data
)
const
result
=
await
meterContract
.
passContractReview
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'评审通过成功!'
)
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_wayResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
clearingWay
=
data
break
case
'query'
:
this
.
formObj
.
clearingWay
=
data
this
.
_wayQuery
(
data
)
break
}
},
_wayQuery
(
query
)
{
if
(
query
===
''
)
{
this
.
clearingWayList
=
this
.
clearingWayListTemp
}
else
{
this
.
clearingWayList
=
this
.
clearingWayListTemp
.
filter
(
item
=>
item
.
indexOf
(
query
)
>
-
1
)
}
},
_cancel
()
{
this
.
showModal
=
false
},
_open
(
formObj
)
{
this
.
showModal
=
true
this
.
_getList
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
_emptyProvince
()
this
.
_hideLoading
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
getPage
.
records
=
[]
this
.
id
=
''
this
.
modalTitle
=
'合同/协议评审记录添加'
}
else
{
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
modalTitle
=
'合同评审'
this
.
_showTime
(
formObj
)
}
},
_openEdit
(
formObj
)
{
this
.
showModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
this
.
_hideLoading
()
this
.
contractId
=
formObj
.
id
this
.
modalTitle
=
'合同评审'
this
.
formObj
.
contractId
=
formObj
.
id
this
.
formObj
=
formObj
this
.
_showAddress
(
formObj
)
},
_showAddress
(
formObj
)
{
this
.
testedCityData
=
[]
if
(
formObj
.
province
!==
undefined
&&
formObj
.
city
!==
undefined
&&
formObj
.
county
!==
undefined
)
{
this
.
testedCityData
.
push
(
formObj
.
province
)
this
.
testedCityData
.
push
(
formObj
.
city
)
this
.
testedCityData
.
push
(
formObj
.
county
)
}
},
_getList
:
async
function
()
{
const
result
=
await
meterEntrust
.
pageList
()
const
list
=
[]
console
.
log
(
'result'
,
result
)
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
log
(
result
[
i
].
cname
)
list
.
push
(
result
[
i
].
cname
)
}
console
.
log
(
'委托单位名单'
,
list
)
this
.
customerData
=
list
}
},
_getQueryList
:
async
function
(
data
)
{
const
result
=
await
meterEntrust
.
pageQueryList
(
data
)
console
.
log
(
result
)
if
(
result
)
{
this
.
formObj
.
client
=
data
this
.
formObj
.
person
=
result
[
0
].
contact
this
.
formObj
.
tel
=
result
[
0
].
mobile
this
.
formObj
.
fax
=
result
[
0
].
fax
this
.
testedCityData
=
[
result
[
0
].
province
,
result
[
0
].
city
,
result
[
0
].
area
]
}
},
_getAptitudeList
:
async
function
()
{
const
result
=
await
lmsBaseDict
.
getItem
(
'subcontractorAptitude'
)
if
(
result
)
{
this
.
aptitudeData
=
result
}
},
_showTime
(
formObj
)
{
// 回显资质类型
},
_save
:
async
function
(
data
)
{
const
result
=
await
meterContract
.
addQuote
(
data
)
console
.
log
(
result
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
meterEntrust
.
editDTO
(
data
)
console
.
log
(
'修改后'
)
console
.
log
(
result
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
}
}
}
</
script
>
pages/meter-entrust/send-test/MeterSendTestEdit.vue
View file @
60fd52b9
...
...
@@ -225,7 +225,7 @@ export default {
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
200
},
{
title
:
'型号规格'
,
key
:
'spec'
},
{
title
:
'检定依据'
,
key
:
'verification'
,
width
:
200
},
{
title
:
'检定
/校准
依据'
,
key
:
'verification'
,
width
:
200
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'制造单位'
,
key
:
'manufacturer'
},
{
title
:
'检测类型'
,
key
:
'type'
},
...
...
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