顾客发票管理

zhc4dev
wangjiadong 2 years ago
parent 56ae305a96
commit 68cd99a5da
  1. 22
      ant-design-vue-jeecg/src/views/customerinvoice/admin/CustomerInvoiceList.vue
  2. 46
      ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceForm.vue
  3. 76
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/controller/CustomerInvoiceController.java
  4. 73
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/entity/CustomerInvoice.java

@ -25,6 +25,11 @@
<a-input placeholder="请输入名称/姓名" v-model="queryParam.name"></a-input> <a-input placeholder="请输入名称/姓名" v-model="queryParam.name"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="开户行">
<j-search-select-tag placeholder="请选择开户行" v-model="queryParam.bankDeposit" dict="zybank,bankname,id"/>
</a-form-item>
</a-col>
</template> </template>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
@ -103,19 +108,20 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-dropdown> <!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>-->
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
</a-menu-item> <a-divider type="vertical" />
<a-menu-item> <!-- </a-menu-item>
<a-menu-item>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> <!-- </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>-->
</span> </span>
</a-table> </a-table>
@ -198,7 +204,7 @@
{ {
title:'开户行', title:'开户行',
align:"center", align:"center",
dataIndex: 'bankDeposit' dataIndex: 'bankDeposit_dictText'
}, },
{ {
@ -227,7 +233,7 @@
deleteBatch: "/customerinvoice/customerInvoice/deleteBatch", deleteBatch: "/customerinvoice/customerInvoice/deleteBatch",
exportXlsUrl: "/customerinvoice/customerInvoice/exportXls", exportXlsUrl: "/customerinvoice/customerInvoice/exportXls",
importExcelUrl: "customerinvoice/customerInvoice/importExcel", importExcelUrl: "customerinvoice/customerInvoice/importExcel",
}, },
dictOptions:{}, dictOptions:{},
superFieldList:[], superFieldList:[],

