|
|
@ -64,6 +64,7 @@ |
|
|
|
type="primary" |
|
|
|
v-if="scope.row.summaryInspectStatus != 2" |
|
|
|
@click="buttonClick(scope.row)" |
|
|
|
size="small" |
|
|
|
>检验详情</el-button> |
|
|
|
<span v-else style="color:#31bb99">质检已完成</span> |
|
|
|
</template> |
|
|
@ -158,7 +159,7 @@ |
|
|
|
<el-dialog |
|
|
|
title="质检详情" |
|
|
|
v-loading="loading" |
|
|
|
:visible.sync="inspectNoticeDetailsShow" |
|
|
|
:visible="inspectNoticeDetailsShow" |
|
|
|
top="5vh" |
|
|
|
width="80%" |
|
|
|
:fullscreen="true" |
|
|
@ -197,7 +198,8 @@ |
|
|
|
class="formTable-box" |
|
|
|
prop="details" |
|
|
|
> |
|
|
|
<currenTable |
|
|
|
<umyTable |
|
|
|
:setUTableHeight="470" |
|
|
|
:tableData="inspectNoticeDetailsFormData.details" |
|
|
|
:tableColumns="inspectNoticeDetailsTableColumns" |
|
|
|
:tableLoading = "inspectNoticeDetailsTableLoading" |
|
|
@ -206,7 +208,7 @@ |
|
|
|
:cellStyle = "cellStyle" |
|
|
|
@buttonClick="inspectDetailsButtonClick" |
|
|
|
> |
|
|
|
</currenTable> |
|
|
|
</umyTable> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</curren-Form> |
|
|
@ -488,8 +490,8 @@ export default { |
|
|
|
// { label: "单位", prop: "receiveUom", width:'100%' }, |
|
|
|
{ label: "收货数量", prop: "receiveQty", width:'100%' }, |
|
|
|
{ label: "状态", prop: "detailInspectStatus", type: "filter", filters: "detailInspectStatus", width:'100%' }, |
|
|
|
{ type: "button", label: "检验", prop: "buttonHide", width:'100%' }, |
|
|
|
{ type: "button", label: "清除检验", width:'100%' }, |
|
|
|
{ type: "button", label: "检验", prop: "buttonHide",alwaysShow:true, width:'100%' }, |
|
|
|
{ type: "button", label: "清除检验", alwaysShow:true,width:'100%' }, |
|
|
|
], |
|
|
|
//查询质检详情-表单数据 |
|
|
|
QueryDetailsFormData: { |
|
|
@ -606,106 +608,112 @@ export default { |
|
|
|
this.$message.error('已完成质检') |
|
|
|
return |
|
|
|
} |
|
|
|
this.inspectNoticeDetailsFormData.formFile = [] |
|
|
|
this.inspectNoticeDetailsFormData = { |
|
|
|
warehouseCode: localStorage.getItem('warehouseCode'), |
|
|
|
supplierBatch: null, |
|
|
|
creationTime: null, |
|
|
|
summaryInspectStatus: 0, |
|
|
|
inspectUser: null, |
|
|
|
uom: null, |
|
|
|
receiveQty: 0, |
|
|
|
lot: null, |
|
|
|
notPassedQty: 0, |
|
|
|
remark: null, |
|
|
|
itemDesc1: null, |
|
|
|
itemDesc2: null, |
|
|
|
poLine: null, |
|
|
|
stdPackQty: 0, |
|
|
|
arriveDate: null, |
|
|
|
goodQty: 0, |
|
|
|
itemCode: null, |
|
|
|
samplePercent: 0, |
|
|
|
masterID: null, |
|
|
|
crackQty: 0, |
|
|
|
inspectType: 0, |
|
|
|
lastModifierId: null, |
|
|
|
creatorId: null, |
|
|
|
expireDate: null, |
|
|
|
number: null, |
|
|
|
itemName: null, |
|
|
|
abcClass: null, |
|
|
|
failedReason: null, |
|
|
|
failedQty: 0, |
|
|
|
poNumber: null, |
|
|
|
produceDate: null, |
|
|
|
inspectQty: 0, |
|
|
|
id: null, |
|
|
|
inspectReport: null, |
|
|
|
lastModificationTime: null, |
|
|
|
sampleQty: 0, // 要求检验数量 |
|
|
|
filesList:[], |
|
|
|
formFile: [], |
|
|
|
details: [] |
|
|
|
// inspectUserEmail: null, |
|
|
|
// supplierPackQty: 0, |
|
|
|
// tenantId: null, |
|
|
|
// inspectUserName: null, |
|
|
|
// receiveUom: null, |
|
|
|
// goodQty: 0, |
|
|
|
// supplierPackUom: null, |
|
|
|
// inspectUserPhone: null, |
|
|
|
// stdPackUom: null, |
|
|
|
} |
|
|
|
this.$listAssign(this.inspectNoticeDetailsFormData, row) |
|
|
|
let findRs = this.tableDataDetails.details.filter(item => ( |
|
|
|
item.itemCode == row.itemCode |
|
|
|
)) |
|
|
|
this.inspectNoticeDetailsFormData.details = findRs |
|
|
|
// 根据合格不合格状态控制按钮显示隐藏,item.inspectType == 1免检的隐藏 |
|
|
|
this.inspectNoticeDetailsFormData.details.forEach(item => { |
|
|
|
if (item.detailInspectStatus == 2 || item.detailInspectStatus == 3 || item.inspectType == 1) { |
|
|
|
item.buttonHide = false |
|
|
|
// 展现 质检详情窗口 |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
setTimeout(()=>{ |
|
|
|
this.inspectNoticeDetailsFormData.formFile = [] |
|
|
|
this.inspectNoticeDetailsFormData = { |
|
|
|
warehouseCode: localStorage.getItem('warehouseCode'), |
|
|
|
supplierBatch: null, |
|
|
|
creationTime: null, |
|
|
|
summaryInspectStatus: 0, |
|
|
|
inspectUser: null, |
|
|
|
uom: null, |
|
|
|
receiveQty: 0, |
|
|
|
lot: null, |
|
|
|
notPassedQty: 0, |
|
|
|
remark: null, |
|
|
|
itemDesc1: null, |
|
|
|
itemDesc2: null, |
|
|
|
poLine: null, |
|
|
|
stdPackQty: 0, |
|
|
|
arriveDate: null, |
|
|
|
goodQty: 0, |
|
|
|
itemCode: null, |
|
|
|
samplePercent: 0, |
|
|
|
masterID: null, |
|
|
|
crackQty: 0, |
|
|
|
inspectType: 0, |
|
|
|
lastModifierId: null, |
|
|
|
creatorId: null, |
|
|
|
expireDate: null, |
|
|
|
number: null, |
|
|
|
itemName: null, |
|
|
|
abcClass: null, |
|
|
|
failedReason: null, |
|
|
|
failedQty: 0, |
|
|
|
poNumber: null, |
|
|
|
produceDate: null, |
|
|
|
inspectQty: 0, |
|
|
|
id: null, |
|
|
|
inspectReport: null, |
|
|
|
lastModificationTime: null, |
|
|
|
sampleQty: 0, // 要求检验数量 |
|
|
|
filesList:[], |
|
|
|
formFile: [], |
|
|
|
details: [] |
|
|
|
// inspectUserEmail: null, |
|
|
|
// supplierPackQty: 0, |
|
|
|
// tenantId: null, |
|
|
|
// inspectUserName: null, |
|
|
|
// receiveUom: null, |
|
|
|
// goodQty: 0, |
|
|
|
// supplierPackUom: null, |
|
|
|
// inspectUserPhone: null, |
|
|
|
// stdPackUom: null, |
|
|
|
} |
|
|
|
}) |
|
|
|
// 获取要求检验数量 |
|
|
|
this.inspectNoticeDetailsFormData.sampleQty = 0 |
|
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/item-quality').then(res => { |
|
|
|
for(var i=0;i<res.length;i++) { |
|
|
|
if (res[i].supplierCode == this.propsData.supplierCode) { |
|
|
|
// 非免检 |
|
|
|
if (res[i].inspectType !== 1) { |
|
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/AQL').then(res => { |
|
|
|
for(var i=0;i<res.length;i++) { |
|
|
|
if (res[i].supplierCode == this.propsData.supplierCode) { |
|
|
|
if (this.inspectNoticeDetailsFormData.receiveQty >= res[i].floorQty && this.inspectNoticeDetailsFormData.receiveQty <= res[i].ceilingQty) { |
|
|
|
this.inspectNoticeDetailsFormData.sampleQty = res[i].sampleQty |
|
|
|
break |
|
|
|
this.$listAssign(this.inspectNoticeDetailsFormData, row) |
|
|
|
let findRs = this.tableDataDetails.details.filter(item => ( |
|
|
|
item.itemCode == row.itemCode |
|
|
|
)) |
|
|
|
this.inspectNoticeDetailsFormData.details = findRs |
|
|
|
// 根据合格不合格状态控制按钮显示隐藏,item.inspectType == 1免检的隐藏 |
|
|
|
this.inspectNoticeDetailsFormData.details.forEach(item => { |
|
|
|
if (item.detailInspectStatus == 2 || item.detailInspectStatus == 3 || item.inspectType == 1) { |
|
|
|
item.buttonHide = false |
|
|
|
} |
|
|
|
}) |
|
|
|
// 获取要求检验数量 |
|
|
|
this.inspectNoticeDetailsFormData.sampleQty = 0 |
|
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/item-quality').then(res => { |
|
|
|
for(var i=0;i<res.length;i++) { |
|
|
|
if (res[i].supplierCode == this.propsData.supplierCode) { |
|
|
|
// 非免检 |
|
|
|
if (res[i].inspectType !== 1) { |
|
|
|
getListByItemcode({itemCode: row.itemCode}, 'basedata/AQL').then(res => { |
|
|
|
for(var i=0;i<res.length;i++) { |
|
|
|
if (res[i].supplierCode == this.propsData.supplierCode) { |
|
|
|
if (this.inspectNoticeDetailsFormData.receiveQty >= res[i].floorQty && this.inspectNoticeDetailsFormData.receiveQty <= res[i].ceilingQty) { |
|
|
|
this.inspectNoticeDetailsFormData.sampleQty = res[i].sampleQty |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.inspectNoticeDetailsFormData.sampleQty == 0) { |
|
|
|
this.$alert('没有找到当前物品代码对应的质检标准!') |
|
|
|
// this.$confirm('没有找到当前物品代码对应的质检标准!, 是否继续?', '提示', { |
|
|
|
// confirmButtonText: '继续', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
// }).catch(() => { |
|
|
|
// }) |
|
|
|
} |
|
|
|
if (this.inspectNoticeDetailsFormData.sampleQty == 0) { |
|
|
|
this.$alert('没有找到当前物品代码对应的质检标准!') |
|
|
|
// this.$confirm('没有找到当前物品代码对应的质检标准!, 是否继续?', '提示', { |
|
|
|
// confirmButtonText: '继续', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
// }).catch(() => { |
|
|
|
// }) |
|
|
|
} |
|
|
|
this.loading = false |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}).catch(err=>{ |
|
|
|
this.loading = false |
|
|
|
}).catch(err=>{ |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err=>{ |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
// 展现 质检详情窗口 |
|
|
|
this.inspectNoticeDetailsShow = true |
|
|
|
}).catch(err=>{ |
|
|
|
this.loading = false |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
this.inspectNoticeDetailsShow = true |
|
|
|
},300) |
|
|
|
}, |
|
|
|
// 质检合格不合格-删除按钮 |
|
|
|
inspectButtonClick(row, index, label) { |
|
|
@ -827,6 +835,7 @@ export default { |
|
|
|
rd.readAsDataURL(this.inspectNoticeDetailsFormData.formFile[0]) |
|
|
|
rd.onloadend = function(){ |
|
|
|
var arrayBuffer = rd.result |
|
|
|
that.inspectNoticeDetailsFormData.filesList = [] |
|
|
|
that.inspectNoticeDetailsFormData.filesList.push( |
|
|
|
{ |
|
|
|
fileName: fileName, |
|
|
|