opt:印尼打印功能新增子卷

This commit is contained in:
2026-04-23 17:00:10 +08:00
parent b166d27960
commit 340355a66b
8 changed files with 33 additions and 1 deletions

View File

@@ -212,4 +212,9 @@ public class MdCsCustomerBase implements Serializable {
* 内标打印模版
*/
private String bz_print_within;
/**
* 是否单卷单箱
*/
private String is_single_roll_single_box;
}

View File

@@ -209,4 +209,9 @@ public class CustomerbaseDto implements Serializable {
* 内标打印模版
*/
private String bz_print_within;
/**
* 是否单卷单箱
*/
private String is_single_roll_single_box;
}

View File

@@ -96,6 +96,8 @@ public class PrintServiceImpl implements PrintService {
String nspector = "1";
//储存条件
String storage_conditions = "";
//子卷号
String container_name = "";
// 根据客户条件选择对应模板
JSONObject jsonCust = custTab.query("cust_code = '" + box_jo.getString("customer_name") + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
@@ -107,12 +109,17 @@ public class PrintServiceImpl implements PrintService {
throw new BadRequestException("请先设置客户打印模板");
}
String bz_print_no = jsonCust.getString("bz_print_no");
String is_single_roll_single_box = jsonCust.getString("is_single_roll_single_box");
double weight = 0;
JSONArray rows = WQL.getWO("PDA_ST_01").addParam("flag", "5").addParam("box_no", box_no).process().getResultJSONArray(0);
for (int i = 0; i < rows.size(); i++) {
JSONObject row = rows.getJSONObject(i);
weight += row.getDoubleValue("net_weight");
if(i == 0 && "1".equals(is_single_roll_single_box) ){
container_name = row.getString("container_name");
}
}
// 生成txt文件
@@ -132,7 +139,7 @@ public class PrintServiceImpl implements PrintService {
fw = new FileWriter(filePath);
OutputStreamWriter write = new OutputStreamWriter(new FileOutputStream(file), "utf-8");
BufferedWriter bw = new BufferedWriter(write);
bw.write("bz_print_no,package_box_sn1,package_box_sn2,sale_order_name,product_description,product_name,width,pcsn,date_of_FG_inbound,box_weight,date_of_production,quanlity_in_box,quality_guaran_period,nspector,storage_conditions,weight,customer_name,customer_description,thickness,mass_per_unit_area,length,box_type,sap_pcsn,box_length,box_width,box_high,material_type,joint_type\n");
bw.write("bz_print_no,package_box_sn1,package_box_sn2,sale_order_name,product_description,product_name,width,pcsn,date_of_FG_inbound,box_weight,date_of_production,quanlity_in_box,quality_guaran_period,nspector,storage_conditions,container_name,weight,customer_name,customer_description,thickness,mass_per_unit_area,length,box_type,sap_pcsn,box_length,box_width,box_high,material_type,joint_type\n");
bw.write(bz_print_no + ","
+ package_box_sn1 + ","
@@ -149,6 +156,7 @@ public class PrintServiceImpl implements PrintService {
+ quality_guaran_period + ","
+ nspector + ","
+ storage_conditions + ","
+ container_name + ","
+ NumberUtil.round(weight, 2).toString() + "KG,"
+ box_jo.getString("customer_name") + ","
+ box_jo.getString("customer_description") + ","

View File

@@ -3646,6 +3646,7 @@ var config = {
"topCategoryCannotBeEmpty": "Is Top Category cannot be empty"
},
"customer": {
"isSingleRollSingleBox": "Is single roll single box",
"enterCustomerCodeOrName": "Enter customer code or name",
"customerCode": "Customer Code",
"customerName": "Customer Name",

View File

@@ -3606,6 +3606,7 @@ var config = {
"topCategoryCannotBeEmpty": "Apakah kategori teratas tidak boleh kosong"
},
"customer": {
"isSingleRollSingleBox": "Apakah satu gulung per kotak",
"enterCustomerCodeOrName": "Masukkan kode atau nama pelanggan",
"customerCode": "Kode Pelanggan",
"customerName": "Nama Pelanggan",

View File

@@ -3690,6 +3690,7 @@ var config = {
"topCategoryCannotBeEmpty": "是否顶级分类不能为空"
},
"customer": {
"isSingleRollSingleBox": "是否单卷单箱",
"enterCustomerCodeOrName": "输入客户编码或名称",
"customerCode": "客户编码",
"customerName": "客户名称",

View File

@@ -135,6 +135,12 @@
<el-radio v-model="form.is_auto_table" label="1">{{ $t('wms.basedata.master.customer.yes') }}</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('wms.basedata.master.customer.isSingleRollSingleBox')" prop="is_single_roll_single_box">
<el-radio v-model="form.is_single_roll_single_box" label="0">{{ $t('wms.basedata.master.customer.no') }}</el-radio>
<el-radio v-model="form.is_single_roll_single_box" label="1">{{ $t('wms.basedata.master.customer.yes') }}</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('wms.basedata.master.customer.salesman')" prop="sales_owner">
<el-input v-model="form.sales_owner" style="width: 200px;" />
@@ -196,6 +202,7 @@
<el-table-column prop="shd_print_no" :label="$t('wms.basedata.master.customer.deliveryNotePrintTemplatePath')" width="180px" show-overflow-tooltip />
<el-table-column prop="shd_dtl_num" :label="$t('wms.basedata.master.customer.deliveryNoteDetailCount')" width="150px" show-overflow-tooltip />
<el-table-column prop="is_auto_table" :label="$t('wms.basedata.master.customer.isAutoLabeling')" width="150px" show-overflow-tooltip :formatter="autoTable" />
<el-table-column prop="is_single_roll_single_box" :label="$t('wms.basedata.master.customer.isSingleRollSingleBox')" width="150px" show-overflow-tooltip :formatter="singleRollSingleBox" />
<el-table-column prop="update_optname" :label="$t('wms.basedata.master.customer.modifier')" width="150px" />
<el-table-column prop="update_time" :label="$t('wms.basedata.master.customer.modificationTime')" width="150" />
<el-table-column :label="$t('wms.basedata.master.customer.enabled')" align="center" prop="is_used">
@@ -278,6 +285,7 @@ const defaultForm = {
bz_print_no: null,
shd_print_no: null,
is_auto_table: '1',
is_single_roll_single_box: '0',
bz_print_within: null,
sales_owner: null
}
@@ -415,6 +423,9 @@ export default {
},
autoTable(row) {
return this.dict.label.is_used[row.is_auto_table]
},
singleRollSingleBox(row) {
return this.dict.label.is_used[row.is_single_roll_single_box]
}
}
}