Commit 65df7e45 authored by Mac's avatar Mac

新增收据配置

parent 02594cbf
......@@ -417,6 +417,26 @@ export function setSellStudyAbroadSendEmployee(data) {
data
});
}
/**
* 获取收据配置
*/
export function getReceiptConfigInfo(data) {
return request({
url: '/Finance/GetReceiptConfigInfo',
method: 'post',
data
})
}
/**
* 保存收据配置
*/
export function setReceiptConfigInfo(data) {
return request({
url: '/Finance/SetReceiptConfigInfo',
method: 'post',
data
})
}
......
......@@ -566,6 +566,16 @@ export function SetSynvEduEmployee(data) {
})
}
/**
* 获取客户添加方式枚举
*/
export function getCustomerAddWayEnumList(data) {
return request({
url: '/QYCustomer/GetCustomerAddWayEnumList',
method: 'post',
data
})
}
......
......@@ -4,28 +4,52 @@
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @keyup.enter.native="changePage(1)" clearable standout="bg-primary text-white"
v-model="msg.Name" label="企业/姓名/备注名/昵称/电话" @clear="changePage(1)" maxlength="20" />
<div class="col row wrap ">
<div class="col-4">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="inputtype"
ref="Id" :options="inputList" label="输入类型" :dense="false" emit-value map-options />
</div>
<div class="col-8">
<q-input @keyup.enter.native="setinput()" clearable standout="bg-primary text-white"
v-model="inputtext" label="输入" @clear="setinput()" />
</div>
</div>
</div>
<div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name"
v-model="msg.customerType" ref="Id" :options="ctypeList" label="客户类型" :dense="false" emit-value
map-options />
<q-select filled stack-label option-value="Id" option-label="Name" v-model="msg.CustomerType"
ref="Id" :options="CustomerTypeList" label="输入类型" :dense="false" emit-value map-options />
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" @change="changePage(1)" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
:picker-options="pickerOptions"  range-separator="至"  start-placeholder="开始时间"
 end-placeholder="结束时间">
 </el-date-picker>       
</template>
</q-field>
<q-select filled stack-label option-value="Id" option-label="Name" v-model="msg.Q_Friends" multiple use-chips @input="changePage(1)"
ref="Id" :options="Q_FriendsList" label="好友关系" :dense="false" emit-value map-options />
</div>
<div class="col-3">
<selectTree :treeData='memberList' :defaultArray="returnString" nodeKey="newId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门/人员" @getChild="getChild"></selectTree>
</div>
<div class="col-4">
<div class="col row wrap ">
<div class="col-4">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="timetype"
ref="Id" :options="ctypeList" label="输入类型" :dense="false" emit-value map-options />
</div>
<div class="col-8">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" @change="changePage(1)" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
:picker-options="pickerOptions"  range-separator="至"  start-placeholder="开始时间"
 end-placeholder="结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
