问题修改

product
Vayne 2 years ago
parent c7d10e6455
commit 9179c6a90e

@ -147,8 +147,7 @@ public class PoundlistController {
}else{ }else{
return ActionResult.success(list); return ActionResult.success(list);
} }
} }else {
else {
return ActionResult.fail("当前状态不能生成销售订单"); return ActionResult.fail("当前状态不能生成销售订单");
} }
} }

@ -34,6 +34,8 @@ import jnpf.materialvo.service.MaterialService;
import jnpf.poundlist.entity.PoundlistEntity; import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService; import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseorder.entity.Purchaseorder_item0Entity; import jnpf.purchaseorder.entity.Purchaseorder_item0Entity;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.service.PurchaseorderitemService;
import jnpf.receiptin.entity.Receiptin_item0Entity; import jnpf.receiptin.entity.Receiptin_item0Entity;
import jnpf.receiptin.service.Receiptin_item0Service; import jnpf.receiptin.service.Receiptin_item0Service;
import jnpf.receiptout.entity.ReceiptoutEntity; import jnpf.receiptout.entity.ReceiptoutEntity;
@ -166,6 +168,8 @@ public class SaleorderitemController {
private CustomerService customerService; private CustomerService customerService;
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
@Autowired
private PurchaseorderitemService purchaseorderitemService;
/** /**
* *
@ -540,36 +544,15 @@ public class SaleorderitemController {
entitys.setSalesOrderId(entity.getId()); entitys.setSalesOrderId(entity.getId());
salesorder_item0Service.save(entitys); salesorder_item0Service.save(entitys);
} }
/* List<ReceiptoutsoitemEntity> ReceiptoutsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getReceiptoutsoitemList(),ReceiptoutsoitemEntity.class); if (StringUtils.isNotEmpty(saleorderitemCrForm.getIsTransfer()) && saleorderitemCrForm.getIsTransfer().equals("1")){
for(ReceiptoutsoitemEntity entitys : ReceiptoutsoitemList){ if (StringUtils.isNotEmpty(saleorderitemCrForm.getPurchaseOrderId())){
entitys.setId(RandomUtil.uuId()); PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getById(saleorderitemCrForm.getPurchaseOrderId());
entitys.setSourceNo(entity.getDocumentNo()); if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)){
receiptoutsoitemService.save(entitys); purchaseorderitemEntity.setIsTransfer("1");
} purchaseorderitemService.updateById(purchaseorderitemEntity);
List<Arinvoices_item0soitemEntity> Arinvoices_item0soitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getArinvoices_item0soitemList(),Arinvoices_item0soitemEntity.class); }
for(Arinvoices_item0soitemEntity entitys : Arinvoices_item0soitemList){ }
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderNo(entity.getDocumentNo());
arinvoices_item0soitemService.save(entitys);
}
List<CollectionsoitemEntity> CollectionsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getCollectionsoitemList(),CollectionsoitemEntity.class);
for(CollectionsoitemEntity entitys : CollectionsoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderNo(entity.getDocumentNo());
collectionsoitemService.save(entitys);
}
List<SalesbacksoitemEntity> SalesbacksoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getSalesbacksoitemList(),SalesbacksoitemEntity.class);
for(SalesbacksoitemEntity entitys : SalesbacksoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderId(entity.getId());
salesbacksoitemService.save(entitys);
} }
List<PaymentsoitemEntity> PaymentsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getPaymentsoitemList(),PaymentsoitemEntity.class);
for(PaymentsoitemEntity entitys : PaymentsoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentno(entity.getDocumentNo());
paymentsoitemService.save(entitys);
}*/
return ActionResult.success("创建成功"); return ActionResult.success("创建成功");
} }

@ -130,5 +130,10 @@ public class SaleorderitemCrForm {
@TableField("bidSection") @TableField("bidSection")
private String bidSection; private String bidSection;
@TableField("isTransfer")
private String isTransfer;
@TableField("purchaseOrderId")
private String purchaseOrderId;
} }

