修改不垫资预收和首页字段重复问题

product
bawei 1 year ago
parent 5a0d763963
commit dfe77c6acc

@ -63,6 +63,7 @@ import jnpf.saleorder.entity.SalesbacksoitemEntity;
import jnpf.saleorder.entity.Salesorder_item0Entity; import jnpf.saleorder.entity.Salesorder_item0Entity;
import jnpf.supplier.entity.SupplierEntity; import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.service.SupplierService; import jnpf.supplier.service.SupplierService;
import jnpf.tradeupload.model.tradeupload.TradeuploadUpForm;
import jnpf.util.*; import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum; import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
@ -1264,25 +1265,28 @@ public class PurchaseorderController {
* @param id * @param id
* @return * @return
*/ */
@GetMapping("noadvance/{id}") @PutMapping("noadvance/{id}")
public ActionResult noAdvance(@PathVariable("id") String id) { @Transactional
public ActionResult noAdvance(@PathVariable("id") String id,@RequestBody @Valid PurchaseorderUpForm purchaseorderUpForm) throws DataException {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id); PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
QueryWrapper<Purchaseorder_item0Entity> purchaseorder_item0QueryWrapper=new QueryWrapper<>(); QueryWrapper<PoundlistEntity> poundlistEntityQueryWrapper=new QueryWrapper<>();
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId,entity.getId()); poundlistEntityQueryWrapper.lambda().eq(PoundlistEntity::getPurchaseorderId,entity.getId());
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getAdvance,0); poundlistEntityQueryWrapper.lambda().eq(PoundlistEntity::getAdvance,0);
purchaseorder_item0QueryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId); poundlistEntityQueryWrapper.lambda().select(PoundlistEntity::getId);
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList()); List<String> poundlistIdList = poundlistService.listObjs(poundlistEntityQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
if (poundlistIdList.size()>0){
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList); List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
if (poundlistList.size()>0){
for (PoundlistEntity poundlistEntity: poundlistList) { for (PoundlistEntity poundlistEntity: poundlistList) {
poundlistEntity.setIsCollection("1"); poundlistEntity.setIsCollection("1");
poundlistEntity.setPaymentDate(new Date()); poundlistEntity.setPaymentDate(purchaseorderUpForm.getPaymentDate());
// poundlistEntity.setPaymentDate(new Date());
} }
poundlistService.updateBatchById(poundlistList); poundlistService.updateBatchById(poundlistList);
return ActionResult.success("不垫资回款预收成功"); return ActionResult.success("不垫资回款预收成功");
}else { }else {
return ActionResult.success("没有不垫资回款预收"); return ActionResult.fail("该订单没有不垫资回款预收");
} }
} }

