feat(手工打印取样标签):设备编号和工序编号 界面灰色变为可选。

This commit is contained in:
leiqiaozhen 2025-02-25 16:37:23 +08:00
parent 1771df25e4
commit 61de25dd64
2 changed files with 80 additions and 4 deletions

View File

@ -15,7 +15,22 @@
:modal-fetch-fun="openItemList"
@inputDialogSelected="itemSelected"
></input-select-dialog>
<!-- 工序弹窗 -->
<input-select-dialog
:modal-obj="operationDialogObj"
:modal-fetch-fun="operationDialogFetchFun"
:modal-show.sync="operationDialogVisible"
@inputDialogSelected="operationSelected"
>
</input-select-dialog>
<!-- 设备弹窗 -->
<input-select-dialog
:modal-obj="resourceDialogObj"
:modal-fetch-fun="resourceDialogFetchFun"
:modal-show.sync="resourceDialogVisible"
@inputDialogSelected="resourceSelected"
>
</input-select-dialog>
<basic-container>
<!-- 搜尋框 -->
<el-form ref="searchForm" :model="searchForm" label-width="120px" label-suffix=":">
@ -38,12 +53,24 @@
></i>
</el-input>
</el-form-item>
<!-- 工序编码 -->
<el-form-item label="工序编号" prop="operation" :rules="[{ required: true, message: '工序编号不能为空', trigger: 'change'}]">
<el-input v-model.trim="searchForm.operation" disabled clearable>
<el-input v-model.trim="searchForm.operation" readonly clearable>
<i
slot="suffix"
class="el-input__icon el-icon-copy-document"
@click.stop="showOperationDialog"
></i>
</el-input>
</el-form-item>
<!-- 设备编码 -->
<el-form-item label="设备编号" prop="resrce" :rules="[{ required: true, message: '设备编号不能为空', trigger: 'change'}]">
<el-input v-model.trim="searchForm.resrce" disabled clearable>
<el-input v-model.trim="searchForm.resrce" readonly clearable>
<i
slot="suffix"
class="el-input__icon el-icon-copy-document"
@click.stop="showResourceDialog"
></i>
</el-input>
</el-form-item>
<el-form-item label="打印数量" prop="labelQty" :rules="[{ required: true, message: '打印数量不能为空', trigger: 'change'}]">
@ -76,7 +103,9 @@ import {mapGetters} from 'vuex';
import {getStore} from '@/util/store';
import {
itemDialogObj,
lotNoDialogObj
lotNoDialogObj,
operationDialogObj,
resourceDialogObj
} from "@/views/mes/qms/print-sampling-label/init";
import {
fetchLotNoPage,
@ -87,6 +116,8 @@ import {
import {hideLoading, showLoading} from "@/const/loading";
import { isBlank } from '@/util/string';
import {listByActivityId} from "@/api/admin/activity-option";
import {findOperationList as fetchOperationList} from "@/api/mes/prd/operation";
import {findResourceList as fetchResourceList} from "@/api/mes/pms/resrce";
export default {
name: 'print-sampling-label',
data() {
@ -101,6 +132,12 @@ export default {
itemDialogObj: {...itemDialogObj}, // 产品编号
openItemList: null,
itemDialogVisible: false,
operationDialogObj,
operationDialogFetchFun: fetchOperationList,
operationDialogVisible: false,
resourceDialogObj,
resourceDialogFetchFun: fetchResourceList,
resourceDialogVisible: false,
selectPrinterName: [],
minValue: 0, // 最小值,这里是 0,只能输入正整数
printerNameList: null, // 打印机名称
@ -263,6 +300,27 @@ export default {
itemSelected(row) {
this.searchForm.item = row.item
this.searchForm = Object.assign({}, this.searchForm)
},
// 工序编号点击开窗
showOperationDialog() {
let me = this
this.operationDialogVisible = true
},
// 工序选择回填
operationSelected(row) {
this.searchForm.operation = row.operation
this.searchForm = Object.assign({}, this.searchForm)
},
// 设备编号点击开窗
showResourceDialog() {
let me = this
this.resourceDialogVisible = true
},
// 资源选择回填
resourceSelected(row) {
this.searchForm.resrce = row.resrce
this.searchForm = Object.assign({}, this.searchForm)
},
},
}

View File

@ -19,3 +19,21 @@ export const itemDialogObj = {
],
queryParam: {}
}
export const operationDialogObj = {
searchText: 'operation',
tableColumn: [
{ prop: 'operation', label: 'mes.process', width: '200' },
{ prop: 'description', label: 'mes.description' },
],
title: 'mes.process',
}
export const resourceDialogObj = {
searchText: 'resrce',
tableColumn: [
{ prop: 'resrce', label: 'mes.pms.resource', width: '200' },
{ prop: 'description', label: 'mes.description' },
],
title: 'mes.pms.resource',
}