|
@@ -5,157 +5,296 @@
|
|
|
v-loading="loading"
|
|
|
:model="ruleForm"
|
|
|
status-icon
|
|
|
- size="small"
|
|
|
+ size="mini"
|
|
|
:rules="rulesThis"
|
|
|
label-width="95px"
|
|
|
class="supplierAdd"
|
|
|
>
|
|
|
<el-row>
|
|
|
- <el-col :span="10">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="最近装修" prop="renovation_date">
|
|
|
- <el-date-picker
|
|
|
- style="width: 100%"
|
|
|
- size="medium"
|
|
|
- type="month"
|
|
|
- value-format="yyyy-MM"
|
|
|
- placeholder="最近装修时间"
|
|
|
- v-model="ruleForm.renovation_date"
|
|
|
- /> </el-form-item
|
|
|
- ></el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="停车位数" prop="park_num">
|
|
|
- <el-input-number
|
|
|
- style="width: 100%"
|
|
|
- size="small"
|
|
|
- type="number"
|
|
|
- :max="9999999"
|
|
|
- :min="0"
|
|
|
- step-strictly
|
|
|
- :step="0"
|
|
|
- controls-position="right"
|
|
|
- placeholder="停车位数"
|
|
|
- v-model="ruleForm.park_num" /></el-form-item
|
|
|
- ></el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-form-item label="场地特色" prop="store_spec_ids">
|
|
|
- <el-tag
|
|
|
- v-for="(tag, index) in ruleForm.store_spec_ids"
|
|
|
- :key="tag.name"
|
|
|
- closable
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="最近装修" prop="renovation_date">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
size="mini"
|
|
|
- type="success"
|
|
|
- :style="{ marginLeft: index !== 0 ? '5px' : '0px' }"
|
|
|
- >
|
|
|
- {{ tag.name }}
|
|
|
- </el-tag>
|
|
|
-
|
|
|
- <el-button
|
|
|
+ type="month"
|
|
|
+ value-format="yyyy-MM"
|
|
|
+ placeholder="最近装修时间"
|
|
|
+ v-model="ruleForm.renovation_date"
|
|
|
+ /> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="停车位数" prop="park_num">
|
|
|
+ <el-input-number
|
|
|
+ style="width: 100%"
|
|
|
size="mini"
|
|
|
- class="fr"
|
|
|
- type="text"
|
|
|
- style="margin: 0 -30px 0 0"
|
|
|
- @click="openModal('store_spec_ids', '场地特色', true)"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
+ :max="9999999"
|
|
|
+ :min="0"
|
|
|
+ step-strictly
|
|
|
+ :step="1"
|
|
|
+ controls-position="right"
|
|
|
+ placeholder="停车位数"
|
|
|
+ v-model="ruleForm.park_num"
|
|
|
+ /></el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col span="7" class="tr">
|
|
|
+ <el-button type="primary" @click="submitForm" :size="'mini'">保 存 </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="场地特色" prop="store_spec_ids" size="mini">
|
|
|
+ <div class="clear-main">
|
|
|
+ <div class="clear-left">
|
|
|
+ <el-checkbox
|
|
|
+ :indeterminate="isIndeterminate.store_spec_ids"
|
|
|
+ v-model="checkAll.store_spec_ids"
|
|
|
+ style="margin: 0"
|
|
|
+ size="mini"
|
|
|
+ @change="
|
|
|
+ handleCheckAllChange($event, 'store_spec_ids', store_spec_ids_options)
|
|
|
+ "
|
|
|
+ >全选</el-checkbox
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="clear-right">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="ruleForm.store_spec_ids"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckedCitiesChange(
|
|
|
+ $event,
|
|
|
+ 'store_spec_ids',
|
|
|
+ store_spec_ids_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-for="(item, index) in store_spec_ids_options"
|
|
|
+ :key="item + index"
|
|
|
+ >
|
|
|
+ <el-checkbox style="margin: 0" size="mini" :label="item.id + ''">{{
|
|
|
+ item.name
|
|
|
+ }}</el-checkbox>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="酒店设施" prop="hotel_spec_ids">
|
|
|
- <template v-if="ruleForm && ruleForm.hotel_spec_ids.length > 0">
|
|
|
- <el-tag
|
|
|
- v-for="(tag, index) in ruleForm.hotel_spec_ids"
|
|
|
- :key="tag"
|
|
|
- closable
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- :style="{ marginLeft: index !== 0 ? '5px' : '0px' }"
|
|
|
- >
|
|
|
- {{ tag }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- <span v-else>请选择酒店设施</span>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- class="fr"
|
|
|
- type="text"
|
|
|
- style="margin: 0 -30px 0 0"
|
|
|
- @click="openModal('hotel_spec_ids', '酒店设施')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
+ <el-form-item label="酒店设施" prop="hotel_spec_ids" size="mini">
|
|
|
+ <div class="clear-main">
|
|
|
+ <div class="clear-left">
|
|
|
+ <el-checkbox
|
|
|
+ :indeterminate="isIndeterminate.hotel_spec_ids"
|
|
|
+ v-model="checkAll.hotel_spec_ids"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckAllChange($event, 'hotel_spec_ids', hotel_spec_ids_options)
|
|
|
+ "
|
|
|
+ >全选</el-checkbox
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="clear-right">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="ruleForm.hotel_spec_ids"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckedCitiesChange(
|
|
|
+ $event,
|
|
|
+ 'hotel_spec_ids',
|
|
|
+ hotel_spec_ids_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3"></el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-for="(item, index) in hotel_spec_ids_options"
|
|
|
+ :key="item + index"
|
|
|
+ >
|
|
|
+ <el-checkbox style="margin: 0" size="mini" :label="item + ''">{{
|
|
|
+ item
|
|
|
+ }}</el-checkbox>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="openModal('hotel_spec_ids', '酒店设施', hotel_spec_ids_options)"
|
|
|
+ >添加</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="会议设施" prop="caterer_spec_ids2">
|
|
|
- <template v-if="ruleForm && ruleForm.caterer_spec_ids2.length > 0">
|
|
|
- <el-tag
|
|
|
- v-for="(tag, index) in ruleForm.caterer_spec_ids2"
|
|
|
- :key="tag"
|
|
|
- closable
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- :style="{ marginLeft: index !== 0 ? '5px' : '0px' }"
|
|
|
- >
|
|
|
- {{ tag }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- <span v-else>请选择会议设施</span>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- class="fr"
|
|
|
- type="text"
|
|
|
- style="margin: 0 -30px 0 0"
|
|
|
- @click="openModal('caterer_spec_ids2', '会议设施')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
+ <el-form-item label="会议设施" prop="caterer_spec_ids2" size="mini">
|
|
|
+ <div class="clear-main">
|
|
|
+ <div class="clear-left">
|
|
|
+ <el-checkbox
|
|
|
+ :indeterminate="isIndeterminate.caterer_spec_ids2"
|
|
|
+ v-model="checkAll.caterer_spec_ids2"
|
|
|
+ style="margin: 0"
|
|
|
+ size="mini"
|
|
|
+ @change="
|
|
|
+ handleCheckAllChange(
|
|
|
+ $event,
|
|
|
+ 'caterer_spec_ids2',
|
|
|
+ caterer_spec_ids2_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >全选</el-checkbox
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="clear-right">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="ruleForm.caterer_spec_ids2"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckedCitiesChange(
|
|
|
+ $event,
|
|
|
+ 'caterer_spec_ids2',
|
|
|
+ caterer_spec_ids2_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-for="(item, index) in caterer_spec_ids2_options"
|
|
|
+ :key="item + index"
|
|
|
+ >
|
|
|
+ <el-checkbox style="margin: 0" size="mini" :label="item + ''">{{
|
|
|
+ item
|
|
|
+ }}</el-checkbox>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="openModal('caterer_spec_ids2', '会议设施', caterer_spec_ids2_options)"
|
|
|
+ >添加</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="客房设施" prop="room_spec_ids">
|
|
|
- <template v-if="ruleForm && ruleForm.room_spec_ids.length > 0">
|
|
|
- <el-tag
|
|
|
- v-for="(tag, index) in ruleForm.room_spec_ids"
|
|
|
- :key="tag"
|
|
|
- closable
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- :style="{ marginLeft: index !== 0 ? '5px' : '0px' }"
|
|
|
- >
|
|
|
- {{ tag }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- <span v-else>请选择客房设施</span>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- class="fr"
|
|
|
- type="text"
|
|
|
- style="margin: 0 -30px 0 0"
|
|
|
- @click="openModal('room_spec_ids', '客房设施')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
+ <el-form-item label="客房设施" prop="room_spec_ids" size="mini">
|
|
|
+ <div class="clear-main">
|
|
|
+ <div class="clear-left">
|
|
|
+ <el-checkbox
|
|
|
+ :indeterminate="isIndeterminate.room_spec_ids"
|
|
|
+ v-model="checkAll.room_spec_ids"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckAllChange($event, 'room_spec_ids', room_spec_ids_options)
|
|
|
+ "
|
|
|
+ >全选</el-checkbox
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="clear-right">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="ruleForm.room_spec_ids"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckedCitiesChange(
|
|
|
+ $event,
|
|
|
+ 'room_spec_ids',
|
|
|
+ room_spec_ids_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-for="(item, index) in room_spec_ids_options"
|
|
|
+ :key="item + index"
|
|
|
+ >
|
|
|
+ <el-checkbox style="margin: 0" size="mini" :label="item + ''">{{
|
|
|
+ item
|
|
|
+ }}</el-checkbox>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="openModal('room_spec_ids', '客房设施', room_spec_ids_options)"
|
|
|
+ >添加</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="餐饮设施" prop="caterer_spec_ids">
|
|
|
- <template v-if="ruleForm && ruleForm.caterer_spec_ids2.length > 0">
|
|
|
- <el-tag
|
|
|
- v-for="(tag, index) in ruleForm.caterer_spec_ids"
|
|
|
- :key="tag"
|
|
|
- closable
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- :style="{ marginLeft: index !== 0 ? '5px' : '0px' }"
|
|
|
- >
|
|
|
- {{ tag }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- <span v-else>请选择餐饮设施</span>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- class="fr"
|
|
|
- type="text"
|
|
|
- style="margin: 0 -30px 0 0"
|
|
|
- @click="openModal('caterer_spec_ids', '餐饮设施')"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
+ <el-form-item label="餐饮设施" prop="caterer_spec_ids" size="mini">
|
|
|
+ <div class="clear-main">
|
|
|
+ <div class="clear-left">
|
|
|
+ <el-checkbox
|
|
|
+ :indeterminate="isIndeterminate.caterer_spec_ids"
|
|
|
+ v-model="checkAll.caterer_spec_ids"
|
|
|
+ style="margin: 0"
|
|
|
+ size="mini"
|
|
|
+ @change="
|
|
|
+ handleCheckAllChange(
|
|
|
+ $event,
|
|
|
+ 'caterer_spec_ids',
|
|
|
+ caterer_spec_ids_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >全选</el-checkbox
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="clear-right">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="ruleForm.caterer_spec_ids"
|
|
|
+ size="mini"
|
|
|
+ style="margin: 0"
|
|
|
+ @change="
|
|
|
+ handleCheckedCitiesChange(
|
|
|
+ $event,
|
|
|
+ 'caterer_spec_ids',
|
|
|
+ caterer_spec_ids_options
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ v-for="(item, index) in caterer_spec_ids_options"
|
|
|
+ :key="item + index"
|
|
|
+ >
|
|
|
+ <el-checkbox style="margin: 0" size="mini" :label="item + ''">{{
|
|
|
+ item
|
|
|
+ }}</el-checkbox>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="openModal('caterer_spec_ids', '餐饮设施', caterer_spec_ids_options)"
|
|
|
+ >添加</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="14">
|
|
|
+
|
|
|
+ <el-col :span="24">
|
|
|
<el-form-item label="店铺简介" prop="store_desc">
|
|
|
<el-input
|
|
|
type="textarea"
|
|
@@ -163,13 +302,10 @@
|
|
|
size="mini"
|
|
|
:autosize="{ minRows: 12, maxRows: 12 }"
|
|
|
v-model="ruleForm.store_desc"
|
|
|
+ show-word-limit
|
|
|
+ maxlength="5000"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <div class="tr">
|
|
|
- <el-button type="primary" @click="submitForm" :size="'mini'"
|
|
|
- >保 存
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
@@ -178,7 +314,6 @@
|
|
|
:option="keyOptions"
|
|
|
:show-model="showModel"
|
|
|
:title="modalTitle"
|
|
|
- :isApi="isApi"
|
|
|
@refresh="refresh"
|
|
|
@cancel="showModel = false"
|
|
|
/>
|
|
@@ -186,9 +321,10 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import asyncRequest from "@/apis/service/operate/shopTrim";
|
|
|
+import asyncRequestStyle from "@/apis/service/serviceParam/storeStyle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import DynamicTags from "@/components/dynamic-tags";
|
|
|
-import { formItem, rules } from "./columns";
|
|
|
+import { formItem, rules, config, checkAll, isIndeterminate } from "./columns";
|
|
|
import addEdit from "./addEdit";
|
|
|
export default {
|
|
|
name: "SupplierAdd",
|
|
@@ -197,20 +333,32 @@ export default {
|
|
|
DynamicTags,
|
|
|
addEdit,
|
|
|
},
|
|
|
- props: ["sitem","store_id"],
|
|
|
+ props: ["sitem", "store_id"],
|
|
|
+ watch: {
|
|
|
+ store_id: function (val) {
|
|
|
+ this.initForm();
|
|
|
+ },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ checkAll: { ...checkAll },
|
|
|
+ isIndeterminate: {
|
|
|
+ ...isIndeterminate,
|
|
|
+ },
|
|
|
+ store_spec_ids_options: [],
|
|
|
+ caterer_spec_ids_options: config["caterer_spec_ids"],
|
|
|
+ hotel_spec_ids_options: config["hotel_spec_ids"],
|
|
|
+ room_spec_ids_options: config["room_spec_ids"],
|
|
|
+ caterer_spec_ids2_options: config["caterer_spec_ids2"],
|
|
|
loading: false,
|
|
|
showModel: false,
|
|
|
hand_name: "",
|
|
|
rules,
|
|
|
modalKey: "",
|
|
|
- isApi: false,
|
|
|
modalTitle: "",
|
|
|
keyOptions: [],
|
|
|
ruleForm: { ...formItem },
|
|
|
rulesThis: {},
|
|
|
- tags: [],
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -218,14 +366,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async initForm() {
|
|
|
- this.ruleForm = {
|
|
|
- ...formItem,
|
|
|
- };
|
|
|
this.hand_name = "";
|
|
|
this.loading = true;
|
|
|
+ this.store_spec_ids_options = [];
|
|
|
+
|
|
|
await this.resetFormData();
|
|
|
+ await this.searchTypeList();
|
|
|
this.rulesThis = this.rules;
|
|
|
- console.log(this.ruleForm);
|
|
|
this.loading = false;
|
|
|
},
|
|
|
|
|
@@ -237,7 +384,7 @@ export default {
|
|
|
this.$refs.ruleForm.clearValidate();
|
|
|
if (this.sitem && this.sitem.id) {
|
|
|
const {
|
|
|
- id,
|
|
|
+ // id,
|
|
|
renovation_date,
|
|
|
park_num,
|
|
|
store_spec_ids,
|
|
@@ -247,12 +394,11 @@ export default {
|
|
|
caterer_spec_ids2,
|
|
|
store_desc,
|
|
|
} = this.sitem || {};
|
|
|
-
|
|
|
this.hand_name = person || "";
|
|
|
this.ruleForm = {
|
|
|
- id: id || "",
|
|
|
+ // id: id || "",
|
|
|
renovation_date: renovation_date || "",
|
|
|
- park_num: park_num || 0,
|
|
|
+ park_num: park_num || "0",
|
|
|
store_spec_ids: store_spec_ids || [],
|
|
|
caterer_spec_ids: caterer_spec_ids || [],
|
|
|
hotel_spec_ids: hotel_spec_ids || [],
|
|
@@ -264,20 +410,38 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- openModal(key, title, isApi) {
|
|
|
+ openModal(key, title, option) {
|
|
|
console.log(key);
|
|
|
- this.isApi = isApi || false;
|
|
|
this.modalKey = key;
|
|
|
this.modalTitle = title;
|
|
|
- this.keyOptions = this.ruleForm[key];
|
|
|
+ this.keyOptions = option;
|
|
|
this.showModel = true;
|
|
|
},
|
|
|
refresh(e) {
|
|
|
- const { valKey, value } = e;
|
|
|
- console.log(e);
|
|
|
- this.ruleForm[valKey] = value;
|
|
|
+ const { valKey, name } = e;
|
|
|
+ this[valKey + "_options"].push(name);
|
|
|
+ this.ruleForm[valKey].push(name);
|
|
|
this.$refs.ruleForm.validateField(valKey);
|
|
|
},
|
|
|
+ handleCheckAllChange(val, key, arr) {
|
|
|
+ console.log(val);
|
|
|
+ let list = [];
|
|
|
+ if (key === "store_spec_ids") {
|
|
|
+ arr.forEach((item) => {
|
|
|
+ list.push(item.id + "");
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ list = arr;
|
|
|
+ }
|
|
|
+ this.ruleForm[key] = val ? list : [];
|
|
|
+ console.log(this.ruleForm[key]);
|
|
|
+ this.isIndeterminate[key] = false;
|
|
|
+ },
|
|
|
+ handleCheckedCitiesChange(value, key, list) {
|
|
|
+ let checkedCount = value.length;
|
|
|
+ this.checkAll[key] = checkedCount === list.length;
|
|
|
+ this.isIndeterminate[key] = checkedCount > 0 && checkedCount < list.length;
|
|
|
+ },
|
|
|
async submitForm() {
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
@@ -286,8 +450,8 @@ export default {
|
|
|
}
|
|
|
this.loading = true;
|
|
|
let model = JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
- model.store_id = 3;
|
|
|
- model.id = 3;
|
|
|
+ model.store_id = this.store_id;
|
|
|
+ // model.id = this.store_id;
|
|
|
model.park_num = 0;
|
|
|
console.log(model);
|
|
|
|
|
@@ -309,12 +473,30 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 刷新表格
|
|
|
+ async searchTypeList() {
|
|
|
+ const { code, data } = await asyncRequestStyle.list({
|
|
|
+ limit: 999999,
|
|
|
+ page: 1,
|
|
|
+ });
|
|
|
+ this.store_spec_ids_options = code === 1 ? data.list : [];
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.baseData {
|
|
|
- padding: 26px 16px 0 0;
|
|
|
+ .clear-main {
|
|
|
+ .clear-left {
|
|
|
+ float: left;
|
|
|
+ width: 70px;
|
|
|
+ }
|
|
|
+ .clear-right {
|
|
|
+ float: left;
|
|
|
+ width: calc(100% - 70px);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // padding: 26px 16px 0 0;
|
|
|
}
|
|
|
</style>
|