Browse Source

检验bug修改及优化

faster_develop
安虹睿 2 years ago
parent
commit
e26fa07e91
  1. 3
      fe/PC/src/components/currenTable/index.vue
  2. 2
      fe/PC/src/components/umyTable/index.vue
  3. 30
      fe/PC/src/router/index.js
  4. 182
      fe/PC/src/views/ceshi/ceshi.vue
  5. 207
      fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue

3
fe/PC/src/components/currenTable/index.vue

@ -242,8 +242,9 @@
</el-form-item>
<!-- table表添加按钮事件 v-show="scope.row.number == 'PRJ202210060001'" -->
<el-form-item v-if="item.type == 'button'" >
<!-- v-show="scope.row[item.prop]==undefined?true:false" -->
<el-button
v-show="scope.row[item.prop]==undefined?true:false"
v-show="item.alwaysShow ? true : ((scope.row[item.prop]==undefined || scope.row[item.prop] == '' || !scope.row[item.prop])?false:true)"
type="primary"
size="mini"
@click="buttonClick(scope.row, scope.$index, item.label)"

2
fe/PC/src/components/umyTable/index.vue

@ -251,7 +251,7 @@
<!-- v-show="scope.row[item.prop]==undefined?true:false" -->
<div v-if="item.type == 'button'">
<el-button
v-show="(scope.row[item.prop]==undefined || scope.row[item.prop] == '' || !scope.row[item.prop])?false:true"
v-show="item.alwaysShow ? true : ((scope.row[item.prop]==undefined || scope.row[item.prop] == '' || !scope.row[item.prop])?false:true)"
type="primary"
size="mini"
@click="buttonClick(scope.row, scope.$index, item.label,item)"

30
fe/PC/src/router/index.js

@ -142,21 +142,21 @@ export const constantRoutes = [
// },
// 开发中模拟路由
// {
// path: '/',
// component: Layout,
// redirect: '/TestSchool',
// hidden: true,
// children: [{
// path: 'TestSchool',
// component: () => import('@/views/interfaceBoard/TestSchool.vue'),
// name: 'TestSchool',
// meta: {
// title: 'TestSchool',
// icon: '拆分记录',
// }
// }]
// },
{
path: '/',
component: Layout,
redirect: '/ceshi',
hidden: true,
children: [{
path: 'ceshi',
component: () => import('@/views/ceshi/ceshi.vue'),
name: 'ceshi',
meta: {
title: 'ceshi',
icon: '',
}
}]
},
// {
// path: '/',
// component: Layout,

182
fe/PC/src/views/ceshi/ceshi.vue

File diff suppressed because one or more lines are too long

207
fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue

@ -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,

Loading…
Cancel
Save