Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

yuanrf 10 months ago
parent
commit
e192ef5ba2

+ 66 - 5
src/components/Finance/LncomingBills.vue

@@ -58,6 +58,7 @@
                 ref="multipleTable"
                 :data="tableData"
                 style="width: 100%;"
+                :row-style="TableRowStyle"
                 >
                     <el-table-column
                     label="增加方式"
@@ -66,6 +67,7 @@
                             <el-select filterable v-model="scope.row.addingWay">
                                 <el-option label="账单模块" :value=0></el-option>
                                 <el-option label="成本预算模块" :value=1></el-option>
+                                <el-option label="实际报价" :value=2></el-option>
                             </el-select>
                         </template>
                     </el-table-column>
@@ -149,8 +151,20 @@
                     <el-table-column
                     prop="name"
                     label="操 作"
-                    width="100">
+                    width="140">
                         <template slot-scope="scope">
+                            <el-button
+                            v-if="scope.row.status==1"
+                            size="mini"
+                            type="info"
+                            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"
@@ -188,12 +202,13 @@ export default {
             currencyoptions:[],
             groupInfo:{},
             fullscreenLoading:false,
+            jurisdiction:false
         }
     },
     methods:{
         //获取团组
         GetForeignReceivablesDataSources(){
-            var url = "/api/Financial/GetForeignReceivablesDataSources"
+            var url = "/api/Financial/PostGroupReceivablesDataSource"
             var that = this
             this.$axios({
                 method: 'post',
@@ -271,6 +286,34 @@ export default {
                 }
             })
         },
+        //审核
+        PostReceivablesAudit(val){
+            var url = "/api/Financial/PostReceivablesAudit"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data:{
+                    portType: 1,
+                    userId: that.userid,
+                    id: val,
+                    status: 1,
+                }
+            }).then(function (res) {
+                if(res.data.code==200){
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
+                    that.PostGroupReceivablesInfoByDiId();
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
         //获取公司账单列表
         PostReceivablesFeilDownloadInit(){
             var url = "/api/Financial/PostReceivablesFeilDownloadInit"
@@ -405,7 +448,7 @@ export default {
                 }
             }
             if(Savedecides==true){
-                var url = "/api/Financial/PostReceivablesOperate"
+                var url = "/api/Financial/PostReceivablesSave"
                 var that = this
                 this.$axios({
                     method: 'post',
@@ -425,8 +468,7 @@ export default {
                             message: res.data.msg,
                             type: 'success'
                         });
-                        console.log(res)
-                        that.PostGroupReceivablesInfoByDiId()
+                        that.PostGroupReceivablesInfoByDiId();
                     }else{
                         that.$message.error('保存失败!数据异常');
                     }
@@ -435,12 +477,31 @@ export default {
                 this.$message.error('请检查数据是否完整!');
             }
         },
+        //判断id
+        judgmentId(val){
+            if(val==233||val==21||val==20){
+                return true
+            }
+        },
+        //不同换色
+        TableRowStyle({ row, rowIndex }) {
+            // 注意,这里返回的是一个对象
+            let rowBackground = {};
+            if (row.status==1) {
+                rowBackground.background = "#f0f9ff";
+                return rowBackground;
+            }else{
+                rowBackground.background = "#FFFFFF";
+                return rowBackground;
+            }
+        },
     },
     created(){
         this.PostReceivablesFeilDownloadInit();
     },
     mounted(){
         this.userid=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.jurisdiction=this.judgmentId(this.userid)
         this.GetForeignReceivablesDataSources();
         
     },

+ 10 - 10
src/components/OP/CarTouristGuideGroundId.vue

@@ -25,18 +25,18 @@
                 </div>
             </div>
             <div style="margin:10px 0;color:#606266;">
-                <span style="font-weight: bold;font-size:16px;">团队名称:</span>
-                <span style="color:#606266;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
-                <span style="font-weight: bold;font-size:16px;">客户:</span>
-                <span style="color:#606266;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
+                <span style="font-weight: bold;font-size:14px;">团队名称:</span>
+                <span style="color:#606266;font-size:14px;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
+                <span style="font-weight: bold;font-size:14px;">客户:</span>
+                <span style="color:#606266;font-size:14px;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
 }}&nbsp;&nbsp;&nbsp;</span>
-                <span style="font-weight: bold;font-size:16px;">出访国家:</span>
-                <span style="color:#606266;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
-                <span style="font-weight: bold;font-size:16px;">起止日期:</span>
-                <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
+                <span style="font-weight: bold;font-size:14px;">出访国家:</span>
+                <span style="color:#606266;font-size:14px;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
+                <span style="font-weight: bold;font-size:14px;">起止日期:</span>
+                <span style="color:#606266;font-size:14px;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
                 }}&nbsp;&nbsp;&nbsp;</span>
