编码添加和加工修改

jg-waiwang-pro
XI_TENG\xixi_ 3 months ago
parent c35bbeed34
commit 1c25f3c4b0

@ -157,6 +157,72 @@
</if> </if>
</select> </select>
<select id="getProductWorkList" resultMap="getProductWarehouseMap">
SELECT
a.*,
a.id AS productId,
CASE
inventory_type
WHEN 1 THEN
'原材料'
WHEN 2 THEN
'半成品'
WHEN 3 THEN
'产成品'
END AS inventoryTypes,
CASE
product_type_id
WHEN 1 THEN
'实物商品'
WHEN 2 THEN
'虚拟商品'
WHEN 3 THEN
'设备/器材'
WHEN 4 THEN
'耗材/辅材'
END AS productTypeIds,
CASE
product_type_id
WHEN 1 THEN
'实物商品'
WHEN 2 THEN
'虚拟商品'
WHEN 3 THEN
'设备/器材'
WHEN 4 THEN
'耗材/辅材'
END AS productTypeId,
IF
(
many_unit_flag = 1,
JgFnUnitArrName ( order_main_unit_id ),
JgFnUnitArrName ( order_main_unit_id )) AS orderMainUnitIds,
order_main_unit_id AS orderMainUnitId,
purchase_order_quantity_down as purchaseOrderQuantityDowns,
purchase_order_quantity_upper as purchaseOrderQuantityUppers,
purchase_order_multiple as purchaseOrderMultiples,
IF
(
many_unit_flag = 1,
JgFnUnitArrName ( sales_main_unit_id ),
JgFnUnitArrName ( sales_main_unit_id )) AS salesMainUnitIds,
sales_order_quantity_down as salesOrderQuantityDowns,
sales_order_quantity_upper as salesOrderQuantityUppers,
sales_order_multiple as salesOrderMultiples,
JgFnUnitName ( inventory_unit_id ) AS inventoryUnitIds,
JgFnUnitName ( inventory_unit_id ) AS unitId,
JgFnUnitName ( operate_unit_id ) AS operateUnitIds,
operate_unit_id AS operateUnitId
FROM
jg_product a
${ew.customSqlSegment}
</select>
<select id="getProductByVoucher" resultMap="getProductWarehouseMap"> <select id="getProductByVoucher" resultMap="getProductWarehouseMap">
SELECT SELECT
*, *,

@ -2,9 +2,11 @@ package jnpf.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.entity.BomEntity; import jnpf.entity.BomEntity;
import jnpf.entity.BusinessOrderEntity;
import jnpf.entity.ProductWarehouseEntity; import jnpf.entity.ProductWarehouseEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.bom.BomPagination; import jnpf.model.bom.BomPagination;
@ -35,4 +37,7 @@ public interface ProductWarehouseMapper extends BaseMapper<ProductWarehouseEntit
//盘点单根据库存盘点查询商品 //盘点单根据库存盘点查询商品
IPage<ProductWarehouseEntity> queryProductInventoryList(@Param("page") Page<ProductWarehouseEntity> page, @Param("productWarehousePagination") ProductWarehousePagination productWarehousePagination, @Param("ew") Wrapper<ProductWarehouseEntity> productWarehouseQueryWrapper); IPage<ProductWarehouseEntity> queryProductInventoryList(@Param("page") Page<ProductWarehouseEntity> page, @Param("productWarehousePagination") ProductWarehousePagination productWarehousePagination, @Param("ew") Wrapper<ProductWarehouseEntity> productWarehouseQueryWrapper);
List<ProductWarehouseEntity> getProductWorkList(@Param("ew") QueryWrapper<ProductWarehouseEntity> queryWrapper);
} }

@ -58,4 +58,8 @@ public interface ProductWarehouseService extends IService<ProductWarehouseEntity
List<ProductWarehouseEntity> getProductInventoryList(ProductWarehousePagination productWarehousePagination); List<ProductWarehouseEntity> getProductInventoryList(ProductWarehousePagination productWarehousePagination);
List<ProductWarehouseEntity> getProductInventoryTypeList(ProductWarehousePagination productWarehousePagination,String dataType); List<ProductWarehouseEntity> getProductInventoryTypeList(ProductWarehousePagination productWarehousePagination,String dataType);
//加工成品查询
List<ProductWarehouseEntity> getWorkProductList(QueryWrapper<ProductWarehouseEntity> queryWrapper);
} }

