소스 검색

地接超支部分代码 添加

yuanrf 7 달 전
부모
커밋
e7c3bb0c5a
3개의 변경된 파일600개의 추가작업 그리고 544개의 파일을 삭제
  1. 172 207
      src/components/Finance/LncomingBills.vue
  2. 211 133
      src/components/Finance/Overspend.vue
  3. 217 204
      src/components/Finance/Overspendedit.vue

+ 172 - 207
src/components/Finance/LncomingBills.vue

@@ -5,47 +5,39 @@
                 <div class="lncomingbill-head-li">
                     <label>团组名称:</label>
                     <el-select style="width:250px" @change="changediid()" v-model="value" filterable placeholder="请选择">
-                        <el-option
-                        v-for="item in options"
-                        :key="item.id"
-                        :label="item.groupName"
-                        :value="item.id">
+                        <el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
                         </el-option>
                     </el-select>
                 </div>
                 <div class="lncomingbill-head-li">
                     <el-button @click="Saveition()" type="primary">保存数据</el-button>
                     <el-select style="width:200px" v-model="valuelist" placeholder="请选择">
-                        <el-option
-                          v-for="item in DownloadInitlist"
-                          :key="item.id"
-                          :label="item.name"
-                          :value="item.id">
+                        <el-option v-for="item in DownloadInitlist" :key="item.id" :label="item.name" :value="item.id">
                         </el-option>
-                      </el-select>
+                    </el-select>
                     <el-button @click="PostReceivablesFeilDownload" type="primary">下 载</el-button>
                 </div>
             </div>
             <div class="lncomingbill-info">
                 <div class="lncomingbill-info-li">
                     <label>团 号:</label>
-                    <span>{{groupInfo.tourCode}}</span>
+                    <span>{{ groupInfo.tourCode }}</span>
                 </div>
                 <div class="lncomingbill-info-li">
                     <label>客 户:</label>
-                    <span>{{groupInfo.clientName}}</span>
+                    <span>{{ groupInfo.clientName }}</span>
                 </div>
                 <div class="lncomingbill-info-li">
                     <label>出访国家:</label>
-                    <span>{{groupInfo.visitCountry|filter_city}}</span>
+                    <span>{{ groupInfo.visitCountry | filter_city }}</span>
                 </div>
                 <div class="lncomingbill-info-li">
                     <label>起止日期:</label>
-                    <span>{{groupInfo.tontractTime|filter_time}}~{{groupInfo.visitDate|filter_time}}</span>
+                    <span>{{ groupInfo.tontractTime | filter_time }}~{{ groupInfo.visitDate | filter_time }}</span>
                 </div>
                 <div class="lncomingbill-info-li">
                     <label>天数/人数:</label>
-                    <span>{{groupInfo.visitDays}}天/{{groupInfo.visitPNumber}}人</span>
+                    <span>{{ groupInfo.visitDays }}天/{{ groupInfo.visitPNumber }}人</span>
                 </div>
             </div>
             <div class="lncomingbill-checked">
@@ -56,123 +48,86 @@
                 </div>
             </div>
             <div class="lncomingbill-form">
-                <el-table
-                :border="true"
-                ref="multipleTable"
-                :data="tableData"
-                style="width: 100%;"
-                :row-style="TableRowStyle"
-                >
-                    <el-table-column
-                    label="增加方式"
-                    width="150">
+                <el-table :border="true" ref="multipleTable" :data="tableData" style="width: 100%;"
+                    :row-style="TableRowStyle">
+                    <el-table-column label="增加方式" width="150">
                         <template slot-scope="scope">
                             <el-select filterable v-model="scope.row.addingWay">
                                 <el-option label="实际报价" :value=2></el-option>
                                 <el-option label="账单模块" :value=0></el-option>
                                 <el-option label="成本预算模块" :value=1></el-option>
+                                <el-option label="超支费用" :value=3></el-option>
                             </el-select>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    prop="createTime"
-                    label="时间"
-                    width="210">
+                    <el-table-column prop="createTime" label="时间" width="210">
                         <template slot-scope="scope">
-                            <el-date-picker
-                            value-format="yyyy-MM-dd"
-                            style="width: 100%;"
-                            v-model="scope.row.createTime"
-                            type="datetime"
-                            format="yyyy-MM-dd HH:mm"
-                            placeholder="选择日期">
+                            <el-date-picker value-format="yyyy-MM-dd" style="width: 100%;"
+                                v-model="scope.row.createTime" type="datetime" format="yyyy-MM-dd HH:mm"
+                                placeholder="选择日期">
                             </el-date-picker>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="单位或其他名称"
-                    width="240">
+                    <el-table-column label="单位或其他名称" width="240">
                         <template slot-scope="scope">
                             <el-input v-model="scope.row.priceName"></el-input>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="单 价"
-                    width="140">
+                    <el-table-column label="单 价" width="140">
                         <template slot-scope="scope">
-                            <el-input-number :controls="false" :precision="2" class="editNum" v-model="scope.row.price"></el-input-number>
+                            <el-input-number :controls="false" :precision="2" class="editNum"
+                                v-model="scope.row.price"></el-input-number>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="数 量"
-                    width="80">
+                    <el-table-column label="数 量" width="80">
                         <template slot-scope="scope">
-                            <el-input  v-model="scope.row.count"></el-input>
+                            <el-input v-model="scope.row.count"></el-input>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="单 位"
-                    width="90">
+                    <el-table-column label="单 位" width="90">
                         <template slot-scope="scope">
                             <el-input v-model="scope.row.unit"></el-input>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="币 种"
-                    width="100">
+                    <el-table-column label="币 种" width="100">
                         <template slot-scope="scope">
                             <el-select filterable v-model="scope.row.currency">
-                                <el-option
-                                        v-for="item in currencyoptions"
-                                        :key="item.id"
-                                        :label="item.name"
-                                        :value="item.id">
+                                <el-option v-for="item in currencyoptions" :key="item.id" :label="item.name"
+                                    :value="item.id">
                                 </el-option>
                             </el-select>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="汇 率"
-                    width="100">
+                    <el-table-column label="汇 率" width="100">
                         <template slot-scope="scope">
-                            <el-input-number  :controls="false" :precision="2" v-model="scope.row.rate"></el-input-number>
+                            <el-input-number :controls="false" :precision="2"
+                                v-model="scope.row.rate"></el-input-number>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    label="应收金额"
-                    width="200">
+                    <el-table-column label="应收金额" width="200">
                         <template slot-scope="scope">
-                            <div class="sub-box">{{scope.row.itemSumPrice=(scope.row.price*scope.row.count*scope.row.rate).toFixed(2)}}</div>
+                            <div class="sub-box">
+                                {{ scope.row.itemSumPrice=(scope.row.price * scope.row.count *
+                                scope.row.rate).toFixed(2) }}
+                            </div>
                         </template>
                     </el-table-column>
-                    <el-table-column    
-                    prop="remark"
-                    label="备注">
+                    <el-table-column prop="remark" label="备注">
                         <template slot-scope="scope">
                             <el-input v-model="scope.row.remark" placeholder="请输入内容"></el-input>
                         </template>
                     </el-table-column>
-                    <el-table-column
-                    prop="name"
-                    label="操 作"
-                    width="140">
+                    <el-table-column prop="name" label="操 作" width="140">
                         <template slot-scope="scope">
+                            <el-button v-if="scope.row.status == 1" size="mini" type="success" title="已确认">
+                                <i class="el-icon-check"></i></el-button>
                             <el-button