@ -7,7 +7,7 @@
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username"> <a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="username">
<j-popup <j-popup
style="max-width:none; width: 200%" style="max-width:none; width: 100%"
v-model="model.username" v-model="model.username"
field="username" field="username"
org-fields="id,realname" org-fields="id,realname"
@ -50,12 +50,12 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-textarea v-model="model.address" rows="4" placeholder="请输入地址" style="max-width:none; width: 200%"/> <a-textarea v-model="model.address" rows="4" placeholder="请输入地址" style="max-width:none; width: 200% ; height: 55px"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24" v-if="this.model.customerType==2">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone"> <a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
<a-input v-model="model.telephone" placeholder="请输入电话" style="max-width:none; width: 200%"></a-input> <a-input v-model="model.telephone" placeholder="请输入电话" style="max-width:none; width: 200%"></a-input>
</a-form-model-item> </a-form-model-item>
@ -63,7 +63,7 @@
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24" v-if="this.model.customerType==2">
<a-form-model-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accountNumber"> <a-form-model-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accountNumber">
<a-input v-model="model.accountNumber" placeholder="请输入账号" style="max-width:none; width: 200%"></a-input> <a-input v-model="model.accountNumber" placeholder="请输入账号" style="max-width:none; width: 200%"></a-input>
</a-form-model-item> </a-form-model-item>
@ -71,12 +71,28 @@
</a-row> </a-row>
<a-row> <!-- <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankDeposit"> <a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankDeposit">
<a-input style="max-width:none; width: 200%" v-model="model.bankDeposit" placeholder="请输入开户行" disabled></a-input> <a-input style="max-width:none; width: 200%" v-model="model.bankDeposit" placeholder="请输入开户行" disabled></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>-->
<a-row>
<a-col :span="24" v-if="this.model.customerType==2">
<a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankzh">
<j-popup
v-model="model.bankzh"
field="bankzh"
org-fields="id,bankname"
dest-fields="bankDeposit,bankzh"
code="findyh"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
</a-row> </a-row>
<a-row> <a-row>
@ -103,6 +119,7 @@
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
import store from '@/store'
export default { export default {
name: 'CustomerInvoiceForm', name: 'CustomerInvoiceForm',
@ -119,6 +136,10 @@
data () { data () {
return { return {
model:{ model:{
invoiceType : 2,
customerType : 1,
name : store.getters.userInfo.realname
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -130,6 +151,9 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
accountNumber: [
{ required: true, message: '请输入账号!'},
],
username: [ username: [
{ required: true, message: '请输入用户!'}, { required: true, message: '请输入用户!'},
], ],
@ -146,6 +170,16 @@
{ required: false}, { required: false},
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'}, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
], ],
/* sort: [
/!* { required: true, message: '请输入胸围!'},*!/
{pattern: /^\d*\.?\d$/,message:'请输入大于0的数,保留一位小数'}
],*/
sort: [
{ required: false},
{ validator: (rule, value, callback) => validateDuplicateValue('customer_invoice', 'sort', value, this.model.id, callback)},
],
}, },
url: { url: {
add: "/customerinvoice/customerInvoice/add", add: "/customerinvoice/customerInvoice/add",
@ -197,7 +231,7 @@
that.confirmLoading = false; that.confirmLoading = false;
}) })
} }
}) })
}, },
popupCallback(value,row){ popupCallback(value,row){

@ -51,7 +51,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CustomerInvoiceController extends JeecgController<CustomerInvoice, ICustomerInvoiceService> { public class CustomerInvoiceController extends JeecgController<CustomerInvoice, ICustomerInvoiceService> {
@Autowired @Autowired
private ICustomerInvoiceService customerInvoiceService; private ICustomerInvoiceService customerInvoiceService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -73,7 +73,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
IPage<CustomerInvoice> pageList = customerInvoiceService.page(page, queryWrapper); IPage<CustomerInvoice> pageList = customerInvoiceService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 添加 * 添加
* *
@ -87,27 +87,30 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
int flag=0; int flag=0;
UnifiedCreditCodeUtil unifiedCreditCodeUtil = new UnifiedCreditCodeUtil(); UnifiedCreditCodeUtil unifiedCreditCodeUtil = new UnifiedCreditCodeUtil();
BankUtil bankUtil = new BankUtil(); BankUtil bankUtil = new BankUtil();
if (UnifiedCreditCodeUtil.checkUnifiedCreditCode(customerInvoice.getTaxIdentificationNumber())){ if (customerInvoice.getCustomerType().equals("2")) {
if (UnifiedCreditCodeUtil.checkUnifiedCreditCode(customerInvoice.getTaxIdentificationNumber())) {
}else { } else {
flag=1; flag = 1;
return Result.error("请输入正确纳税人识别号"); return Result.error("请输入正确纳税人识别号");
} }
if (customerInvoice.getCustomerType().equals("2")) {
if (bankUtil.checkBankCard(customerInvoice.getAccountNumber())) {
customerInvoice.setBankDeposit(bankUtil.getNameOfBank(customerInvoice.getAccountNumber()));
} else {
flag = 1;
return Result.error("请输入正确银行卡号码");
}
} }
/*if (customerInvoice.getSort()!=null) {
if (customerInvoice.getSort() > 0) {
if (bankUtil.checkBankCard(customerInvoice.getAccountNumber())){ } else {
customerInvoice.setBankDeposit(bankUtil.getNameOfBank(customerInvoice.getAccountNumber())); flag = 1;
}else{ return Result.error("排序必须大于0");
flag=1; }
return Result.error("请输入正确银行卡号码"); }*/
}
if(customerInvoice.getSort()>0){
}else{
flag=1;
return Result.error("排序必须大于0");
}
if(flag==0){ if(flag==0){
customerInvoiceService.save(customerInvoice); customerInvoiceService.save(customerInvoice);
@ -120,7 +123,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
} }
/** /**
* 编辑 * 编辑
* *
@ -136,28 +139,31 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
int flag=0; int flag=0;
UnifiedCreditCodeUtil unifiedCreditCodeUtil = new UnifiedCreditCodeUtil(); UnifiedCreditCodeUtil unifiedCreditCodeUtil = new UnifiedCreditCodeUtil();
BankUtil bankUtil = new BankUtil(); BankUtil bankUtil = new BankUtil();
if (UnifiedCreditCodeUtil.checkUnifiedCreditCode(customerInvoice.getTaxIdentificationNumber())){ if (customerInvoice.getCustomerType().equals("2")) {
if (UnifiedCreditCodeUtil.checkUnifiedCreditCode(customerInvoice.getTaxIdentificationNumber())) {
}else { } else {
flag=1; flag = 1;
return Result.error("请输入正确纳税人识别号"); return Result.error("请输入正确纳税人识别号");
}
} }
if (customerInvoice.getCustomerType().equals("2")) {
if (bankUtil.checkBankCard(customerInvoice.getAccountNumber())){ if (bankUtil.checkBankCard(customerInvoice.getAccountNumber())) {
customerInvoice.setBankDeposit(bankUtil.getNameOfBank(customerInvoice.getAccountNumber())); customerInvoice.setBankDeposit(bankUtil.getNameOfBank(customerInvoice.getAccountNumber()));
}else{ } else {
flag=1; flag = 1;
return Result.error("请输入正确银行卡号码"); return Result.error("请输入正确银行卡号码");
}
} }
if(customerInvoice.getSort()>0){ /*if(customerInvoice.getSort()>0){
}else{ }else{
flag=1; flag=1;
return Result.error("排序必须大于0"); return Result.error("排序必须大于0");
} }
*/
if(flag==0){ if(flag==0){
customerInvoiceService.updateById(customerInvoice); customerInvoiceService.updateById(customerInvoice);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
@ -167,7 +173,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -181,7 +187,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
customerInvoiceService.removeById(id); customerInvoiceService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
@ -195,7 +201,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
this.customerInvoiceService.removeByIds(Arrays.asList(ids.split(","))); this.customerInvoiceService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *

@ -31,74 +31,79 @@ import lombok.experimental.Accessors;
public class CustomerInvoice implements Serializable { public class CustomerInvoice implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**主键*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**创建人*/ /**创建人*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private java.lang.String createBy; private java.lang.String createBy;
/**创建日期*/ /**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/ /**更新人*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; private java.lang.String updateBy;
/**更新日期*/ /**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**用户*/ /**用户*/
@Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id") @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@ApiModelProperty(value = "用户") @ApiModelProperty(value = "用户")
private java.lang.String userId; private java.lang.String userId;
/**用户*/ /**用户*/
@Excel(name = "用户", width = 15) @Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户") @ApiModelProperty(value = "用户")
private java.lang.String username; private java.lang.String username;
/**客户类型*/ /**客户类型*/
@Excel(name = "客户类型", width = 15, dicCode = "khlx") @Excel(name = "客户类型", width = 15, dicCode = "khlx")
@Dict(dicCode = "khlx") @Dict(dicCode = "khlx")
@ApiModelProperty(value = "客户类型") @ApiModelProperty(value = "客户类型")
private java.lang.String customerType; private java.lang.String customerType;
/**发票类型*/ /**发票类型*/
@Excel(name = "发票类型", width = 15, dicCode = "fplx") @Excel(name = "发票类型", width = 15, dicCode = "fplx")
@Dict(dicCode = "fplx") @Dict(dicCode = "fplx")
@ApiModelProperty(value = "发票类型") @ApiModelProperty(value = "发票类型")
private java.lang.String invoiceType; private java.lang.String invoiceType;
/**名称/姓名*/ /**名称/姓名*/
@Excel(name = "名称/姓名", width = 15) @Excel(name = "名称/姓名", width = 15)
@ApiModelProperty(value = "名称/姓名") @ApiModelProperty(value = "名称/姓名")
private java.lang.String name; private java.lang.String name;
/**纳税人识别号*/ /**纳税人识别号*/
@Excel(name = "纳税人识别号", width = 15) @Excel(name = "纳税人识别号", width = 15)
@ApiModelProperty(value = "纳税人识别号") @ApiModelProperty(value = "纳税人识别号")
private java.lang.String taxIdentificationNumber; private java.lang.String taxIdentificationNumber;
/**地址*/ /**地址*/
@Excel(name = "地址", width = 15) @Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private java.lang.String address; private java.lang.String address;
/**电话*/ /**电话*/
@Excel(name = "电话", width = 15) @Excel(name = "电话", width = 15)
@ApiModelProperty(value = "电话") @ApiModelProperty(value = "电话")
private java.lang.String telephone; private java.lang.String telephone;
/**开户行*/ /**开户行*/
@Excel(name = "开户行", width = 15) @Excel(name = "开户行", width = 15, dictTable = "zybank", dicText = "bankname", dicCode = "id")
@Dict(dictTable = "zybank", dicText = "bankname", dicCode = "id")
@ApiModelProperty(value = "开户行") @ApiModelProperty(value = "开户行")
private java.lang.String bankDeposit; private java.lang.String bankDeposit;
/**账号*/ /**开户行*/
@Excel(name = "账号", width = 15) @Excel(name = "开户行", width = 15)
@ApiModelProperty(value = "开户行")
private java.lang.String bankzh;
/**账号*/
@Excel(name = "账号", width = 15)
@ApiModelProperty(value = "账号") @ApiModelProperty(value = "账号")
private java.lang.String accountNumber; private java.lang.String accountNumber;
/**排序*/ /**排序*/
@Excel(name = "排序", width = 15) @Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")
private java.lang.Integer sort; private java.lang.Integer sort;
} }

Loading…
Cancel
Save