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
71c4c857
Commit
71c4c857
authored
Jul 06, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
85b8ffff
bbc85f4b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
478 additions
and
13 deletions
+478
-13
meter-sample.js
api/meter/meter-sample.js
+11
-0
CityNameCascader.vue
components/base/CityNameCascader.vue
+0
-1
PTVXETable.vue
components/table/PTVXETable.vue
+0
-4
MeterCertificateIssue.vue
pages/meter-certificate/issue/MeterCertificateIssue.vue
+32
-1
MeterCannotSubHis.vue
pages/meter-subcontract/cannot-sub/MeterCannotSubHis.vue
+23
-7
MeterCannotSubSampleManage.vue
...ter-subcontract/cannot-sub/MeterCannotSubSampleManage.vue
+412
-0
No files found.
api/meter/meter-sample.js
View file @
71c4c857
...
...
@@ -8,6 +8,8 @@ import { https } from '../https'
export
default
{
// page
page
:
data
=>
http
.
post
(
'meter/v1/sample/page'
,
data
).
then
(
res
=>
res
),
pageSubSample
:
data
=>
http
.
post
(
'/meter/v1/sub_sample/page'
,
data
).
then
(
res
=>
res
),
pageSampleProgress
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_progress'
,
data
).
then
(
res
=>
res
),
...
...
@@ -178,6 +180,15 @@ export default {
data
.
reason
)
.
then
(
res
=>
res
),
reportIssueBack
:
data
=>
http
.
post
(
'meter/v1/sample/report_issue_back?ids='
+
data
.
ids
+
'&reason='
+
data
.
reason
)
.
then
(
res
=>
res
),
certificateOk
:
data
=>
http
...
...
components/base/CityNameCascader.vue
View file @
71c4c857
...
...
@@ -47,7 +47,6 @@ export default {
_getProvince
:
async
function
(
data
)
{
// 获取省份
const
result
=
await
meterEntrust
.
getProvince
()
console
.
log
(
result
)
// this.$store.dispatch('SysProvince/getProvince').then(() => {
// const result = this.$store.state.SysProvince.list
const
casData
=
[]
...
...
components/table/PTVXETable.vue
View file @
71c4c857
...
...
@@ -140,10 +140,6 @@ export default {
this
.
_loadData
(
newVal
)
}
},
mounted
()
{
console
.
log
(
'按钮'
)
console
.
log
(
this
.
iconMsg
)
},
methods
:
{
_loadData
(
data
)
{
// 阻断 vue 对大数组的双向绑定,大数据性能翻倍提升
...
...
pages/meter-certificate/issue/MeterCertificateIssue.vue
View file @
71c4c857
...
...
@@ -58,6 +58,7 @@
</div>
<operationModal
ref=
"operationModal"
></operationModal>
<FileManage
ref=
"FileManage"
></FileManage>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
></Reason>
<!--编辑证书-->
...
...
@@ -67,10 +68,11 @@
</template>
<
script
>
import
{
meterSample
}
from
'../../../api'
import
Reason
from
'../../../components/base/Reason'
import
operationModal
from
'../../../components/operation/Operation'
import
CertificateMakeLook
from
'../../meter-certificate/CertificateMakeLook'
export
default
{
components
:
{
operationModal
,
CertificateMakeLook
},
components
:
{
operationModal
,
Reason
,
CertificateMakeLook
},
data
()
{
return
{
currentComponent
:
''
,
...
...
@@ -131,6 +133,10 @@ export default {
this
.
_page
()
},
methods
:
{
_resultRecord
()
{
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -153,6 +159,31 @@ export default {
}
})
},
_goBack
()
{
// 退回
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条委托!'
)
}
else
{
this
.
$refs
.
reasonModal
.
_open
(
'退回原因'
)
}
},
_reasonResult
(
data
)
{
if
(
undefined
!==
data
&&
data
!==
''
)
{
this
.
_reportIssueBack
(
data
)
}
console
.
log
(
data
)
},
_reportIssueBack
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
reportIssueBack
({
ids
:
this
.
selectIds
,
reason
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
_submitToReview
()
{
this
.
_submitByContractIds
()
},
...
...
pages/meter-subcontract/cannot-sub/MeterCannotSubHis.vue
View file @
71c4c857
...
...
@@ -6,21 +6,21 @@
<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.client"
name=
"client"
placeholder=
"请输入委托单位"
clearable
@
on-enter=
"_formSearch"
/>
<Input
v-model=
"formObj.client"
@
on-enter=
"_formSearch"
name=
"client"
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"
>
...
...
@@ -44,14 +44,16 @@
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<MeterSampleManage
ref=
"meterSampleManageModal"
@
on-result-change=
"_page"
></MeterSampleManage>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
</div>
</template>
<
script
>
import
{
meterSubContract
,
meterSubcontractor
}
from
'../../../api'
import
MeterSampleManage
from
'./MeterCannotSubSampleManage'
import
MeterSubcontractorEdit
from
'./MeterCannotSubEdit'
export
default
{
components
:
{
MeterSubcontractorEdit
},
components
:
{
MeterSubcontractorEdit
,
MeterSampleManage
},
data
()
{
return
{
currentComponent
:
''
,
...
...
@@ -69,7 +71,14 @@ export default {
// name: '提交'
// }
],
iconMsg
:
[{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}],
iconMsg
:
[
{
type
:
'md-flask'
,
id
:
''
,
name
:
'查看样品'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}
],
formObj
:
{
client
:
undefined
},
...
...
@@ -137,6 +146,9 @@ export default {
case
'附件'
:
this
.
_upload
(
data
.
id
)
break
case
'查看样品'
:
this
.
_sampleManage
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
...
...
@@ -146,6 +158,10 @@ export default {
}
})
},
_sampleManage
(
data
)
{
// 管理样品
this
.
$refs
.
meterSampleManageModal
.
_open
(
data
)
},
_submitToReview
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
...
...
pages/meter-subcontract/cannot-sub/MeterCannotSubSampleManage.vue
0 → 100644
View file @
71c4c857
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1200"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"formId"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"样品名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品名称"
clearable
/>
</Form-item>
<Form-item
label=
"样品编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.code"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
style=
"margin-left: -10px"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
><a
@
click
.
stop=
"_detailModal(scope.row.id)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a></div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='jobOut'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</div>
<div
v-else-if=
"item.key==='type'"
>
<span
v-if=
"scope.row[item.key]===0"
>
检定
</span>
<span
v-if=
"scope.row[item.key]===1"
>
校准
</span>
<span
v-if=
"scope.row[item.key]===2"
>
外观检查
</span>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</Modal>
<!-- <importModal ref="importModal" @on-result-change="_page"></importModal>-->
<!-- <MeterSampleManageEdit ref="sampleEditModal" @on-result-change="_page"></MeterSampleManageEdit>-->
<!-- <MeterSampleHisEdit ref="meterSampleEditModal" @on-result-change="_page"></MeterSampleHisEdit>-->
</div>
</template>
<
script
>
import
{
meterSample
}
from
'../../../api'
// import importModal from '../contract-tab/ContractTab'
// import MeterSampleManageEdit from './MeterItemManage'
// import MeterSampleHisEdit from './MeterSampleHisEdit'
export
default
{
components
:
{
// MeterSampleManageEdit,
// MeterSampleHisEdit,
// importModal
// FoodSampleGovernDetail,
// CopyModal,
// FoodSampleGovernLYEdits
},
data
()
{
return
{
currentComponent
:
''
,
searchOpen
:
false
,
iconMsg
:
[
// { type: 'ios-flask-outline', id: '', name: '管理检测项目' }
],
btn
:
[
// {
// type: 'success',
// id: '',
// name: '追加样品'
// }
// {
// type: 'success',
// id: '',
// name: '新增'
// },
// {
// type: 'success',
// id: '',
// name: '导入样品'
// },
// {
// type: 'success',
// id: '',
// name: '分包'
// },
// {
// type: 'success',
// id: '',
// name: '取消分包'
// },
// {
// type: 'success',
// id: '',
// name: '导入检测项目'
// }
],
options
:
[
{
name
:
'检定'
},
{
name
:
'校准'
},
{
name
:
'外观检查'
}
],
formId
:
'meterReviewSampleManageFormId'
,
showModal
:
false
,
modalTitle
:
'管理样品'
,
selectIds
:
[],
selectData
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
140
},
{
title
:
'检测项目'
,
key
:
'itemNames'
,
width
:
140
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
,
width
:
140
},
{
title
:
'是否分包'
,
key
:
'jobOut'
,
width
:
110
},
{
title
:
'检测类型'
,
key
:
'type'
,
width
:
140
},
{
title
:
'数量'
,
key
:
'quantity'
,
width
:
140
}
],
dateList
:
[],
formObj
:
{
subContractId
:
undefined
,
name
:
undefined
,
code
:
undefined
,
type
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_dateChange
(
data
)
{
this
.
formObj
.
ctimeBegin
=
data
[
0
]
this
.
formObj
.
ctimeEnd
=
data
[
1
]
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'追加样品'
:
this
.
_addSample
(
this
.
formObj
.
entrustId
)
break
case
'取消分包'
:
this
.
_subpackageCancelBtn
()
break
case
'新增'
:
this
.
_addSample
(
this
.
formObj
.
entrustId
)
break
case
'导入样品'
:
this
.
_importSample
(
this
.
formObj
.
entrustId
)
break
case
'分包'
:
this
.
_subpackageSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
}
})
},
_addSample
(
entrustId
)
{
this
.
$refs
.
meterSampleEditModal
.
_open
(
entrustId
)
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'管理检测项目'
:
this
.
_sampleEditModal
(
data
)
break
case
'编辑'
:
localStorage
.
setItem
(
'type'
,
data
.
type
)
if
(
data
.
type
===
2
)
{
this
.
_editLY
(
data
.
id
)
// 粮油的编辑页
}
else
{
this
.
_editModal
(
true
,
data
.
id
)
}
break
case
'复制'
:
this
.
_copy
(
data
.
id
,
data
.
type
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'检测项目'
:
this
.
_itemDetail
(
data
.
id
)
break
}
})
},
_subpackageCancelBtn
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
const
data
=
{}
data
.
ids
=
this
.
selectIds
.
join
(
','
)
this
.
_subpackageCancel
(
data
)
}
},
_subpackageCancel
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
meterSample
.
subpackageCancel
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'取消成功!'
)
await
this
.
_page
()
}
},
_sampleEditModal
(
data
)
{
this
.
$refs
.
sampleEditModal
.
_open
(
data
.
id
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectData'
:
const
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_open
(
id
)
{
this
.
formObj
.
subContractId
=
id
this
.
showModal
=
true
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterSample
.
pageSubSample
(
this
.
formObj
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/deleteByIds'
,
ids
).
then
(()
=>
{
this
.
_resultChange
(
'删除成功!'
)
})
}
})
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
id
)
{
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$nextTick
(
function
()
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
},
_editModal
(
edit
,
id
)
{
this
.
currentComponent
=
'FoodSampleGovernEdit'
this
.
$nextTick
(
function
()
{
if
(
edit
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
)
})
}
else
{
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
)
}
})
},
_editLY
(
id
)
{
// 粮油的编辑
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$nextTick
(
function
()
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
)
})
})
},
_search
()
{
this
.
_page
()
},
_searchParams
()
{
const
data
=
this
.
$serialize
(
'search-sample-govern'
)
return
this
.
$extend
(
data
,
this
.
pageParams
)
},
_resultChange
(
msg
)
{
if
(
this
.
$store
.
state
.
FoodSample
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
}
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/meter/v1/sample/import_'
+
this
.
formObj
.
entrustId
,
downloadUrl
:
'/meter/v1/excel/template/MeterSampleImport'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
importModal
.
_open
(
this
.
selectIds
,
this
.
selectData
[
0
])
}
},
_subpackageSample
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品进行分包!'
)
return
false
}
else
{
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
if
(
this
.
selectData
[
i
].
jobOut
===
1
)
{
this
.
$Message
.
warning
(
'样品编号为'
+
this
.
selectData
[
i
].
code
+
'已经分包了,请选择未分包的样品!'
)
return
false
}
}
this
.
_subpackage
(
this
.
selectIds
)
}
},
_subpackage
:
async
function
(
ids
)
{
const
result
=
await
meterSample
.
subpackageSample
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'分包成功!'
)
await
this
.
_page
()
}
},
_itemDetail
(
id
)
{
this
.
$refs
.
foodItem
.
_open
(
id
)
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
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