瀏覽代碼

LY 工作票 bugfix

ly 2 年之前
父節點
當前提交
c9fa2e583b
共有 1 個文件被更改,包括 17 次插入13 次删除
  1. 17 13
      ui/src/views/invoice/bookingworkticket/index.vue

+ 17 - 13
ui/src/views/invoice/bookingworkticket/index.vue

@@ -196,7 +196,7 @@
             size="mini"
             type="text"
             @click="handleXp(scope.row)"
-          > {{ $t('续票预约') }}
+          > <span>续票预约</span>
           </el-button>
         </template>
       </el-table-column>
@@ -225,7 +225,7 @@
             type="text"
             icon="el-icon-view"
             @click="billSee(scope.row)"
-          > {{ $t('票据预览') }}
+          > 票据预览
           </el-button>
           <el-button
             v-if="scope.row.bookingworkticket.status== 3 && scope.row.xpxp == 10"
@@ -233,7 +233,7 @@
             type="text"
             icon="el-icon-download"
             @click="handleDownload(scope.row)"
-          >{{ $t('下载申请单') }}
+          >下载申请单
           </el-button>
 <!--          <el-dropdown size="mini">-->
 <!--            <span class="el-dropdown-link" >其他操作<i class="el-icon-arrow-down el-icon&#45;&#45;right" /></span>-->
@@ -413,7 +413,7 @@
     <el-dialog v-loading="loadingFlash" element-loading-background="rgba(0,0,0,0.2)" v-dialogDrag :title="pdf.title"
                :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body>
       <div style="margin-top: -60px;float: right;margin-right: 40px;">
-        <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面预览') }}</el-button>
+        <el-button size="mini" type="text" @click="openPdf">新页面预览</el-button>
       </div>
       <div style="margin-top: -30px">
         <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
@@ -559,6 +559,7 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import AddApprove from "../approveinvoice/index"
 import {addInvoice} from "@/api/invoice/invoice";
+import base from "@/assets/js/base";
 
 export default {
   name: "Bookingworkticket",
@@ -1249,26 +1250,29 @@ export default {
     },
     // 预约续票
     handleXp(row) {
-      this.xpForm = row
+      this.xpForm = base.deepClone(row)
       this.xpVisible = true
     },
     //提交预约续票
     submitXp() {
       this.$refs["xpForm"].validate(valid => {
         if (valid) {
-          this.form = this.xpForm.bookingworkticket
-          this.form.tInvoiceWorkcontentList = []
+          let newForm = {}
+          newForm = this.xpForm.bookingworkticket
+          newForm.tInvoiceWorkcontentList = []
           this.xpForm.bookingworkticket = null
-          this.form.tInvoiceWorkcontentList[0] = this.xpForm
-          this.form.workStartTime = this.xpForm.workStartTime
-          this.form.tInvoiceWorkcontentList[0].xpxp = 12    //续票
-          this.form.status = 0
-          addBookingworkticket(this.form).then(response => {
+          newForm.tInvoiceWorkcontentList[0] = this.xpForm
+          newForm.workStartTime = this.xpForm.workStartTime
+          newForm.tInvoiceWorkcontentList[0].xpxp = 12    //续票
+          newForm.status = 0
+          addBookingworkticket(newForm).then(response => {
             if (response.code == 500) {
+              this.getList();
+              this.xpVisible = false
               return
             }
             this.approveForm.invoiceId = response.data
-            this.approveForm.userSupId = this.form.userMg
+            this.approveForm.userSupId = newForm.userMg
             addInvoice(this.approveForm).then(response => {
               this.msgSuccess("已提交申请");
               this.getList();