Browse Source

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

liuhj 1 year ago
parent
commit
0ccdba72a4
1 changed files with 76 additions and 5 deletions
  1. 76 5
      src/components/Finance/Cost.vue

+ 76 - 5
src/components/Finance/Cost.vue

@@ -277,6 +277,9 @@
                                         placeholder="选择日期">
                                     </el-date-picker>
                                 </span>
+                                <div>
+                                    {{ GetWeek(scope.row[item.prop]) }}
+                                </div>
                             </div>
                             <div v-else-if="item.prop === 'sale'">
                                 <el-row class="figures-btn">
@@ -329,8 +332,19 @@
                     </el-checkbox-group>
                     <div style="display: flex;">
                         <div :style="{ 'width': costTypevalue == 'A' ? '100%' : '49%' }">
+                            <div class="biaoge" style="width: 200px;margin-bottom:0px;margin-top: 20px;"
+                                v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes('签证') && visaCountryInfoArr.length > 0">
+
+                                <el-table :data="visaCountryInfoArr" border style="width: 100%">
+                                    <el-table-column prop="visaCountry" label="签证国家">
+                                    </el-table-column>
+                                    <el-table-column prop="visaPrice" label="签证费用">
+                                    </el-table-column>
+                                </el-table>
+
+                            </div>
                             <div v-for="(      sheetitem, index      ) in       sheetDatal      " :key="index">
-                                <div class="biaoge"
+                                <div class="biaoge" :class="{ 'biaogeKz': costTypevalue == 'B' }"
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
                                     <el-table :data="[{ a: 1 }]" border style="width: 100%">
                                         <el-table-column
@@ -374,6 +388,19 @@
                         </div>
                         <div style="width: 2%;" v-show="costTypevalue != 'A'"></div>
                         <div style="width: 49%;" v-show="costTypevalue != 'A'">
+
+                            <div class="biaoge"
+                                style="width: 200px;margin-bottom:0px;margin-top: 20px;visibility: hidden;"
+                                v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes('签证') && visaCountryInfoArr.length > 0">
+
+                                <el-table :data="visaCountryInfoArr" border style="width: 100%">
+                                    <el-table-column prop="visaCountry" label="签证国家">
+                                    </el-table-column>
+                                    <el-table-column prop="visaPrice" label="签证费用">
+                                    </el-table-column>
+                                </el-table>
+
+                            </div>
                             <div v-for="(      sheetitem, index      ) in       sheetDatal      " :key="index">
                                 <div class="biaogeB"
                                     v-if="CheckBoxListSelect.filter(item => item.cbType == 'Left')[0].cbValues.includes(sheetitem.label)">
@@ -388,8 +415,12 @@
                                                         <span>{{ BGroupCostParameter[itemsheetone.prop] }}</span>
                                                     </div>
                                                     <div v-else>
-                                                        <el-input v-model="BGroupCostParameter[itemsheetone.prop]"
-                                                            show-word-limit />
+                                                        <!-- <el-input v-model="BGroupCostParameter[itemsheetone.prop]"
+                                                            show-word-limit /> -->
+                                                        <el-input-number
+                                                            v-model="BGroupCostParameter[itemsheetone.prop]"
+                                                            @change="handleChange" :min="0" size="small"
+                                                            :controls="false"></el-input-number>
                                                     </div>
                                                 </div>
                                                 <div v-else-if="itemsheetone.prop === 'ZCB'">
@@ -2098,7 +2129,7 @@ export default {
             AttractionsTickets: ['T/G EF', 'EF'],
             MiscellaneousFees: ['B/R/F', 'TE', 'T/L F'],
             ATip: ['T/G T', 'DRV T'],
-
+            visaCountryInfoArr: [],
 
         };
     },
@@ -2328,15 +2359,20 @@ export default {
         addStrip() {
             var souerLength = this.tableData.length - 1;
             var dataStr = "";
+            var day = '-';
             if (souerLength >= 0) {
                 dataStr = this.tableData[souerLength].date;
                 dataStr = this.addOneDay(dataStr, 1);
+                var getDay = this.tableData[souerLength].day;
+                if (getDay) {
+                    day = parseInt(getDay) + 1;
+                }
             }
 
             this.tableData.push(
                 {
                     "diid": this.diid,
-                    "day": "-",
+                    "day": day,
                     "date": dataStr,
                     "itin": "",
                     "carType": "",
@@ -2784,6 +2820,13 @@ export default {
                             id: 0,
                         }]
                     }
+
+                    if (resp.data.data.visaCountryInfoArr.length > 0) {
+                        that.visaCountryInfoArr = resp.data.data.visaCountryInfoArr;
+                    } else {
+                        that.visaCountryInfoArr = [];
+                    }
+
                 }
                 that.costloading = false;
             }).catch(err => {
@@ -4195,8 +4238,14 @@ export default {
             };
 
             if (oper == 'UP') {
+                if (rowParam.date) {
+                    row.date = this.addOneDay(rowParam.date, -1);
+                }
                 that.tableData.splice(index, 0, row)
             } else {
+                if (rowParam.date) {
+                    row.date = this.addOneDay(rowParam.date, 1);
+                }
                 that.tableData.splice(index + 1, 0, row)
             }
 
@@ -4328,6 +4377,20 @@ export default {
             if (currentValue == undefined) {
 
             }
+        },
+        GetWeek(date) {
+            if (date) {
+                try {
+                    var myDate = new Date(date);
+                    var myDay = myDate.getDay();//获取存储当前日期
+                    var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+                    return weekday[myDay];
+                } catch (e) {
+                    console.log("时间格式不正确!")
+                    return "时间格式不正确!";
+                }
+            }
+            return '';
         }
 
     },
@@ -4486,4 +4549,12 @@ export default {
 .el-date-editor.el-input__inner {
     width: 100%;
 }
+
+.biaogeB .el-table .el-input--small {
+    width: 60%;
+}
+
+.biaogeKz .el-table .el-input--small {
+    width: 60%;
+}
 </style>