'20240304'

This commit is contained in:
xd 2024-03-04 13:47:39 +08:00
parent 47f9ddad65
commit c319747b03
23 changed files with 89 additions and 104 deletions

View File

@ -10,7 +10,7 @@
<name>ruoyi</name> <name>ruoyi</name>
<url>http://www.ruoyi.vip</url> <url>http://www.ruoyi.vip</url>
<description>若依管理系统</description> <description>江南业务系统</description>
<properties> <properties>
<ruoyi.version>3.8.7</ruoyi.version> <ruoyi.version>3.8.7</ruoyi.version>

View File

@ -113,7 +113,7 @@ public class SwaggerConfig
// 用ApiInfoBuilder进行定制 // 用ApiInfoBuilder进行定制
return new ApiInfoBuilder() return new ApiInfoBuilder()
// 设置标题 // 设置标题
.title("标题:若依管理系统_接口文档") .title("标题:江南业务系统_接口文档")
// 描述 // 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息 // 作者信息

View File

@ -6,7 +6,7 @@ spring:
# 主库数据源 # 主库数据源
master: master:
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://192.168.9.99:1433;DatabaseName=ry-vue url: jdbc:sqlserver://192.168.9.66:1433;DatabaseName=ry-vue
username: sa username: sa
password: Itcenter110- password: Itcenter110-
# 红本数据库数据源 # 红本数据库数据源

View File

