Commit 8954a046 authored by tanghao's avatar tanghao

品牌编码

parent 44fd99a2
......@@ -2,6 +2,7 @@
<vxe-modal
v-model="showEdit"
@hide="onHide"
:z-index="1006"
title="品牌选择"
width="800"
destroy-on-close
......@@ -27,7 +28,8 @@
</el-form>
<vxe-table ref="xTable" border :data="tableData" :loading="loading" size="small" height="400">
<vxe-column type="checkbox" width="40"></vxe-column>
<!-- <vxe-column type="checkbox" width="40"></vxe-column> -->
<vxe-column type="radio" width="40"></vxe-column>
<vxe-column field="brandId" title="id" width="200"></vxe-column>
<vxe-column field="brandName" title="品牌名称" width="150"></vxe-column>
<vxe-column field="brandCode" title="品牌编码" width="120"></vxe-column>
......@@ -105,8 +107,9 @@ export default defineComponent({
}
const confirmModal = () => {
const list = xTable.value?.getCheckboxRecords()
emit('confirm', list)
const list = xTable.value?.getRadioRecord()
emit('confirm', [list])
// emit('confirm', list)
emit('update:visible', false)
}
......
......@@ -100,6 +100,7 @@ export default defineComponent({
const confirmModal = () => {
const list = xTable.value?.getRadioRecord()
console.log(list)
if (list == null) {
return ElMessage.warning('请选择一条数据!')
}
......
......@@ -4,7 +4,11 @@
<template #default>
<el-form ref="formRef" :model="form" :rules="rules" label-position="left" label-width="100px">
<el-form-item label="品牌编码" prop="brandCode">
<el-input v-model="form.brandCode" clearable />
<el-input v-model="form.brandCode" disabled>
<template #append>
<el-button :icon="MoreFilled" @click="brandVisible = true" />
</template>
</el-input>
</el-form-item>
<el-form-item label="客户编码" prop="customerCode">
......@@ -61,6 +65,8 @@
</vxe-modal>
<CustomerModal v-model:visible="customerVisible" @confirm="confirmCustomer" />
<BrandModal v-model:visible="brandVisible" @confirm="confirmBrand" />
</template>
<script lang="ts" setup name="UploadInformationInfoDialog">
......@@ -70,10 +76,14 @@ import { uploadFile } from '@/api/excel'
import { importInformationApi } from '@/api/customer'
import { MoreFilled } from '@element-plus/icons-vue'
import CustomerModal from '@/components/CustomerModal/CustomerModal.vue'
import BrandModal from '@/components/BrandModal/BrandModal.vue'
import { ElMessage, genFileId, type FormInstance, type UploadInstance } from 'element-plus'
const route = useRoute()
const customerVisible = ref(false)
const brandVisible = ref(false)
const props = defineProps({
visible: {
......@@ -114,6 +124,14 @@ const confirmCustomer = (list: any) => {
form.customerCode = item.customerCode
}
const confirmBrand = (list: any) => {
const [item] = list
if (!item) return
form.brandCode = item.brandCode
}
const importInformation = async () => {
const temp = tableData.value.reduce((acc: any, cur: any) => {
acc[cur.key] = cur.value || ''
......
......@@ -6,7 +6,7 @@
<ol class="list-decimal">
<li class="pl-2" v-for="(item, index) in scriptsDesc" :key="index">
<span class="font-bold text-sm">{{ item.scriptName }}</span
><span class="text-gray-500">{{ item.scriptDesc }}</span>
><span class="text-gray-500" v-html="item.scriptDesc"></span>
<template v-if="item?.example">
<p class="text-gray-500">示例:</p>
<div class="bg-[#1e293b] p-2 text-white rounded expample">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment