|
@@ -15,10 +15,9 @@
|
|
|
|
|
|
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
|
<van-cell
|
|
<van-cell
|
|
|
- v-for="item in list"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :title="item.name"
|
|
|
|
|
- :label="item.uscc"
|
|
|
|
|
|
|
+ v-for="(item, index) in list"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :title="item"
|
|
|
@click="choose(item)"
|
|
@click="choose(item)"
|
|
|
/>
|
|
/>
|
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
@@ -28,10 +27,14 @@
|
|
|
label="注册号"
|
|
label="注册号"
|
|
|
placeholder="请输入注册号"
|
|
placeholder="请输入注册号"
|
|
|
v-model="form.uscc"
|
|
v-model="form.uscc"
|
|
|
- @change="changeUsscc"
|
|
|
|
|
:rules="[{ required: true, message: '请填写注册号' }]"
|
|
:rules="[{ required: true, message: '请填写注册号' }]"
|
|
|
/>
|
|
/>
|
|
|
- <template v-if="form.id">
|
|
|
|
|
|
|
+ <div style="margin:30px" v-if="!form.id">
|
|
|
|
|
+ <van-button class="submit" round block type="info" @click="byUscc">
|
|
|
|
|
+ 查询
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template v-else>
|
|
|
<van-field
|
|
<van-field
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
name="经营范围"
|
|
name="经营范围"
|
|
@@ -297,31 +300,44 @@ export default {
|
|
|
data.query[key] = this.form[key];
|
|
data.query[key] = this.form[key];
|
|
|
}
|
|
}
|
|
|
this.$http
|
|
this.$http
|
|
|
- .post("/trainingInstitution/all", data, { body: "json" })
|
|
|
|
|
|
|
+ .post("/trainingInstitution/name", data, { body: "json" })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.$toast.clear();
|
|
this.$toast.clear();
|
|
|
- if (res.empty) {
|
|
|
|
|
- this.$toast("暂无该企业信息");
|
|
|
|
|
- } else {
|
|
|
|
|
- this.list = res.content;
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.showPopover = true;
|
|
|
|
|
- });
|
|
|
|
|
- }, 500);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.list = res.content;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.showPopover = true;
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 500);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- changeUsscc() {
|
|
|
|
|
- if (!this.form.id) {
|
|
|
|
|
- this.like("", "uscc");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ byUscc() {
|
|
|
|
|
+ this.$toast.loading({
|
|
|
|
|
+ message: "加载中...",
|
|
|
|
|
+ forbidClick: true,
|
|
|
|
|
+ duration: 0
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post(
|
|
|
|
|
+ `/trainingInstitution/byUscc?name=${this.form.name}&uscc=${this.form.uscc}`
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.$toast.clear();
|
|
|
|
|
+ this.form = { ...res };
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ this.$toast(e.error);
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
choose(info) {
|
|
choose(info) {
|
|
|
- this.form = { examPoint: false, ...info };
|
|
|
|
|
|
|
+ this.form.name = info;
|
|
|
|
|
+ // this.form = { examPoint: false, ...info };
|
|
|
this.showPopover = false;
|
|
this.showPopover = false;
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
|
|
+ if (!this.form.id) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.$toast.loading({
|
|
this.$toast.loading({
|
|
|
message: "加载中...",
|
|
message: "加载中...",
|
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
@@ -338,6 +354,9 @@ export default {
|
|
|
message: "信息已经提交成功,感谢您的配合。",
|
|
message: "信息已经提交成功,感谢您的配合。",
|
|
|
showConfirmButton: false
|
|
showConfirmButton: false
|
|
|
});
|
|
});
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ this.$toast(e.error);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
saveWeb() {
|
|
saveWeb() {
|