Commit 208b31f9 by zhuxiaomei

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

parent 3dd5e836
......@@ -25,7 +25,7 @@
>
<template #right >
<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>
</van-nav-bar>
</template>
......@@ -202,22 +202,22 @@ export default {
}
},
_shelvesResult({testedType, shelfId}) {
if (testedType === 1) {
this.$router.push({
path: '/sampling_list/sampling_list_add_net',
query: {testedType, shelfId, title: '抽样单添加-网络'}
})
} else if (testedType === 0) {
// if (testedType === 1) {
// this.$router.push({
// path: '/sampling_list/sampling_list_add_net',
// query: {testedType, shelfId, title: '抽样单添加-网络'}
// })
// } else if (testedType === 0) {
this.$router.push({
path: '/sampling_list/sampling_list_add',
query: {testedType, shelfId, title: '抽样单添加'}
})
} else {
this.$router.push({
path: '/sampling_list/sampling_list_add_agriculture',
query: {testedType, shelfId, title: '抽样单添加-农场品'}
})
}
// } else {
// this.$router.push({
// path: '/sampling_list/sampling_list_add_agriculture',
// query: {testedType, shelfId, title: '抽样单添加-农场品'}
// })
// }
},
_longtapHandler() {
this.showCheck = true
......@@ -241,35 +241,35 @@ export default {
this.checkListValue.splice(this.checkListValue.indexOf(item.id), 1);
}
} else {
if (item.testedType === 1) {
this.$router.push({path: '/sampling_list/sampling_list_detail_net', query: {id: item.id}})
} else if (item.testedType === 0) {
// if (item.testedType === 1) {
// this.$router.push({path: '/sampling_list/sampling_list_detail_net', query: {id: item.id}})
// } else if (item.testedType === 0) {
this.$router.push({path: '/sampling_list/sampling_list_detail', query: {id: item.id}})
} else {
this.$router.push({
path: '/sampling_list/sampling_list_detail_agriculture',
query: {id: item.id}
})
}
// } else {
// this.$router.push({
// path: '/sampling_list/sampling_list_detail_agriculture',
// query: {id: item.id}
// })
// }
}
},
_edit(item) {
if (item.testedType === 1) {
this.$router.push({
path: '/sampling_list/sampling_list_add_net',
query: {id: item.id, title: '抽样单编辑-网络'}
})
} else if (item.testedType === 0) {
// if (item.testedType === 1) {
// this.$router.push({
// path: '/sampling_list/sampling_list_add_net',
// query: {id: item.id, title: '抽样单编辑-网络'}
// })
// } else if (item.testedType === 0) {
this.$router.push({
path: '/sampling_list/sampling_list_add',
query: {id: item.id, title: '抽样单编辑-非网络'}
query: {id: item.id, title: '抽样单编辑'}
})
} else {
this.$router.push({
path: '/sampling_list/sampling_list_add_agriculture',
query: {id: item.id, title: '抽样单编辑-农场品'}
})
}
// } else {
// this.$router.push({
// path: '/sampling_list/sampling_list_add_agriculture',
// query: {id: item.id, title: '抽样单编辑-农场品'}
// })
// }
},
_print(item) {
//调用第三放程序打开指定文件(必须是本地路径)
......
......@@ -875,7 +875,7 @@ export default {
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:''
}
},
......@@ -938,7 +938,9 @@ export default {
},
computed: {
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() {
......@@ -1062,22 +1064,6 @@ export default {
this.$toast('请输入抽样单编号')
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
},
_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