采购退货和销售退货问题处理

jg-waiwang-pro
vayne 5 months ago
parent 9bcb8f8d87
commit 7f9ae8f86a

@ -293,20 +293,21 @@
</view>
<view class="jnpf-table" v-if="judgeShow('settlementinfoList')">
<view class="jnpf-table-item" v-for="(item,i) in dataForm.settlementinfoList" :key="i">
<view class="jnpf-table-item-title u-flex u-row-between">
<text class="jnpf-table-item-title-num">({{i+1}})</text>
<view class="jnpf-table-item-title-action"
v-if=" !judgeWrite('settlementinfoList') && dataForm.settlementinfoList.length>0"
@click="delsettlementinfoList(i)">删除</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('settlementinfoList-subjectBasicId')"
:required="requiredList['settlementinfoList-subjectBasicId']" label="客户名称">
:required="requiredList['settlementinfoList-subjectBasicId']" label="供应商名称">
<u-input v-model="dataForm.settlementinfoList[i].subjectBasicId"
:disabled="judgeWrite('settlementinfoList')||judgeWrite('settlementinfoList-subjectBasicId')"
@change="changeData('settlementinfo-subjectBasicId',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
<jnpf-popup-select v-model="dataForm.settlementinfoList[i].subjectBasicId" :disabled="true"
@change="changeData('receiveAddress',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.deliveryAddress" clearable propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='addressDetail' vModel='receiveAddress'
:columnOptions="deliveryAddressColumnOptions" interfaceId="522724961224231173" :pageSize="20"
placeholder="请选择" type="popup" :style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
@ -1117,7 +1118,7 @@
expectArriveDateStart: [],
createOrderDate: [],
deliveryType: [],
contractId: [],
contractId: [{ "dataType": "varchar", "defaultValue": "", "field": "businessLineId", "fieldName": "", "id": "PneOdw1", "jnpfKey": "popupSelect", "relationField": "businessLineId", "required": "0" }],
currency: [],
saleMode: [],
correlatedOrderId: [],

