opt:刻字输送线任务下发控制

This commit is contained in:
zhangzhiqiang
2023-09-13 18:33:59 +08:00
parent aae00c55c4
commit 88c6ad2d37
16 changed files with 234 additions and 110 deletions

View File

@@ -11,7 +11,7 @@
>
<el-row :gutter="20">
<el-col :span="18" style="border: 1px solid white">
<span/>
<span />
</el-col>
<el-col :span="6">
<span>
@@ -150,7 +150,7 @@
label="序号"
>
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
<span>{{ scope.$index+1 }}</span>
</template>
</el-table-column>
<el-table-column
@@ -167,6 +167,12 @@
label="项点类别"
:formatter="format_inspection_item_type"
/>
<el-table-column
width="100"
prop="inspection_type"
label="检测方式"
:formatter="typeFormat"
/>
<el-table-column
prop="down_limit"
label="合格下限(≥)"
@@ -187,6 +193,7 @@
>
<template slot-scope="scope">
<el-input-number
v-if="scope.row.inspection_type=='02'"
v-model="form1.tableData[scope.$index].value"
:controls="false"
size="mini"
@@ -194,6 +201,20 @@
:disabled="form1.bill_status === '99'"
:precision="4"
/>
<el-select
v-if="scope.row.inspection_type=='01'"
v-model="form1.tableData[scope.$index].value"
size="mini"
placeholder="请选择"
class="filter-item"
>
<el-option
v-for="item in dict.IS_OR_NOT"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
@@ -214,19 +235,19 @@
</el-table>
</el-dialog>
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code="'05'" @tableChanged2="tableChanged2"/>
<MaterDtl :dialog-show.sync="materShow" :mater-opt-code="'05'" @tableChanged2="tableChanged2" />
</div>
</template>
<script>
import CRUD, {crud} from '@crud/crud'
import CRUD, { crud } from '@crud/crud'
import MaterDtl from '@/views/wms/pub/MaterDialog'
import crudPhysicalMst from '@/views/wms/ql_manage/physicalMst/physicalMst'
export default {
name: 'Dialog1',
dicts: ['QL_TEST_POINTTYPE', 'qc_grade', 'qc_result'],
components: {MaterDtl},
dicts: ['QL_TEST_POINTTYPE', 'qc_grade', 'qc_result', 'QC_INSPECTION_TYPE', 'IS_OR_NOT'],
components: { MaterDtl },
mixins: [crud()],
props: {
visiable1: {
@@ -286,10 +307,7 @@ export default {
}
})
},
cellStyle({row, column, rowIndex, columnIndex}) {
// https://blog.csdn.net/qq_41648113/article/details/109337781
// https://blog.csdn.net/Akatsuki233/article/details/100311040
// https://blog.csdn.net/qq_45414633/article/details/107795124
cellStyle({ row, column, rowIndex, columnIndex }) {
const inspection_type = row.inspection_type
const is_limit_remark = row.is_limit_remark
const value = parseFloat(row.value)
@@ -326,6 +344,18 @@ export default {
}
}
}
if (inspection_type == '01') {
if (column.property === 'value') {
if (value == 1) {
row.is_ok = '1'
row.form_remark = ''
} else {
return 'background: red'
row.is_ok = '0'
row.value = '0'
}
}
}
},
computerResult() {
const rows = this.form1.tableData
@@ -340,13 +370,18 @@ export default {
this.$set(this.form1, 'result', '1')
var remark = ''
for (var row of rows) {
if (row.is_ok === '0') {
this.$set(this.form1, 'result', '2')
} else {
if (row.is_limit_remark === '1' && row.form_remark) {
remark += row.form_remark.replace('\n', '') + ','
console.log(row.is_ok + '_' + row.value)
if (row.is_ok == '1') {
if (row.inspection_type == '01') {
if (row.value == '0') {
this.$set(this.form1, 'result', '2')
break
}
}
}
if (row.is_ok == '0') {
this.$set(this.form1, 'result', '2')
}
}
this.$set(this.form1, 'remark', remark)
@@ -356,9 +391,11 @@ export default {
format_inspection_item_type(row, column) {
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
},
typeFormat(row, column) {
return this.dict.label.QC_INSPECTION_TYPE[row.inspection_type]
},
onSubmit() {
debugger
const msg = '是否继续!'
const data = this.form1.tableData
var flag = 0