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

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.supplier.entity.SupplierEntity;
import jnpf.supplier.service.SupplierService;
import jnpf.tradeupload.model.tradeupload.TradeuploadUpForm;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
@ -1264,25 +1265,28 @@ public class PurchaseorderController {
* @param id
* @return
*/
@GetMapping("noadvance/{id}")
public ActionResult noAdvance(@PathVariable("id") String id) {
@PutMapping("noadvance/{id}")
@Transactional
public ActionResult noAdvance(@PathVariable("id") String id,@RequestBody @Valid PurchaseorderUpForm purchaseorderUpForm) throws DataException {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
QueryWrapper<Purchaseorder_item0Entity> purchaseorder_item0QueryWrapper=new QueryWrapper<>();
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId,entity.getId());
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getAdvance,0);
purchaseorder_item0QueryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
if (poundlistList.size()>0){
QueryWrapper<PoundlistEntity> poundlistEntityQueryWrapper=new QueryWrapper<>();
poundlistEntityQueryWrapper.lambda().eq(PoundlistEntity::getPurchaseorderId,entity.getId());
poundlistEntityQueryWrapper.lambda().eq(PoundlistEntity::getAdvance,0);
poundlistEntityQueryWrapper.lambda().select(PoundlistEntity::getId);
List<String> poundlistIdList = poundlistService.listObjs(poundlistEntityQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
if (poundlistIdList.size()>0){
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
for (PoundlistEntity poundlistEntity: poundlistList) {
poundlistEntity.setIsCollection("1");
poundlistEntity.setPaymentDate(new Date());
poundlistEntity.setPaymentDate(purchaseorderUpForm.getPaymentDate());
// poundlistEntity.setPaymentDate(new Date());
}
poundlistService.updateBatchById(poundlistList);
return ActionResult.success("不垫资回款预收成功");
return ActionResult.success("不垫资回款预收成功");
}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.CollectionitemModel;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -123,6 +125,9 @@ public class PurchaseorderUpForm{
@JsonProperty("paymentTime")
private String paymentTime;
@JsonProperty("PaymentDate")
private Date PaymentDate;
/** 子表数据 **/
@JsonProperty("purchaseorder_item0List")
private List<Purchaseorder_item0Model> purchaseorder_item0List;

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

@ -82,9 +82,11 @@ export default {
this.list.map((val) => {
listCount.amout = listCount.amout + val.amout;
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.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;
});
this.list = [...this.list, listCount];

@ -44,7 +44,7 @@
<li>
<span>上货量()</span>
<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>
<!-- <span>-0.3%</span> -->
</li>
@ -218,7 +218,6 @@ export default {
this.tadayPoundist.poundNum = res.data.poundNum;
this.tadayPoundist.purchaseAmountSum = res.data.purchaseAmountSum;
this.tadayPoundist.salesAmountSum = res.data.salesAmountSum;
this.tadayPoundist.settlementSum = res.data.settlementSum;
this.tadayPoundist.buckleWeightSum = res.data.buckleWeightSum;
}
}).catch(() => {
@ -232,7 +231,7 @@ export default {
},
}).then(res => {
if (res.code == 200) {
this.tadayPoundist.buckleWeightSum = res.data.buckleWeightSum;
this.tadayPoundist.buckleWeightSums = res.data.buckleWeightSums;
this.tadayPoundist.bangdannum = res.data.bangdannum;
}
}).catch(() => {

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

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

Loading…
Cancel
Save