refactor(customer): 将客户详情和表单页面改为弹窗模式
- 将客户详情页面从路由页面改为el-dialog弹窗组件 - 将客户表单页面从路由页面改为el-dialog弹窗组件 - 统一使用dialogVisible控制弹窗显示隐藏 - 修改关闭方法名称为handleClose并设置dialogVisible为false - 调整表单布局和样式适配弹窗模式 - 添加物料表单的单位和质检方案字段验证规则 - 优化页面结构提升用户体验
This commit is contained in:
parent
6737280d80
commit
1e256c0bd4
@ -59,7 +59,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, MaterialEnt
|
|||||||
if (ObjectUtil.isNotEmpty(materialPagination.getSpec())) {
|
if (ObjectUtil.isNotEmpty(materialPagination.getSpec())) {
|
||||||
materialWrapper.like(MaterialEntity::getSpec, materialPagination.getSpec());
|
materialWrapper.like(MaterialEntity::getSpec, materialPagination.getSpec());
|
||||||
}
|
}
|
||||||
materialWrapper.isNull(MaterialEntity::getDeleteMark);
|
// materialWrapper.isNull(MaterialEntity::getDeleteMark);
|
||||||
materialWrapper.orderByDesc(MaterialEntity::getCreatorTime);
|
materialWrapper.orderByDesc(MaterialEntity::getCreatorTime);
|
||||||
if ("0".equals(materialPagination.getDataType())) {
|
if ("0".equals(materialPagination.getDataType())) {
|
||||||
Page<MaterialEntity> page = new Page<>(materialPagination.getCurrentPage(), materialPagination.getPageSize());
|
Page<MaterialEntity> page = new Page<>(materialPagination.getCurrentPage(), materialPagination.getPageSize());
|
||||||
|
|||||||
@ -72,6 +72,9 @@ public class MaterialEntity {
|
|||||||
@TableField(value = "safe_stock", updateStrategy = FieldStrategy.IGNORED)
|
@TableField(value = "safe_stock", updateStrategy = FieldStrategy.IGNORED)
|
||||||
private BigDecimal safeStock;
|
private BigDecimal safeStock;
|
||||||
|
|
||||||
|
@TableField(value = "scheme_id", updateStrategy = FieldStrategy.IGNORED)
|
||||||
|
private Long schemeId;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String parentName;
|
private String parentName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,4 +77,6 @@ public class MaterialForm {
|
|||||||
@Schema(description = "流程任务ID")
|
@Schema(description = "流程任务ID")
|
||||||
private String flowTaskId;
|
private String flowTaskId;
|
||||||
|
|
||||||
|
private String schemeId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,152 +1,145 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="el-zoom-in-center">
|
<el-dialog
|
||||||
<div class="JNPF-preview-main">
|
title="详情"
|
||||||
<div class="JNPF-common-page-header">
|
:visible.sync="dialogVisible"
|
||||||
<el-page-header @back="goBack" content="详情"/>
|
width="1200px"
|
||||||
<!-- <div class="options">-->
|
:close-on-click-modal="false"
|
||||||
<!-- <el-button @click="goBack">关 闭</el-button>-->
|
@close="handleClose"
|
||||||
<!-- </div>-->
|
>
|
||||||
</div>
|
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" disabled>
|
||||||
<el-row :gutter="15" class="main" :style="{ margin: '0 auto', width: '1200px' }">
|
<template v-if="!loading">
|
||||||
<el-form ref="formRef" :model="dataForm" size="small" label-width="120px" label-position="right" disabled>
|
<el-divider content-position="left">基础信息</el-divider>
|
||||||
<template v-if="!loading">
|
<el-row :gutter="15">
|
||||||
<el-divider content-position="left">基础信息</el-divider>
|
<el-col :span="8">
|
||||||
<el-row :gutter="15">
|
<el-form-item label="客户编码" prop="custNo">
|
||||||
<el-col :span="8">
|
<JnpfInput v-model="dataForm.custNo"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="客户编码" prop="custNo">
|
</el-form-item>
|
||||||
<JnpfInput v-model="dataForm.custNo"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="客户简称" prop="custSimName">
|
||||||
<el-col :span="8">
|
<JnpfInput v-model="dataForm.custSimName"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="客户简称" prop="custSimName">
|
</el-form-item>
|
||||||
<JnpfInput v-model="dataForm.custSimName"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="客户全称" prop="custName">
|
||||||
<el-col :span="8">
|
<JnpfInput v-model="dataForm.custName"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="客户全称" prop="custName">
|
</el-form-item>
|
||||||
<JnpfInput v-model="dataForm.custName"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
</el-row>
|
||||||
</el-col>
|
<el-row :gutter="15">
|
||||||
</el-row>
|
<el-col :span="8">
|
||||||
<el-row :gutter="15">
|
<el-form-item label="所属行业" prop="industryClass">
|
||||||
<el-col :span="8">
|
<JnpfInput :value="getIndustryClassName(dataForm.industryClass)"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="所属行业" prop="industryClass">
|
</el-form-item>
|
||||||
<JnpfInput :value="getIndustryClassName(dataForm.industryClass)"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="合作状态" prop="coopStatus">
|
||||||
<el-col :span="8">
|
<JnpfInput :value="getCoopStatusName(dataForm.coopStatus)"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="合作状态" prop="coopStatus">
|
</el-form-item>
|
||||||
<JnpfInput :value="getCoopStatusName(dataForm.coopStatus)"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="企业性质" prop="enterpriseType">
|
||||||
<el-col :span="8">
|
<JnpfInput :value="getEnterpriseTypeName(dataForm.enterpriseType)"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="企业性质" prop="enterpriseType">
|
</el-form-item>
|
||||||
<JnpfInput :value="getEnterpriseTypeName(dataForm.enterpriseType)"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
</el-row>
|
||||||
</el-col>
|
<el-row :gutter="15">
|
||||||
</el-row>
|
<el-col :span="8">
|
||||||
<el-row :gutter="15">
|
<el-form-item label="客户等级" prop="custReg">
|
||||||
<el-col :span="8">
|
<JnpfInput :value="getCustRegName(dataForm.custReg)"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="客户等级" prop="custReg">
|
</el-form-item>
|
||||||
<JnpfInput :value="getCustRegName(dataForm.custReg)"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="信用等级" prop="creditRate">
|
||||||
<el-col :span="8">
|
<JnpfInput :value="getCreditRateName(dataForm.creditRate)"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="信用等级" prop="creditRate">
|
</el-form-item>
|
||||||
<JnpfInput :value="getCreditRateName(dataForm.creditRate)"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="启用状态" prop="enabledStatus">
|
||||||
<el-col :span="8">
|
<JnpfInput :value="dataForm.enabledStatus == '1' ? '启用' : '未启用'"></JnpfInput>
|
||||||
<jnpf-form-tip-item label="启用状态" prop="enabledStatus">
|
</el-form-item>
|
||||||
<JnpfInput :value="dataForm.enabledStatus == '1' ? '启用' : '未启用'"></JnpfInput>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
</el-row>
|
||||||
</el-col>
|
<el-row :gutter="15">
|
||||||
</el-row>
|
<el-col :span="24">
|
||||||
<el-row :gutter="15">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-col :span="24">
|
<JnpfTextarea v-model="dataForm.remark" :autoSize="{ minRows: 2, maxRows: 4 }" type="textarea"></JnpfTextarea>
|
||||||
<jnpf-form-tip-item label="备注" prop="remark">
|
</el-form-item>
|
||||||
<JnpfTextarea v-model="dataForm.remark" :autoSize="{ minRows: 4, maxRows: 4 }" type="textarea"></JnpfTextarea>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-divider content-position="left">联系方式</el-divider>
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="联系人1" prop="contact1">
|
|
||||||
<JnpfInput v-model="dataForm.contact1"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="联系电话1" prop="conPhone1">
|
|
||||||
<JnpfInput v-model="dataForm.conPhone1"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="联系地址1" prop="conAddress1">
|
|
||||||
<JnpfInput v-model="dataForm.conAddress1"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="联系人2" prop="contact2">
|
|
||||||
<JnpfInput v-model="dataForm.contact2"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="联系电话2" prop="conPhone2">
|
|
||||||
<JnpfInput v-model="dataForm.conPhone2"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="联系地址2" prop="conAddress2">
|
|
||||||
<JnpfInput v-model="dataForm.conAddress2"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-divider content-position="left">开票信息</el-divider>
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="公司税号" prop="comTaxNumber">
|
|
||||||
<JnpfInput v-model="dataForm.comTaxNumber"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="开户地区" prop="accountRegion">
|
|
||||||
<JnpfInput v-model="dataForm.accountRegion"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="开户银行" prop="accountBank">
|
|
||||||
<JnpfInput v-model="dataForm.accountBank"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="开户账号" prop="accountNo">
|
|
||||||
<JnpfInput v-model="dataForm.accountNo"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="付款方式" prop="payMeth">
|
|
||||||
<JnpfInput :value="getPayMethName(dataForm.payMeth)"></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
</el-form>
|
|
||||||
<el-row :gutter="15" style="text-align: right; padding-top: 20px; padding-bottom: 20px;">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-button @click="goBack">取 消 </el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
<el-divider content-position="left">联系方式</el-divider>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系人1" prop="contact1">
|
||||||
|
<JnpfInput v-model="dataForm.contact1"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系电话1" prop="conPhone1">
|
||||||
|
<JnpfInput v-model="dataForm.conPhone1"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系地址1" prop="conAddress1">
|
||||||
|
<JnpfInput v-model="dataForm.conAddress1"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系人2" prop="contact2">
|
||||||
|
<JnpfInput v-model="dataForm.contact2"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系电话2" prop="conPhone2">
|
||||||
|
<JnpfInput v-model="dataForm.conPhone2"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系地址2" prop="conAddress2">
|
||||||
|
<JnpfInput v-model="dataForm.conAddress2"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-divider content-position="left">开票信息</el-divider>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="公司税号" prop="comTaxNumber">
|
||||||
|
<JnpfInput v-model="dataForm.comTaxNumber"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户地区" prop="accountRegion">
|
||||||
|
<JnpfInput v-model="dataForm.accountRegion"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户银行" prop="accountBank">
|
||||||
|
<JnpfInput v-model="dataForm.accountBank"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户账号" prop="accountNo">
|
||||||
|
<JnpfInput v-model="dataForm.accountNo"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="付款方式" prop="payMeth">
|
||||||
|
<JnpfInput :value="getPayMethName(dataForm.payMeth)"></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="handleClose">关 闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -155,6 +148,7 @@ import request from '@/utils/request'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: '',
|
id: '',
|
||||||
@ -219,6 +213,7 @@ export default {
|
|||||||
},
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || '';
|
this.dataForm.id = id || '';
|
||||||
|
this.dialogVisible = true;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.formRef.resetFields();
|
this.$refs.formRef.resetFields();
|
||||||
@ -235,7 +230,8 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goBack() {
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,148 +1,146 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="el-zoom-in-center">
|
<el-dialog
|
||||||
<div class="JNPF-preview-main">
|
:title="!dataForm.id ? '新建' : '编辑'"
|
||||||
<div class="JNPF-common-page-header">
|
:visible.sync="dialogVisible"
|
||||||
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'"/>
|
width="1200px"
|
||||||
</div>
|
:close-on-click-modal="false"
|
||||||
<el-row :gutter="15" class="main" :style="{ margin: '0 auto', width: '1200px' }">
|
@close="handleClose"
|
||||||
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="120px" label-position="right">
|
>
|
||||||
<template v-if="!loading">
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right">
|
||||||
<el-divider content-position="left">基础信息</el-divider>
|
<template v-if="!loading">
|
||||||
<el-row :gutter="15">
|
<el-divider content-position="left">基础信息</el-divider>
|
||||||
<el-col :span="8">
|
<el-row :gutter="15">
|
||||||
<jnpf-form-tip-item label="客户编码" prop="custNo">
|
<el-col :span="8">
|
||||||
<JnpfInput v-model="dataForm.custNo" placeholder="请输入客户编码" clearable :disabled="!!dataForm.id"></JnpfInput>
|
<el-form-item label="客户编码" prop="custNo">
|
||||||
</jnpf-form-tip-item>
|
<JnpfInput v-model="dataForm.custNo" placeholder="请输入客户编码" clearable :disabled="!!dataForm.id"></JnpfInput>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="客户简称" prop="custSimName">
|
<el-col :span="8">
|
||||||
<JnpfInput v-model="dataForm.custSimName" placeholder="请输入客户简称" clearable></JnpfInput>
|
<el-form-item label="客户简称" prop="custSimName">
|
||||||
</jnpf-form-tip-item>
|
<JnpfInput v-model="dataForm.custSimName" placeholder="请输入客户简称" clearable></JnpfInput>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="客户全称" prop="custName">
|
<el-col :span="8">
|
||||||
<JnpfInput v-model="dataForm.custName" placeholder="请输入客户全称" clearable></JnpfInput>
|
<el-form-item label="客户全称" prop="custName">
|
||||||
</jnpf-form-tip-item>
|
<JnpfInput v-model="dataForm.custName" placeholder="请输入客户全称" clearable></JnpfInput>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="15">
|
</el-row>
|
||||||
<el-col :span="8">
|
<el-row :gutter="15">
|
||||||
<jnpf-form-tip-item label="所属行业" prop="industryClass">
|
<el-col :span="8">
|
||||||
<JnpfSelect v-model="dataForm.industryClass" placeholder="请选择" :options="industryClassOptions" :props="dictProps" clearable></JnpfSelect>
|
<el-form-item label="所属行业" prop="industryClass">
|
||||||
</jnpf-form-tip-item>
|
<JnpfSelect v-model="dataForm.industryClass" placeholder="请选择" :options="industryClassOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="合作状态" prop="coopStatus">
|
<el-col :span="8">
|
||||||
<JnpfSelect v-model="dataForm.coopStatus" placeholder="请选择" :options="coopStatusOptions" :props="dictProps" clearable></JnpfSelect>
|
<el-form-item label="合作状态" prop="coopStatus">
|
||||||
</jnpf-form-tip-item>
|
<JnpfSelect v-model="dataForm.coopStatus" placeholder="请选择" :options="coopStatusOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="企业性质" prop="enterpriseType">
|
<el-col :span="8">
|
||||||
<JnpfSelect v-model="dataForm.enterpriseType" placeholder="请选择" :options="enterpriseTypeOptions" :props="dictProps" clearable></JnpfSelect>
|
<el-form-item label="企业性质" prop="enterpriseType">
|
||||||
</jnpf-form-tip-item>
|
<JnpfSelect v-model="dataForm.enterpriseType" placeholder="请选择" :options="enterpriseTypeOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="15">
|
</el-row>
|
||||||
<el-col :span="8">
|
<el-row :gutter="15">
|
||||||
<jnpf-form-tip-item label="客户等级" prop="custReg">
|
<el-col :span="8">
|
||||||
<JnpfSelect v-model="dataForm.custReg" placeholder="请选择" :options="custRegOptions" :props="dictProps" clearable></JnpfSelect>
|
<el-form-item label="客户等级" prop="custReg">
|
||||||
</jnpf-form-tip-item>
|
<JnpfSelect v-model="dataForm.custReg" placeholder="请选择" :options="custRegOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="信用等级" prop="creditRate">
|
<el-col :span="8">
|
||||||
<JnpfSelect v-model="dataForm.creditRate" placeholder="请选择" :options="creditRateOptions" :props="dictProps" clearable></JnpfSelect>
|
<el-form-item label="信用等级" prop="creditRate">
|
||||||
</jnpf-form-tip-item>
|
<JnpfSelect v-model="dataForm.creditRate" placeholder="请选择" :options="creditRateOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="8">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="启用状态" prop="enabledStatus">
|
<el-col :span="8">
|
||||||
<JnpfSelect v-model="dataForm.enabledStatus" placeholder="请选择" :options="enabledStatusOptions" :props="dictProps" clearable></JnpfSelect>
|
<el-form-item label="启用状态" prop="enabledStatus">
|
||||||
</jnpf-form-tip-item>
|
<JnpfSelect v-model="dataForm.enabledStatus" placeholder="请选择" :options="enabledStatusOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="15">
|
</el-row>
|
||||||
<el-col :span="24">
|
<el-row :gutter="15">
|
||||||
<jnpf-form-tip-item label="备注" prop="remark">
|
<el-col :span="24">
|
||||||
<JnpfTextarea v-model="dataForm.remark" placeholder="请输入备注" :autoSize="{ minRows: 4, maxRows: 4 }" type="textarea"></JnpfTextarea>
|
<el-form-item label="备注" prop="remark">
|
||||||
</jnpf-form-tip-item>
|
<JnpfTextarea v-model="dataForm.remark" placeholder="请输入备注" :autoSize="{ minRows: 2, maxRows: 4 }" type="textarea"></JnpfTextarea>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-divider content-position="left">联系方式</el-divider>
|
<el-divider content-position="left">联系方式</el-divider>
|
||||||
<el-row :gutter="15">
|
<el-row :gutter="15">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<jnpf-form-tip-item label="联系人1" prop="contact1">
|
<el-form-item label="联系人1" prop="contact1">
|
||||||
<JnpfInput v-model="dataForm.contact1" placeholder="请输入联系人" clearable></JnpfInput>
|
<JnpfInput v-model="dataForm.contact1" placeholder="请输入联系人" clearable></JnpfInput>
|
||||||
</jnpf-form-tip-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<jnpf-form-tip-item label="联系电话1" prop="conPhone1">
|
<el-form-item label="联系电话1" prop="conPhone1">
|
||||||
<JnpfInput v-model="dataForm.conPhone1" placeholder="请输入联系电话" clearable></JnpfInput>
|
<JnpfInput v-model="dataForm.conPhone1" placeholder="请输入联系电话" clearable></JnpfInput>
|
||||||
</jnpf-form-tip-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<jnpf-form-tip-item label="联系地址1" prop="conAddress1">
|
<el-form-item label="联系地址1" prop="conAddress1">
|
||||||
<JnpfInput v-model="dataForm.conAddress1" placeholder="请输入联系地址" clearable></JnpfInput>
|
<JnpfInput v-model="dataForm.conAddress1" placeholder="请输入联系地址" clearable></JnpfInput>
|
||||||
</jnpf-form-tip-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="15">
|
<el-row :gutter="15">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<jnpf-form-tip-item label="联系人2" prop="contact2">
|
<el-form-item label="联系人2" prop="contact2">
|
||||||
<JnpfInput v-model="dataForm.contact2" placeholder="请输入联系人" clearable></JnpfInput>
|
<JnpfInput v-model="dataForm.contact2" placeholder="请输入联系人" clearable></JnpfInput>
|
||||||
</jnpf-form-tip-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<jnpf-form-tip-item label="联系电话2" prop="conPhone2">
|
<el-form-item label="联系电话2" prop="conPhone2">
|
||||||
<JnpfInput v-model="dataForm.conPhone2" placeholder="请输入联系电话" clearable></JnpfInput>
|
<JnpfInput v-model="dataForm.conPhone2" placeholder="请输入联系电话" clearable></JnpfInput>
|
||||||
</jnpf-form-tip-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<jnpf-form-tip-item label="联系地址2" prop="conAddress2">
|
<el-form-item label="联系地址2" prop="conAddress2">
|
||||||
<JnpfInput v-model="dataForm.conAddress2" placeholder="请输入联系地址" clearable></JnpfInput>
|
<JnpfInput v-model="dataForm.conAddress2" placeholder="请输入联系地址" clearable></JnpfInput>
|
||||||
</jnpf-form-tip-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-divider content-position="left">开票信息</el-divider>
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="公司税号" prop="comTaxNumber">
|
|
||||||
<JnpfInput v-model="dataForm.comTaxNumber" placeholder="请输入公司税号" clearable></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="开户地区" prop="accountRegion">
|
|
||||||
<JnpfInput v-model="dataForm.accountRegion" placeholder="请输入开户地区" clearable></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="开户银行" prop="accountBank">
|
|
||||||
<JnpfInput v-model="dataForm.accountBank" placeholder="请输入开户银行" clearable></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="15">
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="开户账号" prop="accountNo">
|
|
||||||
<JnpfInput v-model="dataForm.accountNo" placeholder="请输入开户账号" clearable></JnpfInput>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<jnpf-form-tip-item label="付款方式" prop="payMeth">
|
|
||||||
<JnpfSelect v-model="dataForm.payMeth" placeholder="请选择" :options="payMethOptions" :props="dictProps" clearable></JnpfSelect>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-col :span="24" style="text-align: right; padding-top: 20px;">
|
|
||||||
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保 存</el-button>
|
|
||||||
<el-button @click="goBack">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
</el-form>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
<el-divider content-position="left">开票信息</el-divider>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="公司税号" prop="comTaxNumber">
|
||||||
|
<JnpfInput v-model="dataForm.comTaxNumber" placeholder="请输入公司税号" clearable></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户地区" prop="accountRegion">
|
||||||
|
<JnpfInput v-model="dataForm.accountRegion" placeholder="请输入开户地区" clearable></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户银行" prop="accountBank">
|
||||||
|
<JnpfInput v-model="dataForm.accountBank" placeholder="请输入开户银行" clearable></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户账号" prop="accountNo">
|
||||||
|
<JnpfInput v-model="dataForm.accountNo" placeholder="请输入开户账号" clearable></JnpfInput>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="付款方式" prop="payMeth">
|
||||||
|
<JnpfSelect v-model="dataForm.payMeth" placeholder="请选择" :options="payMethOptions" :props="dictProps" clearable></JnpfSelect>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保 存</el-button>
|
||||||
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
@ -151,6 +149,7 @@ import {getDict} from "@/api/systemData/dictionary";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
@ -217,6 +216,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || '';
|
this.dataForm.id = id || '';
|
||||||
|
this.dialogVisible = true;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.formRef.resetFields();
|
this.$refs.formRef.resetFields();
|
||||||
@ -252,6 +252,7 @@ export default {
|
|||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.btnLoading = false;
|
this.btnLoading = false;
|
||||||
|
this.dialogVisible = false;
|
||||||
this.$emit('refresh', true)
|
this.$emit('refresh', true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -261,7 +262,8 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goBack() {
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
this.$emit('refresh')
|
this.$emit('refresh')
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,110 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="el-zoom-in-center">
|
<el-dialog
|
||||||
<div class="JNPF-preview-main">
|
:title="!dataForm.id ? '新建' : '编辑'"
|
||||||
<div class="JNPF-common-page-header">
|
:visible.sync="dialogVisible"
|
||||||
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
|
width="600px"
|
||||||
<!-- <div class="options">-->
|
:close-on-click-modal="false"
|
||||||
<!-- <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保 存</el-button>-->
|
@close="handleClose"
|
||||||
<!-- <el-button @click="goBack">取 消</el-button>-->
|
>
|
||||||
<!-- </div>-->
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right">
|
||||||
</div>
|
<template v-if="!loading">
|
||||||
<el-row :gutter="15" class="main" :style="{ margin: '0 auto', width: '600px' }">
|
<el-form-item label="物料类型" prop="matType">
|
||||||
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
|
<JnpfSelect v-model="dataForm.matType" placeholder="请选择物料类型" :options="matTypeOptions" :props="matTypeProps" clearable :style="{ width: '100%' }">
|
||||||
label-position="right">
|
</JnpfSelect>
|
||||||
<template v-if="!loading">
|
</el-form-item>
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
<el-form-item label="物料编码" prop="matCode">
|
||||||
<jnpf-form-tip-item label="物料类型" prop="matType">
|
<JnpfInput v-model="dataForm.matCode" placeholder="请输入物料编码" clearable :disabled="!!dataForm.id" :style="{ width: '100%' }">
|
||||||
<JnpfSelect v-model="dataForm.matType" @change="changeData('matType', -1)"
|
</JnpfInput>
|
||||||
placeholder="请选择物料类型" :options="matTypeOptions" :props="matTypeProps" clearable
|
</el-form-item>
|
||||||
:style="{ width: '100%' }">
|
<el-form-item label="物料名称" prop="matName">
|
||||||
</JnpfSelect>
|
<JnpfInput v-model="dataForm.matName" placeholder="请输入物料名称" clearable :style="{ width: '100%' }">
|
||||||
</jnpf-form-tip-item>
|
</JnpfInput>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
<el-form-item label="单位" prop="unit">
|
||||||
<jnpf-form-tip-item label="物料编码" prop="matCode">
|
<JnpfSelect v-model="dataForm.unit" placeholder="请选择单位" :options="unitOptions" :props="unitProps" clearable :style="{ width: '100%' }">
|
||||||
<JnpfInput v-model="dataForm.matCode" @change="changeData('matCode', -1)" placeholder="请输入物料编码"
|
</JnpfSelect>
|
||||||
clearable :disabled="!!dataForm.id" :style="{ width: '100%' }">
|
</el-form-item>
|
||||||
</JnpfInput>
|
<el-form-item label="质检方案" prop="schemeId">
|
||||||
</jnpf-form-tip-item>
|
<JnpfInput v-model="dataForm.schemeId" placeholder="请选择" clearable :style="{ width: '100%' }">
|
||||||
</el-col>
|
</JnpfInput>
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
</el-form-item>
|
||||||
<jnpf-form-tip-item label="物料名称" prop="matName">
|
<el-form-item label="品牌" prop="brand">
|
||||||
<JnpfInput v-model="dataForm.matName" @change="changeData('matName', -1)" placeholder="请输入物料名称"
|
<JnpfInput v-model="dataForm.brand" placeholder="请输入品牌" clearable :style="{ width: '100%' }">
|
||||||
clearable :style="{ width: '100%' }">
|
</JnpfInput>
|
||||||
</JnpfInput>
|
</el-form-item>
|
||||||
</jnpf-form-tip-item>
|
<el-form-item label="安全库存" prop="safeStock">
|
||||||
</el-col>
|
<JnpfInputNumber v-model="dataForm.safeStock" placeholder="请输入安全库存" :precision="2" :controls="false" :style="{ width: '100%' }">
|
||||||
|
</JnpfInputNumber>
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
</el-form-item>
|
||||||
<jnpf-form-tip-item label="单位" prop="unit">
|
<el-form-item label="启用状态" prop="enabledStatus">
|
||||||
<JnpfInput v-model="dataForm.unit" @change="changeData('unit', -1)" placeholder="请输入单位"
|
<JnpfSelect v-model="dataForm.enabledStatus" placeholder="请选择状态" :options="enabledStatusOptions" :props="enabledStatusProps" clearable :style="{ width: '100%' }">
|
||||||
clearable :style="{ width: '100%' }">
|
</JnpfSelect>
|
||||||
</JnpfInput>
|
</el-form-item>
|
||||||
</jnpf-form-tip-item>
|
<el-form-item label="备注" prop="remark">
|
||||||
</el-col>
|
<JnpfTextarea v-model="dataForm.remark" placeholder="请输入备注" :style="{ width: '100%' }" :autoSize="{ minRows: 4, maxRows: 4 }" type="textarea">
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
</JnpfTextarea>
|
||||||
<jnpf-form-tip-item label="品牌" prop="brand">
|
</el-form-item>
|
||||||
<JnpfInput v-model="dataForm.brand" @change="changeData('brand', -1)" placeholder="请输入品牌"
|
</template>
|
||||||
clearable :style="{ width: '100%' }">
|
</el-form>
|
||||||
</JnpfInput>
|
<div slot="footer" class="dialog-footer">
|
||||||
</jnpf-form-tip-item>
|
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保 存</el-button>
|
||||||
</el-col>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
<!-- <el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">-->
|
|
||||||
<!-- <jnpf-form-tip-item label="规格型号" prop="spec">-->
|
|
||||||
<!-- <JnpfInput v-model="dataForm.spec" @change="changeData('spec', -1)" placeholder="请输入规格型号"-->
|
|
||||||
<!-- clearable :style="{ width: '100%' }">-->
|
|
||||||
<!-- </JnpfInput>-->
|
|
||||||
<!-- </jnpf-form-tip-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
|
||||||
<jnpf-form-tip-item label="安全库存" prop="safeStock">
|
|
||||||
<JnpfInputNumber v-model="dataForm.safeStock" @change="changeData('safeStock', -1)" placeholder="请输入安全库存"
|
|
||||||
:precision="2" :controls="false" :style="{ width: '100%' }">
|
|
||||||
</JnpfInputNumber>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
|
||||||
<jnpf-form-tip-item label="状态" prop="enabledStatus">
|
|
||||||
<JnpfSelect v-model="dataForm.enabledStatus" @change="changeData('enabledStatus', -1)"
|
|
||||||
placeholder="请选择状态" :options="enabledStatusOptions" :props="enabledStatusProps" clearable
|
|
||||||
:style="{ width: '100%' }">
|
|
||||||
</JnpfSelect>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24" :sm="24" :md="24" :xl="24" :xs="24">
|
|
||||||
<jnpf-form-tip-item label="备注" prop="remark">
|
|
||||||
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark', -1)" placeholder="请输入备注"
|
|
||||||
:style="{ width: '100%' }" :autoSize="{ minRows: 4, maxRows: 4 }" type="textarea">
|
|
||||||
</JnpfTextarea>
|
|
||||||
</jnpf-form-tip-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24" style="text-align: right; padding-top: 20px;">
|
|
||||||
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保 存</el-button>
|
|
||||||
<el-button @click="goBack">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
</el-form>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
|
||||||
props: {},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
dialogVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
formRef: 'formRef',
|
|
||||||
eventType: '',
|
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: '',
|
id: '',
|
||||||
matCode: undefined,
|
matCode: undefined,
|
||||||
@ -117,35 +74,26 @@ export default {
|
|||||||
safeStock: undefined,
|
safeStock: undefined,
|
||||||
enabledStatus: 1,
|
enabledStatus: 1,
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
|
schemeId: undefined,
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
matCode: [
|
matCode: [
|
||||||
{
|
{ required: true, message: '请输入物料编码', trigger: 'blur' },
|
||||||
required: true,
|
|
||||||
message: '请输入物料编码',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
matName: [
|
matName: [
|
||||||
{
|
{ required: true, message: '请输入物料名称', trigger: 'blur' },
|
||||||
required: true,
|
|
||||||
message: '请输入物料名称',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
matType: [
|
matType: [
|
||||||
{
|
{ required: true, message: '请选择物料类型', trigger: 'change' },
|
||||||
required: true,
|
],
|
||||||
message: '请选择物料类型',
|
unit: [
|
||||||
trigger: 'change',
|
{ required: true, message: '请选择单位', trigger: 'change' },
|
||||||
},
|
],
|
||||||
|
schemeId: [
|
||||||
|
{ required: true, message: '请选择质检方案', trigger: 'change' },
|
||||||
],
|
],
|
||||||
enabledStatus: [
|
enabledStatus: [
|
||||||
{
|
{ required: true, message: '请选择状态', trigger: 'change' },
|
||||||
required: true,
|
|
||||||
message: '请选择状态',
|
|
||||||
trigger: 'change',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
matTypeOptions: [
|
matTypeOptions: [
|
||||||
@ -159,15 +107,17 @@ export default {
|
|||||||
{ fullName: "未启用", id: 2 },
|
{ fullName: "未启用", id: 2 },
|
||||||
],
|
],
|
||||||
enabledStatusProps: { label: "fullName", value: "id" },
|
enabledStatusProps: { label: "fullName", value: "id" },
|
||||||
|
unitOptions: [
|
||||||
|
{ fullName: "Kg", id: "1" },
|
||||||
|
{ fullName: "T", id: "2" },
|
||||||
|
],
|
||||||
|
unitProps: { label: "fullName", value: "id" },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapGetters(['userInfo']),
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || '';
|
this.dataForm.id = id || '';
|
||||||
this.visible = true;
|
this.dialogVisible = true;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.formRef.resetFields();
|
this.$refs.formRef.resetFields();
|
||||||
@ -203,6 +153,7 @@ export default {
|
|||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.btnLoading = false;
|
this.btnLoading = false;
|
||||||
|
this.dialogVisible = false;
|
||||||
this.$emit('refresh', true)
|
this.$emit('refresh', true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -212,12 +163,10 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goBack() {
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
this.$emit('refresh')
|
this.$emit('refresh')
|
||||||
},
|
},
|
||||||
changeData(model, index) {
|
|
||||||
this.isEdit = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
NEW_FILE_CODE
|
|
||||||
<template>
|
<template>
|
||||||
<div class="JNPF-common-layout material_data">
|
<div class="JNPF-common-layout material_data">
|
||||||
<div class="JNPF-common-layout-center">
|
<div class="JNPF-common-layout-center">
|
||||||
@ -28,16 +27,6 @@ NEW_FILE_CODE
|
|||||||
</JnpfSelect>
|
</JnpfSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="品牌">
|
|
||||||
<el-input v-model="query.brand" placeholder="请输入" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="规格型号">
|
|
||||||
<el-input v-model="query.spec" placeholder="请输入" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item class="btn">
|
<el-form-item class="btn">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||||
@ -56,39 +45,37 @@ NEW_FILE_CODE
|
|||||||
<JNPF-table v-loading="listLoading" :data="list">
|
<JNPF-table v-loading="listLoading" :data="list">
|
||||||
<el-table-column prop="matCode" label="物料编码" align="center"/>
|
<el-table-column prop="matCode" label="物料编码" align="center"/>
|
||||||
<el-table-column prop="matName" label="物料名称" align="center"/>
|
<el-table-column prop="matName" label="物料名称" align="center"/>
|
||||||
<el-table-column prop="parentName" label="父分类" align="center"/>
|
|
||||||
<el-table-column prop="matType" label="物料类型" align="center">
|
<el-table-column prop="matType" label="物料类型" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.matType == '1' ? '原材料' : scope.row.matType == '2' ? '半成品' : scope.row.matType == '3' ? '成品' : scope.row.matType }}
|
{{ getEnumLabel(matTypeOptions, scope.row.matType) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="unit" label="单位" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ getEnumLabel(unitOptions, scope.row.unit) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="unit" label="单位" align="center"/>
|
|
||||||
<el-table-column prop="brand" label="品牌" align="center"/>
|
|
||||||
<el-table-column prop="spec" label="规格型号" align="center"/>
|
<el-table-column prop="spec" label="规格型号" align="center"/>
|
||||||
<el-table-column prop="safeStock" label="安全库存" align="center"/>
|
<el-table-column prop="brand" label="品牌" align="center"/>
|
||||||
<el-table-column prop="enabledStatus" label="状态" align="center">
|
<el-table-column prop="enabledStatus" label="状态" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="scope.row.enabledStatus == 1 ? 'success' : 'info'" size="small">
|
<el-tag :type="scope.row.enabledStatus == 1 ? 'success' : 'info'" size="small">
|
||||||
{{ scope.row.enabledStatus == 1 ? '启用' : scope.row.enabledStatus == 2 ? '未启用' : scope.row.enabledStatus }}
|
{{ getEnumLabel(enabledStatusOptions, scope.row.enabledStatus) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" align="center"/>
|
|
||||||
<el-table-column prop="creatorTime" label="创建时间" align="center" :formatter="jnpf.tableDateFormat1"/>
|
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="addOrUpdateHandle(scope.row)">编辑</el-button>
|
<el-button type="text" @click="addOrUpdateHandle(scope.row)">编辑</el-button>
|
||||||
<el-button type="text" @click="detailHandle(scope.row)">详情</el-button>
|
|
||||||
<el-button type="text" style="color: #f56c6c" @click="handleDelete(scope.row)">删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</JNPF-table>
|
</JNPF-table>
|
||||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||||
@pagination="initData" />
|
@pagination="initData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||||
<JNPF-Detail v-if="detailVisible" ref="JNFPDetail" @close="closeDetail" />
|
<JNFP-Detail v-if="detailVisible" ref="JNFPDetail" @close="closeDetail" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -139,6 +126,10 @@ export default {
|
|||||||
{ fullName: "成品", id: "3" },
|
{ fullName: "成品", id: "3" },
|
||||||
],
|
],
|
||||||
matTypeProps: { label: "fullName", value: "id" },
|
matTypeProps: { label: "fullName", value: "id" },
|
||||||
|
unitOptions: [
|
||||||
|
{ fullName: "Kg", id: 1 },
|
||||||
|
{ fullName: "T", id: 2 },
|
||||||
|
],
|
||||||
enabledStatusOptions: [
|
enabledStatusOptions: [
|
||||||
{ fullName: "启用", id: 1 },
|
{ fullName: "启用", id: 1 },
|
||||||
{ fullName: "未启用", id: 2 },
|
{ fullName: "未启用", id: 2 },
|
||||||
@ -159,6 +150,11 @@ export default {
|
|||||||
this.initData();
|
this.initData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getEnumLabel(options, value) {
|
||||||
|
if (value === undefined || value === null || value === '') return value;
|
||||||
|
const item = options.find(opt => opt.id == value);
|
||||||
|
return item ? item.fullName : value;
|
||||||
|
},
|
||||||
initData() {
|
initData() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
let _query = {
|
let _query = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user