Commit 53b0f40f by zhuxiaomei

添加界面合成一个

parent ca670964
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
} 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({
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
:close-on-popstate="true" :close-on-popstate="true"
:style="{ height: '70%' }"> :style="{ height: '70%' }">
<div class="popup-cont-btn popup-shelves"> <div class="popup-cont-btn popup-shelves">
<div> <!-- <div>-->
<p>抽样单类型</p> <!-- <p>抽样单类型</p>-->
<van-radio-group v-model="radio" direction="horizontal"> <!-- <van-radio-group v-model="radio" direction="horizontal">-->
<van-radio :name="1">网络</van-radio> <!-- <van-radio :name="1">网络</van-radio>-->
<van-radio :name="0">非网络</van-radio> <!-- <van-radio :name="0">非网络</van-radio>-->
<van-radio :name="2">农产品</van-radio> <!-- <van-radio :name="2">农产品</van-radio>-->
</van-radio-group> <!-- </van-radio-group>-->
</div> <!-- </div>-->
<div> <div>
<p>所属货架</p> <p>所属货架</p>
<van-tree-select <van-tree-select
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
data() { data() {
return { return {
showPopup: false, showPopup: false,
radio: -1, radio: 0,
places: [ places: [
{ {
text: '地点1', text: '地点1',
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
methods: { methods: {
_open(planId) { _open(planId) {
this.showPopup = true this.showPopup = true
this.radio = -1 this.radio = 0
this.activeId = '' this.activeId = ''
this.planId = planId this.planId = planId
this._getShelves() this._getShelves()
......
...@@ -98,6 +98,11 @@ export default { ...@@ -98,6 +98,11 @@ export default {
}, },
_create: async function () { _create: async function () {
if (this.count) { if (this.count) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId}) let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) { if (result) {
this.$toast('生成成功!') this.$toast('生成成功!')
...@@ -142,6 +147,11 @@ export default { ...@@ -142,6 +147,11 @@ export default {
}, },
_locCreate: async function () { _locCreate: async function () {
if (this.locCount) { if (this.locCount) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId}) let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) { if (result) {
this.$toast('生成成功!') this.$toast('生成成功!')
......
...@@ -94,8 +94,14 @@ export default { ...@@ -94,8 +94,14 @@ export default {
}, },
_create: async function () { _create: async function () {
if (this.count) { if (this.count) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId}) let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) { if (result) {
// this.$toast.clear();
this.$toast('生成成功!') this.$toast('生成成功!')
this.userList = result this.userList = result
} }
...@@ -138,8 +144,14 @@ export default { ...@@ -138,8 +144,14 @@ export default {
}, },
_locCreate: async function () { _locCreate: async function () {
if (this.locCount) { if (this.locCount) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId}) let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) { if (result) {
// this.$toast.clear();
this.$toast('生成成功!') this.$toast('生成成功!')
this.locList = result this.locList = result
} }
......
...@@ -17,7 +17,7 @@ export default [ ...@@ -17,7 +17,7 @@ export default [
{path: 'sampling_list_add', component: SamplingListAdd, meta: {customerNavBarTitle: true}}, {path: 'sampling_list_add', component: SamplingListAdd, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_add_agriculture', component: SamplingListAddAgriculture, 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_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_agriculture', component: SamplingListDetailAgriculture, meta: {title: '抽样单详情-农产品'}},
{path: 'sampling_list_detail_net', component: SamplingListDetailNet, meta: {title: '抽样单详情-网络'}}, {path: 'sampling_list_detail_net', component: SamplingListDetailNet, meta: {title: '抽样单详情-网络'}},
{path: 'file', component: File, 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