Commit 94b77fab authored by daniel's avatar daniel

feat(invoice): 新增是否是是否是单位字段和后台显示

parent 88185416
......@@ -25,6 +25,10 @@ public class Invoice extends JaapRecord<BagDelivery> {
@ApiModelProperty(value = "参赛号", notes = "参赛号")
private String markNo;
@ApiModelProperty(value = "是否是公司(0:个人,1:公司)", notes = "是否是公司(0:个人,1:公司)")
private String isCompany;
@ApiModelProperty(value = "发票类型(1:普通发票,2:增值税专票)", notes = "发票类型(1:普通发票,2:增值税专票)")
private String invoiceType;
......
......@@ -23,4 +23,7 @@ public class InvoiceParam {
@ApiModelProperty(value = "开票方式(0:电子发票,1:纸质发票)", notes = "开票方式(0:电子发票,1:纸质发票)")
private String paperInvoice;
@ApiModelProperty(value = "是否是公司(0:个人,1:公司)", notes = "是否是公司(0:个人,1:公司)")
private String isCompany;
}
\ No newline at end of file
......@@ -5,10 +5,10 @@
<insert id="insertInvoice">
insert into invoice_record(cmpt_id, mark_no, invoice_type, paper_invoice, amount, header, tax_payer_id, tax_bank,
tax_bank_account, tax_registered_address, tax_phone,email,receiver_name,receiver_phone,
receiver_address,remark,status,del_flag, create_date)
receiver_address,remark,status,del_flag, create_date,is_company)
values (#{cmptId}, #{markNo}, #{invoiceType}, #{paperInvoice}, #{amount}, #{header},#{taxPayerId}, #{taxBank},
#{taxBankAccount}, #{taxRegisteredAddress}, #{taxPhone}, #{email}, #{receiverName}, #{receiverPhone},
#{receiverAddress},#{remark}, 1, 0, now())
#{receiverAddress},#{remark}, 1, 0, now(),#{isCompany})
</insert>
<update id="delInvoice">
......@@ -22,6 +22,9 @@
<if test="markNo != null">
,mark_no=#{markNo}
</if>
<if test="isCompany != null">
,is_company=#{isCompany}
</if>
<if test="invoiceType != null">
,invoice_type=#{invoiceType}
</if>
......@@ -81,6 +84,7 @@
id,
cmpt_id cmptId,
mark_no markNo,
is_company isCompany,
invoice_type invoiceType,
paper_invoice paperInvoice,
amount,
......@@ -125,6 +129,9 @@
<if test="param.markNo != null and param.markNo != '' ">
and mark_no=#{param.markNo}
</if>
<if test="param.isCompany != null and param.isCompany != '' ">
and is_company=#{param.isCompany}
</if>
</sql>
</mapper>
\ No newline at end of file
......@@ -352,6 +352,9 @@
<span class="lh-1.2">
发票类型:{{invoiceEnum[item.invoiceType]}}
</span>
<span class="lh-1.2">
开票方式:{{isCompanyEnum[item.isCompany]}}
</span>
<span class="lh-1.2">
发票状态:{{statusEnum[item.status]}}
</span>
......@@ -394,7 +397,7 @@
编辑
</span>
</div>
<div class="opt del" @click="delinvoice(item)">
<div class="opt del" @click="delInvoice(item)">
<span class="icon-del"></span>
<span class="del">
删除
......@@ -451,6 +454,18 @@
</label>
</div>
</div>
<!-- 发票方式 -->
<div class="form-item">
<span class="form-label">发票方式</span>
<div class="label-box">
<label>
<input type="radio" v-model="invoice.isCompany" value="0"> 个人
</label>
<label>
<input type="radio" v-model="invoice.isCompany" value="1"> 单位
</label>
</div>
</div>
<!-- 开票方式 -->
<div class="form-item">
......@@ -475,7 +490,6 @@
placeholder="请输入开票金额">
</div>
</div>
<!-- 开票抬头 -->
<div class="form-item">
<div>
......@@ -656,6 +670,10 @@
1: "普通发票",
2: "增值税专票",
},
isCompanyEnum: {
0: "个人",
1: "单位",
},
paperEnum: {
0: "电子发票",
1: "纸质发票",
......@@ -664,6 +682,7 @@
cmptId: getCId(),
invoiceType: '1', // 1:普通发票 2:增值税专票
paperInvoice: '0', // 0:电子发票 1:纸质发票
isCompany: '0', // 0: 个人 1: 企业
amount: null,
header: null,
taxPayerId: null,
......@@ -720,6 +739,7 @@
cmptId: getCId(),
invoiceType: '1', // 1:普通发票 2:增值税专票
paperInvoice: '0', // 0:电子发票 1:纸质发票
isCompany: '0', // 0: 个人 1: 企业
amount: null,
header: null,
taxPayerId: null,
......@@ -739,7 +759,7 @@
this.dialog = true;
},
// 删除
delinvoice(data) {
delInvoice(data) {
layer.confirm("确认要删除吗?", function () {
$.ajax({
url: '/gk/invoice/delete?id=' + data.id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment