|
@@ -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>
|