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
33912224
Commit
33912224
authored
Jun 24, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整体优化
parent
8629c021
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1193 additions
and
82 deletions
+1193
-82
meter-sample.js
api/meter/meter-sample.js
+21
-0
MeterMeterWarehouseInHis.vue
...meter-warehouse/warehouse-in/MeterMeterWarehouseInHis.vue
+107
-60
MeterMeterWarehouseInIndex.vue
...ter-warehouse/warehouse-in/MeterMeterWarehouseInIndex.vue
+17
-1
MeterWarehouseIn.vue
pages/meter-warehouse/warehouse-in/MeterWarehouseIn.vue
+19
-21
WarehousePersonSelect.vue
pages/meter-warehouse/warehouse-in/WarehousePersonSelect.vue
+181
-0
MeterMeterWarehouseOutHis.vue
...ter-warehouse/warehouse-out/MeterMeterWarehouseOutHis.vue
+312
-0
MeterMeterWarehouseOutIndex.vue
...r-warehouse/warehouse-out/MeterMeterWarehouseOutIndex.vue
+52
-0
MeterWarehouseOut.vue
pages/meter-warehouse/warehouse-out/MeterWarehouseOut.vue
+297
-0
WarehousePersonSelect.vue
...s/meter-warehouse/warehouse-out/WarehousePersonSelect.vue
+181
-0
meter-routes.js
router/meter-routes.js
+6
-0
No files found.
api/meter/meter-sample.js
View file @
33912224
...
@@ -51,6 +51,17 @@ export default {
...
@@ -51,6 +51,17 @@ export default {
pageSampleInStock
:
data
=>
pageSampleInStock
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_in_stock'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'meter/v1/sample/page_sample_in_stock'
,
data
).
then
(
res
=>
res
),
pageSampleInStockHis
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_in_stock_his'
,
data
)
.
then
(
res
=>
res
),
pageSampleOutStock
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_out_stock'
,
data
).
then
(
res
=>
res
),
pageSampleOutStockHis
:
data
=>
http
.
post
(
'meter/v1/sample/page_sample_out_stock_his'
,
data
)
.
then
(
res
=>
res
),
pageCertificateMake
:
data
=>
pageCertificateMake
:
data
=>
http
.
post
(
'meter/v1/sample/page_certificate_make'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'meter/v1/sample/page_certificate_make'
,
data
).
then
(
res
=>
res
),
...
@@ -117,6 +128,16 @@ export default {
...
@@ -117,6 +128,16 @@ export default {
.
post
(
'meter/v1/sample/subpackage_out_stock?ids='
+
data
.
ids
,
data
.
obj
)
.
post
(
'meter/v1/sample/subpackage_out_stock?ids='
+
data
.
ids
,
data
.
obj
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
sampleInStock
:
data
=>
http
.
put
(
'meter/v1/sample/sample_in_stock/'
+
data
.
ids
,
data
.
obj
)
.
then
(
res
=>
res
),
sampleOutStock
:
data
=>
http
.
put
(
'meter/v1/sample/sample_out_stock/'
+
data
.
ids
,
data
.
obj
)
.
then
(
res
=>
res
),
subpackageInStock
:
data
=>
subpackageInStock
:
data
=>
http
http
.
post
(
'meter/v1/sample/subpackage_in_stock?ids='
+
data
.
ids
,
data
.
obj
)
.
post
(
'meter/v1/sample/subpackage_in_stock?ids='
+
data
.
ids
,
data
.
obj
)
...
...
pages/meter-warehouse/warehouse-in/MeterMeterWarehouseInHis.vue
View file @
33912224
...
@@ -6,24 +6,21 @@
...
@@ -6,24 +6,21 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"实验室名称:"
>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入实验室名称"
clearable
/>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"资质:"
>
<Input
v-model=
"formObj.aptitude"
@
on-enter=
"_formSearch"
name=
"aptitude"
placeholder=
"请输入资质"
clearable
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</Col>
</Col>
<!--操作-->
<!--操作-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
class=
"contHide
"
></btn-list>
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
</Col>
<!--表格-->
<!--表格-->
<Col
span=
"24"
>
<Col
span=
"24"
>
...
@@ -37,7 +34,19 @@
...
@@ -37,7 +34,19 @@
:min-width=
"item.width?item.width:200"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
[
item
.
key
]
}}
</span>
<span
v-if=
"item.key==='type'"
>
<span
v-if=
"scope.row[item.key]===0"
>
检定
</span>
<span
v-else-if=
"scope.row[item.key]===1"
>
校准
</span>
<span
v-else-if=
"scope.row[item.key]===2"
>
外观检查
</span>
</span>
<div
v-else-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</
template
>
</vxe-table-column>
</vxe-table-column>
</PTVXETable>
</PTVXETable>
...
@@ -45,49 +54,29 @@
...
@@ -45,49 +54,29 @@
</Row>
</Row>
</div>
</div>
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<WarehousePersonSelect
ref=
"warehousePersonSelectModal"
@
on-result-change=
"_page"
></WarehousePersonSelect>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
meterEntrust
}
from
'../../../api'
import
{
meterDevice
,
meterSample
}
from
'../../../api'
import
WarehousePersonSelect
from
'./WarehousePersonSelect'
export
default
{
export
default
{
components
:
{},
components
:
{
WarehousePersonSelect
},
data
()
{
data
()
{
return
{
return
{
currentComponent
:
''
,
currentComponent
:
''
,
formId
:
'meter
Subcontractor
FormId'
,
formId
:
'meter
WarehouseIn
FormId'
,
searchOpen
:
false
,
searchOpen
:
false
,
btn
:
[
btn
:
[
{
// {
type
:
'success'
,
// type: 'success',
id
:
'meter-go-out-entrust-add-btn'
,
// id: '',
name
:
'添加'
// name: '入库'
},
// }
{
type
:
'success'
,
id
:
'meter-go-out-entrust-submit-btn'
,
name
:
'提交'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'管理样品'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'操作日志'
}
],
],
iconMsg
:
[{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}],
formObj
:
{
formObj
:
{
name
:
undefined
,
name
:
undefined
,
aptitude
:
undefined
aptitude
:
undefined
...
@@ -95,16 +84,23 @@ export default {
...
@@ -95,16 +84,23 @@ export default {
selectIds
:
[],
selectIds
:
[],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
120
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'入库人'
,
key
:
'sampleInner'
,
width
:
120
},
{
title
:
'入库时间'
,
key
:
'sampleInnerTime'
,
width
:
120
,
dateTime
:
true
},
{
title
:
'型号规格'
,
key
:
'spec'
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'检测类型'
,
key
:
'type'
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'传真'
,
key
:
'fax'
,
width
:
120
},
{
title
:
'详细地址'
,
key
:
'address'
,
width
:
250
},
{
title
:
'详细地址'
,
key
:
'address'
,
width
:
250
},
{
title
:
'邮编'
,
key
:
'postcode'
},
{
title
:
'数量'
,
key
:
'quantity'
},
{
title
:
'E-mail'
,
key
:
'email'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'edate'
,
width
:
120
},
{
title
:
'费用合计'
,
key
:
'fee'
,
width
:
120
},
{
title
:
'合同号'
,
key
:
'contractCode'
,
width
:
120
},
{
title
:
'备注'
,
key
:
'remark'
}
{
title
:
'备注'
,
key
:
'remark'
}
]
]
}
}
...
@@ -126,10 +122,16 @@ export default {
...
@@ -126,10 +122,16 @@ export default {
this
.
currentComponent
=
componentName
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'仪器领用'
:
this
.
_receiveApparatus
()
break
case
'车辆管理'
:
this
.
_carManage
()
break
case
'添加'
:
case
'添加'
:
this
.
_editModal
(
false
)
this
.
_editModal
(
false
)
break
break
case
'
提交
'
:
case
'
入库
'
:
this
.
_submitToReview
()
this
.
_submitToReview
()
break
break
case
'search'
:
case
'search'
:
...
@@ -138,8 +140,23 @@ export default {
...
@@ -138,8 +140,23 @@ export default {
}
}
})
})
},
},
_carManage
()
{
this
.
$refs
.
carEdit
.
_open
()
},
_receiveApparatus
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
SelEquip
.
_open
(
'sample-input'
)
}
},
_submitToReview
()
{
_submitToReview
()
{
this
.
_submitByContractIds
(
'委托评审'
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
warehousePersonSelectModal
.
_open
(
ids
)
}
},
},
_submitByContractIds
(
cont
)
{
_submitByContractIds
(
cont
)
{
const
ids
=
this
.
selectIds
const
ids
=
this
.
selectIds
...
@@ -150,7 +167,7 @@ export default {
...
@@ -150,7 +167,7 @@ export default {
title
:
'提示'
,
title
:
'提示'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
onOk
:
()
=>
{
onOk
:
()
=>
{
const
result
=
meter
Entrust
.
submit
(
ids
)
const
result
=
meter
Sample
.
submit
(
ids
)
if
(
result
)
{
if
(
result
)
{
console
.
log
(
result
)
console
.
log
(
result
)
}
}
...
@@ -162,8 +179,15 @@ export default {
...
@@ -162,8 +179,15 @@ export default {
this
.
currentComponent
=
componentName
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
switch
(
res
)
{
case
'仪器领用'
:
this
.
$refs
.
InstruEdit
.
_open
()
break
case
'车辆管理'
:
this
.
$refs
.
carEdit
.
_open
()
break
case
'编辑'
:
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
// this._editModal(true, data.id)
this
.
_personModal
(
data
)
break
break
case
'资质项目'
:
case
'资质项目'
:
this
.
_itemModal
(
data
.
id
)
this
.
_itemModal
(
data
.
id
)
...
@@ -180,14 +204,38 @@ export default {
...
@@ -180,14 +204,38 @@ export default {
}
}
})
})
},
},
_personModal
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
personModal
.
_open
(
data
.
id
)
},
_equipSelectBack
(
data
)
{
console
.
log
(
'_equipSelectBack'
,
data
)
const
equipData
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
const
object
=
data
[
i
]
const
obj
=
{}
obj
.
name
=
object
.
name
obj
.
certificateNo
=
object
.
ceNum
obj
.
measuringRange
=
object
.
range
obj
.
uncertaintyAccuray
=
object
.
uncertainty
obj
.
validUntil
=
object
.
effectDate
equipData
.
push
(
obj
)
}
this
.
_addEquipUse
({
sampleIds
:
this
.
selectIds
,
devicesList
:
equipData
})
},
_addEquipUse
:
async
function
(
data
)
{
const
result
=
await
meterDevice
.
addEquipUse
(
data
)
if
(
result
)
{
await
this
.
_page
()
}
},
_record
(
id
)
{
_record
(
id
)
{
this
.
$refs
.
refModal
.
_open
(
id
)
this
.
$refs
.
refModal
.
_open
(
id
)
},
},
_tableResultChange
(
msg
,
data
)
{
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodSubcontracter
.
page
break
case
'iconClick'
:
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
break
...
@@ -201,8 +249,7 @@ export default {
...
@@ -201,8 +249,7 @@ export default {
},
},
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterSample
.
pageSampleInStockHis
(
this
.
formObj
)
const
result
=
await
meterEntrust
.
pageGoOutEntrust
(
this
.
formObj
)
if
(
result
)
{
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
this
.
getPage
=
result
...
@@ -238,16 +285,16 @@ export default {
...
@@ -238,16 +285,16 @@ export default {
_upload
(
id
)
{
_upload
(
id
)
{
// 上传文件
// 上传文件
this
.
$refs
.
refModal
.
_open
(
id
,
'subcontractorId'
)
this
.
$refs
.
FileManage
.
_open
(
id
,
'subcontractorId'
)
},
},
_getById
:
async
function
(
id
)
{
_getById
:
async
function
(
id
)
{
const
result
=
await
meter
Entrust
.
getVO
ById
(
id
)
const
result
=
await
meter
Sample
.
get
ById
(
id
)
if
(
result
)
{
if
(
result
)
{
this
.
$refs
.
editSubcontractorModal
.
_openEdit
(
result
)
this
.
$refs
.
editSubcontractorModal
.
_openEdit
(
result
)
}
}
},
},
_delete
:
async
function
(
ids
)
{
_delete
:
async
function
(
ids
)
{
const
result
=
await
meter
Entrust
.
deleteById
(
ids
)
const
result
=
await
meter
Sample
.
deleteById
(
ids
)
if
(
result
)
{
if
(
result
)
{
this
.
_formSearch
()
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
this
.
$Message
.
success
(
'删除成功!'
)
...
...
pages/meter-warehouse/warehouse-in/MeterMeterWarehouseInIndex.vue
View file @
33912224
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<div
class=
"layout-content-main"
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"待完成"
name=
"wait"
>
<el-tab-pane
label=
"待完成"
name=
"wait"
>
<MeterGoOutEntrust
ref=
"waitTabs"
></MeterGoOutEntrust>
<MeterGoOutEntrust
ref=
"waitTabs"
></MeterGoOutEntrust>
</el-tab-pane>
</el-tab-pane>
...
@@ -28,6 +28,22 @@ export default {
...
@@ -28,6 +28,22 @@ export default {
return
{
return
{
activeName
:
'wait'
activeName
:
'wait'
}
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
_page
()
}
else
{
this
.
$refs
.
hisTabs
.
_page
()
}
},
_page
()
{
this
.
$refs
.
waitTabs
.
_page
()
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/meter-warehouse/warehouse-in/MeterWarehouseIn.vue
View file @
33912224
...
@@ -6,24 +6,21 @@
...
@@ -6,24 +6,21 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"实验室名称:"
>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入实验室名称"
clearable
/>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"资质:"
>
<Input
v-model=
"formObj.aptitude"
@
on-enter=
"_formSearch"
name=
"aptitude"
placeholder=
"请输入资质"
clearable
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</Col>
</Col>
<!--操作-->
<!--操作-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
class=
"contHide
"
></btn-list>
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
</Col>
<!--表格-->
<!--表格-->
<Col
span=
"24"
>
<Col
span=
"24"
>
...
@@ -57,12 +54,15 @@
...
@@ -57,12 +54,15 @@
</div>
</div>
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<FileManage
ref=
"FileManage"
></FileManage>
<WarehousePersonSelect
ref=
"warehousePersonSelectModal"
@
on-result-change=
"_page"
></WarehousePersonSelect>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
meterDevice
,
meterSample
}
from
'../../../api'
import
{
meterDevice
,
meterSample
}
from
'../../../api'
import
WarehousePersonSelect
from
'./WarehousePersonSelect'
export
default
{
export
default
{
components
:
{},
components
:
{
WarehousePersonSelect
},
data
()
{
data
()
{
return
{
return
{
currentComponent
:
''
,
currentComponent
:
''
,
...
@@ -72,17 +72,10 @@ export default {
...
@@ -72,17 +72,10 @@ export default {
{
{
type
:
'success'
,
type
:
'success'
,
id
:
''
,
id
:
''
,
name
:
'
提交
'
name
:
'
入库
'
}
}
],
],
iconMsg
:
[
iconMsg
:
[{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}],
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}
],
formObj
:
{
formObj
:
{
name
:
undefined
,
name
:
undefined
,
aptitude
:
undefined
aptitude
:
undefined
...
@@ -130,7 +123,7 @@ export default {
...
@@ -130,7 +123,7 @@ export default {
case
'添加'
:
case
'添加'
:
this
.
_editModal
(
false
)
this
.
_editModal
(
false
)
break
break
case
'
提交
'
:
case
'
入库
'
:
this
.
_submitToReview
()
this
.
_submitToReview
()
break
break
case
'search'
:
case
'search'
:
...
@@ -150,7 +143,12 @@ export default {
...
@@ -150,7 +143,12 @@ export default {
}
}
},
},
_submitToReview
()
{
_submitToReview
()
{
this
.
_submitByContractIds
(
'委托评审'
)
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
warehousePersonSelectModal
.
_open
(
ids
)
}
},
},
_submitByContractIds
(
cont
)
{
_submitByContractIds
(
cont
)
{
const
ids
=
this
.
selectIds
const
ids
=
this
.
selectIds
...
...
pages/meter-warehouse/warehouse-in/WarehousePersonSelect.vue
0 → 100644
View file @
33912224
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"700"
>
<p
slot=
"header"
>
样品入库
</p>
<div>
<Form
id=
"batch-edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
>
<Form-item
label=
"入库人:"
prop=
"inner"
>
<Input
v-model=
"formObj.inner"
@
click
.
native=
"_selectStaff"
readonly
name=
"inner"
></Input>
</Form-item>
<Form-item
label=
"入库时间:"
prop=
"inTime"
>
<div
class=
"block"
>
<el-date-picker
v-model=
"formObj.inTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
>
</el-date-picker>
</div>
</Form-item>
<!--
<Form-item
label=
"备注"
prop=
"remark"
>
-->
<!--
<Input
v-model=
"formObj.remark"
:rows=
"3"
type=
"textarea"
--
>
<!-- name="remark"-->
<!-- placeholder="请输入备注"/>-->
<!--
</Form-item>
-->
</Form>
</div>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></ModalFooter>
</div>
</Modal>
<!--选择实验室-->
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userData"
is-change
></UserInfo>
</div>
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
ModalFooter
from
'../../../components/base/modalFooter'
import
UserInfo
from
'../../../components/user-info-single/assignPerson'
import
{
meterSample
}
from
'../../../api'
/**
* 添加编辑分包信息
*/
const
defVal
=
{
inner
:
undefined
,
innerId
:
undefined
,
inTime
:
undefined
,
remark
:
undefined
}
export
default
{
components
:
{
ModalFooter
,
UserInfo
// AutoCompletes
},
data
()
{
return
{
ids
:
[],
selectData
:
[],
formObj
:
defVal
,
ruleValidate
:
{
// price: [{required: true, message: '分包价不能为空', trigger: 'blur', type: 'number'}],
},
showModal
:
false
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
labList
:
[]
}
},
methods
:
{
_labResult
(
data
)
{
console
.
log
(
data
)
},
getNowTime
()
{
const
now
=
new
Date
()
const
year
=
now
.
getFullYear
()
// 得到年份
let
month
=
now
.
getMonth
()
// 得到月份
let
date
=
now
.
getDate
()
// 得到日期
let
hour
=
now
.
getHours
()
let
min
=
now
.
getMinutes
()
let
second
=
now
.
getSeconds
()
month
=
month
+
1
month
=
month
.
toString
().
padStart
(
2
,
'0'
)
date
=
date
.
toString
().
padStart
(
2
,
'0'
)
hour
=
hour
.
toString
().
padStart
(
2
,
'0'
)
min
=
min
.
toString
().
padStart
(
2
,
'0'
)
second
=
second
.
toString
().
padStart
(
2
,
'0'
)
const
defaultDate
=
`
${
year
}
-
${
month
}
-
${
date
}
${
hour
}
:
${
min
}
:
${
second
}
`
// this.$set(this.searchFormField, 'date', defaultDate)
console
.
log
(
now
)
console
.
log
(
'当前时间'
,
defaultDate
)
console
.
log
(
'时间'
,
now
)
// this.formObj.outTime = now
this
.
formObj
.
inTime
=
defaultDate
// this.$set(this.searchFormField, 'date', defaultDate)
},
_userData
(
data
,
msg
,
contractTempData
)
{
if
(
msg
===
'salesman'
)
{
// 选择业务员
this
.
formObj
.
inner
=
data
.
realname
// this.formObj.detail.salesmanId = data.userId
// this.formObj.detail.salesmanPhone = data.mobile
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
(
'salesman'
)
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
_subpackageOutStock
({
ids
:
this
.
ids
,
obj
:
this
.
formObj
})
},
_subpackageOutStock
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
sampleInStock
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'样品入库成功!'
)
this
.
$emit
(
'on-result-change'
)
this
.
showModal
=
false
this
.
_hideLoading
()
}
},
_cancel
()
{
this
.
showModal
=
false
},
_open
(
ids
,
selectData
)
{
this
.
formObj
=
{
inner
:
undefined
,
innerId
:
undefined
,
inTime
:
undefined
,
remark
:
undefined
}
this
.
_userInfo
()
this
.
getNowTime
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
showModal
=
true
this
.
ids
=
ids
this
.
selectData
=
selectData
},
_labChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'query'
:
this
.
formObj
.
subcontractor
=
data
.
name
this
.
_getLab
(
data
.
name
)
break
}
},
_userInfo
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
formObj
.
inner
=
user
.
realname
this
.
formObj
.
innerId
=
user
.
id
},
_labSel
()
{
const
voList
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
voList
.
push
({
itemName
:
this
.
selectData
[
i
].
itemName
,
testBasis
:
this
.
selectData
[
i
].
testBasis
})
}
this
.
$refs
.
labModal
.
_open
(
voList
,
'batch-lab-form'
)
}
}
}
</
script
>
pages/meter-warehouse/warehouse-out/MeterMeterWarehouseOutHis.vue
0 → 100644
View file @
33912224
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
v-show=
"searchOpen"
id=
"formId"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide"
@
on-result-change=
"_btnClick"
></btn-list>
</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.key==='type'"
>
<span
v-if=
"scope.row[item.key]===0"
>
检定
</span>
<span
v-else-if=
"scope.row[item.key]===1"
>
校准
</span>
<span
v-else-if=
"scope.row[item.key]===2"
>
外观检查
</span>
</span>
<div
v-else-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</div>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<WarehousePersonSelect
ref=
"warehousePersonSelectModal"
@
on-result-change=
"_page"
></WarehousePersonSelect>
</div>
</template>
<
script
>
import
{
meterDevice
,
meterSample
}
from
'../../../api'
import
WarehousePersonSelect
from
'./WarehousePersonSelect'
export
default
{
components
:
{
WarehousePersonSelect
},
data
()
{
return
{
currentComponent
:
''
,
formId
:
'meterWarehouseInFormId'
,
searchOpen
:
false
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '入库'
// }
],
iconMsg
:
[{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}],
formObj
:
{
name
:
undefined
,
aptitude
:
undefined
},
selectIds
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
120
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'入库人'
,
key
:
'sampleInner'
,
width
:
130
},
{
title
:
'入库时间'
,
key
:
'sampleInnerTime'
,
width
:
120
,
dateTime
:
true
},
{
title
:
'出库人'
,
key
:
'sampleOuter'
,
width
:
130
},
{
title
:
'出库时间'
,
key
:
'sampleOutTime'
,
width
:
120
,
dateTime
:
true
},
{
title
:
'型号规格'
,
key
:
'spec'
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'检测类型'
,
key
:
'type'
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'详细地址'
,
key
:
'address'
,
width
:
250
},
{
title
:
'数量'
,
key
:
'quantity'
},
{
title
:
'备注'
,
key
:
'remark'
}
]
}
},
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
.
_receiveApparatus
()
break
case
'车辆管理'
:
this
.
_carManage
()
break
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'入库'
:
this
.
_submitToReview
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_carManage
()
{
this
.
$refs
.
carEdit
.
_open
()
},
_receiveApparatus
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
SelEquip
.
_open
(
'sample-input'
)
}
},
_submitToReview
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
warehousePersonSelectModal
.
_open
(
ids
)
}
},
_submitByContractIds
(
cont
)
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
onOk
:
()
=>
{
const
result
=
meterSample
.
submit
(
ids
)
if
(
result
)
{
console
.
log
(
result
)
}
}
})
}
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'仪器领用'
:
this
.
$refs
.
InstruEdit
.
_open
()
break
case
'车辆管理'
:
this
.
$refs
.
carEdit
.
_open
()
break
case
'编辑'
:
// this._editModal(true, data.id)
this
.
_personModal
(
data
)
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
}
})
},
_personModal
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
personModal
.
_open
(
data
.
id
)
},
_equipSelectBack
(
data
)
{
console
.
log
(
'_equipSelectBack'
,
data
)
const
equipData
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
const
object
=
data
[
i
]
const
obj
=
{}
obj
.
name
=
object
.
name
obj
.
certificateNo
=
object
.
ceNum
obj
.
measuringRange
=
object
.
range
obj
.
uncertaintyAccuray
=
object
.
uncertainty
obj
.
validUntil
=
object
.
effectDate
equipData
.
push
(
obj
)
}
this
.
_addEquipUse
({
sampleIds
:
this
.
selectIds
,
devicesList
:
equipData
})
},
_addEquipUse
:
async
function
(
data
)
{
const
result
=
await
meterDevice
.
addEquipUse
(
data
)
if
(
result
)
{
await
this
.
_page
()
}
},
_record
(
id
)
{
this
.
$refs
.
refModal
.
_open
(
id
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterSample
.
pageSampleOutStockHis
(
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
.
_getById
(
id
)
}
else
{
// 添加
this
.
$refs
.
editSubcontractorModal
.
_open
()
}
},
// 追加项目
_itemModal
(
data
)
{
this
.
$refs
.
refModal
.
_open
(
data
)
},
_upload
(
id
)
{
// 上传文件
this
.
$refs
.
FileManage
.
_open
(
id
,
'subcontractorId'
)
},
_getById
:
async
function
(
id
)
{
const
result
=
await
meterSample
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editSubcontractorModal
.
_openEdit
(
result
)
}
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
meterSample
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
}
}
}
</
script
>
pages/meter-warehouse/warehouse-out/MeterMeterWarehouseOutIndex.vue
0 → 100644
View file @
33912224
<
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"
>
<MeterGoOutEntrust
ref=
"waitTabs"
></MeterGoOutEntrust>
</el-tab-pane>
<el-tab-pane
label=
"历史记录"
name=
"his"
>
<MeterGoOutEntrustHis
ref=
"hisTabs"
></MeterGoOutEntrustHis>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</
template
>
<
script
>
import
MeterGoOutEntrust
from
'./MeterWarehouseOut'
import
MeterGoOutEntrustHis
from
'./MeterMeterWarehouseOutHis'
export
default
{
name
:
'MeterGoOutEntrustIndex'
,
components
:
{
MeterGoOutEntrust
,
MeterGoOutEntrustHis
},
data
()
{
return
{
activeName
:
'wait'
}
},
mounted
()
{
this
.
activeName
=
'wait'
this
.
_page
()
},
methods
:
{
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'wait'
)
{
this
.
_page
()
}
else
{
this
.
$refs
.
hisTabs
.
_page
()
}
},
_page
()
{
this
.
$refs
.
waitTabs
.
_page
()
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/meter-warehouse/warehouse-out/MeterWarehouseOut.vue
0 → 100644
View file @
33912224
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
v-show=
"searchOpen"
id=
"formId"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"样品名称:"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide"
@
on-result-change=
"_btnClick"
></btn-list>
</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.key==='type'"
>
<span
v-if=
"scope.row[item.key]===0"
>
检定
</span>
<span
v-else-if=
"scope.row[item.key]===1"
>
校准
</span>
<span
v-else-if=
"scope.row[item.key]===2"
>
外观检查
</span>
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<FileManage
ref=
"FileManage"
></FileManage>
<WarehousePersonSelect
ref=
"warehousePersonSelectModal"
@
on-result-change=
"_page"
></WarehousePersonSelect>
</div>
</template>
<
script
>
import
{
meterDevice
,
meterSample
}
from
'../../../api'
import
WarehousePersonSelect
from
'./WarehousePersonSelect'
export
default
{
components
:
{
WarehousePersonSelect
},
data
()
{
return
{
currentComponent
:
''
,
formId
:
'meterWarehouseInFormId'
,
searchOpen
:
false
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'出库'
}
],
iconMsg
:
[{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
}],
formObj
:
{
name
:
undefined
,
aptitude
:
undefined
},
selectIds
:
[],
getPage
:
{},
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
120
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
120
},
{
title
:
'型号规格'
,
key
:
'spec'
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
},
{
title
:
'检测类型'
,
key
:
'type'
},
{
title
:
'委托单位'
,
key
:
'client'
,
width
:
200
},
{
title
:
'联系人'
,
key
:
'person'
,
width
:
120
},
{
title
:
'联系电话'
,
key
:
'tel'
,
width
:
120
},
{
title
:
'详细地址'
,
key
:
'address'
,
width
:
250
},
{
title
:
'数量'
,
key
:
'quantity'
},
{
title
:
'备注'
,
key
:
'remark'
}
]
}
},
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
.
_receiveApparatus
()
break
case
'车辆管理'
:
this
.
_carManage
()
break
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'出库'
:
this
.
_submitToReview
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_carManage
()
{
this
.
$refs
.
carEdit
.
_open
()
},
_receiveApparatus
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
SelEquip
.
_open
(
'sample-input'
)
}
},
_submitToReview
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
warehousePersonSelectModal
.
_open
(
ids
)
}
},
_submitByContractIds
(
cont
)
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要把这 '
+
ids
.
length
+
' 条记录提交到'
+
cont
+
'?'
,
onOk
:
()
=>
{
const
result
=
meterSample
.
submit
(
ids
)
if
(
result
)
{
console
.
log
(
result
)
}
}
})
}
},
_iconClick
(
res
,
data
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'仪器领用'
:
this
.
$refs
.
InstruEdit
.
_open
()
break
case
'车辆管理'
:
this
.
$refs
.
carEdit
.
_open
()
break
case
'编辑'
:
// this._editModal(true, data.id)
this
.
_personModal
(
data
)
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
}
})
},
_personModal
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
personModal
.
_open
(
data
.
id
)
},
_equipSelectBack
(
data
)
{
console
.
log
(
'_equipSelectBack'
,
data
)
const
equipData
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
const
object
=
data
[
i
]
const
obj
=
{}
obj
.
name
=
object
.
name
obj
.
certificateNo
=
object
.
ceNum
obj
.
measuringRange
=
object
.
range
obj
.
uncertaintyAccuray
=
object
.
uncertainty
obj
.
validUntil
=
object
.
effectDate
equipData
.
push
(
obj
)
}
this
.
_addEquipUse
({
sampleIds
:
this
.
selectIds
,
devicesList
:
equipData
})
},
_addEquipUse
:
async
function
(
data
)
{
const
result
=
await
meterDevice
.
addEquipUse
(
data
)
if
(
result
)
{
await
this
.
_page
()
}
},
_record
(
id
)
{
this
.
$refs
.
refModal
.
_open
(
id
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterSample
.
pageSampleOutStock
(
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
.
_getById
(
id
)
}
else
{
// 添加
this
.
$refs
.
editSubcontractorModal
.
_open
()
}
},
// 追加项目
_itemModal
(
data
)
{
this
.
$refs
.
refModal
.
_open
(
data
)
},
_upload
(
id
)
{
// 上传文件
this
.
$refs
.
FileManage
.
_open
(
id
,
'subcontractorId'
)
},
_getById
:
async
function
(
id
)
{
const
result
=
await
meterSample
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editSubcontractorModal
.
_openEdit
(
result
)
}
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
meterSample
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
}
}
}
</
script
>
pages/meter-warehouse/warehouse-out/WarehousePersonSelect.vue
0 → 100644
View file @
33912224
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"700"
>
<p
slot=
"header"
>
样品出库
</p>
<div>
<Form
id=
"batch-edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
>
<Form-item
label=
"出库人:"
prop=
"outer"
>
<Input
v-model=
"formObj.outer"
@
click
.
native=
"_selectStaff"
readonly
name=
"outer"
></Input>
</Form-item>
<Form-item
label=
"出库时间:"
prop=
"outTime"
>
<div
class=
"block"
>
<el-date-picker
v-model=
"formObj.outTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
>
</el-date-picker>
</div>
</Form-item>
<!--
<Form-item
label=
"备注"
prop=
"remark"
>
-->
<!--
<Input
v-model=
"formObj.remark"
:rows=
"3"
type=
"textarea"
--
>
<!-- name="remark"-->
<!-- placeholder="请输入备注"/>-->
<!--
</Form-item>
-->
</Form>
</div>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></ModalFooter>
</div>
</Modal>
<!--选择实验室-->
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userData"
is-change
></UserInfo>
</div>
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
ModalFooter
from
'../../../components/base/modalFooter'
import
UserInfo
from
'../../../components/user-info-single/assignPerson'
import
{
meterSample
}
from
'../../../api'
/**
* 添加编辑分包信息
*/
const
defVal
=
{
outer
:
undefined
,
outerId
:
undefined
,
outTime
:
undefined
,
remark
:
undefined
}
export
default
{
components
:
{
ModalFooter
,
UserInfo
// AutoCompletes
},
data
()
{
return
{
ids
:
[],
selectData
:
[],
formObj
:
defVal
,
ruleValidate
:
{
// price: [{required: true, message: '分包价不能为空', trigger: 'blur', type: 'number'}],
},
showModal
:
false
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
],
labList
:
[]
}
},
methods
:
{
_labResult
(
data
)
{
console
.
log
(
data
)
},
getNowTime
()
{
const
now
=
new
Date
()
const
year
=
now
.
getFullYear
()
// 得到年份
let
month
=
now
.
getMonth
()
// 得到月份
let
date
=
now
.
getDate
()
// 得到日期
let
hour
=
now
.
getHours
()
let
min
=
now
.
getMinutes
()
let
second
=
now
.
getSeconds
()
month
=
month
+
1
month
=
month
.
toString
().
padStart
(
2
,
'0'
)
date
=
date
.
toString
().
padStart
(
2
,
'0'
)
hour
=
hour
.
toString
().
padStart
(
2
,
'0'
)
min
=
min
.
toString
().
padStart
(
2
,
'0'
)
second
=
second
.
toString
().
padStart
(
2
,
'0'
)
const
defaultDate
=
`
${
year
}
-
${
month
}
-
${
date
}
${
hour
}
:
${
min
}
:
${
second
}
`
// this.$set(this.searchFormField, 'date', defaultDate)
console
.
log
(
now
)
console
.
log
(
'当前时间'
,
defaultDate
)
console
.
log
(
'时间'
,
now
)
// this.formObj.outTime = now
this
.
formObj
.
outTime
=
defaultDate
// this.$set(this.searchFormField, 'date', defaultDate)
},
_userData
(
data
,
msg
,
contractTempData
)
{
if
(
msg
===
'salesman'
)
{
// 选择业务员
this
.
formObj
.
outer
=
data
.
realname
// this.formObj.detail.salesmanId = data.userId
// this.formObj.detail.salesmanPhone = data.mobile
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
(
'salesman'
)
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
_subpackageOutStock
({
ids
:
this
.
ids
,
obj
:
this
.
formObj
})
},
_subpackageOutStock
:
async
function
(
data
)
{
const
result
=
await
meterSample
.
sampleOutStock
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'样品出库成功!'
)
this
.
$emit
(
'on-result-change'
)
this
.
showModal
=
false
this
.
_hideLoading
()
}
},
_cancel
()
{
this
.
showModal
=
false
},
_open
(
ids
,
selectData
)
{
this
.
formObj
=
{
outer
:
undefined
,
outerId
:
undefined
,
outTime
:
undefined
,
remark
:
undefined
}
this
.
_userInfo
()
this
.
getNowTime
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
showModal
=
true
this
.
ids
=
ids
this
.
selectData
=
selectData
},
_labChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'query'
:
this
.
formObj
.
subcontractor
=
data
.
name
this
.
_getLab
(
data
.
name
)
break
}
},
_userInfo
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
formObj
.
outer
=
user
.
realname
this
.
formObj
.
outerId
=
user
.
id
},
_labSel
()
{
const
voList
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
voList
.
push
({
itemName
:
this
.
selectData
[
i
].
itemName
,
testBasis
:
this
.
selectData
[
i
].
testBasis
})
}
this
.
$refs
.
labModal
.
_open
(
voList
,
'batch-lab-form'
)
}
}
}
</
script
>
router/meter-routes.js
View file @
33912224
...
@@ -35,6 +35,7 @@ import MeterContractFileIndex from '../pages/meter-contract/contract-file/MeterC
...
@@ -35,6 +35,7 @@ import MeterContractFileIndex from '../pages/meter-contract/contract-file/MeterC
import
MeterSampleProgress
from
'../pages/meter-progress/progress-sample/MeterSampleProgress'
import
MeterSampleProgress
from
'../pages/meter-progress/progress-sample/MeterSampleProgress'
import
MeterClientOnlineEntrustIndex
from
'../pages/meter-entrust/client-online/MeterClientOnlineEntrustIndex'
import
MeterClientOnlineEntrustIndex
from
'../pages/meter-entrust/client-online/MeterClientOnlineEntrustIndex'
import
MeterMeterWarehouseInIndex
from
'../pages/meter-warehouse/warehouse-in/MeterMeterWarehouseInIndex'
import
MeterMeterWarehouseInIndex
from
'../pages/meter-warehouse/warehouse-in/MeterMeterWarehouseInIndex'
import
MeterMeterWarehouseOutIndex
from
'../pages/meter-warehouse/warehouse-out/MeterMeterWarehouseOutIndex'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -233,6 +234,11 @@ export default [
...
@@ -233,6 +234,11 @@ export default [
path
:
'sample_in_store'
,
path
:
'sample_in_store'
,
component
:
MeterMeterWarehouseInIndex
,
component
:
MeterMeterWarehouseInIndex
,
meta
:
{
title
:
'样品入库管理'
}
meta
:
{
title
:
'样品入库管理'
}
},
{
path
:
'sample_out_store'
,
component
:
MeterMeterWarehouseOutIndex
,
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