瀏覽代碼

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

liuhj 11 月之前
父節點
當前提交
f5ebf96cef

+ 136 - 6
src/components/Finance/Cost.vue

@@ -1,6 +1,35 @@
 <template>
     <div class="cost-all" v-loading.fullscreen.lock="costloading">
         <div class="cost-box">
+
+            <el-dialog width="85%" title="地接历史费用" :visible.sync="historyCarDialog" @close="dialogClose">
+                <div style="display: flex;">
+                    <div style="width: 30%;">
+                        <el-input v-model="historyCarInput" placeholder="请输入城市名称"></el-input>
+                    </div>
+                    <div style="width: 2%;"></div>
+                    <div><el-button type="primary" @click="historyCarSearch">搜索</el-button></div>
+                </div>
+                <br/>
+                <!-- @current-change=""  -->
+                <el-table  @current-change="historyCarChange" highlight-current-row border :data="historyCarData.slice((currentPage - 1) * pageSize, currentPage * pageSize)">
+                    <template slot-scope="scope">
+                        <el-table-column v-for="(item,index) in historyCarCloumns"  :property="item.value" :label="item.label" :key="item.value"></el-table-column>
+                    </template>
+                </el-table>
+                <div class="btn-dialog-cost">
+                    <el-button size="small" @click="historyCarYes" type="primary">采用历史的行程数据</el-button>
+                    &nbsp;&nbsp;&nbsp;
+                    <el-button @click="historyCarDialog = false; historyCarSelectObject = {}" size="small">采用现有的自定义数据</el-button>
+                </div>
+                <div class="block">
+                    <el-pagination align='center' @current-change="handleCurrentChange" :current-page="currentPage"
+                        :page-sizes="[5,7,10,20]" :page-size="pageSize" layout="total, sizes, prev, pager, next"
+                        @size-change="handleSizeChange" :total="historyCarData.length">
+                    </el-pagination>
+                </div>
+            </el-dialog>
+
             <el-dialog width="500" title="机票行程数据" :visible.sync="dialogTableVisible">
                 <el-table border :data="gridData">
                     <el-table-column property="day" label="DAY" width="150"></el-table-column>
@@ -100,7 +129,7 @@
                     <div class="ser-btn-li">
                         <el-button size="small" :type="blackCodeIsTrue ? 'primary' : 'danger'"
                             @click="importBlackCode">导入机票行程数据</el-button>
-                        <el-button size="small" type="primary" @click="PostHotelInquiryPageItem">查看酒店询价价格</el-button>
+                        <el-button size="small" :type="hotelIsTrue ? 'primary' : 'danger'" @click="PostHotelInquiryPageItem">查看酒店询价价格</el-button>
                         <!-- <el-button size="small" type="primary">导入收款账单</el-button> -->
                         <el-button size="small" type="primary" @click="GetPriceCheckWord">生成收款账单</el-button>
                         <el-button size="small" type="primary" @click="GetClientWord">导出客户报表</el-button>
@@ -390,6 +419,9 @@
                                     <el-button @click="handleEdit(scope.$index, scope.row, 4)" size="mini"
                                         type="primary">景
                                         点</el-button>
+                                    <el-button style='display:flex' class="history-btn" @click="GetHistoryCarData(scope.$index)" size="mini"
+                                        type="primary">历史数据
+                                    </el-button>
                                 </el-row>
                             </div>
                             <div v-else-if="item.width == 100">
@@ -803,7 +835,7 @@
                 </div>
             </div>
         </div>
-        <el-dialog :title="DialogTitle" :visible.sync="outerVisible" :width="'60%'" :close-on-click-modal="false">
+        <el-dialog :title="DialogTitle" :visible.sync="outerVisible" :width="'60%'" :close-on-click-modal="false" @close="dialogClose">
             <div>
                 <div style="display: flex;">
                     <div style="width: 30%;">