-                <span style="font-weight: bold;font-size:16px;">天数/人数:</span>
-                <span style="color:#606266;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
+                <span style="font-weight: bold;font-size:14px;">天数/人数:</span>
+                <span style="color:#606266;font-size:14px;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
             </div>
 
             <template>

+ 47 - 53
src/components/Resource/OpInvitationOfficialActivityData.vue

@@ -320,65 +320,61 @@ export default {
 
         //点击保存事件
         addBtn() {
-            debugger
-
             const that = this;
             that.OpInvitationOfficialActivityData.createUserId = that.userId
-
             that.$refs.OpInvitationOfficialActivityData.validate((valid) => {
                 if (valid) {
-                    debugger
-                    if (that.uploadFiles.length == 0 || that.uploadFiles[0].name == that.OpInvitationOfficialActivityData.sndFilePath) {
-                        var delegationStr = '';
-                        if(that.OpInvitationOfficialActivityData.delegation){
-                            that.OpInvitationOfficialActivityData.delegation.forEach(function (item, index) {
-                                delegationStr += item + ','
-                            });
-                            that.OpInvitationOfficialActivityData.delegation = delegationStr.substring(0, delegationStr.length - 1)
-                        }
-                        var url = "/api/Resource/OpInvitationOfficialActivity"
-                        that.$axios({
-                            method: 'post',
-                            url: url,
-                            headers: {
-                                Authorization: 'Bearer ' + that.token
-                            },
-                            data: that.OpInvitationOfficialActivityData
-                        }).then(function (res) {
-                            debugger
-                            if (res.data.code == 200) {
-                                console.log(that.OpInvitationOfficialActivityData.delegation);
-                                var delList = that.OpInvitationOfficialActivityData.delegation.split(',')
-                                var delegaLOist = [];
-                                console.log(delList);
-                                if(delList){
-                                    delList.forEach(function (item, index) {
-                                        delegaLOist.push(
-                                            parseInt(item)
-                                        )
-                                    });
-                                    that.OpInvitationOfficialActivityData.delegation = delegaLOist
-                                }
-                                that.$message({
-                                    message: res.data.msg,
-                                    type: 'success'
-                                });
-                                that.loading = true;
-
-                                setTimeout(() => {
-                                    that.$router.push('/home/InvitationOfficialActivityData')
-                                }, 3000);
-                            } else {
-                                that.$message.error(res.data.msg);
-                            }
-                        })
-                    } else {
+                    console.log(that.uploadFiles.length);
+                    console.log(that.uploadFiles);
+                    if (that.uploadFiles.length != 0 && that.uploadFiles[0].name!= that.OpInvitationOfficialActivityData.sndFilePath) {
                         that.$refs.upload.submit();//上传文件到服务器
                     }
+                    var delegationStr = '';
+                    if(that.OpInvitationOfficialActivityData.delegation){
+                        that.OpInvitationOfficialActivityData.delegation.forEach(function (item, index) {
+                            delegationStr += item + ','
+                        });
+                        that.OpInvitationOfficialActivityData.delegation = delegationStr.substring(0, delegationStr.length - 1)
+                    }
+                    var url = "/api/Resource/OpInvitationOfficialActivity"
+                    that.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: that.OpInvitationOfficialActivityData
+                    }).then(function (res) {
+                        if (res.data.code == 200) {
+                            console.log(that.OpInvitationOfficialActivityData.delegation);
+                            var delList = that.OpInvitationOfficialActivityData.delegation.split(',')
+                            var delegaLOist = [];
+                            console.log(delList);
+                            if(delList){
+                                delList.forEach(function (item, index) {
+                                    delegaLOist.push(
+                                        parseInt(item)
+                                    )
+                                });
+                                that.OpInvitationOfficialActivityData.delegation = delegaLOist
+                            }
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'success'
+                            });
+                            that.loading = true;
+
+                            setTimeout(() => {
+                                that.$router.push('/home/InvitationOfficialActivityData')
+                            }, 3000);
+                        } else {
+                            that.$message.error(res.data.msg);
+                        }
+                    })
                 } else {
                     var delList = this.OpInvitationOfficialActivityData.delegation.split(',')
                     var delegaLOist = [];
-                    delList.forEach(function (item, index) {
+                    delList.forEach(function (item, index) { 
                         delegaLOist.push(
                             parseInt(item)
                         )
@@ -399,11 +395,9 @@ export default {
         },
         //文件上传成功时的钩子
         upLoadSuccess(response, file, fileList) {
-            debugger
             if (response.code == 200) {
-                debugger
                 console.log("上传成功");
-                that.$refs.OpInvitationOfficialActivityData.validate((valid) => {
+                this.$refs.OpInvitationOfficialActivityData.validate((valid) => {
                     if (valid) {
                         const that = this;
                         that.OpInvitationOfficialActivityData.filePath = that.OldFile;