Przeglądaj źródła

发票管理细节

natasha 12 godzin temu
rodzic
commit
230d17a6a0

+ 9 - 0
src/components/Setting.vue

@@ -384,6 +384,7 @@
               <td class="td1">导出数据</td>
               <td>授权地区</td>
               <td class="td1">退款管理</td>
+              <td class="td1">发票管理</td>
             </tr>
             <tr>
               <td class="td1">
@@ -424,6 +425,14 @@
                   ><br
                 /></el-checkbox>
               </td>
+              <td class="td1">
+                <el-checkbox
+                  v-model="manageAuth"
+                  :label="40004"
+                  :disabled="page === 'personal' ? true : false"
+                  ><br
+                /></el-checkbox>
+              </td>
             </tr>
           </table>
           <template v-if="page === 'editPerson'">

+ 3 - 0
src/views/bookShelf/components/NormalModel.vue

@@ -835,6 +835,9 @@ export default {
     line-height: 32px;
     color: #2f3742;
   }
+  :deep span {
+    word-break: break-word;
+  }
 }
 .info-box {
   display: flex;

+ 0 - 1
src/views/bookShelf/components/Payment.vue

@@ -260,7 +260,6 @@ export default {
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    console.log("2025-09-19");
     this.payType = this.payWay;
   },
   //生命周期 - 挂载完成(可以访问DOM元素)

+ 28 - 9
src/views/personalCenter/components/InvoiceList.vue

@@ -71,13 +71,19 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column prop="reject_reason" label="驳回原因" width="280">
-      </el-table-column>
-      <el-table-column prop="status" label="操作" width="80" fixed="right">
+      <el-table-column prop="reject_reason" label="驳回原因"> </el-table-column>
+      <el-table-column prop="status" label="操作" width="120" fixed="right">
         <template slot-scope="scope">
           <a class="apply" @click="handleDetail(scope.row, scope.$index)">
             详情
           </a>
+          <a
+            class="apply"
+            @click="handleCancle(scope.row, scope.$index)"
+            v-if="scope.row.status === 0"
+          >
+            取消
+          </a>
         </template>
       </el-table-column>
     </el-table>
@@ -152,12 +158,6 @@
           <b>{{ ktjeInfo.buyer_info_zh }}</b>
         </div>
       </template>
-      <template v-else>
-        <div class="item-info">
-          <label>身份证号:</label>
-          <b>{{ ktjeInfo.buyer_info_sfzh }}</b>
-        </div>
-      </template>
 
       <div class="item-info">
         <label>金额:</label>
@@ -364,6 +364,25 @@ export default {
         }
       });
     },
+    // 取消申请发票
+    handleCancle(row) {
+      this.$confirm("确定要取消该条发票申请吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let Mnames = "/ShopServer/Client/OrderManager/CancelInvoiceApply";
+        let datas = {
+          id: row.id,
+        };
+        getLogin(Mnames, datas).then((res) => {
+          if (res.status === 1) {
+            this.$message.success("操作成功");
+            this.getList();
+          }
+        });
+      });
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {

+ 88 - 18
src/views/personalCenter/components/OrderList.vue

@@ -15,7 +15,7 @@
       v-loading="tableLoading"
       :max-height="tableHeight"
       @selection-change="handleSelectionChange"
-      row-key="id"
+      :row-key="getRowKey"
       ref="table"
     >
       <el-table-column
@@ -243,6 +243,20 @@
       width="700px"
       class="invoice-dialog"
     >
+      <h5>已选订单</h5>
+      <el-table
+        class="search-table"
+        :data="multipleSelection"
+        style="width: 100%"
+      >
+        <el-table-column type="index" label="#" width="54"> </el-table-column>
+        <!-- <el-table-column prop="id" label="订单ID" width="250">
+          </el-table-column> -->
+        <el-table-column prop="sn" label="订单编号" width="190">
+        </el-table-column>
+
+        <el-table-column prop="name" label="订单名称"> </el-table-column>
+      </el-table>
       <el-form :model="invoiceForm" ref="ruleForm" label-width="90px">
         <el-form-item label="创建模式" prop="create_model">
           <el-radio-group v-model="invoiceForm.create_model">
@@ -312,16 +326,25 @@
             ></el-input>
           </el-form-item>
         </template>
-        <template v-else>
-          <el-form-item label="身份证号" prop="buyer_info_sfzh">
-            <el-input
-              v-model="invoiceForm.buyer_info_sfzh"
-              placeholder="必填"
-              @blur="handleTrim('invoiceForm', 'buyer_info_sfzh')"
-            ></el-input>
-          </el-form-item>
-        </template>
       </el-form>
+      <el-checkbox-group v-model="invoiceForm.userAgreeCheck">
+        <el-checkbox label="1" name="userAgreeCheck">
+          <p>注意事项:</p>
+          <p>
+            1.
+            若您已申请开发票,则无法申请退款。若需申请退款,则需取消开发票申请。
+          </p>
+          <p>2. 若您已开过发票,则无法申请退款。</p>
+          <p>3. 不能重复申请开发票。</p>
+          <p @click.prevent="">
+            4. 您可在提交申请后5-10个<b>工作日</b>内到【<a
+              style="cursor: pointer; text-decoration: underline"
+              @click="handleToInvoice"
+              >发票申请</a
+            >】下载发票
+          </p></el-checkbox
+        >
+      </el-checkbox-group>
       <span slot="footer" class="dialog-footer">
         <el-button size="small" @click="dialogVisible = false">取 消</el-button>
         <el-button
@@ -478,10 +501,12 @@ export default {
         buyer_info_zh: "",
         buyer_info_khh: "",
         buyer_info_sfzh: "",
+        userAgreeCheck: [],
       },
       dialogVisible: false,
       disabled: false,
       invoiceLoading: false,
+      messageSuccess: null,
     };
   },
   //计算属性 类似于data概念
