Parcourir la source

联想功能及ai绩效分析团组更改为年为单位

liuhj il y a 4 semaines
Parent
commit
f23a80b2de

+ 59 - 27
src/components/Finance/ExpenseReview.vue

@@ -74,35 +74,42 @@
             </div>
         </el-dialog>
         <div class="group-list">
+            <div class="group-box">
+                <el-select style="width:120px" v-model="value" clearable placeholder="请选择" @change="filterStatus(value)">
+                    <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                </el-select>
+                <el-select style="width:300px;margin-left: 10px;" v-model="input" clearable filterable remote :remote-method="GroupItemKeywordSearch" :loading="selectLoading" @change="Inquireclick()" placeholder="请选择">
+                    <el-option
+                    v-for="item in inputArr"
+                    :key="item.id"
+                    :label="item.teamName+' '+item.clientUnit+' '+item.clientName"
+                    :value="item.teamName">
+                    </el-option>
+                </el-select>
+                <el-button 
+                v-if="jurisdiction&&userid==21"
+                style="margin-right: 10px;"
+                type="primary"
+                title="最近费用"
+                @click="Recentexpenses()">近期未审核费用</el-button>
+                <!-- <el-input
+                style="width:300px;"
+                placeholder="请输入查询内容"
+                v-model="input"
+                clearable>
+                </el-input> -->
+                <!-- <el-button 
+                type="primary"
+                size=""
+                @click="Inquireclick()">查 询</el-button> -->
+            </div>
             <div class="group-title">
                 <div>团组列表</div>
-                <div class="group-box">
-                    <el-button 
-                    v-if="jurisdiction&&userid==21"
-                    style="margin-right: 10px;"
-                    type="primary"
-                    title="最近费用"
-                    @click="Recentexpenses()">近期未审核费用</el-button>
-                    <el-select style="width:120px" v-model="value" clearable placeholder="请选择" @change="filterStatus(value)">
-                        <el-option
-                        v-for="item in options"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
-                        </el-option>
-                    </el-select>
-                    <el-input
-                    style="width:300px;"
-                    placeholder="请输入查询内容"
-                    v-model="input"
-                    clearable>
-                    </el-input>
-                    <el-button 
-                    type="primary"
-                    size=""
-                    title="查看费用清单"
-                    @click="Inquireclick()">查 询</el-button>
-                </div>
             </div>
             <template>
                 <el-table
