Commit f0551b0b authored by Mac's avatar Mac

收据配置

parent 3f93b694
<style> <style>
.weChatConfig .Period-rules { .receiptManage .Period-rules {
display: flex; display: flex;
margin-bottom: 24px; margin-bottom: 24px;
padding-left: 20px; padding-left: 20px;
} }
.weChatConfig .Period_Spreate { .receiptManage .Period_Spreate {
flex: 1; flex: 1;
min-width: 200px; min-width: 200px;
margin-right: 32px; margin-right: 32px;
} }
.weChatConfig .Period-rule-title { .receiptManage .Period-rule-title {
color: #646a73; color: #646a73;
margin-bottom: 4px; margin-bottom: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.weChatConfig .Period-info-icon { .receiptManage .Period-info-icon {
margin-left: 8px; margin-left: 8px;
color: #8f959e; color: #8f959e;
line-height: 1; line-height: 1;
vertical-align: top; vertical-align: top;
} }
.process_Btn_List { .process_Btn_List {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding: 20px; padding: 20px;
} }
.processBtn_Cancel { .processBtn_Cancel {
width: 90px; width: 90px;
height: 35px; height: 35px;
border: 1px solid #A1AAB2; border: 1px solid #A1AAB2;
color: #000000; color: #000000;
background-color: #fff; background-color: #fff;
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
margin-right: 20px; margin-right: 20px;
} }
.processBtn_Save { .processBtn_Save {
width: 90px; width: 90px;
height: 35px; height: 35px;
background-color: #2961FE; background-color: #2961FE;
color: #FFF; color: #FFF;
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
} }
.baseSetForm_Dialog { .baseSetForm_Dialog {
margin: 20px; margin: 20px;
} }
.cycle_Title { .cycle_Title {
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
color: #1f2329; color: #1f2329;
} }
.Period-alert { .Period-alert {
padding: 9px 16px; padding: 9px 16px;
border-radius: 4px; border-radius: 4px;
background-color: #f0f4ff; background-color: #f0f4ff;
line-height: 22px; line-height: 22px;
color: #1f2329; color: #1f2329;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 20px; margin-top: 20px;
margin-bottom: 12px; margin-bottom: 12px;
font-size: 13px; font-size: 13px;
} }
.Okr_Length { .Okr_Length {
font-weight: 500; font-weight: 500;
color: #1f2329; color: #1f2329;
} }
.FormItem-asterisk {
position: relative;
top: 3px; .addDutyUpload .ItemImgDiv {
margin-left: 3px; width: 118px;
color: #f54a45; height: 118px;
line-height: 1; position: relative;
} margin: 0 10px 10px 0;
display: inline-block;
.baseSetForm_Dialog .el-radio { }
display: block;
margin-bottom: 15px; .addDutyUpload .avatar-uploader .el-upload {
} border-radius: 6px;
cursor: pointer;
</style> width: 100%;
<template> height: 100%;
<div class="page-body"> color: #8c939d;
<div class="weChatConfig"> position: relative;
<div style="text-align:right;"> overflow: hidden;
<q-btn color="accent" size="sm" class="q-mr-md" @click="geteject" label="修改基础配置" /> }
</div>
<div class="Period-rules"> .addDutyMain {
<div class="Period_Spreate"> display: inline-block;
<div class="Period-rule-title">流程名称</div> width: 118px;
<div v-if="baseObj.TempleteIds!=-1" v-for="(x,y) in baseObj.TempleteList" :key="y">{{x}}</div> height: 118px;
<div v-if="baseObj.TempleteIds==-1" >不限</div> font-size: 70px;
</div> border: 1px dashed #d9d9d9;
<div class="Period_Spreate"> line-height: 120px;
<div class="Period-rule-title"> }
盖章图片 </style>
</div> <template>
<div class="page-body">
</div> <div class="receiptManage">
</div> <div style="text-align:right;">
<div class="Period-rules"> <q-btn color="accent" size="sm" class="q-mr-md" @click="geteject" label="修改收据配置" />
<div class="Period_Spreate"> </div>
<div class="Period-rule-title"> <div class="Period-rules">
开启状态 <div class="Period_Spreate">
</div> <div class="Period-rule-title">流程名称</div>
<div> <div v-if="baseObj.TempleteIds!=-1">
{{baseObj.Enable==1?'已开启':'未开启'}} <span v-for="(x,y) in baseObj.TempleteList" :key="y">
{{x}}{{baseObj.TempleteList.length==y+1?'':'、'}}
</span>
</div>
<div v-if="baseObj.TempleteIds==-1">不限</div>
</div>
<div class="Period_Spreate">
<div class="Period-rule-title">
开启状态
</div>
<div>
{{baseObj.Enable==1?'已开启':'未开启'}}
</div>
</div>
</div>
<div class="Period-rules">
<div class="Period_Spreate">
<div class="Period-rule-title">
盖章图片
</div>
<div >
<q-img :src="baseObj.Images" spinner-color="white" style="width: 150px;height:150px" />
</div>
</div>
</div>
</div>
<q-dialog v-model="isShowBaseSet" maximized full-height seamless position="right" @hide="closeProcess">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="baseSetForm_Dialog">
<div class="cycle_Title">收据配置</div>
<div style="margin-top: 10px;">
<q-select class="col-12 q-pb-lg q-pr-lg" multiple clearable filled stack-label use-input use-chips
option-value="Id" option-label="Name" v-model="tempManager"
:rules="[(val) => !!val || '请选择相关流程']" :options="SingleList" label="相关流程" :dense="false" emit-value
map-options @input="getIds">
</q-select>
</div>
<div class="row wrap addDutyUpload">
<div class="col-12">
<div style="display:flex;flex-wrap: wrap;">
<div v-if="addMsg.Images!=''" >
<div class="ItemImgDiv">
<q-img :src="addMsg.Images" spinner-color="white" style="width: 100%;height:100%" />
<q-btn size="7px" @click="addMsg.Images=''" style="position:absolute;right:-5px;top:-5px;" round
color="red" icon="iconfont icon-guanbi1" />
</div>
</div> </div>
<el-upload class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
:show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div> </div>
</div> </div>
</div>
<div class="Okr_Length" style="margin:20px 0;display: flex;align-items: center;">
<div style="color:#1f2329;margin-right: 10px;">开启状态</div>
<el-switch v-model="addMsg.Enable" :active-value="1" :inactive-value="2"></el-switch>
</div>
</div> </div>
<q-dialog v-model="isShowBaseSet" maximized full-height seamless position="right" @hide="closeProcess"> <div class="process_Btn_List">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog"> <div class="processBtn_Cancel" @click="closeProcess">关闭</div>
<div class="baseSetForm_Dialog"> <div class="processBtn_Save" @click="setBaseInfo">确定</div>
<div class="cycle_Title">微信配置</div> </div>
<div style="margin-top: 10px;"> </q-card>
<q-input filled stack-label :dense="false" v-model="addMsg.Name" ref="Name" <div class="dialog-out-close" @click="closeProcess"
class="col-12 q-pb-lg" label="企业名称" :rules="[val => !!val || '请填写企业名称']" /> style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
</div> <q-icon name="iconfont icon-jujue1" size="26px" />
<div> </div>
<q-input filled stack-label :dense="false" v-model="addMsg.WX_CorpId" ref="WX_CorpId" </q-dialog>
class="col-12 q-pb-lg" label="企业微信ID" :rules="[val => !!val || '请填写企业微信ID']" /> </div>
</div>
<div>
<q-input filled stack-label :dense="false" v-model="addMsg.Employee_Secret" ref="Employee_Secret"
class="col-12 q-pb-lg" label="企业通讯录secret" :rules="[val => !!val || '请填写企业通讯录secret']" />
</div>
<div>
<q-input filled stack-label :dense="false" v-model="addMsg.Contact_Secret" ref="Contact_Secret"
class="col-12 q-pb-lg" label="企业外部联系人secret" :rules="[val => !!val || '请填写企业外部联系人secret']" />
</div>
<div class="Okr_Length" style="margin:20px 0;display: flex;align-items: center;"> </template>
<div style="color:#1f2329;margin-right: 10px;">开启状态</div> <script>
<el-switch v-model="addMsg.Enable" :active-value="1" :inactive-value="2"></el-switch> import {
getReceiptConfigInfo,
setReceiptConfigInfo
} from '../../api/finance/index';
import {
UploadSelfFile
} from "../../api/common/common"; //上传图片
export default {
meta: {
title: "收据设置"
},
components: {
</div> },
data() {
</div> return {
<div class="process_Btn_List"> isShowBaseSet: false,
<div class="processBtn_Cancel" @click="closeProcess">关闭</div> baseObj: {},
<div class="processBtn_Save" @click="setBaseInfo">确定</div> addMsg: {},
</div> SingleList: [],//流程下来列表
</q-card> tempManager:[],//选中的流程
<div class="dialog-out-close" @click="closeProcess" }
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;"> },
<q-icon name="iconfont icon-jujue1" size="26px" /> mounted() {
</div> this.getList();
</q-dialog> this.getSingleList()
</div> },
methods: {
</template> //获取收据配置信息
<script> getList() {
import { getReceiptConfigInfo({}).then(res => {
getReceiptConfigInfo, if (res.Code == 1) {
setReceiptConfigInfo this.baseObj = res.Data;
} from '../../api/finance/index'; }
export default { })
meta: {
title: "收据设置"
}, },
components: { getSingleList() {
this.apipost('FinancialFlowTemplate_post_GetSingleList', {}, res => {
if (res.data.resultCode == 1) {
this.SingleList = res.data.data;
this.SingleList.unshift({
Id: -1,
Name: "不限",
});
this.SingleList.forEach(x => {
x.disable = false
})
} else { }
}, err => { })
}, },
data() {
return { //关闭流程设置
isShowBaseSet: false, closeProcess() {
baseObj: {}, this.isShowBaseSet = false;
addMsg:{}, },
geteject() {
this.addMsg = JSON.parse(JSON.stringify(this.baseObj))
this.tempManager = this.addMsg.TempleteIds.split(',').map(Number)
this.getIds()
this.isShowBaseSet = true;
},
getIds(){
if(this.tempManager && this.tempManager.length>0){
if(this.tempManager.indexOf(-1)!=-1){
this.SingleList.forEach(x=>{
if(x.Id!=-1){
x.disable = true
}else{
x.disable = false
}
})
}else{
this.SingleList.forEach(x=>{
if(x.Id==-1){
x.disable = true
}else{
x.disable = false
}
})
}
}else{
this.SingleList.forEach(x=>{
x.disable = false
})
} }
}, },
mounted() { uploadFile(files) {
this.getList(); UploadSelfFile("course", files, res => {
if (res.Code == 1) {
this.addMsg.Images=res.FileUrl;
}
});
}, },
methods: { setBaseInfo() {
//获取okr配置信息 let msg = JSON.parse(JSON.stringify(this.addMsg))
getList() { if(this.tempManager && this.tempManager.length==0){
getReceiptConfigInfo({}).then(res => { this.$q.notify({
if (res.Code == 1) { type: 'negative',
this.baseObj = res.Data; message: `请选择相关流程`,
} position: 'top'
}) })
}, return
}
//关闭流程设置 if(msg.Images==''){
closeProcess() { this.$q.notify({
this.isShowBaseSet = false; type: 'negative',
}, message: `请选择上传图章`,
geteject(){ position: 'top'
this.addMsg = JSON.parse(JSON.stringify(this.baseObj)) })
this.isShowBaseSet = true; return
}, }
setBaseInfo(){ msg.TempleteIds = this.tempManager.join(',')
this.$refs.Name.validate(); setReceiptConfigInfo(msg).then(res => {
this.$refs.WX_CorpId.validate(); if (res.Code == 1) {
this.$refs.Employee_Secret.validate(); this.$q.notify({
this.$refs.Contact_Secret.validate(); icon: 'iconfont icon-chenggong',
if(!this.$refs.Name.hasError && !this.$refs.WX_CorpId.hasError && !this.$refs.Employee_Secret.hasError && !this.$refs.Contact_Secret.hasError){ color: 'accent',
let msg={ timeout: 2000,
Id: this.addMsg.Id, message: '数据保存成功!',
Name: this.addMsg.Name, position: 'top'
WX_CorpId: this.addMsg.WX_CorpId, })
Employee_Secret: this.addMsg.Employee_Secret, this.getList()
Contact_Secret: this.addMsg.Contact_Secret, this.isShowBaseSet = false;
Enable: this.addMsg.Enable,
}
setWeChatConfig(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.getList()
this.isShowBaseSet = false;
}
})
} }
} })
} }
} }
}
</script>
</script>
\ No newline at end of file \ No newline at end of file
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