批量转销售凭证增加字段

jg-waiwang-pro
vayne 5 months ago
parent 113e35f2e2
commit 051b8cca7a

@ -692,6 +692,10 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
entity.setWeighPictures1(entitys.getWeighPictures1());
entity.setWeighPictures2(entitys.getWeighPictures2());
entity.setWeighPictures3(entitys.getWeighPictures3());
entity.setSaleContractNo(entitys.getSaleContractNo());
entity.setSaleAmount(entitys.getSaleAmount());
entity.setPurchaseContractNo(null);
entity.setPurchaseAmount(null);
this.saveOrUpdate(entity);
//商品子表
entitys.setId(RandomUtil.uuId());
@ -707,8 +711,8 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
voucherVehicleEntity.setCarrier(entitys.getVehicleCarrier());
voucherVehicleService.saveOrUpdate(voucherVehicleEntity);
if (StringUtil.isNotEmpty(entity.getIsSaleDeliveryVoucherSource())){
VoucherEntity voucherEntity = voucherMapper.selectById(entity.getIsSaleDeliveryVoucherSource());
if (StringUtil.isNotEmpty(entitys.getIsSaleDeliveryVoucherSource())){
VoucherEntity voucherEntity = voucherMapper.selectById(entitys.getIsSaleDeliveryVoucherSource());
voucherEntity.setIsSaleDeliveryVoucher("2");
voucherMapper.updateById(voucherEntity);
}

@ -90,6 +90,39 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="采购合同编号" v-if="judgeShow('freight')"
prop="purchaseContractNo">
<JnpfInput v-model="dataForm.purchaseContractNo" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="销售合同编号" v-if="judgeShow('freight')" prop="saleContractNo">
<JnpfInput v-model="dataForm.saleContractNo" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="采购额" v-if="judgeShow('freight')" prop="purchaseAmount">
<JnpfInput v-model="dataForm.purchaseAmount" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="销售额" v-if="judgeShow('freight')" prop="saleAmount">
<JnpfInput v-model="dataForm.saleAmount" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
@ -716,6 +749,10 @@ export default {
voucherCode: undefined,
voucherType: '1',
deliveryType: undefined,
purchaseContractNo: undefined,
saleContractNo: undefined,
purchaseAmount: undefined,
saleAmount: undefined,
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],

@ -76,6 +76,39 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="采购合同编号" v-if="judgeShow('freight')"
prop="purchaseContractNo">
<JnpfInput v-model="dataForm.purchaseContractNo" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="销售合同编号" v-if="judgeShow('freight')" prop="saleContractNo">
<JnpfInput v-model="dataForm.saleContractNo" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="采购额" v-if="judgeShow('freight')" prop="purchaseAmount">
<JnpfInput v-model="dataForm.purchaseAmount" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="销售额" v-if="judgeShow('freight')" prop="saleAmount">
<JnpfInput v-model="dataForm.saleAmount" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
@ -697,6 +730,10 @@ export default {
voucherCode: undefined,
voucherType: '1',
deliveryType: undefined,
purchaseContractNo: undefined,
saleContractNo: undefined,
purchaseAmount: undefined,
saleAmount: undefined,
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],

@ -75,6 +75,39 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="采购合同编号" v-if="judgeShow('freight')"
prop="purchaseContractNo">
<JnpfInput v-model="dataForm.purchaseContractNo" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="销售合同编号" v-if="judgeShow('freight')" prop="saleContractNo">
<JnpfInput v-model="dataForm.saleContractNo" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="采购额" v-if="judgeShow('freight')" prop="purchaseAmount">
<JnpfInput v-model="dataForm.purchaseAmount" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('freight')">
<jnpf-form-tip-item label="销售额" v-if="judgeShow('freight')" prop="saleAmount">
<JnpfInput v-model="dataForm.saleAmount" @change="changeData('freight', -1)"
placeholder="请输入" :disabled="judgeWrite('freight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
@ -669,6 +702,10 @@ export default {
voucherCode: undefined,
voucherType: '1',
deliveryType: undefined,
purchaseContractNo: undefined,
saleContractNo: undefined,
purchaseAmount: undefined,
saleAmount: undefined,
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],

@ -292,6 +292,28 @@
</JnpfAreaSelect>
</template>
</el-table-column>
<el-table-column label="销售合同编号" prop="saleContractNo" width="180">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售合同编号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleContractNo"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售额" prop="saleAmount" width="180">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售额
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleAmount"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -533,7 +555,6 @@ export default {
}
this.dataForm = voucherInfo
this.dataForm.voucherProductBatchList = voucherInfo.voucherProductList
this.dataForm.isSaleDeliveryVoucherSource = voucherInfo.id
this.dataForm.supplierId = voucherInfo.customerId
this.dataForm.customerId = ''
this.dataForm.preparationTime = new Date()
@ -621,6 +642,10 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductBatchList.length; i++) {
const e = this.dataForm.voucherProductBatchList[i];
var tareWeight = e.tareWeight;//
var grossWeight = e.grossWeight;//
var buckleWeight = e.buckleWeight;//
var netWeight = e.netWeight;//
if (!e.productId) {
this.$message({
message: '商品名称不能为空',
@ -675,12 +700,36 @@ export default {
isOk = false
break
}
if (grossWeight < this.jnpf.floatAdd(this.jnpf.floatAdd(tareWeight, buckleWeight), netWeight)) {
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= netWeight) {
this.$message({
message: '扣重不得大于净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= grossWeight) {
this.$message({
message: '扣重不得大于毛重',
type: 'error',
duration: 1000
})
isOk = false
break
}
}
return isOk;
},
// goBack() {
// this.$emit('refresh')
// },
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},

Loading…
Cancel
Save