-                            v-if="scope.row.status==1"
-                            size="mini"
-                            type="success"
-                            title="已确认">
-                            <i class="el-icon-check"></i></el-button>
-                            <el-button
-                            v-if="scope.row.addingModeName=='实际报价'&&scope.row.status!=1?jurisdiction:false"
-                            size="mini"
-                            type="primary"
-                            @click="PostReceivablesAudit(scope.row.id)">
-                            <i class="el-icon-check"></i></el-button>
-                            <el-button
-                            size="mini"
-                            type="danger"
-                            @click="handleDelete(scope.$index, scope.row,tableData)"><i class="el-icon-delete"></i></el-button>
+                                v-if="scope.row.addingModeName == '实际报价' && scope.row.status != 1 ? jurisdiction : false"
+                                size="mini" type="primary" @click="PostReceivablesAudit(scope.row.id)">
+                                <i class="el-icon-check"></i></el-button>
+                            <el-button size="mini" type="danger"
+                                @click="handleDelete(scope.$index, scope.row, tableData)"><i
+                                    class="el-icon-delete"></i></el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -184,12 +139,12 @@
 export default {
     data() {
         return {
-            userid:'',
-            value:"",
-            valuelist:'',
-            options:[],
-            DownloadInitlist:[],
-            tableData:[
+            userid: '',
+            value: "",
+            valuelist: '',
+            options: [],
+            DownloadInitlist: [],
+            tableData: [
                 // {
                 //     addingModeName:"",
                 //     createTime:"",
@@ -203,15 +158,15 @@ export default {
                 //     remark:"",
                 // }
             ],
-            currencyoptions:[],
-            groupInfo:{},
-            fullscreenLoading:false,
-            jurisdiction:false
+            currencyoptions: [],
+            groupInfo: {},
+            fullscreenLoading: false,
+            jurisdiction: false
         }
     },
-    methods:{
+    methods: {
         //获取团组
-        GetForeignReceivablesDataSources(){
+        GetForeignReceivablesDataSources() {
             var url = "/api/Financial/PostGroupReceivablesDataSource"
             var that = this
             this.$axios({
@@ -220,22 +175,22 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userid
                 },
-                data:{
-                    currUserId:that.userid
+                data: {
+                    currUserId: that.userid
                 }
             }).then(function (res) {
                 console.log(res)
-                that.options=res.data.data.groupNameData;
-                that.currencyoptions=res.data.data.currencyData;
-                that.typeoptions=res.data.data.remittanceMethodData;
-                that.value=res.data.data.groupNameData[0].id;
+                that.options = res.data.data.groupNameData;
+                that.currencyoptions = res.data.data.currencyData;
+                that.typeoptions = res.data.data.remittanceMethodData;
+                that.value = res.data.data.groupNameData[0].id;
                 that.PostGroupReceivablesInfoByDiId();
             })
         },
         //获取收款账单详情
-        PostGroupReceivablesInfoByDiId(){
-            this.tableData=[];
-            this.fullscreenLoading=true;
+        PostGroupReceivablesInfoByDiId() {
+            this.tableData = [];
+            this.fullscreenLoading = true;
             var url = "/api/Financial/PostGroupReceivablesInfoByDiId"
             var that = this
             this.$axios({
@@ -244,27 +199,27 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userid
                 },
-                data:{
+                data: {
                     portType: 1,
                     diId: that.value
                 }
             }).then(function (res) {
                 console.log(res)
-                if(res.data.code){
-                    that.tableData=res.data.data.groupCollectionStatementData;
-                    that.groupInfo=res.data.data.groupInfo;
-                    setTimeout(function(){that.fullscreenLoading=false;},0)
-                }else{
-                    setTimeout(function(){that.fullscreenLoading=false;},0)
+                if (res.data.code) {
+                    that.tableData = res.data.data.groupCollectionStatementData;
+                    that.groupInfo = res.data.data.groupInfo;
+                    setTimeout(function () { that.fullscreenLoading = false; }, 0)
+                } else {
+                    setTimeout(function () { that.fullscreenLoading = false; }, 0)
                 }
-                
+
             })
         },
         //切换团组
-        changediid(){
+        changediid() {
             this.PostGroupReceivablesInfoByDiId()
         },
-        PostReceivablesFeilDownload(){
+        PostReceivablesFeilDownload() {
             var url = "/api/Financial/PostReceivablesFeilDownload"
             var that = this
             this.$axios({
@@ -273,25 +228,25 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + this.token
                 },
-                data:{
+                data: {
                     diId: that.value,
                     fileType: that.valuelist,
                 }
             }).then(function (res) {
-                if(res.data.code==200){
+                if (res.data.code == 200) {
                     that.$message({
                         message: res.data.msg,
                         type: 'success'
                     });
                     console.log(res)
                     window.open(res.data.data.url)
-                }else{
+                } else {
                     that.$message.error(res.data.msg);
                 }
             })
         },
         //审核
-        PostReceivablesAudit(val){
+        PostReceivablesAudit(val) {
             var url = "/api/Financial/PostReceivablesAudit"
             var that = this
             this.$axios({
@@ -300,26 +255,26 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.token
                 },
-                data:{
+                data: {
                     portType: 1,
                     userId: that.userid,
                     id: val,
                     status: 1,
                 }
             }).then(function (res) {
-                if(res.data.code==200){
+                if (res.data.code == 200) {
                     that.$message({
                         message: res.data.msg,
                         type: 'success'
                     });
                     that.PostGroupReceivablesInfoByDiId();
-                }else{
+                } else {
                     that.$message.error(res.data.msg);
                 }
             })
         },
         //获取公司账单列表
-        PostReceivablesFeilDownloadInit(){
+        PostReceivablesFeilDownloadInit() {
             var url = "/api/Financial/PostReceivablesFeilDownloadInit"
             var that = this
             this.$axios({
@@ -329,32 +284,32 @@ export default {
                     Authorization: 'Bearer ' + this.token
                 },
             }).then(function (res) {
-                if(res.data.code==200){
+                if (res.data.code == 200) {
                     // that.$message({
                     //     message: res.data.msg,
                     //     type: 'success'
                     // });
                     console.log(res)
-                    that.DownloadInitlist=res.data.data;
-                }else{
+                    that.DownloadInitlist = res.data.data;
+                } else {
                     that.$message.error(res.data.msg);
                 }
             })
         },
         //添加一行
-        addition(){
-            var newinif={
+        addition() {
+            var newinif = {
                 id: 0,
-                createTime:new Date(),//时间
+                createTime: new Date(),//时间
                 priceName: "",//费用名称
                 price: 0,//费用
                 count: 0,//数量
-                unit:'',//单位
-                itemSumPrice:0,// 单项总和
-                rate:1,// 汇率
-                currency:836,//币种
-                addingWay:2,//添加方式
-                remark:""//备注
+                unit: '',//单位
+                itemSumPrice: 0,// 单项总和
+                rate: 1,// 汇率
+                currency: 836,//币种
+                addingWay: 2,//添加方式
+                remark: ""//备注
             }
             this.tableData.push(newinif)
             // var url = "/api/Financial/PostReceivablesSave"
@@ -385,14 +340,14 @@ export default {
             // })
         },
         //对外收款账单删除
-        handleDelete(index, row,rows) {
+        handleDelete(index, row, rows) {
             this.$confirm('此操作将删除此条数据,是否确认删除?', '提示', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
                 type: 'warning'
             }).then(() => {
-                console.log(index, row,rows)
-                if(row.id==0){
+                console.log(index, row, rows)
+                if (row.id == 0) {
                     this.$message({
                         message: '删除成功',
                         type: 'success'
@@ -408,27 +363,27 @@ export default {
                     headers: {
                         Authorization: 'Bearer ' + this.token
                     },
-                    data:{
-                        userId:that.userid,
-                        id:row.id
+                    data: {
+                        userId: that.userid,
+                        id: row.id
                     }
                 }).then(function (res) {
-                    if(res.data.code==200){
+                    if (res.data.code == 200) {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
                         });
                         rows.splice(index, 1);
-                    }else{
+                    } else {
                         that.$message.error(res.data.msg);
                     }
                 })
             })
         },
         //导入三公费用
-        PostReceivablesImportFee(){
-            this.fullscreenLoading=true;
-            var url = "/api/Financial/PostReceivablesImportFee?groupId="+this.value
+        PostReceivablesImportFee() {
+            this.fullscreenLoading = true;
+            var url = "/api/Financial/PostReceivablesImportFee?groupId=" + this.value
             var that = this
             this.$axios({
                 method: 'post',
@@ -437,45 +392,45 @@ export default {
                     Authorization: 'Bearer ' + this.token
                 },
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.fullscreenLoading=false;
-                    let dataarr=res.data.data;
+                if (res.data.code == 200) {
+                    that.fullscreenLoading = false;
+                    let dataarr = res.data.data;
                     for (let i = 0; i < dataarr.length; i++) {
                         that.tableData.push(dataarr[i]);
                     }
-                }else{
-                    that.fullscreenLoading=false;
+                } else {
+                    that.fullscreenLoading = false;
                     that.$message.error(res.data.msg);
                 }
             })
         },
         //保存收款单
-        Saveition(){
+        Saveition() {
             console.log(this.tableData)
             //提取参数
-            var arrnew = this.tableData.map((item,index) => {
-                return Object.assign({},{
-                    'id':item.id,
-                    'priceName':item.priceName,
-                    'price':item.price,
-                    'count':item.count,
-                    'unit':item.unit,
-                    'itemSumPrice':item.itemSumPrice,
-                    'rate':item.rate,
-                    'currency':item.currency,
-                    'addingWay':item.addingWay,
-                    'remark':item.remark,
+            var arrnew = this.tableData.map((item, index) => {
+                return Object.assign({}, {
+                    'id': item.id,
+                    'priceName': item.priceName,
+                    'price': item.price,
+                    'count': item.count,
+                    'unit': item.unit,
+                    'itemSumPrice': item.itemSumPrice,
+                    'rate': item.rate,
+                    'currency': item.currency,
+                    'addingWay': item.addingWay,
+                    'remark': item.remark,
                 })
             })
             console.log(arrnew)
-            var Savedecides=true
-            for(let g=0;g<arrnew.length;g++){ 
-                if(arrnew[g].currency==""||arrnew[g].itemSumPrice==""||arrnew[g].priceName==""||arrnew[g].unit==""){
-                    Savedecides=false
+            var Savedecides = true
+            for (let g = 0; g < arrnew.length; g++) {
+                if (arrnew[g].currency == "" || arrnew[g].itemSumPrice == "" || arrnew[g].priceName == "" || arrnew[g].unit == "") {
+                    Savedecides = false
                     break
                 }
             }
-            if(Savedecides==true){
+            if (Savedecides == true) {
                 var url = "/api/Financial/PostReceivablesSave"
                 var that = this
                 this.$axios({
@@ -484,30 +439,30 @@ export default {
                     headers: {
                         Authorization: 'Bearer ' + this.token
                     },
-                    data:{
+                    data: {
                         portType: 1,
                         diId: that.value,
-                        userId:that.userid,
-                        foreignReceivablesInfos:arrnew
+                        userId: that.userid,
+                        foreignReceivablesInfos: arrnew
                     }
                 }).then(function (res) {
-                    if(res.data.code==200){
+                    if (res.data.code == 200) {
                         that.$message({
                             message: res.data.msg,
                             type: 'success'
                         });
                         that.PostGroupReceivablesInfoByDiId();
-                    }else{
+                    } else {
                         that.$message.error('保存失败!数据异常');
                     }
                 })
-            }else{
+            } else {
                 this.$message.error('请检查数据是否完整!');
             }
         },
         //判断id
-        judgmentId(val){
-            if(val==233||val==21||val==22){
+        judgmentId(val) {
+            if (val == 233 || val == 21 || val == 22) {
                 return true
             }
         },
@@ -515,36 +470,36 @@ export default {
         TableRowStyle({ row, rowIndex }) {
             // 注意,这里返回的是一个对象
             let rowBackground = {};
-            if (row.status==1) {
+            if (row.status == 1) {
                 rowBackground.background = "#f0f9ff";
                 return rowBackground;
-            }else{
+            } else {
                 rowBackground.background = "#FFFFFF";
                 return rowBackground;
             }
         },
     },
-    created(){
+    created() {
         this.PostReceivablesFeilDownloadInit();
     },
-    mounted(){
-        this.userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
-        this.jurisdiction=this.judgmentId(this.userid)
+    mounted() {
+        this.userid = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.jurisdiction = this.judgmentId(this.userid)
         this.GetForeignReceivablesDataSources();
-        
+
     },
-    filters:{
-        filter_time(value){
+    filters: {
+        filter_time(value) {
             return value;
         },
-        filter_city(value){
+        filter_city(value) {
             return value
         }
     },
 }
 </script>
 <style>
-.lncomingbill-all{
+.lncomingbill-all {
     background-color: #fff;
     padding: 10px;
     box-shadow: 0 0 5px #0005;
@@ -552,13 +507,14 @@ export default {
     height: 100%;
     min-height: 840px;
 }
-.lncomingbill-all .sub-box{
+
+.lncomingbill-all .sub-box {
     -ms-user-select: none;
     -khtml-user-select: none;
     -webkit-user-select: none;
     -moz-user-select: none;
     user-select: none;
-    font-family:"微软雅黑";
+    font-family: "微软雅黑";
     background-color: #FFF;
     background-image: none;
     border-radius: 4px;
@@ -571,45 +527,54 @@ export default {
     line-height: 40px;
     outline: 0;
     padding: 0 15px;
-    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
-    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
-    width: 100%;  
+    -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+    transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
+    width: 100%;
 }
-.lncomingbill-head-li label{
+
+.lncomingbill-head-li label {
     color: #606266;
     font-size: 15px;
     font-weight: 600;
 }
-.lncomingbill-head{
+
+.lncomingbill-head {
     display: flex;
     justify-content: space-between;
 }
-.lncomingbill-info{
+
+.lncomingbill-info {
     display: flex;
     margin-top: 10px;
 }
-.lncomingbill-info-li{
+
+.lncomingbill-info-li {
     margin-right: 30px;
 }
-.lncomingbill-info-li label{
+
+.lncomingbill-info-li label {
     color: #606266;
     font-size: 15px;
     font-weight: 600;
 }
-.lncomingbill-info-li span{
+
+.lncomingbill-info-li span {
     color: #606266;
     font-size: 14px;
 }
-.lncomingbill-all .el-input-number{
+
+.lncomingbill-all .el-input-number {
     width: 100%;
 }
-.lncomingbill-checked{
+
+.lncomingbill-checked {
     margin-top: 10px;
     display: flex;
     align-items: center;
     justify-content: space-between;
 }
-.lncomingbill-form{
+
+.lncomingbill-form {
     margin-top: 10px;
 }
 </style>

+ 211 - 133
src/components/Finance/Overspend.vue

@@ -20,37 +20,37 @@
                 <div class="overspend-info">
                     <div class="overspend-info-li">
                         <label>团 号:</label>
-                        <span>{{headtitle.tourCode}}</span>
+                        <span>{{ headtitle.tourCode }}</span>
                     </div>
                     <div class="overspend-info-li">
                         <label>客 户:</label>
-                        <span>{{headtitle.clientName}}</span>
+                        <span>{{ headtitle.clientName }}</span>
                     </div>
                     <div class="overspend-info-li">
                         <label>出访国家:</label>
-                        <span>{{headtitle.visitCountry}}</span>
+                        <span>{{ headtitle.visitCountry }}</span>
                     </div>
                     <div class="overspend-info-li">
                         <label>起止日期:</label>
-                        <span>{{headtitle.visitStartDate}} ~ {{headtitle.visitStartDate}}</span>
+                        <span>{{ headtitle.visitStartDate }} ~ {{ headtitle.visitStartDate }}</span>
                     </div>
                     <div class="overspend-info-li">
                         <label>天数/人数:</label>
-                        <span>{{headtitle.visitDays}}天/{{headtitle.visitPNumber}}人</span>
+                        <span>{{ headtitle.visitDays }}天/{{ headtitle.visitPNumber }}人</span>
                     </div>
                 </div>
             </div>
             <div>
                 <el-table :data="tableData" border style="width: 100%">
-                    <el-table-column prop="rowNumber" label="序号" width="100">
+                    <el-table-column prop="rowNumber" label="序号" width="60">
                     </el-table-column>
-                    <el-table-column prop="priceName" label="费用名称" width="200">
+                    <el-table-column prop="priceName" label="费用名称" width="180">
                     </el-table-column>
-                    <el-table-column prop="priceTypeStr" label="费用类型" width="300">
+                    <el-table-column prop="priceTypeStr" label="费用类型">
                     </el-table-column>
-                    <el-table-column prop="priceSumStr" label="费用" width="180">
+                    <el-table-column prop="priceSumStr" label="费用" width="120">
                     </el-table-column>
-                    <el-table-column prop="priceStr" label="单价" width="180">
+                    <el-table-column prop="priceStr" label="单价" width="120">
                     </el-table-column>
                     <el-table-column prop="priceCount" label="数量" width="80">
                     </el-table-column>
@@ -58,32 +58,58 @@
                     </el-table-column> -->
                     <el-table-column prop="createUserIdStr" label="操作人" width="90">
                     </el-table-column>
-                    <el-table-column prop="priceDt" label="产生日期" width="160">
+                    <el-table-column prop="priceDt" label="产生日期" width="100">
+                    </el-table-column>
+                    <el-table-column prop="isAuditGMStr" label="主管退费确认" width="120">
+                        <template slot-scope="scope">
+                            <span v-if="scope.row.priceName.indexOf('退餐费(地接导入)') == -1">
+                                ——
+                            </span>
+                            <span v-else>
+                                {{ scope.row.supervisorConfirmStr }}
+                            </span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="isAuditGMStr" label="经理退费确认" width="120">
+                        <template slot-scope="scope">
+                            <span v-if="scope.row.priceName.indexOf('退餐费(地接导入)') == -1">
+                                ——
+                            </span>
+                            <span v-else>
+                                {{ scope.row.managerConfirmStr }}
+                            </span>
+                        </template>
                     </el-table-column>
                     <el-table-column prop="isAuditGMStr" label="是否审核" width="100">
                     </el-table-column>
                     <el-table-column prop="address" label="操作">
                         <template slot-scope="scope">
-                            <el-button @click.native.prevent="revisionbtn(scope.$index,scope.row,tableData)" type="primary"
-                                size="small">
+                            <el-button @click.native.prevent="revisionbtn(scope.$index, scope.row, tableData)"
+                                type="primary" size="small">
                                 编 辑
                             </el-button>
-                            <el-button type="danger" @click.native.prevent="deleteRow(scope.$index,scope.row,tableData)" 
-                                size="small">
+                            <el-button type="danger"
+                                @click.native.prevent="deleteRow(scope.$index, scope.row, tableData)" size="small">
                                 删 除
                             </el-button>
+                            <div v-if="scope.row.priceName.indexOf('退餐费(地接导入)') != -1">
+                                <br />
+                                <el-button v-show="existsUser() == 2"
+                                    @click.native.prevent="changeStatus(2, scope.row.id)" type="primary" size="small">
+                                    主管退费确认
+                                </el-button>
+                                <el-button v-show="existsUser() == 1"
+                                    @click.native.prevent="changeStatus(1, scope.row.id)" type="primary" size="small">
+                                    经理退费确认
+                                </el-button>
+                            </div>
                         </template>
                     </el-table-column>
                 </el-table>
-                <div v-if="dataCount>=10" class="block" style="margin-top: 15px;">
-                    <el-pagination align='center' 
-                        @size-change="handleSizeChange" 
-                        @current-change="handleCurrentChange"
-                        :current-page="pageIndex" 
-                        :page-sizes="[10,12,15,20]" 
-                        :page-size="pageSize" 
-                        layout="total, sizes, prev, pager, next, jumper" 
-                        :total="dataCount">
+                <div v-if="dataCount >= 10" class="block" style="margin-top: 15px;">
+                    <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="pageIndex" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
+                        layout="total, sizes, prev, pager, next, jumper" :total="dataCount">
                     </el-pagination>
                 </div>
             </div>
@@ -93,25 +119,25 @@
 <script>
 export default {
     data() {
-      return {
-        pageId:'',
-        token:'',
-        userId:'',
-        pageIndex:1,
-        pageSize:10,
-        dataCount:0,
-        gname:'',
-        cTable:'',
-        DiId:0,
-        diId:0,
-        tableData: [],
-        options:[],
-        headtitle:{},
-      }
+        return {
+            pageId: '',
+            token: '',
+            userId: '',
+            pageIndex: 1,
+            pageSize: 10,
+            dataCount: 0,
+            gname: '',
+            cTable: '',
+            DiId: 0,
+            diId: 0,
+            tableData: [],
+            options: [],
+            headtitle: {},
+        }
     },
-    methods:{
-         //每页条数改变时触发 选择一页显示多少行
-         handleSizeChange(val) {
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
             this.pageIndex = 1;
             this.pageSize = val;
             this.PostGroupExtraCost_Search()
@@ -122,7 +148,7 @@ export default {
             this.PostGroupExtraCost_Search()
         },
         //获取CTable
-        PostPageLinkCTable(){
+        PostPageLinkCTable() {
             var url = "/api/Business/PostPageLinkCTable"
             var that = this
             this.$axios({
@@ -131,39 +157,39 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    pageId:that.pageId,
+                data: {
+                    pageId: that.pageId,
                 }
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.cTable=res.data.data.cTable;
+                if (res.data.code == 200) {
+                    that.cTable = res.data.data.cTable;
                     //调用可操作的团
                     that.PostGroupListByCTableAndUserId();
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //获取头部描述
-        getheadtitle(){
-            for(let i=0;i<this.options.length;i++){
-                if(this.diId==this.options[i].id){
-                    this.headtitle=this.options[i]
+        getheadtitle() {
+            for (let i = 0; i < this.options.length; i++) {
+                if (this.diId == this.options[i].id) {
+                    this.headtitle = this.options[i]
                 }
             }
         },
         //切换数组
-        changegroup(){
+        changegroup() {
             //调用getheadtitle
             this.getheadtitle();
             //调用获取超支列表
             this.PostGroupExtraCost_Search();
         },
         //获取可操作的团
-        PostGroupListByCTableAndUserId(){
+        PostGroupListByCTableAndUserId() {
             var url = "/api/Business/PostGroupListByCTableAndUserId"
             var that = this
             this.$axios({
@@ -172,37 +198,37 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    pageIndex:1,
-                    pageSize:100000,
-                    cTable:that.cTable,
-                    userId:that.userId
+                data: {
+                    portType: 1,
+                    pageIndex: 1,
+                    pageSize: 100000,
+                    cTable: that.cTable,
+                    userId: that.userId
                 }
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.options=res.data.data;
-                    if(that.diId==0){
-                        if(that.DiId!=that.DiId){
-                            that.diId=that.options[0].id;
-                        }else{
-                            that.diId=that.DiId;
+                if (res.data.code == 200) {
+                    that.options = res.data.data;
+                    if (that.diId == 0) {
+                        if (that.DiId != that.DiId) {
+                            that.diId = that.options[0].id;
+                        } else {
+                            that.diId = that.DiId;
                         }
                     }
                     //调用getheadtitle
                     that.getheadtitle();
                     //调用获取超支列表
                     that.PostGroupExtraCost_Search();
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //获取超支列表
-        PostGroupExtraCost_Search(){
+        PostGroupExtraCost_Search() {
             var url = "/api/Financial/PostGroupExtraCost_Search"
             var that = this
             this.$axios({
@@ -211,26 +237,26 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    pageIndex:that.pageIndex,
-                    pageSize:that.pageSize,
-                    diId:that.diId,
+                data: {
+                    portType: 1,
+                    pageIndex: that.pageIndex,
+                    pageSize: that.pageSize,
+                    diId: that.diId,
                 }
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.dataCount=res.data.data.dataCount
-                    that.tableData=res.data.data.dataList;
-                }else{
+                if (res.data.code == 200) {
+                    that.dataCount = res.data.data.dataCount
+                    that.tableData = res.data.data.dataList;
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //新增
-        addlist(){
+        addlist() {
             this.$router.push({
                 path: "/home/Overspendedit",
                 query: {
@@ -239,7 +265,7 @@ export default {
             })
         },
         //删除
-        deleteRow(index,row, rows) {
+        deleteRow(index, row, rows) {
             this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
                 confirmButtonText: '确定',
                 cancelButtonText: '取消',
@@ -252,11 +278,11 @@ export default {
                     message: '已取消删除'
                 });
             });
-            
+
             // rows.splice(index, 1);
         },
         //生成
-        PostGroupExtraCost_OutputExcel(){
+        PostGroupExtraCost_OutputExcel() {
             var url = "/api/Financial/PostGroupExtraCost_OutputExcel"
             var that = this
             this.$axios({
@@ -265,24 +291,24 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.token
                 },
-                data:{
+                data: {
                     portType: 1,
-                    diId:that.diId
+                    diId: that.diId
                 }
             }).then(function (res) {
                 console.log(res)
-                if(res.data.code==200){
-                   window.open(res.data.data.url)
-                }else{
+                if (res.data.code == 200) {
+                    window.open(res.data.data.url)
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //生成2
-        ExportOverspendExcel(){
+        ExportOverspendExcel() {
             var url = "/api/Financial/ExportOverspendExcel"
             var that = this
             this.$axios({
@@ -291,24 +317,24 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.token
                 },
-                data:{
+                data: {
                     portType: 1,
-                    diId:that.diId
+                    diId: that.diId
                 }
             }).then(function (res) {
                 console.log(res)
-                if(res.data.code==200){
-                   window.open(res.data.data.url)
-                }else{
+                if (res.data.code == 200) {
+                    window.open(res.data.data.url)
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //超支费用api
-        PostGroupExtraCost_Operator(id){
+        PostGroupExtraCost_Operator(id) {
             var url = "/api/Financial/PostGroupExtraCost_Operator"
             var that = this
             this.$axios({
@@ -317,54 +343,99 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    editType:3,
-                    id:id,
-                    diId:that.diId,
-                    priceName:'',
-                    price:0,
-                    priceType:0,
-                    priceDetailType:0,
-                    coefficient:0,
-                    currency:0,
-                    payee:'',
-                    costSign:0,
-                    payType:0,
-                    payCardId:0,
-                    filePath:'',
-                    remark:'',
-                    createUser:that.userId,
-                    priceDt:'',
-                    priceCount:0
+                data: {
+                    portType: 1,
+                    editType: 3,
+                    id: id,
+                    diId: that.diId,
+                    priceName: '',
+                    price: 0,
+                    priceType: 0,
+                    priceDetailType: 0,
+                    coefficient: 0,
+                    currency: 0,
+                    payee: '',
+                    costSign: 0,
+                    payType: 0,
+                    payCardId: 0,
+                    filePath: '',
+                    remark: '',
+                    createUser: that.userId,
+                    priceDt: '',
+                    priceCount: 0
                 }
             }).then(function (res) {
-                if(res.data.code==200){
+                if (res.data.code == 200) {
                     that.$message({
                         message: res.data.msg,
                         type: 'success'
                     });
                     that.PostGroupExtraCost_Search()
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //编辑
-        revisionbtn(index,row, rows){
+        revisionbtn(index, row, rows) {
             this.$router.push({
                 path: "/home/Overspendedit",
                 query: {
                     DiId: this.diId,
-                    Id:row.id
+                    Id: row.id
+                }
+            })
+        },
+        existsUser() {
+            var userid = this.userId;
+            // 王鸽和朱琳是主管确认那个按钮 刘淇是经理确认按钮
+            var jinli = [330];
+            var zhuguan = [149, 334];
+            zhuguan.push(235);
+            var biaoshi = -1;
+            if (userid) {
+                if (jinli.indexOf(userid) != -1) {
+                    biaoshi = 1;
+                } else if (zhuguan.indexOf(userid) != -1) {
+                    biaoshi = 2;
+                }
+            }
+            return biaoshi;
+        },
+        changeStatus(status, id) {
+            var url = "/api/Financial/ReturnPremiumConfirm"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data: {
+                    DataId: id,
+                    ConfirmId: status,
+                    status: 1
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message.success("操作成功!");
+                    //调用获取CTable
+                    that.PostPageLinkCTable();
+                    //调用获取超支列表
+                    that.PostGroupExtraCost_Search();
+                } else {
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning',
+                    });
                 }
             })
         }
     },
-    mounted(){
+    mounted() {
         this.DiId = Number(this.$route.query.DiId);
         this.pageId = localStorage.getItem('indexs').split('-')[1];
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
@@ -377,7 +448,7 @@ export default {
 }
 </script>
 <style>
-.overspend-all{
+.overspend-all {
     background-color: #fff;
     padding: 10px;
     box-shadow: 0 0 5px #0005;
@@ -385,32 +456,39 @@ export default {
     height: 100%;
     min-height: 830px;
 }
-.overspend-info{
+
+.overspend-info {
     display: flex;
 }
-.overspend-info-li{
+
+.overspend-info-li {
     margin-right: 30px;
 }
-.overspend-info-li label{
+
+.overspend-info-li label {
     color: #606266;
     font-size: 15px;
     font-weight: 600;
 }
-.overspend-info-li span{
+
+.overspend-info-li span {
     color: #606266;
     font-size: 14px;
 }
-.name-ipt label{
+
+.name-ipt label {
     color: #606266;
     font-size: 15px;
     font-weight: 600;
 }
-.head-ipt{
+
+.head-ipt {
     display: flex;
     justify-content: space-between;
     margin-bottom: 10px;
 }
-.overspend-head{
+
+.overspend-head {
     margin-bottom: 10px;
 }
 </style>

+ 217 - 204
src/components/Finance/Overspendedit.vue

@@ -4,8 +4,10 @@
             <div class="overspendedit-form">
                 <el-form ref="form" :rules="rules" :model="form" label-width="100px">
                     <el-form-item label="团队名称">
-                        <el-select filterable  @change="getheadtitle" :disabled="disableds" v-model="DiId" placeholder="请选择团队名称">
-                            <el-option v-for="(item,index) in cTablelist" :key="index" :label="item.teamName" :value="item.id"></el-option>
+                        <el-select filterable @change="getheadtitle" :disabled="disableds" v-model="DiId"
+                            placeholder="请选择团队名称">
+                            <el-option v-for="(item, index) in cTablelist" :key="index" :label="item.teamName"
+                                :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
                     <el-form-item label="团 号">
@@ -17,33 +19,33 @@
                     <el-form-item label="出访国家">
                         <el-input disabled v-model="form.countriesVisited"></el-input>
                     </el-form-item>
-                    <el-form-item prop="priceName"  label="费用名称">
+                    <el-form-item prop="priceName" label="费用名称">
                         <el-input v-model="form.priceName"></el-input>
                     </el-form-item>
                     <el-form-item prop="nation" label="地区">
                         <el-select filterable v-model="form.nation" placeholder="请选择地区">
-                            <el-option v-for="(item,index) in nationarr" :key="index" :label="item.country+'-'+item.city" :value="item.id"></el-option>
+                            <el-option v-for="(item, index) in nationarr" :key="index"
+                                :label="item.country + '-' + item.city" :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
                     <el-form-item prop="currency" label="费用金额">
                         <div style="display: flex;justify-content: space-between;">
-                            <el-input-number style="width:60%" :precision="2" placeholder="费用金额" v-model="form.price" :controls='false'>
+                            <el-input-number style="width:60%" :precision="2" placeholder="费用金额" v-model="form.price"
+                                :controls='false'>
                             </el-input-number>
-                            <el-select  style="width:38%" v-model="form.currency" filterable  placeholder="币种">
-                                <el-option v-for="(item,index) in currencyType" :key="index" :label="item.currencyCode" :value="item.currencyId"></el-option>
+                            <el-select style="width:38%" v-model="form.currency" filterable placeholder="币种">
+                                <el-option v-for="(item, index) in currencyType" :key="index" :label="item.currencyCode"
+                                    :value="item.currencyId"></el-option>
                             </el-select>
                         </div>
                     </el-form-item>
                     <el-form-item prop="priceCount" label="数量">
-                        <el-input-number style="width:100%" :precision="0" placeholder="数量" v-model="form.priceCount" :controls='false'>
+                        <el-input-number style="width:100%" :precision="0" placeholder="数量" v-model="form.priceCount"
+                            :controls='false'>
                         </el-input-number>
                     </el-form-item>
                     <el-form-item prop="priceDt" label="产生日期">
-                        <el-date-picker
-                        style="width:100%"
-                        v-model="form.priceDt"
-                        type="date"
-                        placeholder="选择日期">
+                        <el-date-picker style="width:100%" v-model="form.priceDt" type="date" placeholder="选择日期">
                         </el-date-picker>
                     </el-form-item>
                     <el-form-item prop="payee" label="收款方">
@@ -57,26 +59,31 @@
                     </el-form-item>
                     <el-form-item prop="payType" label="支付方式">
                         <el-select v-model="form.payType" placeholder="请选择支付方式">
-                            <el-option v-for="(item,index) in payment" :key="index" :label="item.name" :value="item.id"></el-option>
+                            <el-option v-for="(item, index) in payment" :key="index" :label="item.name"
+                                :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item v-if="form.payType==72" prop="payCardId" label="卡类型:">
+                    <el-form-item v-if="form.payType == 72" prop="payCardId" label="卡类型:">
                         <el-select v-model="form.payCardId" placeholder="请选择卡类型">
-                            <el-option v-for="(item,index) in cardType" :key="index" :label="item.name" :value="item.id"></el-option>
+                            <el-option v-for="(item, index) in cardType" :key="index" :label="item.name"
+                                :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
                     <el-form-item prop="priceType" label="费用类型">
                         <el-select @change="priceTypechanges" v-model="form.priceType" placeholder="请选择费用类型">
-                            <el-option v-for="(item,index) in priceType" :key="index" :label="item.name" :value="item.id"></el-option>
+                            <el-option v-for="(item, index) in priceType" :key="index" :label="item.name"
+                                :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item prop="priceDetailType" v-if="priceDetailTypes.length>0" label="详细类型">
+                    <el-form-item prop="priceDetailType" v-if="priceDetailTypes.length > 0" label="详细类型">
                         <el-select @change="xxtypechange()" v-model="form.priceDetailType" placeholder="请选择详细类型">
-                            <el-option v-for="(item,index) in priceDetailTypes" :key="index" :label="item.name" :value="item.id"></el-option>
+                            <el-option v-for="(item, index) in priceDetailTypes" :key="index" :label="item.name"
+                                :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item v-show="userId==22" prop="coefficient" label="费用系数">
-                        <el-input-number style="width:100%" :precision="2" placeholder="费用系数" v-model="form.coefficient" :controls='false'>
+                    <el-form-item v-show="userId == 22" prop="coefficient" label="费用系数">
+                        <el-input-number style="width:100%" :precision="2" placeholder="费用系数" v-model="form.coefficient"
+                            :controls='false'>
                         </el-input-number>
                     </el-form-item>
                     <el-form-item style="width:100%" label="备注">
@@ -95,41 +102,41 @@
 export default {
     data() {
         return {
-            disableds:true,
-            DiId:'',
-            Id:'',
-            pageId:'',
-            token:'',
-            userId:'',
+            disableds: true,
+            DiId: '',
+            Id: '',
+            pageId: '',
+            token: '',
+            userId: '',
             form: {
-                tourNumber:'',//团号
-                customers:'',//客户
-                countriesVisited:'',//出访国家
-                priceName:'',//费用名称
-                price:0,//金额
-                priceType:'',//费用类型Id
-                priceDetailType:'',//费用详细类型Id
-                coefficient:1,//系数
-                currency:'',//费用币种
-                payee:'',//收款方
-                costSign:'',//费用标识
-                payType:'',//支付方式
-                payCardId:'',//卡类型,支付方式为刷卡时有效
-                filePath:'',//附件路径
-                remark:'',//备注
-                createUser:'',//操作人员
-                priceCount:1,//数量
-                priceDt:'',//产生日期
-                nation:''//国家
+                tourNumber: '',//团号
+                customers: '',//客户
+                countriesVisited: '',//出访国家
+                priceName: '',//费用名称
+                price: 0,//金额
+                priceType: '',//费用类型Id
+                priceDetailType: '',//费用详细类型Id
+                coefficient: 1,//系数
+                currency: '',//费用币种
+                payee: '',//收款方
+                costSign: '',//费用标识
+                payType: '',//支付方式
+                payCardId: '',//卡类型,支付方式为刷卡时有效
+                filePath: '',//附件路径
+                remark: '',//备注
+                createUser: '',//操作人员
+                priceCount: 1,//数量
+                priceDt: '',//产生日期
+                nation: ''//国家
             },
-            nationarr:[],
-            payment:[],
-            priceType:[],
-            priceDetailType:[],
-            priceDetailTypes:[],
-            cardType:[],
-            currencyType:[],
-            cTablelist:[],
+            nationarr: [],
+            payment: [],
+            priceType: [],
+            priceDetailType: [],
+            priceDetailTypes: [],
+            cardType: [],
+            currencyType: [],
+            cTablelist: [],
             rules: {
                 priceName: [
                     { required: true, message: '请输入费用名称', trigger: 'blur' },
@@ -144,7 +151,7 @@ export default {
                     { required: true, message: '请选择费用标识', trigger: 'change' }
                 ],
                 payType: [
-                    {required: true, message: '请选择支付方式', trigger: 'change' }
+                    { required: true, message: '请选择支付方式', trigger: 'change' }
                 ],
                 payCardId: [
                     { required: true, message: '请选择卡类型', trigger: 'change' }
@@ -166,11 +173,11 @@ export default {
                 priceDt: [
                     { required: true, message: '请选择日期费', trigger: 'change' }
                 ],
-                nation:[
-                    {required: true, message: '国家', trigger: 'change'}
+                nation: [
+                    { required: true, message: '国家', trigger: 'change' }
                 ]
             },
-            coefficientarr:[]
+            coefficientarr: []
         }
     },
     methods: {
@@ -178,15 +185,15 @@ export default {
             this.datetime(this.form.priceDt)
         },
         //处理日期
-        datetime(val){
-            var date=new Date(val);
-            var y=date.getFullYear();
-            var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
-            var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
-            return y+'-'+m+'-'+d
+        datetime(val) {
+            var date = new Date(val);
+            var y = date.getFullYear();
+            var m = date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1).toString();
+            var d = date.getDate() >= 10 ? date.getDate() : '0' + (date.getDate()).toString();
+            return y + '-' + m + '-' + d
         },
         //获取国家基础数据
-        OpCarCityResult(){
+        OpCarCityResult() {
             var url = "/api/Groups/OpCarCityResult"
             var that = this
             this.$axios({
@@ -196,27 +203,27 @@ export default {
                     Authorization: 'Bearer '
                 },
             }).then(function (res) {
-                if(res.data.code==200){
-                   that.nationarr=res.data.data;
-                }else{
+                if (res.data.code == 200) {
+                    that.nationarr = res.data.data;
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //切换详细类型
-        xxtypechange(){
+        xxtypechange() {
             console.log(this.form.priceDetailType);
-            for(let i=0;i<this.coefficientarr.length;i++){
-                if(this.form.priceDetailType==this.coefficientarr[i].id){
-                    this.form.coefficient=this.coefficientarr[i].coefficient;
+            for (let i = 0; i < this.coefficientarr.length; i++) {
+                if (this.form.priceDetailType == this.coefficientarr[i].id) {
+                    this.form.coefficient = this.coefficientarr[i].coefficient;
                 }
             }
         },
         //获取系数
-        QueryCoefficientConfig(){
+        QueryCoefficientConfig() {
             var url = "/api/Financial/QueryCoefficientConfig"
             var that = this
             this.$axios({
@@ -227,18 +234,18 @@ export default {
                 },
 
             }).then(function (res) {
-                if(res.data.code==200){
-                   that.coefficientarr=res.data.data;
-                }else{
+                if (res.data.code == 200) {
+                    that.coefficientarr = res.data.data;
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //获取超支基础数据
-        PostGroupExtraCost_ListDataInit(){
+        PostGroupExtraCost_ListDataInit() {
             var url = "/api/Financial/PostGroupExtraCost_ListDataInit"
             var that = this
             this.$axios({
@@ -247,63 +254,63 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
+                data: {
+                    portType: 1,
                 }
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.payment=res.data.data.payment;
-                    that.priceDetailType=res.data.data.priceDetailType;
-                    that.priceType=res.data.data.priceType;
-                    that.cardType=res.data.data.card;
+                if (res.data.code == 200) {
+                    that.payment = res.data.data.payment;
+                    that.priceDetailType = res.data.data.priceDetailType;
+                    that.priceType = res.data.data.priceType;
+                    that.cardType = res.data.data.card;
                     that.OpCarCityResult();
                     that.QueryCoefficientConfig();
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //费用类型changes
-        priceTypechanges(val){
-            this.form.coefficient=1;
-            this.form.priceDetailType='',
-            this.priceDetailTypes=[];
-            var priceDetailTypearr=[];
-            for(var i=0;i<this.priceDetailType.length;i++){
-                if(val+''==this.priceDetailType[i].remark){
+        priceTypechanges(val) {
+            this.form.coefficient = 1;
+            this.form.priceDetailType = '',
+                this.priceDetailTypes = [];
+            var priceDetailTypearr = [];
+            for (var i = 0; i < this.priceDetailType.length; i++) {
+                if (val + '' == this.priceDetailType[i].remark) {
                     priceDetailTypearr.push(this.priceDetailType[i])
                 }
             }
-            this.priceDetailTypes=priceDetailTypearr;
+            this.priceDetailTypes = priceDetailTypearr;
         },
         //费用类型change
-        priceTypechange(val){
+        priceTypechange(val) {
             console.log(val)
             // this.form.priceDetailType='',
-            this.priceDetailTypes=[];
-            var priceDetailTypearr=[];
-            for(var i=0;i<this.priceDetailType.length;i++){
-                if(val+''==this.priceDetailType[i].remark){
+            this.priceDetailTypes = [];
+            var priceDetailTypearr = [];
+            for (var i = 0; i < this.priceDetailType.length; i++) {
+                if (val + '' == this.priceDetailType[i].remark) {
                     priceDetailTypearr.push(this.priceDetailType[i])
                 }
             }
-            this.priceDetailTypes=priceDetailTypearr;
+            this.priceDetailTypes = priceDetailTypearr;
         },
         //获取团号
-        getheadtitle(){
-            for(let i=0;i<this.cTablelist.length;i++){
-                if(this.DiId==this.cTablelist[i].id){
-                    this.form.tourNumber=this.cTablelist[i].tourCode;
-                    this.form.customers=this.cTablelist[i].clientName;
-                    this.form.countriesVisited=this.cTablelist[i].visitCountry;
+        getheadtitle() {
+            for (let i = 0; i < this.cTablelist.length; i++) {
+                if (this.DiId == this.cTablelist[i].id) {
+                    this.form.tourNumber = this.cTablelist[i].tourCode;
+                    this.form.customers = this.cTablelist[i].clientName;
+                    this.form.countriesVisited = this.cTablelist[i].visitCountry;
                 }
             }
         },
         //获取cTable
-        PostPageLinkCTable(){
+        PostPageLinkCTable() {
             var url = "/api/Business/PostPageLinkCTable"
             var that = this
             this.$axios({
@@ -312,26 +319,26 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    pageId:that.pageId,
+                data: {
+                    pageId: that.pageId,
                 }
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.cTable=res.data.data.cTable;
+                if (res.data.code == 200) {
+                    that.cTable = res.data.data.cTable;
                     //调用获取币种、
                     that.PostGroupTeamRateByDiIdAndCTableId()
                     //调用获取可以操作的团
                     that.PostGroupListByCTableAndUserId();
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //获取可操作的团
-        PostGroupListByCTableAndUserId(){
+        PostGroupListByCTableAndUserId() {
             var url = "/api/Business/PostGroupListByCTableAndUserId"
             var that = this
             this.$axios({
@@ -340,28 +347,28 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    pageIndex:1,
-                    pageSize:10000,
-                    cTable:that.cTable,
-                    userId:that.userId
+                data: {
+                    portType: 1,
+                    pageIndex: 1,
+                    pageSize: 10000,
+                    cTable: that.cTable,
+                    userId: that.userId
                 }
             }).then(function (res) {
-                if(res.data.code==200){
-                    that.cTablelist=res.data.data;
+                if (res.data.code == 200) {
+                    that.cTablelist = res.data.data;
                     that.getheadtitle();
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //获取详情
-        PostGroupExtraCost_Detail(){
-            if(this.Id!=this.Id){
+        PostGroupExtraCost_Detail() {
+            if (this.Id != this.Id) {
                 return
             }
             var url = "/api/Financial/PostGroupExtraCost_Detail"
@@ -372,40 +379,40 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    id:that.Id,
+                data: {
+                    portType: 1,
+                    id: that.Id,
                 }
             }).then(function (res) {
-                if(res.data.code){
-                    that.form.coefficient=res.data.data.coefficient;
-                    that.form.payee=res.data.data.payee;
-                    that.form.price=res.data.data.price;
-                    that.form.currency=res.data.data.priceCurrency;
-                    that.form.priceName=res.data.data.priceName;
-                    that.form.priceType=res.data.data.priceType;
-                    that.form.priceDetailType=res.data.data.priceDetailType;
-                    that.form.payType=res.data.data.payDId;
-                    that.form.costSign=res.data.data.orbitalPrivateTransfer+'';
-                    that.form.payCardId=res.data.data.ctdId==0?'':res.data.data.ctdId;
-                    that.form.priceCount=res.data.data.priceCount;
-                    that.form.remark=res.data.data.remark;
-                    that.form.priceDt=res.data.data.priceDt;
-                    that.form.nation=res.data.data.area;
+                if (res.data.code) {
+                    that.form.coefficient = res.data.data.coefficient;
+                    that.form.payee = res.data.data.payee;
+                    that.form.price = res.data.data.price;
+                    that.form.currency = res.data.data.priceCurrency;
+                    that.form.priceName = res.data.data.priceName;
+                    that.form.priceType = res.data.data.priceType;
+                    that.form.priceDetailType = res.data.data.priceDetailType;
+                    that.form.payType = res.data.data.payDId;
+                    that.form.costSign = res.data.data.orbitalPrivateTransfer + '';
+                    that.form.payCardId = res.data.data.ctdId == 0 ? '' : res.data.data.ctdId;
+                    that.form.priceCount = res.data.data.priceCount;
+                    that.form.remark = res.data.data.remark;
+                    that.form.priceDt = res.data.data.priceDt;
+                    that.form.nation = res.data.data.area;
                     that.priceTypechange(that.form.priceType)
 
-                    
+
                     // setTimeout(that.priceTypechange(that.form.priceType),5000)
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //获取币种
-        PostGroupTeamRateByDiIdAndCTableId(){
+        PostGroupTeamRateByDiIdAndCTableId() {
             var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
             var that = this
             this.$axios({
@@ -414,30 +421,30 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    diId:that.DiId,
-                    cTable:that.cTable,
+                data: {
+                    portType: 1,
+                    diId: that.DiId,
+                    cTable: that.cTable,
                 }
             }).then(function (res) {
-                if(res.data.code){
-                    that.currencyType=res.data.data.teamRates;
-                    if(that.currencyType.length==0){
+                if (res.data.code) {
+                    that.currencyType = res.data.data.teamRates;
+                    if (that.currencyType.length == 0) {
                         that.$message({
-                            message:'未设置超支汇率' ,
+                            message: '未设置超支汇率',
                             type: 'warning',
                         });
                     }
-                }else{
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
             })
         },
         //超支费用api
-        PostGroupExtraCost_Operator(){
+        PostGroupExtraCost_Operator() {
             var url = "/api/Financial/PostGroupExtraCost_Operator"
             var that = this
             this.$axios({
@@ -446,38 +453,40 @@ export default {
                 headers: {
                     Authorization: 'Bearer ' + that.userId
                 },
-                data:{
-                    portType:1,
-                    editType:that.Id!=that.Id?1:2,
-                    id:that.Id!=that.Id?0:that.Id,
-                    diId:that.DiId,
-                    priceName:that.form.priceName,
-                    price:that.form.price,
-                    priceType:that.form.priceType,
-                    priceDetailType:that.priceDetailTypes.length!=0?that.form.priceDetailType:0,
-                    coefficient:that.form.coefficient,
-                    currency:that.form.currency,
-                    payee:that.form.payee,
-                    costSign:Number(that.form.costSign),
-                    payType:that.form.payType,
-                    payCardId:that.form.payType==72?that.form.payCardId:0,
-                    filePath:'',
-                    remark:that.form.remark,
-                    createUser:that.userId,
-                    priceCount:that.form.priceCount,
-                    area :that.form.nation,
-                    priceDt:that.datetime(that.form.priceDt),
+                data: {
+                    portType: 1,
+                    editType: that.Id != that.Id ? 1 : 2,
+                    id: that.Id != that.Id ? 0 : that.Id,
+                    diId: that.DiId,
+                    priceName: that.form.priceName,
+                    price: that.form.price,
+                    priceType: that.form.priceType,
+                    priceDetailType: that.priceDetailTypes.length != 0 ? that.form.priceDetailType : 0,
+                    coefficient: that.form.coefficient,
+                    currency: that.form.currency,
+                    payee: that.form.payee,
+                    costSign: Number(that.form.costSign),
+                    payType: that.form.payType,
+                    payCardId: that.form.payType == 72 ? that.form.payCardId : 0,
+                    filePath: '',
+                    remark: that.form.remark,
+                    createUser: that.userId,
+                    priceCount: that.form.priceCount,
+                    area: that.form.nation,
+                    priceDt: that.datetime(that.form.priceDt),
+                    "supervisorConfirm": 1,
+                    "managerConfirm": 1
                 }
             }).then(function (res) {
-                if(res.data.code==200){
+                if (res.data.code == 200) {
                     that.$message({
                         message: res.data.msg,
                         type: 'success'
                     });
-                    setTimeout(that.returnbtn,1000)
-                }else{
+                    setTimeout(that.returnbtn, 1000)
+                } else {
                     that.$message({
-                        message:res.data.msg ,
+                        message: res.data.msg,
                         type: 'warning',
                     });
                 }
@@ -490,14 +499,14 @@ export default {
                     this.PostGroupExtraCost_Operator();
                 } else {
                     this.$message({
-                        message:'请将红框补充完整!',
+                        message: '请将红框补充完整!',
                         type: 'warning',
                     });
                 }
             });
         },
         //返回
-        returnbtn(){
+        returnbtn() {
             this.$router.push({
                 path: "/home/Overspend",
                 query: {
@@ -506,32 +515,32 @@ export default {
             })
         }
     },
-    created(){
+    created() {
         this.pageId = localStorage.getItem('indexs').split('-')[1];
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
         this.DiId = Number(this.$route.query.DiId);
         this.Id = Number(this.$route.query.Id);
-        if(this.Id!=this.Id){
-            this.disableds=false
-        }else{
-            this.disableds=true
+        if (this.Id != this.Id) {
+            this.disableds = false
+        } else {
+            this.disableds = true
         }
         //调用获取超支基础数据
         this.PostGroupExtraCost_ListDataInit();
     },
-    mounted(){
+    mounted() {
         //hguoquctb
         this.PostPageLinkCTable();
         //调用获取详情
         this.PostGroupExtraCost_Detail();
-        
-    }   
+
+    }
 
 }
 </script>
 <style>
-.overspendedit-all{
+.overspendedit-all {
     background-color: #fff;
     padding: 10px;
     box-shadow: 0 0 5px #0005;
@@ -539,19 +548,23 @@ export default {
     height: 100%;
     min-height: 830px;
 }
-.overspendedit-form .el-form-item{
-    width:25%;
-    min-width:370px;
+
+.overspendedit-form .el-form-item {
+    width: 25%;
+    min-width: 370px;
 }
-.overspendedit-form .el-form{
+
+.overspendedit-form .el-form {
     display: flex;
     flex-wrap: wrap;
-    
+
 }
-.overspendedit-form .el-select{
+
+.overspendedit-form .el-select {
     width: 100%;
 }
-.overspendedit-form .el-input-number.is-without-controls .el-input__inner{
+
+.overspendedit-form .el-input-number.is-without-controls .el-input__inner {
     text-align: left;
 }
 </style>.