Commit cdefca66 by zhuxiaomei

抽样单位取最近的 重选清空remark

parent ad4e06d4
...@@ -10,4 +10,5 @@ export default { ...@@ -10,4 +10,5 @@ export default {
edit: data => httpJson.post('/drs/v1/sampling_summary/edit',JSON.stringify(data)).then(res => res), 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), 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), getById: id => http.get('/drs/v1/sampling_summary/' + id).then(res => res),
lastTester: () => http.post('/drs/v1/sampling_summary/last_tester').then(res => res),
} }
...@@ -342,11 +342,11 @@ ...@@ -342,11 +342,11 @@
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field <van-field :readonly="sample.type!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="sample.typeRemak" v-model="sample.typeRemark"
></van-field> ></van-field>
</div> </div>
</template> </template>
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field <van-field :readonly="sample.source!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field <van-field :readonly="sample.properties!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
...@@ -684,7 +684,7 @@ ...@@ -684,7 +684,7 @@
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field <van-field :readonly="formObj.thirdPartyNature!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
...@@ -906,7 +906,7 @@ ...@@ -906,7 +906,7 @@
thirdClass: '', thirdClass: '',
fourthClass: '', fourthClass: '',
type: '', type: '',
typeRemak: '', typeRemark: '',
source: '', source: '',
sourceRemark: '', sourceRemark: '',
properties: '', properties: '',
...@@ -949,6 +949,29 @@ ...@@ -949,6 +949,29 @@
shelfId: this.$route.query.shelfId 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: { computed: {
areaObj:function(){ areaObj:function(){
return this.netTested.testedProvince+this.netTested.testedCity+this.netTested.testedCountry return this.netTested.testedProvince+this.netTested.testedCity+this.netTested.testedCountry
...@@ -959,12 +982,25 @@ ...@@ -959,12 +982,25 @@
}, },
methods: { methods: {
_open() { _open() {
if (this.$route.query.id) { if (this.$route.query.id) {//编辑
this.id = this.$route.query.id this.id = this.$route.query.id
this._getData() this._getData()
} else { } else {//添加
this.id = '' this.id = ''
this.formObj.testMembers = this.$global.getUserInfo().realname 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 () { _getData: async function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment