Merge remote-tracking branch 'origin/master'
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 }
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -219,6 +219,7 @@
|
||||
|
||||
<AddDtl
|
||||
:dialog-show.sync="dtlShow"
|
||||
:is-single="false"
|
||||
@tableChanged="tableChanged2"
|
||||
/>
|
||||
|
||||
@@ -368,30 +369,33 @@ export default {
|
||||
this.nowrow.qty_unit_name = row.unit_name
|
||||
this.nowrow.qty_unit_id = row.base_unit_id
|
||||
},
|
||||
tableChanged2(row) {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.base_bill_code === row.sale_code && item.base_bill_table === row.seq_no) {
|
||||
same_mater = false
|
||||
tableChanged2(rows) {
|
||||
rows.forEach((row) => {
|
||||
debugger
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.base_bill_code === row.sale_code && item.base_bill_table === row.seq_no) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.plan_qty = row.sale_qty
|
||||
data.qty_unit_name = row.qty_unit_name
|
||||
data.qty_unit_id = row.qty_unit_id
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_type = row.sale_type
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.seq_no
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.plan_qty = row.sale_qty
|
||||
data.qty_unit_name = row.qty_unit_name
|
||||
data.qty_unit_id = row.qty_unit_id
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_type = row.sale_type
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.seq_no
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
|
||||
}
|
||||
},
|
||||
insertEvent(row) {
|
||||
this.dtlShow = true
|
||||
|
||||
@@ -61,10 +61,12 @@
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
@select="handleSelectionChange"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column label="选择" width="55">
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
@@ -127,6 +129,10 @@ export default {
|
||||
},
|
||||
opendtlParam: {
|
||||
type: Object
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -150,6 +156,7 @@ export default {
|
||||
return true
|
||||
},
|
||||
open() {
|
||||
this.query.status = '10'
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
@@ -158,10 +165,31 @@ export default {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (this.isSingle) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
},
|
||||
formterType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.sale_type]
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_type" label="源单类型" :formatter="formatBaseType" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_table" label="源单行号" align="center" />
|
||||
@@ -111,7 +111,7 @@
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -112,7 +112,7 @@
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" width="150" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_type" label="源单类型" :formatter="formatBaseType" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" label="源单号" align="center" />
|
||||
@@ -142,7 +142,7 @@
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量 align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" />
|
||||
<el-table-column prop="point_code2" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" min-width="120" />
|
||||
<el-table-column prop="product_area" label="生产车间" width="130" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<el-table-column label="总数量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.total_qty) }}
|
||||
</template>
|
||||
@@ -249,7 +249,10 @@ export default {
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'iostorinv_id',
|
||||
url: '/api/productIn',
|
||||
crudMethod: { ...productIn }
|
||||
crudMethod: { ...productIn },
|
||||
props: {
|
||||
size: 10
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
@@ -320,7 +323,7 @@ export default {
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '30') {
|
||||
if (currentRow.bill_status === '30' || currentRow.bill_status === '20') {
|
||||
this.confirm_flag = false
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -194,11 +194,13 @@
|
||||
|
||||
<AddDtl
|
||||
:dialog-show.sync="dtlShow"
|
||||
:is-single="false"
|
||||
@tableChanged="tableChanged2"
|
||||
/>
|
||||
|
||||
<AddIvt
|
||||
:dialog-show.sync="ivtShow"
|
||||
:is-single="false"
|
||||
@tableChanged="tableChanged3"
|
||||
/>
|
||||
|
||||
@@ -319,16 +321,32 @@ export default {
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
const material_code = rows[index].material_code
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (material_code === obj.material_code) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
const source_bill_code = rows[index].source_bill_code
|
||||
const base_billdtl_id = rows[index].base_billdtl_id
|
||||
if (source_bill_code === undefined) {
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (base_billdtl_id === obj.base_billdtl_id) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (source_bill_code === obj.source_bill_code) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -341,58 +359,62 @@ export default {
|
||||
this.nowrow.qty_unit_name = row.unit_name
|
||||
this.nowrow.qty_unit_id = row.base_unit_id
|
||||
},
|
||||
tableChanged2(row) {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.source_bill_code === row.sale_code) {
|
||||
same_mater = false
|
||||
tableChanged2(rows) {
|
||||
rows.forEach((row) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.source_bill_code === row.deliver_code) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.plan_qty = row.delivery_qty
|
||||
data.qty_unit_name = row.qty_unit_name
|
||||
data.qty_unit_id = row.qty_unit_id
|
||||
data.source_billdtl_id = row.deliver_id
|
||||
data.source_bill_type = row.deliver_type
|
||||
data.source_bill_code = row.deliver_code
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.sale_seq_no
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.plan_qty = row.delivery_qty
|
||||
data.qty_unit_name = row.qty_unit_name
|
||||
data.qty_unit_id = row.qty_unit_id
|
||||
data.source_billdtl_id = row.deliver_id
|
||||
data.source_bill_type = row.deliver_type
|
||||
data.source_bill_code = row.deliver_code
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.sale_seq_no
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
},
|
||||
tableChanged3(row) {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.sale_id === row.sale_id) {
|
||||
same_mater = false
|
||||
tableChanged3(rows) {
|
||||
rows.forEach((row) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.base_billdtl_id === row.sale_id) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.plan_qty = row.canuse_qty
|
||||
data.qty_unit_name = row.unit_name
|
||||
data.qty_unit_id = row.measure_unit_id
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.seq_no
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.plan_qty = row.canuse_qty
|
||||
data.qty_unit_name = row.unit_name
|
||||
data.qty_unit_id = row.measure_unit_id
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.seq_no
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
},
|
||||
insertEvent(row) {
|
||||
this.dtlShow = true
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column label="选择" width="55">
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
@@ -137,6 +138,10 @@ export default {
|
||||
},
|
||||
storId: {
|
||||
type: String
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -172,14 +177,27 @@ export default {
|
||||
},
|
||||
open() {
|
||||
this.crud.query.mater_type = this.opendtlParam
|
||||
this.query.status = '10'
|
||||
this.crud.toQuery()
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
submit() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
},
|
||||
formatStatus(row, column) {
|
||||
return this.dict.label.PCS_DELI_STATUS[row.status]
|
||||
|
||||
@@ -81,7 +81,8 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column label="选择" width="55">
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
@@ -148,6 +149,10 @@ export default {
|
||||
},
|
||||
storId: {
|
||||
type: String
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -183,14 +188,26 @@ export default {
|
||||
},
|
||||
open() {
|
||||
this.crud.query.lock_type = '0'
|
||||
this.crud.toQuery()
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
submit() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
>
|
||||
自动取消
|
||||
</el-button>
|
||||
<el-button
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
@@ -108,9 +108,9 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" label="未分配重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" label="未分配数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" :formatter="formatSourceType"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
|
||||
@@ -141,6 +141,7 @@
|
||||
<el-form-item label="出库点" prop="point_code">
|
||||
<el-select
|
||||
v-model="form2.point_code"
|
||||
:disabled="form2.checked"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@@ -154,6 +155,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="checked">
|
||||
<el-checkbox @change="changeBox" v-model="form2.checked">自动分出库点</el-checkbox>
|
||||
</el-form-item>-->
|
||||
</el-form>
|
||||
</div>
|
||||
<span class="crud-opts-right2">
|
||||
@@ -204,7 +208,7 @@
|
||||
<el-table-column prop="material_code" label="物料编码" width="150px" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="250px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="150px" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" width="150px" label="载具号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" width="150px" label="仓位编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_name" width="150px" label="仓位名称" align="center" />
|
||||
@@ -268,6 +272,7 @@ export default {
|
||||
gender2: ''
|
||||
},
|
||||
form2: {
|
||||
checked: false,
|
||||
unassign_qty: '0',
|
||||
assign_qty: '0',
|
||||
point_code: ''
|
||||
@@ -453,6 +458,7 @@ export default {
|
||||
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.queryTableDtl()
|
||||
this.tabledis = []
|
||||
this.form2.point_code = ''
|
||||
}).finally(() => {
|
||||
this.loadingSetAllPoint = false
|
||||
})
|
||||
@@ -466,6 +472,11 @@ export default {
|
||||
return 'background: yellow'
|
||||
}
|
||||
}
|
||||
},
|
||||
changeBox() {
|
||||
if (this.form2.checked) {
|
||||
this.form2.point_code = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" width="160" align="center">
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出数量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库数量" :formatter="crud.formatNum3" width="160" align="center">
|
||||
<template scope="scope">
|
||||
<el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :max="100000000" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" :formatter="formatSourceType"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
|
||||
</el-table>
|
||||
@@ -111,7 +111,7 @@
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="storagevehicle_code" label="载具号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
@@ -112,7 +112,7 @@
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" width="150" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" :formatter="formatBaseType" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
|
||||
@@ -140,7 +140,7 @@
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" />
|
||||
<el-table-column prop="point_code2" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" min-width="120" />
|
||||
<el-table-column prop="product_area" label="生产车间" width="130" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<el-table-column label="总数量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.total_qty) }}
|
||||
</template>
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:loading="loadingAutodiv"
|
||||
:disabled="confirm_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@@ -235,6 +236,7 @@ export default {
|
||||
openParam: [],
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
loadingAutodiv: false,
|
||||
storId: null
|
||||
}
|
||||
},
|
||||
@@ -324,9 +326,12 @@ export default {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.loadingAutodiv = true
|
||||
crudsemiproductIn.confirmTask(this.currentRow).then(res => {
|
||||
this.crud.notify('单据下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).finally(() => {
|
||||
this.loadingAutodiv = false
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="unit_weight" label="单重" align="center" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" align="center" />
|
||||
<el-table-column prop="point_code" label="起始位置" align="center" />
|
||||
<el-table-column prop="struct_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="struct_code" label="起始位置" align="center" />
|
||||
<el-table-column prop="point_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
</el-table>
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:loading="loadingAutodiv"
|
||||
:disabled="confirm_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@@ -231,6 +232,7 @@ export default {
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
openParam: [],
|
||||
loadingAutodiv: false,
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
storId: null
|
||||
@@ -322,9 +324,12 @@ export default {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.loadingAutodiv = true
|
||||
crudsemiproductout.confirmTask(this.currentRow).then(res => {
|
||||
this.crud.notify('单据下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).finally(() => {
|
||||
this.loadingAutodiv = false
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
|
||||
Reference in New Issue
Block a user