@ -1476,4 +1476,9 @@ public class ProductWarehouseServiceImpl extends ServiceImpl<ProductWarehouseMap
return this.list(productWarehouseQueryWrapper); return this.list(productWarehouseQueryWrapper);
} }
} }
@Override
public List<ProductWarehouseEntity> getWorkProductList(QueryWrapper<ProductWarehouseEntity> queryWrapper) {
return productWarehouseMapper.getProductWorkList(queryWrapper);
}
} }

@ -1,13 +1,17 @@
package jnpf.controller; package jnpf.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*; import jnpf.service.*;
import jnpf.entity.*; import jnpf.entity.*;
import jnpf.util.*; import jnpf.util.*;
@ -56,6 +60,8 @@ public class ProductWarehouseController {
@Autowired @Autowired
private ProductBusinessService productBusinessService; private ProductBusinessService productBusinessService;
@Autowired
private OrganizeService organizeService;
/** /**
* *
@ -183,10 +189,27 @@ public class ProductWarehouseController {
@Operation(summary = "加工获取商品列表") @Operation(summary = "加工获取商品列表")
@GetMapping("/getBomProductlists1") @GetMapping("/getBomProductlists1")
public ActionResult bomProductlists1()throws IOException{ public ActionResult bomProductlists1()throws IOException{
ProductWarehousePagination productWarehousePagination=new ProductWarehousePagination(); // ProductWarehousePagination productWarehousePagination=new ProductWarehousePagination();
productWarehousePagination.setDataType("0"); // productWarehousePagination.setDataType("0");
productWarehousePagination.setMenuId("522017337285542021"); // productWarehousePagination.setMenuId("522017337285542021");
List<ProductWarehouseEntity> list= productWarehouseService.getProductList(productWarehousePagination); // List<ProductWarehouseEntity> list= productWarehouseService.getProductList(productWarehousePagination);
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
QueryWrapper<ProductWarehouseEntity> productWarehouseQueryWrapper=new QueryWrapper<>();
productWarehouseQueryWrapper.isNull("a.f_delete_mark");
productWarehouseQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
productWarehouseQueryWrapper.like("a.organize_json_id",organize);
List<ProductWarehouseEntity> list=productWarehouseService.getWorkProductList(productWarehouseQueryWrapper);
List<Map<String, Object>> realList=new ArrayList<>(); List<Map<String, Object>> realList=new ArrayList<>();
for (ProductWarehouseEntity entity : list) { for (ProductWarehouseEntity entity : list) {
// entity.setInventoryType(entity.getInventoryTypes()); // entity.setInventoryType(entity.getInventoryTypes());
@ -194,7 +217,7 @@ public class ProductWarehouseController {
entity.setProductTypeId(entity.getProductTypeIds()); entity.setProductTypeId(entity.getProductTypeIds());
entity.setInventoryUnitId(entity.getInventoryUnitIds()); entity.setInventoryUnitId(entity.getInventoryUnitIds());
entity.setProportionNum("0"); entity.setProportionNum("0");
entity.setBatchNumber("JG24000PZ"); // entity.setBatchNumber("JG24000PZ");
Map<String, Object> productWarehouseMap=JsonUtil.entityToMap(entity); Map<String, Object> productWarehouseMap=JsonUtil.entityToMap(entity);
productWarehouseMap.put("id", productWarehouseMap.get("id")); productWarehouseMap.put("id", productWarehouseMap.get("id"));
//副表数据 //副表数据
@ -209,10 +232,10 @@ public class ProductWarehouseController {
realList.add(productWarehouseMap); realList.add(productWarehouseMap);
} }
//返回对象 //返回对象
PageListVO vo = new PageListVO(); // PageListVO vo = new PageListVO();
vo.setList(realList); // vo.setList(realList);
PaginationVO page = JsonUtil.getJsonToBean(productWarehousePagination, PaginationVO.class); // PaginationVO page = JsonUtil.getJsonToBean(productWarehousePagination, PaginationVO.class);
vo.setPagination(page); // vo.setPagination(page);
return ActionResult.success(list); return ActionResult.success(list);
} }

@ -58,6 +58,9 @@ public class BomItemEntity {
@TableField(value = "SALES_MAIN_UNIT_IDS" , updateStrategy = FieldStrategy.IGNORED) @TableField(value = "SALES_MAIN_UNIT_IDS" , updateStrategy = FieldStrategy.IGNORED)
private String salesMainUnitIds; private String salesMainUnitIds;
@TableField(exist = false)
private String A;
/** 编码 **/
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
} }