@ -11,6 +11,8 @@ import jnpf.purchaseorder.model.purchaseorder.PaymentitemModel;
import jnpf.purchaseorder.model.purchaseorder.PurchasebackitemModel; import jnpf.purchaseorder.model.purchaseorder.PurchasebackitemModel;
import jnpf.purchaseorder.model.purchaseorder.CollectionitemModel; import jnpf.purchaseorder.model.purchaseorder.CollectionitemModel;
import lombok.Data; import lombok.Data;
import java.util.Date;
import java.util.List; import java.util.List;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -123,6 +125,9 @@ public class PurchaseorderUpForm{
@JsonProperty("paymentTime") @JsonProperty("paymentTime")
private String paymentTime; private String paymentTime;
@JsonProperty("PaymentDate")
private Date PaymentDate;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("purchaseorder_item0List") @JsonProperty("purchaseorder_item0List")
private List<Purchaseorder_item0Model> purchaseorder_item0List; private List<Purchaseorder_item0Model> purchaseorder_item0List;

@ -491,7 +491,7 @@
<!--榜单张数--> <!--榜单张数-->
<result property="poundNum" column="poundNum"/> <result property="poundNum" column="poundNum"/>
<!--总扣重--> <!--总扣重-->
<result property="buckleWeightSum" column="buckleWeightSum"/> <result property="buckleWeightSums" column="buckleWeightSums"/>
<!--总结算重量--> <!--总结算重量-->
<result property="settlementSum" column="settlementSum"/> <result property="settlementSum" column="settlementSum"/>
<!--采购总额--> <!--采购总额-->
@ -509,7 +509,7 @@
IFNULL( IFNULL(
ROUND( SUM( CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), 6 ), ROUND( SUM( CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), 6 ),
0 0
) buckleWeightSum ) buckleWeightSums
FROM FROM
jg_poundlist a jg_poundlist a
WHERE WHERE
@ -840,7 +840,7 @@ SELECT
F_FullName AS FFullName, F_FullName AS FFullName,
COUNT( b.id ) AS bangdan, COUNT( b.id ) AS bangdan,
SUM( SUM(
Round( IF ( b.unit = '1', b.settlement / 1000, b.settlement ), 6 )) AS settlement, Round( IF ( b.unit = '1', b.settlement / 1000, b.settlement ), 3 )) AS settlement,
SUM( b.amount ) AS amout, SUM( b.amount ) AS amout,
SUM( b.amount ) - c.pay_price AS notPaypalAmounts, SUM( b.amount ) - c.pay_price AS notPaypalAmounts,
c.pay_price AS paypalamounts c.pay_price AS paypalamounts

@ -82,9 +82,11 @@ export default {
this.list.map((val) => { this.list.map((val) => {
listCount.amout = listCount.amout + val.amout; listCount.amout = listCount.amout + val.amout;
listCount.bangdan = listCount.bangdan + val.bangdan; listCount.bangdan = listCount.bangdan + val.bangdan;
listCount.notPaypalAmounts = Math.round(listCount.notPaypalAmounts*100)/100 + val.notPaypalAmounts; // listCount.notPaypalAmounts = Math.round(listCount.notPaypalAmounts*100)/100 + val.notPaypalAmounts;
listCount.paypalamounts = Math.round(listCount.paypalamounts*100)/100 + val.paypalamounts; listCount.paypalamounts = Math.round(listCount.paypalamounts*100)/100 + val.paypalamounts;
listCount.settlement = Math.round(listCount.settlement*100)/100 + val.settlement; // listCount.settlement = Math.round(listCount.settlement*100)/100 + val.settlement;
listCount.settlement = listCount.settlement + val.settlement;
listCount.notPaypalAmounts = listCount.notPaypalAmounts + val.notPaypalAmounts;
return val; return val;
}); });
this.list = [...this.list, listCount]; this.list = [...this.list, listCount];

@ -44,7 +44,7 @@
<li> <li>
<span>上货量()</span> <span>上货量()</span>
<p class="nums"> <p class="nums">
<count-to :start-val="0" :end-val="tadayPoundist.buckleWeightSum" :duration="3600" class="card-panel-num" /> <count-to :start-val="0" :end-val="tadayPoundist.buckleWeightSums" :duration="3600" class="card-panel-num" />
</p> </p>
<!-- <span>-0.3%</span> --> <!-- <span>-0.3%</span> -->
</li> </li>
@ -218,7 +218,6 @@ export default {
this.tadayPoundist.poundNum = res.data.poundNum; this.tadayPoundist.poundNum = res.data.poundNum;
this.tadayPoundist.purchaseAmountSum = res.data.purchaseAmountSum; this.tadayPoundist.purchaseAmountSum = res.data.purchaseAmountSum;
this.tadayPoundist.salesAmountSum = res.data.salesAmountSum; this.tadayPoundist.salesAmountSum = res.data.salesAmountSum;
this.tadayPoundist.settlementSum = res.data.settlementSum;
this.tadayPoundist.buckleWeightSum = res.data.buckleWeightSum; this.tadayPoundist.buckleWeightSum = res.data.buckleWeightSum;
} }
}).catch(() => { }).catch(() => {
@ -232,7 +231,7 @@ export default {
}, },
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.tadayPoundist.buckleWeightSum = res.data.buckleWeightSum; this.tadayPoundist.buckleWeightSums = res.data.buckleWeightSums;
this.tadayPoundist.bangdannum = res.data.bangdannum; this.tadayPoundist.bangdannum = res.data.bangdannum;
} }
}).catch(() => { }).catch(() => {

@ -875,9 +875,9 @@ export default {
this.initData(); this.initData();
}, },
resetAll() { resetAll() {
// for (let key in this.query) { for (let key in this.query) {
// this.query[key] = undefined this.query[key] = undefined
// } }
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,

@ -452,6 +452,7 @@
<JNPF-Form4 v-if="formVisible4" ref="JNPFForm4" @refresh="refresh4" /> <JNPF-Form4 v-if="formVisible4" ref="JNPFForm4" @refresh="refresh4" />
<JNPF-Form5 v-if="formVisible5" ref="JNPFForm5" @refresh="refresh5" /> <JNPF-Form5 v-if="formVisible5" ref="JNPFForm5" @refresh="refresh5" />
<JNPF-Form6 v-if="formVisible6" ref="JNPFForm6" @refresh="refresh6" /> <JNPF-Form6 v-if="formVisible6" ref="JNPFForm6" @refresh="refresh6" />
<JNPF-Form7 v-if="formVisible7" ref="JNPFForm7" @refresh="refresh7" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" /> <FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail <Detail
@ -472,6 +473,7 @@ import JNPFForm3 from "./receiptinForm";
import JNPFForm4 from "./PaymentdocForm"; import JNPFForm4 from "./PaymentdocForm";
import JNPFForm5 from "./purchasebackForm"; import JNPFForm5 from "./purchasebackForm";
import JNPFForm6 from "../poundlist/salesForm"; import JNPFForm6 from "../poundlist/salesForm";
import JNPFForm7 from "./AdvanceForm";
import FlowBox from "@/views/workFlow/components/FlowBox"; import FlowBox from "@/views/workFlow/components/FlowBox";
import ImportForm from "./PurchaseorderImportForm"; import ImportForm from "./PurchaseorderImportForm";
import ExportBox from "./ExportBox"; import ExportBox from "./ExportBox";
@ -488,6 +490,7 @@ export default {
JNPFForm4, JNPFForm4,
JNPFForm5, JNPFForm5,
JNPFForm6, JNPFForm6,
JNPFForm7,
FlowBox, FlowBox,
ExportBox, ExportBox,
Detail, Detail,
@ -523,6 +526,7 @@ export default {
formVisible4: false, formVisible4: false,
formVisible5: false, formVisible5: false,
formVisible6: false, formVisible6: false,
formVisible7: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ {
@ -1056,8 +1060,7 @@ export default {
}, },
noAdvance() { noAdvance() {
if ( if (
!this.multipleSelectionItem.length || !this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1
this.multipleSelectionItem.length != 1
) { ) {
this.$message({ this.$message({
type: "error", type: "error",
@ -1066,21 +1069,48 @@ export default {
}); });
return; return;
} }
request({
url: var id = undefined;
"/api/purchaseorder/Purchaseorder/noadvance/" + this.multipleSelectionItem[0].id, id= this.multipleSelectionItem[0].id
method: "get",
}).then((res) => { // id = row.id;
this.$message({
type: "success", this.formVisible7 = true;
message: res.msg, this.$nextTick(() => {
duration: 2500, this.$refs.JNPFForm7.init(id);
onClose: () => {
this.initData();
},
});
}); });
}, },
// noAdvance(row, isDetail) {
// if (
// !this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1
// ) {
// this.$message({
// type: "error",
// message: "",
// duration: 2500,
// });
// return;
// }
// const list = this.multipleSelectionItem.join();
// this.formVisible7 = true;
// this.$nextTick(() => {
// this.$refs.JNPFForm7.init(list);
// });
// request({
// url:
// "/api/purchaseorder/Purchaseorder/" +
// this.multipleSelectionItem[0].id,
// method: "get",
// }).then((res) => {
// id = row.id;
// this.formVisible7 = true;
// this.$nextTick(() => {
// this.$refs.JNPFForm7.init(id ,isDetail);
// });
//
// });
// },
guidangHandle() { guidangHandle() {
if (!this.multipleSelectionItem.length) { if (!this.multipleSelectionItem.length) {
@ -1414,6 +1444,10 @@ export default {
this.formVisible6 = false; this.formVisible6 = false;
if (isrRefresh) this.reset(); if (isrRefresh) this.reset();
}, },
refresh7(isrRefresh) {
this.formVisible7 = false;
if (isrRefresh) this.reset();
},
colseFlow(isrRefresh) { colseFlow(isrRefresh) {
this.flowVisible = false; this.flowVisible = false;
if (isrRefresh) this.reset(); if (isrRefresh) this.reset();

Loading…
Cancel
Save