feat:非食堂用户不能看到所有食堂
This commit is contained in:
1 parent
bee9fefa1d
commit
d7ef218251
2 files changed
+25
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" width="50%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="120px" v-loading="loading">
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="140px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商户名:" prop="name">
|
||||
@@ -71,6 +71,19 @@
|
||||
<el-input-number v-model="form.sort" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.types == '1'" :span="24" class="mb20">
|
||||
<el-form-item prop="sort">
|
||||
<template #label>
|
||||
<span>是否对外开放:</span>
|
||||
<tip content="食堂是否对外开放(对外开放非食堂人员可以在手机端看到食堂信息)" />
|
||||
</template>
|
||||
<el-radio-group v-model="form.canteenIsOpen">
|
||||
<el-radio v-for="v in yes_no_type" :key="v.value" :label="v.value" border>
|
||||
{{ v.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.types == '2' && form.supType == '20'" :span="24" class="mb20">
|
||||
<el-form-item label="优惠价格:" prop="discountsPrice">
|
||||
<el-input v-model="form.discountsPrice" />
|
||||
@@ -154,6 +167,7 @@ const form = reactive({
|
||||
deptId: "",
|
||||
name: "",
|
||||
types: "",
|
||||
canteenIsOpen: "0",
|
||||
logoPic: "",
|
||||
collectMoneyCode: "",
|
||||
swiperPic: "",
|
||||
@@ -195,13 +209,11 @@ const dataRules = {
|
||||
const openDialog = async (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ""
|
||||
|
||||
// 重置表单数据
|
||||
dataFormRef.value?.resetFields()
|
||||
for (const key in jobTime) {
|
||||
jobTime[key] = []
|
||||
}
|
||||
|
||||
// 获取merchantInfo信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
@@ -262,6 +274,9 @@ const getmerchantInfoData = async (id: string) => {
|
||||
Object.assign(form, res.data, {
|
||||
isSyncZy: res.data.isSyncZy == "1" ? true : false,
|
||||
})
|
||||
if (form.canteenIsOpen == undefined) {
|
||||
form.canteenIsOpen = "0"
|
||||
}
|
||||
jobTime.morning = resJobTime[0]?.split("-") ?? []
|
||||
jobTime.noon = resJobTime[1]?.split("-") ?? []
|
||||
jobTime.evening = resJobTime[2]?.split("-") ?? []
|
||||
|
||||
@@ -3,18 +3,21 @@
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form v-if="showSearch" ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row>
|
||||
<el-form-item style="width: 300px" label="商户名" prop="name">
|
||||
<el-form-item style="width: 250px" label="商户名" prop="name">
|
||||
<el-input v-model="state.queryForm.name" placeholder="商户名" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="商户类型" prop="types">
|
||||
<el-form-item style="width: 250px" label="商户类型" prop="types">
|
||||
<dict-select v-model="state.queryForm.types" dict-code="merchant_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="是否显示在移动端" prop="visibleMobile">
|
||||
<el-form-item style="width: 250px" label="是否显示在移动端" prop="visibleMobile">
|
||||
<dict-select v-model="state.queryForm.visibleMobile" dict-code="yes_no_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="是否同步正元" prop="isSyncZy">
|
||||
<el-form-item style="width: 250px" label="是否同步正元" prop="isSyncZy">
|
||||
<dict-select v-model="state.queryForm.isSyncZy" dict-code="yes_no_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="是否对外开放" prop="canteenIsOpen">
|
||||
<dict-select v-model="state.queryForm.canteenIsOpen" dict-code="yes_no_type" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
|
||||
Reference in new issue
Block a user