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
fe1a159e
Commit
fe1a159e
authored
Jan 25, 2021
by
zhangmengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
e185ebd6
12816a03
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1536 additions
and
38 deletions
+1536
-38
soil-entrust.js
api/soil/soil-entrust.js
+4
-0
soil-sample.js
api/soil/soil-sample.js
+18
-0
soil-test.js
api/soil/soil-test.js
+2
-0
SampleByMakeModal.vue
pages/soil-report-manage/report-audit/SampleByMakeModal.vue
+4
-1
SummaryInfo.vue
pages/soil-report-manage/report-audit/SummaryInfo.vue
+38
-3
SummaryInfo.vue
pages/soil-report-manage/report-issue/SummaryInfo.vue
+36
-2
reportIssue.vue
pages/soil-report-manage/report-issue/tabs/reportIssue.vue
+1
-1
SamplePreparation.vue
...il-sample-manage/sample-preparation/SamplePreparation.vue
+19
-1
ViewPrepareRecord.vue
...il-sample-manage/sample-preparation/ViewPrepareRecord.vue
+0
-0
PrintNum.vue
...-manage/sample-receive/entrust-sample-manage/PrintNum.vue
+74
-0
WaitScan.vue
...-manage/sample-receive/entrust-sample-manage/WaitScan.vue
+131
-5
AuditDataModal.vue
pages/soil-test-manage/test-data-audit/AuditDataModal.vue
+13
-6
ItemReportView.vue
pages/soil-test-manage/test-data-audit/ItemReportView.vue
+303
-0
ItemView.vue
pages/soil-test-manage/test-data-audit/ItemView.vue
+0
-0
OriginalRecordEdit.vue
...s/soil-test-manage/test-data-audit/OriginalRecordEdit.vue
+147
-0
OriginalRecordView.vue
...s/soil-test-manage/test-data-audit/OriginalRecordView.vue
+309
-0
CheckDataModal.vue
pages/soil-test-manage/test-data-check/CheckDataModal.vue
+6
-6
ItemReportView.vue
pages/soil-test-manage/test-data-check/ItemReportView.vue
+1
-1
OriginalRecordView.vue
...s/soil-test-manage/test-data-check/OriginalRecordView.vue
+309
-0
ItemReportView.vue
pages/soil-test-manage/test-input/ItemReportView.vue
+32
-2
OriginalRecordView.vue
pages/soil-test-manage/test-input/OriginalRecordView.vue
+32
-2
ItemLeftList.vue
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
+23
-4
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+1
-0
ItemTabs.vue
pages/soil-test-manage/test-input/item-tabs/ItemTabs.vue
+14
-3
ReportTemplate.vue
.../soil-test-manage/test-input/item-tabs/ReportTemplate.vue
+19
-1
No files found.
api/soil/soil-entrust.js
View file @
fe1a159e
...
...
@@ -13,6 +13,10 @@ export default {
pageItem
:
data
=>
http
.
post
(
'soil/v1/experiment/page'
,
data
).
then
(
res
=>
res
),
pageItemByEntrustId
:
data
=>
http
.
post
(
'soil/v1/experiment/page_by_entrust'
,
data
).
then
(
res
=>
res
),
openSoilRecord
:
data
=>
http
.
post
(
'soil/v1/open_soil_record/page'
,
data
).
then
(
res
=>
res
),
getRecordById
:
data
=>
http
.
get
(
'soil/v1/open_soil_record/'
+
data
).
then
(
res
=>
res
),
listEntrustItemNum
:
data
=>
http
.
post
(
'soil/v1/statistics/list_entrust_item_num'
,
data
)
...
...
api/soil/soil-sample.js
View file @
fe1a159e
...
...
@@ -120,6 +120,24 @@ export default {
data
.
remark
)
.
then
(
res
=>
res
),
expReportIssueBack
:
data
=>
http
.
post
(
'soil/v1/exp_report/exp_report_issue_back?ids='
+
data
.
ids
+
'&remark='
+
data
.
remark
)
.
then
(
res
=>
res
),
expReportCheckBack
:
data
=>
http
.
post
(
'soil/v1/exp_report/exp_report_check_back?ids='
+
data
.
ids
+
'&remark='
+
data
.
remark
)
.
then
(
res
=>
res
),
// 样品检测退回
testInputBack
:
data
=>
...
...
api/soil/soil-test.js
View file @
fe1a159e
...
...
@@ -216,6 +216,8 @@ export default {
http
.
post
(
'soil/v1/exp_report/page'
,
data
).
then
(
res
=>
res
),
deleteReport
:
data
=>
http
.
delete
(
'soil/v1/exp_report/?ids='
+
data
).
then
(
res
=>
res
),
batchDeleteReport
:
data
=>
http
.
delete
(
'soil/v1/exp_report/?ids='
+
data
).
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
),
pageSummaryCheck
:
data
=>
http
.
post
(
'soil/v1/report/page_summary_check'
,
data
).
then
(
res
=>
res
),
...
...
pages/soil-report-manage/report-audit/SampleByMakeModal.vue
View file @
fe1a159e
<
template
>
<div>
<!--内容-->
<Modal
v-model=
"showModal"
:width=
"100"
class=
"modal-footer-none modal-top-0"
>
<Modal
v-model=
"showModal"
:width=
"100"
@
on-visible-change=
"_visibleChange"
class=
"modal-footer-none modal-top-0"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
...
...
@@ -103,6 +103,9 @@ export default {
this
.
_summary
()
break
}
},
_visibleChange
()
{
this
.
$emit
(
'on-result-change'
)
}
// _sampleTabResult(msg) {
// if (msg === 'changeTab') {
...
...
pages/soil-report-manage/report-audit/SummaryInfo.vue
View file @
fe1a159e
...
...
@@ -60,17 +60,18 @@
style=
"width:400px"
>
</DatePicker>
</Modal>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
></Reason>
</div>
</template>
<
script
>
import
{
soilReport
,
soilStatistics
,
soilTest
}
from
'../../../api'
import
{
soilReport
,
soilS
ample
,
soilS
tatistics
,
soilTest
}
from
'../../../api'
import
Global
from
'../../../api/config'
import
Reason
from
'../../../components/base/Reason'
/**
* 报告编制的-待办-报告台账
*/
export
default
{
components
:
{},
components
:
{
Reason
},
data
()
{
return
{
notOkCountList
:
[
...
...
@@ -91,6 +92,11 @@ export default {
type
:
'primary'
,
id
:
''
,
name
:
'提交'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'退回'
}
],
selectIds
:
[],
...
...
@@ -276,6 +282,8 @@ export default {
this
.
_page
()
},
_page
:
async
function
()
{
this
.
selectData
=
[]
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageSummaryCheck
(
this
.
$serializeForm
(
this
.
formObj
)
...
...
@@ -299,12 +307,39 @@ export default {
case
'提交'
:
this
.
_submit
()
break
case
'退回'
:
this
.
_goBack
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_goBack
()
{
// 退回
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条委托!'
)
}
else
{
this
.
$refs
.
reasonModal
.
_open
(
'退回原因'
)
}
},
_reasonResult
(
data
)
{
if
(
undefined
!==
data
&&
data
!==
''
)
{
this
.
_reportCheckBack
(
data
)
}
},
_reportCheckBack
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
expReportCheckBack
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
// 选择审核人
_selectAuditor
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
...
...
pages/soil-report-manage/report-issue/SummaryInfo.vue
View file @
fe1a159e
...
...
@@ -60,18 +60,20 @@
style=
"width:400px"
>
</DatePicker>
</Modal>
<Reason
ref=
"reasonModal"
@
on-result-change=
"_reasonResult"
></Reason>
</div>
</template>
<
script
>
import
http
from
'../../../api/http'
import
{
soilReport
,
soilStatistics
,
soilTest
}
from
'../../../api'
import
{
soilReport
,
soilS
ample
,
soilS
tatistics
,
soilTest
}
from
'../../../api'
import
Global
from
'../../../api/config'
import
Reason
from
'../../../components/base/Reason'
/**
* 报告编制的-待办-报告台账
*/
export
default
{
components
:
{},
components
:
{
Reason
},
data
()
{
return
{
notOkCountList
:
[
...
...
@@ -92,6 +94,11 @@ export default {
type
:
'primary'
,
id
:
''
,
name
:
'提交'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'退回'
}
],
selectIds
:
[],
...
...
@@ -300,12 +307,39 @@ export default {
case
'提交'
:
this
.
_submit
()
break
case
'退回'
:
this
.
_goBack
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_goBack
()
{
// 退回
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条委托!'
)
}
else
{
this
.
$refs
.
reasonModal
.
_open
(
'退回原因'
)
}
},
_reasonResult
(
data
)
{
if
(
undefined
!==
data
&&
data
!==
''
)
{
this
.
_reportCheckBack
(
data
)
}
},
_reportCheckBack
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
expReportIssueBack
({
ids
:
this
.
selectIds
,
remark
:
data
})
if
(
result
)
{
this
.
$Message
.
success
(
'退回成功!'
)
await
this
.
_page
()
}
},
// 选择审核人
_selectAuditor
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
...
...
pages/soil-report-manage/report-issue/tabs/reportIssue.vue
View file @
fe1a159e
...
...
@@ -36,7 +36,7 @@
</Form-item>
</Form>
<Col
span=
"24"
>
<btn-list
:
msg=
"btn"
:
open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
<btn-list
:open=
"searchOpen"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
/>
</Col>
<!--
<Col
span=
"24"
>
-->
<!-- <!–
<Button
type=
"primary"
@
click=
"_submitReportCheck"
>
–>
-->
...
...
pages/soil-sample-manage/sample-preparation/SamplePreparation.vue
View file @
fe1a159e
...
...
@@ -65,6 +65,7 @@ import SampleManage from './SampleManage'
import
SamplePreparationEdit
from
'./SamplePreparationEdit'
import
SoilSampleItemManageEdit
from
'./SoilSampleItemManageEdit'
import
SoilEntrustItemNum
from
'./SoilItemNum'
import
ViewPrepareRecord
from
'./ViewPrepareRecord'
export
default
{
components
:
{
// eslint-disable-next-line vue/no-unused-components
...
...
@@ -78,7 +79,9 @@ export default {
// eslint-disable-next-line vue/no-unused-components
CreateReport
,
// eslint-disable-next-line vue/no-unused-components
SoilEntrustItemNum
SoilEntrustItemNum
,
// eslint-disable-next-line vue/no-unused-components
ViewPrepareRecord
},
data
()
{
return
{
...
...
@@ -108,6 +111,11 @@ export default {
name
:
'导出开土制备记录'
},
{
type
:
'ios-folder-outline'
,
id
:
''
,
name
:
'开土制备记录查看'
},
{
type
:
'ios-camera-outline'
,
id
:
''
,
name
:
'试样照片'
...
...
@@ -196,6 +204,9 @@ export default {
case
'导出开土制备记录'
:
this
.
_exportPrepare
(
data
.
id
)
break
case
'开土制备记录查看'
:
this
.
_viewPrepareRecord
(
data
.
id
)
break
case
'试样列表'
:
this
.
_sampleManage
(
data
.
id
)
break
...
...
@@ -410,6 +421,13 @@ export default {
})
// this.$refs.itemManageModal._openByEntrustId(data)
},
_viewPrepareRecord
(
data
)
{
this
.
currentComponent
=
'ViewPrepareRecord'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openByEntrustId
(
data
)
})
// this.$refs.itemManageModal._openByEntrustId(data)
},
_itemNumManage
(
data
)
{
this
.
currentComponent
=
'SoilEntrustItemNum'
this
.
$nextTick
(()
=>
{
...
...
pages/soil-sample-manage/sample-preparation/ViewPrepareRecord.vue
0 → 100644
View file @
fe1a159e
This diff is collapsed.
Click to expand it.
pages/soil-sample-manage/sample-receive/entrust-sample-manage/PrintNum.vue
0 → 100644
View file @
fe1a159e
<
template
>
<div>
<Modal
v-model=
"showBackModal"
:mask-closable=
"false"
class=
"zIndex-1100"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
>
<Form-item
label=
"打印份数"
prop=
"number"
>
<InputNumber
:min=
"1"
:step=
"1"
v-model
.
number=
"formObj.number"
name=
"number"
style=
"width:100%"
placeholder=
"请输入打印份数"
>
</InputNumber>
</Form-item>
</Form>
</div>
<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
>
/**
* 制备标签打印数量
*/
export
default
{
components
:
{},
data
()
{
return
{
currentComponent
:
''
,
modalTitle
:
'打印份数'
,
showBackModal
:
false
,
formObj
:
{
number
:
1
},
ruleValidate
:
{
number
:
[
{
required
:
true
,
message
:
'打印份数不能为空'
,
trigger
:
'blur'
,
type
:
'number'
}
]
},
printerVal
:
''
,
selectData
:
[],
companyId
:
''
}
},
methods
:
{
// 打开界面
_open
()
{
this
.
showBackModal
=
true
this
.
formObj
.
number
=
1
},
_cancel
()
{
this
.
showBackModal
=
false
},
// 打开界面
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$emit
(
'on-result-change'
,
this
.
formObj
.
number
)
this
.
showBackModal
=
false
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
}
})
}
}
}
</
script
>
pages/soil-sample-manage/sample-receive/entrust-sample-manage/WaitScan.vue
View file @
fe1a159e
...
...
@@ -73,18 +73,26 @@
</Row>
</div>
<!--选择领样人-->
<downloadPlugin
ref=
"downloadPlugin"
></downloadPlugin>
<SelectPrinter
ref=
"selectPrint"
@
on-result-change=
"_printResult"
></SelectPrinter>
<PrintNum
ref=
"printNum"
@
on-result-change=
"_printNumResult"
></PrintNum>
</div>
</template>
<
script
>
import
{
soilAptitude
,
soilEntrust
}
from
'../../../../api'
import
{
soilAptitude
,
soilEntrust
,
soilStatistics
}
from
'../../../../api'
import
SelectPrinter
from
'../../sample-preparation/SelectPrinter'
import
{
getLodop
}
from
'../../../../plugins/clodop/LodopFuncs'
import
downloadPlugin
from
'../../../../plugins/download/downloadPlugin'
import
PrintNum
from
'./PrintNum'
let
LODOP
export
default
{
components
:
{},
components
:
{
PrintNum
,
SelectPrinter
,
downloadPlugin
},
data
()
{
return
{
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'发放'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'发放到高级试验'
}
{
type
:
'primary'
,
id
:
''
,
name
:
'发放到高级试验'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'打印标签'
}
],
selectIds
:
[],
getPage
:
{},
...
...
@@ -295,8 +303,15 @@ export default {
case
'接收'
:
this
.
_sampleReceive
()
break
// case '打印标签':
// this._selectPrinter('print-label')
// break
case
'打印标签'
:
this
.
_selectPrinter
(
'print-label'
)
if
(
this
.
selectData
.
length
>
0
)
{
this
.
$refs
.
selectPrint
.
_open
()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
break
case
'自定义打印'
:
if
(
this
.
selectData
.
length
===
0
)
{
...
...
@@ -311,6 +326,117 @@ export default {
}
})
},
_pluginDownload
()
{
this
.
$refs
.
downloadPlugin
.
_open
()
},
_printResult
(
data
)
{
console
.
log
(
data
)
if
(
data
)
{
console
.
log
(
'data.printerVal'
)
this
.
printerVal
=
data
.
printerVal
this
.
$refs
.
printNum
.
_open
()
// this._getLabelInfo()
}
},
_printNumResult
(
data
)
{
this
.
printNum
=
data
this
.
_getLabelInfo
()
},
_getLabelInfo
:
async
function
()
{
console
.
log
(
'this._getLabelInfo'
)
const
result
=
await
soilStatistics
.
_getLabel
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
if
(
result
.
records
[
i
].
type
.
display
===
'打印前处理标签'
)
{
this
.
labelCode
=
result
.
records
[
i
].
code
}
}
console
.
log
(
result
)
}
this
.
_printMessage
()
},
_printMessage
:
function
()
{
LODOP
=
getLodop
()
if
(
LODOP
===
'undefined'
||
LODOP
===
undefined
)
{
this
.
_pluginDownload
()
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Messager
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
const
data
=
this
.
selectData
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
this
.
printNum
;
j
++
)
{
this
.
_printLabelOk
(
data
[
i
])
}
}
},
_printLabelOk
(
row
)
{
LODOP
.
PRINT_INITA
(
''
)
// 必须在设置打印机之前
// 返回的标签代码
// eslint-disable-next-line no-eval
eval
(
this
.
_replaceCodes
(
row
))
// 设置打印机
LODOP
.
SET_PRINTER_INDEX
(
this
.
printerVal
)
// 打开设计模式
// LODOP.PRINT_DESIGN()
LODOP
.
PRINT
()
},
_replaceCodes
(
row
)
{
// /g表示全局替换
let
result
=
this
.
labelCode
result
=
result
.
replace
(
/
\$
sampleCode
\$
/g
,
undefined
!==
row
.
sampleCode
?
row
.
sampleCode
:
''
)
result
=
result
.
replace
(
/
\$
sampleDepth
\$
/g
,
undefined
!==
row
.
sampleDepth
?
row
.
sampleDepth
:
''
)
result
=
result
.
replace
(
/
\$
receiver
\$
/g
,
undefined
!==
row
.
receiver
?
row
.
receiver
:
''
)
result
=
result
.
replace
(
/
\$
receiveTime
\$
/g
,
undefined
!==
row
.
receiveTime
?
this
.
_formatDate
(
row
.
receiveTime
)
:
''
)
result
=
result
.
replace
(
/
\$
entrustCode
\$
/g
,
undefined
!==
row
.
entrustCode
?
row
.
entrustCode
:
''
)
// 检测项目
result
=
result
.
replace
(
/
\$
experimentNames
\$
/g
,
undefined
!==
row
.
experimentNames
?
row
.
experimentNames
:
''
)
// 二维码地址
result
=
result
.
replace
(
/
\$
qrCode
\$
/g
,
undefined
!==
row
.
qrCode
?
row
.
qrCode
:
''
)
return
result
},
_formatDate
(
time
)
{
const
date
=
new
Date
(
time
)
const
YY
=
date
.
getFullYear
()
+
'-'
const
MM
=
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'-'
const
DD
=
date
.
getDate
()
<
10
?
'0'
+
date
.
getDate
()
:
date
.
getDate
()
const
hh
=
(
date
.
getHours
()
<
10
?
'0'
+
date
.
getHours
()
:
date
.
getHours
())
+
':'
const
mm
=
(
date
.
getMinutes
()
<
10
?
'0'
+
date
.
getMinutes
()
:
date
.
getMinutes
())
+
':'
const
ss
=
date
.
getSeconds
()
<
10
?
'0'
+
date
.
getSeconds
()
:
date
.
getSeconds
()
return
YY
+
MM
+
DD
+
' '
+
hh
+
mm
+
ss
},
// 扫码发放
_oneKeySend
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
...
...
pages/soil-test-manage/test-data-audit/AuditDataModal.vue
View file @
fe1a159e
...
...
@@ -11,9 +11,12 @@
<el-tab-pane
label=
"按样品审核"
name=
"waitScan"
>
<WaitScan
ref=
"waitScanModal"
></WaitScan>
</el-tab-pane>
<!--
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
-->
<!--
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
-->
<!--
</el-tab-pane>
-->
<el-tab-pane
label=
"查看项目报告"
name=
"viewReport"
>
<ItemReportView
ref=
"reportModal"
></ItemReportView>
</el-tab-pane>
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
</el-tab-pane>
</el-tabs>
<!--
<keep-alive>
-->
<!-- <!– eslint-disable-next-line vue/require-component-is –>-->
...
...
@@ -26,13 +29,15 @@
<
script
>
import
WaitReceive
from
'./item-tabs/ItemTabs'
import
WaitScan
from
'./sample-tabs/SampleTabs'
// import OriginalRecordView from './OriginalRecordView'
import
ItemReportView
from
'./ItemReportView'
import
OriginalRecordView
from
'./OriginalRecordView'
export
default
{
components
:
{
WaitReceive
,
WaitScan
// OriginalRecordView
WaitScan
,
ItemReportView
,
OriginalRecordView
},
data
()
{
return
{
...
...
@@ -85,6 +90,8 @@ export default {
this
.
$refs
.
waitReceiveModal
.
_clearTable
()
this
.
$refs
.
waitScanModal
.
_open
(
this
.
entrustId
)
// this._waitSend()
}
else
if
(
tab
.
name
===
'viewReport'
)
{
this
.
$refs
.
reportModal
.
_open
(
this
.
entrustId
)
}
},
_search
()
{
...
...
pages/soil-test-manage/test-data-audit/ItemReportView.vue
0 → 100644
View file @
fe1a159e
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"项目名称:"
>
<Input
v-model=
"formObj.expName"
@
on-enter=
"_formSearch"
placeholder=
"请输入项目名称"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:icon-msg=
"iconMsg"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<ItemOriginalRecordEdit
ref=
"recordEditModal"
></ItemOriginalRecordEdit>
<ItemView
ref=
"itemViewModal"
></ItemView>
</div>
</template>
<
script
>
/**
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilReport
,
soilTest
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
import
ItemView
from
'./ItemView'
export
default
{
components
:
{
ItemOriginalRecordEdit
,
ItemView
},
data
()
{
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'通过'
}
],
selectIds
:
[],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看项目报告'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'项目名称'
,
key
:
'expName'
},
{
title
:
'备注'
,
key
:
'remark'
},
{
title
:
'创建人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
formObj
:
{
entrustId
:
''
,
expName
:
undefined
},
searchOpen
:
false
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
340
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_componentResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'EditDateModal'
:
this
.
_updateDate
(
data
)
break
default
:
this
.
_page
()
}
},
_updateDate
(
date
)
{
this
.
$store
.
dispatch
(
'PrintForm/updateTimeBatch'
,
{
ids
:
this
.
selectIds
.
join
(
','
),
fillInTime
:
date
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
PrintForm
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'更新成功!'
)
}
})
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'通过'
:
this
.
_pass
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_pass
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定通过?'
,
onOk
:
()
=>
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_passItemReport
(
this
.
selectIds
)
}
})
}
},
_passItemReport
:
async
function
(
ids
)
{
const
result
=
await
soilReport
.
expReportCheck
({
ids
:
ids
.
join
(
','
)
})
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$Message
.
success
(
'提交成功'
)
this
.
_page
()
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
// this.$refs.recordEditModal._openWithType(
// data.originalRecordId,
// 'ENVTESTMAKEEDIT'
// )
this
.
_reportMakeLook
(
data
)
break
case
'查看项目报告'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
// 查看试验项目
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
expReportGetById
(
data
.
id
)
// this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
13
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_open
(
entrustId
)
{
this
.
formObj
.
entrustId
=
entrustId
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
EnvItem
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
expReportPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 删除原始记录
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilTest
.
deleteReport
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-data-audit/ItemView.vue
0 → 100644
View file @
fe1a159e
This diff is collapsed.
Click to expand it.
pages/soil-test-manage/test-data-audit/OriginalRecordEdit.vue
0 → 100644
View file @
fe1a159e
<
template
>
<div>
<!--
<Modal
v-model=
"showModal"
title=
"原始记录"
:mask-closable=
"false"
width=
"1300"
class=
"modal-footer-none"
>
-->
<!--
<div
style=
"text-align:center;align-content:center;width: 100%;height: 790px"
v-html=
"htmlContent"
>
-->
<!--
</div>
-->
<!--
</Modal>
-->
</div>
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
{
soilTest
}
from
'../../../api'
/**
* 编辑原始记录详情
*/
export
default
{
data
()
{
return
{
// showModal: false,
again
:
false
,
formId
:
''
,
htmlContent
:
''
,
formIdTemp
:
''
}
},
created
()
{
// 监听原始记录消息
// eslint-disable-next-line nuxt/no-globals-in-created
window
.
addEventListener
(
'message'
,
this
.
_saveOriginal
)
},
// 销毁监听事件
beforeDestroy
()
{
this
.
again
=
false
window
.
removeEventListener
(
'message'
,
this
.
_saveOriginal
)
},
methods
:
{
_open
(
formId
)
{
this
.
formId
=
formId
this
.
formIdTemp
=
formId
+
this
.
$randomCode
()
this
.
again
=
true
// this.showModal = true;
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const
bindUri
=
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_soil_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
// this.htmlContent = '
<
iframe
style
=
"padding: 0px;width:100%;height:100%"
frameborder
=
"0"
src
=
' + encodeURI(url) + '
><
/iframe>'
;
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_openWithType
(
formId
,
fromType
)
{
this
.
formId
=
formId
this
.
formIdTemp
=
formId
+
this
.
$randomCode
()
this
.
again
=
true
// this.showModal = true;
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const
bindUri
=
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_soil_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
'&type='
+
fromType
// this.htmlContent = '
<
iframe
style
=
"padding: 0px;width:100%;height:100%"
frameborder
=
"0"
src
=
' + encodeURI(url) + '
><
/iframe>'
;
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_saveOriginal
(
data
)
{
console
.
log
(
'修改的数据'
,
data
)
if
(
this
.
again
)
{
if
(
data
.
data
.
msg
===
true
)
{
this
.
_editSaveRecord
(
data
)
}
else
{
this
.
_cancel
()
}
this
.
again
=
false
}
},
_cancel
()
{
// this.showModal = false;
// 关闭所有layx弹框
// eslint-disable-next-line no-undef
layx
.
destroyAll
(
this
.
formIdTemp
)
},
_updateRecord
:
async
function
(
param
)
{
const
result
=
await
soilTest
.
updateItem
(
param
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
_cancel
()
this
.
$emit
(
'on-result-change'
)
}
},
// 保存后解析项目的检测值
_editSaveRecord
(
data
)
{
const
param
=
{
formId
:
this
.
formId
}
console
.
log
(
'data'
,
data
)
const
copyMapTemp
=
{}
if
(
data
.
data
.
copySheet
&&
data
.
data
.
copyedSheet
)
{
param
.
copyMap
=
{}
const
copyedKey
=
String
(
data
.
data
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
data
.
data
.
copySheet
)
// 存在复制sheet的情况
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
}
else
if
(
typeof
data
.
data
.
testValueArry
!==
'undefined'
)
{
const
testValue
=
data
.
data
.
testValueArry
param
.
copyMap
=
{}
testValue
.
forEach
(
item
=>
{
const
copyedKey
=
String
(
item
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
item
.
copySheet
)
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
})
}
this
.
_updateRecord
(
param
)
// this.$store.dispatch('EnvItem/updateFormForItem', param).then(() => {
// if (this.$store.state.EnvItem.success) {
// this.$Message.success('保存成功')
// // this.showModal = false;
// this.$emit('on-result-change')
// this._cancel()
// }
// })
}
}
}
</
script
>
pages/soil-test-manage/test-data-audit/OriginalRecordView.vue
0 → 100644
View file @
fe1a159e
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"模板名称:"
>
<Input
v-model=
"formObj.title"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入委托编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:icon-msg=
"iconMsg"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<ItemOriginalRecordEdit
ref=
"recordEditModal"
></ItemOriginalRecordEdit>
<ItemView
ref=
"itemViewModal"
></ItemView>
</div>
</template>
<
script
>
/**
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilReport
,
soilTest
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
import
ItemView
from
'./ItemView'
export
default
{
components
:
{
ItemOriginalRecordEdit
,
ItemView
},
data
()
{
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[
{
type
:
'error'
,
id
:
''
,
name
:
'批量删除'
}
],
selectIds
:
[],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'ios-list'
,
id
:
''
,
name
:
'查看试验项目'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'模板名称'
,
key
:
'title'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
},
{
title
:
'填写人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
formObj
:
{
entrustId
:
''
},
searchOpen
:
false
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
340
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_componentResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'EditDateModal'
:
this
.
_updateDate
(
data
)
break
default
:
this
.
_page
()
}
},
_updateDate
(
date
)
{
this
.
$store
.
dispatch
(
'PrintForm/updateTimeBatch'
,
{
ids
:
this
.
selectIds
.
join
(
','
),
fillInTime
:
date
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
PrintForm
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'更新成功!'
)
}
})
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'批量删除'
:
this
.
_batchDelete
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_batchDelete
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除?'
,
onOk
:
()
=>
{
this
.
_delete
()
}
})
}
},
_delete
:
async
function
()
{
const
result
=
await
soilTest
.
deleteRecord
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
_reportEdit
(
data
)
break
case
'查看原始记录'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
// 查看试验项目
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportEdit
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
originalRecordGetById
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_open
(
entrustId
)
{
this
.
formObj
.
entrustId
=
entrustId
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
EnvItem
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
recordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 删除原始记录
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilTest
.
deleteRecord
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-data-check/CheckDataModal.vue
View file @
fe1a159e
...
...
@@ -14,9 +14,9 @@
<el-tab-pane
label=
"查看项目报告"
name=
"viewReport"
>
<ItemReportView
ref=
"reportModal"
></ItemReportView>
</el-tab-pane>
<!--
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
--
>
<!--
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
--
>
<!--
</el-tab-pane>
--
>
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView
>
</el-tab-pane
>
</el-tabs>
<!--
<keep-alive>
-->
<!-- <!– eslint-disable-next-line vue/require-component-is –>-->
...
...
@@ -30,14 +30,14 @@
import
WaitReceive
from
'./item-tabs/ItemTabs'
import
WaitScan
from
'./sample-tabs/SampleTabs'
import
ItemReportView
from
'./ItemReportView'
//
import OriginalRecordView from './OriginalRecordView'
import
OriginalRecordView
from
'./OriginalRecordView'
export
default
{
components
:
{
WaitReceive
,
WaitScan
,
ItemReportView
//
OriginalRecordView
ItemReportView
,
OriginalRecordView
},
data
()
{
return
{
...
...
pages/soil-test-manage/test-data-check/ItemReportView.vue
View file @
fe1a159e
...
...
@@ -15,7 +15,7 @@
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:
msg=
"btn"
:
showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
...
...
pages/soil-test-manage/test-data-check/OriginalRecordView.vue
0 → 100644
View file @
fe1a159e
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"模板名称:"
>
<Input
v-model=
"formObj.title"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入委托编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:icon-msg=
"iconMsg"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<ItemOriginalRecordEdit
ref=
"recordEditModal"
></ItemOriginalRecordEdit>
<ItemView
ref=
"itemViewModal"
></ItemView>
</div>
</template>
<
script
>
/**
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilReport
,
soilTest
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
import
ItemView
from
'./ItemView'
export
default
{
components
:
{
ItemOriginalRecordEdit
,
ItemView
},
data
()
{
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[
{
type
:
'error'
,
id
:
''
,
name
:
'批量删除'
}
],
selectIds
:
[],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'ios-list'
,
id
:
''
,
name
:
'查看试验项目'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'模板名称'
,
key
:
'title'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
},
{
title
:
'填写人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
formObj
:
{
entrustId
:
''
},
searchOpen
:
false
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
340
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_componentResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'EditDateModal'
:
this
.
_updateDate
(
data
)
break
default
:
this
.
_page
()
}
},
_updateDate
(
date
)
{
this
.
$store
.
dispatch
(
'PrintForm/updateTimeBatch'
,
{
ids
:
this
.
selectIds
.
join
(
','
),
fillInTime
:
date
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
PrintForm
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'更新成功!'
)
}
})
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'批量删除'
:
this
.
_batchDelete
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_batchDelete
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除?'
,
onOk
:
()
=>
{
this
.
_delete
()
}
})
}
},
_delete
:
async
function
()
{
const
result
=
await
soilTest
.
deleteRecord
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
_reportEdit
(
data
)
break
case
'查看原始记录'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
// 查看试验项目
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportEdit
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
originalRecordGetById
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_open
(
entrustId
)
{
this
.
formObj
.
entrustId
=
entrustId
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
EnvItem
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
recordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 删除原始记录
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilTest
.
deleteRecord
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/ItemReportView.vue
View file @
fe1a159e
...
...
@@ -15,7 +15,7 @@
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
<btn-list
:open=
"searchOpen"
:
msg=
"btn"
:
showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
...
...
@@ -61,7 +61,13 @@ export default {
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[],
btn
:
[
{
type
:
'error'
,
id
:
''
,
name
:
'批量删除'
}
],
selectIds
:
[],
iconMsg
:
[
{
...
...
@@ -128,12 +134,35 @@ export default {
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'批量删除'
:
this
.
_batchDelete
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_batchDelete
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除?'
,
onOk
:
()
=>
{
this
.
_delete
()
}
})
}
},
_delete
:
async
function
()
{
const
result
=
await
soilTest
.
batchDeleteReport
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
...
...
@@ -236,6 +265,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
expReportPage
(
this
.
$serializeForm
(
this
.
formObj
)
...
...
pages/soil-test-manage/test-input/OriginalRecordView.vue
View file @
fe1a159e
...
...
@@ -18,7 +18,7 @@
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
<btn-list
:open=
"searchOpen"
:
msg=
"btn"
:
showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
...
...
@@ -64,7 +64,13 @@ export default {
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[],
btn
:
[
{
type
:
'error'
,
id
:
''
,
name
:
'批量删除'
}
],
selectIds
:
[],
iconMsg
:
[
{
...
...
@@ -135,12 +141,35 @@ export default {
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'批量删除'
:
this
.
_batchDelete
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_batchDelete
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除?'
,
onOk
:
()
=>
{
this
.
_delete
()
}
})
}
},
_delete
:
async
function
()
{
const
result
=
await
soilTest
.
deleteRecord
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
...
...
@@ -248,6 +277,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
this
.
selectIds
=
[]
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
recordPage
(
this
.
$serializeForm
(
this
.
formObj
)
...
...
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
View file @
fe1a159e
...
...
@@ -50,6 +50,9 @@ import CreateItemReport from './CreateItemReport'
import
CreateBatchItemReport
from
'./CreateBatchItemReport'
export
default
{
components
:
{
CreateItemReport
,
CreateBatchItemReport
},
props
:
{
rightSelectData
:
null
},
data
()
{
return
{
currentComponent
:
''
,
...
...
@@ -153,7 +156,9 @@ export default {
case
'iconClick'
:
const
selcetName
=
[]
selcetName
.
push
(
data
.
rowData
.
name
)
this
.
$emit
(
'on-result-change'
,
selcetName
)
if
(
this
.
rightSelectData
.
length
===
0
)
{
this
.
$emit
(
'on-result-change'
,
selcetName
)
}
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
...
...
@@ -187,8 +192,15 @@ export default {
},
_itemReportMakeBatch
()
{
if
(
this
.
selectDataName
.
length
>
0
)
{
if
(
this
.
rightSelectData
.
length
>
0
)
{
// this.itemName = data.name
this
.
batchSampleIds
=
this
.
rightSelectData
}
else
{
// console.log('12345767')
// this.itemName = data.name
this
.
_searchBatchSampleId
(
this
.
id
,
this
.
selectDataName
)
}
// this.itemName = data.name
this
.
_searchBatchSampleId
(
this
.
id
,
this
.
selectDataName
)
// this.selectId = data.id
this
.
$refs
.
createBatchModal
.
_open
()
}
else
{
...
...
@@ -196,8 +208,15 @@ export default {
}
},
_itemReportMake
(
data
)
{
this
.
itemName
=
data
.
name
this
.
_searchSampleId
(
this
.
id
,
data
.
name
)
if
(
this
.
rightSelectData
.
length
>
0
)
{
this
.
itemName
=
data
.
name
this
.
sampleIds
=
this
.
rightSelectData
console
.
log
(
'点击生成报告'
,
this
.
rightSelectData
)
}
else
{
// console.log('12345767')
this
.
itemName
=
data
.
name
this
.
_searchSampleId
(
this
.
id
,
data
.
name
)
}
// this.selectId = data.id
this
.
$refs
.
createModal
.
_open
()
},
...
...
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
fe1a159e
...
...
@@ -593,6 +593,7 @@ export default {
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
this
.
$emit
(
'child-data'
,
data
)
break
case
'table-col'
:
// 用户选中的表格列
...
...
pages/soil-test-manage/test-input/item-tabs/ItemTabs.vue
View file @
fe1a159e
...
...
@@ -2,10 +2,10 @@
<div>
<TwoColumnPage>
<template
slot=
"left"
>
<ItemLeftList
ref=
"leftModal"
@
on-result-change=
"_leftResult"
></ItemLeftList>
<ItemLeftList
ref=
"leftModal"
:rightSelectData =
rightSelectData
@
on-result-change=
"_leftResult"
></ItemLeftList>
</
template
>
<
template
slot=
"right"
>
<ItemRightList
ref=
"rightModal"
@
on-result-change=
"_rightResult"
></ItemRightList>
<ItemRightList
ref=
"rightModal"
@
child-data=
"_rightSelectData"
@
on-result-change=
"_rightResult"
></ItemRightList>
</
template
>
</TwoColumnPage>
</div>
...
...
@@ -24,7 +24,8 @@ export default {
},
data
()
{
return
{
id
:
''
id
:
''
,
rightSelectData
:
[]
}
},
methods
:
{
...
...
@@ -35,6 +36,16 @@ export default {
_rightResult
()
{
this
.
$refs
.
leftModal
.
_page
()
},
_rightSelectData
(
data
)
{
this
.
rightSelectData
=
[]
if
(
data
.
length
>
0
)
{
const
rightSelectId
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
rightSelectId
.
push
(
data
[
i
].
id
)
}
this
.
rightSelectData
=
rightSelectId
}
},
_open
(
id
)
{
this
.
id
=
id
this
.
$refs
.
leftModal
.
_open
(
this
.
id
)
...
...
pages/soil-test-manage/test-input/item-tabs/ReportTemplate.vue
View file @
fe1a159e
...
...
@@ -7,6 +7,12 @@
<Form-item
label=
"模板名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.alias"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
/>
</Form-item>
<Form-item
label=
"模板类别:"
class=
"search-item"
>
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
class=
"search-btn"
style=
"margin-left: -10px"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
...
...
@@ -58,8 +64,20 @@ export default {
modalTitle
:
'报告模板'
,
sampleId
:
''
,
formObj
:
{
name
:
undefined
name
:
undefined
,
classType
:
undefined
},
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
},
{
value
:
'高级'
}
],
selectData
:
[]
}
},
...
...
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