feat():绑定物料列表

master
jiyufei 2 months ago
parent 12eca0622f
commit d618d8db0e

@ -19,6 +19,10 @@ public class YysDeviceMaterialEntity {
private String materialId;
@TableField(value = "MATERIAL_NAME" , updateStrategy = FieldStrategy.IGNORED)
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")
private Date creatorTime;
@TableField("F_CREATOR_USER_ID")

@ -32,6 +32,10 @@ public class YysMaterialInformationEntity {
private String safetyStock;
@TableField(value = "ENABLE_STATUS" , updateStrategy = FieldStrategy.IGNORED)
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")
private String reamrk;
@TableField("F_CREATOR_TIME")

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

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

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

Loading…
Cancel
Save