瀏覽代碼

三公刷新赋值计算

liuhj 14 小時之前
父節點
當前提交
acb4853923
共有 2 個文件被更改,包括 62 次插入2 次删除
  1. 31 1
      src/components/OP/EntryDetails.vue
  2. 31 1
      src/components/OP/EntryDetailsdraft.vue

+ 31 - 1
src/components/OP/EntryDetails.vue

@@ -24,7 +24,10 @@
             <el-dialog  width="1600px" title="交通费详细" :visible.sync="TransportationVisible" :close-on-click-modal="false">
                 <div style="display: flex;justify-content: space-between;align-items: center;margin: 5px 0;">
                     <div>接送机(合计):{{ numFilters(Transportationdatatotal) }}&nbsp;CNY</div>
-                    <el-button size="mini" @click="addTransportationdata" type="primary">添加一行</el-button>
+                    <div>
+                        <el-button size="mini" @click="RefreshInterval" type="primary">刷新城市区间费标准</el-button>
+                        <el-button size="mini" @click="addTransportationdata" type="primary">添加一行</el-button>
+                    </div>
                 </div>
                 <el-table border :data="Transportationdata">
                     <el-table-column property="no" label="序号" width="50"></el-table-column>
@@ -3266,6 +3269,33 @@ export default {
                 remark: ""
             });
         },
+        //刷新城市区间费标准(保存后刷新,数据修改重新赋值计算)
+        RefreshInterval(){
+            this.GetEnterExitCostOVByGroupId();
+            var that=this;
+            this.$confirm('刷新可能标准会有修改与之前的金额会有不同请注意查看!且刷新只是重新计算并未保存重新计算后的值!是否继续操作?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                for (let i = 0; i < that.Transportationdata.length; i++) {
+                    var obj = {}
+                    obj = that.fulecao.find(function (item, indexs) {
+                        return item.id === that.Transportationdata[i].ovId
+                    })
+                    this.Transportationdata[i].cost = obj.price;
+                    this.Transportationdata[i].otherCost = obj.otherPrice;
+                    this.Transportationdata[i].guideCost = obj.guidePrice;
+                    this.Transportationdata[i].currencyName = obj.currencyName
+                    this.UrbanModify(this.Transportationdata[i], this.Transportationdata[i].currencyName)
+                }
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消操作'
+                });
+            });
+        },
         //城市交通费保存
         GetEnterExitCostOVFeeSave() {
             for(let i=0;i<this.Transportationdata.length;i++){

+ 31 - 1
src/components/OP/EntryDetailsdraft.vue

@@ -4,7 +4,10 @@
             <el-dialog  width="1600px" title="交通费详细" :visible.sync="TransportationVisible" :close-on-click-modal="false">
                 <div style="display: flex;justify-content: space-between;align-items: center;margin: 5px 0;">
                     <div>接送机(合计):{{ numFilters(Transportationdatatotal) }}&nbsp;CNY</div>
-                    <el-button size="mini" @click="addTransportationdata" type="primary">添加一行</el-button>
+                    <div>
+                        <el-button size="mini" @click="RefreshInterval" type="primary">刷新城市区间费标准</el-button>
+                        <el-button size="mini" @click="addTransportationdata" type="primary">添加一行</el-button>
+                    </div>
                 </div>
                 <el-table border :data="Transportationdata">
                     <el-table-column property="no" label="序号" width="50"></el-table-column>
@@ -3829,6 +3832,33 @@ export default {
                 }
             })
         },
+        //刷新城市区间费标准(保存后刷新,数据修改重新赋值计算)
+        RefreshInterval(){
+            this.EnterExitCostDraftOVByGroupId();
+            var that=this;
+            this.$confirm('刷新可能标准会有修改与之前的金额会有不同请注意查看!且刷新只是重新计算并未保存重新计算后的值!是否继续操作?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                for (let i = 0; i < that.Transportationdata.length; i++) {
+                    var obj = {}
+                    obj = that.fulecao.find(function (item, indexs) {
+                        return item.id === that.Transportationdata[i].ovId
+                    })
+                    this.Transportationdata[i].cost = obj.price;
+                    this.Transportationdata[i].otherCost = obj.otherPrice;
+                    this.Transportationdata[i].guideCost = obj.guidePrice;
+                    this.Transportationdata[i].currencyName = obj.currencyName
+                    this.UrbanModify(this.Transportationdata[i], this.Transportationdata[i].currencyName)
+                }
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消操作'
+                });
+            });
+        },
         //baoliuliangweixiaoshu
         reservetwo(value) {
             // 截取当前数据到小数点后两位