This commit is contained in:
weipengfei 2024-05-22 17:28:49 +08:00
commit 77e05647bb
7 changed files with 182 additions and 114 deletions

View File

@ -1,9 +1,5 @@
NODE_ENV = 'development' NODE_ENV = 'development'
VITE_NOW_TYPE = 'dist' VITE_NOW_TYPE = 'dist'
# Base API # Base API
# VITE_APP_BASE_URL='http://192.168.1.13:8546'
VITE_PUSH_URL = 'ws://192.168.1.22:8787' VITE_APP_BASE_URL='https://erp.lihaink.cn'
VITE_APP_BASE_URL = 'http://192.168.1.22:8546'
# VITE_PUSH_URL ='wss://erp.lihaink.cn/pull'
# VITE_APP_BASE_URL = 'https://erp.lihaink.cn'

View File

@ -12,7 +12,7 @@
{{ formData.supplier.service_phone }} {{ formData.supplier.service_phone }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="供应商地址"> <el-descriptions-item label="供应商地址">
{{ formData.supplier?.storeAddress }} {{ formData.supplier?.mer_address }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="公司名称" :span="2"> <el-descriptions-item label="公司名称" :span="2">
{{ dataJSON.company_name }} {{ dataJSON.company_name }}

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="edit-popup"> <div class="edit-popup">
<popup ref="popupRef" :async="true" width="60vw" @close="handleClose" :bottom-btn="false"> <popup ref="popupRef" :async="true" width="60vw" @close="handleClose" :bottom-btn="false">
<el-descriptions class="margin-top" :title="popupTitle" :column="3" border> <el-descriptions class="margin-top" :title="popupTitle" :column="3" border>
<el-descriptions-item label="供应商头像"> <el-descriptions-item label="供应商头像">
<material-picker v-model="formData.mer_avatar" disabled /> <material-picker v-model="formData.mer_avatar" disabled />
@ -72,12 +73,30 @@
<dict-value :options="dictData.financial_type" :value="formData.financial_type" /> <dict-value :options="dictData.financial_type" :value="formData.financial_type" />
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-card class="mt-5">
<template #header>
<span>供应商银行账户</span>
</template>
<el-table :data="formData.supplier_banks">
<el-table-column label="id" prop="id" show-overflow-tooltip />
<el-table-column label="账户名称" prop="name" show-overflow-tooltip />
<el-table-column label="电话" prop="phone" show-overflow-tooltip />
<el-table-column label="开户网点" prop="bank_branch" show-overflow-tooltip />
<el-table-column label="银行账户" prop="bank_code" show-overflow-tooltip />
<el-table-column label="身份证号" prop="id_card" show-overflow-tooltip />
<el-table-column label="账户类型" prop="is_own_text" show-overflow-tooltip />
<el-table-column label="审核状态" prop="is_check_text" show-overflow-tooltip />
<el-table-column label="拒绝原因" prop="fail_msg" show-overflow-tooltip />
</el-table>
</el-card>
</popup> </popup>
</div> </div>
</template> </template>
<script lang="ts" setup name="brandEdit"> <script lang="ts" setup name="brandEdit">
import Popup from '@/components/popup/index.vue' import Popup from '@/components/popup/index.vue'
import type { PropType } from 'vue' import type { PropType } from 'vue'
defineProps({ defineProps({
dictData: { dictData: {
@ -128,9 +147,9 @@ const formData = reactive({
financial_wechat: '', financial_wechat: '',
financial_alipay: '', financial_alipay: '',
financial_type: '', financial_type: '',
supplier_banks: []
}) })
// //
const formRules = reactive<any>({ const formRules = reactive<any>({
name: [{ name: [{

View File

@ -127,13 +127,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="供应商电话" prop="service_phone"> <el-form-item label="供应商电话" prop="phone">
<el-input v-model="formData.service_phone" clearable placeholder="请输入供应商电话" :readonly="false" /> <el-input v-model="formData.phone" clearable placeholder="请输入供应商电话" :readonly="false" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="供应商余额" prop="mer_money"> <el-form-item label="供应商余额">
<el-input v-model="formData.mer_money" clearable placeholder="请输入供应商余额" :readonly="false" /> <el-input v-model="formData.mer_money" clearable placeholder="请输入供应商余额" readonly />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -236,12 +236,13 @@ const formData = reactive({
commission_switch: '', commission_switch: '',
long: '', long: '',
lat: '', lat: '',
service_phone: '', phone: '',
mer_money: '', mer_money: '',
financial_bank: '', financial_bank: '',
financial_wechat: '', financial_wechat: '',
financial_alipay: '', financial_alipay: '',
financial_type: '', financial_type: '',
service_phone: "",
sys_labels_arr: [] sys_labels_arr: []
}) })
const dataJSON = ref({}) const dataJSON = ref({})
@ -292,7 +293,7 @@ const formRules = reactive<any>({
message: '请选择供应商是否禁用0锁定,1正常', message: '请选择供应商是否禁用0锁定,1正常',
trigger: ['blur'] trigger: ['blur']
}], }],
service_phone: [{ phone: [{
required: true, required: true,
message: '请输入供应商电话', message: '请输入供应商电话',
trigger: ['blur'] trigger: ['blur']
@ -318,8 +319,12 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key] formData[key] = data[key]
} }
} }
dataJSON.value = JSON.parse(data.data_json||'{}'); formData.phone = formData.service_phone || formData.phone
if(!formData.mer_address) formData.mer_address = dataJSON.value.company_address; formData.financial_type = data.financial_type == 0 ? '' : data.financial_type
formData.sys_labels_text = data.sys_labels_text
dataJSON.value = JSON.parse(data.data_json || '{}')
dataJSON.value = JSON.parse(data.data_json || '{}');
if (!formData.mer_address) formData.mer_address = dataJSON.value.company_address;
await getAreaList(formData.city_id, true) await getAreaList(formData.city_id, true)
await getTownList(formData.area_id, true) await getTownList(formData.area_id, true)
getVilllageList(formData.street_id) getVilllageList(formData.street_id)
@ -340,6 +345,7 @@ const getDetail = async (row: Record<string, any>) => {
const handleSubmit = async () => { const handleSubmit = async () => {
await formRef.value?.validate() await formRef.value?.validate()
const data = { ...formData, } const data = { ...formData, }
data.phone = data.service_phone || data.phone
data.sys_labels = data.sys_labels_arr.map(item => { data.sys_labels = data.sys_labels_arr.map(item => {
return item.id return item.id
}).join(',') }).join(',')

View File

@ -5,43 +5,23 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="供应商分类" prop="category_id"> <el-form-item label="供应商分类" prop="category_id">
<el-select <el-select v-model="queryParams.category_id" clearable placeholder="请选择供应商类型">
v-model="queryParams.category_id" <el-option v-for="(item, index) in dictData.mer_category_type" :key="index" :label="item.name"
clearable :value="parseInt(item.value)" />
placeholder="请选择供应商类型"
>
<el-option
v-for="(item, index) in dictData.mer_category_type"
:key="index"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="供应商类型" prop="type_id"> <el-form-item label="供应商类型" prop="type_id">
<el-select <el-select v-model="queryParams.type_id" clearable placeholder="请选择供应商类型">
v-model="queryParams.type_id" <el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
clearable :value="parseInt(item.value)" />
placeholder="请选择供应商类型"
>
<el-option
v-for="(item, index) in dictData.merchat_type"
:key="index"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="供应商名称" prop="mer_name"> <el-form-item label="供应商名称" prop="mer_name">
<el-input <el-input v-model="queryParams.mer_name" clearable placeholder="请输入供应商名称" />
v-model="queryParams.mer_name"
clearable
placeholder="请输入供应商名称"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -54,21 +34,13 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never"> <el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button <el-button v-perms="['supplier.supplier/add']" type="primary" @click="handleAdd">
v-perms="['supplier.supplier/add']"
type="primary"
@click="handleAdd"
>
<template #icon> <template #icon>
<icon name="el-icon-Plus" /> <icon name="el-icon-Plus" />
</template> </template>
新增 新增
</el-button> </el-button>
<el-button <el-button v-perms="['supplier.supplier/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
v-perms="['supplier.supplier/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
删除 删除
</el-button> </el-button>
<div class="mt-4"> <div class="mt-4">
@ -87,33 +59,14 @@
/> />
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column label="供应商类型" prop="type_id" show-overflow-tooltip>
label="供应商类型"
prop="type_id"
show-overflow-tooltip
>
<template #default="{ row }"> <template #default="{ row }">
<dict-value <dict-value :options="dictData.merchat_type" :value="row.type_id" />
:options="dictData.merchat_type"
:value="row.type_id"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="供应商名称" prop="mer_name" show-overflow-tooltip />
label="供应商名称" <el-table-column label="结算周期(天)" prop="settle_cycle" show-overflow-tooltip />
prop="mer_name" <el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
show-overflow-tooltip
/>
<el-table-column
label="结算周期(天)"
prop="settle_cycle"
show-overflow-tooltip
/>
<el-table-column
label="利率"
prop="interest_rate"
show-overflow-tooltip
/>
<!-- <el-table-column <!-- <el-table-column
label="标签" label="标签"
prop="sys_labels_arr" prop="sys_labels_arr"
@ -125,26 +78,14 @@
}}</span> }}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column label="供应商地址" prop="mer_address" show-overflow-tooltip />
label="供应商地址"
prop="mer_address"
show-overflow-tooltip
/>
<el-table-column label="供应商是否禁用" prop="status"> <el-table-column label="供应商是否禁用" prop="status">
<template #default="{ row }"> <template #default="{ row }">
<dict-value :options="dictData.show_status" :value="row.status" /> <dict-value :options="dictData.show_status" :value="row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="提成比例" prop="commission_rate" show-overflow-tooltip />
label="提成比例" <el-table-column label="供应商手续费单独设置" width="200" prop="commission_switch">
prop="commission_rate"
show-overflow-tooltip
/>
<el-table-column
label="供应商手续费单独设置"
width="200"
prop="commission_switch"
>
<template #default="{ row }"> <template #default="{ row }">
<!-- <dict-value :options="dictData.show_status" :value="row.commission_switch" /> --> <!-- <dict-value :options="dictData.show_status" :value="row.commission_switch" /> -->
{{ row.commission_switch ? "开启" : "关闭" }} {{ row.commission_switch ? "开启" : "关闭" }}
@ -157,31 +98,19 @@
/> />
<el-table-column label="操作" width="200" fixed="right"> <el-table-column label="操作" width="200" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button v-perms="['supplier.supplier/edit']" type="primary" link @click="handleEdit(row)">
v-perms="['supplier.supplier/edit']"
type="primary"
link
@click="handleEdit(row)"
>
编辑 编辑
</el-button> </el-button>
<el-button <el-button v-perms="['supplier.supplier/delete']" type="danger" link @click="handleDelete(row.id)">
v-perms="['supplier.supplier/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
删除 删除
</el-button> </el-button>
<el-button link @click="handleDetail(row.id)"> 详情 </el-button> <el-button link @click="handleDetail(row.id)"> 详情 </el-button>
<router-link <router-link :to="{
:to="{
path: 'bindGoods', path: 'bindGoods',
query: { query: {
id: row.id, id: row.id,
}, },
}" }">
>
<el-button link type="primary"> 商品绑定 </el-button> <el-button link type="primary"> 商品绑定 </el-button>
</router-link> </router-link>
<el-button v-if="!row.uid" link @click="bindUser(row)" type="primary"> <el-button v-if="!row.uid" link @click="bindUser(row)" type="primary">

View File

@ -173,8 +173,6 @@ const setFormData = async (data: Record<any, any>) => {
form.arrival_proof = JSON.parse(data.arrival_proof) form.arrival_proof = JSON.parse(data.arrival_proof)
} }
form.id = data.id form.id = data.id
} }
const getDetail = async (row: Record<string, any>) => { const getDetail = async (row: Record<string, any>) => {

120
test.html Normal file
View File

@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录页面</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="login-wrap">
<div class="login-container">
<h2 class="login-title">欢迎登录</h2>
<form action="/your-login-processing-url" method="post">
<div class="input-field">
<i class="fas fa-user icon"></i>
<input type="text" id="username" name="username" placeholder="用户名" required>
</div>
<div class="input-field">
<i class="fas fa-lock icon"></i>
<input type="password" id="password" name="password" placeholder="密码" required>
</div>
<button type="submit" class="login-btn">登录</button>
<p class="signup-link">还没有账号?<a href="#">立即注册</a></p>
</form>
</div>
</div>
</body>
</html>
<style>
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
body, html {
height: 100%;
margin: 0;
font-family: 'Roboto', sans-serif;
background-image: linear-gradient(to right, #f0f2f5, #dfe4ea);
}
.login-wrap {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.login-container {
width: 100%;
max-width: 400px;
padding: 30px;
background-color: white;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.login-title {
text-align: center;
margin-bottom: 30px;
color: #333;
}
.input-field {
position: relative;
margin-bottom: 20px;
}
.input-field input {
width: 100%;
padding: 15px 20px 15px 45px;
border: 1px solid #ddd;
border-radius: 5px;
outline: none;
transition: all 0.3s ease;
}
.input-field input:focus {
border-color: #0099cc;
}
.icon {
position: absolute;
top: 50%;
left: 15px;
transform: translateY(-50%);
color: #aaa;
}
.login-btn {
width: 100%;
padding: 15px;
background-color: #0099cc;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: all 0.3s ease;
}
.login-btn:hover {
background-color: #0077aa;
}
.signup-link {
text-align: center;
margin-top: 20px;
color: #777;
}
.signup-link a {
color: #0099cc;
text-decoration: none;
}
.signup-link a:hover {
text-decoration: underline;
}
</style>