Compare commits

..

No commits in common. '8e75680fc7829631baf2d48ae5354eefa7d0c6f0' and '3e6c447a3822411ad38bc12773843509b7c10302' have entirely different histories.

  1. 50
      ant-design-vue-jeecg/src/views/shopping/components/billTitle.vue
  2. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/CustomerInvoiceMapper.java
  3. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/ICustomerInvoiceService.java
  4. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/impl/CustomerInvoiceServiceImpl.java
  5. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/ApeopersionController.java

@ -10,8 +10,7 @@
<div class="item" v-for="(item,index) in billTitle" :key="index"> <div class="item" v-for="(item,index) in billTitle" :key="index">
<p class="default" v-if="item.flag"><span class="f_12">默认抬头</span></p> <p class="default" v-if="item.flag"><span class="f_12">默认抬头</span></p>
<div class="d-flex"> <div class="d-flex">
<div><span v-if="item.type == 1">专用发票抬头</span><span v-if="item.type == 2">普通发票抬头</span></div>
<div><span v-if="item.invoiceType == 1">普通增值税发票</span><span v-if="item.invoiceType == 2">专用增值税发票</span></div>
<div class="btnDiv"> <div class="btnDiv">
<span class="btn" @click="handleEdit(item)">编辑</span> <span class="btn" @click="handleEdit(item)">编辑</span>
<a-popconfirm <a-popconfirm
@ -32,11 +31,10 @@
<!-- <span class="btn" v-if="!item.flag" @click="handleDefault(item.id)">将其设置为默认抬头</span>--> <!-- <span class="btn" v-if="!item.flag" @click="handleDefault(item.id)">将其设置为默认抬头</span>-->
</div> </div>
</div> </div>
<p><span v-if="item.customerType == 1">个人</span><span v-if="item.customerType == 2">企业</span></p>
<p> <p>
{{item.username}} {{item.name}}
</p> </p>
<p>{{item.taxIdentificationNumber}}</p> <p>{{item.dutyNum}}</p>
</div> </div>
</div> </div>
<a-modal <a-modal
@ -114,10 +112,6 @@
</div> </div>
</template> </template>
<script> <script>
import { httpAction, getAction } from '@/api/manage'
export default { export default {
name: "billTitle", name: "billTitle",
components: { }, components: { },
@ -128,8 +122,7 @@
copyItem:{},// copyItem:{},//
labelCol: { span: 5 }, labelCol: { span: 5 },
wrapperCol: { span: 19 }, wrapperCol: { span: 19 },
billTitle:[], billTitle:[
/*billTitle:[
{ {
id:1, id:1,
type:'1',//12 type:'1',//12
@ -160,8 +153,8 @@
account:'6212261717000030000',// account:'6212261717000030000',//
addr:'河南省驻马店市驿城区黄淮学院北区' addr:'河南省驻马店市驿城区黄淮学院北区'
} }
],*/// ],//
/* addrList:[ addrList:[
{ {
id:1, id:1,
name:'吴一', name:'吴一',
@ -189,7 +182,7 @@
detailed:'黄淮学院北区', detailed:'黄淮学院北区',
flag:false,// flag:false,//
},// },//
],*/// ],//
addr1:'210521', addr1:'210521',
// //
form: { form: {
@ -202,12 +195,6 @@
phone: '', phone: '',
flag:false// flag:false//
}, },
url: {
findbill: "/getuserpersion/findbill"
},
rules: { rules: {
name: [{ required: true, message: '请输入发票抬头', trigger: 'blur' },], name: [{ required: true, message: '请输入发票抬头', trigger: 'blur' },],
dutyNum: [{ required: true, message: '请输入税号', trigger: 'blur' },], dutyNum: [{ required: true, message: '请输入税号', trigger: 'blur' },],
@ -219,32 +206,9 @@
phone: [{ required: true, message: '请输入手机号码', trigger: 'blur' },], phone: [{ required: true, message: '请输入手机号码', trigger: 'blur' },],
card: [{ required: true, message: '请输入银行账户', trigger: 'blur' },], card: [{ required: true, message: '请输入银行账户', trigger: 'blur' },],
}, },
}; };
}, },
created() {
this.findbill();
},
methods: { methods: {
findbill(){
getAction(this.url.findbill).then((res) => {
if(res.success) {
this.billTitle = res.result;
console.log(res.result)
this.visible = true;
} else {
}
});
},
addAddr(){ addAddr(){
this.visible = true this.visible = true
this.flag = 'add' this.flag = 'add'

@ -32,6 +32,4 @@ public interface CustomerInvoiceMapper extends BaseMapper<CustomerInvoice> {
@Select("select sort from customer_invoice where id=#{id} ") @Select("select sort from customer_invoice where id=#{id} ")
int findSort(String id); int findSort(String id);
@Select("select * from customer_invoice where create_by=#{username} ")
List<CustomerInvoice> getfapiao(String username);
} }

@ -3,8 +3,6 @@ package org.jeecg.modules.demo.customerinvoice.service;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @Description: 客户发票信息 * @Description: 客户发票信息
* @Author: jeecg-boot * @Author: jeecg-boot
@ -18,6 +16,4 @@ public interface ICustomerInvoiceService extends IService<CustomerInvoice> {
int findSort(String id); int findSort(String id);
void up(String id); void up(String id);
List<CustomerInvoice> getfapiao(String username);
} }

@ -8,8 +8,6 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/** /**
* @Description: 客户发票信息 * @Description: 客户发票信息
* @Author: jeecg-boot * @Author: jeecg-boot
@ -36,11 +34,6 @@ public class CustomerInvoiceServiceImpl extends ServiceImpl<CustomerInvoiceMappe
} }
} }
@Override
public List<CustomerInvoice> getfapiao(String username) {
return customerInvoiceMapper.getfapiao(username);
}
@Override @Override
public int findSort(String id) { public int findSort(String id) {
return customerInvoiceMapper.findSort(id); return customerInvoiceMapper.findSort(id);

@ -16,8 +16,6 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods;
import org.jeecg.modules.demo.customercollectgoods.service.ICustomercollectgoodsService; import org.jeecg.modules.demo.customercollectgoods.service.ICustomercollectgoodsService;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService;
import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart;
@ -46,9 +44,6 @@ import java.util.stream.Collectors;
@RequestMapping("/getuserpersion") @RequestMapping("/getuserpersion")
public class ApeopersionController { public class ApeopersionController {
@Autowired
private ICustomerInvoiceService customerInvoiceService;
@Autowired @Autowired
private ISysUserService sysUserService; private ISysUserService sysUserService;
@ -249,7 +244,6 @@ public class ApeopersionController {
if (flag.equals("false")){ if (flag.equals("false")){
//寻找之前的排序的最后一个 //寻找之前的排序的最后一个
CustomerReceivingAddress cus = customerReceivingAddressService.getcreatbuyuser(Username); CustomerReceivingAddress cus = customerReceivingAddressService.getcreatbuyuser(Username);
//开始组装数据
CustomerReceivingAddress cus2 =new CustomerReceivingAddress(); CustomerReceivingAddress cus2 =new CustomerReceivingAddress();
cus2.setUserId(loginUser.getId()); cus2.setUserId(loginUser.getId());
cus2.setCityId((String)map.get("addr")); cus2.setCityId((String)map.get("addr"));
@ -257,7 +251,6 @@ public class ApeopersionController {
cus2.setAddress((String)map.get("detailed")); cus2.setAddress((String)map.get("detailed"));
cus2.setMobile((String)map.get("phone")); cus2.setMobile((String)map.get("phone"));
cus2.setSort(cus.getSort()+1); cus2.setSort(cus.getSort()+1);
//将组装好的数据以新增的形式添加数据库
customerReceivingAddressService.save(cus2); customerReceivingAddressService.save(cus2);
} else if (flag.equals("true")){ } else if (flag.equals("true")){
//寻找之前的排序的最后一个 //寻找之前的排序的最后一个
@ -301,14 +294,6 @@ public class ApeopersionController {
} }
//这个是获取个人中心的发票列表
@RequestMapping(value = "/findbill", method = RequestMethod.GET)
public Result<?> findbill() {
//这里方便获取当前登陆信息
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//这里获取当前登陆的用户名
String username = loginUser.getUsername();
List<CustomerInvoice> fapiao= customerInvoiceService.getfapiao(username);
return Result.OK(fapiao);
}
} }

Loading…
Cancel
Save