采购订单详情修改

product
17602169347 2 years ago
parent b94dd215b6
commit 6b66ea0276

@ -3,6 +3,9 @@ package jnpf.payment.mapper;
import jnpf.payment.entity.PaymentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.payment.model.payment.PaymentListVO;
import java.util.List;
/**
*
@ -14,5 +17,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface PaymentMapper extends BaseMapper<PaymentEntity> {
List<PaymentListVO> queryByPurchaseorderId(String id);
}

@ -1,5 +1,6 @@
package jnpf.payment.service;
import jnpf.payment.entity.Payment_item0Entity;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.payment.service.Payment_item0Service;
import jnpf.payment.entity.PaymentEntity;
@ -33,5 +34,7 @@ public interface PaymentService extends IService<PaymentEntity> {
// 子表方法
List<Payment_item0Entity> GetPayment_item0List(String id);
List<PaymentListVO> queryByPurchaseorderId(String id);
//列表子表数据方法
}

@ -2,6 +2,7 @@ package jnpf.payment.service.impl;
import jnpf.payment.entity.*;
import jnpf.payment.mapper.PaymentMapper;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.payment.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.util.RandomUtil;
@ -53,7 +54,8 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
@Autowired
private Payment_item0Service payment_item0Service;
@Autowired
private PaymentMapper paymentMapper;
@ -261,6 +263,11 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
return payment_item0Service.list(queryWrapper);
}
@Override
public List<PaymentListVO> queryByPurchaseorderId(String id) {
return paymentMapper.queryByPurchaseorderId(id);
}
//列表子表数据方法

@ -19,9 +19,14 @@ import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException;
import jnpf.materialvo.entity.MaterialEntity;
import jnpf.materialvo.service.MaterialService;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.payment.service.PaymentService;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.model.purchaseback.PurchasebackListVO;
import jnpf.purchaseback.service.PurchasebackService;
import jnpf.purchaseback.service.PurchaseorderService;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.service.*;
@ -79,6 +84,8 @@ public class PurchaseorderController {
@Autowired
private PurchaseorderitemService purchaseorderitemService;
@Autowired
private PurchasebackService purchasebackService;
@Autowired
private Purchaseorder_item0Service purchaseorder_item0Service;
@Autowired
@ -86,6 +93,8 @@ public class PurchaseorderController {
@Autowired
private PaymentitemService paymentitemService;
@Autowired
private PaymentService paymentService;
@Autowired
private PurchasebackitemService purchasebackitemService;
@Autowired
private CollectionpoService collectionpoService;
@ -475,22 +484,12 @@ public class PurchaseorderController {
for(Invoices_item0itemEntity invoices_item0itemEntity : Invoices_item0itemList){
}
vo.setInvoices_item0itemList(JsonUtil.getJsonToList(Invoices_item0itemList,Invoices_item0itemModel.class ));
QueryWrapper<PaymentdocpoEntity> PaymentdocpoWrapper = new QueryWrapper<>();
PaymentdocpoWrapper.lambda().eq(PaymentdocpoEntity::getPurchaseOrderNo,entity.getDocumentNo());
List<PaymentdocpoEntity> paymentdocList = paymentdocpoService.list(PaymentdocpoWrapper);
List<PaymentitemEntity> PaymentitemList = new ArrayList<>();
for (PaymentdocpoEntity paymentdocpoEntity : paymentdocList) {
List<PaymentitemEntity> paymentitemlist = purchaseorderitemService.GetPaymentitemList(paymentdocpoEntity.getDocumentNo());
PaymentitemList.addAll(paymentitemlist);
}
for(PaymentitemEntity paymentitemEntity : PaymentitemList){
}
vo.setPaymentitemList(JsonUtil.getJsonToList(PaymentitemList,PaymentitemModel.class ));
List<PurchasebackitemEntity> PurchasebackitemList = purchaseorderitemService.GetPurchasebackitemList(id);
for(PurchasebackitemEntity purchasebackitemEntity : PurchasebackitemList){
}
vo.setPurchasebackitemList(JsonUtil.getJsonToList(PurchasebackitemList,PurchasebackitemModel.class ));
List<PaymentListVO> paymentList = paymentService.queryByPurchaseorderId(id);
vo.setPaymentList(paymentList);
QueryWrapper<PurchasebackEntity> purchasebackWrapper = new QueryWrapper<>();
purchasebackWrapper.lambda().eq(PurchasebackEntity::getPurchaseOrderId, id);
List<PurchasebackEntity> PurchasebackList = purchasebackService.list(purchasebackWrapper);
vo.setPurchasebackList(PurchasebackList);
List<CollectionpoEntity> CollectionitemList = purchaseorderitemService.GetCollectionitemList(entity.getDocumentNo());
for(CollectionpoEntity collectionpoEntity : CollectionitemList){
}
@ -552,29 +551,12 @@ public class PurchaseorderController {
}
vo.setInvoices_item0itemList(JsonUtil.getJsonToList(Invoices_item0itemList,Invoices_item0itemModel.class ));
List<PaymentitemEntity> jg_paymentList = purchaseorderitemService.GetPaymentitemList(id);
List<PaymentitemModel> jg_paymentModelList = JsonUtil.getJsonToList(jg_paymentList,PaymentitemModel.class);
for(PaymentitemModel jg_paymentModel : jg_paymentModelList){
}
vo.setPaymentitemList(jg_paymentModelList);
QueryWrapper<PaymentdocpoEntity> PaymentdocpoWrapper = new QueryWrapper<>();
PaymentdocpoWrapper.lambda().eq(PaymentdocpoEntity::getPurchaseOrderNo,entity.getDocumentNo());
List<PaymentdocpoEntity> paymentdocList = paymentdocpoService.list(PaymentdocpoWrapper);
List<PaymentitemEntity> PaymentitemList = new ArrayList<>();
for (PaymentdocpoEntity paymentdocpoEntity : paymentdocList) {
List<PaymentitemEntity> paymentitemlist = purchaseorderitemService.GetPaymentitemList(paymentdocpoEntity.getDocumentNo());
PaymentitemList.addAll(paymentitemlist);
}
for(PaymentitemEntity paymentitemEntity : PaymentitemList){
}
vo.setPaymentitemList(JsonUtil.getJsonToList(PaymentitemList,PaymentitemModel.class ));
List<PurchasebackitemEntity> jg_purchasebackList = purchaseorderitemService.GetPurchasebackitemList(id);
List<PurchasebackitemModel> jg_purchasebackModelList = JsonUtil.getJsonToList(jg_purchasebackList,PurchasebackitemModel.class);
for(PurchasebackitemModel jg_purchasebackModel : jg_purchasebackModelList){
}
vo.setPurchasebackitemList(jg_purchasebackModelList);
List<PaymentListVO> paymentList = paymentService.queryByPurchaseorderId(id);
vo.setPaymentList(paymentList);
QueryWrapper<PurchasebackEntity> purchasebackWrapper = new QueryWrapper<>();
purchasebackWrapper.lambda().eq(PurchasebackEntity::getPurchaseOrderId, id);
List<PurchasebackEntity> PurchasebackList = purchasebackService.list(purchasebackWrapper);
vo.setPurchasebackList(PurchasebackList);
List<CollectionpoEntity> jg_collectionList = purchaseorderitemService.GetCollectionitemList(id);
List<CollectionitemModel> jg_collectionModelList = JsonUtil.getJsonToList(jg_collectionList,CollectionitemModel.class);
for(CollectionitemModel jg_collectionModel : jg_collectionModelList){
@ -663,12 +645,12 @@ public class PurchaseorderController {
paymentitemService.remove(queryWrapper);
}
List<PaymentitemEntity> PaymentitemList = JsonUtil.getJsonToList(purchaseorderUpForm.getPaymentitemList(), PaymentitemEntity.class);
/*List<PaymentitemEntity> PaymentitemList = JsonUtil.getJsonToList(purchaseorderUpForm.getPaymentitemList(), PaymentitemEntity.class);
for (PaymentitemEntity entitys : PaymentitemList) {
entitys.setId(RandomUtil.uuId());
entitys.setPaymentno(entitys.getPaymentno());
paymentitemService.save(entitys);
}
}*/
// QueryWrapper<PaymentitemEntity> PaymentitemqueryWrapper = new QueryWrapper<>();
// PaymentitemqueryWrapper.lambda().eq(PaymentitemEntity::getDocumentno, entity.getDocumentNo());
// paymentitemService.remove(PaymentitemqueryWrapper);
@ -679,7 +661,7 @@ public class PurchaseorderController {
// entitys.setDocumentno(entity.getDocumentNo());
// paymentitemService.save(entitys);
// }
QueryWrapper<PurchasebackitemEntity> PurchasebackitemqueryWrapper = new QueryWrapper<>();
/*QueryWrapper<PurchasebackitemEntity> PurchasebackitemqueryWrapper = new QueryWrapper<>();
PurchasebackitemqueryWrapper.lambda().eq(PurchasebackitemEntity::getPurchaseOrderId, entity.getId());
purchasebackitemService.remove(PurchasebackitemqueryWrapper);
@ -698,7 +680,7 @@ public class PurchaseorderController {
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderNo(entity.getDocumentNo());
collectionpoService.save(entitys);
}
}*/
return ActionResult.success("更新成功");
} else {

@ -2,6 +2,8 @@
package jnpf.purchaseorder.model.purchaseorder;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseorder.model.purchaseorder.Purchaseorder_item0Model;
import jnpf.purchaseorder.model.purchaseorder.Invoices_item0itemModel;
import jnpf.purchaseorder.model.purchaseorder.PaymentitemModel;
@ -121,11 +123,11 @@ public class PurchaseorderCrForm {
@JsonProperty("invoices_item0itemList")
private List<Invoices_item0itemModel> invoices_item0itemList;
/** 子表数据 **/
@JsonProperty("paymentitemList")
private List<PaymentitemModel> paymentitemList;
@JsonProperty("paymentList")
private List<PaymentListVO> paymentList;
/** 子表数据 **/
@JsonProperty("purchasebackitemList")
private List<PurchasebackitemModel> purchasebackitemList;
@JsonProperty("purchasebackList")
private List<PurchasebackEntity> purchasebackList;
/** 子表数据 **/
@JsonProperty("collectionitemList")
private List<CollectionitemModel> collectionitemList;

@ -3,6 +3,8 @@
package jnpf.purchaseorder.model.purchaseorder;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseorder.model.purchaseorder.Purchaseorder_item0Model;
import jnpf.purchaseorder.model.purchaseorder.Invoices_item0itemModel;
import jnpf.purchaseorder.model.purchaseorder.PaymentitemModel;
@ -118,11 +120,11 @@ public class PurchaseorderInfoVO{
@JsonProperty("invoices_item0itemList")
private List<Invoices_item0itemModel> invoices_item0itemList;
/** 子表数据 **/
@JsonProperty("paymentitemList")
private List<PaymentitemModel> paymentitemList;
@JsonProperty("paymentList")
private List<PaymentListVO> paymentList;
/** 子表数据 **/
@JsonProperty("purchasebackitemList")
private List<PurchasebackitemModel> purchasebackitemList;
@JsonProperty("purchasebackList")
private List<PurchasebackEntity> purchasebackList;
/** 子表数据 **/
@JsonProperty("collectionitemList")
private List<CollectionitemModel> collectionitemList;

@ -2,6 +2,8 @@
package jnpf.purchaseorder.model.purchaseorder;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseorder.model.purchaseorder.Purchaseorder_item0Model;
import jnpf.purchaseorder.model.purchaseorder.Invoices_item0itemModel;
import jnpf.purchaseorder.model.purchaseorder.PaymentitemModel;
@ -123,11 +125,11 @@ public class PurchaseorderUpForm{
@JsonProperty("invoices_item0itemList")
private List<Invoices_item0itemModel> invoices_item0itemList;
/** 子表数据 **/
@JsonProperty("paymentitemList")
private List<PaymentitemModel> paymentitemList;
@JsonProperty("paymentList")
private List<PaymentListVO> paymentList;
/** 子表数据 **/
@JsonProperty("purchasebackitemList")
private List<PurchasebackitemModel> purchasebackitemList;
@JsonProperty("purchasebackList")
private List<PurchasebackEntity> purchasebackList;
/** 子表数据 **/
@JsonProperty("collectionitemList")
private List<CollectionitemModel> collectionitemList;

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.payment.mapper.PaymentMapper">
</mapper>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.payment.mapper.PaymentMapper">
<select id="queryByPurchaseorderId" parameterType="String" resultType="jnpf.payment.model.payment.PaymentListVO">
SELECT documentno,paymentamount,duedate,settlementtype,remark,creator_user_id from jg_payment where id in (SELECT payment_id from jg_payment_item0 where paymentdocitem_id in (SELECT id from jg_paymentdoc_item0 where purchaseorder_id = #{id}))
</select>
</mapper>

@ -277,7 +277,7 @@
</el-form-item>
</el-col>
</el-tab-pane>
<el-tab-pane label="发票信息">
<!-- <el-tab-pane label="发票信息">
<el-col :span="24">
<el-form-item label-width="0">
<div class="JNPF-common-title">
@ -375,7 +375,7 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.paymentitemList" size='mini'>
<el-table :data="dataForm.paymentList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="paymentno" label="付款单号">
<template slot-scope="scope">
@ -438,7 +438,7 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.purchasebackitemList" size='mini'>
<el-table :data="dataForm.purchasebackList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="documentNo" label="退货单号">
<template slot-scope="scope">
@ -543,7 +543,7 @@
</div>
</el-form-item>
</el-col>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</el-col>
</template>
@ -591,8 +591,8 @@
remark: '',
purchaseorder_item0List: [],
invoices_item0itemList: [],
paymentitemList: [],
purchasebackitemList: [],
paymentList: [],
purchasebackList: [],
collectionitemList: [],
},
activeypnmkv: '0',
@ -840,15 +840,15 @@
},
paymentExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.paymentitemList.length; i++) {
const e = this.dataForm.paymentitemList[i];
for (let i = 0; i < this.dataForm.paymentList.length; i++) {
const e = this.dataForm.paymentList[i];
}
return isOk;
},
purchasebackExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.purchasebackitemList.length; i++) {
const e = this.dataForm.purchasebackitemList[i];
for (let i = 0; i < this.dataForm.purchasebackList.length; i++) {
const e = this.dataForm.purchasebackList[i];
}
return isOk;
},
@ -989,10 +989,10 @@
remark: undefined,
creatorUserName: undefined,
}
this.dataForm.paymentitemList.push(item)
this.dataForm.paymentList.push(item)
},
delpaymentList(index) {
this.dataForm.paymentitemList.splice(index, 1);
this.dataForm.paymentList.splice(index, 1);
},
addpurchasebackList() {
let item = {
@ -1002,10 +1002,10 @@
refundAmount: undefined,
creatorUserName: undefined,
}
this.dataForm.purchasebackitemList.push(item)
this.dataForm.purchasebackList.push(item)
},
delpurchasebackList(index) {
this.dataForm.purchasebackitemList.splice(index, 1);
this.dataForm.purchasebackList.splice(index, 1);
},
addcollectionpoList() {
let item = {
@ -1028,11 +1028,11 @@
for (let i = 0; i < _data.invoices_item0itemList.length; i++) {
var _list = _data.invoices_item0itemList[i];
}
for (let i = 0; i < _data.paymentitemList.length; i++) {
var _list = _data.paymentitemList[i];
for (let i = 0; i < _data.paymentList.length; i++) {
var _list = _data.paymentList[i];
}
for (let i = 0; i < _data.purchasebackitemList.length; i++) {
var _list = _data.purchasebackitemList[i];
for (let i = 0; i < _data.purchasebackList.length; i++) {
var _list = _data.purchasebackList[i];
}
for (let i = 0; i < _data.collectionitemList.length; i++) {
var _list = _data.collectionitemList[i];
@ -1047,11 +1047,11 @@
for (let i = 0; i < _dataAll.invoices_item0itemList.length; i++) {
var _list = _dataAll.invoices_item0itemList[i];
}
for (let i = 0; i < _dataAll.paymentitemList.length; i++) {
var _list = _dataAll.paymentitemList[i];
for (let i = 0; i < _dataAll.paymentList.length; i++) {
var _list = _dataAll.paymentList[i];
}
for (let i = 0; i < _dataAll.purchasebackitemList.length; i++) {
var _list = _dataAll.purchasebackitemList[i];
for (let i = 0; i < _dataAll.purchasebackList.length; i++) {
var _list = _dataAll.purchasebackList[i];
}
for (let i = 0; i < _dataAll.collectionitemList.length; i++) {
var _list = _dataAll.collectionitemList[i];

@ -73,6 +73,8 @@
<el-table-column label="操作" fixed="right" width="100" align="center" >
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row)">
</el-button>
@ -309,20 +311,14 @@
this.$message({
type: 'error',
message: '未开具发票,无需退货',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
});
return
}else if(row.status == '3'){
this.$message({
type: 'error',
message: '已归档,无需退货',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
});
return
}else{
@ -351,10 +347,7 @@
this.$message({
type: 'error',
message: '已' + msg +'无法删除',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
});
return
}
@ -402,10 +395,7 @@
this.$message({
type: 'error',
message: '已开票或入库或归档的票无法删除',
duration: 1000,
onClose: () => {
this.initData()
}
duration: 1000
});
return
}
@ -432,10 +422,7 @@
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -444,10 +431,7 @@
this.$message({
type: 'error',
message: '该订单未入库或者已归档',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -455,10 +439,7 @@
this.$message({
type: 'error',
message: '发票金额和已付款金额和金额不等无法归档',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -482,10 +463,7 @@
this.$message({
type: 'error',
message: '请选择数据',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -499,10 +477,7 @@
this.$message({
type: 'error',
message: '存在订单已付款或请先入库',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -511,7 +486,6 @@
statusFlag = false;
}
}
console.log('aaaaaa', this.multipleSelection);
const ids = this.multipleSelection.join()
request({
url: `/api/purchaseorder/Purchaseorder/batchQueryPurchaseorder/${ids}`,
@ -527,10 +501,7 @@
this.$message({
type: 'error',
message: '已付款金额不得大于订单金额',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -555,10 +526,7 @@
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -566,10 +534,7 @@
this.$message({
type: 'error',
message: '该订单已入库或请先录入发票',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -587,10 +552,7 @@
this.$message({
type: 'error',
message: '发票金额与金额不一致,无法入库',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -601,10 +563,7 @@
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -612,10 +571,7 @@
this.$message({
type: 'error',
message: '该订单已开票',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
})
return
}
@ -646,10 +602,7 @@
this.$message({
type: 'error',
message: '已' + msg +'无法编辑',
duration: 1500,
onClose: () => {
this.initData()
}
duration: 1500
});
return
}

Loading…
Cancel
Save