Commit 62be992a authored by chenzj's avatar chenzj

退料申请编码新增

parent 30712cee
......@@ -273,6 +273,12 @@ const install = (Vue, vm) => {
params
),
//自动生成接口
genCode: (ruleCode) => vm.$u.get(config.adminPath +
'/system/autocode/get/' + ruleCode
),
//首页相关api
getIndexCardInfo: (params = {}) =>
vm.$u.get(config.adminPath + '/mobile/index/getIndexCardInfo', params),
......
......@@ -1353,6 +1353,7 @@ export default {
applyNum: 1,
workorderCode: null
},
applyNo: null,
printTemplateData: null,
printTemplateVisible: false,
userTempVisible: false,
......@@ -2805,19 +2806,15 @@ 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() {
let a=null;
const taskInfo = this.tableSelectData[0];
const apply_no = this.formatDateRandom()
async formatDateRandom() {
await this.$u.api.genCode('MATERIAL_RETURN_CODE').then((item) =>{
console.log(item);
this.applyNo = item;
});
},
materialReturnSave() {
this.formatDateRandom()
const taskInfo = this.tableSelectData[0];
const rst = this.materialReturnList.map((s) => {
let data = {
itemId: s.itemId,
......@@ -2828,7 +2825,7 @@ export default {
workOrderId: s.workorderId,
batchNo: s.batchCode,
packNo: s.packNo,
applyNo: apply_no,
applyNo: this.applyNo,
isQualified: s.isQualified
};
a=a+s.applyNum;
......@@ -2856,14 +2853,14 @@ export default {
values:{
detail:[
{
barcode: apply_no,
showText: '退料单号:'+apply_no,
barcode: this.applyNo,
showText: '退料单号:'+this.applyNo,
gp: i+1
},
{
barcode: apply_no,
showText: '退料单号:'+apply_no,
barcode: this.applyNo,
showText: '退料单号:'+this.applyNo,
gp: i+1
}
......
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