新购绑定二维码,维修数量检验
This commit is contained in:
parent
2f8c6a6060
commit
15c7ffd52d
|
|
@ -51,12 +51,11 @@ export function getListDetailById(query) {
|
||||||
|
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
export function exportNewBuy(data) {
|
export function exportNewBuy(purchaseId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material/purchase/bind/downloadQrCode',
|
url: '/material/purchase/bind/downloadQrCode?purchaseId='+purchaseId,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
data: data,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,14 @@ export function getListTested(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// // 查询修试审核详细列表
|
|
||||||
// export function getAuditInfo(query) {
|
// 查询修试审核详细列表
|
||||||
// return request({
|
export function getRepairedDetailList(taskId) {
|
||||||
// url: '/material/repair_audit_details/getRepairAuditList',
|
return request({
|
||||||
// method: 'get',
|
url: '/material/repair/getRepairedDetailList?taskId='+taskId,
|
||||||
// params: query
|
method: 'get',
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
|
|
||||||
// //修试审核二级-通过,驳回
|
// //修试审核二级-通过,驳回
|
||||||
// export function auditPass(data) {
|
// export function auditPass(data) {
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="400">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -158,7 +158,6 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="success"
|
type="success"
|
||||||
@click="onDownloadQr(row)"
|
@click="onDownloadQr(row)"
|
||||||
v-if="queryType === 1"
|
|
||||||
>
|
>
|
||||||
<svg-icon icon-class="qr-icon" />
|
<svg-icon icon-class="qr-icon" />
|
||||||
下载
|
下载
|
||||||
|
|
@ -389,7 +388,9 @@ import {
|
||||||
getListDetailById,
|
getListDetailById,
|
||||||
getNewBuyBindListDetailsApi,
|
getNewBuyBindListDetailsApi,
|
||||||
getMaCodeInfo,
|
getMaCodeInfo,
|
||||||
|
exportNewBuy,
|
||||||
} from "@/api/purchase/goodsBind";
|
} from "@/api/purchase/goodsBind";
|
||||||
|
import { downloadFile } from '@/utils/download'
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {
|
import {
|
||||||
uploadPurchaseFile,
|
uploadPurchaseFile,
|
||||||
|
|
@ -712,9 +713,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 下载
|
/** 导出二维码按钮操作 */
|
||||||
onDownloadQr() {
|
onDownloadQr(row) {
|
||||||
console.log("二维码下载");
|
exportNewBuy(row.id).then(res => {
|
||||||
|
downloadFile({ fileName: `二维码_${new Date().getTime()}.zip`, fileData: res, fileType: 'application/zip;charset=utf-8' })
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 填充
|
// 填充
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
|
|
||||||
|
|
@ -171,15 +171,6 @@
|
||||||
@click="handleNotice(row)"
|
@click="handleNotice(row)"
|
||||||
>驳回</el-button
|
>驳回</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
|
||||||
plain
|
|
||||||
size="mini"
|
|
||||||
type="success"
|
|
||||||
@click="onDownloadQr(row)"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="qr-icon" />
|
|
||||||
下载
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,12 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop="typeRepairedNum"
|
prop="typeRepairedNum"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="待报废数量"
|
||||||
|
align="center"
|
||||||
|
prop="typeScrapNum"
|
||||||
|
show-overflow-tooltip
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="待修数量"
|
label="待修数量"
|
||||||
|
|
@ -133,11 +139,6 @@
|
||||||
width="1200px"
|
width="1200px"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" size="mini">合格</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-table :data="repairDeviceList" width="100%" height="450px">
|
<el-table :data="repairDeviceList" width="100%" height="450px">
|
||||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -1140,6 +1141,7 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
rulesMiddle: {
|
rulesMiddle: {
|
||||||
repairNum: [
|
repairNum: [
|
||||||
|
|
@ -1150,13 +1152,13 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
// supplierId: [
|
supplierId: [
|
||||||
// {
|
{
|
||||||
// required: true,
|
required: true,
|
||||||
// message: "请选择厂家",
|
message: "请选择厂家",
|
||||||
// trigger: "change",
|
trigger: "change",
|
||||||
// },
|
},
|
||||||
// ],
|
],
|
||||||
|
|
||||||
partPrice: [
|
partPrice: [
|
||||||
{
|
{
|
||||||
|
|
@ -1267,7 +1269,7 @@ export default {
|
||||||
const res = await getAppRepairMaTypeList(param);
|
const res = await getAppRepairMaTypeList(param);
|
||||||
this.equipmentList = res.data;
|
this.equipmentList = res.data;
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
// this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
|
// this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
|
||||||
},
|
},
|
||||||
|
|
@ -1306,7 +1308,7 @@ export default {
|
||||||
const res = await getAppRepairMaTypeList(param);
|
const res = await getAppRepairMaTypeList(param);
|
||||||
this.equipmentList = res.data;
|
this.equipmentList = res.data;
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
this.$modal.msgSuccess("通过成功");
|
this.$modal.msgSuccess("通过成功");
|
||||||
}
|
}
|
||||||
|
|
@ -1330,7 +1332,7 @@ export default {
|
||||||
const res = await getAppRepairMaTypeList(param);
|
const res = await getAppRepairMaTypeList(param);
|
||||||
this.equipmentList = res.data;
|
this.equipmentList = res.data;
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
this.$modal.msgSuccess("合格成功");
|
this.$modal.msgSuccess("合格成功");
|
||||||
})
|
})
|
||||||
|
|
@ -1437,7 +1439,7 @@ export default {
|
||||||
const res = await getAppRepairMaTypeList(param);
|
const res = await getAppRepairMaTypeList(param);
|
||||||
this.equipmentList = res.data;
|
this.equipmentList = res.data;
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
this.openCode = false;
|
this.openCode = false;
|
||||||
// console.log(this.equipmentList)
|
// console.log(this.equipmentList)
|
||||||
|
|
@ -1453,7 +1455,7 @@ export default {
|
||||||
const res = await getAppRepairMaTypeList(param);
|
const res = await getAppRepairMaTypeList(param);
|
||||||
this.equipmentList = res.data;
|
this.equipmentList = res.data;
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
this.openCode = false;
|
this.openCode = false;
|
||||||
},
|
},
|
||||||
|
|
@ -1863,10 +1865,23 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async validateForms(refs){
|
||||||
|
const validationResults = await Promise.all(refs.map(ref =>ref.validate()))
|
||||||
|
return validationResults.every(result=> result===true)
|
||||||
|
},
|
||||||
//数量管理保存
|
//数量管理保存
|
||||||
async saveNumAll() {
|
async saveNumAll() {
|
||||||
|
let refTemp = [];
|
||||||
|
if(this.formLeft.repairNum!=0){
|
||||||
|
refTemp.push(this.$refs.formLeft)
|
||||||
|
}
|
||||||
|
if(this.formMiddle.repairNum!=0){
|
||||||
|
refTemp.push(this.$refs.formMiddle)
|
||||||
|
}
|
||||||
if(this.formRight.scrapNum!=0){
|
if(this.formRight.scrapNum!=0){
|
||||||
this.$refs["formLeft","formMiddle","formRight"].validate(async(valid)=>{
|
refTemp.push(this.$refs.formRight)
|
||||||
|
}
|
||||||
|
const valid = await this.validateForms(refTemp)
|
||||||
if(valid){
|
if(valid){
|
||||||
for (let i = 0; i < this.partItems.length; i++) {
|
for (let i = 0; i < this.partItems.length; i++) {
|
||||||
this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
||||||
|
|
@ -1909,65 +1924,129 @@ export default {
|
||||||
const res = await getAppRepairMaTypeList(param);
|
const res = await getAppRepairMaTypeList(param);
|
||||||
this.equipmentList = res.data;
|
this.equipmentList = res.data;
|
||||||
this.equipmentList.forEach((e) => {
|
this.equipmentList.forEach((e) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
this.openNum=false;
|
this.openNum=false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
// this.$refs.refTemp.validate(async(valid)=>{
|
||||||
}else{
|
// if(valid){
|
||||||
this.$refs["formLeft","formMiddle"].validate(async(valid)=>{
|
// for (let i = 0; i < this.partItems.length; i++) {
|
||||||
if(valid){
|
// this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
||||||
for (let i = 0; i < this.partItems.length; i++) {
|
// isCharge: this.partItems[i].isCharge,
|
||||||
this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
// partId: this.partItems[i].partId,
|
||||||
isCharge: this.partItems[i].isCharge,
|
// partNum: this.partItems[i].partNum,
|
||||||
partId: this.partItems[i].partId,
|
// repairNum: this.formLeft.repairNum,
|
||||||
partNum: this.partItems[i].partNum,
|
// });
|
||||||
repairNum: this.formLeft.repairNum,
|
// }
|
||||||
});
|
// }
|
||||||
}
|
// })
|
||||||
for (let i = 0; i < this.partItemsMiddle.length; i++) {
|
// }
|
||||||
this.innerRowData.repairDeviceList[0].numberOutRepairPartList.push({
|
// if(this.formRight.scrapNum!=0){
|
||||||
isCharge: this.partItemsMiddle[i].isCharge,
|
// this.$refs["formLeft","formMiddle","formRight"].validate(async(valid)=>{
|
||||||
partPrice: this.partItemsMiddle[i].partPrice,
|
// if(valid){
|
||||||
partNum: this.partItemsMiddle[i].partNum,
|
// for (let i = 0; i < this.partItems.length; i++) {
|
||||||
partName: this.partItemsMiddle[i].partName,
|
// this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
||||||
supplierId: this.formMiddle.supplierId,
|
// isCharge: this.partItems[i].isCharge,
|
||||||
repairNum: this.formMiddle.repairNum,
|
// partId: this.partItems[i].partId,
|
||||||
});
|
// partNum: this.partItems[i].partNum,
|
||||||
}
|
// repairNum: this.formLeft.repairNum,
|
||||||
this.uploadKey = Date.now();
|
// });
|
||||||
if(this.fileList.length!=0){
|
// }
|
||||||
await this.getImaUpload(),
|
// for (let i = 0; i < this.partItemsMiddle.length; i++) {
|
||||||
this.formRight.fileList = this.fileListTemp;
|
// this.innerRowData.repairDeviceList[0].numberOutRepairPartList.push({
|
||||||
}else{
|
// isCharge: this.partItemsMiddle[i].isCharge,
|
||||||
this.formRight.fileList = this.fileListTemp;
|
// partPrice: this.partItemsMiddle[i].partPrice,
|
||||||
}
|
// partNum: this.partItemsMiddle[i].partNum,
|
||||||
console.log('this.formRight',this.formRight)
|
// partName: this.partItemsMiddle[i].partName,
|
||||||
this.innerRowData.repairDeviceList[0].numberScrapRepairPartList.push(this.formRight)
|
// supplierId: this.formMiddle.supplierId,
|
||||||
this.innerRowData.repairDeviceList[0].repairType = 1;
|
// repairNum: this.formMiddle.repairNum,
|
||||||
saveCodeList(this.innerRowData.repairDeviceList).then(async (response) => {
|
// });
|
||||||
if (response.code == 200) {
|
// }
|
||||||
this.$modal.msgSuccess("保存成功");
|
// this.uploadKey = Date.now();
|
||||||
this.fileList=[];
|
// if(this.fileList.length!=0){
|
||||||
this.fileListTemp=[];
|
// await this.getImaUpload(),
|
||||||
let param = {
|
// this.formRight.fileList = this.fileListTemp;
|
||||||
taskId: this.repairRow.taskId,
|
// }else{
|
||||||
keyword: "",
|
// this.formRight.fileList = this.fileListTemp;
|
||||||
};
|
// }
|
||||||
this.taskIdTemp = this.repairRow.taskId;
|
// console.log('this.formRight',this.formRight)
|
||||||
const res = await getAppRepairMaTypeList(param);
|
// this.innerRowData.repairDeviceList[0].numberScrapRepairPartList.push(this.formRight)
|
||||||
this.equipmentList = res.data;
|
// this.innerRowData.repairDeviceList[0].repairType = 1;
|
||||||
this.equipmentList.forEach((e) => {
|
// saveCodeList(this.innerRowData.repairDeviceList).then(async (response) => {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum);
|
// if (response.code == 200) {
|
||||||
});
|
// this.$modal.msgSuccess("保存成功");
|
||||||
this.openNum=false;
|
// this.fileList=[];
|
||||||
}
|
// this.fileListTemp=[];
|
||||||
});
|
// let param = {
|
||||||
}
|
// taskId: this.repairRow.taskId,
|
||||||
})
|
// keyword: "",
|
||||||
}
|
// };
|
||||||
|
// this.taskIdTemp = this.repairRow.taskId;
|
||||||
|
// const res = await getAppRepairMaTypeList(param);
|
||||||
|
// this.equipmentList = res.data;
|
||||||
|
// this.equipmentList.forEach((e) => {
|
||||||
|
// e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
|
// });
|
||||||
|
// this.openNum=false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }else{
|
||||||
|
// this.$refs["formLeft","formMiddle"].validate(async(valid)=>{
|
||||||
|
// if(valid){
|
||||||
|
// for (let i = 0; i < this.partItems.length; i++) {
|
||||||
|
// this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
||||||
|
// isCharge: this.partItems[i].isCharge,
|
||||||
|
// partId: this.partItems[i].partId,
|
||||||
|
// partNum: this.partItems[i].partNum,
|
||||||
|
// repairNum: this.formLeft.repairNum,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// for (let i = 0; i < this.partItemsMiddle.length; i++) {
|
||||||
|
// this.innerRowData.repairDeviceList[0].numberOutRepairPartList.push({
|
||||||
|
// isCharge: this.partItemsMiddle[i].isCharge,
|
||||||
|
// partPrice: this.partItemsMiddle[i].partPrice,
|
||||||
|
// partNum: this.partItemsMiddle[i].partNum,
|
||||||
|
// partName: this.partItemsMiddle[i].partName,
|
||||||
|
// supplierId: this.formMiddle.supplierId,
|
||||||
|
// repairNum: this.formMiddle.repairNum,
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// this.uploadKey = Date.now();
|
||||||
|
// if(this.fileList.length!=0){
|
||||||
|
// await this.getImaUpload(),
|
||||||
|
// this.formRight.fileList = this.fileListTemp;
|
||||||
|
// }else{
|
||||||
|
// this.formRight.fileList = this.fileListTemp;
|
||||||
|
// }
|
||||||
|
// console.log('this.formRight',this.formRight)
|
||||||
|
// this.innerRowData.repairDeviceList[0].numberScrapRepairPartList.push(this.formRight)
|
||||||
|
// this.innerRowData.repairDeviceList[0].repairType = 1;
|
||||||
|
// saveCodeList(this.innerRowData.repairDeviceList).then(async (response) => {
|
||||||
|
// if (response.code == 200) {
|
||||||
|
// this.$modal.msgSuccess("保存成功");
|
||||||
|
// this.openNum=false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// this.fileList=[];
|
||||||
|
// this.fileListTemp=[];
|
||||||
|
// let param = {
|
||||||
|
// taskId: this.repairRow.taskId,
|
||||||
|
// keyword: "",
|
||||||
|
// };
|
||||||
|
// this.taskIdTemp = this.repairRow.taskId;
|
||||||
|
// const res = await getAppRepairMaTypeList(param);
|
||||||
|
// this.equipmentList = res.data;
|
||||||
|
// this.equipmentList.forEach((e) => {
|
||||||
|
// e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum)-Number(e.typeScrapNum);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
//数量管理取消
|
//数量管理取消
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getListTested,
|
getListTested,
|
||||||
|
getRepairedDetailList
|
||||||
} from "@/api/repair/testedInBound";
|
} from "@/api/repair/testedInBound";
|
||||||
import { downloadFile } from "@/utils/download";
|
import { downloadFile } from "@/utils/download";
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -340,14 +340,18 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
//一级页面查看按钮
|
//一级页面查看按钮
|
||||||
handleView(){
|
handleView(row){
|
||||||
// this.getListView()
|
// this.getListView()
|
||||||
this.title = "查看"
|
this.title = "查看"
|
||||||
this.getInBoundInfo = [
|
getRepairedDetailList(row.id).then((response) => {
|
||||||
{'typeName':'p1','taskStatus':0},
|
this.getInBoundInfo = response.rows;
|
||||||
{'typeName':'p2','taskStatus':1}
|
this.totalView = response.total;
|
||||||
]
|
this.loading = false;
|
||||||
this.totalView = 2
|
});
|
||||||
|
// this.getInBoundInfo = [
|
||||||
|
// {'typeName':'p1','taskStatus':0},
|
||||||
|
// {'typeName':'p2','taskStatus':1}
|
||||||
|
// ]
|
||||||
this.showView = true;
|
this.showView = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue