123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <template>
- <div class="club-device page">
- <div class="page-top flex flex-col justify-center items-center">
- <img class="logo" :src="supplierInfo.logo" />
- <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
- </div>
- <div class="page-content">
- <div class="page-title">设备认证</div>
- <el-form :model="formData" :rules="rules">
- <el-form-item label="设备名称:">
- <el-select
- v-model="formData.deviceName"
- filterable
- allow-create
- placeholder="请输入新设备名称或选择已有设备"
- >
- <el-option label="中国" :value="1"> </el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="mobile" label="设备图片:">
- <br />
- <el-input v-show="false"></el-input>
- <SimpleUploadImage :limit="1" />
- </el-form-item>
- <el-form-item label="所属品牌:">
- <el-select v-model="formData.deviceName" placeholder="请选择品牌">
- <el-option label="中国" :value="1"> </el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="mobile" label="购买渠道:">
- <el-input placeholder="请输入购买渠道"></el-input>
- </el-form-item>
- <el-form-item prop="mobile" label="发票:">
- <br />
- <el-input v-show="false"></el-input>
- <SimpleUploadImage :limit="1" />
- </el-form-item>
- <el-form-item prop="mobile" label="设备SN码:">
- <el-input placeholder="请输入设备SN码"></el-input>
- </el-form-item>
- <el-form-item prop="mobile" label="设备参数:">
- <br />
- <div class="device-param-list">
- <span class="add-param">添加参数</span>
- <template v-for="i in 3">
- <div :key="i">
- <div class="param flex justify-between mb-4">
- <el-input placeholder="例如:品牌" class="mr-2"></el-input>
- <el-input placeholder="请输入参数信息"></el-input>
- <span class="remove el-icon-close"></span>
- </div>
- </div>
- </template>
- </div>
- </el-form-item>
- </el-form>
- <div class="control flex flex-col items-center">
- <div class="button submit flex justify-center items-center">提交</div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import SimpleUploadImage from '@/components/SimpleUploadImage'
- import { mapGetters } from 'vuex'
- export default {
- layout: 'app',
- components: {
- SimpleUploadImage,
- },
- data() {
- return {
- formData: {
- deviceName: '',
- },
- rules: {},
- }
- },
- computed: {
- ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix']),
- },
- mounted() {
- this.initData()
- },
- methods: {
- initData() {
- this.productId = this.$route.query.id
- console.log('productId',this.productId)
- this.getProductDetails()
- },
- // 获取认证机构信息
- async getProductDetails() {
- try {
- const res = await this.$http.api.getProductDetails({
- productId: this.productId,
- })
- this.productInfo = res.data
- console.log('res',this.productInfo)
- } catch (error) {}
- },
- auditStatusColor(value) {// 认证状态:0 danger,1 success,2 warning
- const map = {
- 0: 'danger',
- 1: 'success',
- 2: 'warning',
- }
- return map[value]
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @media screen and (min-width: 768px) {
- .page {
- background: #fff;
- }
- .page-top {
- height: 360px;
- @include themify($themes) {
- background: themed('banner-club-register');
- background-size: auto 360px;
- }
- .logo {
- display: block;
- width: 120px;
- height: 120px;
- border-radius: 50%;
- background: #fff;
- }
- .name {
- font-size: 30px;
- color: #fff;
- }
- }
- .page-content {
- width: 700px;
- margin: 0 auto;
- overflow: hidden;
- min-height: calc(100vh - 80px - 80px - 360px);
- box-sizing: border-box;
- padding-bottom: 40px;
- .page-title {
- font-size: 24px;
- font-weight: bold;
- text-align: center;
- padding: 40px 0;
- }
- .el-select {
- width: 100%;
- }
- .control {
- margin-top: 62px;
- .button {
- width: 295px;
- height: 50px;
- cursor: pointer;
- &.submit {
- @include themify($themes) {
- background-color: themed('color');
- color: #fff;
- }
- }
- }
- }
- .device-param-list {
- position: relative;
- .add-param {
- position: absolute;
- cursor: pointer;
- top: -40px;
- right: 0;
- text-decoration: underline;
- font-size: 14px;
- @include themify($themes) {
- color: themed('color');
- }
- }
- .param {
- position: relative;
- .remove {
- position: absolute;
- right: 0;
- top: 0;
- width: 20px;
- height: 20px;
- background: #f94b4b;
- border-radius: 2px;
- cursor: pointer;
- color: #fff;
- font-size: 14px;
- text-align: center;
- line-height: 20px;
- }
- }
- }
- }
- }
- @media screen and (max-width: 768px) {
- .page {
- background: #fff;
- }
- .page-top {
- height: 46vw;
- @include themify($themes) {
- background: themed('banner-home-h5');
- background-size: auto 46vw;
- }
- .logo {
- display: block;
- width: 14.8vw;
- height: 14.8vw;
- border-radius: 50%;
- background: #fff;
- }
- .name {
- font-size: 4vw;
- color: #fff;
- }
- }
- .page-content {
- box-sizing: border-box;
- padding: 8vw 7vw;
- .page-title {
- font-size: 4.2vw;
- font-weight: bold;
- text-align: center;
- color: #282828;
- margin-bottom: 4.6vw;
- }
- .el-select {
- width: 100%;
- }
- .control {
- .button {
- width: 100%;
- height: 12vw;
- cursor: pointer;
- &.submit {
- @include themify($themes) {
- background-color: themed('color');
- color: #fff;
- }
- }
- }
- }
- .device-param-list {
- position: relative;
- .add-param {
- position: absolute;
- cursor: pointer;
- top: -40px;
- right: 0;
- font-size: 3.4vw;
- @include themify($themes) {
- color: themed('color');
- }
- }
- .param {
- position: relative;
- .remove {
- position: absolute;
- right: 0;
- top: 0;
- width: 4.4vw;
- height: 4.4vw;
- background: #f94b4b;
- border-radius: 0.2vw;
- cursor: pointer;
- color: #fff;
- font-size: 3.4vw;
- text-align: center;
- line-height: 4.4vw;
- }
- }
- }
- }
- }
- </style>
|