Commit 208b31f9 by zhuxiaomei

直接添加抽样单设为一级页面--修改

parent 3dd5e836
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
> >
<template #right > <template #right >
<div style="color: #fff" @click="_addList">添加抽样单</div> <div style="color: #fff" @click="_addList">添加抽样单</div>
<div style="color: #fff;margin-left: 20px" @click="_goto('/sampling_list/sampling_task')">抽样任务</div> <div style="color: #fff;margin-left: 10px" @click="_goto('/sampling_list/sampling_task')">抽样任务</div>
</template> </template>
</van-nav-bar> </van-nav-bar>
</template> </template>
...@@ -202,22 +202,22 @@ export default { ...@@ -202,22 +202,22 @@ export default {
} }
}, },
_shelvesResult({testedType, shelfId}) { _shelvesResult({testedType, shelfId}) {
if (testedType === 1) { // if (testedType === 1) {
this.$router.push({ // this.$router.push({
path: '/sampling_list/sampling_list_add_net', // path: '/sampling_list/sampling_list_add_net',
query: {testedType, shelfId, title: '抽样单添加-网络'} // query: {testedType, shelfId, title: '抽样单添加-网络'}
}) // })
} else if (testedType === 0) { // } else if (testedType === 0) {
this.$router.push({ this.$router.push({
path: '/sampling_list/sampling_list_add', path: '/sampling_list/sampling_list_add',
query: {testedType, shelfId, title: '抽样单添加'} query: {testedType, shelfId, title: '抽样单添加'}
}) })
} else { // } else {
this.$router.push({ // this.$router.push({
path: '/sampling_list/sampling_list_add_agriculture', // path: '/sampling_list/sampling_list_add_agriculture',
query: {testedType, shelfId, title: '抽样单添加-农场品'} // query: {testedType, shelfId, title: '抽样单添加-农场品'}
}) // })
} // }
}, },
_longtapHandler() { _longtapHandler() {
this.showCheck = true this.showCheck = true
...@@ -241,35 +241,35 @@ export default { ...@@ -241,35 +241,35 @@ export default {
this.checkListValue.splice(this.checkListValue.indexOf(item.id), 1); this.checkListValue.splice(this.checkListValue.indexOf(item.id), 1);
} }
} else { } else {
if (item.testedType === 1) { // if (item.testedType === 1) {
this.$router.push({path: '/sampling_list/sampling_list_detail_net', query: {id: item.id}}) // this.$router.push({path: '/sampling_list/sampling_list_detail_net', query: {id: item.id}})
} else if (item.testedType === 0) { // } else if (item.testedType === 0) {
this.$router.push({path: '/sampling_list/sampling_list_detail', query: {id: item.id}}) this.$router.push({path: '/sampling_list/sampling_list_detail', query: {id: item.id}})
} else { // } else {
this.$router.push({ // this.$router.push({
path: '/sampling_list/sampling_list_detail_agriculture', // path: '/sampling_list/sampling_list_detail_agriculture',
query: {id: item.id} // query: {id: item.id}
}) // })
} // }
} }
}, },
_edit(item) { _edit(item) {
if (item.testedType === 1) { // if (item.testedType === 1) {
this.$router.push({ // this.$router.push({
path: '/sampling_list/sampling_list_add_net', // path: '/sampling_list/sampling_list_add_net',
query: {id: item.id, title: '抽样单编辑-网络'} // query: {id: item.id, title: '抽样单编辑-网络'}
}) // })
} else if (item.testedType === 0) { // } else if (item.testedType === 0) {
this.$router.push({ this.$router.push({
path: '/sampling_list/sampling_list_add', path: '/sampling_list/sampling_list_add',
query: {id: item.id, title: '抽样单编辑-非网络'} query: {id: item.id, title: '抽样单编辑'}
}) })
} else { // } else {
this.$router.push({ // this.$router.push({
path: '/sampling_list/sampling_list_add_agriculture', // path: '/sampling_list/sampling_list_add_agriculture',
query: {id: item.id, title: '抽样单编辑-农场品'} // query: {id: item.id, title: '抽样单编辑-农场品'}
}) // })
} // }
}, },
_print(item) { _print(item) {
//调用第三放程序打开指定文件(必须是本地路径) //调用第三放程序打开指定文件(必须是本地路径)
......
...@@ -875,7 +875,7 @@ export default { ...@@ -875,7 +875,7 @@ export default {
id: '', id: '',
testedType: this.$route.query.testedType?this.$route.query.testedType:'', testedType: this.$route.query.testedType?this.$route.query.testedType:0,
shelfId: this.$route.query.shelfId?this.$route.query.shelfId:'' shelfId: this.$route.query.shelfId?this.$route.query.shelfId:''
} }
}, },
...@@ -938,7 +938,9 @@ export default { ...@@ -938,7 +938,9 @@ export default {
}, },
computed: { computed: {
areaObj: function () { areaObj: function () {
return this.nonNetTested.testedProvince + this.nonNetTested.testedCity + this.nonNetTested.testedCountry return this.nonNetTested.testedProvince?this.nonNetTested.testedProvince:''
+ this.nonNetTested.testedCity?this.nonNetTested.testedCity:''
+ this.nonNetTested.testedCountry?this.nonNetTested.testedCountry:''
} }
}, },
mounted() { mounted() {
...@@ -1062,22 +1064,6 @@ export default { ...@@ -1062,22 +1064,6 @@ export default {
this.$toast('请输入抽样单编号') this.$toast('请输入抽样单编号')
return true return true
} }
if (this.sample.firstClass === '') {
this.$toast('请输入大类')
return true
}
if (this.sample.secondClass === '') {
this.$toast('请输入大亚类')
return true
}
if (this.sample.thirdClass === '') {
this.$toast('请输入次亚类')
return true
}
if (this.sample.fourthClass === '') {
this.$toast('请输入细类')
return true
}
return false return false
}, },
_ok() { _ok() {
......
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