Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-h5app-drs
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
zhuxiaomei
patzn-cloud-web-h5app-drs
Commits
cdefca66
Commit
cdefca66
authored
Nov 04, 2020
by
zhuxiaomei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽样单位取最近的 重选清空remark
parent
ad4e06d4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
22 deletions
+138
-22
sampling-summary.js
src/api/drs/sampling-summary.js
+1
-0
SamplingListAdd.vue
src/page/sampling-list/SamplingListAdd.vue
+93
-14
SamplingListAddNet.vue
src/page/sampling-list/SamplingListAddNet.vue
+44
-8
No files found.
src/api/drs/sampling-summary.js
View file @
cdefca66
...
...
@@ -10,4 +10,5 @@ export default {
edit
:
data
=>
httpJson
.
post
(
'/drs/v1/sampling_summary/edit'
,
JSON
.
stringify
(
data
)).
then
(
res
=>
res
),
deleteByIds
:
ids
=>
http
.
delete
(
'/drs/v1/sampling_summary/?ids='
+
ids
).
then
(
res
=>
res
),
getById
:
id
=>
http
.
get
(
'/drs/v1/sampling_summary/'
+
id
).
then
(
res
=>
res
),
lastTester
:
()
=>
http
.
post
(
'/drs/v1/sampling_summary/last_tester'
).
then
(
res
=>
res
),
}
src/page/sampling-list/SamplingListAdd.vue
View file @
cdefca66
...
...
@@ -102,7 +102,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"nonNetTested.areaType!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -183,7 +183,7 @@
{{item}}
</van-radio>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"placeRemark1Readonly"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -197,7 +197,7 @@
{{item}}
</van-radio>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"placeRemark2Readonly"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -225,7 +225,7 @@
shape=
"square"
>
{{item}}
</van-radio>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"placeRemark3Readonly"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -344,7 +344,7 @@
{{
item
}}
</van-radio>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"sample.type!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -369,7 +369,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"sample.source!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -392,7 +392,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"sample.properties!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -688,7 +688,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"formObj.thirdPartyNature!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -843,7 +843,7 @@
selectDateType
:
''
,
showCityPicker
:
false
,
areaList
:
areaList
,
areaList
:
areaList
,
formObj
:
{
samplingNum
:
''
,
...
...
@@ -867,12 +867,12 @@
testAddress
:
''
,
testLinkman
:
''
,
testTel
:
''
,
testEmail
:
''
,
testFax
:
''
,
remark
:
''
,
samplingDate
:
''
,
testMembers
:
''
,
testEmail
:
''
,
},
nonNetTested
:
{
name
:
''
,
...
...
@@ -945,6 +945,11 @@
placeRemark1
:
''
,
placeRemark2
:
''
,
placeRemark3
:
''
,
placeRemark1Readonly
:
true
,
placeRemark2Readonly
:
true
,
placeRemark3Readonly
:
true
,
proLinkList
:
[
'原辅料库'
,
'生产线'
,
'半成品库'
,
'成品库待检区'
,
'成品库已检区'
,
'其他'
],
flowLinkList
:
[
'农贸市场'
,
'菜市场'
,
'批发市场'
,
'商场'
,
'超市'
,
'小食杂店'
,
'其他'
],
restLinkList1
:
[
...
...
@@ -968,9 +973,70 @@
shelfId
:
this
.
$route
.
query
.
shelfId
}
},
watch
:
{
//除储存条件 选其他以外的选项备注清空
'nonNetTested.areaType'
:
function
(
val
)
{
if
(
val
!==
''
&&
val
!==
'其他'
)
{
this
.
nonNetTested
.
areaTypeRemark
=
''
}
},
'sample.type'
:
function
(
val
)
{
if
(
val
!==
''
&&
val
!==
'其他'
)
{
this
.
sample
.
typeRemark
=
''
}
},
'sample.source'
:
function
(
val
)
{
if
(
val
!==
''
&&
val
!==
'其他'
)
{
this
.
sample
.
sourceRemark
=
''
}
},
'sample.properties'
:
function
(
val
)
{
if
(
val
!==
''
&&
val
!==
'其他'
)
{
this
.
sample
.
propertiesRemark
=
''
}
},
'formObj.thirdPartyNature'
:
function
(
val
)
{
if
(
val
!==
''
&&
val
!==
'其他'
)
{
this
.
formObj
.
thirdPartyNatureRemark
=
''
}
},
//抽样地点特殊处理
place
:
function
(
val
)
{
if
(
val
!==
''
)
{
let
placeLink
=
val
.
split
(
','
)[
0
]
let
place
=
val
.
split
(
','
)[
1
]
if
(
placeLink
===
'1'
)
{
if
(
place
===
'其他'
)
{
this
.
placeRemark1Readonly
=
false
}
else
{
this
.
placeRemark1
=
''
this
.
placeRemark1Readonly
=
true
}
}
else
if
(
placeLink
===
'2'
)
{
if
(
place
===
'其他'
)
{
this
.
placeRemark2Readonly
=
false
}
else
{
this
.
placeRemark2
=
''
this
.
placeRemark2Readonly
=
true
}
}
else
if
(
placeLink
===
'3'
)
{
if
(
place
===
'其他'
)
{
this
.
placeRemark3Readonly
=
false
}
else
{
this
.
placeRemark3
=
''
this
.
placeRemark3Readonly
=
true
}
}
}
else
{
this
.
placeRemark1Readonly
=
true
this
.
placeRemark2Readonly
=
true
this
.
placeRemark3Readonly
=
true
}
},
},
computed
:
{
areaObj
:
function
()
{
return
this
.
nonNetTested
.
testedProvince
+
this
.
nonNetTested
.
testedCity
+
this
.
nonNetTested
.
testedCountry
areaObj
:
function
()
{
return
this
.
nonNetTested
.
testedProvince
+
this
.
nonNetTested
.
testedCity
+
this
.
nonNetTested
.
testedCountry
}
},
mounted
()
{
...
...
@@ -978,12 +1044,25 @@
},
methods
:
{
_open
()
{
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
//编辑
this
.
id
=
this
.
$route
.
query
.
id
this
.
_getData
()
}
else
{
}
else
{
//添加
this
.
id
=
''
this
.
formObj
.
testMembers
=
this
.
$global
.
getUserInfo
().
realname
this
.
_getLastTester
()
}
},
//获取最近填写的抽样单位信息
_getLastTester
:
async
function
()
{
let
result
=
await
samplingSummary
.
lastTester
()
if
(
result
)
{
this
.
formObj
.
testName
=
result
.
testName
?
result
.
testName
:
''
this
.
formObj
.
testAddress
=
result
.
testAddress
?
result
.
testAddress
:
''
this
.
formObj
.
testLinkman
=
result
.
testLinkman
?
result
.
testLinkman
:
''
this
.
formObj
.
testTel
=
result
.
testTel
?
result
.
testTel
:
''
this
.
formObj
.
testEmail
=
result
.
testEmail
?
result
.
testEmail
:
''
this
.
formObj
.
testFax
=
result
.
testFax
?
result
.
testFax
:
''
}
},
_getData
:
async
function
()
{
...
...
src/page/sampling-list/SamplingListAddNet.vue
View file @
cdefca66
...
...
@@ -342,11 +342,11 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"sample.type!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
v-model=
"sample.typeRemak"
v-model=
"sample.typeRema
r
k"
></van-field>
</div>
</
template
>
...
...
@@ -366,7 +366,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"sample.source!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -389,7 +389,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"sample.properties!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -684,7 +684,7 @@
</van-radio>
</van-radio-group>
<div
style=
"border-bottom: 1px solid #000"
>
<van-field
<van-field
:readonly=
"formObj.thirdPartyNature!=='其他'"
label-class=
"cus-field-class"
label-width=
"50%"
label-align=
"center"
...
...
@@ -906,7 +906,7 @@
thirdClass
:
''
,
fourthClass
:
''
,
type
:
''
,
typeRemak
:
''
,
typeRema
r
k
:
''
,
source
:
''
,
sourceRemark
:
''
,
properties
:
''
,
...
...
@@ -949,6 +949,29 @@
shelfId
:
this
.
$route
.
query
.
shelfId
}
},
watch
:{
//除储存条件 选其他以外的选项备注清空
'sample.type'
:
function
(
val
)
{
if
(
val
!==
'其他'
){
this
.
sample
.
typeRemark
=
''
}
},
'sample.source'
:
function
(
val
)
{
if
(
val
!==
'其他'
){
this
.
sample
.
sourceRemark
=
''
}
},
'sample.properties'
:
function
(
val
)
{
if
(
val
!==
'其他'
){
this
.
sample
.
propertiesRemark
=
''
}
},
'formObj.thirdPartyNature'
:
function
(
val
)
{
if
(
val
!==
'其他'
){
this
.
formObj
.
thirdPartyNatureRemark
=
''
}
}
},
computed
:
{
areaObj
:
function
(){
return
this
.
netTested
.
testedProvince
+
this
.
netTested
.
testedCity
+
this
.
netTested
.
testedCountry
...
...
@@ -959,12 +982,25 @@
},
methods
:
{
_open
()
{
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
//编辑
this
.
id
=
this
.
$route
.
query
.
id
this
.
_getData
()
}
else
{
}
else
{
//添加
this
.
id
=
''
this
.
formObj
.
testMembers
=
this
.
$global
.
getUserInfo
().
realname
this
.
_getLastTester
()
}
},
//获取最近填写的抽样单位信息
_getLastTester
:
async
function
()
{
let
result
=
await
samplingSummary
.
lastTester
()
if
(
result
)
{
this
.
formObj
.
testName
=
result
.
testName
?
result
.
testName
:
''
this
.
formObj
.
testAddress
=
result
.
testAddress
?
result
.
testAddress
:
''
this
.
formObj
.
testLinkman
=
result
.
testLinkman
?
result
.
testLinkman
:
''
this
.
formObj
.
testTel
=
result
.
testTel
?
result
.
testTel
:
''
this
.
formObj
.
testEmail
=
result
.
testEmail
?
result
.
testEmail
:
''
this
.
formObj
.
testFax
=
result
.
testFax
?
result
.
testFax
:
''
}
},
_getData
:
async
function
()
{
...
...
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