@@ -2741,7 +2773,55 @@ export default {
             tableDatas:[],
             dialogTableVisibleXJ:false,
             checkboxsXJ:[],
-
+            historyCarInput:'',
+            historyCarDialog:false,
+            historyCarData:[],
+            // {
+            //         "value": "id",
+            //         "label": ""
+            //     },
+            historyCarCloumns:[
+                {
+                    "value": "teamName",
+                    "label": "团组名称"
+                },
+                {
+                    "value": "start",
+                    "label": "开始时间"
+                },
+                {
+                    "value": "end",
+                    "label": "结束时间"
+                },
+                {
+                    "value": "area",
+                    "label": "地区"
+                },
+               
+                {
+                    "value": "price",
+                    "label": "总价格"
+                },
+                {
+                    "value": "dayPrice",
+                    "label": "单日价格"
+                },
+                {
+                    "value": "priceName",
+                    "label": "费用名称"
+                },
+                {
+                    "value": "priceContent",
+                    "label": "费用明细"
+                },
+                {
+                    "value": "datePrice",
+                    "label": "费用准确日期"
+                }
+            ],
+            historyCarSelectObject:{},
+            historyCarIndex : -1,
+            hotelIsTrue:false,
         };
     },
     watch: {
@@ -2995,9 +3075,8 @@ export default {
                 this.$message.error('程序异常!');
                 return;
             }
-            if(this.grouptitleinfo.visitCountry.indexOf('、') != -1){
-                this.dialogSearchInput = this.grouptitleinfo.visitCountry;
-            }
+            
+            this.dialogSearchInput = this.grouptitleinfo.visitCountry;
 
             var dataC = this.dialogColumn.filter(x => x.index == buttonIndex);
             if (dataC.length == 0) {
@@ -3657,6 +3736,7 @@ export default {
                         }
                     }
 
+                    that.hotelIsTrue = resp.data.data.hotelIsTrue;
                     that.blackCodeIsTrue = resp.data.data.blackCodeIsTrue;
                     that.GivePeopleNumber();
 
@@ -5706,6 +5786,7 @@ export default {
                     that.dialogTableVisibleXJ =true;
                     that.tableDatas = res.data.data;
                     that.checkboxsXJ = [];
+                    that.hotelIsTrue = res.data.data.length > 0 ? true : false;
                     //console.log(res);
                 } else {
                     that.$message.error(res.data.msg);
@@ -5750,6 +5831,50 @@ export default {
                 this.$message.error("请选择数据!");
             }      
         },
+        GetHistoryCarData(index){
+            this.historyCarInput = this.grouptitleinfo.visitCountry;
+            this.historyCarDialog = true;
+            this.pageSize = 7;
+            this.historyCarIndex = index;
+            this.historyCarSearch();
+        },
+        historyCarSearch(){
+            var url = "/api/Groups/GetHistoryCarData";
+            var that = this;
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data:{
+                    param:this.historyCarInput
+                }
+            }).then(function (res) {
+                that.historyCarData = [];
+                if (res.data.code == 200) {
+                    console.log(res.data.data)
+                    that.historyCarData = res.data.data;
+                } else {
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
+        dialogClose(){
+            this.pageSize = 5;
+            this.currentPage = 1;
+        },
+        historyCarChange(row, oldrow) {
+            //console.log(row, oldrow);
+            this.historyCarSelectObject = row;
+        },
+        historyCarYes(){
+            //console.log(this.historyCarSelectObject,'historyCarSelectObject');
+            if(this.historyCarIndex != -1){
+                this.tableData[this.historyCarIndex].carCost = this.historyCarSelectObject.dayPrice;
+            }
+            this.historyCarDialog = false;
+        }
     },
     updated() {
         this.$emit('transfer', true)
@@ -6142,4 +6267,9 @@ export default {
     margin-top: 20px;
     text-align: right;
 }
+
+.history-btn {
+    display: flex;
+    justify-content: center;
+}
 </style>

+ 12 - 8
src/components/OP/CarTouristGuideGrounContent.vue

@@ -93,7 +93,7 @@
                 <span style="color:#606266;">{{ delegationInfo.visitDate }}&nbsp;&nbsp;&nbsp;</span>
                 <span style="font-weight: bold;">天数/人数:</span>
                 <span style="color:#606266;">{{ delegationInfo.visitDays }}天/{{
-                delegationInfo.visitPNumber }}人</span>
+                    delegationInfo.visitPNumber }}人</span>
             </div>
             <hr style='background-color:#5555; height:1px; border:none;' />
             <div>
@@ -112,8 +112,8 @@
                         </el-table-column>
                         <el-table-column prop="datePrice" label="日期" width="170">
                             <template slot-scope="scope">
-                                <el-date-picker size="small" style="width: 100%;" v-model="scope.row.datePrice"
-                                    type="date" :picker-options="startPickerOptions" value-format="yyyy-MM-dd HH:mm:ss"
+                                <el-date-picker size="small" style="width: 100%;" v-model="scope.row.datePrice" type="date"
+                                    :picker-options="startPickerOptions" value-format="yyyy-MM-dd HH:mm:ss"
                                     placeholder="选择日期">
                                 </el-date-picker>
                             </template>
@@ -151,8 +151,7 @@
                                 <!-- <el-input size="small" style="width: 100%;" placeholder="选择单位" v-model="scope.row.units"
                                     @change="PriceChange"></el-input> -->
                                 <el-select size="small" v-model="scope.row.units" filterable placeholder="选择单位">
-                                    <el-option v-for="item in unitsArr" :key="item.id" :label="item.name"
-                                        :value="item.id">
+                                    <el-option v-for="item in unitsArr" :key="item.id" :label="item.name" :value="item.id">
                                     </el-option>
                                 </el-select>
                             </template>
@@ -223,7 +222,7 @@
                             </div>
                             <div style="width: 75%;text-align: right;">
                                 <el-form-item>
-                                    <el-button type="primary" @click="addBtn">保存</el-button>
+                                    <el-button type="primary" @click="addBtn" :disabled="saveDisabled">保存</el-button>
                                     <el-button @click="EscAdd">取消</el-button>
                                 </el-form-item>
                             </div>
@@ -290,7 +289,8 @@ export default {
             checkList: [],
             sourceList: [],
             ListCount: 1,
-            budgeting: []
+            budgeting: [],
+            saveDisabled: false,
         }
     },
     methods: {
@@ -498,6 +498,7 @@ export default {
                                 })
                             })
 
