Commit abf987c1 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

# Conflicts:
#	src/App.vue
parents 0b9db68b 73aa9149
......@@ -14,7 +14,7 @@
"@riophae/vue-treeselect": "^0.4.0",
"ali-oss": "^6.12.0",
"axios": "^0.18.1",
"browser-md5-file": "^1.0.0",
"browser-md5-file": "^1.1.1",
"co": "^4.6.0",
"core-js": "^3.6.5",
"cos-js-sdk-v5": "^1.1.5",
......@@ -31,7 +31,7 @@
"relation-graph": "^1.0.8",
"v-viewer": "^1.5.1",
"vue-amap": "^0.5.10",
"vue-draggable-resizable": "^1.7.2",
"vue-draggable-resizable": "^1.7.5",
"vue-easytable": "^1.7.2",
"vue-i18n": "^8.0.0",
"vue-inline-svg": "^2.0.0",
......
......@@ -6,7 +6,7 @@
-webkit-box-orient: vertical;
overflow: hidden;
width: 100%;
padding-right:10px;
padding-right: 10px;
}
.sche_List_in {
......@@ -141,9 +141,9 @@
align-items: center;
height: 25px;
position: absolute;
bottom:10px;
width:100%;
right:0;
bottom: 10px;
width: 100%;
right: 0;
}
.tufa_xiugai {
......@@ -245,10 +245,12 @@
-webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));
background-color: #0ae;
}
.OtherListContent{
height:135px;
.OtherListContent {
height: 135px;
overflow: auto;
}
.OtherListContent::-webkit-scrollbar {
width: 3px;
height: 3px;
......@@ -320,15 +322,15 @@
v-for="(item,index) in WorkObj.FileList">
<el-image :src="item" style="width:100%;height:100%;" :preview-src-list="WorkObj.FileList">
</el-image>
<template v-if="workAuthObj.isShowEditAndDelete">
<template v-if="workAuthObj.isShowEditAndDelete">
<i class="iconfont icon-yiquxiao sch_del" style="font-size:17px;top:-4px;"
@click="workRemoveAdd(index)"></i>
</template>
</div>
</template>
<template v-if="workAuthObj.isShowEditAndDelete&&WorkObj.ItemImgList&&WorkObj.ItemImgList.length>0">
<el-upload class="schedul_Upload MyUpload" style="display:inline;" action="" list-type="picture-card"
:show-file-list="false" :http-request="UploadWorkFile">
<el-upload class="schedul_Upload MyUpload" style="display:inline;" action=""
list-type="picture-card" :show-file-list="false" :http-request="UploadWorkFile">
<i class="el-icon-plus"></i>
</el-upload>
</template>
......@@ -338,7 +340,8 @@
<template v-if="WorkObj.ItemType==2">
<div style="margin:10px 0;">
<template v-if="workAuthObj.isShowEditAndDelete">
<span v-if="!isShowSure&&WorkObj.WorkContent" title="点击进行修改" @click="isShowSure=true">{{WorkObj.WorkContent}}</span>
<span v-if="!isShowSure&&WorkObj.WorkContent" title="点击进行修改"
@click="isShowSure=true">{{WorkObj.WorkContent}}</span>
<el-input v-else v-model="WorkObj.WorkContent" @focus="isShowSure=true" placeholder="完成情况怎么样">
</el-input>
</template>
......@@ -353,12 +356,13 @@
<div class="OtherListContent">
<div v-for="(item,index) in WorkRuleList">
<div style="margin-bottom:10px;">{{index+1}}.{{item.ItemName}}</div>
<div v-if="item.ItemImgList&&item.ItemImgList.length>0" style="width:100%;display:flex;flex-wrap:wrap">
<div v-if="item.ItemImgList&&item.ItemImgList.length>0"
style="width:100%;display:flex;flex-wrap:wrap">
<div v-for="subItem in item.ItemImgList" style="width:40px;height:40px;margin:0 10px 10px 0;">
<el-image :src="subItem" style="width:100%;height:100%;" :preview-src-list="item.ItemImgList">
</el-image>
</div>
</div>
</div>
</div>
</div>
</template>
......@@ -370,8 +374,8 @@
<template v-if="WorkObj.ItemType==1 && workAuthObj.isShowEditAndDelete">
<q-btn color="primary" flat v-if="WorkObj.IsChecked==0" dense style="margin-left:10px;" slot="reference"
@click="saveOrder(1)" label="确认完成" />
<q-btn v-if="WorkObj.IsChecked==1" dense flat @click="saveOrder(0)"
style="margin-left:10px;" class="schedu_red" label="取消完成" />
<q-btn v-if="WorkObj.IsChecked==1" dense flat @click="saveOrder(0)" style="margin-left:10px;"
class="schedu_red" label="取消完成" />
</template>
<template v-if="WorkObj.ItemType==2 && workAuthObj.isShowEditAndDelete">
<q-btn color="primary" flat dense style="margin-left:10px;" v-if="isShowSure" slot="reference"
......@@ -450,7 +454,7 @@
<el-image :src="subItem" style="width:100%;height:100%;" :preview-src-list="item.ItemImgList">
</el-image>
</div>
</div>
</div>
</div>
</div>
</template>
......@@ -559,7 +563,7 @@
<el-image :src="subItem" style="width:100%;height:100%;" :preview-src-list="item.ItemImgList">
</el-image>
</div>
</div>
</div>
</div>
</div>
</template>
......@@ -678,12 +682,12 @@
Shift: 0,
DutyMan: 0
},
WorkActive:'1',
TufaActive:'1',
handActive:'1',
WorkRuleList:[],
EmergenciesRuleList:[],
HandoverRuleList:[]
WorkActive: '1',
TufaActive: '1',
handActive: '1',
WorkRuleList: [],
EmergenciesRuleList: [],
HandoverRuleList: [],
}
},
watch: {
......@@ -716,7 +720,7 @@
getWorkList() {
queryDutyWork_V2(this.qMsg).then(res => {
if (res.Code == 1) {
console.log(res,'数据');
console.log(res, '数据');
this.HandoverList = res.Data.HandoverList;
this.EmergenciesList = res.Data.EmergenciesList;
this.WorkList = res.Data.WorkList;
......@@ -735,7 +739,20 @@
}
});
},
//获取突发和交接
getTufaHand() {
var obj = {
IsBurst:0,
IsHandover:0
}
if (this.EmergenciesList.length > 0) {
obj.IsBurst=1
}
if (this.HandoverList.length > 0) {
obj.IsHandover=1
}
return obj;
},
//初始化权限信息
initAuth() {
if (this.authObj) {
......@@ -825,11 +842,11 @@
},
//保存工作清单
saveOrder(type) {
if(this.WorkObj.FileList==null){
this.WorkObj.FileList=[];
if (this.WorkObj.FileList == null) {
this.WorkObj.FileList = [];
}
if(type==1){
if(this.WorkObj.ItemImgList.length>0&&this.WorkObj.FileList.length==0){
if (type == 1) {
if (this.WorkObj.ItemImgList.length > 0 && this.WorkObj.FileList.length == 0) {
this.$q.notify({
type: 'negative',
message: '请上传图片',
......@@ -838,7 +855,7 @@
return
}
}
this.WorkObj.IsChecked=type;
this.WorkObj.IsChecked = type;
var saveWorkMsg = {
Id: this.WorkObj.Id, //编号
PlanShift: this.saveObj.Shift, //值班班次
......
<style>
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.lessonCostStatistics .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.lessonCostStatistics .text-bottom{
height: 32px;line-height: 32px; margin-bottom: 10px;
}
.lessonCostStatistics ._icon_btn i.icon-sousuo {
background-color: #47BF8C;
}
.lessonCostStatistics ._icon_btn .icon-add{
background-color: #47BF8C;
}
.lessonCostStatistics ._icon_btn i {
width: 26px;
height: 26px;
display: inline-block;
color: white !important;
border-radius: 50%;
text-align: center;
line-height: 26px;
margin-right: 10px;
cursor: pointer;
outline: none;
}
.lessonCostStatistics .el-table td,.el-table th{
padding: 5px 0;
}
</style>
<template>
<div class="page-body lessonCostStatistics">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div style="margin-right: 20px;" v-if='iscMaker==true'>
<div class="block">
<span style="margin-right: 5px;">校区</span>
<el-select v-model="msg.SchoolId" filterable @change="handleCurrentChanges(1)">
<el-option value="-1" label="不限"></el-option>
<el-option v-for='item in CompanyList' :label='item.SName' :value='item.SId' :key='item.SId'></el-option>
</el-select>
</div>
</div>
<div v-if='isgenerate==true'>
<div class="block" style="display:flex">
<span style="margin-right: 5px;">选择月份</span>
<el-date-picker
v-model="value2"
type="month"
placeholder="选择月">
</el-date-picker>
<q-btn :loading="loading1" color="primary" size="11px" label="生成提成" @click="scCommission" style="margin-left:10px"/>
</div>
</div>
</div>
</div>
<template >
<el-table
ref="filterTable"
:data="tableData"
v-loading = 'loading'
:header-cell-style="{backgroundColor:'#f5f6f7', color: '#a8a8b3'}"
border
style="width: 100%">
<!-- <el-table-column prop="Id" label="ID" ></el-table-column> -->
<el-table-column prop="Periods" label="周期" ></el-table-column>
<el-table-column prop="SumPrice" label="提成总金额" > </el-table-column>
<el-table-column prop="SchooldCommission" label="校区提成总金额" >
<template slot-scope="scope">
<div style="display: flex;flex-wrap: wrap;" v-if='scope.row.SchooldCommission>=0'>
{{scope.row.SchooldCommission>=0?scope.row.SchooldCommission:'-'}}
</div>
</template>
</el-table-column>
<el-table-column prop="FrIdList" label="财务单据" >
<template slot-scope="scope">
<div style="display: flex;flex-wrap: wrap;" v-if='scope.row.FrIdList.length>0'>
<span v-for="(x,y) in scope.row.FrIdList" @click="gocaiwuxiangq(x)" style="cursor: pointer;text-decoration: underline;margin-right: 5px; color: #409EFF;">{{x}}</span>
</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column prop="CreateByName" label="创建人" > </el-table-column>
<el-table-column prop="CreateTime" label="创建时间" > </el-table-column>
<el-table-column label="操作" >
<template slot-scope="scope">
<div class="_icon_btn">
<el-tooltip class="item" effect="dark" content="查看" placement="top">
<i class="iconfont icon-sousuo"
@click="goUrl('CommissionDetail',scope.row.Id)"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="制单" placement="top" v-if='iscMaker==true'>
<i class="iconfont icon-add" v-if='iscMaker==true'
@click="generalFinancacls(scope.row)"></i>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 10px;text-align: center;">
<el-pagination background @current-change="handleCurrentChanges" layout="total,prev, pager, next, jumper" :current-page.sync="msg.PageIndex"
:page-size="msg.PageSize" :total='total'>
</el-pagination>
</div>
</template>
</div>
</template>
<script>
import {
getSchoolDropdown
} from '../../api/school/index'
import {
GetClassTypePageList,
} from '../../api/system/index';
import{
getSellCommissionPeriodsPageList,
setSellCommissionRule,
setSellCommissionInfo
} from '../../api/finance/index'
export default {
meta: {
title: "课耗统计汇总表"
},
props: {},
components: {},
data() {
return {
loading: false,
loading1: false,
value2:'',
//列表数据参数
msg: {
PageIndex: 1,
PageSize: 15,
Name:'',
SchoolId:'-1'
},
pageCount: 0,
persistent: false,
listData:{},
tableData:[],
total:0,
CompanyList:[],
isgenerate:false,//是否有生成的权限
iscMaker:false,//是否有制单的权限
}
},
created() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x=>{//判断权限
if(x.FunctionCode == "Generate_Commission"){//判断是否有生成的权限
this.isgenerate = true;
}
if(x.FunctionCode == "Commission_maker"){//判断是否有制单的权限
this.iscMaker = true;
}
})
var myDate=new Date();
myDate.setMonth(myDate.getMonth()-1);
this.value2 = myDate.getFullYear() + "-" + (myDate.getMonth()+1)
},
mounted() {
this.getList();//获取提成周期列表
this.getBranchList()
},
methods: {
getList(){
this.loading = true;
getSellCommissionPeriodsPageList(this.msg).then(res => {
if (res.Code == 1) {
this.loading = false;
this.tableData = res.Data.PageData
this.total = res.Data.Count
}
})
},
scCommission(){//生成提成
if(this.loading1 == false){
this.loading1= true;
setSellCommissionInfo({Month:this.value2}).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '生成提成成功',
position: 'top'
})
this.getList()
}
this.loading1= false;
}).catch(err=>{
this.loading1= false;
})
}
},
getBranchList(){//获取校区
getSchoolDropdown({}).then(res => {
this.CompanyList = res.Data;
}).catch(() => {
})
},
goUrl(path, id ) {
this.$router.push({
path: '/financial/' + path,
query: {
"id": id,
blank: 'y',
}
})
},
gocaiwuxiangq(id){
this.OpenNewUrl("/financial/financalDocument/FinancialDocumentsDetail", {
id: id
});
},
generalFinancacls(item) {
if(this.msg.SchoolId == -1){
if(item.SumPrice>0){
this.tishi(item.SumPrice,item.Id)
}else{
this.$message.error('提成总金额为0')
}
}else{
if(item.SchooldCommission>0){
this.goaddFinancial(item.SchooldCommission,item.Id)
}else{
this.$message.error('校区提成总金额为0')
}
}
},
goaddFinancial(Money,Id){
let School_Id = 0;
let obj = {
CostType: 316,
Money: Money,
CurrencyId: 21,
XSTC: 1,
School_Id:this.msg.SchoolId == -1?0:this.msg.SchoolId,
OtherType:39,
ReFinanceId:Id,
ReFinanceId2:this.msg.SchoolId
}
let query = {
blank: "y",
tab: "新增付款单据",
Type: 2,
IsUploadPic: 1,
Name:'销售提成单',
id:143,
orderObj: JSON.stringify(obj)
}
this.$router.push({
path: "/financial/financalDocument/addFinancialDocuments",
query
});
},
tishi(Money,Id){
let that = this
this.$q.dialog({
title: "销售制单",
message: "你正在进行所有校区一起制单操作?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
this.goaddFinancial(Money,Id)
});
},
handleCurrentChanges(val){
this.msg.PageIndex= val;
this.getList()
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -256,7 +256,7 @@
<schedulHead :dataList="dataList"></schedulHead>
<div class="Sche_Bottom">
<template v-if="dataList.Status!=2">
<schedulOrder :save-obj="msg"></schedulOrder>
<schedulOrder :save-obj="msg" ref="schOrder"></schedulOrder>
<schedulVisit :save-obj="msg"></schedulVisit>
</template>
<template v-else>
......@@ -273,6 +273,30 @@
</div>
</div>
</div>
<q-dialog v-model="isShowTuFA" style="width:400px">
<q-card>
<q-card-section>
<div class="text-h6">值班交接</div>
</q-card-section>
<q-card-section class="q-pt-none">
<div class="q-gutter-sm" style="width:280px;" v-if="isShowOne">
<span style="position:relative;top:6px;">有无突发:</span>
<q-radio v-model="isHaveTufa" :val="2" label="有" />
<q-radio v-model="isHaveTufa" :val="1" label="无" />
</div>
<div class="q-gutter-sm" style="width:280px;" v-if="isShowTwo">
<span style="position:relative;top:6px;">有无交接:</span>
<q-radio v-model="isHaveHand" :val="2" label="有" />
<q-radio v-model="isHaveHand" :val="1" label="无" />
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="确定" color="primary" @click="submitHand" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
......@@ -306,6 +330,8 @@
Id: 0,
Shift: 0,
Status: 0, //Status(1-值班打卡,2-交接打卡)
IsBurst:0, //突发
IsHandover:0 //交接
},
dataList: {},
//是否显示访客操作按钮
......@@ -317,8 +343,13 @@
workAuthObj: {
isShowAdd: false, //是否显示新增按钮【默认不显示】
isShowEditAndDelete: false, //是否显示编辑和删除按钮【默认不显示】
}
},
isShowTuFA: false,
isHaveTufa:2, //是否有突发
isHaveHand:2, //是否有交接
isShowOne:false,
isShowTwo:false,
status:0
}
},
created() {
......@@ -344,11 +375,31 @@
},
//值班打卡或值班交接
SetDutyCheck(status) {
this.status = status;
this.checkMsg.IsBurst = this.$refs.schOrder.getTufaHand().IsBurst;
this.checkMsg.IsHandover = this.$refs.schOrder.getTufaHand().IsHandover;
//突发事件
if(this.$refs.schOrder.getTufaHand().IsBurst==0){
this.isShowOne=true;
this.isShowTuFA=true;
}
//交接工作
if(this.$refs.schOrder.getTufaHand().IsHandover==0){
this.isShowTwo=true;
this.isShowTuFA=true;
}
if(this.$refs.schOrder.getTufaHand().IsBurst>0&&this.$refs.schOrder.getTufaHand().IsHandover>0){
this.saveInfo()
}
},
//保存
saveInfo(){
let diaMsg='';
if(status==1){
if(this.status==1){
diaMsg='是否确定值班打卡?'
}
if(status==2){
if(this.status==2){
diaMsg='是否确定值班交接?'
}
this.$q.dialog({
......@@ -359,7 +410,7 @@
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.checkMsg.Status = status;
this.checkMsg.Status = this.status;
saveDutyCheck(this.checkMsg).then(res => {
if (res.Code == 1) {
this.getList();
......@@ -383,8 +434,39 @@
}).onCancel(() => {
});
},
//确定是否有突发
submitHand(){
if(this.isHaveTufa==2){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写突发事件`
})
this.isShowTuFA = false;
return
}
if(this.isHaveHand==2){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写交接`
})
this.isShowTuFA = false;
return
}
if(this.isHaveTufa==1){
this.checkMsg.IsBurst=1;
this.saveInfo();
}
if(this.isHaveHand==1){
this.checkMsg.IsHandover=1;
this.saveInfo();
}
this.isShowTuFA = false;
},
//刷新父页面
refreshPage() {
this.getList();
......
......@@ -243,6 +243,11 @@ const routes = [{
component: () =>
import("pages/financial/salesRules.vue")
},
{
path: "/financial/lessonCostStatistics", //课耗统计汇总表
component: () =>
import("pages/financial/lessonCostStatistics.vue")
},
{
path: "/financial/salesCommission", //提成周期列表
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