feat(erp): 新增ERP接口对接功能并优化物料管理服务
- 新增多个ERP接口对接相关的请求和响应实体类 - 移除物料管理服务中冗余的字段设置逻辑 - 优化接收物料、客户和供应商信息的方法实现 - 调整前端页面布局及字段显示以适配新数据结构 - 更新API控制器以支持新的ERP数据同步方式
This commit is contained in:
@@ -21,23 +21,23 @@ public class ToErpApiController {
|
||||
/**
|
||||
* 接收物料信息
|
||||
*/
|
||||
@GetMapping("/receiveMaterial")
|
||||
public AjaxResult receiveMaterial(@RequestBody BasProduct basProduct) {
|
||||
return toErpService.receiveMaterial(basProduct);
|
||||
@GetMapping("/receiveProduct")
|
||||
public AjaxResult receiveProduct() {
|
||||
return toErpService.receiveProduct();
|
||||
}
|
||||
/**
|
||||
* 接收客户信息
|
||||
*/
|
||||
@GetMapping("/receiveCustomer")
|
||||
public AjaxResult receiveCustomer(@RequestBody BasCustomer basProduct) {
|
||||
return toErpService.receiveCustomer(basProduct);
|
||||
public AjaxResult receiveCustomer() {
|
||||
return toErpService.receiveCustomer();
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收供应商信息
|
||||
*/
|
||||
@GetMapping("/receiveSupplier")
|
||||
public AjaxResult receiveSupplier(/*@RequestBody BasSupplier basSupplier*/) {
|
||||
public AjaxResult receiveSupplier() {
|
||||
return toErpService.receiveSupplier();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AspRequestParam {
|
||||
private String session;
|
||||
|
||||
private String cmdkey;
|
||||
|
||||
private List<DataInfo> datas;
|
||||
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class DataInfo{
|
||||
private String id;
|
||||
|
||||
private Object val;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AspResponse {
|
||||
private Body body;
|
||||
}
|
||||
10
ruoyi-admin/src/main/java/com/ruoyi/api/domain/erp/Body.java
Normal file
10
ruoyi-admin/src/main/java/com/ruoyi/api/domain/erp/Body.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Body {
|
||||
private String action;
|
||||
private String model;
|
||||
private Source source;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Col {
|
||||
private String id;
|
||||
private String dbtype;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Field {
|
||||
private String type;
|
||||
private Object source;
|
||||
private String text;
|
||||
private String post;
|
||||
private boolean notnull;
|
||||
private boolean onlyread;
|
||||
private int minl;
|
||||
private int maxl;
|
||||
private boolean edit;
|
||||
private boolean visible;
|
||||
private boolean canset;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Layout {
|
||||
private String uitype;
|
||||
private String action;
|
||||
private String url;
|
||||
private List<Field> fields;
|
||||
private List<Object> buttons;
|
||||
}
|
||||
11
ruoyi-admin/src/main/java/com/ruoyi/api/domain/erp/Page.java
Normal file
11
ruoyi-admin/src/main/java/com/ruoyi/api/domain/erp/Page.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Page {
|
||||
private int recordcount;
|
||||
private int pagesize;
|
||||
private int pagecount;
|
||||
private int pageindex;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Source {
|
||||
private String type;
|
||||
private Table table;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Table {
|
||||
private Layout layout;
|
||||
private Page page;
|
||||
private List<Col> cols;
|
||||
private List<List<String>> rows;
|
||||
}
|
||||
@@ -17,9 +17,9 @@ public interface IToErpService {
|
||||
|
||||
Map<String,String> billCompletedCallBack();
|
||||
|
||||
AjaxResult receiveMaterial(BasProduct basProduct);
|
||||
AjaxResult receiveProduct();
|
||||
|
||||
AjaxResult receiveCustomer(BasCustomer basProduct);
|
||||
AjaxResult receiveCustomer();
|
||||
|
||||
AjaxResult receiveSupplier();
|
||||
|
||||
|
||||
@@ -6,10 +6,7 @@ import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.erp.ErpSupplierParam;
|
||||
import com.ruoyi.api.domain.erp.ErpSupplierResponse;
|
||||
import com.ruoyi.api.domain.erp.LoginParam;
|
||||
import com.ruoyi.api.domain.erp.LoginResponse;
|
||||
import com.ruoyi.api.domain.erp.*;
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
|
||||
@@ -51,6 +48,10 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
|
||||
private static final String loginUrl = erpUrl+"/webapi/v3/ov1/login";
|
||||
private static final String supplierListUrl = erpUrl+"/webapi/v3/store/supplierList";
|
||||
private static final String customerListUrl = erpUrl+"/sysa/mobilephone/salesmanage/custom/list.asp";
|
||||
private static final String productListUrl = erpUrl+"/sysa/mobilephone/salesmanage/product/billlist.asp";
|
||||
|
||||
private static final String TOKEN_KEY = "ZBAPI-Token";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -68,26 +69,80 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveMaterial(BasProduct basProduct) {
|
||||
String productId = basProduct.getProductId();
|
||||
BasProduct oldProduct = basProductService.selectBasProductByProductId(productId);
|
||||
if (ObjUtil.isNotNull(oldProduct)){
|
||||
basProductService.updateBasProduct(basProduct);
|
||||
}else {
|
||||
basProductService.insertBasProduct(basProduct);
|
||||
public AjaxResult receiveProduct() {
|
||||
AspRequestParam erpCustomerParam = new AspRequestParam();
|
||||
erpCustomerParam.setSession(login());
|
||||
erpCustomerParam.setCmdkey("refresh");
|
||||
List<AspRequestParam.DataInfo> dataInfoList = new ArrayList<>();
|
||||
dataInfoList.add(new AspRequestParam.DataInfo("pagesize", 100000));
|
||||
dataInfoList.add(new AspRequestParam.DataInfo("pageindex", 1));
|
||||
dataInfoList.add(new AspRequestParam.DataInfo("idProductClass", "532"));
|
||||
erpCustomerParam.setDatas(dataInfoList);
|
||||
String body = HttpRequest.post(productListUrl).header(TOKEN_KEY, login()).body(JSONUtil.toJsonStr(erpCustomerParam)).execute().body();
|
||||
AspResponse responseBean = JSONUtil.toBean(body, AspResponse.class);
|
||||
for (List<String> row : responseBean.getBody().getSource().getTable().getRows()) {
|
||||
BasProduct product = new BasProduct();
|
||||
product.setProductGuid(row.get(0));
|
||||
product.setProductId(row.get(0));
|
||||
product.setProductName(row.get(1));
|
||||
product.setCargoNo(row.get(2));
|
||||
product.setSpec(row.get(3));
|
||||
product.setUnit(row.get(4));
|
||||
product.setSpare1(row.get(5));
|
||||
product.setPrice(row.get(6));
|
||||
product.setParentId(row.get(7));
|
||||
product.setSpare3(row.get(8));
|
||||
product.setSpare4(row.get(9));
|
||||
product.setSpare5(row.get(10));
|
||||
product.setSpare6(row.get(11));
|
||||
product.setSpare7(row.get(12));
|
||||
BasProduct basProduct = basProductService.selectBasProductByProductId(product.getProductId());
|
||||
if (ObjUtil.isNotNull(basProduct)){
|
||||
BeanUtil.copyProperties(product,basProduct);
|
||||
basProductService.updateBasProduct(basProduct);
|
||||
}else {
|
||||
basProductService.insertBasProduct(product);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveCustomer(BasCustomer basCustomer) {
|
||||
String customerNo = basCustomer.getId();
|
||||
BasCustomer oldCustomer = basCustomerService.selectBasCustomerById(customerNo);
|
||||
if (ObjUtil.isNotNull(oldCustomer)){
|
||||
basCustomerService.updateBasCustomer(basCustomer);
|
||||
}else {
|
||||
basCustomerService.insertBasCustomer(basCustomer);
|
||||
public AjaxResult receiveCustomer() {
|
||||
AspRequestParam erpCustomerParam = new AspRequestParam();
|
||||
erpCustomerParam.setSession(login());
|
||||
erpCustomerParam.setCmdkey("refresh");
|
||||
List<AspRequestParam.DataInfo> dataInfoList = new ArrayList<>();
|
||||
dataInfoList.add(new AspRequestParam.DataInfo("pagesize", 100000));
|
||||
dataInfoList.add(new AspRequestParam.DataInfo("pageindex", 1));
|
||||
erpCustomerParam.setDatas(dataInfoList);
|
||||
|
||||
String body = HttpRequest.post(customerListUrl).header(TOKEN_KEY, login()).body(JSONUtil.toJsonStr(erpCustomerParam)).execute().body();
|
||||
AspResponse responseBean = JSONUtil.toBean(body, AspResponse.class);
|
||||
for (List<String> row : responseBean.getBody().getSource().getTable().getRows()) {
|
||||
BasCustomer customer = new BasCustomer();
|
||||
customer.setCustomerName(Convert.toStr(row.get(0)));
|
||||
customer.setSalesman(Convert.toStr(row.get(1)));
|
||||
customer.setBusinessDepartment(Convert.toStr(row.get(2)));
|
||||
customer.setSupCustomer(Convert.toStr(row.get(3)));
|
||||
customer.setContactName(Convert.toStr(row.get(4)));
|
||||
customer.setMnemonicCode(Convert.toStr(row.get(5)));
|
||||
customer.setType(Convert.toStr(row.get(6)));
|
||||
customer.setTaxpayerRegistrationNumber(Convert.toStr(row.get(7)));
|
||||
customer.setOrganization(Convert.toStr(row.get(8)));
|
||||
customer.setRetailInvestor(Convert.toStr(row.get(9)));
|
||||
customer.setId(Convert.toStr(row.get(10)));
|
||||
customer.setCustomerNo(Convert.toStr(row.get(10)));
|
||||
customer.setShipment(Convert.toStr(row.get(11)));
|
||||
customer.setTaxCategory(Convert.toStr(row.get(12)));
|
||||
BasCustomer basCustomer = basCustomerService.selectBasCustomerById(customer.getId());
|
||||
if (ObjUtil.isNotNull(basCustomer)){
|
||||
basCustomerService.updateBasCustomer(customer);
|
||||
}else {
|
||||
basCustomerService.insertBasCustomer(customer);
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@@ -96,7 +151,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
ErpSupplierParam erpSupplierParam = new ErpSupplierParam();
|
||||
erpSupplierParam.setPage_index(1);
|
||||
erpSupplierParam.setPage_size(100000);
|
||||
String body = HttpRequest.post(supplierListUrl).header("ZBAPI-Token", login()).body(JSONUtil.toJsonStr(erpSupplierParam)).execute().body();
|
||||
String body = HttpRequest.post(supplierListUrl).header(TOKEN_KEY, login()).body(JSONUtil.toJsonStr(erpSupplierParam)).execute().body();
|
||||
ErpSupplierResponse responseBean = JSONUtil.toBean(body, ErpSupplierResponse.class);
|
||||
for (List<Object> row : responseBean.getRows()) {
|
||||
BasSupplier supplier = new BasSupplier();
|
||||
|
||||
@@ -15,19 +15,19 @@ import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
|
||||
/**
|
||||
* 物料管理Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author gw
|
||||
* @date 2025-09-17
|
||||
*/
|
||||
@Service
|
||||
public class BasProductServiceImpl implements IBasProductService
|
||||
public class BasProductServiceImpl implements IBasProductService
|
||||
{
|
||||
@Autowired
|
||||
private BasProductMapper basProductMapper;
|
||||
|
||||
/**
|
||||
* 查询物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 物料管理
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 查询物料管理列表
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 物料管理
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 新增物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -77,16 +77,12 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
throw new RuntimeException("物料编号已存在");
|
||||
}
|
||||
basProduct.setProductGuid(basProduct.getProductId());
|
||||
basProduct.setSpare3(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
//获取当前系统登录用户名
|
||||
String username = SecurityUtils.getUsername();
|
||||
basProduct.setSpare4(username);
|
||||
return basProductMapper.insertBasProduct(basProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*
|
||||
*
|
||||
* @param basProduct 物料管理
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -105,7 +101,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 批量删除物料管理
|
||||
*
|
||||
*
|
||||
* @param productGuids 需要删除的物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -117,7 +113,7 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
|
||||
/**
|
||||
* 删除物料管理信息
|
||||
*
|
||||
*
|
||||
* @param productGuid 物料管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="queryParams.customerName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="简称" prop="simpleName">
|
||||
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否可用" prop="useable">
|
||||
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.is_available"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="简称" prop="simpleName">
|
||||
<el-input v-model="queryParams.simpleName" placeholder="请输入简称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否可用" prop="useable">
|
||||
<el-select v-model="queryParams.useable" placeholder="请选择是否可用" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.is_available"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@@ -44,37 +44,20 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange" max-height="700">
|
||||
<el-table-column type="selection" align="center" />
|
||||
<el-table-column label="客户编号" align="left" prop="customerNo" />
|
||||
<!-- <el-table-column label="客户类别" align="left" prop="customerGroupNo" /> -->
|
||||
<el-table-column label="客户名称" align="left" prop="customerName" />
|
||||
<el-table-column label="简称" align="left" prop="simpleName" />
|
||||
<el-table-column label="是否可用" align="left" prop="useable" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.is_available" :value="scope.row.useable"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="left" prop="remark" />
|
||||
<!-- <el-table-column width="120" label="业务部门" align="left" prop="businessDepartment" />
|
||||
<el-table-column width="120" label="业务员" align="left" prop="salesman" />
|
||||
<el-table-column width="120" label="助记码" align="left" prop="mnemonicCode" />
|
||||
<el-table-column width="120" label="客户类型" align="left" prop="type" />
|
||||
<el-table-column width="120" label="纳税人识别号" align="left" prop="taxpayerRegistrationNumber" />
|
||||
<el-table-column width="120" label="财务组织" align="left" prop="organization" />
|
||||
<el-table-column width="120" label="上级客户" align="left" prop="supCustomer" />
|
||||
<el-table-column width="120" label="个人客户" align="left" prop="retailInvestor" />
|
||||
<el-table-column width="120" label="国家/地区" align="left" prop="country" />
|
||||
<el-table-column width="120" label="时区" align="left" prop="timeZone" />
|
||||
<el-table-column width="120" label="数据格式" align="left" prop="dataFormat" />
|
||||
<el-table-column width="120" label="联系人" align="left" prop="contactName" />
|
||||
<el-table-column width="120" label="装运国家" align="left" prop="shipment" />
|
||||
<el-table-column width="120" label="税种" align="left" prop="taxCategory" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['bas:BasCustomer:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['bas:BasCustomer:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户编号" align="left" prop="customerNo"/>
|
||||
<el-table-column label="客户基本分类" align="left" prop="customerGroupNo"/>
|
||||
<el-table-column label="客户名称" align="left" prop="customerName"/>
|
||||
<el-table-column label="一级分类" align="left" prop="businessDepartment"/>
|
||||
<el-table-column label="销售人员" align="left" prop="salesman"/>
|
||||
<el-table-column label="人员职位" align="left" prop="mnemonicCode"/>
|
||||
<el-table-column label="固定电话" align="left" prop="type"/>
|
||||
<el-table-column label="手机号码" align="left" prop="taxpayerRegistrationNumber"/>
|
||||
<el-table-column label="联系方式" align="left" prop="organization"/>
|
||||
<el-table-column label="二级分类" align="left" prop="supCustomer"/>
|
||||
<el-table-column label="ord" align="left" prop="retailInvestor"/>
|
||||
<el-table-column label="联系人" align="left" prop="contactName"/>
|
||||
<el-table-column label="通用资源" align="left" prop="shipment"/>
|
||||
<el-table-column label="人员相关" align="left" prop="taxCategory"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -162,7 +145,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
|
||||
import {addBasCustomer, delBasCustomer, getBasCustomer, listBasCustomer, updateBasCustomer} from "@/api/bas/BasCustomer"
|
||||
|
||||
export default {
|
||||
name: "BasCustomer",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="物料编码" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
@@ -17,111 +17,30 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产品分类" prop="parentId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.parentId"-->
|
||||
<!-- placeholder="请输入产品分类"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="品号描述" prop="price">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.price"-->
|
||||
<!-- placeholder="请输入品号描述"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="图号" prop="cargoNo">
|
||||
<el-form-item label="产品编码" prop="cargoNo">
|
||||
<el-input
|
||||
v-model="queryParams.cargoNo"
|
||||
placeholder="请输入图号"
|
||||
placeholder="请输入产品编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<!-- <el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
placeholder="请输入单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="spec">
|
||||
</el-form-item>-->
|
||||
<el-form-item label="产品型号" prop="spec">
|
||||
<el-input
|
||||
v-model="queryParams.spec"
|
||||
placeholder="请输入规格"
|
||||
placeholder="请输入产品型号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="型号" prop="spare1">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare1"-->
|
||||
<!-- placeholder="请输入型号"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="单件净重" prop="spare2">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare2"-->
|
||||
<!-- placeholder="请输入单件净重"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="颜色" prop="spare3">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare3"-->
|
||||
<!-- placeholder="请输入颜色"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="序列号" prop="spare4">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare4"-->
|
||||
<!-- placeholder="请输入序列号"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="电压" prop="spare5">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare5"-->
|
||||
<!-- placeholder="请输入电压"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="功率" prop="spare6">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare6"-->
|
||||
<!-- placeholder="请输入功率"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="相位" prop="spare7">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare7"-->
|
||||
<!-- placeholder="请输入相位"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="毛重" prop="spare8">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.spare8"-->
|
||||
<!-- placeholder="请输入毛重"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -130,7 +49,7 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -161,7 +80,7 @@
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['bas:BasProduct:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -176,53 +95,29 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="BasProductList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<!-- 主键列注释保留 -->
|
||||
<!-- <el-table-column label="主键" align="center" prop="productGuid" /> -->
|
||||
<el-table-column label="物料编码" align="center" prop="productId" />
|
||||
<el-table-column label="物料名称" align="center" prop="productName" />
|
||||
<el-table-column label="规格型号" align="center" prop="spec" />
|
||||
<el-table-column label="图号" align="center" prop="cargoNo" />
|
||||
<el-table-column label="常用编码" align="center" prop="parentId" />
|
||||
<el-table-column label="物料状态" align="center" prop="spare1" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.product_type" :value="scope.row.spare1"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="启用标识" align="center" prop="spare7" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.spare7"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否系统项" align="center" prop="spare2" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.spare2"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="spare3" />
|
||||
<el-table-column label="创建用户" align="center" prop="spare4" />
|
||||
<el-table-column label="库存上限" align="center" prop="spare5" />
|
||||
<el-table-column label="库存下限" align="center" prop="spare6" />
|
||||
<el-table-column label="单价" align="center" prop="price" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['bas:BasProduct:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['bas:BasProduct:remove']"
|
||||
>删除</el-button>
|
||||
<el-table-column label="产品编码" align="center" prop="cargoNo" width="160"/>
|
||||
<!-- 物料名称列:修改为自定义模板,用v-html渲染HTML样式 -->
|
||||
<el-table-column label="物料名称" align="center" width="260">
|
||||
<template #default="scope">
|
||||
<!-- v-html解析row.productName中的HTML标签 -->
|
||||
<span v-html="scope.row.productName"></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品型号" align="center" prop="spec" width="260"/>
|
||||
<el-table-column label="产品分类" align="center" prop="parentId" />
|
||||
<el-table-column label="价格" align="center" prop="price" />
|
||||
<el-table-column label="单位id" align="center" prop="unit" />
|
||||
<el-table-column label="单位名称" align="center" prop="spare1" />
|
||||
<el-table-column label="url" align="center" prop="spare3" />
|
||||
<el-table-column label="btnurl" align="center" prop="spare4" />
|
||||
<el-table-column label="unitPrices" align="center" prop="spare5" width="260"/>
|
||||
<el-table-column label="units" align="center" prop="spare6" width="260"/>
|
||||
<el-table-column label="unitjb" align="center" prop="spare7" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -494,7 +389,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.resetForm("queryParams")
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
|
||||
@@ -9,14 +9,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商名称" prop="supplierGroupNo">
|
||||
<el-input
|
||||
v-model="queryParams.supplierGroupNo"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input
|
||||
v-model="queryParams.supplierName"
|
||||
@@ -25,7 +17,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="简称" prop="simpleName">
|
||||
<!-- <el-form-item label="简称" prop="simpleName">
|
||||
<el-input
|
||||
v-model="queryParams.simpleName"
|
||||
placeholder="请输入简称"
|
||||
@@ -43,103 +35,8 @@
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('BasSupplier.supplierArae')" prop="supplierArae"> 地区分类
|
||||
<el-input
|
||||
v-model="queryParams.supplierArae"
|
||||
:placeholder="$t('BasSupplier.inputSupplierArae')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.taxpayerRegistrationNumber')" prop="taxpayerRegistrationNumber"> 纳税人登记号
|
||||
<el-input
|
||||
v-model="queryParams.taxpayerRegistrationNumber"
|
||||
:placeholder="$t('BasSupplier.inputTaxpayerRegistrationNumber')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.country')" prop="country"> 国家
|
||||
<el-input
|
||||
v-model="queryParams.country"
|
||||
:placeholder="$t('BasSupplier.inputCountry')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.timeZone')" prop="timeZone"> 时区
|
||||
<el-input
|
||||
v-model="queryParams.timeZone"
|
||||
:placeholder="$t('BasSupplier.inputTimeZone')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.dataFormat')" prop="dataFormat"> 数据格式
|
||||
<el-input
|
||||
v-model="queryParams.dataFormat"
|
||||
:placeholder="$t('BasSupplier.inputDataFormat')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.receivingCountry')" prop="receivingCountry"> 收货国家
|
||||
<el-input
|
||||
v-model="queryParams.receivingCountry"
|
||||
:placeholder="$t('BasSupplier.inputReceivingCountry')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.taxCategory')" prop="taxCategory"> 税类
|
||||
<el-input
|
||||
v-model="queryParams.taxCategory"
|
||||
:placeholder="$t('BasSupplier.inputTaxCategory')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.legalPerson')" prop="legalPerson"> 法人
|
||||
<el-input
|
||||
v-model="queryParams.legalPerson"
|
||||
:placeholder="$t('BasSupplier.inputLegalPerson')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.registeredCapital')" prop="registeredCapital"> 注册资金
|
||||
<el-input
|
||||
v-model="queryParams.registeredCapital"
|
||||
:placeholder="$t('BasSupplier.inputRegisteredCapital')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.address')" prop="address"> 企业地址
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
:placeholder="$t('BasSupplier.inputAddress')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.contactName')" prop="contactName"> 联系人姓名
|
||||
<el-input
|
||||
v-model="queryParams.contactName"
|
||||
:placeholder="$t('BasSupplier.inputContactName')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('BasSupplier.contactNumber')" prop="contactNumber"> 联系电话
|
||||
<el-input
|
||||
v-model="queryParams.contactNumber"
|
||||
:placeholder="$t('BasSupplier.inputContactNumber')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -147,7 +44,7 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -178,7 +75,7 @@
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['bas:BasSupplier:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@@ -193,47 +90,14 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="BasSupplierList" @selection-change="handleSelectionChange" max-height="700">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="供应商编号" align="left" prop="supplierNo" />
|
||||
<!-- <el-table-column label="供应商组" align="left" prop="supplierGroupNo" /> -->
|
||||
<el-table-column label="供应商名称" align="left" prop="supplierName" />
|
||||
<el-table-column label="简称" align="left" prop="simpleName" />
|
||||
<el-table-column label="是否可用" align="left" prop="useable" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.is_available" :value="scope.row.useable"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="left" prop="remark" />
|
||||
<!-- <el-table-column label="地区" align="left" prop="supplierArae" width="120" />
|
||||
<el-table-column label="纳税人登记号" align="left" prop="taxpayerRegistrationNumber" width="120" />
|
||||
<el-table-column label="国家" align="left" prop="country" width="120" />
|
||||
<el-table-column label="时区" align="left" prop="timeZone" width="120" />
|
||||
<el-table-column label="数据格式" align="left" prop="dataFormat" width="120" />
|
||||
<el-table-column label="收货国家" align="left" prop="receivingCountry" width="120" />
|
||||
<el-table-column label="税收类别" align="left" prop="taxCategory" width="120" />
|
||||
<el-table-column label="法人" align="left" prop="legalPerson" width="120" />
|
||||
<el-table-column label="注册资本" align="right" prop="registeredCapital" width="120" />
|
||||
<el-table-column label="地址" align="left" prop="address" width="120" />
|
||||
<el-table-column label="联系人" align="left" prop="contactName" width="120" />
|
||||
<el-table-column label="联系电话" align="left" prop="contactNumber" width="120" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['bas:BasSupplier:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['bas:BasSupplier:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商名称" align="left" prop="supplierName" width="260" />
|
||||
<el-table-column label="所在行业" align="left" prop="supplierArae" />
|
||||
<el-table-column label="采购人员" align="left" prop="taxpayerRegistrationNumber" />
|
||||
<el-table-column label="ord" align="left" prop="country" />
|
||||
<el-table-column label="cateId" align="left" prop="timeZone" />
|
||||
<el-table-column label="主联系人" align="left" prop="contactName" />
|
||||
<el-table-column label="联系方式" align="left" prop="contactNumber" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
Reference in New Issue
Block a user