3月25bug修改(采购销售模块)

jg-waiwang-pro
胡川虎 7 months ago
parent ea06dfbec2
commit b9f89b8e18

@ -12,6 +12,9 @@ import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.entity.ProvinceAtlasEntity;
import jnpf.base.service.ProvinceAtlasService;
import jnpf.base.service.ProvinceService;
import jnpf.base.util.OptimizeUtil;
import jnpf.constant.MsgCode;
import jnpf.exception.DataException;
@ -26,6 +29,7 @@ import jnpf.util.*;
import jnpf.model.voucher.*;
import jnpf.utils.YozoUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Base64Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@ -106,6 +110,8 @@ public class VoucherController {
private SubjectbasicService subjectbasicService;
@Autowired
private OrganizeService organizeService;
@Autowired
private ProvinceService provinceService;
/**
*
@ -119,7 +125,15 @@ public class VoucherController {
List<VoucherEntity> list= voucherService.getList(voucherPagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (VoucherEntity entity : list) {
Map<String, Object> voucherMap=JsonUtil.entityToMap(entity);
List<String> placeDispatchArr = JSON.parseArray(entity.getPlaceDispatch(), String.class);
List<String> destinationArr = JSON.parseArray(entity.getPlaceDispatch(), String.class);
List<ProvinceEntity> placeDispatchList = provinceService.getProList(placeDispatchArr);
List<ProvinceEntity> destinationList = provinceService.getProList(destinationArr);
List<String> placeDispatchs = placeDispatchList.stream().map(ProvinceEntity::getFullName).collect(Collectors.toList());
List<String> destinations = destinationList.stream().map(ProvinceEntity::getFullName).collect(Collectors.toList());
entity.setPlaceDispatch(placeDispatchs.stream().collect(Collectors.joining(",")));
entity.setDestination(destinations.stream().collect(Collectors.joining(",")));
Map<String, Object> voucherMap=JsonUtil.entityToMap(entity);
voucherMap.put("id", voucherMap.get("id"));
//副表数据
//子表数据
@ -130,7 +144,7 @@ public class VoucherController {
realList.add(voucherMap);
}
//数据转换
// realList = generaterSwapUtil.swapDataList(realList, VoucherConstant.getFormData(), VoucherConstant.getColumnData(), voucherPagination.getModuleId(),false);
//realList = generaterSwapUtil.swapDataList(realList, VoucherConstant.getFormData(), VoucherConstant.getColumnData(), voucherPagination.getModuleId(),false);
//流程状态添加
for(Map<String, Object> vo:realList){

@ -21,10 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**

@ -203,4 +203,4 @@ export default {
// .el-upload-list--picture-card {
// display: inline-block;
// height: 0;
// }</style>
// }</style>

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -58,7 +58,7 @@
<el-col :span="8" v-if="judgeShow('voucherPictures')">
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
<JnpfUploadPoundsImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
:isAccount="0">
</JnpfUploadPoundsImg>
</jnpf-form-tip-item>
@ -118,11 +118,11 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
@change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -216,7 +216,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -229,7 +229,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -237,9 +237,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -383,7 +383,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -399,7 +399,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@ -559,8 +559,8 @@ export default {
currVmodel: "",
dataForm: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -790,17 +790,37 @@ export default {
methods: {
//
poundlistUploadSuccess(val, res) {
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.netWeight = '';
this.dataForm.tareWeight = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
//
vehicleInfo(val, val2) {
@ -836,6 +856,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -908,6 +931,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -915,6 +947,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -84,10 +84,20 @@
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" width="100" fixed="left">
<!-- <el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" width="100" fixed="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" sortable align="center" width="160">
</el-table-column>
@ -135,16 +145,6 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -325,6 +325,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let supplyFlag = false
let customFlag = false
selectData.every(function (item) {
@ -366,6 +380,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isTransferFlag = false
let orderFlag = false
selectData.every(function (item) {

@ -393,11 +393,11 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库货区" v-if="judgeShow('warehousingproduct-storageAreaId')"
<el-table-column label="库货区" v-if="judgeShow('warehousingproduct-storageAreaId')"
prop="storageAreaId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-storageAreaId')">*</span>库货区
v-if="judgeRequired('warehousingproductList-storageAreaId')">*</span>库货区
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.storageAreaId"
@ -408,11 +408,11 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库单位"
<el-table-column label="库单位"
v-if="judgeShow('warehousingproduct-warehousingUnitId')" prop="warehousingUnitId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-warehousingUnitId')">*</span>库单位
v-if="judgeRequired('warehousingproductList-warehousingUnitId')">*</span>库单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.warehousingUnitId"
@ -438,12 +438,12 @@
</JnpfInput>
</template>
</el-table-column> -->
<el-table-column label="通知库数量"
<el-table-column label="通知库数量"
v-if="judgeShow('warehousingproduct-notificationStorageNumber')"
prop="notificationStorageNumber">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingproductList-notificationStorageNumber')">*</span>通知库数量
v-if="judgeRequired('warehousingproductList-notificationStorageNumber')">*</span>通知库数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notificationStorageNumber"

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -118,11 +118,11 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
@change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -216,7 +216,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -229,7 +229,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -237,9 +237,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -424,7 +424,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -439,7 +439,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@ -595,8 +595,8 @@ export default {
currVmodel: "",
dataForm: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -861,19 +861,34 @@ export default {
},
//
poundlistUploadSuccess(val, res) {
console.log('已选择并传递的数据', res.data);
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
//
@ -910,6 +925,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -982,6 +1000,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -989,6 +1016,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -87,10 +87,20 @@
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus" sortable align="center" width="100" fixed="left">
<!-- <el-table-column label="凭证状态" prop="voucherStatus" sortable align="center" width="100" fixed="left">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" sortable align="center" width="160">
</el-table-column>
@ -145,7 +155,7 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<!-- <el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
@ -154,7 +164,7 @@
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -345,6 +355,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
const customId = selectData[0].customerId
let customerIdFlag = false
let purchaseFlag = false
@ -387,6 +411,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isTransferFlag = false
let purchaseFlag = false
selectData.every(function (item) {

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -58,7 +58,7 @@
<el-col :span="8" v-if="judgeShow('voucherPictures')">
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
<JnpfUploadPoundsImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
:isAccount="0">
</JnpfUploadPoundsImg>
</jnpf-form-tip-item>
@ -118,10 +118,10 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="productInfo" :rowIndex="scope.$index"
<JnpfPopupSelect v-model="scope.row.productId" @change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -215,7 +215,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -228,7 +228,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -236,9 +236,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -382,7 +382,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -397,7 +397,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName" @change="true" placeholder="请输入"
@ -554,8 +554,8 @@ export default {
dataForm: {
isSaleDeliveryVoucherSource: undefined,
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -817,16 +817,35 @@ export default {
},
//
poundlistUploadSuccess(val, res) {
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
changeData(model, index) {
this.isEdit = false
@ -851,6 +870,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -923,6 +945,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -930,6 +961,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -86,10 +86,20 @@
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" fixed="left" width="100">
<!-- <el-table-column label="凭证状态" prop="voucherStatus1" sortable align="center" fixed="left" width="100">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" sortable align="center" width="160">
</el-table-column>
@ -136,7 +146,7 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<!-- <el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
@ -145,7 +155,7 @@
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -336,6 +346,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isSaleFlag = false
let saleFlag = false
selectData.every(function (item) {
@ -378,6 +402,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isTransferFlag = false
let saleFlag = false
selectData.every(function (item) {

@ -31,7 +31,7 @@
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
@ -58,7 +58,7 @@
<el-col :span="8" v-if="judgeShow('voucherPictures')">
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
<JnpfUploadPoundImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
:isAccount="0">
</JnpfUploadPoundImg>
</jnpf-form-tip-item>
@ -118,11 +118,11 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>
<span class="required-sign">*</span>商品名
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
@change="productChangeData" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
@ -216,7 +216,7 @@
</template>
</el-table-column>
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>
</template>
@ -229,7 +229,7 @@
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -237,9 +237,9 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
@ -383,7 +383,7 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>
<span class="required-sign">*</span>车牌
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.vehicleId"
@ -398,7 +398,7 @@
</el-table-column>
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>
<span class="required-sign">*</span>驾驶员名
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@ -554,8 +554,8 @@ export default {
currVmodel: "",
dataForm: {
voucherCode: undefined,
voucherType: undefined,
preparationTime: undefined,
voucherType: '1',
preparationTime: new Date(),
associateThirdSuppliers: undefined,
voucherPictures: [],
poundCode: undefined,
@ -796,18 +796,35 @@ export default {
},
//
poundlistUploadSuccess(val, res) {
console.log('已选择并传递的数据', res.data);
// formData.value.voucherPictures = res.path
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
//formData.value.voucherPictures = res.crossWeight
this.dataForm.netWeight = res.data.netWeight
//formData.value.voucherPictures = res.printTime
this.dataForm.tareWeight = res.data.tareWeight
this.dataForm.voucherVehicleList.push(res.data)
if(res && res.data){
this.dataForm.poundCode = res.data.deliveryNumber
this.dataForm.vehicleId = res.data.vehicleId
this.dataForm.supplierId = res.data.supplierId
this.dataForm.customerId = res.data.customerId
if(res.data.vehicleId){
this.dataForm.voucherVehicleList.push(res.data)
}
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
buckleWeight: undefined,
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
remark: undefined,
printTime: undefined,
}
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
this.dataForm.voucherProductList.push(item)
}else{
this.dataForm.poundCode = '';
this.dataForm.vehicleId = '';
this.dataForm.supplierId = '';
this.dataForm.customerId = '';
this.dataForm.voucherVehicleList = [];
this.dataForm.voucherProductList = [];
}
},
changeData(model, index) {
this.isEdit = false
@ -832,6 +849,9 @@ export default {
}
}
},
productChangeData(a, b){
this.dataForm.voucherProductList[0].spec = b.spec
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
@ -904,6 +924,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
if (!e.productId) {
this.$message({
message: '商品不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -911,6 +940,24 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
const e = this.dataForm.voucherVehicleList[i];
if (!e.vehicleId) {
this.$message({
message: '车牌号不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.driverName) {
this.$message({
message: '驾驶员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -72,22 +72,32 @@
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" custom-column border>
<el-table-column prop="voucherCode" label="凭证编号" sortable align="center" width="160">
<el-table-column prop="voucherCode" label="凭证编号" fixed="left" sortable align="center" width="160">
</el-table-column>
<el-table-column label="单据类型" prop="documentType1" align="center" width="100">
<el-table-column label="单据类型" prop="documentType1" fixed="left" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.documentType1 }}
</template>
</el-table-column>
<el-table-column label="凭证类型" prop="voucherType1" align="center" width="100">
<el-table-column label="凭证类型" prop="voucherType1" fixed="left" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.voucherType1 }}
</template>
</el-table-column>
<el-table-column label="凭证状态" prop="voucherStatus1" align="center" width="100">
<!-- <el-table-column label="凭证状态" prop="voucherStatus1" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.voucherStatus1 }}
</template>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" align="center" width="150" fixed="left">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="center" width="160">
</el-table-column>
@ -139,7 +149,7 @@
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100">
<!-- <el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
@ -148,7 +158,7 @@
<el-tag type="info" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" :disabled="[1, 2, 4, 5].indexOf(scope.row.flowState) > -1"
@ -330,6 +340,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
const customerId = selectData[0].customerId
let isReturnCargoFlag = false
let customerFlag = false
@ -372,6 +396,20 @@ export default {
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
selectData.forEach(function (item) {
if(item.flowState != 2){
stateFlag = false;
}
});
if(!stateFlag){
this.$message({
type: 'error',
message: '请选择审核通过的数据',
duration: 1500,
})
return
}
let isReturnCargoFlag = false
let returnCargoFlag = false
selectData.every(function (item) {

Loading…
Cancel
Save