@ -64,4 +64,8 @@ public class BomItemValueEntity {
/** 投入/副产品 **/ /** 投入/副产品 **/
@TableField(value = "IS_INPUT" , updateStrategy = FieldStrategy.IGNORED) @TableField(value = "IS_INPUT" , updateStrategy = FieldStrategy.IGNORED)
private String isInput; private String isInput;
/** 编码 **/
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
} }

@ -46,4 +46,8 @@ public class BomItemModel {
/** 销售单位 **/ /** 销售单位 **/
@JSONField(name = "salesMainUnitIds") @JSONField(name = "salesMainUnitIds")
private String salesMainUnitIds; private String salesMainUnitIds;
/** code **/
@JSONField(name = "code")
private String code;
} }

@ -57,4 +57,8 @@ public class BomItemValueModel {
/** 投入/副产品 **/ /** 投入/副产品 **/
@JSONField(name = "isInput") @JSONField(name = "isInput")
private String isInput; private String isInput;
/** code **/
@JSONField(name = "code")
private String code;
} }

@ -86,4 +86,6 @@ public class BusinessOrderPagination extends Pagination {
/** 合同编码 */ /** 合同编码 */
@JsonProperty("contractNumber") @JsonProperty("contractNumber")
private String contractNumber; private String contractNumber;
} }

