Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit 37711cee80

@ -20,6 +20,8 @@ import jnpf.collection.model.collection.*;
import jnpf.collection.service.CollectionService;
import jnpf.collection.service.Collection_item0Service;
import jnpf.config.ConfigValueUtil;
import jnpf.contractfile.entity.ContractFileEntity;
import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
@ -84,7 +86,14 @@ public class CollectionController {
private Salesorder_item0Service salesorder_item0Service;
@Autowired
private PoundlistService poundlistService;
@Autowired
private ContractFileService contractFileService;
/**
*
*
* @param param
* @return
*/
@GetMapping("/autoSerialNum")
@Transactional
public ActionResult autoSerialNum(@Param("param") String param,@Param("batchNum") String batchNum) throws DataException {
@ -93,6 +102,29 @@ public class CollectionController {
}
/**
*
*
* @param param
* @return
*/
@GetMapping("/display")
public ActionResult collectionDisplay(@Param("param") String param) {
QueryWrapper<ContractFileEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ContractFileEntity::getCode,param);
queryWrapper.lambda().eq(ContractFileEntity::getContractType,"1");
queryWrapper.lambda().eq(ContractFileEntity::getStatus,"1");
List<ContractFileEntity> contractFileList = contractFileService.list(queryWrapper);
ContractFileEntity entity = new ContractFileEntity();
if (contractFileList.size()>0){
String contractId = contractFileList.get(0).getId();
List<SaleorderitemEntity> list = collectionService.querySaleOrderInfo(contractId);
entity.setId(contractId);
entity.setSaleorderitemList(list);
}
return ActionResult.success(entity);
}
/**
*
*
@ -432,7 +464,7 @@ public class CollectionController {
collection_item0Entity.setAmountCollected(saleorderitemEntity.getAmountCollected());
collection_item0Entity.setContractId(saleorderitemEntity.getContractId());
collection_item0Entity.setSalesorderId(saleorderitemEntity.getId());
collection_item0Entity.setCreatorTime(saleorderitemEntity.getCreatorTime());
// collection_item0Entity.setCreatorTime(saleorderitemEntity.getCreatorTime());
collection_item0Entity.setNum(saleorderitemEntity.getNum());
collection_item0Entity.setAdvanceAmount(saleorderitemEntity.getAdvanceAmount());
collection_item0Entity.setRate(saleorderitemEntity.getRate());

@ -11,6 +11,8 @@ import jnpf.saleorder.entity.SaleorderitemEntity;
import jnpf.saleorder.model.saleorderitem.SaleorderitemPagination;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* collection
@ -22,5 +24,7 @@ import org.apache.ibatis.annotations.Param;
public interface CollectionMapper extends BaseMapper<CollectionEntity> {
PoundlistEntity queryPound(@Param("poundlistId") String poundlistId);
List<SaleorderitemEntity> querySaleOrder(String contractId);
IPage<CollectionEntity> queryCollection(@Param("page") Page<CollectionEntity> page, @Param("collectionPagination") CollectionPagination collectionPagination);
}

@ -6,6 +6,7 @@ import jnpf.collection.entity.CollectionEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.collection.model.collection.CollectionPagination;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.saleorder.entity.SaleorderitemEntity;
import java.util.*;
/**
@ -39,5 +40,7 @@ public interface CollectionService extends IService<CollectionEntity> {
PoundlistEntity test (String poundlistId);
List<SaleorderitemEntity> querySaleOrderInfo(String contractId);
//列表子表数据方法
}

@ -6,6 +6,8 @@ import jnpf.collection.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.saleorder.entity.SaleorderitemEntity;
import jnpf.saleorder.mapper.SaleorderitemMapper;
import jnpf.util.RandomUtil;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
@ -61,6 +63,8 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
private CollectionMapper collectionMapper;
@Autowired
private PoundlistService poundlistService;
@Resource
private SaleorderitemMapper saleorderitemMapper;
@ -279,6 +283,11 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
return collectionMapper.queryPound(poundlistId);
}
@Override
public List<SaleorderitemEntity> querySaleOrderInfo(String contractId) {
return collectionMapper.querySaleOrder(contractId) ;
}
//列表子表数据方法

@ -1,10 +1,12 @@
package jnpf.contractfile.entity;
import com.baomidou.mybatisplus.annotation.*;
import jnpf.saleorder.entity.SaleorderitemEntity;
import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
/**
@ -141,4 +143,7 @@ public class ContractFileEntity {
//客户ID
@TableField(exist = false)
private String customerId;
@TableField(exist = false)
private List<SaleorderitemEntity> saleorderitemList;
}

@ -128,6 +128,10 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
}
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> iPage = poundlistMapper.queryByKeyword(page, poundlistPagination);
// IPage<PoundlistEntity> userIPage = poundlistMapper.queryByKeyword(page, poundlistPagination);
//
// IPage<PoundlistEntity> iPage=this.page(userIPage, poundlistQueryWrapper);
return poundlistPagination.setData(iPage.getRecords(),iPage.getTotal());
}
@Override

@ -148,6 +148,7 @@ public class SalebackController {
salebackCrForm.setCreatorUserName(userInfo.getUserId());
SalebackEntity entity = JsonUtil.getJsonToBean(salebackCrForm, SalebackEntity.class);
entity.setId(mainId);
entity.setStatus("0");
salebackService.save(entity);
List<Saleback_item0Entity> Saleback_item0List = JsonUtil.getJsonToList(salebackCrForm.getSaleback_item0List(),Saleback_item0Entity.class);
for(Saleback_item0Entity entitys : Saleback_item0List){

@ -33,4 +33,12 @@
</if>
</select>
<select id="querySaleOrder" resultType="jnpf.saleorder.entity.SaleorderitemEntity">
select * from jg_salesorder
where contract_id = #{contractId}
and status = '2'
and amount_collected &lt; price
and delete_mark = '0'
</select>
</mapper>

@ -10,33 +10,33 @@
<li>
<span>磅单张数()</span>
<p class="nums">
<count-to :start-val="0" :end-val="124546233" :duration="2600" class="card-panel-num" />
<count-to :start-val="0" :end-val="tadayPoundist.poundNum" :duration="2600" class="card-panel-num" />
</p>
<!-- <span>+2.34%</span> -->
</li>
<li>
<span>总扣重()</span>
<p class="nums">
<count-to :start-val="0" :end-val="92" :duration="3600" class="card-panel-num" />
<count-to :start-val="0" :end-val="tadayPoundist.buckleWeightSum" :duration="3600" class="card-panel-num" />
</p>
<!-- <span>-0.3%</span> -->
</li>
<li>
<span>总结算重量()</span>
<span>23:26:59</span>
<span>{{tadayPoundist.settlementSum}}</span>
<!-- <span>活动时间48小时</span> -->
</li>
<li>
<span>采购总额()</span>
<p class="nums">
<count-to :start-val="0" :end-val="2663" :duration="2600" class="card-panel-num" />
<count-to :start-val="0" :end-val="tadayPoundist.purchaseAmountSum" :duration="2600" class="card-panel-num" />
</p>
<!-- <span> +9.34%</span> -->
</li>
<li>
<span>销售总额()</span>
<p class="lastnums">
<count-to :start-val="0" :end-val="569" :duration="2600" class="card-panel-num" />
<count-to :start-val="0" :end-val="tadayPoundist.salesAmountSum" :duration="2600" class="card-panel-num" />
</p>
</li>
</ul>
@ -118,7 +118,8 @@ export default {
value1: '',
charts: '',
opinionData: ["3", "2", "4", "4", "5"],
massageList: []
massageList: [],
tadayPoundist: {},
}
},
computed: {
@ -129,6 +130,7 @@ export default {
},
created() {
this.portalId = this.userInfo.portalId
this.getTadayPoundist()
this.getData()
this.getMsg()
},
@ -156,17 +158,31 @@ export default {
method: "post",
data: {
currentPage: 1,
pageSize: 9,
pageSize: 9,
},
}).then(res => {
if(res.code==200){
if (res.code == 200) {
let _list = res.data.list;
this.massageList = _list;
//console.log(_list)
}
}).catch(() => {
})
console.log('getMsg')
},
getTadayPoundist() {
request({
url: "/api/messageCenter/MessageCenter/getTadayPoundist",
method: "get",
data: {
},
}).then(res => {
console.log('hereA');
if (res.code == 200) {
this.tadayPoundist = res.data;
console.log(this.tadayPoundist)
}
}).catch(() => {
})
}
}
}

@ -25,7 +25,7 @@
<el-form-item label="合同名称" prop="contractId">
<popupSelect v-model="dataForm.contractId" placeholder="请选择" clearable field="contractId"
interfaceId="399835312982972805" :bissId="dataForm.customerId" :columnOptions="contractNamecolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="contractSelect"
>
</popupSelect>
</el-form-item>
@ -414,13 +414,13 @@
mounted() {},
methods: {
paymentTypeChange(e){
this.paymentType = e;
this.dataForm.paymentType = e;
},
currencyChange(e){
this.currency = e;
this.dataForm.currency = e;
},
settlementTypeChange(e){
this.settlementType = e;
this.dataForm.settlementType = e;
},
getSummaries(param) {
const { columns, data } = param;
@ -458,6 +458,31 @@
this.dataForm.collectionCount = d.bank_account;
this.dataForm.collectionBank = d.bank;
this.dataForm.collection_item0List = [];
let params = {
"param" : this.dataForm.customerId
}
request({
url: '/api/collection/Collection/display',
method: 'get',
data: params
}).then(res => {
let data = res.data
this.dataForm.contractId = data.id
for (let i = 0; i< data.saleorderitemList.length;i++){
this.addcollection_item0List();
this.dataForm.collection_item0List[i].salesorderId = data.saleorderitemList[i].id;
this.dataForm.collection_item0List[i].price = data.saleorderitemList[i].price;
this.dataForm.collection_item0List[i].amountCollected = data.saleorderitemList[i].amountCollected;
this.dataForm.collection_item0List[i].contractId = data.saleorderitemList[i].contractId;
this.dataForm.collection_item0List[i].num = data.saleorderitemList[i].num;
this.dataForm.collection_item0List[i].advanceAmount = data.saleorderitemList[i].advanceAmount;
this.dataForm.collection_item0List[i].rate = data.saleorderitemList[i].rate;
this.dataForm.collection_item0List[i].notPrice = data.saleorderitemList[i].notPrice;
this.dataForm.collection_item0List[i].amount = this.jnpf.floatSub(data.saleorderitemList[i].price,data.saleorderitemList[i].amountCollected);
this.dataForm.collection_item0List[i].creatorTime = new Date().getTime();
}
this.loading = false
});
},
contractSelect(){
this.dataForm.collection_item0List = [];
@ -474,7 +499,6 @@
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
this.dataForm.collection_item0List[i].rate = b.rate;
this.dataForm.collection_item0List[i].notPrice = b.not_price;
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
this.dataForm.collection_item0List[i].amount = this.jnpf.floatSub(b.price,b.amount_collected);
this.dataForm.collection_item0List[i].creatorTime = new Date().getTime();
amountCollectedSum = this.jnpf.floatAdd(amountCollectedSum,this.dataForm.collection_item0List[i].amount);
@ -499,6 +523,9 @@
data[key] = "";
}
}
this.dataForm.paymentType = '0'
this.dataForm.currency = '0'
this.dataForm.settlementType = '0'
let params = {
"param" : 'collection'
}
@ -536,6 +563,7 @@
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.collection_item0Exist()) return
this.request()
@ -581,15 +609,14 @@
addcollection_item0List() {
let item = {
amount: undefined,
creatorUserId: undefined,
creatorUserName: undefined,
deleteTime: undefined,
lastModifyUserId: undefined,
lastModifyUserName: undefined,
taxRate: undefined,
lastModifyTime: undefined,
deleteUserId: undefined,
deleteUserName: undefined,
price: undefined,
amountCollected: undefined,
salesorderId: undefined,
contractId: undefined,
num: undefined,
advanceAmount: undefined,
rate: undefined,
notPrice: undefined,
creatorTime: undefined,
}
this.dataForm.collection_item0List.push(item)
@ -613,6 +640,7 @@
var _list = _dataAll.collection_item0List[i];
}
this.dataForm = _dataAll
debugger
},
},
}

@ -26,7 +26,7 @@
<el-col :span="8">
<el-form-item label="币别" prop="currency">
<el-select v-model="dataForm.currency" placeholder="请选择" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
@ -35,14 +35,14 @@
</el-col>
<el-col :span="8">
<el-form-item label="退款金额" prop="refundAmount" >
<el-input v-model="dataForm.refundAmount" readonly clearable :style='{"width":"100%"}' >
<el-input v-model="dataForm.refundAmount" readonly clearable :style='{"width":"100%"}' disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="退货数量" prop="refundNum" >
<el-input v-model="dataForm.refundNum" readonly clearable :style='{"width":"100%"}' >
<el-input v-model="dataForm.refundNum" readonly clearable :style='{"width":"100%"}' disabled>
</el-input>
</el-form-item>
@ -78,38 +78,38 @@
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="381037852907038533" :columnOptions="jg_salesback_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
popupWidth="800px">
popupWidth="800px" disabled>
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量 " align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in unitOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="采购单价" align="center" width="130">
<el-table-column prop="price" label="销售单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in rateOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
@ -119,14 +119,14 @@
<el-table-column prop="amount" label="应退金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
@ -134,14 +134,14 @@
<template slot-scope="scope">
<popupSelect v-model="scope.row.businessId"
placeholder="请选择" clearable :field="'businessId'+scope.$index" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="jg_salesback_item0businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName" popupType="dialog"
popupWidth="800px">
popupWidth="800px" disabled>
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in pountTypeOptions"
:key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>

@ -343,7 +343,7 @@
for (let i = 0;i<list.length;i++){
this.dataForm.collection_item0List[i].salesorderId = list[i].id;
this.dataForm.collection_item0List[i].rate = this.jnpf.floatSub(list[i].price,list[i].notPrice);
// this.dataForm.collection_item0List[i].amount = list[i].price - list[i].amountCollected;
this.dataForm.collection_item0List[i].creatorTime = new Date().getTime();
amountCollected = this.jnpf.floatAdd(amountCollected, this.dataForm.collection_item0List[i].amount);
debugger
}

@ -59,7 +59,7 @@
<el-button type="text" icon="el-icon-delete" @click="invoicesEntry()">
</el-button>
<!-- <el-button type="text" icon="el-icon-delete" @click="collection()">
</el-button> -->
</el-button>-->
<el-button type="text" icon="el-icon-check" @click="archive()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="materialBack()">退

@ -18,7 +18,7 @@
<popupSelect v-model="dataForm.salesOrderId" placeholder="请选择" clearable
field="salesOrderId" interfaceId="383568951197606085"
:columnOptions="salesOrderIdcolumnOptions" :excludeFields="excludeFields" propsValue="id" relationField="document_no"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange" disabled>
</popupSelect>
</el-form-item>
@ -26,7 +26,7 @@
<el-col :span="8">
<el-form-item label="币别" prop="currency">
<el-select v-model="dataForm.currency" placeholder="请选择" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>

Loading…
Cancel
Save