@@ -228,6 +235,8 @@ export default {
             pageSize: 12 ,// 每页的数据条数
             count:0,//总数
             input:'',
+            inputArr: [],
+            selectLoading: false,
             token:'',
             fullscreenLoading:false,
             userid:'',
@@ -283,6 +292,29 @@ export default {
         }
     },
     methods:{
+        //搜索提示
+        GroupItemKeywordSearch(query) {
+            if (query !== '') {
+                this.selectLoading=true;
+                var url = "/api/Groups/GroupItemKeywordSearch?keyword=" + query
+                var that = this
+                this.$axios({
+                    method: 'get',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.inputArr = res.data.data;
+                    }else{
+                        that.inputArr=[];
+                    }
+                }).finally(()=>{
+                    that.selectLoading=false;
+                })
+            }
+        },
         //分页api
         PostGroupPageList(){
             var url = "/api/Groups/PostExpenseAuditGroupPageItems"

+ 40 - 2
src/components/OP/EntryDetails.vue

@@ -23,8 +23,8 @@
             <div class="Entry-head">
                 <div class="Entry-head-li">
                     <label>团组名称:</label>
-                    <el-select style="width:250px" @change="chengvalue" v-model="value" filterable placeholder="请选择">
-                        <el-option v-for="item in options" :key="item.id" :label="item.groupName" :value="item.id">
+                    <el-select style="width:250px" @change="chengvalue" v-model="value" filterable :filter-method="advancedFilter" placeholder="请选择">
+                        <el-option v-for="item in filteredOptions" :key="item.id" :label="item.groupName" :value="item.id">
                             <span v-if="item.isNull=='false'" style="color:#409EFF">{{ item.groupName }}</span>
                             <span v-else style="color:gray">{{ item.groupName }}</span>
                         </el-option>
@@ -630,6 +630,8 @@ export default {
 
 
             options: [],
+            filteredOptions: [],
+            searchMode: 'character', // 'character': 字符匹配, 'fuzzy': 模糊匹配
             listvalue: 1005,
             tablevalue: '',
             listvalueoptions: [],
@@ -742,6 +744,41 @@ export default {
         }
     },
     methods: {
+        advancedFilter(query) {
+            if (!query || query.trim() === '') {
+                this.filteredOptions = [...this.options];
+                return;
+            }
+
+            const trimmedQuery = query.trim();
+
+            if (this.searchMode === 'character') {
+                // 字符匹配模式:每个字都必须包含
+                this.characterMatchFilter(trimmedQuery);
+            } else {
+                // 模糊匹配模式(默认的filterable行为)
+                this.fuzzyMatchFilter(trimmedQuery);
+            }
+        },
+
+        /*** 严格的字符匹配 - 每个查询字符都必须出现*/
+        characterMatchFilter(query) {
+            const queryChars = query.split('').filter(char => char.trim() !== '');
+
+            this.filteredOptions = this.options.filter(item => {
+                const groupName = item.groupName || '';
+                return queryChars.every(char => groupName.includes(char));
+            });
+        },
+        /*** 模糊匹配 - 包含整个查询字符串即可*/
+        fuzzyMatchFilter(query) {
+            const lowerQuery = query.toLowerCase();
+            this.filteredOptions = this.options.filter(item => {
+                const groupName = (item.groupName || '').toLowerCase();
+                return groupName.includes(lowerQuery);
+            });
+        },
+
         //baoliuliangweixiaoshu
         reservetwo(value) {
             // 截取当前数据到小数点后两位
@@ -764,6 +801,7 @@ export default {
             }).then(function (res) {
                 if (res.data.code == 200) {
                     that.options = res.data.data.groupNameData;
+                    that.filteredOptions = that.options;
                     that.currencys = res.data.data.currencyInit;
                     that.viewUsersarr= res.data.data.viewPermissionData;
                     if (that.value == null) {

+ 7 - 2
src/components/OP/EntryDetailsdraft.vue

@@ -737,11 +737,16 @@ export default {
         },
         createFilter(queryString) {
             return (restaurant) => {
-                return restaurant.value.replace("  ", "").toLowerCase().match(queryString.toLowerCase());
+                // 每个字符都包含的匹配逻辑
+                const searchText = queryString.toLowerCase();
+                const itemText = restaurant.value.toLowerCase();
+
+                // 检查查询字符串中的每个字符是否都出现在项目文本中
+                return Array.from(searchText).every(char => itemText.includes(char));
             };
         },
         handleSelect(item) {
-            this.value=item.id;
+            this.value = item.id;
             this.GetEnterExitCostInfobyDiId();
             this.PostGroupTeamRateByDiIdAndCTableId();
         },

+ 45 - 3
src/components/OP/GroupsTaskAssignment.vue

@@ -3,7 +3,7 @@
         <div class="communal-title">
             <div>团组任务分配</div>
         </div>
-        <el-dialog title="批量分配" :visible.sync="batchVisible"  close-on-click-modal="false">
+        <el-dialog title="批量分配" :visible.sync="batchVisible"  :close-on-click-modal="false">
             <el-form ref="batch" :rules="batchs" :model="batch">
                 <div class="batchbox">
                     <el-form-item prop="TimePeriod" label="时间段" :label-width="formLabelWidth">
@@ -49,9 +49,9 @@
         <div class="konzh" style="display: flex;justify-content: space-between;">
             <el-form style="display: flex;" label-width="70px" class="demo-form-inline">
                 <el-form-item style="width: 300px;margin-right: 20px;" label="团组名称">
-                    <el-select v-model="diId" filterable clearable placeholder="请选择" style="width:230px;"
+                    <el-select v-model="diId" filterable :filter-method="advancedFilter" clearable placeholder="请选择" style="width:230px;"
                         @change="diidChange()">
-                        <el-option v-for="item1 in delegationInfos" :key=item1.id :label=item1.name
+                        <el-option v-for="item1 in delegationInfoss" :key=item1.id :label=item1.name
                             :value=item1.id></el-option>
                     </el-select>
                 </el-form-item>
@@ -171,6 +171,8 @@ export default {
             token: '',
             userId: 0,
             delegationInfos: [],
+            delegationInfoss: [],
+            searchMode: 'character', // 'character': 字符匹配, 'fuzzy': 模糊匹配
             setData: [],
             user: [],
             diId: '',
@@ -203,6 +205,42 @@ export default {
         }
     },
     methods: {
+        advancedFilter(query) {
+            console.log(query);
+            
+            if (!query || query.trim() === '') {
+                this.delegationInfoss = [...this.delegationInfos];
+                return;
+            }
+
+            const trimmedQuery = query.trim();
+
+            if (this.searchMode === 'character') {
+                // 字符匹配模式:每个字都必须包含
+                this.characterMatchFilter(trimmedQuery);
+            } else {
+                // 模糊匹配模式(默认的filterable行为)
+                this.fuzzyMatchFilter(trimmedQuery);
+            }
+        },
+
+        /*** 严格的字符匹配 - 每个查询字符都必须出现*/
+        characterMatchFilter(query) {
+            const queryChars = query.split('').filter(char => char.trim() !== '');
+
+            this.delegationInfoss = this.delegationInfos.filter(item => {
+                const groupName = item.name || '';
+                return queryChars.every(char => groupName.includes(char));
+            });
+        },
+        /*** 模糊匹配 - 包含整个查询字符串即可*/
+        fuzzyMatchFilter(query) {
+            const lowerQuery = query.toLowerCase();
+            this.delegationInfoss = this.delegationInfos.filter(item => {
+                const groupName = (item.name || '').toLowerCase();
+                return groupName.includes(lowerQuery);
+            });
+        },
         GetTaskAssignmen() {
             this.fullscreenLoading=true;
             var that = this
@@ -217,6 +255,10 @@ export default {
                 console.log(res)
                 if (res.data.code == 200) {
                     that.delegationInfos = res.data.data.delegationInfos;
+                    that.delegationInfoss = that.delegationInfos;
+                    console.log(that.delegationInfoss);
+                    console.log(that.delegationInfos);
+                    
                     that.diId=res.data.data.delegationInfos[0].id;
                     that.setData = res.data.data.setData;
                     that.ctId=res.data.data.setData[0].id;

+ 36 - 3
src/components/OP/OPgroup.vue

@@ -35,9 +35,17 @@
                             :value="item.id">
                         </el-option>
                     </el-select>
-                    <el-input style="width:200px;" placeholder="请输入查询内容" v-model="input" clearable>
-                    </el-input>
-                    <el-button @click="Inquireclick()" type="primary">查 询</el-button>
+                    <el-select  v-model="input" clearable filterable remote :remote-method="GroupItemKeywordSearch" :loading="selectLoading" @change="Inquireclick()" placeholder="请选择">
+                        <el-option
+                        v-for="item in inputArr"
+                        :key="item.id"
+                        :label="item.teamName+' '+item.clientUnit+' '+item.clientName"
+                        :value="item.teamName">
+                        </el-option>
+                    </el-select>
+                    <!-- <el-input style="width:200px;" placeholder="请输入查询内容" v-model="input" clearable>
+                    </el-input> -->
+                    <!-- <el-button  type="primary">查 询</el-button> -->
                 </div>
                 <div>
                     <el-button v-if="evocationdownloadqx" @click="evocationdownload" type="primary">团组清单下载</el-button>
@@ -183,6 +191,8 @@ export default {
             currentPage: 1, // 当前页码
             pageSize: 10,// 每页的数据条数
             input: '',
+            inputArr: [],
+            selectLoading: false,
             token: '',
             fullscreenLoading: false,
             userid: '',
@@ -253,6 +263,29 @@ export default {
             let time = y + '-' + m + '-' + d;
             return time
         },
+        //搜索提示
+        GroupItemKeywordSearch(query) {
+            if (query !== '') {
+                this.selectLoading=true;
+                var url = "/api/Groups/GroupItemKeywordSearch?keyword=" + query
+                var that = this
+                this.$axios({
+                    method: 'get',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.inputArr = res.data.data;
+                    }else{
+                        that.inputArr=[];
+                    }
+                }).finally(()=>{
+                    that.selectLoading=false;
+                })
+            }
+        },
         //分页api
         PostGroupPageList() {
             var url = "/api/Groups/PostGroupPageList"

+ 39 - 2
src/components/OP/PickupList.vue

@@ -34,9 +34,9 @@
             <div class="pickuplist-head">
                 <div class="pickuplist-head-li">
                     <label>团组名称:</label>
-                    <el-select style="width:220px" @change="delegationSelectChange" v-model="diId" clearable filterable
+                    <el-select style="width:220px" @change="delegationSelectChange" v-model="diId" clearable filterable :filter-method="advancedFilter"
                         placeholder="请选择">
-                        <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.groupName"
+                        <el-option v-for="item in delegationInfoLists" :key="item.id" :label="item.groupName"
                             :value="item.id">
                         </el-option>
                     </el-select>
@@ -470,6 +470,8 @@ export default {
             userId: '',
             diId: '',
             delegationInfoList: [],
+            delegationInfoLists: [],
+            searchMode: 'character', // 'character': 字符匹配, 'fuzzy': 模糊匹配
             tableData: [],
             GroupInfo: {},
             cangweiType: [],//舱位类型
@@ -539,6 +541,40 @@ export default {
         }
     },
     methods: {
+        advancedFilter(query) {
+            if (!query || query.trim() === '') {
+                this.delegationInfoLists = [...this.delegationInfoList];
+                return;
+            }
+
+            const trimmedQuery = query.trim();
+
+            if (this.searchMode === 'character') {
+                // 字符匹配模式:每个字都必须包含
+                this.characterMatchFilter(trimmedQuery);
+            } else {
+                // 模糊匹配模式(默认的filterable行为)
+                this.fuzzyMatchFilter(trimmedQuery);
+            }
+        },
+
+        /*** 严格的字符匹配 - 每个查询字符都必须出现*/
+        characterMatchFilter(query) {
+            const queryChars = query.split('').filter(char => char.trim() !== '');
+
+            this.delegationInfoLists = this.delegationInfoList.filter(item => {
+                const groupName = item.groupName || '';
+                return queryChars.every(char => groupName.includes(char));
+            });
+        },
+        /*** 模糊匹配 - 包含整个查询字符串即可*/
+        fuzzyMatchFilter(query) {
+            const lowerQuery = query.toLowerCase();
+            this.delegationInfoLists = this.delegationInfoList.filter(item => {
+                const groupName = (item.groupName || '').toLowerCase();
+                return groupName.includes(lowerQuery);
+            });
+        },
         //姓提示
         querySearch(queryString, cb) {
             var restaurants = this.restaurants;
@@ -769,6 +805,7 @@ export default {
             }).then(function (res) {
                 if (res.data.code == 200) {
                     that.delegationInfoList = res.data.data;
+                    that.delegationInfoLists = res.data.data;
                     if (that.$route.query.id!=undefined) {
                         that.diId=Number(that.$route.query.id);
                     }else{

+ 41 - 2
src/components/OP/backwardtabke.vue

@@ -4,9 +4,9 @@
             <div class="backward-head">
                 <div class="backward-head-li">
                     <label>团组名称:</label>
-                    <el-select @change="changegroup" style="width:250px" v-model="value" filterable
+                    <el-select @change="changegroup" style="width:250px" v-model="value" filterable :filter-method="advancedFilter"
                         placeholder="请选择">
-                        <el-option v-for="item in options" :key="item.id" :label="item.teamName" :value="item.id">
+                        <el-option v-for="item in filteredOptions" :key="item.id" :label="item.teamName" :value="item.id">
                         </el-option>
                     </el-select>
                 </div>
@@ -250,6 +250,8 @@ export default {
             token:'',
             value:'',
             options:[],
+            filteredOptions: [],
+            searchMode: 'character', // 'character': 字符匹配, 'fuzzy': 模糊匹配
             groupinfo:{},
             value1:'',
             radio:'1',
@@ -310,6 +312,40 @@ export default {
         }   
     },
     methods:{
+        advancedFilter(query) {
+            if (!query || query.trim() === '') {
+                this.filteredOptions = [...this.options];
+                return;
+            }
+
+            const trimmedQuery = query.trim();
+
+            if (this.searchMode === 'character') {
+                // 字符匹配模式:每个字都必须包含
+                this.characterMatchFilter(trimmedQuery);
+            } else {
+                // 模糊匹配模式(默认的filterable行为)
+                this.fuzzyMatchFilter(trimmedQuery);
+            }
+        },
+
+        /*** 严格的字符匹配 - 每个查询字符都必须出现*/
+        characterMatchFilter(query) {
+            const queryChars = query.split('').filter(char => char.trim() !== '');
+
+            this.filteredOptions = this.options.filter(item => {
+                const groupName = item.teamName || '';
+                return queryChars.every(char => groupName.includes(char));
+            });
+        },
+        /*** 模糊匹配 - 包含整个查询字符串即可*/
+        fuzzyMatchFilter(query) {
+            const lowerQuery = query.toLowerCase();
+            this.filteredOptions = this.options.filter(item => {
+                const groupName = (item.teamName || '').toLowerCase();
+                return groupName.includes(lowerQuery);
+            });
+        },
         //获取团组list
         GetGroupNameList() {
             var url = "/api/Groups/PostInvertedListInit"
@@ -326,6 +362,9 @@ export default {
             }).then(function (res) {
                 if (res.data.code == 200) {
                     that.options=res.data.data.groupData;
+                    that.filteredOptions= that.options;
+                    console.log(that.filteredOptions);
+                    
                     that.value=that.options[0].id;
                     that.officialTypeData=res.data.data.officialTypeData;
                     that.visaTypeData=res.data.data.visaTypeData;

+ 5 - 3
src/components/OP/performanceanalysis.vue

@@ -5,7 +5,7 @@
             <div id="pdfDom">
                 <div style="margin-bottom: 40px;" v-html="marktext" class="markdownyangshi markdown-body"></div>
                 <el-table :data="SCgridData" border>
-                    <el-table-column prop="rowNumber" label="序号" width="50">
+                    <el-table-column prop="rowNumber" label="序号" width="60">
                     </el-table-column>
                     <el-table-column prop="teamName" label="团组名">
                     </el-table-column>
@@ -310,8 +310,10 @@ export default {
             var lastDay = new Date(new_year, new_month, 0).getDate();
             var mon = (new_month < 10 ? '0' : '') + new_month;
             var startDateDay = ('0' + firstDay.getDate()).slice(-2);
-            var startDate = new_year + '-' + mon + '-' + startDateDay;
-            var endDate = new_year + '-' + mon + '-' + lastDay; 
+            // var startDate = new_year + '-' + mon + '-' + startDateDay;
+            // var endDate = new_year + '-' + mon + '-' + lastDay; 
+            var startDate = new_year + '-01-01';
+            var endDate = new_year + '-12-31'; 
             var url = "/api/PersonnelModule/AiPerformanceAnalysis_GroupStatistics?userId="+val.id+"&start="+startDate+"&end="+endDate
             var that = this
             this.$axios({

+ 55 - 22
src/components/statistics/Groupreports.vue

@@ -1,30 +1,38 @@
 <template>
     <div v-loading="fullscreenLoading">
         <div class="reports-list">
+            <div class="reports-box">
+                <el-select v-model="value" clearable placeholder="请选择" @change="filterStatus(value)">
+                    <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                    </el-option>
+                </el-select>
+                <el-select style="width:300px;margin-left: 10px;" v-model="input" clearable filterable remote :remote-method="GroupItemKeywordSearch" :loading="selectLoading" @change="Inquireclick()" placeholder="请选择">
+                    <el-option
+                    v-for="item in inputArr"
+                    :key="item.id"
+                    :label="item.teamName+' '+item.clientUnit+' '+item.clientName"
+                    :value="item.teamName">
+                    </el-option>
+                </el-select>
+                <!-- <el-input
+                style="width:200px;"
+
+                placeholder="请输入查询内容"
+                v-model="input"
+                clearable>
+                </el-input>
+                <el-button 
+                type="primary"
+                size=""
+                title="查看费用清单"
+                @click="Inquireclick()">查 询</el-button> -->
+            </div>
             <div class="reports-title">
                 <div>团组列表</div>
-                <div class="reports-box">
-                    <el-select v-model="value" clearable placeholder="请选择" @change="filterStatus(value)">
-                        <el-option
-                        v-for="item in options"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
-                        </el-option>
-                    </el-select>
-                    <el-input
-                    style="width:200px;"
-
-                    placeholder="请输入查询内容"
-                    v-model="input"
-                    clearable>
-                    </el-input>
-                    <el-button 
-                    type="primary"
-                    size=""
-                    title="查看费用清单"
-                    @click="Inquireclick()">查 询</el-button>
-                </div>
             </div>
             <template>
                 <el-table
@@ -163,12 +171,37 @@ export default {
             pageSize: 10 ,// 每页的数据条数
             count:0,//总数
             input:'',
+            inputArr: [],
+            selectLoading: false,
             token:'',
             fullscreenLoading:false,
             userid:''
         }
     },
     methods:{
+        //搜索提示
+        GroupItemKeywordSearch(query) {
+            if (query !== '') {
+                this.selectLoading=true;
+                var url = "/api/Groups/GroupItemKeywordSearch?keyword=" + query
+                var that = this
+                this.$axios({
+                    method: 'get',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.inputArr = res.data.data;
+                    }else{
+                        that.inputArr=[];
+                    }
+                }).finally(()=>{
+                    that.selectLoading=false;
+                })
+            }
+        },
         //分页api
         PostGroupPageList(){
             var url = "/api/Statistics/PostGroupStatementItems"