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

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

@ -142,21 +142,21 @@ export const constantRoutes = [
// }, // },
// 开发中模拟路由 // 开发中模拟路由
// { {
// path: '/', path: '/',
// component: Layout, component: Layout,
// redirect: '/TestSchool', redirect: '/ceshi',
// hidden: true, hidden: true,
// children: [{ children: [{
// path: 'TestSchool', path: 'ceshi',
// component: () => import('@/views/interfaceBoard/TestSchool.vue'), component: () => import('@/views/ceshi/ceshi.vue'),
// name: 'TestSchool', name: 'ceshi',
// meta: { meta: {
// title: 'TestSchool', title: 'ceshi',
// icon: '拆分记录', icon: '',
// } }
// }] }]
// }, },
// { // {
// path: '/', // path: '/',
// component: Layout, // 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" type="primary"
v-if="scope.row.summaryInspectStatus != 2" v-if="scope.row.summaryInspectStatus != 2"
@click="buttonClick(scope.row)" @click="buttonClick(scope.row)"
size="small"
>检验详情</el-button> >检验详情</el-button>
<span v-else style="color:#31bb99">质检已完成</span> <span v-else style="color:#31bb99">质检已完成</span>
</template> </template>
@ -158,7 +159,7 @@
<el-dialog <el-dialog
title="质检详情" title="质检详情"
v-loading="loading" v-loading="loading"
:visible.sync="inspectNoticeDetailsShow" :visible="inspectNoticeDetailsShow"
top="5vh" top="5vh"
width="80%" width="80%"
:fullscreen="true" :fullscreen="true"
@ -197,7 +198,8 @@
class="formTable-box" class="formTable-box"
prop="details" prop="details"
> >
<currenTable <umyTable
:setUTableHeight="470"
:tableData="inspectNoticeDetailsFormData.details" :tableData="inspectNoticeDetailsFormData.details"
:tableColumns="inspectNoticeDetailsTableColumns" :tableColumns="inspectNoticeDetailsTableColumns"
:tableLoading = "inspectNoticeDetailsTableLoading" :tableLoading = "inspectNoticeDetailsTableLoading"
@ -206,7 +208,7 @@
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
@buttonClick="inspectDetailsButtonClick" @buttonClick="inspectDetailsButtonClick"
> >
</currenTable> </umyTable>
</el-form-item> </el-form-item>
</template> </template>
</curren-Form> </curren-Form>
@ -488,8 +490,8 @@ export default {
// { label: "", prop: "receiveUom", width:'100%' }, // { label: "", prop: "receiveUom", width:'100%' },
{ label: "收货数量", prop: "receiveQty", width:'100%' }, { label: "收货数量", prop: "receiveQty", width:'100%' },
{ label: "状态", prop: "detailInspectStatus", type: "filter", filters: "detailInspectStatus", width:'100%' }, { label: "状态", prop: "detailInspectStatus", type: "filter", filters: "detailInspectStatus", width:'100%' },
{ type: "button", label: "检验", prop: "buttonHide", width:'100%' }, { type: "button", label: "检验", prop: "buttonHide",alwaysShow:true, width:'100%' },
{ type: "button", label: "清除检验", width:'100%' }, { type: "button", label: "清除检验", alwaysShow:true,width:'100%' },
], ],
//- //-
QueryDetailsFormData: { QueryDetailsFormData: {
@ -606,106 +608,112 @@ export default {
this.$message.error('已完成质检') this.$message.error('已完成质检')
return return
} }
this.inspectNoticeDetailsFormData.formFile = [] //
this.inspectNoticeDetailsFormData = { this.Loading.appMainLoading = true
warehouseCode: localStorage.getItem('warehouseCode'), setTimeout(()=>{
supplierBatch: null, this.inspectNoticeDetailsFormData.formFile = []
creationTime: null, this.inspectNoticeDetailsFormData = {
summaryInspectStatus: 0, warehouseCode: localStorage.getItem('warehouseCode'),
inspectUser: null, supplierBatch: null,
uom: null, creationTime: null,
receiveQty: 0, summaryInspectStatus: 0,
lot: null, inspectUser: null,
notPassedQty: 0, uom: null,
remark: null, receiveQty: 0,
itemDesc1: null, lot: null,
itemDesc2: null, notPassedQty: 0,
poLine: null, remark: null,
stdPackQty: 0, itemDesc1: null,
arriveDate: null, itemDesc2: null,
goodQty: 0, poLine: null,
itemCode: null, stdPackQty: 0,
samplePercent: 0, arriveDate: null,
masterID: null, goodQty: 0,
crackQty: 0, itemCode: null,
inspectType: 0, samplePercent: 0,
lastModifierId: null, masterID: null,
creatorId: null, crackQty: 0,
expireDate: null, inspectType: 0,
number: null, lastModifierId: null,
itemName: null, creatorId: null,
abcClass: null, expireDate: null,
failedReason: null, number: null,
failedQty: 0, itemName: null,
poNumber: null, abcClass: null,
produceDate: null, failedReason: null,
inspectQty: 0, failedQty: 0,
id: null, poNumber: null,
inspectReport: null, produceDate: null,
lastModificationTime: null, inspectQty: 0,
sampleQty: 0, // id: null,
filesList:[], inspectReport: null,
formFile: [], lastModificationTime: null,
details: [] sampleQty: 0, //
// inspectUserEmail: null, filesList:[],
// supplierPackQty: 0, formFile: [],
// tenantId: null, details: []
// inspectUserName: null, // inspectUserEmail: null,
// receiveUom: null, // supplierPackQty: 0,
// goodQty: 0, // tenantId: null,
// supplierPackUom: null, // inspectUserName: null,
// inspectUserPhone: null, // receiveUom: null,
// stdPackUom: null, // goodQty: 0,
} // supplierPackUom: null,
this.$listAssign(this.inspectNoticeDetailsFormData, row) // inspectUserPhone: null,
let findRs = this.tableDataDetails.details.filter(item => ( // stdPackUom: null,
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.$listAssign(this.inspectNoticeDetailsFormData, row)
// let findRs = this.tableDataDetails.details.filter(item => (
this.inspectNoticeDetailsFormData.sampleQty = 0 item.itemCode == row.itemCode
getListByItemcode({itemCode: row.itemCode}, 'basedata/item-quality').then(res => { ))
for(var i=0;i<res.length;i++) { this.inspectNoticeDetailsFormData.details = findRs
if (res[i].supplierCode == this.propsData.supplierCode) { // item.inspectType == 1
// this.inspectNoticeDetailsFormData.details.forEach(item => {
if (res[i].inspectType !== 1) { if (item.detailInspectStatus == 2 || item.detailInspectStatus == 3 || item.inspectType == 1) {
getListByItemcode({itemCode: row.itemCode}, 'basedata/AQL').then(res => { item.buttonHide = false
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 this.inspectNoticeDetailsFormData.sampleQty = 0
break 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) {
if (this.inspectNoticeDetailsFormData.sampleQty == 0) { this.$alert('没有找到当前物品代码对应的质检标准!')
this.$alert('没有找到当前物品代码对应的质检标准!') // this.$confirm(', ?', '', {
// this.$confirm(', ?', '', { // confirmButtonText: '',
// confirmButtonText: '', // cancelButtonText: '',
// cancelButtonText: '', // type: 'warning'
// type: 'warning' // }).then(() => {
// }).then(() => { // }).catch(() => {
// }).catch(() => { // })
// }) }
} this.loading = false
this.Loading.appMainLoading = false
}).catch(err=>{
this.loading = false this.loading = false
}).catch(err=>{ this.Loading.appMainLoading = false
this.loading = false })
}) }
} }
} }
} }).catch(err=>{
}).catch(err=>{ this.loading = false
this.loading = false this.Loading.appMainLoading = false
}) })
// this.inspectNoticeDetailsShow = true
this.inspectNoticeDetailsShow = true },300)
}, },
// - // -
inspectButtonClick(row, index, label) { inspectButtonClick(row, index, label) {
@ -827,6 +835,7 @@ export default {
rd.readAsDataURL(this.inspectNoticeDetailsFormData.formFile[0]) rd.readAsDataURL(this.inspectNoticeDetailsFormData.formFile[0])
rd.onloadend = function(){ rd.onloadend = function(){
var arrayBuffer = rd.result var arrayBuffer = rd.result
that.inspectNoticeDetailsFormData.filesList = []
that.inspectNoticeDetailsFormData.filesList.push( that.inspectNoticeDetailsFormData.filesList.push(
{ {
fileName: fileName, fileName: fileName,

Loading…
Cancel
Save