|
@@ -3,7 +3,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main">
|
|
|
<div class="w_1200">
|
|
|
- <el-col :span="24" class="top">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
<el-col :span="3">
|
|
|
<el-image :src="img_path" style="width:105px;height:105px;"></el-image>
|
|
|
</el-col>
|
|
@@ -14,15 +14,33 @@
|
|
|
<p>3、信息完整度越高,将在我们的平台搜索结果排序靠前、获得推荐机会,以及享受增值服务试用机会!</p>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="down">
|
|
|
- <el-tabs v-model="active" type="card">
|
|
|
- <el-tab-pane label="技术成果" name="first">
|
|
|
- <applyAchieve :dock_id="dock_id" @toRest="toRest"></applyAchieve>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="科技需求" name="second" disabled>
|
|
|
- <applyTechol></applyTechol>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <el-col :span="24" class="two">
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" label-width="100px">
|
|
|
+ <el-form-item label="用户名称" prop="name">
|
|
|
+ <el-input v-model="form.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话" prop="phone">
|
|
|
+ <el-input v-model="form.phone"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="申请时间" prop="create_time">
|
|
|
+ <el-date-picker v-model="form.create_time" placeholder="请选择" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"> </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="参展项目" prop="productList">
|
|
|
+ <el-select v-model="form.productList" value-key="id" clearable filterable multiple collapse-tags placeholder="请选择选择产品">
|
|
|
+ <el-option v-for="(item, index) in goodsList" :key="index" :label="`${item.name}(${getType(item.type)})`" :value="item"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-select v-model="form.productList" value-key="id" clearable filterable multiple collapse-tags placeholder="请选择选择产品">
|
|
|
+ <el-option v-for="(item, index) in goodsList" :key="index" :label="item.name" :value="item">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.type }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select> -->
|
|
|
+ </el-form-item>
|
|
|
+ <el-col :span="24" class="btn">
|
|
|
+ <el-button type="danger" size="mini" @click="resetBtn">取消申请</el-button>
|
|
|
+ <el-button type="success" size="mini" @click="onSubmit('form')">提交申请</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -31,29 +49,67 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import applyAchieve from './apply/applyAchieve.vue';
|
|
|
-import applyTechol from './apply/applyTechol.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: product } = createNamespacedHelpers('product');
|
|
|
+const { mapActions: dockUser } = createNamespacedHelpers('dockUser');
|
|
|
+
|
|
|
export default {
|
|
|
- metaInfo() {
|
|
|
- return { title: this.$route.meta.title };
|
|
|
- },
|
|
|
name: 'apply',
|
|
|
props: {},
|
|
|
- components: {
|
|
|
- applyAchieve,
|
|
|
- applyTechol,
|
|
|
- },
|
|
|
+ components: {},
|
|
|
data: function() {
|
|
|
return {
|
|
|
img_path: require('@common/src/assets/product.png'),
|
|
|
- active: 'first',
|
|
|
+ form: {},
|
|
|
+ rules: {
|
|
|
+ productList: [],
|
|
|
+ },
|
|
|
+ // 企业成果
|
|
|
+ goodsList: [],
|
|
|
};
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ if (this.user) this.search();
|
|
|
+ },
|
|
|
methods: {
|
|
|
- // 取消
|
|
|
- toRest() {
|
|
|
+ ...product(['query']),
|
|
|
+ ...dockUser(['create']),
|
|
|
+ async search() {
|
|
|
+ let data = { name: this.user.name, phone: this.user.phone, user_id: this.user.id, dock_id: this.dock_id };
|
|
|
+ this.$set(this, `form`, data);
|
|
|
+ let res = await this.query({ user_id: this.user.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `goodsList`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交申请
|
|
|
+ onSubmit(formName) {
|
|
|
+ this.$refs[formName].validate(async valid => {
|
|
|
+ if (valid) {
|
|
|
+ let data = this.form;
|
|
|
+ let res = await this.create(data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$message({
|
|
|
+ message: '申请参展成功!',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 整理类型
|
|
|
+ getType(type) {
|
|
|
+ if (type == '0') return '科技需求';
|
|
|
+ else if (type == '1') return '技术成果';
|
|
|
+ else if (type == '2') return '商务服务';
|
|
|
+ },
|
|
|
+ // 取消申请
|
|
|
+ resetBtn() {
|
|
|
this.$router.push({ path: '/live/index' });
|
|
|
},
|
|
|
},
|
|
@@ -63,7 +119,16 @@ export default {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
|
},
|
|
|
- watch: {},
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -71,7 +136,7 @@ export default {
|
|
|
.main {
|
|
|
min-height: 557px;
|
|
|
padding: 15px 0;
|
|
|
- .top {
|
|
|
+ .one {
|
|
|
background: #f3faff;
|
|
|
padding: 15px;
|
|
|
border: 1px solid #ccc;
|
|
@@ -80,5 +145,16 @@ export default {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
+ .two {
|
|
|
+ .el-date-editor {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .el-select {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|