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
354854c3
Commit
354854c3
authored
Dec 28, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了库房位置管理
parent
e2daa995
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
3223 additions
and
6 deletions
+3223
-6
soil-sample.js
api/soil/soil-sample.js
+15
-1
EntrustIndex.vue
pages/soil-alone-sample-instock/EntrustIndex.vue
+60
-0
EntrustRegister.vue
pages/soil-alone-sample-instock/EntrustRegister.vue
+407
-0
EntrustRegisterEdit.vue
pages/soil-alone-sample-instock/EntrustRegisterEdit.vue
+837
-0
EntrustRegisterHis.vue
pages/soil-alone-sample-instock/EntrustRegisterHis.vue
+246
-0
RegisterDetail.vue
pages/soil-alone-sample-instock/RegisterDetail.vue
+58
-0
SampleItemEdit.vue
pages/soil-alone-sample-instock/SampleItemEdit.vue
+241
-0
SampleItemRemove.vue
pages/soil-alone-sample-instock/SampleItemRemove.vue
+230
-0
ViewDetail.vue
pages/soil-alone-sample-instock/ViewDetail.vue
+76
-0
AddressManage.vue
...e-sample-manage/storehouse-place-manage/AddressManage.vue
+260
-0
AddressManageEdit.vue
...mple-manage/storehouse-place-manage/AddressManageEdit.vue
+232
-0
ViewLocationEntrust.vue
...le-manage/storehouse-place-manage/ViewLocationEntrust.vue
+286
-0
ViewSample.vue
...lone-sample-manage/storehouse-place-manage/ViewSample.vue
+254
-0
EntrustRegister.vue
pages/soil-alone-sample/EntrustRegister.vue
+0
-1
EntrustRegisterEdit.vue
pages/soil-alone-sample/EntrustRegisterEdit.vue
+9
-4
soil-routes.js
router/soil-routes.js
+12
-0
No files found.
api/soil/soil-sample.js
View file @
354854c3
...
...
@@ -221,5 +221,19 @@ export default {
)
.
then
(
res
=>
res
),
aloneSamplePage
:
data
=>
http
.
post
(
'soil/v1/alone_sample/page'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/alone_sample/page'
,
data
).
then
(
res
=>
res
),
aloneWarehouseLocation
:
data
=>
http
.
post
(
'soil/v1/alone_warehouse_location/page'
,
data
).
then
(
res
=>
res
),
aloneWarehouseLocationAdd
:
data
=>
http
.
post
(
'soil/v1/alone_warehouse_location/'
,
data
).
then
(
res
=>
res
),
aloneWarehouseLocationGetById
:
data
=>
http
.
get
(
'soil/v1/alone_warehouse_location/'
+
data
).
then
(
res
=>
res
),
aloneWarehouseLocationEdit
:
data
=>
http
.
put
(
'soil/v1/alone_warehouse_location/'
+
data
.
id
,
data
.
obj
)
.
then
(
res
=>
res
),
aloneWarehouseLocationDelete
:
data
=>
http
.
delete
(
'soil/v1/alone_warehouse_location/?ids='
+
data
)
.
then
(
res
=>
res
)
}
pages/soil-alone-sample-instock/EntrustIndex.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"待完成"
name=
"wait"
></el-tab-pane>
<el-tab-pane
label=
"历史记录"
name=
"his"
></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
></component>
</keep-alive>
</div>
</div>
</div>
</
template
>
<
script
>
import
MeterSendEntrust
from
'./EntrustRegister'
import
MeterSendEntrustHis
from
'./EntrustRegisterHis'
export
default
{
name
:
'MeterSendEntrustIndex'
,
components
:
{
// eslint-disable-next-line vue/no-unused-components
MeterSendEntrust
,
// eslint-disable-next-line vue/no-unused-components
MeterSendEntrustHis
},
data
()
{
return
{
activeName
:
'wait'
,
currentComponent
:
''
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
currentComponent
=
'MeterSendEntrust'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_page
()
})
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
currentComponent
=
'MeterSendEntrust'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_page
()
})
}
else
{
this
.
currentComponent
=
'MeterSendEntrustHis'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_page
()
})
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/soil-alone-sample-instock/EntrustRegister.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<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.entrustCode"
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"项目名称:"
>
<Input
v-model=
"formObj.projectName"
@
on-enter=
"_formSearch"
name=
"projectName"
placeholder=
"请输入项目名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<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"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<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"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<div
v-else-if=
"item.detail"
>
<a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
</div>
</template>
<
script
>
import
{
soilEntrust
,
soilSample
}
from
'../../api'
import
Operation
from
'../../components/operation/Operation'
import
importModal
from
'../../components/import/DownloadTemplateImport'
import
EntrustRegisterEdit
from
'./EntrustRegisterEdit'
import
RegisterDetail
from
'./RegisterDetail'
import
ViewDetail
from
'./ViewDetail'
export
default
{
components
:
{
// eslint-disable-next-line vue/no-unused-components
Operation
,
// eslint-disable-next-line vue/no-unused-components
EntrustRegisterEdit
,
// eslint-disable-next-line vue/no-unused-components
importModal
,
// eslint-disable-next-line vue/no-unused-components
RegisterDetail
,
// eslint-disable-next-line vue/no-unused-components
ViewDetail
},
data
()
{
return
{
currentComponent
:
''
,
formId
:
'meterSubcontractorFormId'
,
searchOpen
:
false
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'登记'
},
{
type
:
'success'
,
id
:
''
,
name
:
'提交'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-list'
,
id
:
''
,
name
:
'查看'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
formObj
:
{
client
:
undefined
,
contractCode
:
undefined
,
entrustCode
:
undefined
},
selectIds
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'项目负责人'
,
key
:
'projectLeader'
,
width
:
150
,
detail
:
true
},
{
title
:
'钻孔孔号'
,
key
:
'boreholeNumber'
,
width
:
120
},
{
title
:
'箱数'
,
key
:
'casesNum'
,
width
:
120
},
{
title
:
'登记日期'
,
key
:
'registTime'
,
width
:
120
,
date
:
true
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{},
methods
:
{
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'试验委托单导入'
:
this
.
_import
()
break
case
'登记'
:
this
.
_editModal
(
false
)
break
case
'提交至评审'
:
this
.
_submitToReview
()
break
case
'提交'
:
this
.
_submitToSkipReview
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_detailModal
(
data
)
{
console
.
log
(
data
)
this
.
_getUserInfo
(
data
)
this
.
currentComponent
=
'RegisterDetail'
},
_getUserInfo
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
getUserByGroupId
({
realname
:
data
.
projectLeader
,
id
:
data
.
projectLeaderId
})
if
(
result
)
{
this
.
$refs
.
refModal
.
_open
(
result
)
}
},
_import
()
{
this
.
currentComponent
=
'importModal'
const
data
=
{
importUrl
:
'/soil/v1/entrust/import_entrust/'
,
downloadUrl
:
'/soil/v1/excel/template/SoilEntrustImport'
,
title
:
'试验委托单导入'
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
data
,
'试验委托单导入'
)
})
},
_componentResult
(
msg
,
data
)
{
switch
(
this
.
currentComponent
)
{
case
'MeterSubcontractorEdit'
:
this
.
_formSearch
()
break
case
'DrugSampleManage'
:
this
.
_formSearch
()
break
case
'FileManage'
:
this
.
_fileResult
(
msg
,
data
)
break
default
:
this
.
_page
()
}
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'查看'
:
this
.
_viewModal
(
true
,
data
.
id
)
break
case
'试样列表'
:
this
.
_sampleManage
(
data
.
id
)
break
case
'试验项目列表'
:
this
.
_itemManage
(
data
.
id
)
break
case
'附件'
:
this
.
_upload
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
})
},
_sampleManage
(
data
)
{
// 管理样品
this
.
currentComponent
=
'SoilSampleManage'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
data
)
})
},
_itemManage
(
data
)
{
// 管理样品
this
.
currentComponent
=
'SoilSampleItemManage'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openByEntrustId
(
data
)
})
},
_submitToReview
()
{
this
.
_submitByContractIds
(
'委托评审'
)
},
_submitToSkipReview
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要提交 '
+
ids
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_subToSkipRe
(
ids
)
}
})
}
},
_submitByContractIds
(
cont
)
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
onOk
:
()
=>
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_subToRe
(
ids
)
}
})
}
},
_subToRe
:
async
function
(
ids
)
{
const
result
=
await
soilEntrust
.
submit
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_subToSkipRe
:
async
function
(
ids
)
{
const
result
=
await
soilEntrust
.
submitSkipReview
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
this
.
$refs
.
pageTable
.
_hideLoading
()
},
_record
(
id
)
{
this
.
currentComponent
=
'Operation'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
id
)
})
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'page'
:
this
.
_page
()
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilSample
.
aloneSamplePage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
// 编辑&添加
_editModal
(
edit
,
id
)
{
this
.
currentComponent
=
'EntrustRegisterEdit'
if
(
edit
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
// 编辑
this
.
_getById
(
id
)
}
else
{
// 添加
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
()
})
}
},
_viewModal
(
edit
,
id
)
{
this
.
currentComponent
=
'ViewDetail'
if
(
edit
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
// 编辑
this
.
_getDetailById
(
id
)
}
else
{
// 添加
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
()
})
}
},
_getDetailById
:
async
function
(
id
)
{
const
result
=
await
soilEntrust
.
aloneSampleGetById
(
id
)
if
(
result
)
{
this
.
$refs
.
refModal
.
_open
(
result
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_upload
(
id
)
{
// 上传文件
this
.
currentComponent
=
'FileManage'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
id
,
'entrustId'
)
})
},
_getById
:
async
function
(
id
)
{
const
result
=
await
soilEntrust
.
aloneSampleGetById
(
id
)
if
(
result
)
{
this
.
$refs
.
refModal
.
_openEdit
(
result
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
soilEntrust
.
aloneSampleDelete
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
}
}
}
</
script
>
pages/soil-alone-sample-instock/EntrustRegisterEdit.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"900"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"MeterSendTestEdit"
ref=
"formObj"
:model=
"formObj"
:label-width=
"90"
inline
>
<!--
<Form-item
label=
"委托商"
prop=
"client"
class=
"width-48"
>
-->
<!--
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.client"
:down-data=
"customerData"
--
>
<!-- @on-result-change="_cusNameChange" name="client" placeholder="请输入或选择委托单位"-->
<!-- >
</AutoComplete>
-->
<!--
</Form-item>
-->
<Form-item
label=
"接收人"
prop=
"receiver"
class=
"width-48"
>
<Input
v-model=
"formObj.receiver"
name=
"receiver"
placeholder=
"请输入接收人"
/>
</Form-item>
<Form-item
label=
"接收日期:"
prop=
"receiveTime"
class=
"width-48"
>
<Date-picker
v-model=
"formObj.receiveTime"
@
on-change=
"_ctimeChange"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择接收日期"
name=
"receiveTime"
></Date-picker>
</Form-item>
<Form-item
label=
"项目名称"
prop=
"projectName"
class=
"width-48"
>
<!--
<Input
v-model=
"formObj.projectName"
name=
"projectName"
placeholder=
"请输入项目名称"
/>
-->
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.projectName"
:down-data=
"projectData"
@
on-result-change=
"_projectChange"
name=
"projectName"
placeholder=
"请输入或选择项目名称"
></AutoComplete>
</Form-item>
<Form-item
@
click
.
native=
"_selectProjectPerson"
label=
"项目负责人"
prop=
"projectLeader"
class=
"width-48"
>
<Input
v-model=
"formObj.projectLeader"
name=
"projectLeader"
placeholder=
"请输入项目负责人"
/>
</Form-item>
<Form-item
label=
"钻孔名称"
prop=
"boreholeName"
class=
"width-48"
>
<Input
v-model=
"formObj.boreholeName"
name=
"boreholeName"
placeholder=
"请输入名称"
/>
</Form-item>
<Form-item
label=
"箱数"
prop=
"casesNum"
class=
"width-48"
>
<Input
v-model=
"formObj.casesNum"
name=
"casesNum"
placeholder=
"请输入箱数"
/>
</Form-item>
<Form-item
@
click
.
native=
"_selectRegisterPerson"
label=
"登记人"
prop=
"registrant"
class=
"width-48"
>
<Input
v-model=
"formObj.registrant"
name=
"registrant"
placeholder=
"请输入登记人"
/>
</Form-item>
<Form-item
label=
"登记日期:"
prop=
"registTime"
class=
"width-48"
>
<Date-picker
v-model=
"formObj.registTime"
@
on-change=
"_tabulateChange"
name=
"registTime"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择登记日期"
></Date-picker>
</Form-item>
<!--
<Form-item
label=
"检验类别"
prop=
"testType"
class=
"width-48"
>
-->
<!--
<Input
v-model=
"formObj.testType"
name=
"testType"
placeholder=
"请输入名称"
/>
-->
<!--
</Form-item>
-->
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<importModal
ref=
"importModal"
@
on-result-change=
"_inputBack"
aptitude-item
></importModal>
<SampleItemSelect
ref=
"sampleItemSelectModal"
@
on-result-change=
"_itemImportBack"
is-change
/>
<assignPerson
ref=
"userModal"
@
on-result-change=
"_userResult"
></assignPerson>
<SampleItemRemove
ref=
"sampleItemRemove"
@
on-result-change =
'_removeItemBack'
></SampleItemRemove>
<SampleItemEdit
ref=
"sampleItemEdit"
@
on-result-change =
'_removeItemBack'
></SampleItemEdit>
</div>
</
template
>
<
script
>
/**
* 添加编辑分包商
*/
import
{
meterEntrust
,
meterSample
,
soilEntrust
}
from
'../../api'
import
importModal
from
'../../components/import/DownloadTemplateImport'
import
AutoComplete
from
'../../components/base/AutoCompletes'
import
SampleItemSelect
from
'../meter-aptitude/standard-manage/SampleItemSelect'
import
assignPerson
from
'../../components/user-info-single/assignPerson'
import
Global
from
'../../api/config'
import
SampleItemRemove
from
'./SampleItemRemove'
import
SampleItemEdit
from
'./SampleItemEdit'
export
default
{
components
:
{
AutoComplete
,
importModal
,
SampleItemSelect
,
assignPerson
,
SampleItemRemove
,
SampleItemEdit
},
data
()
{
return
{
formId
:
'meterSendTestEditFormId'
,
getPage
:
{
records
:
[]
},
showBtn
:
true
,
customerData
:
[],
projectData
:
[],
edit
:
false
,
cityData
:
[],
selectData
:
[],
sampleItemList
:
[],
searchOpen
:
true
,
testedCityData
:
[],
judgeType
:
[{
value
:
1
,
name
:
'是'
},
{
value
:
0
,
name
:
'否'
}],
iconMsg
:
[
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
140
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
140
},
{
title
:
'试验项目'
,
key
:
'experiments'
,
width
:
140
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
140
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
150
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'success'
,
id
:
''
,
name
:
'导入试验项目'
}
],
btnEdit
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'success'
,
id
:
''
,
name
:
'导入样品'
},
{
type
:
'success'
,
id
:
''
,
name
:
'导入试验项目'
}
],
options
:
[
{
name
:
'检定'
},
{
name
:
'校准'
},
{
name
:
'外观检查'
}
],
typeoptions
:
[],
personType
:
''
,
packList
:
[],
soilList
:
[],
currentIndex
:
-
1
,
id
:
''
,
modalTitle
:
''
,
subcontractorId
:
''
,
formObj
:
{},
selectIds
:
[],
indexList
:
[],
itemList
:
[],
clearingWayList
:
[
'款到后测试'
,
'先测试后付款'
,
'其他情况()'
],
clearingWayListTemp
:
[
'款到后测试'
,
'先测试后付款'
,
'其他情况()'
],
showModal
:
false
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
aptitudeData
:
[]
}
},
methods
:
{
typeChange
(
data
)
{
this
.
$forceUpdate
()
this
.
formObj
.
testType
=
data
},
_removeItem
(
itemInfo
)
{
console
.
log
(
'试验项目'
,
itemInfo
)
this
.
sampleItemList
=
itemInfo
.
experimentList
if
(
itemInfo
.
sampleCode
!==
''
)
{
this
.
$refs
.
sampleItemEdit
.
_open
(
this
.
sampleItemList
)
}
else
{
this
.
$refs
.
sampleItemRemove
.
_open
(
this
.
sampleItemList
)
}
},
_removeItemBack
(
data
)
{
this
.
$forceUpdate
()
if
(
data
)
{
this
.
getPage
.
records
[
this
.
currentIndex
].
experimentList
=
data
const
itemNames
=
[]
for
(
let
j
=
0
;
j
<
data
.
length
;
j
++
)
{
itemNames
.
push
(
data
[
j
].
name
)
}
this
.
getPage
.
records
[
this
.
currentIndex
].
experiments
=
itemNames
.
join
(
','
)
}
this
.
$set
(
this
.
getPage
.
records
,
this
.
currentIndex
,
this
.
getPage
.
records
[
this
.
currentIndex
]
)
},
_itemImportBack
(
data
)
{
this
.
$forceUpdate
()
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
data
[
i
].
id
=
undefined
}
const
info
=
data
for
(
let
i
=
0
;
i
<
this
.
indexList
.
length
;
i
++
)
{
const
index
=
this
.
indexList
[
i
]
if
(
this
.
getPage
.
records
[
index
].
experimentList
!==
undefined
&&
this
.
getPage
.
records
[
index
].
experimentList
!==
[]
)
{
const
name
=
[]
this
.
itemList
=
this
.
getPage
.
records
[
index
].
experimentList
name
.
push
(
this
.
getPage
.
records
[
index
].
experiments
)
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
this
.
itemList
.
push
(
info
[
i
])
name
.
push
(
info
[
i
].
name
)
}
this
.
getPage
.
records
[
index
].
experiments
=
name
.
join
(
'、'
)
this
.
getPage
.
records
[
index
].
experimentList
=
this
.
itemList
this
.
$set
(
this
.
getPage
.
records
,
index
,
this
.
getPage
.
records
[
index
])
}
else
{
const
name
=
[]
this
.
itemList
=
[]
for
(
let
i
=
0
;
i
<
info
.
length
;
i
++
)
{
this
.
itemList
.
push
(
info
[
i
])
name
.
push
(
info
[
i
].
name
)
}
this
.
getPage
.
records
[
index
].
experiments
=
name
.
join
(
'、'
)
this
.
getPage
.
records
[
index
].
experimentList
=
this
.
itemList
this
.
$set
(
this
.
getPage
.
records
,
index
,
this
.
getPage
.
records
[
index
])
}
}
},
_selectProjectPerson
()
{
this
.
personType
=
'project'
this
.
$refs
.
userModal
.
_openOrg
(
'选择人员'
,
'itemTree'
)
},
_selectRegisterPerson
()
{
this
.
personType
=
'resistrant'
this
.
$refs
.
userModal
.
_openOrg
(
'选择人员'
,
'itemTree'
)
},
_userResult
(
data
,
msg
)
{
console
.
log
(
msg
)
this
.
$forceUpdate
()
if
(
this
.
personType
===
'resistrant'
)
{
this
.
formObj
.
registrant
=
data
.
realname
this
.
formObj
.
registrantId
=
data
.
id
}
else
{
this
.
formObj
.
projectLeader
=
data
.
realname
this
.
formObj
.
projectLeaderId
=
data
.
id
}
},
_packChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
samplePack
=
data
break
case
'query'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
samplePack
=
data
break
}
},
_soilChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
sampleDescribe
=
data
break
case
'query'
:
this
.
getPage
.
records
[
this
.
currentIndex
].
sampleDescribe
=
data
break
}
},
_cusNameChange
(
msg
,
data
)
{
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加的时候选择单位
switch
(
msg
)
{
case
'select'
:
this
.
_customerMatch
(
data
)
break
case
'query'
:
this
.
_cusNameQuery
(
data
)
break
}
}
else
if
(
this
.
customerData
.
indexOf
(
data
)
!==
-
1
)
{
this
.
_getQueryList
(
data
)
}
else
{
this
.
_cusNameQuery
(
data
)
}
},
_customerMatch
(
data
)
{
this
.
_getQueryList
(
data
)
},
_cusNameQuery
(
query
)
{
console
.
log
(
'query'
,
query
)
this
.
formObj
.
client
=
query
this
.
_getQueryList
(
query
)
},
_projectChange
(
msg
,
data
)
{
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加的时候选择单位
switch
(
msg
)
{
case
'select'
:
this
.
_projectMatch
(
data
)
break
case
'query'
:
this
.
_projectQuery
(
data
)
break
}
}
else
if
(
this
.
projectData
.
indexOf
(
data
)
!==
-
1
)
{
this
.
_getProjectQueryList
(
data
)
}
else
{
this
.
_projectQuery
(
data
)
}
},
_projectMatch
(
data
)
{
this
.
_getQueryList
(
data
)
},
_projectQuery
(
query
)
{
this
.
formObj
.
projectName
=
query
this
.
_getProjectQueryList
(
query
)
},
_btnClick
(
msg
)
{
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'添加'
:
this
.
_add
()
break
case
'导入试验项目'
:
this
.
_importItem
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择至少一条数据!'
)
}
else
{
this
.
$refs
.
sampleItemSelectModal
.
_open
()
this
.
allSelect
(
this
.
selectData
)
}
},
_getByEntrustId
:
async
function
(
id
)
{
const
result
=
await
soilEntrust
.
getVOById
(
id
)
if
(
result
)
{
this
.
$forceUpdate
()
const
sampleList
=
Object
.
assign
(
this
.
getPage
.
records
,
result
.
sampleList
)
this
.
$set
(
this
.
getPage
.
records
,
sampleList
)
}
},
_inputBack
(
data
)
{
if
(
data
)
{
this
.
_getByEntrustId
(
this
.
id
)
}
},
_ctimeChange
(
data
)
{
this
.
formObj
.
receiveTime
=
data
},
_tabulateChange
(
data
)
{
this
.
formObj
.
registTime
=
data
},
_odateChange
(
data
)
{
this
.
formObj
.
odate
=
data
},
_judgeBasisChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
stdId
=
data
.
id
this
.
formObj
.
code
=
data
.
stdNum
this
.
formObj
.
name
=
data
.
name
this
.
$refs
.
formObj
.
validateField
(
'code'
)
break
case
'query'
:
this
.
formObj
.
stdId
=
''
this
.
formObj
.
code
=
data
.
stdNum
this
.
formObj
.
name
=
''
this
.
_getJudgeBasisList
(
data
.
stdNum
)
break
case
'focus'
:
this
.
_getJudgeBasisList
()
break
case
'blur'
:
if
(
this
.
formObj
.
stdId
===
''
)
{
this
.
formObj
.
code
=
''
this
.
_getJudgeBasisList
()
}
this
.
$refs
.
formObj
.
validateField
(
'code'
)
}
},
_selectjudgeBasis
(
index
)
{
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_selectverification
(
index
)
{
this
.
index
=
index
this
.
$refs
.
VerificationModal
.
_open
()
},
_selectcontractCode
()
{
this
.
$refs
.
ContractModal
.
_open
()
},
_backData
(
data
)
{
this
.
$forceUpdate
()
console
.
log
(
typeof
this
.
index
)
this
.
getPage
.
records
[
this
.
index
].
name
=
data
.
name
this
.
getPage
.
records
[
this
.
index
].
aptitudeId
=
data
.
id
this
.
getPage
.
records
[
this
.
index
].
verification
=
data
.
code
+
data
.
basis
this
.
getPage
.
records
[
this
.
index
].
price
=
data
.
price
this
.
getPage
.
records
[
this
.
index
].
totalPrice
=
data
.
price
*
this
.
getPage
.
records
[
this
.
index
].
quantity
},
_backContract
(
data
)
{
this
.
formObj
.
client
=
data
.
client
this
.
formObj
.
operation
.
person
=
data
.
person
this
.
formObj
.
operation
.
tel
=
data
.
tel
this
.
formObj
.
operation
.
fax
=
data
.
fax
if
(
data
.
province
)
{
this
.
testedCityData
=
[
data
.
province
,
data
.
city
,
data
.
county
]
this
.
formObj
.
province
=
data
.
province
this
.
formObj
.
city
=
data
.
city
this
.
formObj
.
county
=
data
.
county
}
this
.
formObj
.
street
=
data
.
street
this
.
formObj
.
entrustDate
=
new
Date
(
data
.
entrustDate
)
this
.
formObj
.
odate
=
new
Date
(
data
.
odate
)
this
.
formObj
.
contractCode
=
data
.
salesCode
this
.
formObj
.
operation
.
fee
=
data
.
discountPrice
if
(
data
.
sampleQuoteList
)
{
this
.
getPage
.
records
=
data
.
sampleQuoteList
}
else
{
this
.
getPage
.
records
=
[]
}
},
_backVerification
(
data
)
{
this
.
$forceUpdate
()
this
.
getPage
.
records
[
this
.
index
].
verification
=
data
.
verification
},
_add
()
{
const
data
=
{
sampleCode
:
''
,
sampleDepth
:
''
,
samplePack
:
''
,
sampleDescribe
:
''
,
siteNo
:
''
,
experiments
:
''
}
this
.
getPage
.
records
.
push
(
data
)
},
_getPackList
:
async
function
()
{
const
result
=
await
soilEntrust
.
testType
(
'样品包装类型'
)
if
(
result
)
{
const
pack
=
[]
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
pack
.
push
(
result
[
i
].
name
)
}
this
.
packList
=
pack
}
},
_getSoil
:
async
function
()
{
const
result
=
await
soilEntrust
.
testType
(
'土质描述'
)
if
(
result
)
{
const
soilRemark
=
[]
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
soilRemark
.
push
(
result
[
i
].
name
)
}
this
.
soilList
=
soilRemark
}
},
_importSample
()
{
const
data
=
{
importUrl
:
'/soil/v1/entrust/edit_import_entrust/?id='
+
this
.
id
,
downloadUrl
:
'/meter/v1/excel/template/MeterSampleImport'
,
title
:
'样品导入'
}
this
.
$refs
.
importModal
.
_open
(
data
,
'样品导入'
)
},
_tableResultChange
(
msg
,
data
,
selData
)
{
switch
(
msg
)
{
case
'selectIds'
:
this
.
selectIds
=
data
this
.
selectData
=
selData
console
.
log
(
this
.
selectIds
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
rowIndex
)
break
}
},
allSelect
(
data
)
{
console
.
log
(
data
)
this
.
indexList
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
indexList
.
push
(
data
[
i
].
index
)
}
console
.
log
(
'索引'
,
this
.
indexList
)
},
// 省 市 区
_cascaderResult
(
name
,
data
,
msg
)
{
switch
(
name
)
{
case
'cus'
:
this
.
_casChange
(
data
,
msg
)
break
case
'tested'
:
this
.
_testedChange
(
data
,
msg
)
break
}
},
_emptyProvince
()
{
this
.
cityData
=
[]
this
.
testedCityData
=
[]
// this.formObj.tested.testedProvince = ''
// this.formObj.tested.testedCity = ''
// this.formObj.tested.testedCounty = ''
// this.formObj.testedTemp.testedProvince = ''
// this.formObj.testedTemp.testedCity = ''
// this.formObj.testedTemp.testedCounty = ''
},
_testedChange
(
data
,
msg
)
{
// 省、市、区
if
(
msg
===
'clear'
)
{
// this.formObj.tested.testedProvince = ''
// this.formObj.tested.testedCity = ''
// this.formObj.tested.testedCounty = ''
this
.
formObj
.
testedTemp
.
testedProvince
=
''
this
.
formObj
.
testedTemp
.
testedCity
=
''
this
.
formObj
.
testedTemp
.
testedCounty
=
''
this
.
formObj
.
province
=
''
this
.
formObj
.
city
=
''
this
.
formObj
.
county
=
''
this
.
testedCityData
=
[]
}
else
{
// this.formObj.tested.testedProvince = data.value[0]
// this.formObj.tested.testedCity = data.value[1]
// this.formObj.tested.testedCounty = data.value[2]
this
.
formObj
.
province
=
data
.
value
[
0
]
this
.
formObj
.
city
=
data
.
value
[
1
]
this
.
formObj
.
county
=
data
.
value
[
2
]
this
.
testedCityData
=
[
data
.
value
[
0
],
data
.
value
[
1
],
data
.
value
[
2
]]
}
},
_iconClick
(
res
,
data
,
index
)
{
switch
(
res
)
{
case
'编辑'
:
// this._editModal(true, data.id)
break
case
'删除'
:
this
.
getPage
.
records
.
splice
(
index
,
1
)
break
case
'操作日志'
:
// this._record(data.id)
break
}
},
_deleteSample
(
data
)
{
if
(
data
.
id
===
undefined
)
{
return
false
}
else
{
this
.
_delete
(
data
.
id
)
}
},
_delete
:
async
function
(
id
)
{
const
result
=
await
meterSample
.
deleteById
(
id
)
if
(
result
)
{
console
.
log
(
result
)
}
},
_selectAptitude
(
data
)
{
console
.
log
(
data
)
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
this
.
showModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'MeterSendTestEdit'
)
console
.
log
(
this
.
getPage
.
records
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加
if
(
this
.
formObj
.
projectLeaderId
)
{
data
.
projectLeaderId
=
this
.
formObj
.
projectLeaderId
}
if
(
this
.
formObj
.
registrantId
)
{
data
.
registrantId
=
this
.
formObj
.
registrantId
}
console
.
log
(
'saveData'
,
data
)
this
.
_save
(
data
)
}
else
{
data
.
id
=
this
.
id
if
(
this
.
formObj
.
projectLeaderId
)
{
data
.
projectLeaderId
=
this
.
formObj
.
projectLeaderId
}
if
(
this
.
formObj
.
registrantId
)
{
data
.
registrantId
=
this
.
formObj
.
registrantId
}
this
.
_edit
(
data
)
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
}
})
},
_wayResult
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
clearingWay
=
data
break
case
'query'
:
this
.
formObj
.
clearingWay
=
data
this
.
_wayQuery
(
data
)
break
}
},
_wayQuery
(
query
)
{
if
(
query
===
''
)
{
this
.
clearingWayList
=
this
.
clearingWayListTemp
}
else
{
this
.
clearingWayList
=
this
.
clearingWayListTemp
.
filter
(
item
=>
item
.
indexOf
(
query
)
>
-
1
)
}
},
_cancel
()
{
this
.
showModal
=
false
},
_open
(
formObj
)
{
this
.
$refs
.
autoInput
.
_clear
()
this
.
edit
=
false
this
.
_getList
()
this
.
_getTestType
()
this
.
_getPackList
()
this
.
_getProjectList
()
this
.
_getSoil
()
this
.
_getUser
()
this
.
showBtn
=
true
this
.
showModal
=
true
this
.
_getUser
()
this
.
_hideLoading
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
$refs
.
formObj
.
resetFields
()
this
.
getPage
.
records
=
[]
this
.
formObj
.
client
=
''
this
.
id
=
''
this
.
formObj
.
entrustDate
=
new
Date
()
this
.
modalTitle
=
'委托单新增'
}
},
_openEdit
(
formObj
)
{
this
.
edit
=
true
console
.
log
(
formObj
)
this
.
_getList
()
this
.
_getTestType
()
this
.
_getPackList
()
this
.
_getSoil
()
this
.
showBtn
=
false
this
.
showModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
this
.
_getUser
()
this
.
getPage
.
records
=
[]
this
.
_hideLoading
()
this
.
id
=
''
this
.
modalTitle
=
'委托单编辑'
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
_showTime
(
formObj
)
// for (let i = 0; i
<
formObj
.
sampleList
.
length
;
i
++
)
{
// if (formObj.sampleList[i].lastTime !== undefined) {
// this.getPage.records[i].lastTime = new Date(
// formObj.sampleList[i].lastTime
// )
// }
// }
},
_getUser
()
{
const
user
=
Global
.
getUserInfo
()
this
.
formObj
.
tabulater
=
user
.
realname
},
_getTestType
:
async
function
()
{
const
result
=
await
soilEntrust
.
testType
(
'检验类别'
)
console
.
log
(
result
)
if
(
result
)
{
console
.
log
(
'检验类别'
,
result
)
this
.
typeoptions
=
result
}
},
_showTime
(
formObj
)
{
if
(
this
.
formObj
.
receiveTime
===
undefined
)
{
this
.
formObj
.
receiveTime
=
''
}
else
{
this
.
formObj
.
receiveTime
=
new
Date
(
formObj
.
receiveTime
)
}
if
(
this
.
formObj
.
registTime
===
undefined
)
{
this
.
formObj
.
registTime
=
''
}
else
{
this
.
formObj
.
registTime
=
new
Date
(
formObj
.
registTime
)
}
},
_showAddress
(
formObj
)
{
this
.
testedCityData
=
[]
if
(
formObj
.
province
!==
undefined
&&
formObj
.
city
!==
undefined
&&
formObj
.
county
!==
undefined
)
{
this
.
testedCityData
.
push
(
formObj
.
province
)
this
.
testedCityData
.
push
(
formObj
.
city
)
this
.
testedCityData
.
push
(
formObj
.
county
)
}
},
_getList
:
async
function
()
{
const
result
=
await
meterEntrust
.
pageList
()
const
list
=
[]
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
list
.
push
(
result
[
i
].
cname
)
}
this
.
customerData
=
list
}
},
_getProjectList
:
async
function
()
{
const
result
=
await
soilEntrust
.
testType
(
'项目名称'
)
const
projectlist
=
[]
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
projectlist
.
push
(
result
[
i
].
name
)
}
this
.
projectData
=
projectlist
}
},
_getQueryList
:
async
function
(
data
)
{
const
result
=
await
meterEntrust
.
pageQueryList
(
data
)
const
queryList
=
[]
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
queryList
.
push
(
result
[
i
].
cname
)
}
this
.
customerData
=
queryList
console
.
log
(
'委托商'
,
result
)
}
},
_getProjectQueryList
:
async
function
(
data
)
{
const
queryData
=
{}
queryData
.
type
=
'项目名称'
queryData
.
name
=
data
const
result
=
await
soilEntrust
.
projectQueryList
(
queryData
)
const
queryList
=
[]
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
queryList
.
push
(
result
[
i
].
name
)
}
this
.
projectData
=
queryList
console
.
log
(
'项目名称'
,
result
)
}
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
aloneSampleAdd
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
else
{
setTimeout
(()
=>
{
this
.
_hideLoading
()
},
500
)
}
},
_edit
:
async
function
(
data
)
{
this
.
_hideLoading
()
const
result
=
await
soilEntrust
.
aloneSampleEdit
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_sampleEdit
:
async
function
(
data
)
{
this
.
_hideLoading
()
const
result
=
await
soilEntrust
.
editDTO
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'编辑成功'
)
}
},
_visibleChange
(
data
)
{
this
.
$forceUpdate
()
console
.
log
(
'清空'
)
this
.
formObj
.
client
=
''
this
.
formObj
=
{}
}
}
}
</
script
>
<
style
>
.vxe-table--tooltip-wrapper
{
z-index
:
2147483647
!important
;
}
</
style
>
pages/soil-alone-sample-instock/EntrustRegisterHis.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<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"
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托单位"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托单号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<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"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<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"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
></component>
</keep-alive>
</div>
</template>
<
script
>
import
{
soilAptitude
,
soilEntrust
}
from
'../../api'
import
MeterEntrustRecord
from
'../../components/operation/Operation'
export
default
{
// eslint-disable-next-line vue/no-unused-components
components
:
{
MeterEntrustRecord
},
data
()
{
return
{
currentComponent
:
''
,
formId
:
'meterSubcontractorFormId'
,
searchOpen
:
true
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '添加'
// }
],
iconMsg
:
[
{
type
:
'ios-list'
,
id
:
''
,
name
:
'试样列表'
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'操作日志'
}
],
formObj
:
{
client
:
undefined
,
entrustCode
:
undefined
},
selectIds
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
120
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
120
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
120
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
120
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
120
,
status
:
true
},
{
title
:
'平均容重'
,
key
:
'projectNo'
,
width
:
120
},
{
title
:
'报告编号'
,
key
:
'reportCode'
,
width
:
120
},
{
title
:
'制表日期'
,
key
:
'tabulateDate'
,
width
:
120
,
date
:
true
},
{
title
:
'制表人'
,
key
:
'tabulater'
,
width
:
120
},
{
title
:
'批准日期'
,
key
:
'approveDate'
,
width
:
120
,
date
:
true
},
{
title
:
'批准人'
,
key
:
'approver'
,
width
:
120
},
{
title
:
'检验类别'
,
key
:
'testType'
,
width
:
120
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'资质项目'
:
this
.
_itemModal
(
data
.
id
)
break
case
'附件'
:
this
.
_upload
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
case
'查看样品'
:
this
.
_sampleManage
(
data
.
id
)
break
case
'试样列表'
:
this
.
_sampleManage
(
data
.
id
)
break
}
})
},
_sampleManage
(
data
)
{
// 管理样品
this
.
currentComponent
=
'SoilSampleManage'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
data
)
})
// this.$refs.sampleManageModal._open(data)
},
_record
(
id
)
{
this
.
currentComponent
=
'MeterEntrustRecord'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
id
)
})
// this.$refs.entrustRecordModal._open(id)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilEntrust
.
pageRegHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
// 编辑&添加
_editModal
(
edit
,
id
)
{
if
(
edit
)
{
// 编辑
// this.$refs.editSubcontractorModal._open(id)
this
.
_getById
(
id
)
}
else
{
// 添加
this
.
$refs
.
editSubcontractorModal
.
_open
()
}
},
// 追加项目
_itemModal
(
data
)
{
this
.
$refs
.
refModal
.
_open
(
data
)
},
_upload
(
id
)
{
// 上传文件
this
.
$refs
.
refModal
.
_open
(
id
,
'subcontractorId'
)
},
_getById
:
async
function
(
id
)
{
const
result
=
await
soilAptitude
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editSubcontractorModal
.
_open
(
result
)
}
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
}
}
}
</
script
>
pages/soil-alone-sample-instock/RegisterDetail.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<Modal
v-model=
"showDetailModal"
v-drag
:width=
"700"
title=
"人员信息"
class=
"modal-footer-none"
>
<div
:style=
"
{height}" style="overflow-y: auto">
<table
class=
"tableClass"
>
<tbody>
<tr>
<th
colspan=
"6"
class=
"tableClass_back"
>
人员信息
</th>
</tr>
<tr>
<th>
姓名
</th>
<td>
{{
obj
.
realname
}}
</td>
<th>
联系方式
</th>
<td>
{{
obj
.
mobile
}}
</td>
</tr>
</tbody>
</table>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 政府委托信息表详情
*/
export
default
{
data
()
{
return
{
obj
:
{
firsted
:
0
,
client
:
''
,
boreholeLocation
:
''
,
boreholeName
:
''
,
waterDepth
:
''
,
tabulater
:
''
,
testType
:
''
},
showDetailModal
:
false
,
dispose
:
''
,
height
:
''
,
showMoney
:
false
}
},
methods
:
{
_open
(
obj
,
flag
)
{
console
.
log
(
'obj'
,
obj
)
this
.
showDetailModal
=
true
this
.
obj
=
obj
.
records
[
0
]
if
(
flag
===
'showMoney'
)
{
this
.
showMoney
=
true
}
else
{
this
.
showMoney
=
false
}
this
.
height
=
'350px'
}
}
}
</
script
>
pages/soil-alone-sample-instock/SampleItemEdit.vue
0 → 100644
View file @
354854c3
<!--检测项目编辑列表(添加、导入检测项目)-->
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
:width=
"690"
@
on-cancel=
"_cancel"
title=
"检测项目管理"
>
<Row>
<!--正常界面-->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:loading=
"true"
: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"
>
<span
v-if=
"item.key==='judged'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</span>
<div
v-else-if=
"item.key==='compareSymbol'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.compareSymbol"
placeholder=
"请输入比较符"
/>
</div>
<div
v-else-if=
"item.key==='limitValue'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.limitValue"
placeholder=
"请输入限值"
/>
</div>
<div
v-else-if=
"item.key==='unit'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.unit"
placeholder=
"请输入单位"
/>
</div>
<div
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.code"
style=
"width: 130px;"
blur
placeholder=
"请选择检测依据"
/>
<i
@
click
.
stop=
"_selectjudgeBasis(scope.$index)"
style=
"cursor: pointer;font-size: 14px;"
class=
"icons iconfont pt-search icon-search"
></i>
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
soilEntrust
}
from
'../../api'
export
default
{
components
:
{},
data
()
{
return
{
formObj
:
{
catalogueId
:
''
,
name
:
''
,
code
:
''
,
standardCode
:
''
,
standardName
:
''
},
showModal
:
false
,
searchOpen
:
false
,
btn
:
[],
index
:
''
,
iconMsg
:
[
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'方法'
,
key
:
'testMethod'
,
width
:
180
}
],
catalogueId
:
''
,
itemList
:
{
records
:
[]
},
getPage
:
{
records
:
[]
},
selectData
:
[],
originalList
:
[]
}
},
methods
:
{
_open
(
expList
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
showModal
=
true
this
.
getPage
.
records
=
expList
this
.
selectData
=
[]
console
.
log
(
expList
)
this
.
$refs
.
pageTable
.
_clearSelection
()
// this.formObj.sampleId = id
// this.$refs.pageTable._hideLoading()
// if (catalogueId) {
// this._page()
// }
},
_handleRow
(
scope
)
{
console
.
log
(
scope
)
},
_selectjudgeBasis
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_saveCatalogueItem
()
break
}
},
_page
:
async
function
()
{
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pageItem
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'导入检测项目'
:
this
.
$refs
.
relItemModal
.
_open
(
this
.
catalogueId
)
break
}
},
// 操作列操作
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'删除'
:
this
.
_deleteById
(
data
.
id
,
data
.
index
)
break
}
},
// 删除
_deleteById
(
id
,
index
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除该数据?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
id
,
index
)
}
})
},
_deleteOk
:
async
function
(
id
,
index
)
{
if
(
id
)
{
const
result
=
await
soilEntrust
.
experimentDeleteById
(
id
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
getPage
.
records
.
splice
(
index
,
1
)
}
}
else
{
this
.
$Message
.
success
(
'成功删除'
)
this
.
getPage
.
records
.
splice
(
index
,
1
)
}
},
// table结果 返回整行
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectData'
:
this
.
selectData
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
}
},
_ok
()
{
const
expNames
=
[]
for
(
let
i
=
0
;
i
<
this
.
getPage
.
records
.
length
;
i
++
)
{
expNames
.
push
(
this
.
getPage
.
records
[
i
].
name
)
}
const
data
=
expNames
this
.
_saveCatalogueItem
(
data
)
},
_saveCatalogueItem
(
data
)
{
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
,
this
.
getPage
.
records
)
this
.
_hideLoading
()
console
.
log
(
this
.
getPage
.
records
)
},
_cancel
()
{
this
.
selectData
=
[]
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
,
this
.
getPage
.
records
)
},
_visibleChange
()
{
const
data
=
this
.
itemList
.
records
this
.
_saveCatalogueItem
(
data
)
this
.
selectData
=
[]
this
.
showModal
=
false
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
}
}
}
</
script
>
pages/soil-alone-sample-instock/SampleItemRemove.vue
0 → 100644
View file @
354854c3
<!--检测项目编辑列表(添加、导入检测项目)-->
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
:width=
"690"
@
on-cancel=
"_cancel"
title=
"检测项目管理"
>
<Row>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:loading=
"true"
:get-page=
"itemList"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
hide-page=
"true"
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"
>
<span
v-if=
"item.key==='judged'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</span>
<div
v-else-if=
"item.key==='compareSymbol'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.compareSymbol"
placeholder=
"请输入比较符"
/>
</div>
<div
v-else-if=
"item.key==='limitValue'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.limitValue"
placeholder=
"请输入限值"
/>
</div>
<div
v-else-if=
"item.key==='unit'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.unit"
placeholder=
"请输入单位"
/>
</div>
<div
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.code"
style=
"width: 130px;"
blur
placeholder=
"请选择检测依据"
/>
<i
@
click
.
stop=
"_selectjudgeBasis(scope.$index)"
style=
"cursor: pointer;font-size: 14px;"
class=
"icons iconfont pt-search icon-search"
></i>
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../api'
export
default
{
components
:
{},
data
()
{
return
{
formObj
:
{
catalogueId
:
''
,
name
:
''
,
code
:
''
,
standardCode
:
''
,
standardName
:
''
},
showModal
:
false
,
searchOpen
:
false
,
btn
:
[],
index
:
''
,
iconMsg
:
[
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'方法'
,
key
:
'testMethod'
,
width
:
180
}
],
catalogueId
:
''
,
itemList
:
{
records
:
[]
},
selectData
:
[],
originalList
:
[]
}
},
methods
:
{
_open
(
itemList
)
{
this
.
itemList
.
records
=
[]
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
showModal
=
true
this
.
itemList
.
records
=
itemList
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_clearSelection
()
// if (catalogueId) {
// this._page()
// }
},
_handleRow
(
scope
)
{
console
.
log
(
scope
)
},
_selectjudgeBasis
(
index
)
{
console
.
log
(
index
)
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_formSearch
()
{
console
.
log
(
this
.
formObj
.
name
)
const
searchItem
=
[]
for
(
let
i
=
0
;
i
<
this
.
itemList
.
records
.
length
;
i
++
)
{
if
(
this
.
itemList
.
records
[
i
].
name
===
this
.
formObj
.
name
)
{
console
.
log
(
this
.
itemList
.
records
[
i
])
searchItem
.
push
(
this
.
itemList
.
records
[
i
])
}
}
this
.
itemList
.
records
=
searchItem
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_page
:
async
function
()
{
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
page
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'导入检测项目'
:
this
.
$refs
.
relItemModal
.
_open
(
this
.
catalogueId
)
break
}
},
// 操作列操作
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'删除'
:
this
.
itemList
.
records
.
splice
(
data
.
index
,
1
)
break
}
},
// 删除
_deleteById
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除该数据?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
id
)
}
})
},
_deleteOk
(
id
)
{
// const result = await drugCatalogueItem.deleteById(id)
this
.
itemList
.
splice
(
id
,
1
)
this
.
getPage
.
records
=
this
.
itemList
this
.
$Message
.
success
(
'已删除'
)
},
// table结果 返回整行
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectData'
:
this
.
selectData
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
}
},
_ok
()
{
const
data
=
this
.
itemList
.
records
this
.
_saveCatalogueItem
(
data
)
},
_saveCatalogueItem
(
data
)
{
this
.
showModal
=
false
this
.
$emit
(
'on-result-change'
,
data
)
this
.
_hideLoading
()
},
_cancel
()
{
const
data
=
this
.
itemList
.
records
this
.
_saveCatalogueItem
(
data
)
this
.
selectData
=
[]
this
.
showModal
=
false
},
_visibleChange
()
{
const
data
=
this
.
itemList
.
records
this
.
_saveCatalogueItem
(
data
)
this
.
selectData
=
[]
this
.
showModal
=
false
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
}
}
}
</
script
>
pages/soil-alone-sample-instock/ViewDetail.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<Modal
v-model=
"showDetailModal"
v-drag
:width=
"700"
title=
"人员信息"
class=
"modal-footer-none"
>
<div
:style=
"
{height}" style="overflow-y: auto">
<table
class=
"tableClass"
>
<tbody>
<tr>
<th
colspan=
"6"
class=
"tableClass_back"
>
人员信息
</th>
</tr>
<tr>
<th>
接收人
</th>
<td>
{{
obj
.
receiver
}}
</td>
<th>
接收日期
</th>
<td>
{{
$dateformat
(
obj
.
receiveTime
,
'yyyy-mm-dd'
)
}}
</td>
</tr>
<tr>
<th>
项目名称
</th>
<td>
{{
obj
.
projectName
}}
</td>
<th>
项目负责人
</th>
<td>
{{
obj
.
projectLeader
}}
</td>
</tr>
<tr>
<th>
钻孔名称
</th>
<td>
{{
obj
.
boreholeName
}}
</td>
<th>
箱数
</th>
<td>
{{
obj
.
casesNum
}}
</td>
</tr>
<tr>
<th>
登记人
</th>
<td>
{{
obj
.
registrant
}}
</td>
<th>
登记日期
</th>
<td>
{{
$dateformat
(
obj
.
registTime
,
'yyyy-mm-dd'
)
}}
</td>
</tr>
</tbody>
</table>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 政府委托信息表详情
*/
export
default
{
data
()
{
return
{
obj
:
{
firsted
:
0
,
client
:
''
,
boreholeLocation
:
''
,
boreholeName
:
''
,
waterDepth
:
''
,
tabulater
:
''
,
testType
:
''
},
showDetailModal
:
false
,
dispose
:
''
,
height
:
''
,
showMoney
:
false
}
},
methods
:
{
_open
(
obj
,
flag
)
{
this
.
showDetailModal
=
true
this
.
obj
=
obj
console
.
log
(
'obj'
,
obj
)
if
(
flag
===
'showMoney'
)
{
this
.
showMoney
=
true
}
else
{
this
.
showMoney
=
false
}
this
.
height
=
'350px'
}
}
}
</
script
>
pages/soil-alone-sample-manage/storehouse-place-manage/AddressManage.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<Col
span=
"24"
class=
"margin-top-10"
>
<!--搜索表单-->
<Form
id=
"search-form"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"库房号:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.warehouse"
name=
"warehouse"
placeholder=
"请输入库房号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
: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"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
>
<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.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'现行'
:
scope
.
row
[
item
.
key
]
===
1
?
'即将实施'
:
scope
.
row
[
item
.
key
]
===
2
?
'部分被代替'
:
scope
.
row
[
item
.
key
]
===
3
?
'被代替'
:
scope
.
row
[
item
.
key
]
===
4
?
'作废'
:
''
}}
</div>
<div
v-else-if=
"item.key==='classify'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'判定依据'
:
scope
.
row
[
item
.
key
]
===
1
?
'检测依据'
:
scope
.
row
[
item
.
key
]
===
2
?
'其他'
:
''
}}
</div>
<div
v-else-if=
"item.key==='type'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'待检'
:
scope
.
row
[
item
.
key
]
===
1
?
'备样'
:
scope
.
row
[
item
.
key
]
===
2
?
'备用'
:
''
}}
</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==='fileUrl'"
>
<span
v-if=
"scope.row['fileUrl']"
class=
"green-color"
>
是
</span>
<span
v-else
class=
"red-color"
>
否
</span>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<!--组件加载-->
<ViewSample
ref=
"viewSample"
></ViewSample>
<StandardsManageEdit
ref=
"editModal"
@
on-result-change=
"_page"
></StandardsManageEdit>
</div>
</template>
<
script
>
import
{
soilSample
}
from
'../../../api'
import
StandardsManageEdit
from
'./AddressManageEdit'
// 添加、编辑
import
ViewSample
from
'./ViewLocationEntrust'
export
default
{
components
:
{
StandardsManageEdit
,
ViewSample
},
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{
code
:
undefined
,
name
:
undefined
},
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
,
componentName
:
'StandardsManageEdit'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
// 表格
pageColumns
:
[
{
title
:
'库房号'
,
key
:
'warehouse'
},
{
title
:
'货架号'
,
key
:
'name'
},
{
title
:
'位置分类'
,
key
:
'type'
},
{
title
:
'位置管理人'
,
key
:
'manager'
},
{
title
:
'备注说明'
,
key
:
'remark'
}
],
// 操作
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
,
componentName
:
'StandardsManageEdit'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看试样'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
searchOpen
:
false
,
getPage
:
{},
// 选中的内容
selectIds
:
[]
}
},
computed
:
{
// 表格的高度
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
// 操作按钮
_btnClick
(
msg
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
switch
(
msg
)
{
case
'添加'
:
this
.
$nextTick
(()
=>
{
this
.
_editModal
(
false
)
})
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
$nextTick
(()
=>
{
this
.
_import
()
})
break
case
'导出'
:
// this._export()
break
// 收起搜索
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
// 表格中操作
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'查看试样'
:
this
.
_viewSample
(
data
.
name
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
}
})
},
_viewSample
(
data
)
{
this
.
$refs
.
viewSample
.
_open
(
data
)
},
_editModal
:
async
function
(
edit
,
id
)
{
if
(
edit
)
{
const
result
=
await
soilSample
.
aloneWarehouseLocationGetById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
// 获取数据
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilSample
.
aloneWarehouseLocation
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 查询
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
// 删除一条记录
_deleteById
(
id
)
{
this
.
_deleteByIds
([
id
])
},
// 批量删除
_deleteSelected
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
this
.
selectIds
,
'确定删除这 '
+
this
.
selectIds
.
length
+
' 条记录?'
)
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
loading
:
true
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
ids
)
}
})
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
aloneWarehouseLocationDelete
(
ids
)
if
(
result
)
{
this
.
_page
()
this
.
$Modal
.
remove
()
this
.
$Message
.
success
(
'删除成功'
)
}
},
// 表格内容
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
}
}
}
</
script
>
pages/soil-alone-sample-manage/storehouse-place-manage/AddressManageEdit.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<Modal
v-model=
"showEditModal"
v-drag
:mask-closable=
"false"
:width=
"500"
class=
"zIndex-1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<Form-item
label=
"库房号"
prop=
"warehouse"
style=
"width: 100%"
>
<Input
v-model=
"formObj.warehouse"
name=
"warehouse"
placeholder=
"请输入库房号"
/>
</Form-item>
<Form-item
label=
"货架号"
prop=
"name"
style=
"width: 100%"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入货架号"
/>
</Form-item>
<Form-item
label=
"位置分类:"
prop=
"type"
style=
"width: 100%"
>
<Select
v-model=
"formObj.type"
clearable
name=
"type"
placeholder=
"请选择类别"
>
<Option
v-for=
"(item,index) in typeData"
:value=
"item.value"
:key=
"index"
>
{{
item
.
name
}}
</Option>
</Select>
</Form-item>
<Form-item
label=
"位置管理人"
prop=
"manager"
style=
"width: 100%"
>
<Input
v-model=
"formObj.manager"
@
click
.
native=
"_selectStaff"
name=
"manager"
readonly
/>
</Form-item>
<Form-item
prop=
"managerId"
style=
"width: 100%;display: none"
>
<Input
v-model=
"formObj.managerId"
@
click
.
native=
"_selectStaff"
name=
"managerId"
readonly
/>
</Form-item>
<Form-item
label=
"备注说明"
prop=
"remark"
style=
"width: 100%"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入备注说明"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></ModalFooter>
</div>
</Modal>
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userData"
is-change
></UserInfo>
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
import
ModalFooter
from
'../../../components/base/modalFooter'
import
{
soilSample
}
from
'../../../api'
import
Global
from
'../../../api/config'
import
UserInfo
from
'../../../components/user-info-single/assignPerson'
export
default
{
components
:
{
ModalFooter
,
UserInfo
},
data
()
{
return
{
formId
:
''
,
lengthLimitList
:
[
{
key
:
'stdNum'
,
title
:
'标准号'
},
{
key
:
'enName'
,
title
:
'英文名称'
},
{
key
:
'belongUnit'
,
title
:
'归口单位'
},
{
key
:
'publishUnit'
,
title
:
'发布单位'
}
],
modalTitle
:
'收样位置选择'
,
formObj
:
{
name
:
''
,
warehouse
:
''
,
type
:
''
,
remark
:
''
,
manager
:
''
,
managerId
:
''
},
options
:
[
{
name
:
'国家标准'
},
{
name
:
'地方标准'
},
{
name
:
'行业标准'
},
{
name
:
'企业标准'
}
],
typeData
:
[
{
name
:
'待检'
,
value
:
0
},
{
name
:
'备样'
,
value
:
1
},
{
name
:
'备用'
,
value
:
2
}
],
ruleValidate
:
{
warehouse
:
[
{
required
:
true
,
message
:
'库房号不能为空'
,
trigger
:
'blur'
}
]
},
showEditModal
:
false
,
classifyList
:
[
{
value
:
0
,
name
:
'判定依据'
},
{
value
:
1
,
name
:
'检测依据'
},
{
value
:
2
,
name
:
'其他'
}
],
typeList
:
[
{
value
:
0
,
name
:
'国家标准'
},
{
value
:
1
,
name
:
'地方标准'
},
{
value
:
2
,
name
:
'行业标准'
},
{
value
:
3
,
name
:
'企业标准'
}
],
statusList
:
[
{
value
:
0
,
name
:
'现行'
},
{
value
:
1
,
name
:
'即将实施'
},
{
value
:
2
,
name
:
'部分被代替'
},
{
value
:
3
,
name
:
'被代替'
},
{
value
:
4
,
name
:
'作废'
}
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
_getUser
()
{
const
user
=
Global
.
getUserInfo
()
this
.
formObj
.
manager
=
user
.
realname
this
.
formObj
.
managerId
=
user
.
id
console
.
log
(
user
)
},
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
()
},
_userData
(
data
,
msg
,
contractTempData
)
{
console
.
log
(
data
,
msg
)
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
this
.
showEditModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
formObj
.
publishDate
&&
this
.
formObj
.
effectDate
)
{
if
(
this
.
formObj
.
publishDate
>
this
.
formObj
.
effectDate
)
{
this
.
$Message
.
error
(
'发布日期应早于实施日期'
)
this
.
_hideLoading
()
return
}
}
const
data
=
this
.
$serialize
(
'edit-form'
)
if
(
this
.
$string
(
this
.
formObj
.
id
).
isEmpty
())
{
// 添加
console
.
log
(
'data'
,
data
)
this
.
_save
(
data
)
}
else
{
// 编辑
this
.
_edit
({
id
:
this
.
formObj
.
id
,
obj
:
data
})
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
aloneWarehouseLocationAdd
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
aloneWarehouseLocationEdit
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
_hideLoading
()
this
.
showEditModal
=
false
},
_open
(
formObj
)
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
_getUser
()
}
else
{
this
.
formObj
=
formObj
this
.
formObj
.
id
=
formObj
.
id
this
.
formObj
.
effectDate
=
this
.
formObj
.
effectDate
?
new
Date
(
formObj
.
effectDate
)
:
''
this
.
formObj
.
publishDate
=
this
.
formObj
.
publishDate
?
new
Date
(
formObj
.
publishDate
)
:
''
this
.
modalTitle
=
'编辑'
}
this
.
showEditModal
=
true
},
_registerAdd
()
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
formObj
.
type
=
3
this
.
showEditModal
=
true
}
}
}
</
script
>
pages/soil-alone-sample-manage/storehouse-place-manage/ViewLocationEntrust.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1030"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
v-show=
"searchOpen"
id=
"search-sample-company"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"委托编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_page"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
class=
"contHide"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
</div>
</template>
<
script
>
import
{
soilEntrust
}
from
'../../../api'
import
SoilSampleItemManage
from
'./ViewSample'
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '导入检测项目'
// }
// {
// type: 'success',
// id: '',
// name: '导入检测项目包'
// },
// {
// type: 'success',
// id: '',
// name: '打印标签'
// }
],
itemList
:
[],
indexList
:
[],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
iconMsg
:
[
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'查看试样'
}
],
contractId
:
''
,
// 委托id
showModal
:
false
,
searchOpen
:
true
,
modalTitle
:
'管理样品'
,
selectIds
:
[],
selectData
:
{},
getPage
:
{},
pageColumns
:
[
{
title
:
'委托商'
,
key
:
'client'
,
width
:
230
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
120
,
date
:
true
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
120
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
120
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
120
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
120
,
status
:
true
},
{
title
:
'平均容重'
,
key
:
'projectNo'
,
width
:
120
},
{
title
:
'检验类别'
,
key
:
'testType'
,
width
:
120
}
],
formObj
:
{
receiveLocation
:
undefined
,
entrustCode
:
undefined
,
client
:
undefined
},
receiveLocation
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
console
.
log
(
this
.
getPage
)
},
_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
.
_deleteSelected
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
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
}
})
},
_itemManage
(
data
)
{
this
.
$refs
.
sampleItemManage
.
_open
(
data
,
this
.
receiveLocation
)
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'allSelect'
:
this
.
allSelect
(
data
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_open
(
name
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
receiveLocation
=
name
this
.
receiveLocation
=
name
this
.
showModal
=
true
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
contractId
const
result
=
await
soilEntrust
.
pageLocationEntrust
(
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
)
}
})
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/soil-alone-sample-manage/storehouse-place-manage/ViewSample.vue
0 → 100644
View file @
354854c3
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"980"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-sample-company"
v-show=
"searchOpen"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"试样编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_page"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
class=
"contHide"
show-search-btn=
"true"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:rows=
"500"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
: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"
:width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
soilSample
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
{
type
:
'error'
,
id
:
''
,
name
:
'批量删除'
}
],
iconMsg
:
[{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}],
itemList
:
[],
indexList
:
[],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
entrustId
:
''
,
// 委托id
showModal
:
false
,
recordHis
:
false
,
searchOpen
:
true
,
modalTitle
:
'管理样品'
,
selectIds
:
[],
selectData
:
{},
getPage
:
{},
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
100
,
fixed
:
'left'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
100
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
100
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
100
},
{
title
:
'收样位置'
,
key
:
'receiveLocation'
,
width
:
100
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'土质描述详情'
,
key
:
'describeDetail'
,
width
:
160
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
120
}
],
sampleId
:
''
,
dateList
:
[],
formObj
:
{
receiveLocation
:
undefined
,
entrustId
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
methods
:
{
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
console
.
log
(
this
.
getPage
)
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'批量删除'
:
this
.
_deleteSelected
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
}
})
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'allSelect'
:
this
.
allSelect
(
data
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
allSelect
(
data
)
{
this
.
indexList
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
indexList
.
push
(
data
[
i
].
index
)
}
console
.
log
(
'索引'
,
this
.
indexList
)
},
_open
(
id
,
name
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
id
// 委托id
this
.
formObj
.
receiveLocation
=
name
// 委托id
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilSample
.
pageLocationSample
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
removeSampleFromLocation
({
ids
:
ids
.
join
(
','
)
})
if
(
result
)
{
this
.
$Message
.
success
(
'成功移除'
)
this
.
_page
()
}
// const result = await drugCatalogueItem.deleteById(id)
},
// 添加编辑模拟样品
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
}
}
}
</
script
>
pages/soil-alone-sample/EntrustRegister.vue
View file @
354854c3
...
...
@@ -123,7 +123,6 @@ export default {
selectIds
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'项目负责人'
,
key
:
'projectLeader'
,
width
:
150
,
detail
:
true
},
{
title
:
'钻孔孔号'
,
key
:
'boreholeNumber'
,
width
:
120
},
...
...
pages/soil-alone-sample/EntrustRegisterEdit.vue
View file @
354854c3
...
...
@@ -9,7 +9,7 @@
<!-- @on-result-change="_cusNameChange" name="client" placeholder="请输入或选择委托单位"-->
<!-- >
</AutoComplete>
-->
<!--
</Form-item>
-->
<Form-item
label=
"接收人"
prop=
"receiver"
class=
"width-48"
>
<Form-item
@
click
.
native=
"_selectReceiverPerson"
label=
"接收人"
prop=
"receiver"
class=
"width-48"
>
<Input
v-model=
"formObj.receiver"
name=
"receiver"
placeholder=
"请输入接收人"
/>
</Form-item>
<Form-item
label=
"接收日期:"
prop=
"receiveTime"
class=
"width-48"
>
...
...
@@ -239,6 +239,10 @@ export default {
this
.
personType
=
'project'
this
.
$refs
.
userModal
.
_openOrg
(
'选择人员'
,
'itemTree'
)
},
_selectReceiverPerson
()
{
this
.
personType
=
'receive'
this
.
$refs
.
userModal
.
_openOrg
(
'选择人员'
,
'itemTree'
)
},
_selectRegisterPerson
()
{
this
.
personType
=
'resistrant'
this
.
$refs
.
userModal
.
_openOrg
(
'选择人员'
,
'itemTree'
)
...
...
@@ -249,6 +253,8 @@ export default {
if
(
this
.
personType
===
'resistrant'
)
{
this
.
formObj
.
registrant
=
data
.
realname
this
.
formObj
.
registrantId
=
data
.
id
}
else
if
(
this
.
personType
===
'receive'
)
{
this
.
formObj
.
receiver
=
data
.
realname
}
else
{
this
.
formObj
.
projectLeader
=
data
.
realname
this
.
formObj
.
projectLeaderId
=
data
.
id
...
...
@@ -676,10 +682,8 @@ export default {
this
.
_getPackList
()
this
.
_getProjectList
()
this
.
_getSoil
()
this
.
_getUser
()
this
.
showBtn
=
true
this
.
showModal
=
true
this
.
_getUser
()
this
.
_hideLoading
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
$refs
.
formObj
.
resetFields
()
...
...
@@ -689,6 +693,7 @@ export default {
this
.
formObj
.
entrustDate
=
new
Date
()
this
.
modalTitle
=
'委托单新增'
}
this
.
_getUser
()
},
_openEdit
(
formObj
)
{
this
.
edit
=
true
...
...
@@ -718,7 +723,7 @@ export default {
},
_getUser
()
{
const
user
=
Global
.
getUserInfo
()
this
.
formObj
.
tabulat
er
=
user
.
realname
this
.
formObj
.
receiv
er
=
user
.
realname
},
_getTestType
:
async
function
()
{
const
result
=
await
soilEntrust
.
testType
(
'检验类别'
)
...
...
router/soil-routes.js
View file @
354854c3
...
...
@@ -7,6 +7,8 @@ import StandardManage from '../pages/meter-aptitude/standard-manage/StandardMana
import
ExperimentItemManage
from
'../pages/meter-aptitude/item-manage/ExperimentItemManage'
import
EntrustIndex
from
'../pages/meter-entrust/entrust-register/EntrustIndex'
import
ReceiveSampleIndex
from
'../pages/soil-alone-sample/EntrustIndex'
import
InstockIndex
from
'../pages/soil-alone-sample-instock/EntrustIndex'
import
StorehousePlace
from
'../pages/soil-alone-sample-manage/storehouse-place-manage/AddressManage'
import
ReviewEntrust
from
'../pages/meter-entrust/entrust-review/ReviewEntrust'
import
SampleReceiveIndex
from
'../pages/soil-sample-manage/sample-receive/SampleReceiveIndex'
import
SamplePreparationIndex
from
'../pages/soil-sample-manage/sample-preparation/SamplePreparationIndex'
...
...
@@ -54,6 +56,16 @@ export default [
path
:
'receive_sample'
,
component
:
ReceiveSampleIndex
,
meta
:
{
title
:
'收样管理'
}
},
{
path
:
'instock'
,
component
:
InstockIndex
,
meta
:
{
title
:
'入库管理'
}
},
{
path
:
'storehouse_place'
,
component
:
StorehousePlace
,
meta
:
{
title
:
'库房位置管理'
}
}
]
},
...
...
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