|
@@ -1,22 +1,24 @@
|
|
|
<template>
|
|
|
<div class="conferencecost-all" v-loading.fullscreen.lock="conferencecostLoading">
|
|
|
- <el-dialog width="960px" title="分配权限" :visible.sync="conferencecostVisible">
|
|
|
- <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
|
|
|
- @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
- <div style="margin: 15px 0;"></div>
|
|
|
- <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
|
|
- <el-checkbox style="width:100px;" v-for="city in cities" :value="city.id" :label="city.id" :key="city.id">{{ city.cnName }}</el-checkbox>
|
|
|
+ <el-dialog width="650px" title="设置查看权限" class="permissionsbox" :visible.sync="permissionSettingDialog"
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <el-checkbox-group v-model="viewUsers">
|
|
|
+ <div style="display: flex;flex-wrap: wrap;">
|
|
|
+ <div style="width: 24%;margin: 3px;" v-for="item in viewUsersarr" :key="item.id">
|
|
|
+ <el-checkbox :label="item.id">{{ item.cnName }}</el-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-checkbox-group>
|
|
|
- <div class="conferencecost-dialog-btn">
|
|
|
- <el-button @click="PermissionSetting" type="primary">保 存</el-button>
|
|
|
- <el-button @click="conferencecostVisible=false">取 消</el-button>
|
|
|
+ <div style="text-align: right;margin-top: 15px;">
|
|
|
+ <el-button size="mini" @click="permissionSettingSet" type="primary">分配</el-button>
|
|
|
+ <el-button size="mini" @click="permissionSettingDialog = false">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<div class="conferencecost-header">
|
|
|
<div class="conferencecost-header-left">
|
|
|
<div class="conferencecost-header-left-item">
|
|
|
<label style="width:40px;">会务: </label>
|
|
|
- <el-select @change="conferenceidchange" size="small" v-model="conferenceid" filterable clearable
|
|
|
+ <el-select @change="conferenceidchange" size="small" v-model="conferenceid" filterable
|
|
|
placeholder="请选择">
|
|
|
<el-option v-for="item in conferenceidarr" :key="item.id" :label="item.teamName"
|
|
|
:value="item.id">
|
|
@@ -30,14 +32,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="conferencecost-header-right">
|
|
|
- <el-button @click="conferencecostVisible=true" size="small" type="primary">权限分配</el-button>
|
|
|
- <el-select size="small" v-model="conferenceid" clearable placeholder="请选择">
|
|
|
- <el-option v-for="item in a" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-button v-if="control.isGM" size="small" type="primary"
|
|
|
+ @click="permissionSettingDialog = true">权限分配</el-button>
|
|
|
+ <el-select v-if="control.isReview" size="small" v-model="fileSelect" clearable placeholder="请选择"
|
|
|
+ style="width: 150px;margin-left: 10px;">
|
|
|
+ <el-option v-for="item in filetype" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-button size="small" type="primary">生成表格</el-button>
|
|
|
- <el-button size="small" @click="ConferenceAffairsSave" type="primary">保存</el-button>
|
|
|
- <el-button size="small" @click="ConferenceAffairsAudit(1)" type="primary">审核通过</el-button>
|
|
|
+ <el-button v-if="control.isReview" style="margin-left: 10px;" size="small" type="primary"
|
|
|
+ @click="FileDown">生成表格</el-button>
|
|
|
+ <el-button v-if="control.isReview" size="small" @click="ConferenceAffairsAudit(1)"
|
|
|
+ type="primary">审核通过</el-button>
|
|
|
+ <el-button v-if="canSave" size="small" @click="ConferenceAffairsSave(true)"
|
|
|
+ type="primary">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="conferencecost-content">
|
|
@@ -47,7 +54,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="序号" prop="index" width="55">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="类型" width="120">
|
|
|
+ <el-table-column prop="name" label="类型" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-select size="small" v-model="scope.row.priceType" clearable placeholder="请选择">
|
|
|
<el-option v-for="item in typearr" :key="item.id" :label="item.text" :value="item.id">
|
|
@@ -55,7 +62,7 @@
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="单项内容" width="160">
|
|
|
+ <el-table-column prop="name" label="单项内容" width="140">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input type="textarea" :rows="3" placeholder="请输入内容"
|
|
|
v-model="scope.row.priceName"></el-input>
|
|
@@ -70,7 +77,7 @@
|
|
|
<el-table-column prop="name" label="币种" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-select size="small" @change="currencychange(scope.row)" v-model="scope.row.currency"
|
|
|
- clearable>
|
|
|
+ clearable filterable placeholder="请选择币种">
|
|
|
<el-option v-for="item in options" :key="item.currencyId" :label="item.currencyCode"
|
|
|
:value="item.currencyId">
|
|
|
</el-option>
|
|
@@ -89,7 +96,7 @@
|
|
|
:controls="false" v-model="scope.row.count"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="单位" width="80">
|
|
|
+ <el-table-column prop="name" label="单位" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-select size="small" v-model="scope.row.unit" placeholder="" clearable>
|
|
|
<el-option v-for="item in units" :key="item.id" :label="item.text" :value="item.id">
|
|
@@ -110,10 +117,10 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="name" label="附加值">
|
|
|
+ <el-table-column prop="name" label="附加值" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="textarea" :rows="3" placeholder="请输入内容"
|
|
|
- v-model="scope.row.addedValue"></el-input>
|
|
|
+ <el-input-number :precision="2" :controls="false" placeholder="请输入内容" size="mini"
|
|
|
+ v-model="scope.row.addedValue"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="明细">
|
|
@@ -121,7 +128,7 @@
|
|
|
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="scope.row.details"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="备注">
|
|
|
+ <el-table-column prop="name" label="备注" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="scope.row.remark"></el-input>
|
|
|
</template>
|
|
@@ -136,30 +143,36 @@
|
|
|
<div class="conferencecost-content-btn">
|
|
|
<el-button size="mini" @click="removeRow(scope.$index, scope.row)" type="danger">移
|
|
|
除</el-button>
|
|
|
- <el-button size="mini" @click="ConferenceAffairsAudits(1,scope.row.id)" type="primary">通
|
|
|
- 过</el-button>
|
|
|
- <el-button size="mini" @click="ConferenceAffairsAudits(-1,scope.row.id)" type="danger">撤
|
|
|
- 销</el-button>
|
|
|
+ <div v-if="control.isReview" style="margin-top: 5px;">
|
|
|
+ <el-button size="mini" @click="ConferenceAffairsAudits(1, scope.row.id)"
|
|
|
+ type="primary">通
|
|
|
+ 过</el-button>
|
|
|
+ <el-button size="mini" @click="ConferenceAffairsAudits(-1, scope.row.id)"
|
|
|
+ type="danger">撤
|
|
|
+ 销</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="Addline">
|
|
|
- <el-button size="small" @click="addlineclick" type="primary">添加一行</el-button>
|
|
|
+ <el-button v-if="canSave" size="small" @click="addlineclick" type="primary">添加一行</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="conferencecost-foot">
|
|
|
<div class="conferencecost-foot-rateSummary">
|
|
|
<div class="conferencecost-rateSummary-title">使用的币种及汇率:</div>
|
|
|
- <div v-for="(item,index) in rateStatistics" :key="index">
|
|
|
- <span>{{item.currencyCode}} : {{item.rate}} 、</span>
|
|
|
+ <div class="rate-statistics">
|
|
|
+ <span v-for="(item, index) in rateStatistics" :key="index">
|
|
|
+ {{ item.currencyCode }} : {{ item.rate
|
|
|
+ }}{{ index < rateStatistics.length - 1 ? ' 、' : '' }} </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="conferencecost-foot-totalcost">
|
|
|
- 成本总计:{{ conferenceAffairsCost.costAll }} {{ danwei }}
|
|
|
+ 成本总计:{{ conferenceAffairsCost.costAll }} <span style="color: red;">{{ danwei }}</span>
|
|
|
</div>
|
|
|
<div class="conferencecost-foot-totalquotations">
|
|
|
- 报价总计:{{ conferenceAffairsCost.baoJiaAll }} {{ danwei }}
|
|
|
+ 报价总计:{{ conferenceAffairsCost.baoJiaAll }} <span style="color: red;">{{ danwei }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="conferencecost-allocation">
|
|
@@ -201,20 +214,22 @@ export default {
|
|
|
liom:0,
|
|
|
lioms:0,
|
|
|
danwei: '',
|
|
|
- conferenceAffairsCost:{
|
|
|
- city:'',//服务地区
|
|
|
- diid:'',//团组Id
|
|
|
- allocationAmount:'',//分配金额
|
|
|
- allocationCurrency:'',//分配币种
|
|
|
- allocationRate:'',//分配时汇率
|
|
|
- allocationGroupId:'',//分配团组Id
|
|
|
- id:0,
|
|
|
- remark:'',
|
|
|
- costAll:'',//成本总计
|
|
|
- baoJiaAll:'',//报价总计
|
|
|
+ danweiId: 0,
|
|
|
+ conferenceAffairsCost: {
|
|
|
+ city: '',//服务地区
|
|
|
+ diid: '',//团组Id
|
|
|
+ allocationAmount: '',//分配金额
|
|
|
+ allocationCurrency: '',//分配币种
|
|
|
+ allocationRate: '',//分配时汇率
|
|
|
+ allocationGroupId: '',//分配团组Id
|
|
|
+ id: 0,
|
|
|
+ remark: '',
|
|
|
+ costAll: '',//成本总计
|
|
|
+ baoJiaAll: '',//报价总计
|
|
|
+ mostCurr: 0, //最终币种
|
|
|
},
|
|
|
- units:[],
|
|
|
- typearr:[],
|
|
|
+ units: [],
|
|
|
+ typearr: [],
|
|
|
tableDatas: [
|
|
|
// {
|
|
|
// priceType:'',//费用类型
|
|
@@ -233,32 +248,37 @@ export default {
|
|
|
// id:0,//主表Id
|
|
|
// remark:'',//备注
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
],
|
|
|
conferenceid: 0,
|
|
|
conferenceidarr: [],
|
|
|
input: '',
|
|
|
options: [],
|
|
|
- token:'',
|
|
|
+ token: '',
|
|
|
userId: '',
|
|
|
- restriction:true,
|
|
|
- rateStatistics:[],
|
|
|
+ restriction: true,
|
|
|
+ rateStatistics: [],
|
|
|
multipleSelection: [],
|
|
|
- conferenceAffairsCostChildids:[],
|
|
|
- conferencecostLoading:false,
|
|
|
- //
|
|
|
- conferencecostVisible:false,
|
|
|
- checkAll: false,
|
|
|
- checkedCities: [],
|
|
|
- cities: [],
|
|
|
- isIndeterminate: true
|
|
|
+
|
|
|
+ conferenceAffairsCostChildids: [],
|
|
|
+ conferencecostLoading: false,
|
|
|
+ filetype: [],
|
|
|
+ fileSelect: '',
|
|
|
+ control: {
|
|
|
+ isGM: false, //权限分配
|
|
|
+ isReview: false, //复审
|
|
|
+ },
|
|
|
+ permissionSettingDialog: false,
|
|
|
+ viewUsersarr: [],
|
|
|
+ viewUsers: [],
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
updated() {
|
|
|
- console.log(1);
|
|
|
+ //console.log(1);
|
|
|
if (this.restriction) {
|
|
|
this.$emit('transfer', true)
|
|
|
- this.restriction=false;
|
|
|
+ this.restriction = false;
|
|
|
}
|
|
|
},
|
|
|
destroyed() {
|
|
@@ -266,34 +286,40 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
tableDatas: {
|
|
|
- handler (val) {
|
|
|
- var _this=this
|
|
|
- _this.rateStatistics=[];
|
|
|
- var obj = {}
|
|
|
- obj = _this.options.find(function (i) {
|
|
|
- val.forEach((item, index) => {
|
|
|
- if (i.currencyId === item.currency) {
|
|
|
- _this.rateStatistics.push(i);
|
|
|
+ handler(val) {
|
|
|
+ var _this = this
|
|
|
+ _this.rateStatistics = [];
|
|
|
+ var obj = {};
|
|
|
+ _this.options.forEach(currency => {
|
|
|
+ val.forEach(item => {
|
|
|
+ if (item.currency === currency.currencyId && !obj[currency.currencyId]) {
|
|
|
+ obj[currency.currencyId] = true;
|
|
|
+ _this.rateStatistics.push(currency);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- _this.rateStatistics = _this.rateStatistics.filter((value, index, self) => {
|
|
|
- return self.indexOf(value) === index;
|
|
|
- });
|
|
|
if (_this.rateStatistics.length > 1) {
|
|
|
_this.danwei = 'CNY';
|
|
|
- }else {
|
|
|
- _this.danwei = _this.rateStatistics.length==1? _this.rateStatistics[0].currencyCode : 'CNY';
|
|
|
+ _this.danweiId = 836;
|
|
|
+ } else {
|
|
|
+ _this.danwei = _this.rateStatistics.length == 1 ? _this.rateStatistics[0].currencyCode : 'CNY';
|
|
|
+ _this.danweiId = _this.rateStatistics.length == 1 ? _this.rateStatistics[0].currencyId : 836;
|
|
|
}
|
|
|
_this.updateTotals();
|
|
|
+ console.log("tableDatas");
|
|
|
},
|
|
|
deep: true
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ canSave() {
|
|
|
+ return this.control.isReview || this.control.isGM || this.viewUsers.includes(this.userId);
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
//保留两位小数
|
|
|
- townum(val){
|
|
|
- val=Number(val);
|
|
|
+ townum(val) {
|
|
|
+ val = Number(val);
|
|
|
return val.toFixed(2);
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
@@ -304,56 +330,9 @@ export default {
|
|
|
this.conferenceAffairsCostChildids.push(this.multipleSelection[i].id);
|
|
|
}
|
|
|
},
|
|
|
- //获取基础数据
|
|
|
- ConferenceAffairsInIt(){
|
|
|
- var url = "/api/Groups/ConferenceAffairsInIt"
|
|
|
- var that = this
|
|
|
- this.$axios({
|
|
|
- method: 'post',
|
|
|
- url: url,
|
|
|
- headers: {
|
|
|
- Authorization: 'Bearer ' + that.token
|
|
|
- },
|
|
|
- data: {
|
|
|
- userId: that.userId,
|
|
|
- groupId: that.conferenceid,
|
|
|
- }
|
|
|
- }).then(function (res) {
|
|
|
- that.conferenceidarr = res.data.data.groupList;
|
|
|
- that.conferenceid=that.conferenceidarr[0].id;
|
|
|
- that.options = res.data.data.typeData;
|
|
|
- that.ConferenceAffairsInIts();
|
|
|
- })
|
|
|
- },
|
|
|
- //获取数据
|
|
|
- ConferenceAffairsInIts(){
|
|
|
- this.conferencecostLoading=true;
|
|
|
- var url = "/api/Groups/ConferenceAffairsInIt"
|
|
|
- var that = this
|
|
|
- this.$axios({
|
|
|
- method: 'post',
|
|
|
- url: url,
|
|
|
- headers: {
|
|
|
- Authorization: 'Bearer ' + that.token
|
|
|
- },
|
|
|
- data: {
|
|
|
- userId: 21,
|
|
|
- groupId: that.conferenceid,
|
|
|
- }
|
|
|
- }).then(function (res) {
|
|
|
- let AffairsInIt=res.data.data;
|
|
|
- that.options=AffairsInIt.currenyList.teamRates;
|
|
|
- that.tableDatas=AffairsInIt.conferenceAffairsCostChi;
|
|
|
- that.typearr=AffairsInIt.typeData;
|
|
|
- that.units=AffairsInIt.units;
|
|
|
- that.conferenceAffairsCost=AffairsInIt.conferenceAffairsCost;
|
|
|
- that.cities=AffairsInIt.userList;
|
|
|
- that.checkedCities=AffairsInIt.operatorUser;
|
|
|
- that.conferencecostLoading=false;
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
//币种切换
|
|
|
- currencychange(val){
|
|
|
+ currencychange(val) {
|
|
|
var obj = this.options.find(function (i) {
|
|
|
return i.currencyId === val.currency;
|
|
|
});
|
|
@@ -364,27 +343,28 @@ export default {
|
|
|
},
|
|
|
//会务切换
|
|
|
conferenceidchange(val) {
|
|
|
- this.ConferenceAffairsInIts();
|
|
|
+ //this.ConferenceAffairsInIts();
|
|
|
+ this.ConferenceAffairsLoad();
|
|
|
},
|
|
|
//添加一行
|
|
|
- addlineclick(){
|
|
|
+ addlineclick() {
|
|
|
this.tableDatas.push({
|
|
|
index: this.tableDatas.length + 1,
|
|
|
- priceType:'',//费用类型
|
|
|
- priceName:'',//费用名称
|
|
|
- costPrice:0,//成本费用
|
|
|
- currency:'',//币种
|
|
|
- rate:0,//当时汇率
|
|
|
- count:0,//数量333
|
|
|
- unit:'',//单位
|
|
|
- coefficient:0,//系数
|
|
|
- baoJiaPrice:0,//报价金额
|
|
|
- addedValue:'',//附加值
|
|
|
- details:'',//明细
|
|
|
- reviewStatus:0,//审核状态
|
|
|
- diid:this.conferenceid,//团组Id
|
|
|
- id:0,//主表Id
|
|
|
- remark:'',//备注
|
|
|
+ priceType: '',//费用类型
|
|
|
+ priceName: '',//费用名称
|
|
|
+ costPrice: 0,//成本费用
|
|
|
+ currency: '',//币种
|
|
|
+ rate: 0,//当时汇率
|
|
|
+ count: 0,//数量333
|
|
|
+ unit: '',//单位
|
|
|
+ coefficient: 0,//系数
|
|
|
+ baoJiaPrice: 0,//报价金额
|
|
|
+ addedValue: 0,//附加值
|
|
|
+ details: '',//明细
|
|
|
+ reviewStatus: 0,//审核状态
|
|
|
+ diid: this.conferenceid,//团组Id
|
|
|
+ id: 0,//主表Id
|
|
|
+ remark: '',//备注
|
|
|
});
|
|
|
this.updateTotals();
|
|
|
},
|
|
@@ -404,19 +384,19 @@ export default {
|
|
|
updateTotals() {
|
|
|
// Calculate cost total
|
|
|
this.conferenceAffairsCost.costAll = this.tableDatas.reduce((sum, item) => {
|
|
|
- if (this.rateStatistics.length>1) {
|
|
|
- return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0)* (Number(item.rate) || 0);
|
|
|
- }else{
|
|
|
+ if (this.rateStatistics.length > 1) {
|
|
|
+ return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0);
|
|
|
+ } else {
|
|
|
return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0);
|
|
|
}
|
|
|
}, 0).toFixed(2);
|
|
|
|
|
|
// Calculate quotation total
|
|
|
this.conferenceAffairsCost.baoJiaAll = this.tableDatas.reduce((sum, item) => {
|
|
|
- if (this.rateStatistics.length>1) {
|
|
|
- return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0)* (Number(item.rate) || 0)* (Number(item.coefficient) || 0);
|
|
|
- }else{
|
|
|
- return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0)* (Number(item.coefficient) || 0);
|
|
|
+ if (this.rateStatistics.length > 1) {
|
|
|
+ return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.rate) || 0) * (Number(item.coefficient) || 0);
|
|
|
+ } else {
|
|
|
+ return sum + (Number(item.costPrice) || 0) * (Number(item.count) || 0) * (Number(item.coefficient) || 0);
|
|
|
}
|
|
|
// return sum + (Number(item.baoJiaPrice) || 0);
|
|
|
}, 0).toFixed(2);
|
|
@@ -425,7 +405,7 @@ export default {
|
|
|
allocationGroupIdchange(val) {
|
|
|
console.log(val);
|
|
|
console.log(val);
|
|
|
-
|
|
|
+
|
|
|
var obj = this.options.find(function (i) {
|
|
|
return i.currencyId === val;
|
|
|
});
|
|
@@ -434,9 +414,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//移除
|
|
|
- removeRow(index,row) {
|
|
|
- console.log(index,row.id);
|
|
|
-
|
|
|
+ removeRow(index, row) {
|
|
|
+ console.log(index, row.id);
|
|
|
+
|
|
|
// this.tableDatas.splice(index, 1);
|
|
|
//this.updateTotals();//jisuan总计
|
|
|
var url = "/api/Groups/ConferenceAffairSinglesDelete"
|
|
@@ -448,18 +428,20 @@ export default {
|
|
|
Authorization: 'Bearer ' + that.token
|
|
|
},
|
|
|
data: {
|
|
|
- userId:21,
|
|
|
+ userId: this.userId,
|
|
|
ids: [row.id],
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- if (res.data.code== 200) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
that.$message({
|
|
|
type: 'success',
|
|
|
message: res.data.msg,
|
|
|
});
|
|
|
that.updateTotals()
|
|
|
- that.ConferenceAffairsInIts();
|
|
|
- }else{
|
|
|
+ that.ConferenceAffairsSave(false);
|
|
|
+ //that.ConferenceAffairsInIts();
|
|
|
+ that.ConferenceAffairsLoad();
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
type: 'error',
|
|
|
message: res.data.msg
|
|
@@ -468,7 +450,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//单条审核api
|
|
|
- ConferenceAffairsAudits: debounce(function (reviewStatus, id){
|
|
|
+ ConferenceAffairsAudits: debounce(function (reviewStatus, id) {
|
|
|
var url = "/api/Groups/ConferenceAffairsAudit"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
@@ -482,20 +464,21 @@ export default {
|
|
|
reviewStatus: reviewStatus,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- if (res.data.code== 200) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
that.$message({
|
|
|
- type: 'success',
|
|
|
+ type: 'success',
|
|
|
message: res.data.msg
|
|
|
});
|
|
|
- that.ConferenceAffairsInIts();
|
|
|
- }else{
|
|
|
+ //that.ConferenceAffairsInIts();
|
|
|
+ that.ConferenceAffairsLoad();
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
type: 'error',
|
|
|
message: res.data.msg
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
- },1000, true),
|
|
|
+ }, 1000, true),
|
|
|
//多条审核api
|
|
|
ConferenceAffairsAudit: debounce(function (reviewStatus) {
|
|
|
if (this.conferenceAffairsCostChildids.length === 0) {
|
|
@@ -518,30 +501,30 @@ export default {
|
|
|
reviewStatus: reviewStatus,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- if (res.data.code== 200) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
that.$message({
|
|
|
type: 'success',
|
|
|
message: '审核成功!'
|
|
|
});
|
|
|
- that.ConferenceAffairsInIts();
|
|
|
- }else{
|
|
|
+ //that.ConferenceAffairsInIts();
|
|
|
+ that.ConferenceAffairsLoad();
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
type: 'error',
|
|
|
message: res.data.msg
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
},1000, true),
|
|
|
- //权限保存api
|
|
|
- PermissionSetting: debounce(function (){
|
|
|
- if (this.checkedCities.length === 0) {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请至少选择一个人!'
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- var url = "/api/Groups/PermissionSetting"
|
|
|
+
|
|
|
+ //保存api
|
|
|
+ ConferenceAffairsSave: debounce(function (isShow) {
|
|
|
+ this.conferenceAffairsCost.diid = this.conferenceid;
|
|
|
+ this.conferenceAffairsCost.baoJiaAll = Number(this.conferenceAffairsCost.baoJiaAll);
|
|
|
+ this.conferenceAffairsCost.costAll = Number(this.conferenceAffairsCost.costAll);
|
|
|
+ this.conferenceAffairsCost.mostCurr = this.danweiId;
|
|
|
+ var url = "/api/Groups/ConferenceAffairsSave"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
@@ -550,19 +533,22 @@ export default {
|
|
|
Authorization: 'Bearer ' + that.token
|
|
|
},
|
|
|
data: {
|
|
|
- userIds: that.checkedCities,
|
|
|
+ conferenceAffairsCost: that.conferenceAffairsCost,
|
|
|
+ conferenceAffairsCostChild: that.tableDatas,
|
|
|
+ userId: that.userId,
|
|
|
groupId: that.conferenceid,
|
|
|
- createUserId: that.userId,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- if (res.data.code== 200) {
|
|
|
- that.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.msg,
|
|
|
- });
|
|
|
- that.conferencecostVisible=false;
|
|
|
- that.ConferenceAffairsInIts();
|
|
|
- }else{
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (isShow) {
|
|
|
+ that.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.msg,
|
|
|
+ });
|
|
|
+ //that.ConferenceAffairsInIts();
|
|
|
+ that.ConferenceAffairsLoad();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
type: 'error',
|
|
|
message: res.data.msg
|
|
@@ -570,12 +556,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},1000, true),
|
|
|
- //保存api
|
|
|
- ConferenceAffairsSave: debounce(function (){
|
|
|
- this.conferenceAffairsCost.diid = this.conferenceid;
|
|
|
- this.conferenceAffairsCost.baoJiaAll = Number(this.conferenceAffairsCost.baoJiaAll);
|
|
|
- this.conferenceAffairsCost.costAll = Number(this.conferenceAffairsCost.costAll);
|
|
|
- var url = "/api/Groups/ConferenceAffairsSave"
|
|
|
+ //文件下载
|
|
|
+ FileDown() {
|
|
|
+ var url = "/api/Groups/ConferenceAffairsFileDown"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
@@ -584,46 +567,134 @@ export default {
|
|
|
Authorization: 'Bearer ' + that.token
|
|
|
},
|
|
|
data: {
|
|
|
- conferenceAffairsCost: that.conferenceAffairsCost,
|
|
|
- conferenceAffairsCostChild: that.tableDatas,
|
|
|
- userId: that.userId,
|
|
|
+ fileTypeId: that.fileSelect,
|
|
|
groupId: that.conferenceid,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- if (res.data.code== 200) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ //弹出成功提示
|
|
|
that.$message({
|
|
|
type: 'success',
|
|
|
- message: res.data.msg,
|
|
|
+ message: '下载成功!'
|
|
|
});
|
|
|
- that.ConferenceAffairsInIts();
|
|
|
- }else{
|
|
|
+
|
|
|
+ // 创建一个隐藏的<a>元素用于下载文件
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.style.display = 'none';
|
|
|
+ link.href = res.data.data.filePath;
|
|
|
+ link.download = res.data.data.fileName;
|
|
|
+
|
|
|
+ // 将<a>元素添加到DOM中,点击它,然后移除它
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ document.body.removeChild(link);
|
|
|
+ } else {
|
|
|
that.$message({
|
|
|
type: 'error',
|
|
|
message: res.data.msg
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
- },1000, true),
|
|
|
- handleCheckAllChange(val) {
|
|
|
- let allidarr=[];
|
|
|
- this.cities.forEach((item, index) => {
|
|
|
- if (val) {
|
|
|
- allidarr.push(item.id);
|
|
|
+ },
|
|
|
+ // 合并为单一函数,移除冗余API调用
|
|
|
+ ConferenceAffairsLoad() {
|
|
|
+ this.conferencecostLoading = true;
|
|
|
+ const url = '/api/Groups/ConferenceAffairsInIt';
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url,
|
|
|
+ headers: { Authorization: 'Bearer ' + this.token },
|
|
|
+ data: {
|
|
|
+ userId: this.userId, // 统一使用动态userId,移除硬编码
|
|
|
+ groupId: this.conferenceid
|
|
|
}
|
|
|
+ }).then(res => {
|
|
|
+ const data = res.data.data;
|
|
|
+
|
|
|
+ if (res.data.code == 201 || res.data.code == 200) {
|
|
|
+ // 原ConferenceAffairsInIt逻辑
|
|
|
+ this.conferenceidarr = data.groupList;
|
|
|
+ if (!this.conferenceid) {
|
|
|
+ this.conferenceid = this.conferenceidarr.length > 0 ? this.conferenceidarr[0].id : '';
|
|
|
+ }
|
|
|
+
|
|
|
+ // 原ConferenceAffairsInIts逻辑
|
|
|
+ this.options = data.currenyList.teamRates;
|
|
|
+ this.typearr = data.typeData;
|
|
|
+ this.units = data.units;
|
|
|
+ this.filetype = data.fileType;
|
|
|
+ this.fileSelect = this.filetype.length > 0 ? this.filetype[0].id : '';
|
|
|
+ this.control.isGM = data.isGM;
|
|
|
+ this.control.isReview = data.isReview;
|
|
|
+ this.viewUsersarr = data.userList;
|
|
|
+ this.viewUsers = data.operatorUser;
|
|
|
+
|
|
|
+
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.conferenceAffairsCost = data.conferenceAffairsCost;
|
|
|
+ this.tableDatas = data.conferenceAffairsCostChi;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (res.data.code == 201) {
|
|
|
+
|
|
|
+ this.conferenceAffairsCost = {};
|
|
|
+ this.tableDatas = [];
|
|
|
+
|
|
|
+ //弹出暂无权限
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '暂无权限!'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.conferencecostLoading = false;
|
|
|
});
|
|
|
- this.checkedCities = val ? allidarr : [];
|
|
|
- this.isIndeterminate = false;
|
|
|
},
|
|
|
- handleCheckedCitiesChange(value) {
|
|
|
- let checkedCount = value.length;
|
|
|
- this.checkAll = checkedCount === this.cities.length;
|
|
|
- this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
|
|
|
+ permissionSettingSet() {
|
|
|
+
|
|
|
+ const userids = this.viewUsers;
|
|
|
+
|
|
|
+ if (userids.length == 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择用户!'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const url = '/api/Groups/PermissionSetting';
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url,
|
|
|
+ headers: { Authorization: 'Bearer ' + this.token },
|
|
|
+ data: {
|
|
|
+ UserIds: userids,
|
|
|
+ GroupId: this.conferenceid,
|
|
|
+ CreateUserId: this.userId,
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '权限分配成功!'
|
|
|
+ });
|
|
|
+ this.permissionSettingDialog = false;
|
|
|
+ this.ConferenceAffairsLoad();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.data.msg
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- mounted(){
|
|
|
+ mounted() {
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
|
|
|
- this.ConferenceAffairsInIt()
|
|
|
+ //this.ConferenceAffairsInIt()
|
|
|
+ this.ConferenceAffairsLoad();
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -635,11 +706,13 @@ export default {
|
|
|
border-radius: 10px;
|
|
|
min-height: 830px;
|
|
|
}
|
|
|
-.conferencecost-header{
|
|
|
+
|
|
|
+.conferencecost-header {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+
|
|
|
.conferencecost-header-left {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
@@ -654,47 +727,63 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
-.conferencecost-content .el-input-number--mini{
|
|
|
+
|
|
|
+.conferencecost-content .el-input-number--mini {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-.conferencecost-content-btn{
|
|
|
+
|
|
|
+.conferencecost-content-btn {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
flex-wrap: wrap;
|
|
|
}
|
|
|
-.conferencecost-content-btn .el-button+.el-button{
|
|
|
+
|
|
|
+.conferencecost-content-btn .el-button+.el-button {
|
|
|
margin-left: 0px;
|
|
|
margin-top: 5px;
|
|
|
}
|
|
|
-.Addline{
|
|
|
+
|
|
|
+.Addline {
|
|
|
margin-top: 10px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
-.conferencecost-header-right>div,button{
|
|
|
+
|
|
|
+.conferencecost-header-right>div,
|
|
|
+button {
|
|
|
margin-bottom: 15px;
|
|
|
}
|
|
|
-.conferencecost-foot-rateSummary{
|
|
|
+
|
|
|
+.conferencecost-foot-rateSummary {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
flex-wrap: wrap;
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
-.conferencecost-all .conferencecost-content .el-table__header-wrapper,.el-table__body-wrapper{
|
|
|
- font-size:12px
|
|
|
+
|
|
|
+.conferencecost-all .conferencecost-content .el-table__header-wrapper,
|
|
|
+.el-table__body-wrapper {
|
|
|
+ font-size: 12px
|
|
|
}
|
|
|
-.conferencecost-allocation{
|
|
|
+
|
|
|
+.conferencecost-allocation {
|
|
|
margin-top: 15px;
|
|
|
}
|
|
|
-.conferencecost-Interestrate{
|
|
|
+
|
|
|
+.conferencecost-Interestrate {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
-.conferencecost-foot,.conferencecost-allocation{
|
|
|
+
|
|
|
+.conferencecost-foot,
|
|
|
+.conferencecost-allocation {
|
|
|
font-size: 14px;
|
|
|
color: #909399;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
-.conferencecost-dialog-btn{
|
|
|
- text-align: right;
|
|
|
- margin-top: 20px;
|
|
|
+
|
|
|
+.rate-statistics {
|
|
|
+ color: #3cca54;
|
|
|
+ /* Element UI 主题色 */
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|
|
|
+
|