Commit 84d0139c authored by 沈翠玲's avatar 沈翠玲

退料申请随机数

parent 2f1a2708
......@@ -2731,8 +2731,18 @@ export default {
this.materialReturnSelected.isQualified = this.materialReturnFormData.isQualified;
this.materialReturnFormVisible = false;
},
formatDateRandom() {
const date = new Date();
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
let randomNumber = Math.floor(Math.random() * 10000);
randomNumber = randomNumber.toString().padStart(4, '0');
return `SN${year}${month}${day}${randomNumber}`
},
materialReturnSave() {
const taskInfo = this.tableSelectData[0];
const apply_no = this.formatDateRandom()
const rst = this.materialReturnList.map((s) => {
let data = {
itemId: s.itemId,
......@@ -2743,6 +2753,7 @@ export default {
workOrderId: s.workorderId,
batchNo: s.batchCode,
packNo: s.packNo,
apply_no: apply_no,
isQualified: s.isQualified
};
if (this.materialReturnFormData.workorderCode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment