fixed 修改弹窗细节

This commit is contained in:
lwh 2023-06-12 22:20:53 +08:00
parent a85394f214
commit 1dd076f96a
3 changed files with 77 additions and 121 deletions

View File

@ -34,7 +34,7 @@
<el-form-item :label-width="labelWidth" label="经营类目" prop="shopBusinessCategoryGuid">
<el-select v-model="formData.shopBusinessCategoryGuid" placeholder="请选择经营类目">
<el-option v-for="item in dataList " :key="item.goodsCategoryGuid" :label="item.goodsCategoryName"
:value="parseInt(item.goodsCategoryGuid)"></el-option>
:value="item.goodsCategoryGuid"></el-option>
</el-select>
</el-form-item>
</el-col>

View File

@ -6,90 +6,62 @@
* @LastEditors: (黎文豪)
* @LastEditTime: (2023-06-09)
-->
<template>
<template>
<el-dialog v-model="props.modelValue" title="店铺信息详情" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :disabled="true">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="用户id" >
<el-input v-model="formData.shopUserId" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户guid" >
<el-input v-model="formData.shopCustomerGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="经营类目guid" >
<el-input v-model="formData.shopBusinessCategoryGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="图标" >
<UploadImage ref="uploadRef" v-model="formData.shopLogo" :limit="1" :fileSize="5"
:drag="true" :isShowTip="false" :isDisabled="true"/>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="营业执照" >
<UploadImage ref="uploadRef" v-model="formData.shopBusinessLicense" :limit="1" :fileSize="5"
:drag="true" :isShowTip="false" :isDisabled="true"/>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="名称" >
<el-input v-model="formData.shopName" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item :label-width="labelWidth" label="简介" >
<el-input v-model="formData.shopIntro" type="textarea" :rows="5" placeholder="请输入简介" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="排序" >
<el-input-number v-model.number="formData.shopSort" controls-position="right" :precision="2" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="销售单量" >
<el-input-number v-model.number="formData.shopSalesOrderCount" controls-position="right" :precision="2" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="审核状态" >
<el-select v-model="formData.shopAuditStatus" >
<el-option v-for="item in audit_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="审核人" >
<el-input v-model="formData.shopAuditUserGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="用户" prop="userName">
<el-input v-model='formData.userName' disabled type="text"></el-input>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户" prop="customerNickname">
<el-input v-model='formData.customerNickname' disabled type="text"></el-input>
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item :label-width="labelWidth" label="经营类目" prop="shopBusinessCategoryGuid">
<el-select v-model="formData.shopBusinessCategoryGuid" placeholder="请选择经营类目">
<el-option v-for="item in dataList " :key="item.goodsCategoryGuid" :label="item.goodsCategoryName"
:value="item.goodsCategoryGuid"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="图标" prop="shopLogo">
<UploadImage ref="uploadRef" v-model="formData.shopLogo" :data=imgData :limit="1" :fileSize="5"
:drag="true" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="营业执照" prop="shopBusinessLicense">
<UploadImage ref="uploadRef" v-model="formData.shopBusinessLicense" :data=imgData :limit="1" :fileSize="5"
:drag="true" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="名称" prop="shopName">
<el-input v-model="formData.shopName" placeholder="请输入名称" />
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item :label-width="labelWidth" label="简介" prop="shopIntro">
<el-input v-model="formData.shopIntro" type="textarea" :rows="5" placeholder="请输入简介" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="排序" prop="shopSort">
<el-input-number v-model.number="formData.shopSort" controls-position="right" :min="0" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="销售单量" prop="shopSalesOrderCount">
<el-input-number v-model.number="formData.shopSalesOrderCount" controls-position="right" :min="0" />
</el-form-item>
</el-col>
</el-row>
</el-form>
@ -99,11 +71,13 @@
<script setup>
import { ElMessage } from 'element-plus'
import { reactive, ref, watch } from "vue";
import { getFirstGoodsCategoryList } from '@/api/business/ShopManager/Shops/shop.js';
//
const openDialog = async () => {
await getaudit_status()
await getTreeList()
await getaudit_status()
}
@ -118,6 +92,11 @@ watch(props, async (v) => {
//
const audit_status = ref([]);
//
const dataList = ref([])
// -
//
async function getaudit_status() {
@ -127,6 +106,16 @@ async function getaudit_status() {
}
//
async function getTreeList() {
getFirstGoodsCategoryList().then((res) => {
if (res.code == 200) {
dataList.value = res.data
}
})
}
//
const formRef = ref();

View File

@ -13,27 +13,19 @@
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="用户" prop="userName">
<el-input v-model='formData.userName' disabled type="text" placeholder='点击选择用户'>
<template #append>
<div @click="handleChooseUser">选择</div>
</template>
</el-input>
<el-input v-model='formData.userName' disabled type="text"></el-input>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户" prop="customerNickname">
<el-input v-model='formData.customerNickname' disabled type="text" placeholder='点击选择客户'>
<template #append>
<div @click="handleChooseCustomer">选择</div>
</template>
</el-input>
<el-input v-model='formData.customerNickname' disabled type="text"></el-input>
</el-form-item>
</el-col>
<el-col :lg="24">
<el-form-item :label-width="labelWidth" label="经营类目" prop="GoodsCategoryParentGuid">
<el-select v-model="formData.customerGender" placeholder="请选择经营类目">
<el-option v-for="item in dataList " :key="item.goodsCategoryId" :label="item.goodsCategoryName"
:value="parseInt(item.goodsCategoryGuid)"></el-option>
<el-form-item :label-width="labelWidth" label="经营类目" prop="shopBusinessCategoryGuid">
<el-select v-model="formData.shopBusinessCategoryGuid" placeholder="请选择经营类目">
<el-option v-for="item in dataList " :key="item.goodsCategoryGuid" :label="item.goodsCategoryName"
:value="item.goodsCategoryGuid"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -81,19 +73,13 @@
</template>
</el-dialog>
<!-- 选择用户 -->
<ChooseUserDialog v-model="ChooseUserDialogVisible" :data="ChooseUserDialogRow"></ChooseUserDialog>
<!-- 选择客户 -->
<ChooseCustomerDialog v-model="ChooseCustomerDialogVisible" :data="ChooseCustomerDialogRow"></ChooseCustomerDialog>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js'
import { reactive, ref, watch } from "vue";
import { addOrUpdateShop,getFirstGoodsCategoryList } from '@/api/business/ShopManager/Shops/shop.js';
import ChooseCustomerDialog from './ChooseCustomerDialog.vue';
import ChooseUserDialog from './ChooseUserDialog.vue';
import { addOrUpdateShop, getFirstGoodsCategoryList } from '@/api/business/ShopManager/Shops/shop.js';
//
const openDialog = async () => {
@ -117,13 +103,6 @@ const audit_status = ref([]);
//
const dataList = ref([])
//
const ChooseUserDialogVisible = ref(false);
const ChooseUserDialogRow = ref({});
//
const ChooseCustomerDialogVisible = ref(false);
const ChooseCustomerDialogRow = ref({});
// -
@ -143,18 +122,6 @@ async function getTreeList() {
})
}
//
const handleChooseUser = () => {
ChooseUserDialogVisible.value = true
ChooseUserDialogRow.value = formData
}
//
const handleChooseCustomer = () => {
ChooseCustomerDialogVisible.value = true
ChooseCustomerDialogRow.value = formData
}
// -