|
@@ -1,10 +1,23 @@
|
|
|
<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-checkbox-group>
|
|
|
+ <div class="conferencecost-dialog-btn">
|
|
|
+ <el-button @click="PermissionSetting" type="primary">保 存</el-button>
|
|
|
+ <el-button @click="conferencecostVisible=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 placeholder="请选择">
|
|
|
+ <el-select @change="conferenceidchange" size="small" v-model="conferenceid" filterable clearable
|
|
|
+ placeholder="请选择">
|
|
|
<el-option v-for="item in conferenceidarr" :key="item.id" :label="item.teamName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
@@ -17,9 +30,9 @@
|
|
|
</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-option v-for="item in a" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-button size="small" type="primary">生成表格</el-button>
|
|
@@ -37,25 +50,27 @@
|
|
|
<el-table-column prop="name" label="类型" width="120">
|
|
|
<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">
|
|
|
+ <el-option v-for="item in typearr" :key="item.id" :label="item.text" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="单项内容" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="scope.row.priceName"></el-input>
|
|
|
+ <el-input type="textarea" :rows="3" placeholder="请输入内容"
|
|
|
+ v-model="scope.row.priceName"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="成本单价" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini" :controls="false" v-model="scope.row.costPrice"></el-input-number>
|
|
|
+ <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini"
|
|
|
+ :controls="false" v-model="scope.row.costPrice"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<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>
|
|
|
+ <el-select size="small" @change="currencychange(scope.row)" v-model="scope.row.currency"
|
|
|
+ clearable>
|
|
|
<el-option v-for="item in options" :key="item.currencyId" :label="item.currencyCode"
|
|
|
:value="item.currencyId">
|
|
|
</el-option>
|
|
@@ -64,26 +79,28 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="当时汇率" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number @change="calculateQuotation(scope.row)" :precision="4" size="mini" :controls="false" v-model="scope.row.rate"></el-input-number>
|
|
|
+ <el-input-number @change="calculateQuotation(scope.row)" :precision="4" size="mini"
|
|
|
+ :controls="false" v-model="scope.row.rate"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="数量" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini" :controls="false" v-model="scope.row.count"></el-input-number>
|
|
|
+ <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini"
|
|
|
+ :controls="false" v-model="scope.row.count"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="单位" width="80">
|
|
|
<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">
|
|
|
+ <el-option v-for="item in units" :key="item.id" :label="item.text" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="系数" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini" :controls="false" v-model="scope.row.coefficient"></el-input-number>
|
|
|
+ <el-input-number @change="calculateQuotation(scope.row)" :precision="2" size="mini"
|
|
|
+ :controls="false" v-model="scope.row.coefficient"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="单项报价金额" width="100">
|
|
@@ -95,7 +112,8 @@
|
|
|
|
|
|
<el-table-column prop="name" label="附加值">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="scope.row.addedValue"></el-input>
|
|
|
+ <el-input type="textarea" :rows="3" placeholder="请输入内容"
|
|
|
+ v-model="scope.row.addedValue"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="明细">
|
|
@@ -116,9 +134,12 @@
|
|
|
<el-table-column label="操作" width="100px">
|
|
|
<template slot-scope="scope">
|
|
|
<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>
|
|
|
+ <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>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -144,23 +165,29 @@
|
|
|
<div class="conferencecost-allocation">
|
|
|
<div class="conferencecost-allocation-select">
|
|
|
注:其中
|
|
|
- <el-input-number style="width:120px;" :precision="2" size="mini" :controls="false" v-model="conferenceAffairsCost.allocationAmount"></el-input-number>
|
|
|
- <el-select @change="allocationGroupIdchange" style="width:120px;" size="mini" v-model="conferenceAffairsCost.allocationCurrency" clearable>
|
|
|
+ <el-input-number style="width:120px;" :precision="2" size="mini" :controls="false"
|
|
|
+ v-model="conferenceAffairsCost.allocationAmount"></el-input-number>
|
|
|
+ <el-select @change="allocationGroupIdchange" style="width:120px;" size="mini"
|
|
|
+ v-model="conferenceAffairsCost.allocationCurrency" clearable>
|
|
|
<el-option v-for="item in options" :key="item.currencyId" :label="item.currencyCode"
|
|
|
:value="item.currencyId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
,会分摊到
|
|
|
- <el-select filterable style="width:200px;" size="mini" v-model="conferenceAffairsCost.allocationGroupId" clearable>
|
|
|
- <el-option v-for="item in conferenceidarr" :key="item.id" :label="item.teamName"
|
|
|
- :value="item.id">
|
|
|
+ <el-select filterable style="width:200px;" size="mini" v-model="conferenceAffairsCost.allocationGroupId"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="item in conferenceidarr" :key="item.id" :label="item.teamName" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="conferencecost-Interestrate">
|
|
|
该会务利润率超过
|
|
|
- <el-input-number style="width:120px;" :precision="2" size="mini" :controls="false" v-model="liom"></el-input-number>%
|
|
|
- 需要增派几人去现场执行
|
|
|
+ <el-input-number style="width:120px;" :precision="2" size="mini" :controls="false"
|
|
|
+ v-model="liom"></el-input-number>%
|
|
|
+ 需要增派
|
|
|
+ <el-input-number style="width:120px;" size="mini" :controls="false"
|
|
|
+ v-model="lioms"></el-input-number>
|
|
|
+ 人去现场执行
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -172,6 +199,7 @@ export default {
|
|
|
return {
|
|
|
a:[],
|
|
|
liom:0,
|
|
|
+ lioms:0,
|
|
|
danwei: '',
|
|
|
conferenceAffairsCost:{
|
|
|
city:'',//服务地区
|
|
@@ -218,6 +246,12 @@ export default {
|
|
|
multipleSelection: [],
|
|
|
conferenceAffairsCostChildids:[],
|
|
|
conferencecostLoading:false,
|
|
|
+ //
|
|
|
+ conferencecostVisible:false,
|
|
|
+ checkAll: false,
|
|
|
+ checkedCities: [],
|
|
|
+ cities: [],
|
|
|
+ isIndeterminate: true
|
|
|
}
|
|
|
},
|
|
|
updated() {
|
|
@@ -313,6 +347,8 @@ export default {
|
|
|
that.typearr=AffairsInIt.typeData;
|
|
|
that.units=AffairsInIt.units;
|
|
|
that.conferenceAffairsCost=AffairsInIt.conferenceAffairsCost;
|
|
|
+ that.cities=AffairsInIt.userList;
|
|
|
+ that.checkedCities=AffairsInIt.operatorUser;
|
|
|
that.conferencecostLoading=false;
|
|
|
})
|
|
|
},
|
|
@@ -496,6 +532,44 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},1000, true),
|
|
|
+ //权限保存api
|
|
|
+ PermissionSetting: debounce(function (){
|
|
|
+ if (this.checkedCities.length === 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请至少选择一个人!'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var url = "/api/Groups/PermissionSetting"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ userIds: that.checkedCities,
|
|
|
+ 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{
|
|
|
+ that.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.data.msg
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },1000, true),
|
|
|
//保存api
|
|
|
ConferenceAffairsSave: debounce(function (){
|
|
|
this.conferenceAffairsCost.diid = this.conferenceid;
|
|
@@ -530,6 +604,21 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},1000, true),
|
|
|
+ handleCheckAllChange(val) {
|
|
|
+ let allidarr=[];
|
|
|
+ this.cities.forEach((item, index) => {
|
|
|
+ if (val) {
|
|
|
+ allidarr.push(item.id);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ 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;
|
|
|
+ }
|
|
|
},
|
|
|
mounted(){
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
@@ -604,4 +693,8 @@ export default {
|
|
|
color: #909399;
|
|
|
font-weight: 600;
|
|
|
}
|
|
|
+.conferencecost-dialog-btn{
|
|
|
+ text-align: right;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
</style>
|