@ -745,9 +745,9 @@ public class TradeuploadController {
public ActionResult<TradeuploadInfoVO> info(@PathVariable("id") String id){ public ActionResult<TradeuploadInfoVO> info(@PathVariable("id") String id){
TradeuploadEntity entity= tradeuploadService.getInfo(id); TradeuploadEntity entity= tradeuploadService.getInfo(id);
TradeuploadInfoVO vo=JsonUtil.getJsonToBean(entity, TradeuploadInfoVO.class); TradeuploadInfoVO vo=JsonUtil.getJsonToBean(entity, TradeuploadInfoVO.class);
// if(vo.getCreatorTime()!=null){ if(vo.getCreatorTime()!=null){
// vo.setCreatorTime(vo.getCreatorTime()); vo.setCreatorTime(vo.getCreatorTime());
// } }
// vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace())); // vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
//子表 //子表
//副表 //副表

@ -724,8 +724,9 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
isTransfer: '',
purchaseOrderId: '',
documentNo: '', documentNo: '',
contractId: '', contractId: '',
customerId: '', customerId: '',
contractName: '', contractName: '',
@ -999,6 +1000,8 @@
this.dataForm.contractNo = list[0].contractNo this.dataForm.contractNo = list[0].contractNo
this.dataForm.contractName = list[0].contractName this.dataForm.contractName = list[0].contractName
this.dataForm.customerName = list[0].customerName this.dataForm.customerName = list[0].customerName
this.dataForm.isTransfer = list.isTransfer
this.dataForm.purchaseOrderId = list .purchaseOrderId
var num = 0 var num = 0
var amount = 0 var amount = 0
var advance = 0 var advance = 0
@ -1012,7 +1015,7 @@
this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.dataForm.salesorder_item0List[i].price, this.jnpf.floatAdd((1, this.jnpf.floatDiv(item.fullName,100)))) this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.dataForm.salesorder_item0List[i].price, this.jnpf.floatAdd((1, this.jnpf.floatDiv(item.fullName,100))))
notPrice = this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice) notPrice = this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice)
} }
}) })
if (list[i].advance == 1) { if (list[i].advance == 1) {
advance = this.jnpf.floatAdd(advance, this.jnpf.floatMul(list[i].salesPrice, list[i].settlement)) advance = this.jnpf.floatAdd(advance, this.jnpf.floatMul(list[i].salesPrice, list[i].settlement))
} }

@ -555,6 +555,20 @@
}) })
return return
} }
var flag = true;
this.multipleSelectionItem.forEach((item,index) => {
if(item.isTransfer == '1'){
flag = flase;
}
})
if(!flag){
this.$message({
type: 'error',
message: '此订单已经转销售',
duration: 2500
})
return
}
console.log('aaaaaaa', this.multipleSelectionItem) console.log('aaaaaaa', this.multipleSelectionItem)
var ids = ''; var ids = '';
this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{ this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{
@ -563,13 +577,18 @@
if(ids.length > 0){ if(ids.length > 0){
ids = ids.substring(0, ids.length - 1); ids = ids.substring(0, ids.length - 1);
} }
debugger
request({ request({
url: `/api/poundlist/Poundlist/createsale/${ids}`, url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post' method: 'post'
}).then(res => { }).then(res => {
var list = [] var list = []
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
// res.data[i].isTransfer = '1'
// res.data[i].purchaseOrderId = this.multipleSelectionItem[0].id
let _data = res.data[i] let _data = res.data[i]
_data.isTransfer = '1'
_data.purchaseOrderId = this.multipleSelectionItem[0].id
list.push(_data) list.push(_data)
} }
if (list.length>0) { if (list.length>0) {

@ -25,7 +25,7 @@
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable <popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable
field="materialId" interfaceId="381037852907038533" field="materialId" interfaceId="381037852907038533"
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" :columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" disabled> popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" >
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -216,7 +216,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button>
<!-- <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>--> <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -600,16 +600,16 @@
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date().getTime(); this.dataForm.poundDate = new Date().getTime();
this.loading = false this.loading = false
}); });
} else { } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date(); this.dataForm.poundDate = new Date().getTime();
} }
}); });
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})

@ -600,16 +600,16 @@
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date().getTime(); this.dataForm.poundDate = new Date().getTime();
this.loading = false this.loading = false
}); });
} else { } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date(); this.dataForm.poundDate = new Date().getTime();
} }
}); });
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})

@ -155,7 +155,7 @@
width="200"> width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="continueUpload(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">继续上传 @click="continueUpload(scope.row.id)" v-has="'btn_continueUpload'">继续上传
</el-button> </el-button>
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核 @click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核

Loading…
Cancel
Save