+                            this.saveDisabled = true;
                             var url = "/api/Groups/OpCarTouristGuideGroundContent"
                             that.$axios({
                                 method: 'post',
@@ -516,7 +517,10 @@ export default {
                                 } else {
                                     that.$message.error(res.data.msg);
                                 }
-                            })
+                            }).finally(() => {
+                                that.saveDisabled = false;
+                            });
+
                         } else {
                             this.$message.error('请完善信息在保存!');
                             return false;

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

@@ -99,7 +99,7 @@
                             <span v-else-if="isPay.row.isPay == 0">未支付</span>
                         </template>
                     </el-table-column>
-                    <el-table-column prop="id" label="详细费用" >
+                    <el-table-column prop="id" label="详细费用" width="110">
                         <template slot-scope="scope">
                             <el-button @click="AddDetails(scope.row.id)" size="small">点击填写</el-button>
                         </template>
@@ -107,10 +107,10 @@
                     <el-table-column label="操作" width="120">
                         <template slot-scope="scope">
                             <!-- <el-button-group> -->
-                                <el-button type="primary" size="mini" icon="el-icon-edit"
-                                    @click="upDate(scope.$index, scope.row)"></el-button>
-                                <el-button style="margin-left: 0px;" type="danger" size="mini" icon="el-icon-delete"
-                                    @click="del(scope.$index, scope.row)"></el-button>
+                            <el-button type="primary" size="mini" icon="el-icon-edit"
+                                @click="upDate(scope.$index, scope.row)"></el-button>
+                            <el-button style="margin-left: 0px;" type="danger" size="mini" icon="el-icon-delete"
+                                @click="del(scope.$index, scope.row)"></el-button>
                             <!-- </el-button-group> -->
                         </template>
                     </el-table-column>
@@ -172,7 +172,7 @@ export default {
             }).then(function (res) {
                 if (res.data.code == 200) {
                     that.delegationInfoList = res.data.data.groupName;
-                    
+
                     if (that.DiId == undefined) {
                         that.delegationInfo = that.delegationInfoList[0]
                         that.DiId = that.delegationInfoList[0].id;
@@ -295,7 +295,7 @@ export default {
                             message: '删除成功',
                             type: 'success'
                         });
-                        that.tableDatas.splice(index,1);
+                        that.tableDatas.splice(index, 1);
                     } else {
                         that.$message.error('删除失败!');
                     }

+ 4 - 4
src/components/OP/EntryDetails.vue

@@ -143,7 +143,8 @@
                             <label>{{item.currencyName}}汇率:</label>
                             <el-input-number size="mini"  :controls="false" :precision="4" v-model="item.rate"></el-input-number>
                         </div>
-                        <el-popover
+                        <span style="color:red;">* 若客户有意见,需要与财务商量后进行适当调整 </span>
+                        <!-- <el-popover
                         placement="top"
                         width="402"
                         trigger="hover">
@@ -152,11 +153,10 @@
                                 <el-table-column width="100" property="rate" label="汇率"></el-table-column>
                                 <el-table-column width="200" property="lastUpdateDt" label="更新时间"></el-table-column>
                             </el-table>
-                            <!-- <el-button slot="reference">click 激活</el-button> -->
                             <span v-show="cubtn" slot="reference" class="redzhu">{{CurrencysRemark}}</span>
                         </el-popover>
                         &nbsp;&nbsp;&nbsp;&nbsp;
-                        <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button>
+                        <el-button v-if="cubtn" @click="adoptRealtime" type="primary" size="mini">采用最新汇率</el-button> -->
                     </div>
                 </div>
                 <div class="Entry-form-li">
@@ -642,7 +642,7 @@ export default {
                 data:{
                     portType: 1
                 }
-            }).then(function (res) {
+            }).then(function (res) {           
                 console.log(res)
                 if(res.data.code==200){
                     that.options=res.data.data.groupNameData;

+ 62 - 2
src/components/OP/OpDecreasePayments.vue

@@ -76,8 +76,17 @@
                     </div>
                     <div style="width: 394px;">
                         <el-form-item label="供应商全称:" prop="supplierName" label-width="160px">
-                            <el-input placeholder="供应商全称" v-model="DecreasePaymentsData.supplierName">
-                            </el-input>
+                            <!-- <el-input placeholder="供应商全称" v-model="DecreasePaymentsData.supplierName">
+                            </el-input> -->
+
+                            <el-autocomplete
+                            style="width: 100%;"
+                            v-model="DecreasePaymentsData.supplierName"
+                            :fetch-suggestions="querySearchAsync"
+                            placeholder="供应商全称"
+                            @select="handleSelect"
+                            ></el-autocomplete>
+                            
                         </el-form-item>
                     </div>
                     <div v-if="eventspd" style="width: 394px;">
@@ -312,6 +321,7 @@ export default {
             supplierRegion:[],
             eventspd:true,
             fullscreenLoading:false,
+            queryArr : [],
         }   
     },
 
@@ -653,6 +663,56 @@ export default {
             })
 
 
+        },
+        handleSelect(item){
+            //console.log('handleSelect',item);
+            var id = item.id;
+            var that = this;
+
+            try {
+                this.queryArr.forEach((item)=>{
+                    if(item.id==id){
+                        that.DecreasePaymentsData.supplierAddress = item.supplierAddress;
+                        that.DecreasePaymentsData.supplierArea = item.supplierArea;
+                        that.DecreasePaymentsData.supplierContact = item.supplierContact;
+                        that.DecreasePaymentsData.supplierContactNumber = item.supplierContactNumber;
+                        that.DecreasePaymentsData.supplierEmail = item.supplierEmail;
+                        that.DecreasePaymentsData.supplierName = item.supplierName;
+                        that.DecreasePaymentsData.supplierSocialAccount = item.supplierSocialAccount;
+                        that.DecreasePaymentsData.supplierTypeId = item.supplierTypeId;
+                        throw new Error('stop');
+                    }
+                })
+            } catch (error) {
+                if(error.message == 'stop'){
+                    return;
+                }else{
+                    console.error(error.message);
+                }
+            }
+
+        },
+        querySearchAsync(queryString, cb) {
+            var url = "/api/Groups/QueryAssociateSupplier"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data: {
+                    "param": queryString
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    cb(res.data.data.map(x=>{return{
+                        value: x.supplierName,
+                        id: x.id
+                    }}));
+                    that.queryArr = res.data.data;
+                }
+            })
         }
 
     },