feat():绑定物料列表

master
jiyufei 2 months ago
parent 12eca0622f
commit d618d8db0e

@ -19,6 +19,10 @@ public class YysDeviceMaterialEntity {
private String materialId; private String materialId;
@TableField(value = "MATERIAL_NAME" , updateStrategy = FieldStrategy.IGNORED) @TableField(value = "MATERIAL_NAME" , updateStrategy = FieldStrategy.IGNORED)
private String materialName; private String materialName;
@TableField(value = "EIGHT_OUTPUT" , updateStrategy = FieldStrategy.IGNORED)
private String eightOutput;
@TableField(value = "TWELVE_OUTPUT" , updateStrategy = FieldStrategy.IGNORED)
private String twelveOutput;
@TableField("F_CREATOR_TIME") @TableField("F_CREATOR_TIME")
private Date creatorTime; private Date creatorTime;
@TableField("F_CREATOR_USER_ID") @TableField("F_CREATOR_USER_ID")

@ -32,6 +32,10 @@ public class YysMaterialInformationEntity {
private String safetyStock; private String safetyStock;
@TableField(value = "ENABLE_STATUS" , updateStrategy = FieldStrategy.IGNORED) @TableField(value = "ENABLE_STATUS" , updateStrategy = FieldStrategy.IGNORED)
private String enableStatus; private String enableStatus;
@TableField(value = "EIGHT_OUTPUT" , updateStrategy = FieldStrategy.IGNORED)
private String eightOutput;
@TableField(value = "TWELVE_OUTPUT" , updateStrategy = FieldStrategy.IGNORED)
private String twelveOutput;
@TableField("REAMRK") @TableField("REAMRK")
private String reamrk; private String reamrk;
@TableField("F_CREATOR_TIME") @TableField("F_CREATOR_TIME")

@ -41,4 +41,11 @@ public class YysMaterialInformationForm {
/** 启用状态 **/ /** 启用状态 **/
@JsonProperty("enableStatus") @JsonProperty("enableStatus")
private Object enableStatus; private Object enableStatus;
/** 8小时产量 **/
@JsonProperty("eightOutput")
private String eightOutput;
/** 12小时产量 **/
@JsonProperty("twelveOutput")
private String twelveOutput;
} }

@ -1,91 +1,47 @@
<template> <template>
<el-dialog <el-dialog :title="!dataForm.id ? '新建' : '编辑'" :close-on-click-modal="false" append-to-body :visible.sync="visible"
:title="!dataForm.id ? '新建' : '编辑'" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="850px">
:close-on-click-modal="false"
append-to-body
:visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center"
lock-scroll
width="600px"
>
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
ref="formRef" label-position="right">
:model="dataForm"
:rules="dataRule"
size="small"
label-width="100px"
label-position="right"
>
<template v-if="!loading"> <template v-if="!loading">
<!-- 具体表单 --> <!-- 具体表单 -->
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label="设备编号" prop="deviceCode"> <jnpf-form-tip-item label="设备编号" prop="deviceCode">
<JnpfInput <JnpfInput v-model="dataForm.deviceCode" @change="changeData('deviceCode', -1)" placeholder="请输入设备编号"
v-model="dataForm.deviceCode" clearable :style="{ width: '100%' }">
@change="changeData('deviceCode', -1)"
placeholder="请输入设备编号"
clearable
:style="{ width: '100%' }"
>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label="设备名称" prop="deviceName"> <jnpf-form-tip-item label="设备名称" prop="deviceName">
<JnpfInput <JnpfInput v-model="dataForm.deviceName" @change="changeData('deviceName', -1)" placeholder="请输入设备名称"
v-model="dataForm.deviceName" clearable :style="{ width: '100%' }">
@change="changeData('deviceName', -1)"
placeholder="请输入设备名称"
clearable
:style="{ width: '100%' }"
>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label="所属部门" prop="deviceDept"> <jnpf-form-tip-item label="所属部门" prop="deviceDept">
<JnpfDepSelect <JnpfDepSelect v-model="dataForm.deviceDept" @change="changeData('deviceDept', -1)" placeholder="请选择所属部门"
v-model="dataForm.deviceDept" selectType="all" :ableIds="ableAll.deviceDeptableIds" clearable :style="{ width: '100%' }">
@change="changeData('deviceDept', -1)"
placeholder="请选择所属部门"
selectType="all"
:ableIds="ableAll.deviceDeptableIds"
clearable
:style="{ width: '100%' }"
>
</JnpfDepSelect> </JnpfDepSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label="设备类型" prop="deivceType"> <jnpf-form-tip-item label="设备类型" prop="deivceType">
<JnpfSelect <JnpfSelect v-model="dataForm.deivceType" @change="changeData('deivceType', -1)" placeholder="请选择"
v-model="dataForm.deivceType" clearable :style="{ width: '100%' }" :options="deivceTypeOptions" :props="deivceTypeProps">
@change="changeData('deivceType', -1)"
placeholder="请选择"
clearable
:style="{ width: '100%' }"
:options="deivceTypeOptions"
:props="deivceTypeProps"
>
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label="启用状态" prop="enabledStatus"> <jnpf-form-tip-item label="启用状态" prop="enabledStatus">
<JnpfSelect <JnpfSelect v-model="dataForm.enabledStatus" @change="changeData('enabledStatus', -1)" placeholder="请选择"
v-model="dataForm.enabledStatus" clearable :style="{ width: '100%' }" :options="enabledStatusOptions" :props="enabledStatusProps">
@change="changeData('enabledStatus', -1)"
placeholder="请选择"
clearable
:style="{ width: '100%' }"
:options="enabledStatusOptions"
:props="enabledStatusProps"
>
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24"> <!-- <el-col :span="24">
<jnpf-form-tip-item label="8小时产量" prop="eightOutput"> <jnpf-form-tip-item label="8小时产量" prop="eightOutput">
<JnpfInput <JnpfInput
v-model="dataForm.eightOutput" v-model="dataForm.eightOutput"
@ -108,7 +64,7 @@
> >
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col> -->
<el-col :span="24"> <el-col :span="24">
<jnpf-form-tip-item label-width="0"> <jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
@ -120,7 +76,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.deviceCode }} {{ scope.row.deviceCode }}
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="产品编码"> <el-table-column label="产品编码">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.materialId }} {{ scope.row.materialId }}
@ -131,6 +87,20 @@
{{ scope.row.materialName }} {{ scope.row.materialName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="8小时产量">
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.eightOutput" @change="changeData('eightOutput', -1)"
placeholder="请输入" clearable :style='{ "width": "100%" }' :precision="2" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="12小时产量">
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.twelveOutput" @change="changeData('twelveOutput', -1)"
placeholder="请输入" clearable :style='{ "width": "100%" }' :precision="2" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="fnMaterialListDialog()"> <div class="table-actions" @click="fnMaterialListDialog()">
<el-button type="text" icon="el-icon-plus">物料绑定</el-button> <el-button type="text" icon="el-icon-plus">物料绑定</el-button>
@ -140,35 +110,15 @@
<!-- 表单结束 --> <!-- 表单结束 -->
</template> </template>
</el-form> </el-form>
<SelectDialog <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
v-if="selectDialogVisible" @select="addForSelect" @close="selectDialogVisible = false" />
:config="currTableConf"
:formData="dataForm"
ref="selectDialog"
@select="addForSelect"
@close="selectDialogVisible = false"
/>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<!-- <div class="upAndDown-button" v-if="dataForm.id">
<el-button @click="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-button>
<el-button @click="next" :disabled='nextDis'>
{{ '下一条' }}
</el-button>
</div>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-button> -->
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">
</el-button </el-button>
>
</span> </span>
<MaterialListDialog <MaterialListDialog ref="materialListDialog" @cbSltdChg="fnSltdMaterialChg" />
ref="materialListDialog"
@cbSltdChg="fnSltdMaterialChg"
/>
</el-dialog> </el-dialog>
</template> </template>
@ -188,6 +138,7 @@ import {
} from "@/components/Generator/utils/index.js"; } from "@/components/Generator/utils/index.js";
import { thousandsFormat } from "@/components/Generator/utils/index"; import { thousandsFormat } from "@/components/Generator/utils/index";
import MaterialListDialog from "@/views/yys/yysdevice/MaterialListDialog"; import MaterialListDialog from "@/views/yys/yysdevice/MaterialListDialog";
import { Input } from "element-ui";
export default { export default {
components: { components: {
MaterialListDialog MaterialListDialog
@ -284,7 +235,7 @@ export default {
this.initDefaultData(); this.initDefaultData();
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm)); this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm));
}, },
mounted() {}, mounted() { },
methods: { methods: {
fnMaterialListDialog() { fnMaterialListDialog() {
this.$nextTick(() => { this.$nextTick(() => {
@ -390,7 +341,7 @@ export default {
} }
} }
}, },
dataAll() {}, dataAll() { },
clearData() { clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll)); this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll));
}, },
@ -430,7 +381,7 @@ export default {
this.$store.commit("generator/UPDATE_RELATION_DATA", {}); this.$store.commit("generator/UPDATE_RELATION_DATA", {});
}, },
// //
initDefaultData() {}, initDefaultData() { },
// //
dataFormSubmit(type) { dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0; this.dataFormSubmitType = type ? type : 0;
@ -442,6 +393,7 @@ export default {
}, },
request() { request() {
let _data = this.dataList(); let _data = this.dataList();
console.log(_data)
if (this.dataFormSubmitType == 2) { if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true; this.continueBtnLoading = true;
} else { } else {

@ -50,10 +50,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="deviceDept" label="所属部门" align="center"> <el-table-column prop="deviceDept" label="所属部门" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="eightOutput" label="8小时产量" align="center"> <!-- <el-table-column prop="eightOutput" label="8小时产量" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="twelveOutput" label="12小时产量" align="center"> <el-table-column prop="twelveOutput" label="12小时产量" align="center">
</el-table-column> </el-table-column> -->
<el-table-column label="设备类型" prop="deivceType" align="center"> <el-table-column label="设备类型" prop="deivceType" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.deivceType }} {{ scope.row.deivceType }}

Loading…
Cancel
Save