|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="goods">
|
|
|
- <template v-if="view === 'list'">
|
|
|
+ <span v-show="view === 'list'">
|
|
|
<search-1
|
|
|
:form="searchInfo"
|
|
|
@onSubmit="search"
|
|
@@ -25,69 +25,67 @@
|
|
|
@spec="toSpec"
|
|
|
@copy="toCopy"
|
|
|
></data-table>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" style="margin: 0 0 10px 0">
|
|
|
- <el-col :span="2"><el-button type="primary" size="mini" @click="toBack()">返回</el-button></el-col>
|
|
|
- <el-col :span="2"><el-button type="primary" size="mini" @click="toSave(form)">保存</el-button></el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <data-form :fields="infoFields" :rules="rules" v-model="form" labelWidth="150px" @save="toSave">
|
|
|
- <template #tags="{ item }">
|
|
|
- <el-cascader v-model="form[item.model]" :options="tagsList" :props="props" clearable filterable :show-all-levels="false"></el-cascader>
|
|
|
- </template>
|
|
|
- <template #act_tags>
|
|
|
- <el-option v-for="i in act_tagsList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
- </template>
|
|
|
- <template #status>
|
|
|
- <el-option v-for="i in goodsStatusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
- </template>
|
|
|
- <template #is_cashBack>
|
|
|
- <el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
- </template>
|
|
|
- <template #cb_config>
|
|
|
- <el-form :model="cb_config" ref="cb_config" label-width="180px" @save="toSave" v-if="form.is_cashBack == '0'">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="返现金额类型" prop="back_type">
|
|
|
- <el-select v-model="cb_config.back_type" clearable filterable placeholder="请选择返现金额类型" size="small" style="width: 100%">
|
|
|
- <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" v-if="cb_config.back_type == 'fixed'">
|
|
|
- <el-form-item label="具体返现金额设置" prop="money">
|
|
|
- <el-input v-model="cb_config.money" placeholder="请输入金额" type="number" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" v-if="cb_config.back_type == 'percent'">
|
|
|
- <el-form-item label="具体返现金额设置" prop="money">
|
|
|
- <el-input v-model="cb_config.money" placeholder="请输入百分比" type="number" size="small"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-form>
|
|
|
- </template>
|
|
|
- <template #brief>
|
|
|
- <editor v-model="form.brief" url="/files/point/goods/upload" />
|
|
|
- </template>
|
|
|
- <template #shop>
|
|
|
- <el-select
|
|
|
- v-model="form.shop"
|
|
|
- filterable
|
|
|
- remote
|
|
|
- reserve-keyword
|
|
|
- placeholder="请输入商铺名称"
|
|
|
- :remote-method="searchShop"
|
|
|
- :loading="loading"
|
|
|
- @change="selectShop"
|
|
|
- >
|
|
|
- <el-option v-for="item in shopList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </data-form>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
+ </span>
|
|
|
+ <el-row v-if="view === 'info'">
|
|
|
+ <el-col :span="24" style="margin: 0 0 10px 0">
|
|
|
+ <el-col :span="2"><el-button type="primary" size="mini" @click="toBack()">返回</el-button></el-col>
|
|
|
+ <el-col :span="2"><el-button type="primary" size="mini" @click="toSave(form)">保存</el-button></el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <data-form :fields="infoFields" :rules="rules" v-model="form" labelWidth="150px" @save="toSave">
|
|
|
+ <template #tags="{ item }">
|
|
|
+ <el-cascader v-model="form[item.model]" :options="tagsList" :props="props" clearable filterable :show-all-levels="false"></el-cascader>
|
|
|
+ </template>
|
|
|
+ <template #act_tags>
|
|
|
+ <el-option v-for="i in act_tagsList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
+ </template>
|
|
|
+ <template #status>
|
|
|
+ <el-option v-for="i in goodsStatusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
+ </template>
|
|
|
+ <template #is_cashBack>
|
|
|
+ <el-option v-for="i in statusList" :key="i.value" :label="i.label" :value="i.value"></el-option>
|
|
|
+ </template>
|
|
|
+ <template #cb_config>
|
|
|
+ <el-form :model="cb_config" ref="cb_config" label-width="180px" @save="toSave" v-if="form.is_cashBack == '0'">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="返现金额类型" prop="back_type">
|
|
|
+ <el-select v-model="cb_config.back_type" clearable filterable placeholder="请选择返现金额类型" size="small" style="width: 100%">
|
|
|
+ <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" v-if="cb_config.back_type == 'fixed'">
|
|
|
+ <el-form-item label="具体返现金额设置" prop="money">
|
|
|
+ <el-input v-model="cb_config.money" placeholder="请输入金额" type="number" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" v-if="cb_config.back_type == 'percent'">
|
|
|
+ <el-form-item label="具体返现金额设置" prop="money">
|
|
|
+ <el-input v-model="cb_config.money" placeholder="请输入百分比" type="number" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ <template #brief>
|
|
|
+ <editor v-model="form.brief" url="/files/point/goods/upload" />
|
|
|
+ </template>
|
|
|
+ <template #shop>
|
|
|
+ <el-select
|
|
|
+ v-model="form.shop"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ placeholder="请输入商铺名称"
|
|
|
+ :remote-method="searchShop"
|
|
|
+ :loading="loading"
|
|
|
+ @change="selectShop"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in shopList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </data-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|