|
|
|
@ -39,7 +39,7 @@ |
|
|
|
<el-form-item label="待收数量"><span>{{ poDetail.qtyToReceive }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :class="{ mt10: getTextWidth(poDetail.description) > 34 }"> |
|
|
|
<el-form-item label="此次接收数量"><span>{{ poDetail.invQtyToReceive }}</span></el-form-item> |
|
|
|
<el-form-item label="计划数量"><span>{{ poDetail.invQtyToReceive }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :class="{ mt10: getTextWidth(poDetail.description) > 34 }"> |
|
|
|
<el-form-item style="margin-left: 20px" label="单位"><span>{{ poDetail.purchaseUOM }}</span></el-form-item> |
|
|
|
@ -130,7 +130,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getPoList, receivePo } from "@/api/po/po.js"; |
|
|
|
import { getPoList, receivePo,printLabel } from "@/api/po/po.js"; |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
@ -203,7 +203,7 @@ export default { |
|
|
|
...row, |
|
|
|
poNo: row.poNumber || this.scanCode, |
|
|
|
dueinQty: row.qtyToReceive || row.invQtyToReceive, |
|
|
|
transQty: row.needHandlingUnit==='Y'?0:row.invQtyToReceive || 0, |
|
|
|
transQty: '', |
|
|
|
batchNo: row.partNo+'-'+row.lineNo+'-'+row.releaseNo+'-'+1, |
|
|
|
deliveryDate: row.plannedDeliveryDate || '', |
|
|
|
arrivalDate: this.getCurrentDate(), |
|
|
|
@ -303,6 +303,7 @@ export default { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.clearAllHandlingUnitCache(); |
|
|
|
this.printViaServer(data.data); // 调用打印 |
|
|
|
this.processFlag = 1; |
|
|
|
this.scanCode = ''; |
|
|
|
this.poList = []; |
|
|
|
@ -317,6 +318,32 @@ export default { |
|
|
|
}).finally(() => { |
|
|
|
this.fullscreenLoading = false; // 结束后关闭loading |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 通过服务器打印 |
|
|
|
*/ |
|
|
|
async printViaServer(receiptNo) { |
|
|
|
this.$emit('print-start') |
|
|
|
try { |
|
|
|
const printRequest = { |
|
|
|
reportId: this.reportId, |
|
|
|
zplCode: this.zplCode, |
|
|
|
paperSize: this.paperSize, |
|
|
|
orientation: this.orientation, |
|
|
|
dpi: this.dpi, |
|
|
|
userId: localStorage.getItem('userName'), |
|
|
|
username: localStorage.getItem('userName'), |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
receiptNo: receiptNo |
|
|
|
} |
|
|
|
const { data } = await printLabel(printRequest) |
|
|
|
if (data.code === 200) { |
|
|
|
this.$message.success(`打印任务已发送!`) |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error('服务器打印失败:', error) |
|
|
|
this.$message.error(`打印失败: ${error.message || error}`) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|