Commit 12232635 by Tang

feat: 查询中心:样式提取

parent b1203d25
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</el-radio-group> </el-radio-group>
<el-form label-position="left" <el-form label-position="left"
style="margin-top:40px" style="margin-top:40px"
label-width="120px" label-width="100px"
:model="search"> :model="search">
<el-form-item :label="type===CODE?'企业代码':'企业名称'"> <el-form-item :label="type===CODE?'企业代码:':'企业名称:'">
<el-input <el-input
v-model="search.code" v-model="search.code"
:placeholder="type===CODE?'请输入正确的4位企业代码!':'请输入正确的企业名称!'" :placeholder="type===CODE?'请输入正确的4位企业代码!':'请输入正确的企业名称!'"
......
...@@ -222,18 +222,6 @@ export default { ...@@ -222,18 +222,6 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.validate-code {
display: inline-block;
width: 70px;
height: 40px;
margin-left: 11px;
> img {
width: 100%;
height: 100%;
cursor: pointer;
}
}
.product-info { .product-info {
margin-top: -15px; margin-top: -15px;
...@@ -263,13 +251,5 @@ export default { ...@@ -263,13 +251,5 @@ export default {
.right { .right {
} }
} }
.w160 {
width: 160px;
}
.w240 {
width: 240px;
}
} }
</style> </style>
...@@ -39,29 +39,23 @@ ...@@ -39,29 +39,23 @@
</el-form-item> </el-form-item>
<el-form-item label="验证码:"> <el-form-item label="验证码:">
<el-button <div class="y-center">
type="primary" <el-input
class="w240" v-model="captcha"
icon="gs-guard-icon" placeholder="请输入验证码"
@click="handleVerification" class="w160"
v-if="!isVerificationPass" ></el-input>
>
点击此处进行验证 <div class="validate-code">
</el-button> <img :src="captchaPath" @click="getCaptcha()" alt="" />
<el-button </div>
type="success"
class="w240" <el-button
icon="el-icon-circle-check" style="margin-left: 40px"
v-else type="primary"
> @click="handleSearchCompany"
验证通过 >查询</el-button>
</el-button> </div>
<el-button
style="margin-left: 40px"
type="primary"
@click="handleSearchCompany"
>查询
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -145,7 +139,7 @@ ...@@ -145,7 +139,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
<span v-else>没有符合条件的记录!</span> <span style="color: rgb(255, 59, 48)" v-else>{{ errorMsg }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -185,12 +179,14 @@ ...@@ -185,12 +179,14 @@
<script> <script>
import {getUUID} from "@/utils/utils"; import {getUUID} from "@/utils/utils";
import Vcode from "vue-puzzle-vcode"; import Vcode from "vue-puzzle-vcode";
import validation from "@/views/Search/validation";
const CODE = '1'; const CODE = '1';
const NAME = '2'; const NAME = '2';
const ADDRESS = '3'; const ADDRESS = '3';
export default { export default {
mixins:[validation],
data() { data() {
return { return {
CODE, CODE,
...@@ -217,7 +213,21 @@ export default { ...@@ -217,7 +213,21 @@ export default {
components: { components: {
Vcode, Vcode,
}, },
created() {
this.getCaptcha();
},
methods: { methods: {
// 获取验证码
getCaptcha() {
this.uuid = getUUID()
const query = {
uuid: this.uuid
};
this.$api.getCaptcha(query).then((res) => {
console.log(res, "res");
this.captchaPath = window.URL.createObjectURL(res.body);
});
},
// 点击此处进行验证 // 点击此处进行验证
handleVerification() { handleVerification() {
console.log("点击此处进行验证"); console.log("点击此处进行验证");
...@@ -245,24 +255,12 @@ export default { ...@@ -245,24 +255,12 @@ export default {
this.showResult = true; this.showResult = true;
if (this.company === CODE) { if (this.company === CODE) {
this.searchCodeShow = this.companySearch.code; this.searchCodeShow = this.companySearch.code;
// if (this.companySearch.code === "1") {
// this.result = [
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// { id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
// ];
// }
} else if (this.company === NAME) { } else if (this.company === NAME) {
this.searchCodeShow = this.companySearch.name; this.searchCodeShow = this.companySearch.name;
} else { } else {
this.searchCodeShow = this.companySearch.address; this.searchCodeShow = this.companySearch.address;
} }
const params = {type: this.company, uuid: getUUID(), code: this.searchCodeShow, captcha: "7n8df",}; const params = {type: this.company, uuid: this.uuid, code: this.searchCodeShow, captcha: this.captcha,};
const searchGlnRes = await this.$api.search.searchInternal(params); const searchGlnRes = await this.$api.search.searchInternal(params);
const {returnCode, data} = searchGlnRes; const {returnCode, data} = searchGlnRes;
if (returnCode === "0") { if (returnCode === "0") {
...@@ -270,7 +268,7 @@ export default { ...@@ -270,7 +268,7 @@ export default {
} else { } else {
this.errorMsg = this.errorMsg =
searchGlnRes.returnMsg || searchGlnRes.returnMsg ||
"您输入的商品条码格式不正确,请确认后重试。"; "没有符合条件的记录!";
this.result = null; this.result = null;
} }
}, },
...@@ -285,10 +283,6 @@ export default { ...@@ -285,10 +283,6 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.w240 {
width: 240px;
}
.gs-guard-icon { .gs-guard-icon {
display: inline-block; display: inline-block;
margin-bottom: -1px; margin-bottom: -1px;
......
...@@ -150,28 +150,3 @@ export default { ...@@ -150,28 +150,3 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss">
.search-content {
.validate-code {
display: inline-block;
width: 70px;
height: 40px;
margin-left: 11px;
overflow: hidden;
> img {
width: 100%;
height: 100%;
}
}
.w160 {
width: 160px;
}
.w240 {
width: 240px;
}
}
</style>
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
.body { .body {
padding: 20px 30px; padding: 20px 30px;
.error-msg{
color: #FF3B30;
}
} }
.notice { .notice {
...@@ -100,6 +104,27 @@ ...@@ -100,6 +104,27 @@
} }
} }
} }
.validate-code {
display: inline-block;
width: 70px;
height: 40px;
margin-left: 11px;
overflow: hidden;
> img {
width: 100%;
height: 100%;
}
}
.w160 {
width: 160px;
}
.w240 {
width: 240px;
}
} }
.el-tabs__item.is-active { .el-tabs__item.is-active {
...@@ -118,10 +143,11 @@ ...@@ -118,10 +143,11 @@
} }
.hover{ .hover{
cursor: pointer;
color: #008dbd; color: #008dbd;
&:hover{ &:hover{
color: #008dbd; color: #006587;
} }
} }
} }
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