@@ -649,22 +674,24 @@ export default {
       //   this.multipleSelection.push(item.id);
       // });
     },
+    getRowKey(row) {
+      return row.id;
+    },
     // 去掉前后空格
     handleTrim(form, fild) {
       this[form][fild] = this[form][fild].trim();
     },
     // 确定开票
     handleSureInvoice() {
+      if (this.invoiceForm.userAgreeCheck.length === 0) {
+        this.$message.warning("请阅读并勾选红色注意事项内容");
+        return;
+      }
       if (!this.invoiceForm.buyer_info_mc) {
         this.$message.warning("请输入抬头名称");
         return;
       }
-      if (this.invoiceForm.invoice_object === 0) {
-        if (!this.invoiceForm.buyer_info_sfzh) {
-          this.$message.warning("请输入身份证号");
-          return;
-        }
-      } else {
+      if (this.invoiceForm.invoice_object === 1) {
         if (!this.invoiceForm.buyer_info_sh) {
           this.$message.warning("请输入单位税号");
           return;
@@ -723,7 +750,15 @@ export default {
         .then((res) => {
           this.invoiceLoading = false;
           if (res.status === 1) {
-            this.$message.success("申请成功,稍后请到发票管理查看");
+            this.messageSuccess = this.$message({
+              type: "success",
+              showClose: true,
+              dangerouslyUseHTMLString: true,
+              offset: 200,
+              message:
+                "申请成功,您可在提交申请后5-10个<b>工作日</b>内到 【<a style='text-decoration: underline;' onclick=handleToInvoice()>发票申请</a>】下载发票。",
+              duration: 15000,
+            });
             this.dialogVisible = false;
             this.multipleSelection = [];
             this.$refs.table.clearSelection();
@@ -738,6 +773,7 @@ export default {
               buyer_info_zh: "",
               buyer_info_khh: "",
               buyer_info_sfzh: "",
+              userAgreeCheck: [],
             };
           }
         })
@@ -745,6 +781,13 @@ export default {
           this.invoiceLoading = false;
         });
     },
+    handleToInvoice() {
+      if (this.messageSuccess) {
+        this.messageSuccess.close();
+      }
+
+      this.$router.push({ path: "/peraonal?type=invoice" });
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
@@ -752,7 +795,9 @@ export default {
     this.getList();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
+  mounted() {
+    window.handleToInvoice = this.handleToInvoice;
+  },
   //生命周期-创建之前
   beforeCreated() {},
   //生命周期-挂载之前
@@ -867,4 +912,29 @@ export default {
 :deep .el-form-item {
   margin-bottom: 10px;
 }
+.invoice-dialog {
+  :deep .el-dialog__body {
+    padding: 0 20px;
+  }
+  h5 {
+    font-size: 16px;
+    margin: 5px 0;
+  }
+  .el-table {
+    margin: 15px 0;
+  }
+  :deep .el-checkbox {
+    display: flex;
+    .el-checkbox__label {
+      color: #ee1c24;
+      cursor: initial;
+      p {
+        margin: 5px 0;
+      }
+    }
+    .el-checkbox__input {
+      margin-top: 8px;
+    }
+  }
+}
 </style>