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
b0fa4083
Commit
b0fa4083
authored
Nov 13, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了管理样品
parent
8ad70ba0
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
16 additions
and
839 deletions
+16
-839
Operation.vue
components/operation/Operation.vue
+8
-5
SoilSampleManage.vue
pages/meter-entrust/SoilSampleManage.vue
+1
-268
SoilSampleManageHis.vue
pages/meter-entrust/SoilSampleManageHis.vue
+0
-263
SoilSampleManage.vue
pages/soil-sample-manage/SoilSampleManage.vue
+0
-261
SoilSampleManageHis.vue
pages/soil-sample-manage/SoilSampleManageHis.vue
+1
-9
SamplePreparation.vue
...il-sample-manage/sample-preparation/SamplePreparation.vue
+1
-27
AlreadyIssuedHis.vue
...sample-receive/entrust-sample-manage/AlreadyIssuedHis.vue
+1
-0
SoilSampleItemManage.vue
...le-receive/entrust-sample-manage/SoilSampleItemManage.vue
+2
-5
WaitReceiveHis.vue
...e/sample-receive/entrust-sample-manage/WaitReceiveHis.vue
+1
-0
common.js
plugins/common.js
+1
-1
No files found.
components/operation/Operation.vue
View file @
b0fa4083
...
...
@@ -102,40 +102,43 @@ export default {
_page
:
async
function
()
{
console
.
log
(
'要传的参数'
)
console
.
log
(
this
.
formObj
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageOutTaskOperation
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
// this.$refs.pageTable._page(
// 'search-contract-record',
// 'FoodContractRecord/page',
// this.$serializeFormSearch(this.formObj)
// )
},
_pageSurplus
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
prepareRecordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_pageBackup
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
backupRecordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_pageTask
:
async
function
()
{
console
.
log
(
'要传的参数'
)
console
.
log
(
this
.
formObj
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageTask
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
...
...
pages/meter-entrust/SoilSampleManage.vue
View file @
b0fa4083
...
...
@@ -63,34 +63,15 @@
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
,
soilSample
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '导入检测项目'
// }
// {
// type: 'success',
// id: '',
// name: '导入检测项目包'
// },
// {
// type: 'success',
// id: '',
// name: '打印标签'
// }
],
btn
:
[],
itemList
:
[],
indexList
:
[],
footerList
:
[
...
...
@@ -153,93 +134,16 @@ export default {
this
.
$refs
.
footerModal
.
_hideLoading
()
console
.
log
(
this
.
getPage
)
},
_itemImportBack
(
data
)
{
if
(
this
.
selectIds
===
undefined
||
this
.
selectIds
.
length
===
0
)
{
return
false
}
if
(
data
===
undefined
||
data
.
length
===
0
)
{
return
false
}
this
.
_importItemOk
({
sampleIds
:
this
.
selectIds
,
drugItemList
:
data
})
},
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
if
(
data1
===
0
)
{
this
.
_copySample
(
data2
)
}
else
{
this
.
_copyAll
(
data2
)
}
break
default
:
this
.
_search
()
}
},
_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
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'打印标签'
:
this
.
_printLabel
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -247,19 +151,9 @@ export default {
case
'管理检测项目'
:
this
.
_itemManage
(
data
.
id
)
break
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
console
.
log
(
index
)
this
.
_deleteById
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
...
...
@@ -352,173 +246,12 @@ export default {
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
contractId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
contractId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/company/import_'
+
this
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
sampleItemModal
.
_open
()
this
.
$refs
.
pageTable
.
checkedData
()
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
// this.$refs.refModal._open(this.selectIds, 'sample-rel-package-item')
this
.
$refs
.
itemPackageModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_printLabel
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
for
(
let
m
=
0
;
m
<
this
.
selectData
.
length
;
m
++
)
{
const
row
=
this
.
selectData
[
m
]
this
.
_printLabelOk
(
row
)
}
}
},
_printLabelOk
(
row
)
{
LODOP
=
getLodop
()
if
(
LODOP
===
'undefined'
||
LODOP
===
undefined
)
{
this
.
_pluginDownload
()
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Messager
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'70.01mm'
,
'50.01mm'
,
'样品标签打印'
)
LODOP
.
ADD_PRINT_LINE
(
36
,
15
,
35
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
74
,
15
,
73
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
107
,
15
,
106
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
140
,
15
,
139
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
175
,
15
,
174
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
15
,
174
,
16
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
74
,
174
,
75
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
251
,
174
,
252
,
0
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
17
,
59
,
20
,
'样品名称'
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
18
,
59
,
20
,
'样品编号'
)
LODOP
.
ADD_PRINT_TEXT
(
116
,
17
,
59
,
20
,
'样品状态'
)
LODOP
.
ADD_PRINT_TEXT
(
151
,
27
,
39
,
20
,
'备注'
)
LODOP
.
ADD_PRINT_TEXT
(
16
,
95
,
100
,
20
,
'检测样品标签'
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Bold'
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
78
,
135
,
20
,
row
.
name
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
77
,
136
,
20
,
row
.
sampleCode
)
LODOP
.
ADD_PRINT_TEXT
(
117
,
76
,
176
,
20
,
'□未检 □在检 □已检 □留样'
)
if
(
row
.
surplus
===
'取回'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'☑"取回 □服务方处理'
)
}
else
if
(
row
.
surplus
===
'服务方处理'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 ☑服务方处理'
)
}
else
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 □服务方处理'
)
}
LODOP
.
PRINT_DESIGN
()
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
...
...
pages/meter-entrust/SoilSampleManageHis.vue
View file @
b0fa4083
...
...
@@ -66,11 +66,8 @@
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
,
soilSample
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
SoilSampleItemManage
from
'./SoilSampleItemManageHis'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
...
...
@@ -146,102 +143,16 @@ export default {
this
.
$refs
.
footerModal
.
_hideLoading
()
console
.
log
(
this
.
getPage
)
},
_itemImportBack
(
data
)
{
if
(
this
.
selectIds
===
undefined
||
this
.
selectIds
.
length
===
0
)
{
return
false
}
if
(
data
===
undefined
||
data
.
length
===
0
)
{
return
false
}
this
.
_importItemOk
({
sampleIds
:
this
.
selectIds
,
drugItemList
:
data
})
},
// _importItemOk: async function(data) {
// const result = await drugSample.importSampleItemDTO(data)
// if (result) {
// this.$Message.success('导入成功!')
// await this._page()
// }
// },
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
if
(
data1
===
0
)
{
this
.
_copySample
(
data2
)
}
else
{
this
.
_copyAll
(
data2
)
}
break
default
:
this
.
_search
()
}
},
_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
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'打印标签'
:
this
.
_printLabel
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -249,18 +160,9 @@ export default {
case
'管理检测项目'
:
this
.
_itemManage
(
data
.
id
)
break
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
...
...
@@ -339,9 +241,6 @@ export default {
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
// this.$store.dispatch('FoodSample/deleteByIds', ids).then(() => {
// this._resultChange('删除成功!')
// })
this
.
_deleteOk
(
ids
)
}
})
...
...
@@ -352,178 +251,16 @@ export default {
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
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
contractId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
contractId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/company/import_'
+
this
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
sampleItemModal
.
_open
()
this
.
$refs
.
pageTable
.
checkedData
()
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
// this.$refs.refModal._open(this.selectIds, 'sample-rel-package-item')
this
.
$refs
.
itemPackageModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_printLabel
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
for
(
let
m
=
0
;
m
<
this
.
selectData
.
length
;
m
++
)
{
const
row
=
this
.
selectData
[
m
]
this
.
_printLabelOk
(
row
)
}
}
},
_printLabelOk
(
row
)
{
LODOP
=
getLodop
()
if
(
LODOP
===
'undefined'
||
LODOP
===
undefined
)
{
this
.
_pluginDownload
()
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Messager
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'70.01mm'
,
'50.01mm'
,
'样品标签打印'
)
LODOP
.
ADD_PRINT_LINE
(
36
,
15
,
35
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
74
,
15
,
73
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
107
,
15
,
106
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
140
,
15
,
139
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
175
,
15
,
174
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
15
,
174
,
16
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
74
,
174
,
75
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
251
,
174
,
252
,
0
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
17
,
59
,
20
,
'样品名称'
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
18
,
59
,
20
,
'样品编号'
)
LODOP
.
ADD_PRINT_TEXT
(
116
,
17
,
59
,
20
,
'样品状态'
)
LODOP
.
ADD_PRINT_TEXT
(
151
,
27
,
39
,
20
,
'备注'
)
LODOP
.
ADD_PRINT_TEXT
(
16
,
95
,
100
,
20
,
'检测样品标签'
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Bold'
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
78
,
135
,
20
,
row
.
name
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
77
,
136
,
20
,
row
.
sampleCode
)
LODOP
.
ADD_PRINT_TEXT
(
117
,
76
,
176
,
20
,
'□未检 □在检 □已检 □留样'
)
if
(
row
.
surplus
===
'取回'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'☑"取回 □服务方处理'
)
}
else
if
(
row
.
surplus
===
'服务方处理'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 ☑服务方处理'
)
}
else
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 □服务方处理'
)
}
LODOP
.
PRINT_DESIGN
()
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
...
...
pages/soil-sample-manage/SoilSampleManage.vue
View file @
b0fa4083
...
...
@@ -76,13 +76,10 @@
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
DescribeDetailModal
from
'./sample-preparation/DescribeDetailModal'
import
PreparationModal
from
'./sample-preparation/Preparation'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
,
DescribeDetailModal
,
PreparationModal
},
data
()
{
...
...
@@ -227,15 +224,6 @@ export default {
}
this
.
_importItemOk
({
sampleIds
:
this
.
selectIds
,
drugItemList
:
data
})
},
// _importItemOk: async function(data) {
// const result = await drugSample.importSampleItemDTO(data)
// if (result) {
// this.$Message.success('导入成功!')
// await this._page()
// }
// },
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
...
...
@@ -257,42 +245,12 @@ export default {
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'打印标签'
:
this
.
_printLabel
()
break
case
'试样制备'
:
this
.
_samplePre
()
break
case
'批量填写土质描述详情'
:
this
.
_writeDetail
(
this
.
selectIds
)
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
...
...
@@ -314,27 +272,6 @@ export default {
this
.
$refs
.
writeDetailModal
.
_open
(
ids
)
}
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -342,19 +279,6 @@ export default {
case
'管理检测项目'
:
this
.
_itemManage
(
data
.
id
)
break
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
console
.
log
(
index
)
this
.
_deleteById
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
...
...
@@ -428,197 +352,12 @@ export default {
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
// this.$store.dispatch('FoodSample/deleteByIds', ids).then(() => {
// this._resultChange('删除成功!')
// })
this
.
_deleteOk
(
ids
)
}
})
},
// _deleteOk: async function(ids) {
// const result = await drugSample.deleteById(ids)
// if (result) {
// 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
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
contractId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
contractId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/company/import_'
+
this
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
sampleItemModal
.
_open
()
this
.
$refs
.
pageTable
.
checkedData
()
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
// this.$refs.refModal._open(this.selectIds, 'sample-rel-package-item')
this
.
$refs
.
itemPackageModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_printLabel
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
for
(
let
m
=
0
;
m
<
this
.
selectData
.
length
;
m
++
)
{
const
row
=
this
.
selectData
[
m
]
this
.
_printLabelOk
(
row
)
}
}
},
_printLabelOk
(
row
)
{
LODOP
=
getLodop
()
if
(
LODOP
===
'undefined'
||
LODOP
===
undefined
)
{
this
.
_pluginDownload
()
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Messager
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'70.01mm'
,
'50.01mm'
,
'样品标签打印'
)
LODOP
.
ADD_PRINT_LINE
(
36
,
15
,
35
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
74
,
15
,
73
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
107
,
15
,
106
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
140
,
15
,
139
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
175
,
15
,
174
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
15
,
174
,
16
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
74
,
174
,
75
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
251
,
174
,
252
,
0
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
17
,
59
,
20
,
'样品名称'
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
18
,
59
,
20
,
'样品编号'
)
LODOP
.
ADD_PRINT_TEXT
(
116
,
17
,
59
,
20
,
'样品状态'
)
LODOP
.
ADD_PRINT_TEXT
(
151
,
27
,
39
,
20
,
'备注'
)
LODOP
.
ADD_PRINT_TEXT
(
16
,
95
,
100
,
20
,
'检测样品标签'
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Bold'
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
78
,
135
,
20
,
row
.
name
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
77
,
136
,
20
,
row
.
sampleCode
)
LODOP
.
ADD_PRINT_TEXT
(
117
,
76
,
176
,
20
,
'□未检 □在检 □已检 □留样'
)
if
(
row
.
surplus
===
'取回'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'☑"取回 □服务方处理'
)
}
else
if
(
row
.
surplus
===
'服务方处理'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 ☑服务方处理'
)
}
else
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 □服务方处理'
)
}
LODOP
.
PRINT_DESIGN
()
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
...
...
pages/soil-sample-manage/SoilSampleManageHis.vue
View file @
b0fa4083
...
...
@@ -215,15 +215,6 @@ export default {
}
this
.
_importItemOk
({
sampleIds
:
this
.
selectIds
,
drugItemList
:
data
})
},
// _importItemOk: async function(data) {
// const result = await drugSample.importSampleItemDTO(data)
// if (result) {
// this.$Message.success('导入成功!')
// await this._page()
// }
// },
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
...
...
@@ -382,6 +373,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pagePrepareHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-sample-manage/sample-preparation/SamplePreparation.vue
View file @
b0fa4083
...
...
@@ -80,29 +80,8 @@ export default {
currentComponent
:
''
,
formId
:
'meterSubcontractorFormId'
,
searchOpen
:
false
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '添加'
// },
// {
// type: 'success',
// id: '',
// name: '提交至评审'
// },
// {
// type: 'success',
// id: '',
// name: '提交'
// }
],
btn
:
[],
iconMsg
:
[
// {
// type: 'md-create',
// id: '',
// name: '编辑'
// },
{
type
:
'ios-list'
,
id
:
''
,
...
...
@@ -123,11 +102,6 @@ export default {
id
:
''
,
name
:
'导出开土制备记录'
},
// {
// type: 'ios-beaker',
// id: '',
// name: '管理样品'
// },
{
type
:
'ios-camera-outline'
,
id
:
''
,
...
...
pages/soil-sample-manage/sample-receive/entrust-sample-manage/AlreadyIssuedHis.vue
View file @
b0fa4083
...
...
@@ -158,6 +158,7 @@ export default {
})
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pageSendHis
(
this
.
formObj
)
console
.
log
(
this
.
formObj
)
if
(
result
)
{
...
...
pages/soil-sample-manage/sample-receive/entrust-sample-manage/SoilSampleItemManage.vue
View file @
b0fa4083
...
...
@@ -11,11 +11,8 @@
<Col
span=
"24"
>
<Form
id=
"search-sample-company"
v-show=
"searchOpen"
:label-width=
"90"
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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-sample-manage/sample-receive/entrust-sample-manage/WaitReceiveHis.vue
View file @
b0fa4083
...
...
@@ -155,6 +155,7 @@ export default {
})
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pageReceiveHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
plugins/common.js
View file @
b0fa4083
...
...
@@ -977,7 +977,7 @@ Vue.prototype.$optColWidth = function(list) {
Vue
.
prototype
.
$defRow
=
500
Vue
.
prototype
.
$setOptimization
=
function
(
msg
)
{
// 默认 数据超过200条,启用虚拟加载,每次加载50条
let
result
=
{
gt
:
200
,
oSize
:
20
,
rSize
:
5
0
}
let
result
=
{
gt
:
200
,
oSize
:
10
0
}
switch
(
msg
)
{
case
'modal-normal'
:
// 弹出框正常情况下-- 数据超过25条启用虚拟加载
...
...
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