liuhj 3 miesięcy temu
rodzic
commit
e33b626bc8
1 zmienionych plików z 511 dodań i 42 usunięć
  1. 511 42
      src/components/OP/EntryDetailsdraft.vue

+ 511 - 42
src/components/OP/EntryDetailsdraft.vue

@@ -2,7 +2,7 @@
     <div v-loading.fullscreen.lock="fullscreenLoading">
         <div class="Entrydraft-all">
             <div class="Entrydraft-head">
-                <div class="Entrydraft-head-li" style="width:270px">
+                <div class="Entrydraft-head-li" style="width:370px">
                     <label>草稿名称:</label>
                     <el-autocomplete
                     style="width:200px"
@@ -12,6 +12,7 @@
                     placeholder="请输入内容"
                     @select="handleSelect"
                     ></el-autocomplete>
+                    <el-button @click="cleanout" type="primary">新建草稿</el-button>
                     <!-- <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-option>
@@ -27,10 +28,10 @@
                     </el-select>
                     <el-button @click="EnterExitCostDraftImportData" type="primary">同步</el-button>
                 </div>
-                <div class="Entrydraft-head-li" style="width:875px">
+                <div class="Entrydraft-head-li" style="width:780px">
                     <!-- <el-button type="primary">计算费用</el-button> -->
                     <!-- <el-button @click="NationalTravelFeeImportReceivables" type="primary">导出到收款账单</el-button> -->
-                    <el-button @click="cleanout" type="primary">全部清空</el-button>
+                    
                     <el-button @click="storage()" type="primary">保存</el-button>
                     <el-select style="width:202px" v-model="listvalue" placeholder="请选择">
                         <el-option v-for="item in listvalueoptions" :key="item.id" :label="item.name" :value="item.id">
@@ -729,6 +730,7 @@ export default {
                     });
                     that.currencys = res.data.data.currencyInit;
                     console.log(that.value);
+                    console.log(that.draftNameDatas);
                     if (that.value == null) {
                         that.valuename = that.draftNameDatas[0].value;
                         that.value = that.draftNameDatas[0].id;
@@ -1522,45 +1524,505 @@ export default {
         },
         //全部清空
         cleanout() {
-            this.fullscreenLoading = true
-            this.$confirm('此操作将全部清空, 是否继续?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                var url = "/api/Groups/EnterExitCostDraftOneClickEmpty"
-                var that = this
-                this.$axios({
-                    method: 'post',
-                    url: url,
-                    headers: {
-                        Authorization: 'Bearer ' + this.token
-                    },
-                    data: {
-                        portType: 1,
-                        userId: that.userId,
-                        id: that.value
-                    }
-                }).then(function (res) {
-                    if (res.data.code == 200) {
-                        that.$message({
-                            type: 'success',
-                            message: res.data.msg
-                        });
-                        that.GetEnterExitCostInfobyDiId()
-                    } else {
-                        that.fullscreenLoading = false;
-                        that.$message.error(res.data.msg);
-                    }
-                })
-            }).catch(() => {
-                this.fullscreenLoading = false;
-                this.$message({
-                    type: 'info',
-                    message: '已取消清空'
-                });
-            });
+            //初始化数据
+
+            this.value=0;
+            this.valuename="";
+
 
+
+            this.ID = '';
+            // this.currencys=[]
+            this.TotalAccommodationFee = 0;//住宿费合计
+            this.TotalMeals = 0;//伙食费合计
+            this.TotalMiscellaneous = 0;//公杂费合计
+            this.trainingExpense = 0;//培训费合计
+            this.otherExpense = 0;//其他费合计
+
+            this.DomesticFees = {
+                visafees: '',//签证费
+                visafeesDescription: '',//签证费用描述
+                vaccinefees: 0,//疫苗费
+                nucleicfees: 0,//核酸检测费
+                serviceCharge: 0,//服务费
+                insurance: 500,//保险费
+                ticketsExhibitionL: 0,//参展门票
+                total: 0,
+                firstItemRemark:''//备注
+            }
+            this.TotalExpenses = {
+                EconomyClass: 0,//经济舱
+                BusinessClass: 0,//公务舱
+                Firstclass: 0,//TD舱
+                TravellingExpenses: 0,//城市区间交通费
+                EconomyClasstotal: 0,//经济舱合计
+                BusinessClasstotal: 0,//公务舱合计
+                Firstclasstotal: 0,//TD舱合计
+            }
+            this.choiceOne = false//境内费用(其他费用)选择框
+            this.choiceTwo = false//国际旅费合计选择框
+            this.choiceThree = false//住宿费合计选择框
+            this.choiceFour = false//伙食费合计选择框
+            this.choiceFive = false//公杂费合计选择框
+            this.choiceSix = false//培训费用选择框
+            this.choiceSeven = false//其他费用选择框
+            this.sumJJC = false//经济舱小计选择框
+            this.sumGWC = false//公务舱小计选择框
+            this.sumTDC = false//公务舱小计选择框
+            this.airJJC_Checked = false//经济舱选择框 
+            this.airGWC_Checked = false//公务舱选择框
+            this.storageid = 0
+
+            this.quarterageData = [
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 1,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 2,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 3,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 4,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 5,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 6,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 7,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 1,
+                    days: 8,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+            ]
+            this.boardWagesData = [
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 1,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 2,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 3,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 4,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 5,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 6,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 7,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 2,
+                    days: 8,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+            ]
+            this.miscellaneousFeeData = [
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 1,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 2,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 3,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 4,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 5,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 6,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 7,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 3,
+                    days: 8,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+            ]
+            this.trainingExpenseData = [
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 1,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 2,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 3,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 4,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 5,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 6,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 7,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    type: 4,
+                    days: 8,
+                    nationalTravelFeeId: '',
+                    cost: 0,
+                    currency: 0,
+                    subTotal: 0,
+                    remark: '',
+                },
+            ]
+            this.otherData = [
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 1,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 2,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 3,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 4,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 5,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 6,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 7,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+                {
+                    id: 0,
+                    diId: this.value,
+                    setDataId: '',
+                    index: 8,
+                    cost: '',
+                    cost: 0,
+                    currency: '',
+                    subTotal: 0,
+                    remark:'',
+                },
+            ]
         },
         //下拉
         handNodeClick(data, node, e) {
@@ -1889,6 +2351,10 @@ export default {
         },
         //保存
         storage: debounce(function () {
+            if (this.valuename=="") {
+                this.$message.error('睁开眼睛看看草稿名称填没填!!!!!');
+                return
+            }
             return new Promise((resolve, reject) => {
                 //住宿费
                 this.fullscreenLoading = true
@@ -2072,7 +2538,10 @@ export default {
             this.PostGroupTeamRateByDiIdAndCTableId();
         },
         eptschedule: debounce(function (val) {
-
+            if (this.valuename=="") {
+                this.$message.error('睁开眼睛看看草稿名称填没填!!!!!');
+                return
+            }
             return new Promise((resolve, reject) => {
                 //住宿费
                 this.fullscreenLoading = true