jg-waiwang-pro
vayne 5 months ago
parent 18486ab5b6
commit 96cf7363ef

@ -228,7 +228,6 @@
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
${ew.customSqlSegment}
</select>
@ -488,7 +487,6 @@
LEFT JOIN jg_voucher_product b ON a.id=b.voucher_id
LEFT JOIN jg_product c ON b.product_id=c.id
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id
LEFT JOIN flow_task e ON a.id = e.f_process_id
${ew.customSqlSegment} AND a.id not in (SELECT voucher_id from jg_warehousing_storage_poundlist where f_delete_mark is null)
ORDER BY
a.f_creator_time DESC

@ -74,6 +74,8 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
private ProvinceService provinceService;
@Resource
private ContractLService contractLService;
@Resource
private ProductWarehouseService productWarehouseService;
@Override
public List<VoucherEntity> getList(VoucherPagination voucherPagination){
@ -799,7 +801,7 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
queryWrapper.notIn(ObjectUtils.isNotEmpty(voucherPagination.getExcludeIdList()),"a.id",voucherPagination.getExcludeIdList());
queryWrapper.in(ObjectUtils.isNotEmpty(voucherPagination.getProductIdList()),"c.product_id",voucherPagination.getProductIdList());
queryWrapper.isNull("a.f_delete_mark");
// queryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
// queryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的凭证
queryWrapper.like("a.organize_json_id",organize);
Page<VoucherEntity> page=new Page<>(voucherPagination.getCurrentPage(), voucherPagination.getPageSize());
IPage<VoucherEntity> voucherEntityIPage = voucherMapper.queryVoucherPopup1(page,queryWrapper);
@ -987,8 +989,27 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
String[] placeDispatchArr = placeDispatch.split("/");
if(placeDispatchArr.length == 3){
ProvinceEntity provinceEntity0 = provinceService.getInfo(placeDispatchArr[0], new ArrayList<>());
ProvinceEntity provinceEntity1 = provinceService.getInfo(placeDispatchArr[1], new ArrayList<>());
ProvinceEntity provinceEntity2 = provinceService.getInfo(placeDispatchArr[2], new ArrayList<>());
if(provinceEntity0 == null){
num ++;
failResult.add(BeanUtil.beanToMap(model));
continue;
}
List<String> parentIdList = new ArrayList<>();
parentIdList.add(provinceEntity0.getId());
ProvinceEntity provinceEntity1 = provinceService.getInfo(placeDispatchArr[1], parentIdList);
if(provinceEntity1 == null){
num ++;
failResult.add(BeanUtil.beanToMap(model));
continue;
}
parentIdList = new ArrayList<>();
parentIdList.add(provinceEntity1.getId());
ProvinceEntity provinceEntity2 = provinceService.getInfo(placeDispatchArr[2], parentIdList);
if(provinceEntity2 == null){
num ++;
failResult.add(BeanUtil.beanToMap(model));
continue;
}
if(provinceEntity0 != null && provinceEntity1 != null && provinceEntity2 != null){
List<String> placeDispatchList = new ArrayList<>();
placeDispatchList.add(provinceEntity0.getId());
@ -1015,8 +1036,27 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
String[] destinationArr = destination.split("/");
if(destinationArr.length == 3){
ProvinceEntity provinceEntity0 = provinceService.getInfo(destinationArr[0], new ArrayList<>());
ProvinceEntity provinceEntity1 = provinceService.getInfo(destinationArr[1], new ArrayList<>());
ProvinceEntity provinceEntity2 = provinceService.getInfo(destinationArr[2], new ArrayList<>());
if(provinceEntity0 == null){
num ++;
failResult.add(BeanUtil.beanToMap(model));
continue;
}
List<String> parentIdList = new ArrayList<>();
parentIdList.add(provinceEntity0.getId());
ProvinceEntity provinceEntity1 = provinceService.getInfo(destinationArr[1], parentIdList);
if(provinceEntity1 == null){
num ++;
failResult.add(BeanUtil.beanToMap(model));
continue;
}
parentIdList = new ArrayList<>();
parentIdList.add(provinceEntity1.getId());
ProvinceEntity provinceEntity2 = provinceService.getInfo(destinationArr[2], parentIdList);
if(provinceEntity2 == null){
num ++;
failResult.add(BeanUtil.beanToMap(model));
continue;
}
if(provinceEntity0 != null && provinceEntity1 != null && provinceEntity2 != null){
List<String> destinationList = new ArrayList<>();
destinationList.add(provinceEntity0.getId());
@ -1045,15 +1085,18 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
voucherEntity.setWeighPictures1(model.getVehiclePictures8());
voucherEntity.setWeighPictures2(model.getVehiclePictures9());
voucherEntity.setWeighPictures3(model.getVehiclePictures10());
/* `customer_id` varchar(50) DEFAULT NULL COMMENT 'id',
`customer_name` varchar(20) DEFAULT NULL COMMENT '',*/
this.save(voucherEntity);
//子表信息
VoucherProductEntity voucherProductEntity = new VoucherProductEntity();
voucherProductEntity.setVoucherId(voucherEntity.getId());
voucherProductEntity.setProductId(model.getProductName());//商品转换name转id
voucherProductEntity.setUnit(model.getUnit());//商品转换name转id
voucherProductEntity.setSpec("");//取商品规格
voucherProductEntity.setProductId(model.getProductId());//商品转换name转id
if(StringUtil.isNotEmpty(model.getProductId())){
ProductWarehouseEntity productWarehouseEntity = productWarehouseService.getById(model.getProductId());
if(productWarehouseEntity != null){
voucherProductEntity.setSpec(productWarehouseEntity.getSpec());//取商品规格
}
}
voucherProductEntity.setUnit(model.getUnit());
voucherProductEntity.setGrossWeight(new BigDecimal(model.getGrossWeight()));
voucherProductEntity.setTareWeight(new BigDecimal(model.getTareWeight()));
voucherProductEntity.setBuckleWeight(new BigDecimal(model.getBuckleWeight()));

@ -1412,91 +1412,14 @@ public class VoucherController {
@Operation(summary = "模板下载")
@GetMapping("/TemplateDownload")
public ActionResult<DownloadVO> TemplateDownload(){
DownloadVO vo = DownloadVO.builder().build();
UserInfo userInfo = userProvider.get();
Map<String, Object> dataMap = new HashMap<>();
//主表对象
List<ExcelExportEntity> entitys = new ArrayList<>();
//以下添加字段
entitys.add(new ExcelExportEntity("凭证编号" ,"voucherCode"));
dataMap.put("voucherCode", "系统自动生成");
entitys.add(new ExcelExportEntity("凭证类型" ,"voucherType"));
entitys.add(new ExcelExportEntity("制单时间" ,"preparationTime"));
dataMap.put("preparationTime", "例: yyyy-MM-dd");
entitys.add(new ExcelExportEntity("磅单编号" ,"poundCode"));
entitys.add(new ExcelExportEntity("车牌号" ,"vehicleName"));
entitys.add(new ExcelExportEntity("发货单位" ,"supplierName"));
entitys.add(new ExcelExportEntity("收货单位" ,"customerName"));
entitys.add(new ExcelExportEntity("运输方式" ,"modeTransport"));
entitys.add(new ExcelExportEntity("承运方式" ,"transportationMethod"));
entitys.add(new ExcelExportEntity("承运商" ,"carrier"));
entitys.add(new ExcelExportEntity("起运地" ,"placeDispatch"));
dataMap.put("placeDispatch", "例:福建省/莆田市/城厢区");
entitys.add(new ExcelExportEntity("到达地" ,"destination"));
dataMap.put("destination", "例:福建省/莆田市/城厢区");
entitys.add(new ExcelExportEntity("运费" ,"freight"));
entitys.add(new ExcelExportEntity("关联单据号" ,"associatedDocumentNo"));
entitys.add(new ExcelExportEntity("单据类型" ,"documentType"));
entitys.add(new ExcelExportEntity("凭证状态" ,"voucherStatus"));
//tableField111子表对象
ExcelExportEntity tableField111ExcelEntity = new ExcelExportEntity("","tableField111");
List<ExcelExportEntity> tableField111ExcelEntityList = new ArrayList<>();
Map<String, Object> tableField111ChildData = new HashMap<>();
List<Map<String, Object>> tableField111ChildDataList = new ArrayList<>();
tableField111ExcelEntityList.add(new ExcelExportEntity("规格" ,"spec"));
tableField111ExcelEntityList.add(new ExcelExportEntity("单位" ,"unit"));
tableField111ExcelEntityList.add(new ExcelExportEntity("毛重" ,"grossWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("皮重" ,"tareWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("扣重" ,"buckleWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("净重" ,"netWeight"));
tableField111ExcelEntityList.add(new ExcelExportEntity("备注" ,"remark"));
tableField111ExcelEntityList.add(new ExcelExportEntity("打印时间" ,"printTime"));
tableField111ChildData.put("printTime", "例: yyyy-MM-dd");
tableField111ChildDataList.add(tableField111ChildData);
dataMap.put("tableField111",tableField111ChildDataList);
tableField111ExcelEntity.setList(tableField111ExcelEntityList);
entitys.add(tableField111ExcelEntity);
//tableField140子表对象
ExcelExportEntity tableField140ExcelEntity = new ExcelExportEntity("","tableField140");
List<ExcelExportEntity> tableField140ExcelEntityList = new ArrayList<>();
Map<String, Object> tableField140ChildData = new HashMap<>();
List<Map<String, Object>> tableField140ChildDataList = new ArrayList<>();
tableField140ExcelEntityList.add(new ExcelExportEntity("驾驶员名称" ,"driverName"));
tableField140ExcelEntityList.add(new ExcelExportEntity("联系电话" ,"telephone"));
tableField140ExcelEntityList.add(new ExcelExportEntity("承运商" ,"carrier"));
tableField140ChildDataList.add(tableField140ChildData);
dataMap.put("tableField140",tableField140ChildDataList);
tableField140ExcelEntity.setList(tableField140ExcelEntityList);
entitys.add(tableField140ExcelEntity);
List<Map<String, Object>> list = new ArrayList<>();
list.add(dataMap);
ExportParams exportParams = new ExportParams(null, "凭证单模板");
exportParams.setType(ExcelType.XSSF);
UserInfo userInfo = userProvider.get();
DownloadVO vo = DownloadVO.builder().build();
try {
@Cleanup Workbook workbook = new HSSFWorkbook();
if (entitys.size()>0){
if (list.size()==0){
list.add(new HashMap<>());
}
//复杂表头-表头和数据处理
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(VoucherConstant.getColumnData(), ColumnDataModel.class);
List<HeaderModel> complexHeaderList = columnDataModel.getComplexHeaderList();
if (!Objects.equals(columnDataModel.getType(), 3) && !Objects.equals(columnDataModel.getType(), 5)) {
entitys = VisualUtils.complexHeaderHandel(entitys, complexHeaderList);
list = VisualUtils.complexHeaderDataHandel(list, complexHeaderList);
}
workbook = ExcelExportUtil.exportExcel(exportParams, entitys, list);
}
String fileName = "凭证单模板" + DateUtil.dateNow("yyyyMMddHHmmss") + ".xlsx";
MultipartFile multipartFile = ExcelUtil.workbookToCommonsMultipartFile(workbook, fileName);
String temporaryFilePath = configValueUtil.getTemporaryFilePath();
FileInfo fileInfo = FileUploadUtils.uploadFile(multipartFile, temporaryFilePath, fileName);
vo.setName(fileInfo.getFilename());
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + fileName);
vo.setName("凭证导入.zip");
vo.setUrl(UploaderUtil.uploaderFile("/api/file/DownloadModel?encryption=", userInfo.getId() + "#" + "凭证导入.zip" + "#" + "Temporary"));
} catch (Exception e) {
log.error("模板信息导出Excel错误:{}", e.getMessage());
e.printStackTrace();
log.error("信息导出Excel错误:{}", e.getMessage());
}
return ActionResult.success(vo);
}
@ -1509,14 +1432,14 @@ public class VoucherController {
@Operation(summary = "导入预览" )
@GetMapping("/ImportPreview")
public ActionResult<Map<String, Object>> ImportPreview(String fileName) throws Exception {
fileName = "66441f9464a4bd991e589f74.xls";
//fileName = "6645af470365f697b7120ff7.xls";
Map<String, Object> headAndDataMap = new HashMap<>(2);
String filePath = FileUploadUtils.getLocalBasePath() + configValueUtil.getWebAnnexFilePath();
FileUploadUtils.downLocal(configValueUtil.getTemporaryFilePath(), filePath, fileName);
File temporary = new File(XSSEscape.escapePath(filePath + fileName));
int headerRowIndex = 1;
ImportParams params = new ImportParams();
params.setTitleRows(0);
params.setTitleRows(2);
params.setHeadRows(headerRowIndex);
params.setNeedVerify(true);
try {
@ -1527,7 +1450,7 @@ public class VoucherController {
columns.add(new ExcelImFieldModel("businessType","业务类型"));
columns.add(new ExcelImFieldModel("documentType","单据类型"));
columns.add(new ExcelImFieldModel("voucherType","凭证类型"));
columns.add(new ExcelImFieldModel("receivingDate","收货日期"));
// columns.add(new ExcelImFieldModel("receivingDate","收货日期"));
columns.add(new ExcelImFieldModel("productName","商品名称"));
columns.add(new ExcelImFieldModel("vehicleName","送货车号"));
columns.add(new ExcelImFieldModel("unit","单位"));
@ -1557,7 +1480,7 @@ public class VoucherController {
columns.add(new ExcelImFieldModel("vehiclePictures10","车辆信息10"));
columns.add(new ExcelImFieldModel("contractNo","合同编码"));
//tableField111子表对象
List<ExcelImFieldModel> tableField111columns = new ArrayList<>();
/*List<ExcelImFieldModel> tableField111columns = new ArrayList<>();
tableField111columns.add(new ExcelImFieldModel("spec" ,"规格"));
tableField111columns.add(new ExcelImFieldModel("unit" ,"单位"));
tableField111columns.add(new ExcelImFieldModel("grossWeight" ,"毛重"));
@ -1572,7 +1495,7 @@ public class VoucherController {
tableField140columns.add(new ExcelImFieldModel("driverName" ,"驾驶员名称"));
tableField140columns.add(new ExcelImFieldModel("telephone" ,"联系电话"));
tableField140columns.add(new ExcelImFieldModel("carrier" ,"承运商"));
columns.add(new ExcelImFieldModel("tableField140","",tableField140columns));
columns.add(new ExcelImFieldModel("tableField140","",tableField140columns));*/
headAndDataMap.put("dataRow" , JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(excelDataList)));
headAndDataMap.put("headerRow" , JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(columns)));
} catch (Exception e){

@ -202,7 +202,5 @@ public class VoucherEntity {
private String isReturnCargoOrder1;
@TableField(exist = false)
private List<VoucherBatchProductModel> voucherBatchProductModelList;
@TableField(exist = false)
private String deliveryType1;
}

@ -592,6 +592,7 @@ export default {
},
bomitemvalueExistNum() {
debugger
let isOk = true;
var num = '1';
var nums = '0';

@ -511,6 +511,7 @@ export default {
data: _query
}).then(res => {
var _list = res.data.list;
debugger
this.list = _list.map(o => ({
...o,
...this.expandObj,

@ -909,6 +909,7 @@ export default {
data: id
}).then(res => {
const purchaseOrder = res.data
debugger
this.dataForm.purchaseOrderInfo = [];
this.dataForm.purchaseOrderInfo[0] = purchaseOrder;
this.dataForm.businessId = purchaseOrder.id;
@ -923,6 +924,7 @@ export default {
item.purchaseNum = item.businessNum;
item.warehousingUnitId = item.salesMainUnitId;
});
debugger
this.dataForm.warehousingProductList = purchaseOrder.businessOrderProductRelationalList;
})
}

@ -1560,7 +1560,9 @@ export default {
methods: {
// 线
removeForm() {
debugger
if (this.dataForm.orderType == '3') {
debugger
this.dataForm.contractId = undefined
}
},
@ -1723,6 +1725,7 @@ export default {
}
},
contractInfo(val, val2) {
debugger
this.dataForm.expectArriveDate = [];
if (val2.contractPeriodTime && val2.contractPeriodTimeEnd) {
this.dataForm.expectArriveDate[0] = new Date(val2.contractPeriodTime)

@ -771,6 +771,7 @@ export default {
data: id
}).then(res => {
const purchaseOrder = res.data
debugger
this.dataForm.returnOrderInfo = [];
this.dataForm.returnOrderInfo[0] = purchaseOrder;
this.dataForm.businessId = purchaseOrder.id;

@ -1802,6 +1802,7 @@ export default {
const defaultArr = this.dataForm.deliveryProductRelationList
this.dataForm.deliveryProductRelationList.splice(0, this.dataForm.deliveryProductRelationList.length, ...defaultArr)
} else {
debugger
this.$message({
type: 'error',
message: "采购订单未审核",

@ -505,6 +505,7 @@ export default {
data: _query
}).then(res => {
var _list = res.data.list;
debugger
this.list = _list.map(o => ({
...o,
...this.expandObj,

@ -1268,6 +1268,7 @@ export default {
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.productWarehouseEntityList.forEach(item => {
debugger
const obj = this.productByOrderList.find(e => e.productId == item.id) || {}
item.salesMainUnitId = obj.salesMainUnitId;
item.saleNum = obj.businessNum;
@ -1372,6 +1373,7 @@ export default {
const defaultArr = this.dataForm.deliveryProductRelationList
this.dataForm.deliveryProductRelationList.splice(0, this.dataForm.deliveryProductRelationList.length, ...defaultArr)
} else {
debugger
this.$message({
type: 'error',
message: "销售订单未审核",

@ -1275,6 +1275,7 @@ export default {
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.warehousingOutboundProductEntityList.forEach(item => {
debugger
const obj = this.productByOrderList.find(e => e.productId == item.productId) || {}
item.salesMainUnitId = obj.salesMainUnitId
item.saleNum = obj.businessNum

@ -778,6 +778,7 @@ export default {
data: id
}).then(res => {
const saleOrder = res.data
debugger
this.dataForm.saleOrderInfo = [];
this.dataForm.saleOrderInfo[0] = saleOrder;
this.dataForm.businessId = saleOrder.id;
@ -794,6 +795,7 @@ export default {
item.warehousingUnitId = item.deliveryUnit;
item.produceDate = item.produceTime
});
debugger
this.dataForm.warehousingProductList = saleOrder.deliveryProductRelationEntityList;
})
}

@ -1557,6 +1557,7 @@ export default {
// notTaxCount: this.jnpf.floatMul(e.businessNum, this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6)).toFixed(2) //
}
if (e.salesMainUnitIds) {
debugger
var unitName = JSON.parse(e.salesMainUnitIds)
var optArray = [];
for (let i = 0; i < unitName.length; i++) {
@ -1568,6 +1569,7 @@ export default {
}
item.businessorderproductrelationalsalesMainUnitIdOptions = optArray
}
debugger
this.dataForm.businessOrderProductRelationalList.push(item)
}
},
@ -1655,6 +1657,7 @@ export default {
})
},
contractList(list) {
debugger
let e = list
this.dataForm.contractId = e.id
this.dataForm.contractName = e.contractName
@ -1801,6 +1804,7 @@ export default {
this.dataForm.businessOrderProductRelationalList = data[0].businessOrderProductRelationalList
}
if (data.flag == '发货凭证生成销售订单') {
debugger
this.productCreate = true
this.dataForm.orderType = '3'
this.dataForm.enterpriseId = data[0].supplierId
@ -1818,6 +1822,7 @@ export default {
data: voucherIdList
}).then(res => {
var list = res.data;
debugger
list.forEach(item => {
this.productIds.push(item.id)
item.productId = item.id

@ -924,6 +924,7 @@ export default {
item.warehousingUnitId = item.salesMainUnitId;
}
);
debugger
this.dataForm.warehousingProductList =
saleOrder.businessOrderProductRelationalList;
});
@ -1171,6 +1172,7 @@ export default {
return _data;
},
dataInfo(dataAll) {
debugger
let _dataAll = dataAll;
this.dataForm = _dataAll;
this.isEdit = true;

@ -4,7 +4,7 @@
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建':'编辑'" />
<div class="options">
<!-- <el-dropdown class="dropdown" placement="bottom">
<el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
@ -21,7 +21,7 @@
:loading="continueBtnLoading" :disabled='btnLoading'>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
</el-dropdown>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'> </el-button>
<el-button @click="goBack"> </el-button>
@ -42,7 +42,7 @@
<jnpf-form-tip-item label="凭证类型" prop="voucherType">
<JnpfSelect v-model="dataForm.voucherType" @change="changeData('voucherType',-1)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="voucherTypeOptions" :props="voucherTypeProps" disabled>
:options="voucherTypeOptions" :props="voucherTypeProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
@ -52,7 +52,7 @@
<JnpfDatePicker v-model="dataForm.preparationTime"
@change="changeData('preparationTime',-1)" :startTime="dateTime(false,1,1,'','')"
:endTime="dateTime(false,1,1,'','')" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" disabled>
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
@ -60,7 +60,7 @@
<jnpf-form-tip-item label="配送方式" prop="deliveryType">
<JnpfSelect v-model="dataForm.deliveryType" @change="changeData('deliveryType',-1)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="deliveryTypeOptions" :props="deliveryTypeProps" disabled>
:options="deliveryTypeOptions" :props="deliveryTypeProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
@ -77,8 +77,7 @@
placeholder="请选择" propsValue="f_id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='f_full_name' field='supplierId'
interfaceId="522729853024209157" :pageSize="20"
:columnOptions="supplierIdcolumnOptions" clearable :style='{"width":"100%"}'
disabled>
:columnOptions="supplierIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
@ -135,7 +134,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.unit"
@change="changeData('voucherproduct-unit',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}' disabled>
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -146,8 +145,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
@change="changeData('voucherproduct-grossWeight',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'
@input="UpdateWeight(scope.row)">
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -158,8 +156,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
@change="changeData('voucherproduct-tareWeight',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'
@input="UpdateWeight(scope.row)">
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -170,8 +167,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
@change="changeData('voucherproduct-buckleWeight',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'
@input="UpdateWeight(scope.row)">
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -193,7 +189,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.freight"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}' disabled>
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -210,7 +206,7 @@
relationField='vehicle_number' :field="'printTime'+scope.$index"
interfaceId="529920852288864453" :pageSize="20"
:columnOptions="voucherproductprintTimecolumnOptions" clearable
:style='{"width":"100%"}' disabled>
:style='{"width":"100%"}'>
</JnpfPopupSelect>
</template>
</el-table-column>
@ -221,7 +217,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.driverName"
@change="changeData('voucherproduct-receiptUnit',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -232,7 +228,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.poundCode"
@change="changeData('voucherproduct-tenantId',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -244,8 +240,7 @@
<JnpfSelect v-model="scope.row.modeTransport"
@change="changeData('voucherproduct-cargoId',scope.$index)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="voucherproductcargoIdOptions" :props="voucherproductcargoIdProps"
disabled>
:options="voucherproductcargoIdOptions" :props="voucherproductcargoIdProps">
</JnpfSelect>
</template>
</el-table-column>
@ -258,7 +253,7 @@
@change="changeData('voucherproduct-receiptNum',scope.$index)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="voucherproductreceiptNumOptions"
:props="voucherproductreceiptNumProps" disabled>
:props="voucherproductreceiptNumProps">
</JnpfSelect>
</template>
</el-table-column>
@ -269,7 +264,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.carrier"
@change="changeData('voucherproduct-batchNo',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
@ -281,7 +276,7 @@
<JnpfAreaSelect v-model="scope.row.placeDispatch"
@change="changeData('voucherproduct-deliveryUnit',scope.$index)"
placeholder="请选择" selectType="all" clearable :style='{"width":"100%"}'
:level="2" disabled>
:level="2">
</JnpfAreaSelect>
</template>
</el-table-column>
@ -293,7 +288,7 @@
<JnpfAreaSelect v-model="scope.row.destination"
@change="changeData('voucherproduct-deliveryNum',scope.$index)"
placeholder="请选择" selectType="all" clearable :style='{"width":"100%"}'
:level="2" disabled>
:level="2">
</JnpfAreaSelect>
</template>
</el-table-column>
@ -395,7 +390,7 @@ export default {
currVmodel: "",
dataForm: {
voucherType: undefined,
preparationTime: new Date(),
preparationTime: undefined,
deliveryType: undefined,
supplierId: undefined,
customerId: undefined,
@ -473,7 +468,7 @@ export default {
documentType: [],
voucherStatus: [],
businessType: [],
voucherproductproductId: [{ "fieldName": "", "field": "subjectId", "defaultValue": "", "jnpfKey": "popupSelect", "dataType": "varchar", "id": "spNokw1", "relationField": "supplierId", "required": "0" }],
voucherproductproductId: [],
voucherproductspec: [],
voucherproductunit: [],
voucherproductgrossWeight: [],
@ -509,6 +504,7 @@ export default {
},
//
initVoucherData(selectData) {
debugger
const data = selectData
if (!data) {
return
@ -520,11 +516,13 @@ export default {
data.forEach(item => {
voucherIds.voucherIdList.push(item.id)
});
debugger
request({
url: `/api/scm/Voucher/batch`,
method: 'post',
data: voucherIds
}).then(res => {
debugger
var voucherInfo = res.data;
voucherInfo.businessType = '2'
voucherInfo.documentType = '2'
@ -537,8 +535,6 @@ export default {
this.dataForm.voucherProductBatchList = voucherInfo.voucherProductList
this.dataForm.isSaleDeliveryVoucherSource = voucherInfo.id
this.dataForm.supplierId = voucherInfo.customerId
this.dataForm.customerId = ''
this.dataForm.preparationTime = new Date()
})
},
prev() {
@ -576,8 +572,10 @@ export default {
});
},
goBack() {
debugger
this.visible = false
this.$emit('refresh', true)
this.$router.go(-1)
// this.$emit('refreshDataList', true)
},
changeData(model, index) {
this.isEdit = false
@ -680,6 +678,9 @@ export default {
}
return isOk;
},
// goBack() {
// this.$emit('refresh')
// },
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
@ -724,6 +725,7 @@ export default {
},
//
dataFormSubmit(type) {
debugger
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
@ -733,6 +735,7 @@ export default {
})
},
request() {
debugger
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true

@ -998,6 +998,7 @@ export default {
}
}
echararr.forEach(item => {
debugger
const flag = this.dataForm.warehousingStorageProductList.find(e => e.productId == item.productId && e.storageUnit == item.unit && e.storageNumber == item.netWeight)
if (!flag) {
this.$message({

Loading…
Cancel
Save