bugfix
This commit is contained in:
parent
22ccfb1cbf
commit
b61ef3ec54
@ -39,8 +39,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="product-price">
|
||||
<span class="price">¥{{ item.price }}</span>
|
||||
<span class="price-unit">{{ item.unit }} {{ item.short_term }} {{ item.short_term==='1' ? '(可短租)' : '' }} </span>
|
||||
<span class="price">¥{{ item.discount_price }}</span>
|
||||
<span class="price-unit">{{ item.unit }} {{ item.short_term==='1' ? '(可短租)' : '' }} </span>
|
||||
</div>
|
||||
<button class="consult-btn" @click="openTalk">立即咨询</button>
|
||||
</div>
|
||||
@ -52,7 +52,7 @@
|
||||
<img :src="item.img" style="min-width: 278px;min-height: 185px;" :alt="item.name">
|
||||
</div>
|
||||
<div class="product-info">
|
||||
<h3 class="product-name">{{ item.name }}</h3>
|
||||
<h3 class="product-name">{{ item.product_name }}</h3>
|
||||
<div class="product-specs">
|
||||
<div class="spec-item" >
|
||||
<span class="spec-label">企业名称:</span>
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
<div class="form-container">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="120px" class="two-column-form">
|
||||
<!-- 商品图片 - 单独一行 -->
|
||||
<el-form-item v-if="publish_type === '1'" :label="publish_type === '2' ? '需求图片' : '商品图片'" prop="img" class="full-width">
|
||||
<el-form-item v-if="publish_type === '1'" :label="publish_type === '2' ? '需求图片' : '商品图片'" prop="img"
|
||||
class="full-width">
|
||||
<div class="upload-area" @click="!selectedImage && triggerFileInput()">
|
||||
<input ref="fileInput" type="file" accept="image/*" @change="handleFileChange"
|
||||
style="display: none;">
|
||||
@ -25,7 +26,8 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="publish_type === '2' ? '需求名称' : '商品名称'" prop="product_name" required>
|
||||
<el-input v-model="form.product_name" :placeholder="publish_type === '2' ? '请输入需求名称' : '请输入商品名称'"></el-input>
|
||||
<el-input v-model="form.product_name"
|
||||
:placeholder="publish_type === '2' ? '请输入需求名称' : '请输入商品名称'"></el-input>
|
||||
</el-form-item>
|
||||
<!-- 表单项直接排列 -->
|
||||
<div class="form-row">
|
||||
@ -70,32 +72,32 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="form-row" v-if="current_product_category.cart_flag=='1'">
|
||||
<el-form-item label="CPU" prop="cpu" class="form-item-half">
|
||||
<div class="form-row" v-if="current_product_category.cart_flag == '1'">
|
||||
<el-form-item label="CPU" prop="cpu" class="form-item-half">
|
||||
<el-input v-model="form.cpu" placeholder="请输入CPU规格"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="内存" prop="memory" class="form-item-half">
|
||||
<el-form-item label="内存" prop="memory" class="form-item-half">
|
||||
<el-input v-model="form.memory" placeholder="请输入内存规格"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="form-row" v-if="current_product_category.cart_flag=='1'">
|
||||
<el-form-item label="GPU" prop="gpu" class="form-item-half">
|
||||
<div class="form-row" v-if="current_product_category.cart_flag == '1'">
|
||||
<el-form-item label="GPU" prop="gpu" class="form-item-half">
|
||||
<el-input v-model="form.gpu" placeholder="请输入GPU规格"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="系统盘" prop="sys_disk" class="form-item-half">
|
||||
<el-form-item label="系统盘" prop="sys_disk" class="form-item-half">
|
||||
<el-input v-model="form.sys_disk" placeholder="请输入系统盘规格"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="form-row" v-if="current_product_category.cart_flag=='1'">
|
||||
<el-form-item label="数据盘" prop="data_disk" class="form-item-half">
|
||||
<div class="form-row" v-if="current_product_category.cart_flag == '1'">
|
||||
<el-form-item label="数据盘" prop="data_disk" class="form-item-half">
|
||||
<el-input v-model="form.data_disk" placeholder="请输入数据盘规格"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="网卡" prop="net_card" class="form-item-half">
|
||||
<el-form-item label="网卡" prop="net_card" class="form-item-half">
|
||||
<el-input v-model="form.net_card" placeholder="请输入网卡规格"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@ -114,9 +116,25 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<el-form-item label="折扣" class="full-width">
|
||||
<el-input-number :controls="false" v-model="form.discount" :precision="2" :step="0.01" :max="10">
|
||||
</el-input-number>
|
||||
<span style="margin-left: 10px; font-weight: bold;"> 折</span>
|
||||
<!-- <el-input v-model="form.discount" placeholder="请输入折扣" type="number">
|
||||
<template slot="append">折</template>
|
||||
</el-input> -->
|
||||
</el-form-item>1
|
||||
<!-- <el-form-item label="折扣后价格" class="full-width">
|
||||
|
||||
<span>{{ form.price * form.discount }}</span>
|
||||
</el-form-item> -->
|
||||
</div>
|
||||
|
||||
<el-form-item :label="publish_type === '2' ? '需求概述' : '商品概述'" prop="requirement_summary" required class="full-width">
|
||||
<el-input type="textarea" v-model="form.requirement_summary" :rows="6" :placeholder="publish_type === '2' ? '请输入需求概述' : '请输入商品概述'"></el-input>
|
||||
<el-form-item :label="publish_type === '2' ? '需求概述' : '商品概述'" prop="requirement_summary" required
|
||||
class="full-width">
|
||||
<el-input type="textarea" v-model="form.requirement_summary" :rows="6"
|
||||
:placeholder="publish_type === '2' ? '请输入需求概述' : '请输入商品概述'"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="相关参数" prop="related_parameters" class="full-width">
|
||||
@ -130,7 +148,8 @@
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<div class="form-actions">
|
||||
<el-button type="primary" @click="submitForm" size="large">{{ publish_type === '2' ? '发布需求' : '发布商品' }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" size="large">{{ publish_type === '2' ? '发布需求' : '发布商品'
|
||||
}}</el-button>
|
||||
<el-button @click="resetForm" size="large">重置</el-button>
|
||||
<!-- <el-button type="info" @click="getBinaryData" size="large">获取二进制数据</el-button> -->
|
||||
</div>
|
||||
@ -219,6 +238,7 @@ export default {
|
||||
application_scenario: "",//应用场景
|
||||
unit: "",//单位
|
||||
short_term: "",//是否短租
|
||||
discount:null,//折扣
|
||||
},
|
||||
rules: {
|
||||
product_name: [
|
||||
@ -295,7 +315,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init_company_category() {
|
||||
reqCompanyCategorySearch({url_link:window.location.href}).then(res => {
|
||||
reqCompanyCategorySearch({ url_link: window.location.href }).then(res => {
|
||||
if (res.status) {
|
||||
this.company_category_list = []
|
||||
for (let item of res.data) {
|
||||
@ -321,7 +341,7 @@ export default {
|
||||
|
||||
init_product_category() {
|
||||
// 根据 publish_type 参数决定 to_page 的值
|
||||
|
||||
|
||||
reqGetProductCategorySearch({ url_link: window.location.href, to_page: 'publish' }).then(res => {
|
||||
if (res.status) {
|
||||
this.typeList = buildCaTree(res.data)
|
||||
@ -465,7 +485,7 @@ export default {
|
||||
if (valid) {
|
||||
console.log('表单数据:', this.form)
|
||||
console.log('发布类型:', this.publish_type)
|
||||
|
||||
|
||||
let formdata = new FormData();
|
||||
for (let key in this.form) {
|
||||
formdata.append(key, this.form[key]);
|
||||
@ -883,7 +903,7 @@ export default {
|
||||
|
||||
.unit-input {
|
||||
width: 80px;
|
||||
|
||||
|
||||
.el-input__inner {
|
||||
font-size: 12px;
|
||||
padding: 0 8px;
|
||||
|
||||
@ -65,10 +65,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 返回 -->
|
||||
<div class="back-btn" @click="$router.push('/ncmatchHome/index')">
|
||||
<!-- <div class="back-btn" @click="$router.push('/ncmatchHome/index')">
|
||||
<span>
|
||||
返回 </span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user