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
3103e905
Commit
3103e905
authored
Jun 19, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了合同评审添加
parent
948d669a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
665 additions
and
25 deletions
+665
-25
AutoCompletes.vue
components/base/AutoCompletes.vue
+37
-11
CityNameCascader.vue
components/base/CityNameCascader.vue
+1
-1
MeterContractReview.vue
pages/meter-contract/contract-review/MeterContractReview.vue
+19
-13
MeterContractReviewAddEdit.vue
...r-contract/contract-review/MeterContractReviewAddEdit.vue
+608
-0
No files found.
components/base/AutoCompletes.vue
View file @
3103e905
...
...
@@ -24,7 +24,7 @@
style=
"width:100%;"
>
<Input
v-model=
"
v
alue"
v-model=
"
dataV
alue"
:name=
"name"
:placeholder=
"placeholder"
:class=
"
{'iview-input-error':showError === ''}"
...
...
@@ -45,6 +45,17 @@
<
script
>
export
default
{
// props: [
// 'name',
// 'showKey',
// 'placeholder',
// 'downData',
// 'value',
// 'showError',
// 'blur',
// 'focus',
// 'handleObj'
// ],
props
:
{
name
:
null
,
showKey
:
null
,
...
...
@@ -59,20 +70,28 @@ export default {
},
data
()
{
return
{
selectObj
:
{}
selectObj
:
{}
,
// value: null
dataValue
:
this
.
value
,
dataHandObj
:
this
.
handleObj
// isFocus: false
}
},
watch
:
{
value
:
function
(
newVal
,
oldVal
)
{
console
.
log
(
newVal
)
this
.
dataValue
=
newVal
}
},
mounted
()
{},
methods
:
{
// 选择
_dropDown
(
data
)
{
this
.
$emit
(
'on-result-change'
,
'select'
,
data
,
this
.
handle
Obj
)
this
.
$emit
(
'on-result-change'
,
'select'
,
data
,
this
.
dataHand
Obj
)
if
(
this
.
showKey
)
{
this
.
v
alue
=
data
[
this
.
showKey
]
this
.
dataV
alue
=
data
[
this
.
showKey
]
}
else
{
this
.
v
alue
=
data
this
.
dataV
alue
=
data
}
this
.
selectObj
=
data
// this.isFocus = false;
...
...
@@ -81,23 +100,30 @@ export default {
_query
()
{
if
(
this
.
showKey
)
{
const
obj
=
{}
obj
[
this
.
showKey
]
=
this
.
v
alue
this
.
$emit
(
'on-result-change'
,
'query'
,
obj
,
this
.
handle
Obj
)
obj
[
this
.
showKey
]
=
this
.
dataV
alue
this
.
$emit
(
'on-result-change'
,
'query'
,
obj
,
this
.
dataHand
Obj
)
}
else
{
this
.
$emit
(
'on-result-change'
,
'query'
,
this
.
value
,
this
.
handleObj
)
this
.
$emit
(
'on-result-change'
,
'query'
,
this
.
dataValue
,
this
.
dataHandObj
)
// console.log(this.dataValue)
}
},
_inputBlur
()
{
if
(
this
.
v
alue
&&
this
.
blur
!==
undefined
)
{
if
(
this
.
dataV
alue
&&
this
.
blur
!==
undefined
)
{
// 失去焦点有值时触发
this
.
$emit
(
'on-result-change'
,
'blur'
,
''
,
this
.
handle
Obj
)
this
.
$emit
(
'on-result-change'
,
'blur'
,
''
,
this
.
dataHand
Obj
)
}
},
// 聚焦
_inputFocus
()
{
// this.isFocus = true;
console
.
log
(
'默认单位名'
,
this
.
value
,
this
.
dataValue
)
if
(
this
.
focus
!==
undefined
)
{
this
.
$emit
(
'on-result-change'
,
'focus'
,
''
,
this
.
handle
Obj
)
this
.
$emit
(
'on-result-change'
,
'focus'
,
''
,
this
.
dataHand
Obj
)
}
}
}
...
...
components/base/CityNameCascader.vue
View file @
3103e905
...
...
@@ -16,7 +16,7 @@
transfer
change-on-select
>
<Input
v-model=
"value"
v-model=
"value
.join(' ')
"
@
on-change=
"_clear"
placeholder=
"请选择省、市、区"
readonly
...
...
pages/meter-contract/contract-review/MeterContractReview.vue
View file @
3103e905
...
...
@@ -6,24 +6,24 @@
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"实验室名称:"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入实验室名称"
clearable
@
on-enter=
"_formSearch"
/>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入实验室名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"资质:"
>
<Input
v-model=
"formObj.aptitude"
name=
"aptitude"
placeholder=
"请输入资质"
clearable
@
on-enter=
"_formSearch"
/>
<Input
v-model=
"formObj.aptitude"
@
on-enter=
"_formSearch"
name=
"aptitude"
placeholder=
"请输入资质"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
@
on-result-change=
"_btnClick
"
></btn-list>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
class=
"contHide
"
></btn-list>
</Col>
<!--表格-->
<Col
span=
"24"
>
...
...
@@ -48,25 +48,31 @@
<FileManage
ref=
"FileManage"
></FileManage>
<MeterSendOperation
ref=
"operationModal"
></MeterSendOperation>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<MeterSubcontractorAddEdit
ref=
"addEditModal"
></MeterSubcontractorAddEdit>
</div>
</template>
<
script
>
import
{
meterContract
,
meterSubcontractor
}
from
'../../../api'
import
MeterSubcontractorEdit
from
'./MeterContractReviewEdit'
import
MeterSubcontractorAddEdit
from
'./MeterContractReviewAddEdit'
import
MeterSendOperation
from
'./MeterContractReviewOperation'
export
default
{
components
:
{
MeterSubcontractorEdit
,
MeterSendOperation
},
components
:
{
MeterSubcontractorEdit
,
MeterSendOperation
,
MeterSubcontractorAddEdit
},
data
()
{
return
{
currentComponent
:
''
,
formId
:
'meterSubcontractorFormId'
,
searchOpen
:
false
,
btn
:
[
//
{
//
type: 'success',
//
id: '',
// name: '提交
'
//
}
{
type
:
'success'
,
id
:
''
,
name
:
'添加
'
}
],
iconMsg
:
[
{
...
...
@@ -235,7 +241,7 @@ export default {
this
.
_getById
(
id
)
}
else
{
// 添加
this
.
$refs
.
editSubcontractor
Modal
.
_open
()
this
.
$refs
.
addEdit
Modal
.
_open
()
}
},
// 追加项目
...
...
pages/meter-contract/contract-review/MeterContractReviewAddEdit.vue
0 → 100644
View file @
3103e905
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"600"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
inline
>
<Form-item
label=
"委托单位"
prop=
"client"
style=
"width: 100%"
>
<AutoComplete
:value=
"formObj.client"
:down-data=
"customerData"
@
on-result-change=
"_cusNameChange"
name=
"client"
placeholder=
"请输入或选择委托单位"
></AutoComplete>
</Form-item>
<Form-item
label=
"项目、内容"
prop=
"person"
style=
"width: 100%"
>
<Input
v-model=
"formObj.person"
name=
"person"
placeholder=
"请输入项目或内容"
/>
</Form-item>
<Form-item
label=
"评审人员"
prop=
"tel"
style=
"width: 100%"
>
<Input
v-model=
"formObj.tel"
name=
"tel"
placeholder=
"请输入评审人员"
/>
</Form-item>
<Form-item
style=
"width: 100%;padding-left: 180px;"
>
<span
style=
"font-weight: bold"
>
评审内容
</span>
</Form-item>
<Form-item
label=
"检定/校准执行规程/规范:"
prop=
"requirements"
style=
"width: 100%"
>
<Input
v-model=
"formObj.fax"
:rows=
"3"
name=
"requirements"
type=
"textarea"
placeholder=
"请输入要求"
/>
</Form-item>
<Form-item
label=
"要求完成时间"
prop=
"odate"
style=
"width: 100%"
>
<Date-picker
@
on-change=
"_ctimeChange"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择要求完成时间"
></Date-picker>
</Form-item>
<Form-item
label=
"资质能否满足要求"
prop=
"street"
class=
"width-48"
>
<RadioGroup>
<Radio
:label=
"item.value"
v-for=
"item in menusList"
:key=
"item.name"
>
{{
item
.
name
}}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"设备及环境条件是否满足要求"
prop=
"street"
class=
"width-48"
>
<RadioGroup>
<Radio
:label=
"item.value"
v-for=
"item in menusList"
:key=
"item.name"
>
{{
item
.
name
}}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"规程/规范是否符合客户要求"
prop=
"street"
class=
"width-48"
>
<RadioGroup>
<Radio
:label=
"item.value"
v-for=
"item in menusList"
:key=
"item.name"
>
{{
item
.
name
}}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"人员是否具有能力"
prop=
"street"
class=
"width-48"
>
<RadioGroup>
<Radio
:label=
"item.value"
v-for=
"item in menusList"
:key=
"item.name"
>
{{
item
.
name
}}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"是否需要分包和分包方的能力评审"
prop=
"street"
class=
"width-48"
>
<RadioGroup>
<Radio
:label=
"item.value"
v-for=
"item in menusList"
:key=
"item.name"
>
{{
item
.
name
}}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"是否能在客户要求的时间内完成"
prop=
"street"
class=
"width-48"
>
<RadioGroup>
<Radio
:label=
"item.value"
v-for=
"item in menusList"
:key=
"item.name"
>
{{
item
.
name
}}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"其他问题的解决"
prop=
"remark"
style=
"width: 99.8%"
>
<Input
v-model=
"formObj.remark"
:rows=
"3"
name=
"remark"
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=
"请输入评审结论"
/>
</Form-item>
<Form-item
label=
"评审日期"
prop=
"odate"
style=
"width: 100%"
>
<Date-picker
@
on-change=
"_ctimeChange"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择评审"
></Date-picker>
</Form-item>
<Form-item
label=
"备注:"
prop=
"remark"
style=
"width: 99.8%"
>
<Input
v-model=
"formObj.remark"
:rows=
"3"
name=
"remark"
type=
"textarea"
placeholder=
"请输入备注"
/>
</Form-item>
</Form>
<!--操作-->
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<EditModal
ref=
"EditModal"
@
on-result-change=
"_backData"
is-change
/>
<importModal
ref=
"importModal"
@
on-result-change=
"_inputBack"
aptitude-item
></importModal>
</div>
</
template
>
<
script
>
/**
* 添加编辑分包商
*/
import
{
lmsBaseDict
,
meterEntrust
,
meterContract
}
from
'../../../api'
import
AutoComplete
from
'../../../components/base/AutoCompletes'
import
importModal
from
'../../../components/import/DownloadTemplateImport'
import
EditModal
from
'./EditModal'
export
default
{
components
:
{
EditModal
,
AutoComplete
,
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
:
''
,
name
:
'编辑'
},
{
type
:
'ios-clock'
,
id
:
''
,
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'
}
// {title: '限制范围或说明', key: 'limitDescription'},
],
options
:
[
{
name
:
'检定'
},
{
name
:
'校准'
},
{
name
:
'外观检查'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'success'
,
id
:
''
,
name
:
'导入'
}
],
id
:
''
,
modalTitle
:
''
,
subcontractorId
:
''
,
formObj
:
{
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
:
''
},
{
id
:
''
,
name
:
'通过'
,
type
:
'primary'
}
],
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
{
// 编辑的时候选择单位(互不影响)
alert
(
'编辑'
)
// this.cusName = data
// this.formObj.customer.cname = data
}
},
_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]
},
_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
.
_cancel
()
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
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form'
)
Object
.
assign
(
this
.
formObj
,
data
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加
const
saveData
=
this
.
formObj
saveData
.
sampleList
=
this
.
getPage
.
records
console
.
log
(
'saveData-------'
,
saveData
)
this
.
_save
(
saveData
)
}
else
{
// 编辑
// this._edit({ id: this.formObj.id, obj: data })
const
saveData
=
this
.
formObj
saveData
.
sampleList
=
this
.
getPage
.
records
this
.
_edit
(
saveData
)
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_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
.
_getList
()
this
.
getPage
.
records
=
[]
this
.
showModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
this
.
_hideLoading
()
this
.
id
=
''
this
.
modalTitle
=
'报价单编辑'
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
_showAddress
(
formObj
)
this
.
getPage
.
records
=
formObj
.
sampleList
},
_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
>
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