Commit 53b0f40f by zhuxiaomei

添加界面合成一个

parent ca670964
......@@ -185,7 +185,7 @@
} else if (testedType === 0) {
this.$router.push({
path: '/sampling_list/sampling_list_add',
query: {testedType, shelfId, title: '抽样单添加-非网络'}
query: {testedType, shelfId, title: '抽样单添加'}
})
} else {
this.$router.push({
......
......@@ -10,14 +10,14 @@
:close-on-popstate="true"
:style="{ height: '70%' }">
<div class="popup-cont-btn popup-shelves">
<div>
<p>抽样单类型</p>
<van-radio-group v-model="radio" direction="horizontal">
<van-radio :name="1">网络</van-radio>
<van-radio :name="0">非网络</van-radio>
<van-radio :name="2">农产品</van-radio>
</van-radio-group>
</div>
<!-- <div>-->
<!-- <p>抽样单类型</p>-->
<!-- <van-radio-group v-model="radio" direction="horizontal">-->
<!-- <van-radio :name="1">网络</van-radio>-->
<!-- <van-radio :name="0">非网络</van-radio>-->
<!-- <van-radio :name="2">农产品</van-radio>-->
<!-- </van-radio-group>-->
<!-- </div>-->
<div>
<p>所属货架</p>
<van-tree-select
......@@ -44,7 +44,7 @@
data() {
return {
showPopup: false,
radio: -1,
radio: 0,
places: [
{
text: '地点1',
......@@ -94,7 +94,7 @@
methods: {
_open(planId) {
this.showPopup = true
this.radio = -1
this.radio = 0
this.activeId = ''
this.planId = planId
this._getShelves()
......
......@@ -98,6 +98,11 @@ export default {
},
_create: async function () {
if (this.count) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) {
this.$toast('生成成功!')
......@@ -142,6 +147,11 @@ export default {
},
_locCreate: async function () {
if (this.locCount) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) {
this.$toast('生成成功!')
......
......@@ -94,8 +94,14 @@ export default {
},
_create: async function () {
if (this.count) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) {
// this.$toast.clear();
this.$toast('生成成功!')
this.userList = result
}
......@@ -138,8 +144,14 @@ export default {
},
_locCreate: async function () {
if (this.locCount) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) {
// this.$toast.clear();
this.$toast('生成成功!')
this.locList = result
}
......
......@@ -17,7 +17,7 @@ export default [
{path: 'sampling_list_add', component: SamplingListAdd, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_add_agriculture', component: SamplingListAddAgriculture, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_add_net', component: SamplingListAddNet, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_detail', component: SamplingListDetail, meta: {title: '抽样单详情-非网络'}},
{path: 'sampling_list_detail', component: SamplingListDetail, meta: {title: '抽样单详情'}},
{path: 'sampling_list_detail_agriculture', component: SamplingListDetailAgriculture, meta: {title: '抽样单详情-农产品'}},
{path: 'sampling_list_detail_net', component: SamplingListDetailNet, meta: {title: '抽样单详情-网络'}},
{path: 'file', component: File, meta: {title: '附件'}},
......
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