Merge remote-tracking branch 'origin/main'

This commit is contained in:
sw 2024-11-18 17:47:12 +08:00
commit 22280080fe
3 changed files with 61 additions and 59 deletions

View File

@ -115,7 +115,7 @@
</div>
</el-form-item>
<!-- 接收角色 -->
<el-form-item label="接收角色" prop="recipientRoles" :required="true">
<el-form-item label="接收角色" prop="region" :required="true">
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 100%">
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
</el-select>
@ -216,8 +216,8 @@ export default {
templateContent:[
{ required: true, message: '不能为空', trigger: 'blur' },
],
recipientRoles:[
{ required: true, message: '不能为空', trigger: 'blur' },
region: [
{ required: true, message: '不能为空', trigger: 'change' }
],
conditions:[
{ required: true, message: '不能为空', trigger: 'blur' },
@ -286,7 +286,11 @@ export default {
this.$refs[formName].validate((valid) =>{
this.form.recipientRoles = this.form.recipientRoles.toString()
this.form.conditions = JSON.stringify(this.form.conditions)
console.log(this.form.conditions[0].field,'123456')
if(this.form.conditions[0].field){
this.form.conditions = JSON.stringify(this.form.conditions)
}
if (valid) {
//
this.open = false
@ -481,14 +485,14 @@ export default {
margin-bottom: 0px;
border-radius: 8px;
box-sizing: border-box;
padding: 15px;
padding: 10px;
}
.cards-change{
//height: 81vh;
}
.table_box{
height: 73vh;
height: 74.5vh;
overflow: auto;
scrollbar-width: none;
}

View File

@ -554,14 +554,14 @@ export default {
margin-bottom: 0px;
border-radius: 8px;
box-sizing: border-box;
padding: 15px;
padding: 10px;
}
.cards-change{
//height: 81vh;
}
.table_box{
height: 73vh;
height: 74.5vh;
overflow: auto;
scrollbar-width: none;
}

View File

@ -1,6 +1,6 @@
<template>
<div class="container">
<!-- <img :src="logo" alt="Logo" style="margin-left: 80px;" class="logo">-->
<div class="c_box">
<div class="left-img">
<div v-if="this.form.logoSet === '0'">
<img class="logostat" :src="imagePath + this.form.logeImage" alt="">
@ -51,16 +51,39 @@
<div class="form-container">
<el-form ref="form" :model="form" label-width="120px">
<p style="font-weight: bold;">LOGO设置</p>
<div class="radio-and-upload">
<div class="radio-upload">
<el-radio-group v-model="form.logoSet" style="display: inline-block;">
<el-radio v-model="logoSet" label="0">自定义小票LOGO</el-radio>
<el-radio v-model="logoSet" label="1">不打印小票LOGO</el-radio>
</el-radio-group>
<!-- logo -->
<div style="margin-left: 25px" v-show="this.form.logoSet==='0'">
<el-upload
:action="uploadAction"
list-type="picture-card"
:class="{hide:hideUpload}"
:file-list="uploadFiles"
:auto-upload="true"
:show-file-list="false"
:headers="uploadHeader"
:on-success="handleUploadSuccessCover">
<img
v-if="this.form.logeImage"
:src="imagePath + this.form.logeImage"
class="list-img"
style="width: 100%; height: auto;"
/>
<i v-if="!this.form.logeImage" class="el-icon-plus"></i>
</el-upload>
<div class="hui_">请上传像素300*300的图片</div>
</div>
</div>
<p style="font-weight: bold;">抬头脚注设置</p>
<el-checkbox-group v-model="form.headfootSets" class="vertical-checkbox-group">
<el-checkbox :label="0">店铺名称</el-checkbox>
<div class="checkbox-input-container">
<el-checkbox :label="0">店铺名称</el-checkbox>
</div>
<div class="checkbox-input-container">
<el-checkbox :label="1">标题</el-checkbox>
<el-input v-model="form.title" style="width: 300px" placeholder="请输入标题"></el-input>
@ -68,7 +91,7 @@
<div class="checkbox-input-container">
<el-checkbox :label="2">小票类型</el-checkbox>
<span style="font-size: 10px">会员充值一键加油收银台消费</span>
<span style="font-size: 10px;color: #999">会员充值一键加油收银台消费</span>
</div>
<div class="checkbox-input-container">
@ -109,62 +132,23 @@
v-if="this.form.codeSet==='1'"
v-model="form.codeContent" placeholder="请输入二维码的内容"></el-input>
</div>
<img
v-if="this.form.codeImage"
:src="imagePath + this.form.codeImage"
class="list-img"
style="width: 100px; height: 100px;"
/>
</div>
<el-form-item>
<el-button type="primary" @click="submitForm3('form')">保存并同步更新小票样式</el-button>
</el-form-item>
</el-form>
</div>
<div class="fatrelative">
<div class="relative" v-show="this.form.logoSet==='0'">
<el-upload
:action="uploadAction"
list-type="picture-card"
:class="{hide:hideUpload}"
:file-list="uploadFiles"
:auto-upload="true"
:show-file-list="false"
:headers="uploadHeader"
:on-success="handleUploadSuccessCover">
<img
v-if="this.form.logeImage"
:src="imagePath + this.form.logeImage"
class="list-img"
style="width: 100%; height: auto;"
/>
<i v-if="!this.form.logeImage" class="el-icon-plus"></i>
</el-upload>
</div>
<div class="relative1" v-show="this.form.codeSet==='1'">
<div>
样例
</div>
<!-- 二维码 -->
<el-upload
:action="uploadAction"
list-type="picture-card"
:class="{hide:hideUpload}"
:file-list="uploadFiles"
:auto-upload="true"
:show-file-list="false"
:headers="uploadHeader"
:on-success="ermUploadSuccessCover">
<img
v-if="this.form.codeImage"
:src="imagePath + this.form.codeImage"
class="list-img"
style="width: 100%; height: auto"
/>
<i v-if="!this.form.codeImage" class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</div>
</template>
<script>
import { getToken } from '../../utils/auth'
import {addReceiptPrinting, getApi} from "@/api/sys/receiptPrint";
import {getListApi} from "@/api/sys/message";
@ -296,7 +280,7 @@ export default {
margin-top: 20px;
}
.checkbox-input-container {
margin-bottom: 8px;
display: flex;
align-items: center; /* 垂直居中对齐 */
gap: 10px; /* 设置复选框和输入框之间的间距 */
@ -312,7 +296,7 @@ export default {
}
.vertical-checkbox-group .el-checkbox {
margin-bottom: 8px; /* 调整间距 */
/* 调整间距 */
}
@ -339,7 +323,11 @@ export default {
justify-content: space-between;
align-items: center;
}
.radio-upload {
display: flex;
align-items: center;
}
::v-deep .el-radio{
display: block;
margin:10px 0;
@ -360,6 +348,8 @@ export default {
.container {
display: flex;
background-color: #f7f7f8;
box-sizing: border-box;
padding: 10px;
}
.logo {
width: 200px; /* 根据需要调整图片宽度 */
@ -472,4 +462,12 @@ avatar-uploader .el-upload {
text-align: center;
font-size: 12px;
}
.hui_{
color: #999999;
font-size: 12px;
}
.c_box{
width: 100%;
background: #fff;display: flex;
}
</style>