|
|
|
@ -60,12 +60,24 @@ |
|
|
|
|
|
|
|
<!-- 第三行 --> |
|
|
|
<el-row :gutter="15" style="margin-bottom: 15px;"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="装箱数量" class="customer-item"> |
|
|
|
<el-input v-model="formData.boxQty" type="number"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="装箱批次" class="customer-item"> |
|
|
|
<el-select v-model="formData.batchNo" placeholder="请选择装箱批次"> |
|
|
|
<el-option |
|
|
|
v-for="item in batchNos" |
|
|
|
:key="item" |
|
|
|
:label="item" |
|
|
|
:value="item"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 按钮区域 --> |
|
|
|
@ -92,7 +104,7 @@ |
|
|
|
/*打印标签专用的js*/ |
|
|
|
import { printShipmentPackingBoxLabel } from '@/views/modules/label/print_shipment_packing_box_label.js' |
|
|
|
import { |
|
|
|
getPrintShipment, |
|
|
|
getPrintShipment, getPrintShipmentBatchNos, |
|
|
|
} from '@/api/shipment' |
|
|
|
import dayjs from "dayjs"; |
|
|
|
|
|
|
|
@ -108,7 +120,9 @@ export default { |
|
|
|
relatedOrderNo: '', |
|
|
|
saleQty: 0, |
|
|
|
boxQty: 0, |
|
|
|
batchNo: '', |
|
|
|
}, |
|
|
|
batchNos: [], |
|
|
|
printRow: {}, |
|
|
|
dataListLoading: false, |
|
|
|
printLoading: false, |
|
|
|
@ -123,8 +137,12 @@ export default { |
|
|
|
this.formData.orderNumber = row.orderNumber; |
|
|
|
this.formData.saleQty = row.saleQty; |
|
|
|
this.formData.boxQty = row.saleQty; |
|
|
|
this.formData.batchNo = ''; |
|
|
|
this.batchNos = []; |
|
|
|
//打开显示 |
|
|
|
this.visible = true; |
|
|
|
//刷新列表信息 |
|
|
|
this.initShipmentBatchNos(); |
|
|
|
//赋值 |
|
|
|
this.printRow = JSON.parse(JSON.stringify(row)); |
|
|
|
//自动获取焦点 |
|
|
|
@ -145,9 +163,20 @@ export default { |
|
|
|
boxQty: 0, |
|
|
|
}; |
|
|
|
}, |
|
|
|
/*初始化数据*/ |
|
|
|
initShipmentBatchNos(){ |
|
|
|
getPrintShipmentBatchNos(this.printRow).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.batchNos = data.rows; |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 处理打印标签 |
|
|
|
// 处理打印标签 |
|
|
|
handlePrintLabel() { |
|
|
|
if (!this.formData || Object.keys(this.formData).length === 0) { |
|
|
|
this.$message.warning('请先扫描标签条码'); |
|
|
|
@ -171,8 +200,10 @@ export default { |
|
|
|
this.printRow.boxQty = boxQty; |
|
|
|
getPrintShipment(this.printRow).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
let arr = data.row; |
|
|
|
arr.productionDate = `${dayjs(arr.productionDate).format("YYYYMMDD")}`; |
|
|
|
let printRow = data.row; |
|
|
|
printRow.productionDate = `${dayjs(printRow.productionDate).format("YYYYMMDD")}`; |
|
|
|
let arr = []; |
|
|
|
arr.push(printRow) ; |
|
|
|
printShipmentPackingBoxLabel(arr); |
|
|
|
this.$message.success('标签打印成功'); |
|
|
|
}else { |
|
|
|
|