@ -61,7 +61,7 @@ public class CFactory extends BaseEntity
private BigDecimal factoryTotalRatio; private BigDecimal factoryTotalRatio;
/** 物料类别信息 */ /** 物料类别信息 */
private List<CMaterialType> cMaterialTypeList; private List<CMaterialTypeFactory> cMaterialTypeList;
public void setFactoryId(Long factoryId) public void setFactoryId(Long factoryId)
{ {
@ -158,12 +158,12 @@ public class CFactory extends BaseEntity
public void setFactoryPjRatio(BigDecimal factoryPjRatio) {this.factoryPjRatio = factoryPjRatio;} public void setFactoryPjRatio(BigDecimal factoryPjRatio) {this.factoryPjRatio = factoryPjRatio;}
public List<CMaterialType> getCMaterialTypeList() public List<CMaterialTypeFactory> getCMaterialTypeList()
{ {
return cMaterialTypeList; return cMaterialTypeList;
} }
public void setCMaterialTypeList(List<CMaterialType> cMaterialTypeList){this.cMaterialTypeList = cMaterialTypeList;} public void setCMaterialTypeList(List<CMaterialTypeFactory> cMaterialTypeList){this.cMaterialTypeList = cMaterialTypeList;}
@Override @Override
public String toString() { public String toString() {

View File

@ -11,7 +11,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi * @author ruoyi
* @date 2024-02-29 * @date 2024-02-29
*/ */
public class CMaterialType extends BaseEntity public class CMaterialTypeFactory extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -26,8 +26,8 @@ public class CMaterialType extends BaseEntity
@Excel(name = "名称") @Excel(name = "名称")
private String typeName; private String typeName;
/** 关联车间id */ /** 关联车间编码 */
private Long factoryId; private String factoryId;
public void setTypeId(Long typeId) public void setTypeId(Long typeId)
{ {
@ -56,12 +56,12 @@ public class CMaterialType extends BaseEntity
{ {
return typeName; return typeName;
} }
public void setFactoryId(Long factoryId) public void setFactoryId(String factoryId)
{ {
this.factoryId = factoryId; this.factoryId = factoryId;
} }
public Long getFactoryId() public String getFactoryId()
{ {
return factoryId; return factoryId;
} }

View File

@ -2,7 +2,7 @@ package com.ruoyi.factory.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.factory.domain.CFactory; import com.ruoyi.factory.domain.CFactory;
import com.ruoyi.factory.domain.CMaterialType; import com.ruoyi.factory.domain.CMaterialTypeFactory;
/** /**
* 车间管理Mapper接口 * 车间管理Mapper接口
@ -74,7 +74,7 @@ public interface CFactoryMapper
* @param cMaterialTypeList 物料类别列表 * @param cMaterialTypeList 物料类别列表
* @return 结果 * @return 结果
*/ */
public int batchCMaterialType(List<CMaterialType> cMaterialTypeList); public int batchCMaterialType(List<CMaterialTypeFactory> cMaterialTypeList);
/** /**
@ -83,10 +83,10 @@ public interface CFactoryMapper
* @param factoryId 车间管理ID * @param factoryId 车间管理ID
* @return 结果 * @return 结果
*/ */
public int deleteCMaterialTypeByFactoryId(Long factoryId); public int deleteCMaterialTypeByFactoryId(String factoryId);
/*物料类别列表*/ /*物料类别列表*/
List<CMaterialType> selectCTypelist(); List<CMaterialTypeFactory> selectCTypelist();
/** /**
* 校验车间编码是否存在 * 校验车间编码是否存在

View File

@ -2,14 +2,13 @@ package com.ruoyi.factory.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.clMaterial.domain.CYlMaterial;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.factory.domain.CMaterialType; import com.ruoyi.factory.domain.CMaterialTypeFactory;
import com.ruoyi.factory.mapper.CFactoryMapper; import com.ruoyi.factory.mapper.CFactoryMapper;
import com.ruoyi.factory.domain.CFactory; import com.ruoyi.factory.domain.CFactory;
import com.ruoyi.factory.service.ICFactoryService; import com.ruoyi.factory.service.ICFactoryService;
@ -52,7 +51,7 @@ public class CFactoryServiceImpl implements ICFactoryService
/*物料类别列表*/ /*物料类别列表*/
@Override @Override
public List<CMaterialType> selectCTypelist() { public List<CMaterialTypeFactory> selectCTypelist() {
return cFactoryMapper.selectCTypelist(); return cFactoryMapper.selectCTypelist();
} }
@ -81,7 +80,7 @@ public class CFactoryServiceImpl implements ICFactoryService
@Override @Override
public int updateCFactory(CFactory cFactory) public int updateCFactory(CFactory cFactory)
{ {
cFactoryMapper.deleteCMaterialTypeByFactoryId(cFactory.getFactoryId()); cFactoryMapper.deleteCMaterialTypeByFactoryId(cFactory.getFactoryNo());
insertCMaterialType(cFactory); insertCMaterialType(cFactory);
return cFactoryMapper.updateCFactory(cFactory); return cFactoryMapper.updateCFactory(cFactory);
} }
@ -110,7 +109,8 @@ public class CFactoryServiceImpl implements ICFactoryService
@Override @Override
public int deleteCFactoryByFactoryId(Long factoryId) public int deleteCFactoryByFactoryId(Long factoryId)
{ {
cFactoryMapper.deleteCMaterialTypeByFactoryId(factoryId); CFactory f = cFactoryMapper.selectCFactoryByFactoryId(factoryId);
cFactoryMapper.deleteCMaterialTypeByFactoryId(f.getFactoryNo());
return cFactoryMapper.deleteCFactoryByFactoryId(factoryId); return cFactoryMapper.deleteCFactoryByFactoryId(factoryId);
} }
@ -121,14 +121,14 @@ public class CFactoryServiceImpl implements ICFactoryService
*/ */
public void insertCMaterialType(CFactory cFactory) public void insertCMaterialType(CFactory cFactory)
{ {
List<CMaterialType> cMaterialTypeList = cFactory.getCMaterialTypeList(); List<CMaterialTypeFactory> cMaterialTypeList = cFactory.getCMaterialTypeList();
Long factoryId = cFactory.getFactoryId(); String factoryNo = cFactory.getFactoryNo();
if (StringUtils.isNotNull(cMaterialTypeList)) if (StringUtils.isNotNull(cMaterialTypeList))
{ {
List<CMaterialType> list = new ArrayList<CMaterialType>(); List<CMaterialTypeFactory> list = new ArrayList<CMaterialTypeFactory>();
for (CMaterialType cMaterialType : cMaterialTypeList) for (CMaterialTypeFactory cMaterialType : cMaterialTypeList)
{ {
cMaterialType.setFactoryId(factoryId); cMaterialType.setFactoryId(factoryNo);
list.add(cMaterialType); list.add(cMaterialType);
} }
if (list.size() > 0) if (list.size() > 0)

View File

@ -20,8 +20,8 @@ public class CMaterial extends BaseEntity
/** id */ /** id */
private Long materialId; private Long materialId;
/** 关联物料类型id */ /** 关联物料类型编码 */
private Long materialTypeId; private String materialTypeId;
/** 型号 */ /** 型号 */
@Excel(name = "型号") @Excel(name = "型号")
@ -56,11 +56,11 @@ public class CMaterial extends BaseEntity
return materialId; return materialId;
} }
public Long getMaterialTypeId() { public String getMaterialTypeId() {
return materialTypeId; return materialTypeId;
} }
public void setMaterialTypeId(Long materialTypeId) { public void setMaterialTypeId(String materialTypeId) {
this.materialTypeId = materialTypeId; this.materialTypeId = materialTypeId;
} }

View File

@ -12,7 +12,6 @@ import org.apache.ibatis.type.Alias;
* @author ruoyi * @author ruoyi
* @date 2024-03-01 * @date 2024-03-01
*/ */
@Alias("c_mtype")
public class CMaterialType extends BaseEntity public class CMaterialType extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -28,9 +27,6 @@ public class CMaterialType extends BaseEntity
@Excel(name = "名称") @Excel(name = "名称")
private String typeName; private String typeName;
/** 关联车间id */
private Long factoryId;
public void setTypeId(Long typeId) public void setTypeId(Long typeId)
{ {
this.typeId = typeId; this.typeId = typeId;
@ -58,15 +54,6 @@ public class CMaterialType extends BaseEntity
{ {
return typeName; return typeName;
} }
public void setFactoryId(Long factoryId)
{
this.factoryId = factoryId;
}
public Long getFactoryId()
{
return factoryId;
}
@Override @Override
public String toString() { public String toString() {
@ -74,7 +61,6 @@ public class CMaterialType extends BaseEntity
.append("typeId", getTypeId()) .append("typeId", getTypeId())
.append("typeNo", getTypeNo()) .append("typeNo", getTypeNo())
.append("typeName", getTypeName()) .append("typeName", getTypeName())
.append("factoryId", getFactoryId())
.toString(); .toString();
} }
} }

View File

@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<collection property="cMaterialTypeList" notNullColumn="sub_type_id" javaType="java.util.List" resultMap="CMaterialTypeResult" /> <collection property="cMaterialTypeList" notNullColumn="sub_type_id" javaType="java.util.List" resultMap="CMaterialTypeResult" />
</resultMap> </resultMap>
<resultMap type="CMaterialType" id="CMaterialTypeResult"> <resultMap type="CMaterialTypeFactory" id="CMaterialTypeResult">
<result property="typeId" column="sub_type_id" /> <result property="typeId" column="sub_type_id" />
<result property="typeNo" column="sub_type_no" /> <result property="typeNo" column="sub_type_no" />
<result property="typeName" column="sub_type_name" /> <result property="typeName" column="sub_type_name" />
@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectCTypelist" resultType="CMaterialType"> <select id="selectCTypelist" resultType="CMaterialTypeFactory">
select type_no as typeNo,type_name as typeName from c_material_type select type_no as typeNo,type_name as typeName from c_material_type
</select> </select>
@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.factory_id, a.factory_no, a.factory_name, a.factory_rg_ratio, a.factory_wj_ratio, a.factory_fl_ratio, a.factory_df_ratio, a.factory_trq_ratio, a.factory_ys_ratio, a.factory_pj_ratio, a.factory_total_ratio, select a.factory_id, a.factory_no, a.factory_name, a.factory_rg_ratio, a.factory_wj_ratio, a.factory_fl_ratio, a.factory_df_ratio, a.factory_trq_ratio, a.factory_ys_ratio, a.factory_pj_ratio, a.factory_total_ratio,
b.type_id as sub_type_id, b.type_no as sub_type_no, b.type_name as sub_type_name, b.factory_id as sub_factory_id b.type_id as sub_type_id, b.type_no as sub_type_no, b.type_name as sub_type_name, b.factory_id as sub_factory_id
from c_factory a from c_factory a
left join c_material_type b on b.factory_id = a.factory_id left join c_material_type_factory b on b.factory_id = a.factory_no
where a.factory_id = #{factoryId} where a.factory_id = #{factoryId}
</select> </select>
@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from c_factory where factory_id = #{factoryId} delete from c_factory where factory_id = #{factoryId}
</delete> </delete>
<delete id="deleteCFactoryByFactoryIds" parameterType="String"> <delete id="deleteCFactoryByFactoryIds" parameterType="Long">
delete from c_factory where factory_id in delete from c_factory where factory_id in
<foreach item="factoryId" collection="array" open="(" separator="," close=")"> <foreach item="factoryId" collection="array" open="(" separator="," close=")">
#{factoryId} #{factoryId}
@ -112,18 +112,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteCMaterialTypeByFactoryIds" parameterType="String"> <delete id="deleteCMaterialTypeByFactoryIds" parameterType="String">
delete from c_material_type where factory_id in delete from c_material_type_factory where factory_id in
<foreach item="factoryId" collection="array" open="(" separator="," close=")"> <foreach item="factoryId" collection="array" open="(" separator="," close=")">
#{factoryId} #{factoryId}
</foreach> </foreach>
</delete> </delete>
<delete id="deleteCMaterialTypeByFactoryId" parameterType="Long"> <delete id="deleteCMaterialTypeByFactoryId" parameterType="String">
delete from c_material_type where factory_id = #{factoryId} delete from c_material_type_factory where factory_id = #{factoryId}
</delete> </delete>
<insert id="batchCMaterialType"> <insert id="batchCMaterialType">
insert into c_material_type(type_no, type_name, factory_id) values insert into c_material_type_factory(type_no, type_name, factory_id) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
(#{item.typeNo}, #{item.typeName}, #{item.factoryId}) (#{item.typeNo}, #{item.typeName}, #{item.factoryId})
</foreach> </foreach>

View File

@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectCMaterialVo"> <sql id="selectCMaterialVo">
select a.material_id,a.material_type_id, a.material_xingh, a.material_guig, a.material_diany, a.material_dw,b.type_name select a.material_id,a.material_type_id, a.material_xingh, a.material_guig, a.material_diany, a.material_dw,b.type_name
from c_material a from c_material a
left join c_material_type b on a.material_type_id = b.type_id left join c_material_type b on a.material_type_id = b.type_no
</sql> </sql>
<select id="selectCMaterialList" parameterType="CMaterial" resultMap="CMaterialResult"> <select id="selectCMaterialList" parameterType="CMaterial" resultMap="CMaterialResult">

View File

@ -4,15 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.materialType.mapper.CMaterialTypeMapper"> <mapper namespace="com.ruoyi.materialType.mapper.CMaterialTypeMapper">
<resultMap type="c_mtype" id="CMaterialTypeResult"> <resultMap type="CMaterialType" id="CMaterialTypeResult">
<result property="typeId" column="type_id" /> <result property="typeId" column="type_id" />
<result property="typeNo" column="type_no" /> <result property="typeNo" column="type_no" />
<result property="typeName" column="type_name" /> <result property="typeName" column="type_name" />
<result property="factoryId" column="factory_id" />
</resultMap> </resultMap>
<sql id="selectCMaterialTypeVo"> <sql id="selectCMaterialTypeVo">
select type_id, type_no, type_name, factory_id from c_material_type select type_id, type_no, type_name from c_material_type
</sql> </sql>
<select id="selectCMaterialTypeList" parameterType="CMaterialType" resultMap="CMaterialTypeResult"> <select id="selectCMaterialTypeList" parameterType="CMaterialType" resultMap="CMaterialTypeResult">
@ -34,12 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeNo != null and typeNo != ''">type_no,</if> <if test="typeNo != null and typeNo != ''">type_no,</if>
<if test="typeName != null and typeName != ''">type_name,</if> <if test="typeName != null and typeName != ''">type_name,</if>
<if test="factoryId != null">factory_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeNo != null and typeNo != ''">#{typeNo},</if> <if test="typeNo != null and typeNo != ''">#{typeNo},</if>
<if test="typeName != null and typeName != ''">#{typeName},</if> <if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="factoryId != null">#{factoryId},</if>
</trim> </trim>
</insert> </insert>
@ -48,7 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="typeNo != null and typeNo != ''">type_no = #{typeNo},</if> <if test="typeNo != null and typeNo != ''">type_no = #{typeNo},</if>
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if> <if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="factoryId != null">factory_id = #{factoryId},</if>
</trim> </trim>
where type_id = #{typeId} where type_id = #{typeId}
</update> </update>

View File

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 若依管理系统 VUE_APP_TITLE = 江南业务系统
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 江南业务系统/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
# 路由懒加载 # 路由懒加载

View File

@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 若依管理系统 VUE_APP_TITLE = 江南业务系统
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# 若依管理系统/生产环境 # 江南业务系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'

View File

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 若依管理系统 VUE_APP_TITLE = 江南业务系统
NODE_ENV = production NODE_ENV = production
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# 若依管理系统/测试环境 # 江南业务系统/测试环境
VUE_APP_BASE_API = '/stage-api' VUE_APP_BASE_API = '/stage-api'

View File

@ -1,8 +1,8 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "3.8.7", "version": "3.8.7",
"description": "若依管理系统", "description": "江南业务系统",
"author": "若依", "author": "江南集团",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",

View File

@ -9,13 +9,13 @@
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom"> <!--<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" /> <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom"> <el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" /> <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip> </el-tooltip>-->
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />

View File

@ -111,7 +111,7 @@
<el-input v-model="form.materialNo" placeholder="请输入编码" :disabled="isDis"/> <el-input v-model="form.materialNo" placeholder="请输入编码" :disabled="isDis"/>
</el-form-item> </el-form-item>
<el-form-item label="名称" prop="materialName"> <el-form-item label="名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入名称" :disabled="isDis" /> <el-input v-model="form.materialName" placeholder="请输入名称"/>
</el-form-item> </el-form-item>
<el-form-item label="单价" prop="materialPrice"> <el-form-item label="单价" prop="materialPrice">
<el-input v-model="form.materialPrice" placeholder="请输入单价" /> <el-input v-model="form.materialPrice" placeholder="请输入单价" />

View File

@ -182,7 +182,7 @@
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteCMaterialType">删除</el-button> <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteCMaterialType">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="cMaterialTypeList" width="100%" :row-class-name="rowCMaterialTypeIndex" @selection-change="handleCMaterialTypeSelectionChange" ref="cMaterialType"> <el-table :data="cmaterialTypeList" width="100%" :row-class-name="rowCMaterialTypeIndex" @selection-change="handleCMaterialTypeSelectionChange" ref="cMaterialType">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" width="50" align="center" prop="index"/> <el-table-column label="序号" width="50" align="center" prop="index"/>
<el-table-column label="编码" prop="typeNo"> <el-table-column label="编码" prop="typeNo">
@ -243,7 +243,7 @@ export default {
// //
factoryList: [], factoryList: [],
// //
cMaterialTypeList: [], cmaterialTypeList: [],
cTypeList: [], cTypeList: [],
cTypeMap: {}, cTypeMap: {},
@ -364,7 +364,7 @@ export default {
factoryPjRatio: null, factoryPjRatio: null,
factoryTotalRatio: null factoryTotalRatio: null
}; };
this.cMaterialTypeList = []; this.cmaterialTypeList = [];
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -396,7 +396,7 @@ export default {
const factoryId = row.factoryId || this.ids const factoryId = row.factoryId || this.ids
getFactory(factoryId).then(response => { getFactory(factoryId).then(response => {
this.form = response.data; this.form = response.data;
this.cMaterialTypeList = response.data.cmaterialTypeList; this.cmaterialTypeList = response.data.cmaterialTypeList;
this.open = true; this.open = true;
this.title = "修改车间管理"; this.title = "修改车间管理";
this.isDis = true; this.isDis = true;
@ -406,7 +406,9 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.cMaterialTypeList = this.cMaterialTypeList; this.form.cmaterialTypeList = this.cmaterialTypeList;
console.log(this.form)
if (this.form.factoryId != null) { if (this.form.factoryId != null) {
updateFactory(this.form).then(response => { updateFactory(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -442,16 +444,17 @@ export default {
let obj = {}; let obj = {};
obj.typeNo = ""; obj.typeNo = "";
obj.typeName = ""; obj.typeName = "";
this.cMaterialTypeList.push(obj); this.cmaterialTypeList.push(obj);
}, },
/** 物料类别删除按钮操作 */ /** 物料类别删除按钮操作 */
handleDeleteCMaterialType() { handleDeleteCMaterialType() {
if (this.checkedCMaterialType.length == 0) { if (this.checkedCMaterialType.length == 0) {
this.$modal.msgError("请先选择要删除的物料类别数据"); this.$modal.msgError("请先选择要删除的物料类别数据");
} else { } else {
const cMaterialTypeList = this.cMaterialTypeList; debugger
const cmaterialTypeList = this.cmaterialTypeList;
const checkedCMaterialType = this.checkedCMaterialType; const checkedCMaterialType = this.checkedCMaterialType;
this.cMaterialTypeList = cMaterialTypeList.filter(function(item) { this.cmaterialTypeList = cmaterialTypeList.filter(function(item) {
return checkedCMaterialType.indexOf(item.index) == -1 return checkedCMaterialType.indexOf(item.index) == -1
}); });
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container home"> <div class="app-container home">
<el-row :gutter="20"> <!--<el-row :gutter="20">
<el-col :sm="24" :lg="24"> <el-col :sm="24" :lg="24">
<blockquote class="text-warning" style="font-size: 14px"> <blockquote class="text-warning" style="font-size: 14px">
领取阿里云通用云产品1888优惠券 领取阿里云通用云产品1888优惠券
@ -979,7 +979,7 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>-->
</div> </div>
</template> </template>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3> <h3 class="title">江南业务管理系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
@ -56,7 +56,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span> <span>Copyright © 2024 无锡江南电缆有限公司 All rights reserved.</span>
</div> </div>
</div> </div>
</template> </template>

View File

@ -125,7 +125,7 @@
v-for="item in cTypeList" v-for="item in cTypeList"
:key="item.typeId" :key="item.typeId"
:label="item.typeName" :label="item.typeName"
:value="item.typeId" :value="item.typeNo"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -167,7 +167,7 @@
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteCMaterialCost">删除</el-button> <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteCMaterialCost">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="cmaterialCostList" height="350" width="100%" :row-class-name="rowCMaterialCostIndex" @selection-change="handleCMaterialCostSelectionChange" ref="cMaterialCost" :show-summary="showSum" :summary-method="tableHJ"> <el-table :data="cMaterialCostList" height="350" width="100%" :row-class-name="rowCMaterialCostIndex" @selection-change="handleCMaterialCostSelectionChange" ref="cMaterialCost" :show-summary="showSum" :summary-method="tableHJ">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="关联用料" width="300" prop="costClId"> <el-table-column label="关联用料" width="300" prop="costClId">
@ -248,7 +248,7 @@ export default {
// //
materialList: [], materialList: [],
// //
cmaterialCostList: [], cMaterialCostList: [],
// //
cTypeList: [], cTypeList: [],
// //
@ -350,7 +350,7 @@ export default {
materialDiany: null, materialDiany: null,
materialDw: null materialDw: null
}; };
this.cmaterialCostList = []; this.cMaterialCostList = [];
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -381,7 +381,7 @@ export default {
const materialId = row.materialId || this.ids const materialId = row.materialId || this.ids
getMaterial(materialId).then(response => { getMaterial(materialId).then(response => {
this.form = response.data; this.form = response.data;
this.cmaterialCostList = response.data.cmaterialCostList; this.cMaterialCostList = response.data.cmaterialCostList;
this.open = true; this.open = true;
this.title = "修改物料管理"; this.title = "修改物料管理";
this.sumPriceTotal() this.sumPriceTotal()
@ -391,7 +391,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.cmaterialCostList = this.cMaterialCostList; this.form.cMaterialCostList = this.cMaterialCostList;
if (this.form.materialId != null) { if (this.form.materialId != null) {
updateMaterial(this.form).then(response => { updateMaterial(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -429,16 +429,16 @@ export default {
obj.costClQty = ""; obj.costClQty = "";
obj.costClQty2 = ""; obj.costClQty2 = "";
obj.materialPrice = ""; obj.materialPrice = "";
this.cmaterialCostList.push(obj); this.cMaterialCostList.push(obj);
}, },
/** 物料成本删除按钮操作 */ /** 物料成本删除按钮操作 */
handleDeleteCMaterialCost() { handleDeleteCMaterialCost() {
if (this.checkedCMaterialCost.length == 0) { if (this.checkedCMaterialCost.length == 0) {
this.$modal.msgError("请先选择要删除的物料成本数据"); this.$modal.msgError("请先选择要删除的物料成本数据");
} else { } else {
const cmaterialCostList = this.cmaterialCostList; const cMaterialCostList = this.cMaterialCostList;
const checkedCMaterialCost = this.checkedCMaterialCost; const checkedCMaterialCost = this.checkedCMaterialCost;
this.cmaterialCostList = cmaterialCostList.filter(function(item) { this.cMaterialCostList = cMaterialCostList.filter(function(item) {
return checkedCMaterialCost.indexOf(item.index) == -1 return checkedCMaterialCost.indexOf(item.index) == -1
}); });
} }
@ -460,7 +460,7 @@ export default {
// //
sumPriceTotal(){ sumPriceTotal(){
this.cmaterialCostList.forEach((row, index) => { this.cMaterialCostList.forEach((row, index) => {
this.wat(index) this.wat(index)
}) })
}, },
@ -468,7 +468,7 @@ export default {
// //
wat(index){ wat(index){
this.showSum = false; this.showSum = false;
let tmpObj = this.cmaterialCostList[index]; let tmpObj = this.cMaterialCostList[index];
var costClQty = tmpObj.costClQty?tmpObj.costClQty:0; var costClQty = tmpObj.costClQty?tmpObj.costClQty:0;
var costClQty2 = tmpObj.costClQty2?tmpObj.costClQty2:0; var costClQty2 = tmpObj.costClQty2?tmpObj.costClQty2:0;
var qty = numAdd(costClQty,costClQty2); var qty = numAdd(costClQty,costClQty2);

View File

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin') const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 const name = process.env.VUE_APP_TITLE || '江南业务系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 3335 // 端口 const port = process.env.port || process.env.npm_config_port || 3335 // 端口