rev:添加质检功能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="query.dictName === ''">
|
||||
<div v-if="query.dict_name === ''">
|
||||
<div class="my-code">点击编码查看详情</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -42,7 +42,7 @@
|
||||
</el-form-item>
|
||||
<div v-if="form.type === '01' || form.type === '03'">
|
||||
<el-form-item label="初始值" prop="init_value">
|
||||
<el-input v-model="form.initValue" style="width: 370px;" />
|
||||
<el-input v-model="form.init_value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="form.type === '02'">
|
||||
@@ -61,12 +61,12 @@
|
||||
<el-input v-model="form.length" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最大值" prop="max_value">
|
||||
<el-input v-model="form.maxValue" style="width: 370px;" />
|
||||
<el-input v-model="form.max_value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="排序" prop="sort_num">
|
||||
<el-input-number
|
||||
v-model.number="form.sortNum"
|
||||
v-model.number="form.sort_num"
|
||||
:min="0"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
@@ -89,11 +89,11 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column label="所属编码">
|
||||
{{ query.dictName }}
|
||||
{{ query.dict_name }}
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="类型" :formatter="typeFormate" />
|
||||
<el-table-column prop="initValue" label="初始值" />
|
||||
<el-table-column prop="currentValue" label="当前值" />
|
||||
<el-table-column prop="init_value" label="初始值" />
|
||||
<el-table-column prop="current_value" label="当前值" />
|
||||
<el-table-column
|
||||
v-permission="['admin','dict:edit','dict:del']"
|
||||
label="操作"
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({
|
||||
title: '编码详情', url: 'api/codeDetail', query: { dictName: '' }, sort: ['sort_num,asc'],
|
||||
title: '编码详情', url: 'api/codeDetail', query: { dict_name: '' }, sort: ['sort_num,asc'],
|
||||
crudMethod: { ...crudCodeDetail },
|
||||
optShow: {
|
||||
add: true,
|
||||
@@ -154,7 +154,7 @@ export default {
|
||||
presenter(),
|
||||
header(),
|
||||
form(function() {
|
||||
return Object.assign({ dict: { id: this.dictId }}, defaultForm)
|
||||
return Object.assign({ dict: { id: this.dict_id }}, defaultForm)
|
||||
})],
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<span>编码详情</span>
|
||||
<el-button
|
||||
v-if="checkPermission(['admin','genCode:add']) && this.$refs.codeGenDetail && this.$refs.codeGenDetail.query.dictName"
|
||||
v-if="checkPermission(['admin','genCode:add']) && this.$refs.codeGenDetail && this.$refs.codeGenDetail.query.dict_name"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
style="float: right;padding: 4px 10px"
|
||||
@@ -129,10 +129,10 @@ export default {
|
||||
// 选中字典后,设置字典详情数据
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
this.$refs.codeGenDetail.query.dictName = val.code
|
||||
this.$refs.codeGenDetail.query.dict_name = val.code
|
||||
this.$refs.codeGenDetail.query.id = val.id
|
||||
this.$refs.codeGenDetail.form.codeRuleId = val.id
|
||||
this.$refs.codeGenDetail.dictId = val.id
|
||||
this.$refs.codeGenDetail.form.code_rule_id = val.id
|
||||
this.$refs.codeGenDetail.dict_id = val.id
|
||||
this.$refs.codeGenDetail.crud.toQuery()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
v-model="query.item_search"
|
||||
clearable
|
||||
placeholder="项点编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
@@ -108,7 +108,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="所属工序" prop="workprocedure_uuid">
|
||||
<el-select
|
||||
v-model="form.workprocedure_uuid"
|
||||
@@ -125,25 +125,22 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_name">
|
||||
<el-form-item label="物料" prop="material_code">
|
||||
<el-input
|
||||
v-model="form.material_name"
|
||||
v-model="form.material_code"
|
||||
style="width: 280px;"
|
||||
clearable
|
||||
@focus="materShow=true"
|
||||
@clear="form.material_uuid=''"
|
||||
@clear="form.material_id=''"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料" prop="material_uuid">
|
||||
<el-input v-model.trim="form.material_uuid" style="width: 280px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="临界值备注显示" prop="is_limit_remark" label-width="auto">
|
||||
<el-switch v-model="form.is_limit_remark" active-value="1" inactive-value="0" />
|
||||
</el-form-item>
|
||||
@@ -172,18 +169,12 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="inspection_item_id" label="项点标识" />
|
||||
<el-table-column v-if="false" prop="material_uuid" label="物料标识" />
|
||||
<el-table-column v-if="false" prop="material_name" label="物料名称" />
|
||||
<el-table-column prop="inspection_item_code" label="项点编码" />
|
||||
<el-table-column prop="inspection_item_name" label="项点名称" />
|
||||
<el-table-column prop="inspection_item_type_name" label="项点类别" />
|
||||
<el-table-column prop="workprocedure_name" label="工序名称" />
|
||||
<el-table-column prop="inspection_type_name" label="检验方式" />
|
||||
<el-table-column prop="inspection_item_type_name" label="项点类别" :formatter="itemTypeFormat"/>
|
||||
<!-- <el-table-column prop="workprocedure_name" label="工序名称" />-->
|
||||
<el-table-column prop="inspection_type_name" label="检验方式" :formatter="typeFormat"/>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||
<el-table-column v-if="false" prop="is_limit_remark" label="是否临界值填充备注" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -196,7 +187,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterDtl :dialog-show.sync="materShow" :dialog-matertype="materType" @tableChanged2="tableChanged2" />
|
||||
<MaterDtl :dialog-show.sync="materShow" :dialog-matertype="materType" @setMaterValue="tableChanged2" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -215,13 +206,13 @@ const defaultForm = {
|
||||
inspection_item_id: null,
|
||||
inspection_item_code: null,
|
||||
inspection_item_name: null,
|
||||
inspection_item_type: null,
|
||||
inspection_item_type: '02',
|
||||
workprocedure_uuid: null,
|
||||
workprocedure_code: null,
|
||||
workprocedure_name: null,
|
||||
inspection_type: '02',
|
||||
material_uuid: null,
|
||||
material_name: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
@@ -292,10 +283,16 @@ export default {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
typeFormat(row, column) {
|
||||
return this.dict.label.QC_INSPECTION_TYPE[row.inspection_type]
|
||||
},
|
||||
itemTypeFormat(row, column) {
|
||||
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
||||
},
|
||||
tableChanged2(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
this.form.material_uuid = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,16 +10,16 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/inspectionItemPoint',
|
||||
method: 'delete',
|
||||
url: 'api/inspectionItemPoint/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/inspectionItemPoint',
|
||||
method: 'put',
|
||||
url: 'api/inspectionItemPoint/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-input
|
||||
v-model="query.name"
|
||||
v-model="query.item_search"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
@@ -24,8 +24,8 @@
|
||||
<el-col :span="6">
|
||||
<el-select
|
||||
v-model="query.inspection_item_type"
|
||||
disabled
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="项点类别"
|
||||
class="filter-item"
|
||||
>
|
||||
@@ -38,11 +38,9 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -58,12 +56,11 @@
|
||||
<el-table-column v-if="false" prop="inspection_item_id" label="项点标识" />
|
||||
<el-table-column prop="inspection_item_code" label="项点编码" />
|
||||
<el-table-column prop="inspection_item_name" label="项点名称" />
|
||||
<el-table-column prop="inspection_item_type_name" label="项点类别" />
|
||||
<el-table-column prop="workprocedure_name" label="工序" />
|
||||
<el-table-column prop="inspection_type_name" label="检测方式" />
|
||||
<el-table-column prop="inspection_item_type_name" label="项点类别" :formatter="itemTypeFormat" />
|
||||
<el-table-column prop="inspection_type_name" label="检测方式" :formatter="typeFormat" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
@@ -73,7 +70,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import CRUD, {crud, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
@@ -81,19 +78,23 @@ import crudInspectionItemPoint from '@/views/wms/masterdata_manage/ql/inspection
|
||||
|
||||
export default {
|
||||
name: 'ItemDialog',
|
||||
dicts: ['QL_TEST_POINTTYPE'],
|
||||
components: { rrOperation, pagination },
|
||||
dicts: ['QL_TEST_POINTTYPE', 'QC_INSPECTION_TYPE'],
|
||||
components: {rrOperation, pagination},
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/inspectionItemPoint', crudMethod: { ...crudInspectionItemPoint }, optShow: {}})
|
||||
return CRUD({
|
||||
title: '项点',
|
||||
url: 'api/inspectionItemPoint',
|
||||
idField: 'inspection_item_id',
|
||||
sort: ['inspection_item_id,desc'],
|
||||
crudMethod: { ...crudInspectionItemPoint },
|
||||
optShow: {}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
inspectionItemType: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -123,7 +124,6 @@ export default {
|
||||
return true
|
||||
},
|
||||
open() {
|
||||
this.crud.query.inspection_item_type = this.$parent.inspectionItemType
|
||||
this.crud.toQuery()
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
@@ -138,6 +138,12 @@ export default {
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
typeFormat(row, column) {
|
||||
return this.dict.label.QC_INSPECTION_TYPE[row.inspection_type]
|
||||
},
|
||||
itemTypeFormat(row, column) {
|
||||
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
|
||||
@@ -3,38 +3,80 @@
|
||||
<el-dialog
|
||||
title="新增检测项"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form :inline="true" :model="openParam" class="demo-form-inline">
|
||||
<el-form-item label="方案编码">
|
||||
<el-input v-model.trim="openParam.inspection_scheme_code" disabled />
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="crud.cu === 2"
|
||||
type="primary"
|
||||
@click="crud.submitCU"
|
||||
>保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form ref="form" :inline="true" :model="form" class="demo-form-inline" :rules="rules">
|
||||
<el-form-item label="方案编码" prop="inspection_scheme_code">
|
||||
<el-input v-model.trim="form.inspection_scheme_code" disabled placeholder="系统生成"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="方案名称">
|
||||
<el-input v-model.trim="openParam.inspection_scheme_name" disabled />
|
||||
<el-form-item label="方案名称" prop="inspection_scheme_name">
|
||||
<el-input v-model.trim="form.inspection_scheme_name" :disabled="crud.status.view > 0"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细项数">
|
||||
<el-input v-model.trim="tableData.length" disabled />
|
||||
<el-form-item label="方案类别" prop="inspection_scheme_type">
|
||||
<el-select
|
||||
v-model="form.inspection_scheme_type"
|
||||
size="mini"
|
||||
placeholder="方案类别"
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QC_INSPECTION_SCHEME_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-plus" type="primary" @click="itemDialogVisible=true">添加项点</el-button>
|
||||
<el-form-item label="明细项数" prop="detail_count">
|
||||
<el-input v-model.trim="form.detail_count" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-check" type="success" @click="onSubmit">保存</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-error" type="info" @click="close">关闭</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model.trim="form.remark" style="width: 370px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left"/>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
v-if="crud.status.view <= 0"
|
||||
size="mini"
|
||||
@click="itemDialogVisible=true"
|
||||
>
|
||||
添加项点
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:data="form.tableData"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%"
|
||||
@@ -55,21 +97,19 @@
|
||||
<el-table-column
|
||||
prop="inspection_item_type_name"
|
||||
label="项点类别"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="'02'===$parent.inspection_item_type"
|
||||
prop="workprocedure_name"
|
||||
label="工序名称"
|
||||
:formatter="itemTypeFormat"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_type_name"
|
||||
label="检测方式"
|
||||
:formatter="typeFormat"
|
||||
/>
|
||||
<el-table-column prop="order_index" label="顺序号">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="tableData[scope.$index].order_index"
|
||||
v-model="form.tableData[scope.$index].order_index"
|
||||
size="mini"
|
||||
:disabled="crud.status.view > 0"
|
||||
type="number"
|
||||
class="edit-input"
|
||||
style="width: 100px"
|
||||
@@ -77,95 +117,91 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="操作" v-if="crud.status.view <= 0">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.$index, scope.row)"
|
||||
@click="handleDelete(scope.$index, form.tableData)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>-->
|
||||
</el-dialog>
|
||||
<ItemDialog
|
||||
:dialog-show.sync="itemDialogVisible"
|
||||
:inspection-item-type="inspectionItemType"
|
||||
:open-param="openParam"
|
||||
:open-param="{}"
|
||||
@tableChanged2="tableChanged2"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import CRUD, {crud, form} from '@crud/crud'
|
||||
import ItemDialog from '@/views/wms/masterdata_manage/ql/inspectionSchemeMst/ItemDialog'
|
||||
import crudInspectionSchemeMst from '@/views/wms/masterdata_manage/ql/inspectionSchemeMst/inspectionSchemeMst'
|
||||
|
||||
const defaultForm = {
|
||||
inspection_scheme_id: null,
|
||||
inspection_scheme_code: '',
|
||||
inspection_scheme_name: null,
|
||||
inspection_scheme_type: null,
|
||||
factory_qty: null,
|
||||
workprocedure_qty: null,
|
||||
physical_qty: null,
|
||||
remark: null,
|
||||
is_used: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
detail_count: null,
|
||||
tableData: []
|
||||
}
|
||||
export default {
|
||||
name: 'SetDialog',
|
||||
mixins: [crud()],
|
||||
components: { ItemDialog },
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object,
|
||||
default: () => { return {} }
|
||||
},
|
||||
openArray: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
components: {ItemDialog},
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['QL_TEST_POINTTYPE', 'QC_INSPECTION_TYPE', 'QC_INSPECTION_SCHEME_TYPE'],
|
||||
data() {
|
||||
return {
|
||||
itemDialogVisible: false,
|
||||
dialogVisible: false,
|
||||
inspectionItemType: null,
|
||||
cols: [],
|
||||
tableData: [],
|
||||
formData: {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
openArray: {
|
||||
handler(newValue) {
|
||||
this.tableData = newValue
|
||||
}
|
||||
},
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
if (newValue) {
|
||||
this.inspectionItemType = this.$parent.inspection_item_type
|
||||
}
|
||||
rules: {
|
||||
inspection_scheme_name: [
|
||||
{required: true, message: '方案名称不能为空', trigger: 'blur'}
|
||||
],
|
||||
inspection_scheme_type: [
|
||||
{required: true, message: '方案类别不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
/* const param = {
|
||||
inspection_item_type: this.$parent.inspection_item_type,
|
||||
inspection_scheme_id: this.openParam.inspection_scheme_id
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
crudInspectionSchemeMst.getInspectionSchemeDtl(param).then(res => {
|
||||
this.tableData = res
|
||||
})*/
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
crudInspectionSchemeMst.getDtl(this.form).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
crudInspectionSchemeMst.getDtl(this.form).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
tableChanged2: function(rows) {
|
||||
// 判断项点是否已存在
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.tableData.forEach((row) => {
|
||||
this.form.tableData.forEach((row) => {
|
||||
// 对新增的行进行校验不能存在相同项点
|
||||
if (row.inspection_item_id === item.inspection_item_id) {
|
||||
same_mater = false
|
||||
@@ -173,24 +209,20 @@ export default {
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
this.tableData.splice(-1, 0, item)
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
typeFormat(row, column) {
|
||||
return this.dict.label.QC_INSPECTION_TYPE[row.inspection_type]
|
||||
},
|
||||
itemTypeFormat(row, column) {
|
||||
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.tableData.splice(index, 1)
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.openParam.inspection_item_type = this.$parent.inspection_item_type
|
||||
const param = {
|
||||
formData: this.openParam,
|
||||
tableData: this.tableData
|
||||
}
|
||||
crudInspectionSchemeMst.saveInspectionSchemeDtl(param).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.$parent.hand()
|
||||
this.close()
|
||||
})
|
||||
row.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
notify(title, type) {
|
||||
this.$notify({
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="新增检测项"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
fullscreen
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form :inline="true" :model="openParam" class="demo-form-inline">
|
||||
<el-form-item label="方案编码">
|
||||
<el-input v-model.trim="openParam.inspection_scheme_code" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案名称">
|
||||
<el-input v-model.trim="openParam.inspection_scheme_name" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案类别">
|
||||
<el-select
|
||||
v-model="openParam.inspection_scheme_type"
|
||||
disabled
|
||||
size="mini"
|
||||
placeholder="方案类别"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QC_INSPECTION_SCHEME_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-error" type="info" @click="close">关闭</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
v-if="false"
|
||||
prop="inspection_item_id"
|
||||
label="项点标识"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_item_code"
|
||||
label="项点编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_item_name"
|
||||
label="项点名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_item_type_name"
|
||||
label="项点类别"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="workprocedure_name"
|
||||
label="工序名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_type_name"
|
||||
label="检测方式"
|
||||
/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { crud } from '@crud/crud'
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
dicts: ['QC_INSPECTION_SCHEME_TYPE'],
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
visiable1: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
},
|
||||
openArray: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
itemDialogVisible: false,
|
||||
dialogVisible: false,
|
||||
inspectionItemType: null,
|
||||
cols: [],
|
||||
tableData: [],
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
openArray: {
|
||||
handler(newValue) {
|
||||
this.tableData = newValue
|
||||
}
|
||||
},
|
||||
visiable1: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
if (newValue) {
|
||||
// this.inspectionItemType = this.$parent.inspection_item_type
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// const param = {
|
||||
// inspection_scheme_id: this.openParam.inspection_scheme_id
|
||||
// }
|
||||
// crudInspectionSchemeMst.getInspectionSchemeDtl(param).then(res => {
|
||||
// this.tableData = res
|
||||
// })
|
||||
},
|
||||
close() {
|
||||
this.tableData = []
|
||||
this.$emit('update:visiable1', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -12,7 +12,7 @@
|
||||
>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.name"
|
||||
v-model="query.sch_search"
|
||||
clearable
|
||||
placeholder="方案编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
@@ -34,89 +34,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="maintenance('01',crud.selections[0])"
|
||||
>
|
||||
质保项维护
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="info"
|
||||
icon="el-icon-position"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
size="mini"
|
||||
@click="maintenance('02',crud.selections[0])"
|
||||
>
|
||||
工序自检项
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-position"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
size="mini"
|
||||
@click="maintenance('03',crud.selections[0])"
|
||||
>
|
||||
理化项维护
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="方案编码" prop="inspection_scheme_code">
|
||||
<el-input v-model.trim="form.inspection_scheme_code" style="width: 370px;" :disabled="true" placeholder="系统生成" />
|
||||
</el-form-item>
|
||||
<el-form-item label="方案名称" prop="inspection_scheme_name">
|
||||
<el-input v-model.trim="form.inspection_scheme_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="方案类别" prop="inspection_scheme_type">
|
||||
<el-select
|
||||
v-model="form.inspection_scheme_type"
|
||||
size="mini"
|
||||
placeholder="方案类别"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QC_INSPECTION_SCHEME_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model.trim="form.remark" style="width: 370px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!-- 表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
@@ -125,22 +50,20 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="inspection_scheme_id" label="检验方案标识" />
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column v-if="false" prop="inspection_scheme_id" label="检验方案标识"/>
|
||||
<el-table-column prop="inspection_scheme_code" label="方案编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="view(scope.row)">{{ scope.row.inspection_scheme_code }}</el-link>
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.inspection_scheme_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inspection_scheme_name" label="方案名称" />
|
||||
<el-table-column prop="inspection_scheme_name" label="方案名称"/>
|
||||
<el-table-column prop="inspection_scheme_type" label="方案类别" :formatter="format_inspection_scheme_type" />
|
||||
<el-table-column prop="factory_qty" label="质保项数" />
|
||||
<el-table-column prop="workprocedure_qty" label="自检项数" />
|
||||
<el-table-column prop="physical_qty" label="理化项数" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column v-if="false" prop="is_used" label="是否启用" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
||||
<el-table-column prop="detail_count" label="明细数"/>
|
||||
<el-table-column prop="remark" label="备注"/>
|
||||
<el-table-column v-if="false" prop="is_used" label="是否启用"/>
|
||||
<el-table-column prop="create_name" label="修改人"/>
|
||||
<el-table-column prop="create_time" label="修改时间" width="135"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -151,46 +74,25 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
<MaintenanceDialog :dialog-show.sync="maintenanceShow" :open-param="openParam" :open-array="openArray" />
|
||||
<ViewDialog :visiable1.sync="visiable1" :open-param="openParam" :open-array="openArray" />
|
||||
<MaintenanceDialog/>
|
||||
<ViewDialog :visiable1.sync="visiable1" :open-param="openParam" :open-array="openArray"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudInspectionSchemeMst from '@/views/wms/masterdata_manage/ql/inspectionSchemeMst/inspectionSchemeMst'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import MaintenanceDialog from './MaintenanceDialog'
|
||||
import ViewDialog from './ViewDialog'
|
||||
|
||||
const defaultForm = {
|
||||
inspection_scheme_id: null,
|
||||
inspection_scheme_code: '',
|
||||
inspection_scheme_name: null,
|
||||
inspection_scheme_type: null,
|
||||
factory_qty: null,
|
||||
workprocedure_qty: null,
|
||||
physical_qty: null,
|
||||
remark: null,
|
||||
is_used: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'InspectionSchemeMst',
|
||||
dicts: ['QC_INSPECTION_SCHEME_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaintenanceDialog, ViewDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaintenanceDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '检测方案',
|
||||
@@ -204,9 +106,11 @@ export default {
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
crudMethod: { ...crudInspectionSchemeMst }
|
||||
crudMethod: {...crudInspectionSchemeMst}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
dicts: ['QC_INSPECTION_SCHEME_TYPE'],
|
||||
data() {
|
||||
return {
|
||||
openParam: {},
|
||||
@@ -214,15 +118,7 @@ export default {
|
||||
visiable1: false,
|
||||
openArray: [],
|
||||
inspection_item_type: null,
|
||||
permission: {},
|
||||
rules: {
|
||||
inspection_scheme_name: [
|
||||
{ required: true, message: '检验方案名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
inspection_scheme_type: [
|
||||
{ required: true, message: '检验方案类别不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
permission: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -233,23 +129,8 @@ export default {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
view(row) {
|
||||
crudInspectionSchemeMst.getInspectionSchemeDtl({ inspection_scheme_id: row.inspection_scheme_id }).then(res => {
|
||||
this.openArray = res
|
||||
this.visiable1 = true
|
||||
this.openParam = row
|
||||
})
|
||||
},
|
||||
format_inspection_scheme_type(row, column) {
|
||||
return this.dict.label.QC_INSPECTION_SCHEME_TYPE[row.inspection_scheme_type]
|
||||
},
|
||||
maintenance(type, data) {
|
||||
crudInspectionSchemeMst.getInspectionSchemeDtl({ inspection_scheme_id: data.inspection_scheme_id, inspection_item_type: type }).then(res => {
|
||||
this.openArray = res
|
||||
this.inspection_item_type = type
|
||||
this.openParam = data
|
||||
this.maintenanceShow = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,40 +10,34 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/inspectionSchemeMst/',
|
||||
method: 'delete',
|
||||
url: 'api/inspectionSchemeMst/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/inspectionSchemeMst',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function saveInspectionSchemeDtl(data) {
|
||||
return request({
|
||||
url: 'api/inspectionSchemeMst/saveInspectionSchemeDtl',
|
||||
url: 'api/inspectionSchemeMst/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getInspectionSchemeDtl(data) {
|
||||
export function getDtl(data) {
|
||||
return request({
|
||||
url: 'api/inspectionSchemeMst/getInspectionSchemeDtl',
|
||||
url: 'api/inspectionSchemeMst/getDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function selectList() {
|
||||
export function selectList(data) {
|
||||
return request({
|
||||
url: 'api/inspectionSchemeMst/selectList'
|
||||
url: 'api/inspectionSchemeMst/selectList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, saveInspectionSchemeDtl, getInspectionSchemeDtl, selectList }
|
||||
export default { add, edit, del, getDtl, selectList }
|
||||
|
||||
@@ -86,16 +86,14 @@
|
||||
label="项点名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_item_type_name"
|
||||
prop="inspection_item_type"
|
||||
label="项点类别"
|
||||
:formatter="itemTypeFormat"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="workprocedure_name"
|
||||
label="工序名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="inspection_type_name"
|
||||
prop="inspection_type"
|
||||
label="检测方式"
|
||||
:formatter="typeFormat"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="down_limit"
|
||||
@@ -171,7 +169,7 @@
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="'00'"
|
||||
@tableChanged2="tableChanged2"
|
||||
@setMaterValue="tableChanged2"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -193,6 +191,7 @@ export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts:[ 'QC_INSPECTION_TYPE', 'QL_TEST_POINTTYPE'],
|
||||
data() {
|
||||
return {
|
||||
selectList: [],
|
||||
@@ -206,29 +205,23 @@ export default {
|
||||
crudInspectionSchemeMst.selectList().then(res => {
|
||||
this.selectList = res
|
||||
})
|
||||
this.handDtl2()
|
||||
},
|
||||
handDtl2() { // 修改的时候有物料标识
|
||||
const param = {
|
||||
inspection_scheme_id: this.form.inspection_scheme_id,
|
||||
material_id: this.form.material_id
|
||||
}
|
||||
crudProductStandard.getInspectionSchemeDtl(param).then(res => {
|
||||
const map1 = res.map(function(item) {
|
||||
if (!item.down_limit_value) item.down_limit_value = undefined
|
||||
if (!item.up_limit_value) item.up_limit_value = undefined
|
||||
if (!item.down_limit) item.down_limit = undefined
|
||||
if (!item.up_limit) item.up_limit = undefined
|
||||
return item
|
||||
})
|
||||
this.form.tableData = map1
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
crudProductStandard.getDtl(this.form).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
typeFormat(row, column) {
|
||||
return this.dict.label.QC_INSPECTION_TYPE[row.inspection_type]
|
||||
},
|
||||
itemTypeFormat(row, column) {
|
||||
return this.dict.label.QL_TEST_POINTTYPE[row.inspection_item_type]
|
||||
},
|
||||
handDtl() {
|
||||
const param = {
|
||||
inspection_scheme_id: this.form.inspection_scheme_id
|
||||
}
|
||||
crudProductStandard.getInspectionSchemeDtl(param).then(res => {
|
||||
crudInspectionSchemeMst.getDtl(param).then(res => {
|
||||
const map1 = res.map(function(item) {
|
||||
if (!item.down_limit_value) item.down_limit_value = undefined
|
||||
if (!item.up_limit_value) item.up_limit_value = undefined
|
||||
@@ -238,9 +231,6 @@ export default {
|
||||
})
|
||||
this.form.tableData = map1
|
||||
})
|
||||
},
|
||||
hand() {
|
||||
|
||||
},
|
||||
onSubmit() {
|
||||
let optType = null
|
||||
@@ -302,7 +292,7 @@ export default {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
this.form.material_id = data.material_id
|
||||
this.form.material_code = data.material_code
|
||||
this.form.material_name = data.material_name + '##' + data.material_code
|
||||
this.form.material_name = data.material_name
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:visiable1', false)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
>
|
||||
<el-form-item label="方案">
|
||||
<el-input
|
||||
v-model="query.inspection_scheme_name"
|
||||
v-model="query.inspection_scheme_search"
|
||||
clearable
|
||||
placeholder="方案编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="物料">
|
||||
<el-input
|
||||
v-model="query.material_name"
|
||||
v-model="query.material_search"
|
||||
clearable
|
||||
placeholder="物料编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
@@ -77,10 +77,8 @@
|
||||
<el-table-column prop="material_name" label="物料名称" width="200" show-tooltip-when-overflow />
|
||||
<el-table-column prop="inspection_scheme_code" label="方案编码" />
|
||||
<el-table-column prop="inspection_scheme_name" label="方案名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="inspection_scheme_type_name" label="方案类别" />
|
||||
<el-table-column prop="zb_num" label="质保项数" />
|
||||
<el-table-column prop="zj_num" label="质检项数" />
|
||||
<el-table-column prop="lh_num" label="理化项数" />
|
||||
<el-table-column prop="inspection_scheme_type_name" label="方案类别" :formatter="format_inspection_scheme_type" />
|
||||
<el-table-column prop="detail_count" label="明细数" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -132,8 +130,8 @@ export default {
|
||||
return CRUD({
|
||||
title: '产品方案标准',
|
||||
url: 'api/productStandard',
|
||||
idField: 'inspection_standard_dtl_id',
|
||||
sort: 'inspection_standard_dtl_id,desc',
|
||||
idField: 'material_id',
|
||||
sort: 'material_id,desc',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
@@ -191,6 +189,9 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
format_inspection_scheme_type(row, column) {
|
||||
return this.dict.label.QC_INSPECTION_SCHEME_TYPE[row.inspection_scheme_type]
|
||||
},
|
||||
copyAdd(data) {
|
||||
this.isCopyAdd = '1'
|
||||
this.crud.toEdit(data)
|
||||
|
||||
@@ -10,8 +10,8 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/productStandard/',
|
||||
method: 'delete',
|
||||
url: 'api/productStandard/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
@@ -30,20 +30,14 @@ export function saveData(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function copyAdd(data) {
|
||||
|
||||
export function getDtl(data) {
|
||||
return request({
|
||||
url: 'api/productStandard/copyAdd',
|
||||
url: 'api/productStandard/getDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getInspectionSchemeDtl(data) {
|
||||
return request({
|
||||
url: 'api/productStandard/getInspectionSchemeDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, saveData, copyAdd,getInspectionSchemeDtl }
|
||||
export default { add, edit, del, saveData, getDtl }
|
||||
|
||||
Reference in New Issue
Block a user