@ -489,10 +489,9 @@ public class ReceiptOrderServiceImpl extends ServiceImpl<ReceiptOrderMapper, Rec
for(DeliveryProductRelationEntity entitys : tableField144){
entitys.setId(RandomUtil.uuId());
entitys.setOrderId(entity.getId());
if(isSave){
if(isSave && entity.getReceiptType().equals("1")){
entitys.setBatchNo(generaterSwapUtil.getBillNumber("batch", false));
entitys.setProduceTime(DateUtil.getNowDate());
}else{
}
deliveryProductRelationService.saveOrUpdate(entitys);
}

@ -701,6 +701,7 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
warehousingOutboundProductEntity.setSpec(entitys.getSpec());
warehousingOutboundProductEntity.setOutboundNumber(entitys.getDeliveryNum());
warehousingOutboundProductEntity.setBatchNumber(entitys.getBatchNo());
warehousingOutboundProductEntity.setInventoryUnitId(entitys.getInventoryUnitId());
warehousingOutboundProductEntity.setDateManufacture(entitys.getProduceTime());
warehousingOutboundProductEntity.setCreatorUserId(deliveryOrder.getCreatorUserId());
warehousingOutboundProductEntity.setOrganizeJsonId(deliveryOrder.getOrganizeJsonId());

@ -708,7 +708,7 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
if (receiptType.equals("1")) {
entity.setWarehousingStorageType("15");//采购收货单入库
}else if (receiptType.equals("2")){
entity.setWarehousingStorageType("16");//销售发货单出
entity.setWarehousingStorageType("16");//销售收货单入
}
entity.setWarehousingStorageStatus("3");//已入库
entity.setWarehousingId(receiptOrderForm.getId());

@ -81,6 +81,7 @@ public class YunguanInterfaceController {
return ActionResult.fail("请推送状态为S的客户");
}
SubjectbasicEntity subjectbasicEntity = new SubjectbasicEntity();
subjectbasicEntity.setId(jsonObject.get("ID").toString());//ID
subjectbasicEntity.setName(jsonObject.get("CUST_FULL_NAME").toString());//名称
subjectbasicEntity.setCalssify("1");//一级
subjectbasicEntity.setSubjectBasicType("1");//客户

@ -1,5 +1,5 @@
<template>
<el-dialog title="选择司机" :close-on-click-modal="false" :visible.sync="visible"
<el-dialog title="选择数据" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>

@ -558,20 +558,16 @@ export default {
})
return
}
if (this.multipleSelectionItem.length > 1) {
this.$message({
type: 'error',
message: '只能选择一条数据',
duration: 1500,
})
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true
let isSaleFlag = true
selectData.forEach(function (item) {
if (item.flowState != 2) {
stateFlag = false;
}
if (item.isSaleDeliveryVoucher == '2') {
isSaleFlag = false
}
});
if (!stateFlag) {
this.$message({
@ -581,14 +577,10 @@ export default {
})
return
}
let isSaleFlag = false
selectData.every(function (item) {
isSaleFlag = item.isSaleDeliveryVoucher == '1'
})
if (!isSaleFlag) {
this.$message({
type: 'error',
message: '订单已生成销售发货凭证',
message: '凭证已生成销售发货凭证',
duration: 1500,
})
return

@ -1303,7 +1303,6 @@ export default {
initVoucherList(list) {
for (let i = 0; i < list.length; i++) {
const e = list[i];
debugger
let item = {
voucherId: e.voucherId,
voucherCode: e.voucherCode,
@ -1342,7 +1341,6 @@ export default {
if (this.dataForm.deliveryProductRelationList.length == 0) {
this.dataForm.deliveryProductRelationList.push(productEntity);
} else {
debugger
const product = this.dataForm.deliveryProductRelationList.find(item => item.id == productEntity.id)
if (product) {
product.netWeight = this.jnpf.floatAdd(product.netWeight, productEntity.netWeight)
@ -1350,6 +1348,7 @@ export default {
product.tareWeight = this.jnpf.floatAdd(product.tareWeight, productEntity.tareWeight)
product.buckleWeight = this.jnpf.floatAdd(product.buckleWeight, productEntity.buckleWeight)
product.receivedQuantity = this.jnpf.floatAdd(product.receivedQuantity, productEntity.receivedQuantity)
product.deliveryNum = this.jnpf.floatAdd(product.deliveryNum, productEntity.deliveryNum)
} else {
this.dataForm.deliveryProductRelationList.push(productEntity)
}
@ -1551,6 +1550,7 @@ export default {
target.grossWeight = this.jnpf.floatSub(target.grossWeight, productGrossWeight)
target.tareWeight = this.jnpf.floatSub(target.tareWeight, productTareWeight)
target.buckleWeight = this.jnpf.floatSub(target.buckleWeight, productBuckleWeight)
target.deliveryNum = this.jnpf.floatSub(target.deliveryNum, productNetWeight)
}
this.dataForm.deliveryVoucherRelationList.splice(scope.$index, 1);
}).catch(() => {

@ -1223,6 +1223,14 @@ export default {
},
//
choiceVoucher() {
if (!this.dataForm.businessId) {
this.$message({
type: "error",
message: "请先选择销售订单",
duration: 1500
});
return;
}
this.voucherBoxVisible = true
let excludeIdList = [];
for (let i = 0; i < this.dataForm.deliveryVoucherRelationList.length; i++) {

@ -1193,6 +1193,14 @@ export default {
},
//
choiceVoucher() {
if (!this.dataForm.businessId) {
this.$message({
type: "error",
message: "请先选择退货订单",
duration: 1500
});
return;
}
this.voucherBoxVisible = true
let excludeIdList = [];
for (let i = 0; i < this.dataForm.deliveryVoucherRelationList.length; i++) {

@ -1273,7 +1273,6 @@ export default {
businessType: '5',
}
this.dataForm.deliveryVoucherRelationList.push(item)
debugger
let productEntity = {}
e.warehousingOutboundProductEntityList.forEach(item => {
debugger
@ -1299,6 +1298,7 @@ export default {
product.grossWeight = this.jnpf.floatAdd(product.grossWeight, productEntity.grossWeight)
product.tareWeight = this.jnpf.floatAdd(product.tareWeight, productEntity.tareWeight)
product.buckleWeight = this.jnpf.floatAdd(product.buckleWeight, productEntity.buckleWeight)
product.deliveryNum = this.jnpf.floatAdd(product.deliveryNum, productEntity.deliveryNum)
} else {
this.dataForm.deliveryProductRelationList.push(productEntity)
}
@ -1489,22 +1489,22 @@ export default {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
const delObj = scope.row.list[0]
var productId = delObj.id
var unit = delObj.unit
const delObj = scope.row
var storageProductId = delObj.storageProductId
var productNetWeight = delObj.netWeight
var productGrossWeight = delObj.grossWeight
var productTareWeight = delObj.tareWeight
var productBuckleWeight = delObj.buckleWeight
const target = this.dataForm.deliveryProductRelationList.find(e => e.id == productId && e.deliveryUnit == unit)
const target = this.dataForm.deliveryProductRelationList.find(e => e.id == storageProductId)
if (target.netWeight == productNetWeight) {
const idx = this.dataForm.deliveryProductRelationList.findIndex(e => e.id == productId && e.deliveryUnit == unit)
const idx = this.dataForm.deliveryProductRelationList.findIndex(e => e.id == storageProductId)
this.dataForm.deliveryProductRelationList.splice(idx, 1)
} else {
target.netWeight = this.jnpf.floatSub(target.netWeight, productNetWeight)
target.grossWeight = this.jnpf.floatSub(target.grossWeight, productGrossWeight)
target.tareWeight = this.jnpf.floatSub(target.tareWeight, productTareWeight)
target.buckleWeight = this.jnpf.floatSub(target.buckleWeight, productBuckleWeight)
target.deliveryNum = this.jnpf.floatSub(target.deliveryNum, productNetWeight)
}
this.dataForm.deliveryVoucherRelationList.splice(scope.$index, 1);
}).catch(() => {

Loading…
Cancel
Save