优化生产制单

This commit is contained in:
wwb 2025-01-13 08:36:58 +08:00
parent 994be7914f
commit 2e876da193
7 changed files with 36 additions and 19 deletions

View File

@ -82,4 +82,8 @@ public class ProduceOrderImportExcelVO {
@ExcelProperty("交货数量")
private Long deliveryQty;
@Schema(description = "备注")
@ExcelProperty("备注")
private Long remarks2;
}

View File

@ -109,4 +109,7 @@ public class ProduceOrderRespVO {
@Schema(description = "备注")
private String remarks;
@Schema(description = "备注")
private String remarks2;
}

View File

@ -86,4 +86,7 @@ public class ProduceOrderSaveReqVO {
@Schema(description = "备注")
private String remarks;
@Schema(description = "备注2")
private String remarks2;
}

View File

@ -126,4 +126,9 @@ public class ProduceOrderDO extends BaseDO {
*/
private String remarks;
/**
* 备注2
*/
private String remarks2;
}

View File

@ -82,12 +82,12 @@ public class ProduceOrderServiceImpl implements ProduceOrderService {
Double specSizeHeight = productInfo.getSpecSizeHeight();
String specMaterial = productInfo.getSpecMaterial();
String productionInfo = productInfo.getProductionInfo();
/* StringBuffer str = new StringBuffer();
StringBuffer str = new StringBuffer();
str.append(String.format("货名:%s\r\n",productInfo.getName()));
str.append(String.format("规格:%s × %s \r\n",specSizeWidth,specSizeHeight));
str.append(String.format("纸质:%s \r\n",specMaterial));*/;
//str.append(String.format("%s ",productionInfo));
//updateObj.setDetails(str.toString());
str.append(String.format("纸质:%s \r\n",specMaterial));;
str.append(String.format("%s ",productionInfo));
updateObj.setDetails(str.toString());
produceOrderMapper.updateById(updateObj);
}

View File

@ -480,14 +480,14 @@ public class SaleOrderServiceImpl implements SaleOrderService {
}
saveReqVO.setRemarks(remarks);
}
/* Double specSizeWidth = productInfo.getSpecSizeWidth();
Double specSizeWidth = productInfo.getSpecSizeWidth();
Double specSizeHeight = productInfo.getSpecSizeHeight();
String specMaterial = productInfo.getSpecMaterial();
StringBuffer str = new StringBuffer();
str.append(String.format("货名:%s\r\n", productInfo.getName()));
str.append(String.format("规格:%s × %s \r\n", specSizeWidth, specSizeHeight));
str.append(String.format("纸质:%s \r\n", specMaterial));
saveReqVO.setDetails(str.toString());*/
saveReqVO.setDetails(str.toString());
Long produceOrderId = produceOrderService.createProduceOrder(saveReqVO);
}

View File

@ -158,8 +158,8 @@
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="details">
<el-input v-model="formData.details" placeholder="请输入备注" />
<el-form-item label="备注" prop="remarks2">
<el-input v-model="formData.remarks2" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
@ -223,6 +223,7 @@ const formData = ref({
deliveryQty: undefined,
details: undefined,
remarks: undefined,
remarks2: undefined,
remarksText: undefined,
})
@ -308,6 +309,7 @@ const resetForm = () => {
deliveryQty: undefined,
details: undefined,
remarks: undefined,
remarks2: undefined,
remarksText: undefined,
}
formRef.value?.resetFields()
@ -328,23 +330,23 @@ const downpdf = async () => {
formData.value.inspectionDateStr = formatDate(formData.value.inspectionDate,'YYYY-MM-DD')
formData.value.deliverydateStr = formatDate(formData.value.deliverydate,'YYYY-MM-DD')
const remarks = formData.value.remarks
const details = formData.value.details || ''
const remarks2 = formData.value.remarks2 || ''
if(remarks){
formData.value.remarksText = remarks + '\n \n' +details
formData.value.remarksText = remarks + '\n \n' +remarks2
}else {
formData.value.remarksText = details
formData.value.remarksText = remarks2
}
//formData.value.saleContractNo = formData.value.orderNo
debugger
if(formData.value.productId){
const material = await ProductInfoApi.getProductInfo(formData.value.productId)
formData.value.productCode = material.code
formData.value.productName = material.name
//formData.value.details = material.productionInfo
formData.value.details = material.productionInfo
}else {
formData.value.productCode = ''
formData.value.productName = ''
//formData.value.details = ''
formData.value.details = ''
}
let printData = JSON.stringify(formData.value)
@ -377,11 +379,11 @@ const preview = async () => {
formData.value.inspectionDateStr = formatDate(formData.value.inspectionDate,'YYYY-MM-DD')
formData.value.deliverydateStr = formatDate(formData.value.deliverydate,'YYYY-MM-DD')
const remarks = formData.value.remarks
const details = formData.value.details || ''
const remarks2 = formData.value.remarks2 || ''
if(remarks){
formData.value.remarksText = remarks + '\n \n' +details
formData.value.remarksText = remarks + '\n \n' +remarks2
}else {
formData.value.remarksText = details
formData.value.remarksText = remarks2
}
//formData.value.saleContractNo = formData.value.orderNo
@ -389,11 +391,11 @@ const preview = async () => {
const material = await ProductInfoApi.getProductInfo(formData.value.productId)
formData.value.productCode = material.code
formData.value.productName = material.name
//formData.value.details = material.productionInfo
formData.value.details = material.productionInfo
}else {
formData.value.productCode = ''
formData.value.productName = ''
//formData.value.details = ''
formData.value.details = ''
}