</div>
</div>
</div>
</div>
......@@ -40,7 +64,8 @@
import selectTree from '../../../components/common/select-tree'
import {
getEmployeeAddrBook
getEmployeeAddrBook,
getCustomerAddWayEnumList
} from '../../../api/system/wechat';
......@@ -98,28 +123,96 @@
}
}]
},
inputtype: 1,//输入类型
timetype: 1,//时间类型
inputtext: '',
inputList: [{ Id: 1, Name: '企业' }, { Id: 2, Name: '备注名' }, { Id: 3, Name: '昵称' }, { Id: 4, Name: '电话' },],
CustomerTypeList: [{ Id: 0, Name: '不限' }, { Id: 1, Name: '微信用户' }, { Id: 2, Name: '企业微信用户' }],
Q_FriendsList: [ { Id: 1, Name: '好友客户' }, { Id: 2, Name: '待添加' }, { Id: 3, Name: '已申请' }],
msg: {
Name: '',
customerType: 0
PageIndex: 1,
PageSize: 20,
CorpName: '',//企业名称
CustomerName: '',//备注名
WeChatName: '',//昵称
CustomerMobile: '',//手机号码
CreateSTime: '',//创建开始时间
CreateETime: '',//创建结束时间
FriendSTime: '',//好友开始时间
FriendETime: '',//好友结束时间
Q_NotFollowUpDay: 0,//几天未跟进
Q_Friends: [],// 好友关系 多选英文逗号分隔
Q_AddWay: '',//获取来源 多选英文逗号分隔
EmpId: 0,// 员工Id
CustomerType: 0,//类型 1微信用户 2企业微信用户
SelectList: [],//自定义查询
},
returnString :[],
returnString: [],
dateList: [],//创建时间
ctypeList: [{ Id: 0, Name: '全部客户' }, { Id: 1, Name: '好友客户' },],
ctypeList: [{ Id: 1, Name: '客户创建时间' }, { Id: 2, Name: '好友添加时间' },],
memberList: [],
AddWayEnumList:[],
}
},
mounted() {
this.getEmployList()
// this.getAddWayEnumList()
},
created() {
this.getEmployList()
},
methods: {
changePage(e) {
this.msg.pageIndex = e
this.getList()
},
setinput() {
if (this.inputtype == 1) {
this.msg.CorpName = this.inputtext
this.msg.CustomerName = ''
this.msg.WeChatName = ''
this.msg.CustomerMobile = ''
} else if (this.inputtype == 2) {
this.msg.CorpName = ''
this.msg.CustomerName = this.inputtext
this.msg.WeChatName = ''
this.msg.CustomerMobile = ''
} else if (this.inputtype == 3) {
this.msg.CorpName = ''
this.msg.CustomerName = ''
this.msg.WeChatName = this.inputtext
this.msg.CustomerMobile = ''
} else if (this.inputtype == 4) {
this.msg.CorpName = ''
this.msg.CustomerName = ''
this.msg.WeChatName = ''
this.msg.CustomerMobile = this.inputtext
}
this.changePage(1)
},
getList() {
if (this.dateList && this.dateList.length > 0) {
let times = this.dateList
if (this.timetype == 1) {
this.msg.CreateSTime = times[0];
this.msg.CreateETime = times[1];
} else {
this.msg.FriendSTime = times[0];
this.msg.FriendETime = times[1];
}
} else {
this.msg.CreateSTime = '';
this.msg.CreateETime = '';
this.msg.FriendSTime = '';
this.msg.FriendETime = '';
}
let data = JSON.parse(JSON.stringify(this.msg))
if(data.Q_Friends.length>0){
data.Q_Friends = data.Q_Friends.join(',')
}
console.log(data)
},
getEmployList() {
......@@ -127,23 +220,32 @@
if (res.Code == 1) {
this.memberList = res.Data
// 重组唯一id
if(this.memberList && this.memberList.length==0) return
this.memberList.forEach(x=>{
x.newId = x.DataType+'-'+x.DeptId
if(x.ChildList && x.ChildList.length>0){
if (this.memberList && this.memberList.length == 0) return
this.memberList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
this.getChildList(x.ChildList)
}
})
}
}).catch(() => {
})
},
getChildList(ChildList){
ChildList.forEach(x=>{
x.newId = x.DataType+'-'+x.DeptId
if(x.ChildList && x.ChildList.length>0){
getAddWayEnumList(){
getCustomerAddWayEnumList({}).then(res =>{
if (res.Code == 1) {
this.AddWayEnumList = res.Data
}
})
},
getChildList(ChildList) {
ChildList.forEach(x => {
x.newId = x.DataType + '-' + x.DeptId
if (x.ChildList && x.ChildList.length > 0) {
this.getChildList(x.ChildList)
}
})
......@@ -152,9 +254,8 @@
console.log(deptArray)
//数据处理 获取夏利是 1-2 前面代表部门还是人员 后面是原生ID
},
clearData(){
}
}
}
......
<style>
.weChatConfig .Period-rules {
display: flex;
margin-bottom: 24px;
padding-left: 20px;
}
.weChatConfig .Period_Spreate {
flex: 1;
min-width: 200px;
margin-right: 32px;
}
.weChatConfig .Period-rule-title {
color: #646a73;
margin-bottom: 4px;
display: flex;
align-items: center;
}
.weChatConfig .Period-info-icon {
margin-left: 8px;
color: #8f959e;
line-height: 1;
vertical-align: top;
}
.process_Btn_List {
display: flex;
justify-content: flex-end;
padding: 20px;
}
.processBtn_Cancel {
width: 90px;
height: 35px;
border: 1px solid #A1AAB2;
color: #000000;
background-color: #fff;
text-align: center;
line-height: 35px;
border-radius: 5px;
cursor: pointer;
margin-right: 20px;
}
.processBtn_Save {
width: 90px;
height: 35px;
background-color: #2961FE;
color: #FFF;
text-align: center;
line-height: 35px;
border-radius: 5px;
cursor: pointer;
}
.baseSetForm_Dialog {
margin: 20px;
}
.cycle_Title {
font-size: 20px;
font-weight: 500;
color: #1f2329;
}
.Period-alert {
padding: 9px 16px;
border-radius: 4px;
background-color: #f0f4ff;
line-height: 22px;
color: #1f2329;
display: flex;
align-items: center;
margin-top: 20px;
margin-bottom: 12px;
font-size: 13px;
}
.Okr_Length {
font-weight: 500;
color: #1f2329;
}
.FormItem-asterisk {
position: relative;
top: 3px;
margin-left: 3px;
color: #f54a45;
line-height: 1;
}
.baseSetForm_Dialog .el-radio {
display: block;
margin-bottom: 15px;
}
</style>
<template>
<div class="page-body">
<div class="weChatConfig">
<div style="text-align:right;">
<q-btn color="accent" size="sm" class="q-mr-md" @click="geteject" label="修改基础配置" />
</div>
<div class="Period-rules">
<div class="Period_Spreate">
<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>
</div>
<div class="Period_Spreate">
<div class="Period-rule-title">
盖章图片
</div>
</div>
</div>
<div class="Period-rules">
<div class="Period_Spreate">
<div class="Period-rule-title">
开启状态
</div>
<div>
{{baseObj.Enable==1?'已开启':'未开启'}}
</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-input filled stack-label :dense="false" v-model="addMsg.Name" ref="Name"
class="col-12 q-pb-lg" label="企业名称" :rules="[val => !!val || '请填写企业名称']" />
</div>
<div>
<q-input filled stack-label :dense="false" v-model="addMsg.WX_CorpId" ref="WX_CorpId"
class="col-12 q-pb-lg" label="企业微信ID" :rules="[val => !!val || '请填写企业微信ID']" />
</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;">
<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 class="process_Btn_List">
<div class="processBtn_Cancel" @click="closeProcess">关闭</div>
<div class="processBtn_Save" @click="setBaseInfo">确定</div>
</div>
</q-card>
<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" />
</div>
</q-dialog>
</div>
</template>
<script>
import {
getReceiptConfigInfo,
setReceiptConfigInfo
} from '../../api/finance/index';
export default {
meta: {
title: "收据设置"
},
components: {
},
data() {
return {
isShowBaseSet: false,
baseObj: {},
addMsg:{},
}
},
mounted() {
this.getList();
},
methods: {
//获取okr配置信息
getList() {
getReceiptConfigInfo({}).then(res => {
if (res.Code == 1) {
this.baseObj = res.Data;
}
})
},
//关闭流程设置
closeProcess() {
this.isShowBaseSet = false;
},
geteject(){
this.addMsg = JSON.parse(JSON.stringify(this.baseObj))
this.isShowBaseSet = true;
},
setBaseInfo(){
this.$refs.Name.validate();
this.$refs.WX_CorpId.validate();
this.$refs.Employee_Secret.validate();
this.$refs.Contact_Secret.validate();
if(!this.$refs.Name.hasError && !this.$refs.WX_CorpId.hasError && !this.$refs.Employee_Secret.hasError && !this.$refs.Contact_Secret.hasError){
let msg={
Id: this.addMsg.Id,
Name: this.addMsg.Name,
WX_CorpId: this.addMsg.WX_CorpId,
Employee_Secret: this.addMsg.Employee_Secret,
Contact_Secret: this.addMsg.Contact_Secret,
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>
\ No newline at end of file
......@@ -183,6 +183,11 @@ const routes = [{
component: () =>
import("pages/system/dutyManagement.vue")
},
{
path: "/system/receiptManage", //收据设置
component: () =>
import("pages/system/receiptManage.vue")
},
{
path: "/course/catagory", //课程分类
component: () =>
......
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