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;
...@@ -83,71 +83,104 @@ ...@@ -83,71 +83,104 @@
color: #1f2329; color: #1f2329;
} }
.FormItem-asterisk {
.addDutyUpload .ItemImgDiv {
width: 118px;
height: 118px;
position: relative; position: relative;
top: 3px; margin: 0 10px 10px 0;
margin-left: 3px; display: inline-block;
color: #f54a45;
line-height: 1;
} }
.baseSetForm_Dialog .el-radio { .addDutyUpload .avatar-uploader .el-upload {
display: block; border-radius: 6px;
margin-bottom: 15px; cursor: pointer;
width: 100%;
height: 100%;
color: #8c939d;
position: relative;
overflow: hidden;
} }
</style> .addDutyMain {
<template> display: inline-block;
width: 118px;
height: 118px;
font-size: 70px;
border: 1px dashed #d9d9d9;
line-height: 120px;
}
</style>
<template>
<div class="page-body"> <div class="page-body">
<div class="weChatConfig"> <div class="receiptManage">
<div style="text-align:right;"> <div style="text-align:right;">
<q-btn color="accent" size="sm" class="q-mr-md" @click="geteject" label="修改基础配置" /> <q-btn color="accent" size="sm" class="q-mr-md" @click="geteject" label="修改收据配置" />
</div> </div>
<div class="Period-rules"> <div class="Period-rules">
<div class="Period_Spreate"> <div class="Period_Spreate">
<div class="Period-rule-title">流程名称</div> <div class="Period-rule-title">流程名称</div>
<div v-if="baseObj.TempleteIds!=-1" v-for="(x,y) in baseObj.TempleteList" :key="y">{{x}}</div> <div v-if="baseObj.TempleteIds!=-1">
<div v-if="baseObj.TempleteIds==-1" >不限</div> <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>
<div class="Period_Spreate"> <div class="Period_Spreate">
<div class="Period-rule-title"> <div class="Period-rule-title">
盖章图片 开启状态
</div>
<div>
{{baseObj.Enable==1?'已开启':'未开启'}}
</div> </div>
</div> </div>
</div> </div>
<div class="Period-rules"> <div class="Period-rules">
<div class="Period_Spreate"> <div class="Period_Spreate">
<div class="Period-rule-title"> <div class="Period-rule-title">
开启状态 盖章图片
</div> </div>
<div> <div >
{{baseObj.Enable==1?'已开启':'未开启'}} <q-img :src="baseObj.Images" spinner-color="white" style="width: 150px;height:150px" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<q-dialog v-model="isShowBaseSet" maximized full-height seamless position="right" @hide="closeProcess"> <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"> <q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="baseSetForm_Dialog"> <div class="baseSetForm_Dialog">
<div class="cycle_Title">微信配置</div> <div class="cycle_Title">收据配置</div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<q-input filled stack-label :dense="false" v-model="addMsg.Name" ref="Name" <q-select class="col-12 q-pb-lg q-pr-lg" multiple clearable filled stack-label use-input use-chips
class="col-12 q-pb-lg" label="企业名称" :rules="[val => !!val || '请填写企业名称']" /> 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>
<div> <div class="row wrap addDutyUpload">
<q-input filled stack-label :dense="false" v-model="addMsg.WX_CorpId" ref="WX_CorpId" <div class="col-12">
class="col-12 q-pb-lg" label="企业微信ID" :rules="[val => !!val || '请填写企业微信ID']" /> <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>
<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>
<div> <el-upload class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
<q-input filled stack-label :dense="false" v-model="addMsg.Contact_Secret" ref="Contact_Secret" :show-file-list="false">
class="col-12 q-pb-lg" label="企业外部联系人secret" :rules="[val => !!val || '请填写企业外部联系人secret']" /> <i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div> </div>
</div>
</div>
<div class="Okr_Length" style="margin:20px 0;display: flex;align-items: center;"> <div class="Okr_Length" style="margin:20px 0;display: flex;align-items: center;">
...@@ -169,12 +202,15 @@ ...@@ -169,12 +202,15 @@
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
getReceiptConfigInfo, getReceiptConfigInfo,
setReceiptConfigInfo setReceiptConfigInfo
} from '../../api/finance/index'; } from '../../api/finance/index';
import {
UploadSelfFile
} from "../../api/common/common"; //上传图片
export default { export default {
meta: { meta: {
title: "收据设置" title: "收据设置"
...@@ -186,14 +222,17 @@ ...@@ -186,14 +222,17 @@
return { return {
isShowBaseSet: false, isShowBaseSet: false,
baseObj: {}, baseObj: {},
addMsg:{}, addMsg: {},
SingleList: [],//流程下来列表
tempManager:[],//选中的流程
} }
}, },
mounted() { mounted() {
this.getList(); this.getList();
this.getSingleList()
}, },
methods: { methods: {
//获取okr配置信息 //获取收据配置信息
getList() { getList() {
getReceiptConfigInfo({}).then(res => { getReceiptConfigInfo({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -201,31 +240,84 @@ ...@@ -201,31 +240,84 @@
} }
}) })
}, },
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 => { })
},
//关闭流程设置 //关闭流程设置
closeProcess() { closeProcess() {
this.isShowBaseSet = false; this.isShowBaseSet = false;
}, },
geteject(){ geteject() {
this.addMsg = JSON.parse(JSON.stringify(this.baseObj)) this.addMsg = JSON.parse(JSON.stringify(this.baseObj))
this.tempManager = this.addMsg.TempleteIds.split(',').map(Number)
this.getIds()
this.isShowBaseSet = true; this.isShowBaseSet = true;
}, },
setBaseInfo(){ getIds(){
this.$refs.Name.validate();
this.$refs.WX_CorpId.validate(); if(this.tempManager && this.tempManager.length>0){
this.$refs.Employee_Secret.validate(); if(this.tempManager.indexOf(-1)!=-1){
this.$refs.Contact_Secret.validate(); this.SingleList.forEach(x=>{
if(!this.$refs.Name.hasError && !this.$refs.WX_CorpId.hasError && !this.$refs.Employee_Secret.hasError && !this.$refs.Contact_Secret.hasError){ if(x.Id!=-1){
let msg={ x.disable = true
Id: this.addMsg.Id, }else{
Name: this.addMsg.Name, x.disable = false
WX_CorpId: this.addMsg.WX_CorpId, }
Employee_Secret: this.addMsg.Employee_Secret, })
Contact_Secret: this.addMsg.Contact_Secret, }else{
Enable: this.addMsg.Enable, this.SingleList.forEach(x=>{
if(x.Id==-1){
} x.disable = true
setWeChatConfig(msg).then(res => { }else{
x.disable = false
}
})
}
}else{
this.SingleList.forEach(x=>{
x.disable = false
})
}
},
uploadFile(files) {
UploadSelfFile("course", files, res => {
if (res.Code == 1) {
this.addMsg.Images=res.FileUrl;
}
});
},
setBaseInfo() {
let msg = JSON.parse(JSON.stringify(this.addMsg))
if(this.tempManager && this.tempManager.length==0){
this.$q.notify({
type: 'negative',
message: `请选择相关流程`,
position: 'top'
})
return
}
if(msg.Images==''){
this.$q.notify({
type: 'negative',
message: `请选择上传图章`,
position: 'top'
})
return
}
msg.TempleteIds = this.tempManager.join(',')
setReceiptConfigInfo(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -238,11 +330,10 @@ ...@@ -238,11 +330,10 @@
this.isShowBaseSet = false; 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