@ -48,6 +48,21 @@
</div> </div>
<el-table :data="dataForm.bomItemList" size='mini' border> <el-table :data="dataForm.bomItemList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" /> <el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="物料编码" v-if="judgeShow('bomitem-creatorTime')" align="center"
prop="code">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('bomitemList-creatorTime')">*</span>物料编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('bomitem-creatorTime', scope.$index)" placeholder="请输入"
disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="judgeShow('bomitem-productId')" align="center" <el-table-column label="商品名称" v-if="judgeShow('bomitem-productId')" align="center"
fixed="left" prop="productId"> fixed="left" prop="productId">
<template slot="header"> <template slot="header">
@ -149,6 +164,21 @@
</div> </div>
<el-table :data="dataForm.bomItemValueList" size='mini' border=""> <el-table :data="dataForm.bomItemValueList" size='mini' border="">
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" /> <el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="物料编码" v-if="judgeShow('bomitemvalue-creatorUserId')"
align="center" prop="code">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('bomitemvalueList-creatorUserId')">*</span>物料编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('bomitemvalue-creatorUserId', scope.$index)"
placeholder="请输入" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="judgeShow('bomitemvalue-productId')" <el-table-column label="商品名称" v-if="judgeShow('bomitemvalue-productId')"
align="center" fixed="left" prop="productId"> align="center" fixed="left" prop="productId">
<template slot="header"> <template slot="header">
@ -668,6 +698,7 @@ export default {
productId: list.id, productId: list.id,
name: list.name, name: list.name,
spec: list.spec, spec: list.spec,
code: list.code,
inventoryType: list.inventoryType, inventoryType: list.inventoryType,
inventoryTypes: list.inventoryTypes, inventoryTypes: list.inventoryTypes,
inventoryUnitIds: list.inventoryUnitIds, inventoryUnitIds: list.inventoryUnitIds,
@ -703,6 +734,7 @@ export default {
productId: e.id, productId: e.id,
name: e.name, name: e.name,
spec: e.spec, spec: e.spec,
code: e.code,
inventoryType: e.inventoryType, inventoryType: e.inventoryType,
inventoryTypes: e.inventoryTypes, inventoryTypes: e.inventoryTypes,
inventoryUnitIds: e.inventoryUnitIds, inventoryUnitIds: e.inventoryUnitIds,

@ -30,6 +30,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="对方合同号">
<el-input v-model="query.contractNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="订单重量"> <el-form-item label="订单重量">
<el-input v-model="query.businessNum" placeholder="请输入" clearable> </el-input> <el-input v-model="query.businessNum" placeholder="请输入" clearable> </el-input>
@ -334,6 +340,7 @@ export default {
status: undefined, status: undefined,
businessType: "1", businessType: "1",
contractNumber: undefined, contractNumber: undefined,
contractNo: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',

@ -143,9 +143,9 @@
<jnpf-form-tip-item label="成品商品" v-if="judgeShow('productId')" prop="productId"> <jnpf-form-tip-item label="成品商品" v-if="judgeShow('productId')" prop="productId">
<JnpfPopupSelect v-model="dataForm.productId" @change="changeData1" :rowIndex="null" <JnpfPopupSelect v-model="dataForm.productId" @change="changeData1" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.productId" placeholder="请选择" :formData="dataForm" :templateJson="interfaceRes.productId" placeholder="请选择"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' field='productId' interfaceId="549582756464582469" relationField='name' field='productId' interfaceId="549582756464582469"
:pageSize="20" :columnOptions="productIdcolumnOptions" clearable :pageSize="20" :hasPage="true" :columnOptions="productIdcolumnOptions" clearable
:disabled="judgeWrite('productId')" :style='{"width":"100%"}'> :disabled="judgeWrite('productId')" :style='{"width":"100%"}'>
</JnpfPopupSelect> </JnpfPopupSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
@ -222,6 +222,20 @@
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="code" width="200px" align="center">
<template slot="header">
<span class="required-sign">*</span>编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" prop="inventoryUnitId" width="150px" align="center"> <el-table-column label="库存单位" prop="inventoryUnitId" width="150px" align="center">
<template slot="header"> <template slot="header">
<span class="required-sign">*</span>库存单位 <span class="required-sign">*</span>库存单位
@ -316,68 +330,61 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.cost" <JnpfInput v-model="scope.row.cost" @change="changeData('workorderproduct-cost', scope.$index)"
@change="changeData('workorderproduct-cost', scope.$index)" placeholder="请输入" placeholder="请输入"
:disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cost')" :disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cost')"
clearable :style='{ "width": "100%" }'> clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('workorderproduct-cargoId')" <el-table-column label="货区名称" v-if="judgeShow('workorderproduct-cargoId')"
align="center" prop="cargoId" width="180px"> align="center" prop="cargoId" width="180px">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderproductList-cargoId')">*</span>
v-if="judgeRequired('workorderproductList-cargoId')">*</span>货区名称 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.cargoId" <JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('workorderproduct-cargoId', scope.$index)" @change="changeData('workorderproduct-cargoId', scope.$index)" :rowIndex="scope.$index"
:rowIndex="scope.$index" :formData="dataForm" :formData="dataForm" :templateJson="interfaceRes.workorderproductcargoId" placeholder="请选择"
:templateJson="interfaceRes.workorderproductcargoId" placeholder="请选择" hasPage hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='cargo_name' :field="'cargoId' + scope.$index" relationField='cargo_name' :field="'cargoId' + scope.$index"
:disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cargoId')" :disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cargoId')"
interfaceId="530700536261903749" :pageSize="20" interfaceId="530700536261903749" :pageSize="20"
:columnOptions="workorderproductcargoIdcolumnOptions" clearable :columnOptions="workorderproductcargoIdcolumnOptions" clearable :style='{ "width": "100%" }'>
:style='{ "width": "100%" }'>
</JnpfPopupSelect> </JnpfPopupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成品批次号" v-if="judgeShow('workorderproduct-batchNumber')" <el-table-column label="成品批次号" v-if="judgeShow('workorderproduct-batchNumber')"
width="180px" prop="batchNumber"> width="180px" prop="batchNumber">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderproductList-batchNumber')">*</span>
v-if="judgeRequired('workorderproductList-batchNumber')">*</span>成品批次号 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNumber" <JnpfInput v-model="scope.row.batchNumber"
@change="changeData('workorderproduct-cost', scope.$index)" placeholder="请输入" @change="changeData('workorderproduct-cost', scope.$index)" placeholder="请输入" :disabled="true"
:disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cost')"
clearable :style='{ "width": "100%" }'> clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" v-if="judgeShow('workorderproduct-remark')" <el-table-column label="备注" v-if="judgeShow('workorderproduct-remark')"
align="center" prop="remark" width="200px"> align="center" prop="remark" width="200px">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderproductList-remark')">*</span>
v-if="judgeRequired('workorderproductList-remark')">*</span>备注 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.remark" <JnpfInput v-model="scope.row.remark"
@change="changeData('workorderproduct-remark', scope.$index)" @change="changeData('workorderproduct-remark', scope.$index)" placeholder="请输入"
placeholder="请输入"
:disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-remark')" :disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-remark')"
clearable :style='{ "width": "100%" }'> clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="50" v-if="!judgeWrite('workorderproductList')" <el-table-column label="操作" width="50" v-if="!judgeWrite('workorderproductList')"
align="center"> align="center">
@ -385,7 +392,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delworkorderproductList(scope.$index)">删除</el-button> @click="delworkorderproductList(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -448,6 +455,20 @@
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="spec" width="200px" align="center">
<template slot="header">
<span class="required-sign">*</span>编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" prop="inventoryUnitId" width="150px" align="center"> <el-table-column label="库存单位" prop="inventoryUnitId" width="150px" align="center">
<template slot="header"> <template slot="header">
<span class="required-sign">*</span>库存单位 <span class="required-sign">*</span>库存单位
@ -553,7 +574,7 @@
<JnpfInput v-model="scope.row.batchNumber" <JnpfInput v-model="scope.row.batchNumber"
@change="changeData('workorderproduct-cost', scope.$index)" @change="changeData('workorderproduct-cost', scope.$index)"
placeholder="请输入" placeholder="请输入"
:disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cost')" :disabled="true"
clearable :style='{ "width": "100%" }'> clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
@ -604,70 +625,81 @@
width="200px" align="center" fixed="left" prop="productId"> width="200px" align="center" fixed="left" prop="productId">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderprimaryList-productId')">*</span>
v-if="judgeRequired('workorderprimaryList-productId')">*</span>原料商品名称 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="changePrimaryList" <JnpfPopupSelect v-model="scope.row.productId" @change="changePrimaryList"
:rowIndex="scope.$index" :formData="dataForm" :rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.workorderprimaryproductId" placeholder="请选择" :templateJson="interfaceRes.workorderprimaryproductId" placeholder="请选择" disabled hasPage
disabled hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
popupType="dialog" relationField='name' :field="'productId' + scope.$index" :field="'productId' + scope.$index" interfaceId="519505017699307077" :pageSize="20"
interfaceId="519505017699307077" :pageSize="20" :columnOptions="workorderprimaryproductIdcolumnOptions" clearable :style='{ "width": "100%" }'>
:columnOptions="workorderprimaryproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect> </JnpfPopupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="存货类型" prop="productTypeId" align="center"> <el-table-column label="存货类型" prop="productTypeId" align="center">
<template slot="header"> <template slot="header">
<span class="required-sign">*</span>存货类型 <span class="required-sign">*</span>存货类型
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.productTypeId" placeholder="请输入" disabled <JnpfInput v-model="scope.row.productTypeId" placeholder="请输入" disabled clearable
clearable :style='{ "width": "100%" }'> :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="spec" align="center"> <el-table-column label="规格" prop="spec" align="center">
<template slot="header"> <template slot="header">
<span class="required-sign">*</span>规格 <span class="required-sign">*</span>规格
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.spec" placeholder="请输入" disabled clearable <JnpfInput v-model="scope.row.spec" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'> :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="spec" width="200px" align="center">
<template slot="header">
<span class="required-sign">*</span>编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" prop="inventoryUnitId" align="center"> <el-table-column label="库存单位" prop="inventoryUnitId" align="center">
<template slot="header"> <template slot="header">
<span class="required-sign">*</span>库存单位 <span class="required-sign">*</span>库存单位
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId" placeholder="请输入" disabled <JnpfInput v-model="scope.row.inventoryUnitId" placeholder="请输入" disabled clearable
clearable :style='{ "width": "100%" }'> :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="条码" prop="deleteUserId" width="300px" align="center"> <el-table-column label="条码" prop="deleteUserId" width="300px" align="center">
<template slot="header"> <template slot="header">
<span class="required-sign">*</span>条码 <span class="required-sign">*</span>条码
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.barCode" placeholder="请输入" disabled clearable <JnpfInput v-model="scope.row.barCode" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'> :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="理论发料量(计算前)" v-if="judgeShow('workorderprimary-theoryNum')" <el-table-column label="理论发料量(计算前)" v-if="judgeShow('workorderprimary-theoryNum')"
@ -675,13 +707,13 @@
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign"
v-if="judgeRequired(' workorderprimaryList-theoryNum')">*</span>理论发料量(计算前) v-if="judgeRequired(' workorderprimaryList-theoryNum')">*</span>理论发料量(计算前)
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.theoryNum" disabled <JnpfInput v-model="scope.row.theoryNum" disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)" @change="changeData('workorderprimary-theoryNum', scope.$index)" placeholder="请输入" clearable
placeholder="请输入" clearable :style='{ "width": "100%" }'> :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="理论发料量(计算后)" v-if="judgeShow('workorderprimary-itemsnum')" <el-table-column label="理论发料量(计算后)" v-if="judgeShow('workorderprimary-itemsnum')"
@ -689,49 +721,46 @@
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign"
v-if="judgeRequired('workorderprimaryList-itemsnum')">*</span>理论发料量(计算后) v-if="judgeRequired('workorderprimaryList-itemsnum')">*</span>理论发料量(计算后)
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.itemsnum" <JnpfInput v-model="scope.row.itemsnum" v-if="dataForm.workOrderProductList[0].planNum !=''"
v-if="dataForm.workOrderProductList[0].planNum !=''" disabled disabled @change="changeData('workorderprimary-theoryNum', scope.$index)"
@change="changeData('workorderprimary-theoryNum', scope.$index)"
placeholder="请输入计划加工数量" clearable :style='{ "width": "100%" }'> placeholder="请输入计划加工数量" clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
<JnpfInput v-model="scope.row.theoryNum" v-else disabled <JnpfInput v-model="scope.row.theoryNum" v-else disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)" @change="changeData('workorderprimary-theoryNum', scope.$index)" placeholder="请输入计划加工数量"
placeholder="请输入计划加工数量" clearable :style='{ "width": "100%" }'> clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际发料量" v-if="judgeShow('workorderprimary-realityNum')" <el-table-column label="实际发料量" v-if="judgeShow('workorderprimary-realityNum')"
align="center" prop="realityNum" width="200px"> align="center" prop="realityNum" width="200px">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderprimaryList-realityNum')">*</span>
v-if="judgeRequired('workorderprimaryList-realityNum')">*</span>实际发料量 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.realityNum" <JnpfInput v-model="scope.row.realityNum"
@change="changeData('workorderprimary-realityNum', scope.$index)" @change="changeData('workorderprimary-realityNum', scope.$index)"
:disabled="judgeWrite('workorderprimaryList') || judgeWrite('workorderprimaryList-realityNum')" :disabled="judgeWrite('workorderprimaryList') || judgeWrite('workorderprimaryList-realityNum')"
placeholder="请输入1" clearable :style='{ "width": "100%" }'> placeholder="请输入1" clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="原料返库数量" v-if="judgeShow('workorderprimary-returnNum')" <el-table-column label="原料返库数量" v-if="judgeShow('workorderprimary-returnNum')"
align="center" prop="returnNum" width="200px"> align="center" prop="returnNum" width="200px">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderprimaryList-returnNum')">*</span>
v-if="judgeRequired('workorderprimaryList-returnNum')">*</span>原料返库数量 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.returnNum" <JnpfInput v-model="scope.row.returnNum"
@change="changeData('workorderprimary-returnNum', scope.$index)" @change="changeData('workorderprimary-returnNum', scope.$index)"
:disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-returnNum')" :disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-returnNum')"
placeholder="请输入" clearable :style='{ "width": "100%" }'> placeholder="请输入" clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="原料报损数量" v-if="judgeShow('workorderprimary-reportlossNum')" <el-table-column label="原料报损数量" v-if="judgeShow('workorderprimary-reportlossNum')"
@ -739,56 +768,49 @@
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign"
v-if="judgeRequired('workorderprimaryList-reportlossNum')">*</span>原料报损数量 v-if="judgeRequired('workorderprimaryList-reportlossNum')">*</span>原料报损数量
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.reportlossNum" <JnpfInput v-model="scope.row.reportlossNum"
@change="changeData('workorderprimary-reportlossNum', scope.$index)" @change="changeData('workorderprimary-reportlossNum', scope.$index)"
:disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-reportlossNum')" :disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-reportlossNum')"
placeholder="请输入" clearable :style='{ "width": "100%" }'> placeholder="请输入" clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('workorderprimary-cargoId')" <el-table-column label="货区名称" v-if="judgeShow('workorderprimary-cargoId')"
align="center" prop="cargoId" width="180px"> align="center" prop="cargoId" width="180px">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderprimaryList-cargoId')">*</span>
v-if="judgeRequired('workorderprimaryList-cargoId')">*</span>货区名称 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.cargoId" <JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('workorderprimary-cargoId', scope.$index)" @change="changeData('workorderprimary-cargoId', scope.$index)" :rowIndex="scope.$index"
:rowIndex="scope.$index" :formData="dataForm" :formData="dataForm" :templateJson="interfaceRes.workorderprimarycargoId" placeholder="请选择"
:templateJson="interfaceRes.workorderprimarycargoId" placeholder="请选择" hasPage hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='cargo_name' :field="'cargoId' + scope.$index" relationField='cargo_name' :field="'cargoId' + scope.$index"
:disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-cargoId')" :disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-cargoId')"
interfaceId="530700536261903749" :pageSize="20" interfaceId="530700536261903749" :pageSize="20"
:columnOptions="workorderprimarycargoIdcolumnOptions" clearable :columnOptions="workorderprimarycargoIdcolumnOptions" clearable :style='{ "width": "100%" }'>
:style='{ "width": "100%" }'>
</JnpfPopupSelect> </JnpfPopupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次号" v-if="judgeShow('workorderprimary-batchNumber')" <el-table-column label="批次号" v-if="judgeShow('workorderprimary-batchNumber')"
width="180px" prop="batchNumber"> width="180px" prop="batchNumber">
<template slot="header"> <template slot="header">
<span class="required-sign" <span class="required-sign" v-if="judgeRequired('workorderprimaryList-batchNumber')">*</span>
v-if="judgeRequired('workorderprimaryList-batchNumber')">*</span>批次号 </template>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.batchNumber" <JnpfPopupSelect v-model="scope.row.batchNumber"
@change="changeData('workorderprimary-batchNumber',scope.$index)" @change="changeData('workorderprimary-batchNumber',scope.$index)" :rowIndex="scope.$index"
:rowIndex="scope.$index" :formData="dataForm" :formData="dataForm" :templateJson="interfaceRes.workorderprimarybatchNumber" placeholder="请选择"
:templateJson="interfaceRes.workorderprimarybatchNumber" placeholder="请选择" hasPage propsValue="batchNumber" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
hasPage propsValue="batchNumber" popupWidth="800px" popupTitle="选择数据" relationField='batchNumber' :disabled="true" :field="'batchNumber'+scope.$index"
popupType="dialog" relationField='batchNumber' interfaceId="550272582679552965" :pageSize="20"
:disabled="judgeWrite('workorderprimaryList')||judgeWrite('workorderprimaryList-batchNumber')" :columnOptions="workorderprimarybatchNumbercolumnOptions" clearable :style='{"width":"100%"}'>
:field="'batchNumber'+scope.$index" interfaceId="550272582679552965"
:pageSize="20" :columnOptions="workorderprimarybatchNumbercolumnOptions"
clearable :style='{"width":"100%"}'>
</JnpfPopupSelect> </JnpfPopupSelect>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="批次号选择" v-if="judgeShow('workorderprimary-batchNumber')" <!-- <el-table-column label="批次号选择" v-if="judgeShow('workorderprimary-batchNumber')"
@ -818,7 +840,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delworkorderprimaryList(scope.$index)">删除</el-button> @click="delworkorderprimaryList(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -1003,13 +1025,7 @@ export default {
trigger: 'change' trigger: 'change'
}, },
], ],
teamId: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
productId: [ productId: [
{ {
required: true, required: true,
@ -1042,7 +1058,7 @@ export default {
teamIdcolumnOptions: [{ "label": "班组编码", "value": "team_code" }, { "label": "班组名称", "value": "team_name" },], teamIdcolumnOptions: [{ "label": "班组编码", "value": "team_code" }, { "label": "班组名称", "value": "team_name" },],
warehouseIdcolumnOptions: [{ "label": "仓库名称", "value": "name" }, { "label": "仓库编码", "value": "code" },], warehouseIdcolumnOptions: [{ "label": "仓库名称", "value": "name" }, { "label": "仓库编码", "value": "code" },],
productIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品规格", "value": "spec" }, { "label": "库存单位", "value": "inventoryUnitId" }, productIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品规格", "value": "spec" }, { "label": "库存单位", "value": "inventoryUnitId" },
{ "label": "商品简称", "value": "shortName" }, { "label": "商品条码", "value": "barCode" }], { "label": "商品简称", "value": "shortName" }, { "label": "商品编码", "value": "code" }],
workorderproductproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },], workorderproductproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },],
workorderproductunitIdcolumnOptions: [{ "label": "单位名称", "value": "unit_name" },], workorderproductunitIdcolumnOptions: [{ "label": "单位名称", "value": "unit_name" },],
@ -1131,6 +1147,7 @@ export default {
productId: e.productId, productId: e.productId,
productTypeId: e.productTypeId, productTypeId: e.productTypeId,
spec: e.spec, spec: e.spec,
code: e.code,
inventoryUnitId: e.inventoryUnitId, inventoryUnitId: e.inventoryUnitId,
barCode: e.barCode, barCode: e.barCode,
theoryNum: e.theoryNum, theoryNum: e.theoryNum,
@ -1151,19 +1168,19 @@ export default {
productId: e.productId, productId: e.productId,
productTypeId: e.productTypeId, productTypeId: e.productTypeId,
spec: e.spec, spec: e.spec,
code: e.code,
inventoryUnitId: e.inventoryUnitId, inventoryUnitId: e.inventoryUnitId,
realityNum: 0, realityNum: 0,
returnNum: 0, returnNum: 0,
reportlossNum: 0, reportlossNum: 0,
productTypeId: e.productTypeId, productTypeId: e.productTypeId,
spec: e.spec,
inventoryUnitId: e.inventoryUnitId, inventoryUnitId: e.inventoryUnitId,
unitId: e.inventoryUnitId, unitId: e.inventoryUnitId,
barCode: e.barCode, barCode: e.barCode,
theoryNum: e.theoryNum, theoryNum: e.theoryNum,
itemsnum: e.itemsnum, itemsnum: e.itemsnum,
cargoId: e.cargoId, cargoId: e.cargoId,
batchNumber: "PZINPUT001", // batchNumber: "PZINPUT001",
isInput: '2', isInput: '2',
bomId: e.bomId, bomId: e.bomId,
} }
@ -1435,7 +1452,7 @@ export default {
salesMainUnitIds: list.salesMainUnitIds, salesMainUnitIds: list.salesMainUnitIds,
unitId: list.inventoryUnitIds, unitId: list.inventoryUnitIds,
productTypeIds: list.productTypeId, productTypeIds: list.productTypeId,
code: list.code,
spec: list.spec, spec: list.spec,
barCode: list.barCode, barCode: list.barCode,
inventoryUnitId: list.inventoryUnitIds, inventoryUnitId: list.inventoryUnitIds,
@ -1488,6 +1505,7 @@ export default {
productTypeIds: e.productTypeId, productTypeIds: e.productTypeId,
productName: e.name, productName: e.name,
spec: e.spec, spec: e.spec,
code: e.code,
barCode: e.barCode, barCode: e.barCode,
inventoryUnitId: e.inventoryUnitIds, inventoryUnitId: e.inventoryUnitIds,
productTypeId: e.inventoryType, productTypeId: e.inventoryType,

Loading…
Cancel
Save