202506061732
This commit is contained in:
parent
5b06f9755e
commit
fceb5fd135
|
|
@ -75,13 +75,32 @@ public class QuoteCraftController extends BaseController
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:ServiceGoods:query')")
|
@PreAuthorize("@ss.hasPermi('system:ServiceGoods:query')")
|
||||||
@PostMapping(value = "/selectQuoteTypeList")
|
@PostMapping(value = "/selectQuoteTypeList")
|
||||||
public AjaxResult selectQuoteTypeList()
|
public AjaxResult selectQuoteTypeList(@RequestBody List<Long> ids)
|
||||||
{
|
{
|
||||||
|
if (ids == null || ids.isEmpty()) {
|
||||||
|
return success(new ArrayList<>());
|
||||||
|
}
|
||||||
|
|
||||||
QuoteType quoteType = new QuoteType();
|
QuoteType query = new QuoteType();
|
||||||
|
query.setStatus(1L); // 只获取启用状态的数据
|
||||||
|
List<QuoteType> allTypes = quoteTypeService.selectQuoteTypeList(query);
|
||||||
|
|
||||||
List<QuoteType> quoteTypeList = quoteTypeService.selectQuoteTypeList(quoteType);
|
// 根据服务项目ID过滤工艺分类
|
||||||
return success(quoteType);
|
List<QuoteType> filteredTypes = allTypes.stream()
|
||||||
|
.filter(type -> {
|
||||||
|
if (type.getGoodId() != null) {
|
||||||
|
try {
|
||||||
|
List<String> typeGoodIds = JSON.parseArray(type.getGoodId(), String.class);
|
||||||
|
return typeGoodIds.stream().anyMatch(goodId -> ids.contains(Long.parseLong(goodId)));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
return success(filteredTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -143,14 +162,14 @@ public class QuoteCraftController extends BaseController
|
||||||
if (quoteCraft.getTypeId()!=null) {
|
if (quoteCraft.getTypeId()!=null) {
|
||||||
String strtype = quoteCraft.getTypeId();
|
String strtype = quoteCraft.getTypeId();
|
||||||
List<String> strtypeList = JSON.parseArray(strtype, String.class);
|
List<String> strtypeList = JSON.parseArray(strtype, String.class);
|
||||||
List<Integer> intstrtypeList = strtypeList.stream().map(Integer::parseInt).collect(Collectors.toList());
|
List<Long> longTypeList = strtypeList.stream().map(Long::parseLong).collect(Collectors.toList());
|
||||||
quoteCraft.setTypeintids(intstrtypeList);
|
quoteCraft.setTypeintids(longTypeList);
|
||||||
}
|
}
|
||||||
if (quoteCraft.getGoodId()!=null){
|
if (quoteCraft.getGoodId()!=null){
|
||||||
String str = quoteCraft.getGoodId();
|
String str = quoteCraft.getGoodId();
|
||||||
List<String> stringList = JSON.parseArray(str, String.class);
|
List<String> stringList = JSON.parseArray(str, String.class);
|
||||||
List<Integer> intList = stringList.stream().map(Integer::parseInt).collect(Collectors.toList());
|
List<Long> longList = stringList.stream().map(Long::parseLong).collect(Collectors.toList());
|
||||||
quoteCraft.setGoodsintids(intList);
|
quoteCraft.setGoodsintids(longList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return success(quoteCraft);
|
return success(quoteCraft);
|
||||||
|
|
@ -164,14 +183,21 @@ public class QuoteCraftController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody QuoteCraft quoteCraft)
|
public AjaxResult add(@RequestBody QuoteCraft quoteCraft)
|
||||||
{
|
{
|
||||||
if(quoteCraft.getGoodsintids().size()>0){
|
if(quoteCraft.getGoodsintids() != null && quoteCraft.getGoodsintids().size()>0){
|
||||||
List<Integer> intList =quoteCraft.getGoodsintids();
|
List<Long> longList = quoteCraft.getGoodsintids();
|
||||||
// 先转成字符串List
|
// 先转成字符串List
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 再转成json字符串
|
// 再转成json字符串
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteCraft.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteCraft.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
}
|
||||||
|
if(quoteCraft.getTypeintids() != null && quoteCraft.getTypeintids().size()>0){
|
||||||
|
List<Long> longList = quoteCraft.getTypeintids();
|
||||||
|
// 先转成字符串List
|
||||||
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
|
// 再转成json字符串
|
||||||
|
String json = JSON.toJSONString(strList);
|
||||||
|
quoteCraft.setTypeId(json.replaceAll("\",\"", "\", \""));
|
||||||
}
|
}
|
||||||
return toAjax(quoteCraftService.insertQuoteCraft(quoteCraft));
|
return toAjax(quoteCraftService.insertQuoteCraft(quoteCraft));
|
||||||
}
|
}
|
||||||
|
|
@ -184,14 +210,21 @@ public class QuoteCraftController extends BaseController
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody QuoteCraft quoteCraft)
|
public AjaxResult edit(@RequestBody QuoteCraft quoteCraft)
|
||||||
{
|
{
|
||||||
if(quoteCraft.getGoodsintids().size()>0){
|
if(quoteCraft.getGoodsintids() != null && quoteCraft.getGoodsintids().size()>0){
|
||||||
List<Integer> intList =quoteCraft.getGoodsintids();
|
List<Long> longList = quoteCraft.getGoodsintids();
|
||||||
// 先转成字符串List
|
// 先转成字符串List
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 再转成json字符串
|
// 再转成json字符串
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteCraft.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteCraft.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
}
|
||||||
|
if(quoteCraft.getTypeintids() != null && quoteCraft.getTypeintids().size()>0){
|
||||||
|
List<Long> longList = quoteCraft.getTypeintids();
|
||||||
|
// 先转成字符串List
|
||||||
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
|
// 再转成json字符串
|
||||||
|
String json = JSON.toJSONString(strList);
|
||||||
|
quoteCraft.setTypeId(json.replaceAll("\",\"", "\", \""));
|
||||||
}
|
}
|
||||||
return toAjax(quoteCraftService.updateQuoteCraft(quoteCraft));
|
return toAjax(quoteCraftService.updateQuoteCraft(quoteCraft));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,19 @@ public class QuoteMaterialController extends BaseController
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
QuoteMaterial quoteMaterial=quoteMaterialService.selectQuoteMaterialById(id);
|
QuoteMaterial quoteMaterial=quoteMaterialService.selectQuoteMaterialById(id);
|
||||||
|
if (quoteMaterial != null) {
|
||||||
if (quoteMaterial.getGoodId() != null) {
|
if (quoteMaterial.getGoodId() != null) {
|
||||||
String str = quoteMaterial.getGoodId();
|
String str = quoteMaterial.getGoodId();
|
||||||
List<String> stringList = JSON.parseArray(str, String.class);
|
List<String> stringList = JSON.parseArray(str, String.class);
|
||||||
List<Integer> intList = stringList.stream().map(Integer::parseInt).collect(Collectors.toList());
|
List<Long> longList = stringList.stream().map(Long::parseLong).collect(Collectors.toList());
|
||||||
quoteMaterial.setGoodsintids(intList);
|
quoteMaterial.setGoodsintids(longList);
|
||||||
|
}
|
||||||
|
if (quoteMaterial.getTypeId() != null) {
|
||||||
|
String typeStr = quoteMaterial.getTypeId();
|
||||||
|
List<String> typeStringList = JSON.parseArray(typeStr, String.class);
|
||||||
|
List<Long> typeLongList = typeStringList.stream().map(Long::parseLong).collect(Collectors.toList());
|
||||||
|
quoteMaterial.setTypeintids(typeLongList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return success(quoteMaterial);
|
return success(quoteMaterial);
|
||||||
}
|
}
|
||||||
|
|
@ -123,14 +131,17 @@ public class QuoteMaterialController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody QuoteMaterial quoteMaterial)
|
public AjaxResult add(@RequestBody QuoteMaterial quoteMaterial)
|
||||||
{
|
{
|
||||||
if(quoteMaterial.getGoodsintids().size()>0){
|
if (quoteMaterial.getGoodsintids() != null && quoteMaterial.getGoodsintids().size() > 0) {
|
||||||
List<Integer> intList =quoteMaterial.getGoodsintids();
|
List<Long> longList = quoteMaterial.getGoodsintids();
|
||||||
// 先转成字符串List
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
|
||||||
// 再转成json字符串
|
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteMaterial.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteMaterial.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
}
|
||||||
|
if (quoteMaterial.getTypeintids() != null && quoteMaterial.getTypeintids().size() > 0) {
|
||||||
|
List<Long> longList = quoteMaterial.getTypeintids();
|
||||||
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
|
String json = JSON.toJSONString(strList);
|
||||||
|
quoteMaterial.setTypeId(json.replaceAll("\",\"", "\", \""));
|
||||||
}
|
}
|
||||||
return toAjax(quoteMaterialService.insertQuoteMaterial(quoteMaterial));
|
return toAjax(quoteMaterialService.insertQuoteMaterial(quoteMaterial));
|
||||||
}
|
}
|
||||||
|
|
@ -143,17 +154,17 @@ public class QuoteMaterialController extends BaseController
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody QuoteMaterial quoteMaterial)
|
public AjaxResult edit(@RequestBody QuoteMaterial quoteMaterial)
|
||||||
{
|
{
|
||||||
if(quoteMaterial.getGoodsintids().size()>0){
|
if (quoteMaterial.getGoodsintids() != null && quoteMaterial.getGoodsintids().size() > 0) {
|
||||||
System.out.println("#########################"+quoteMaterial.getGoodsintids());
|
List<Long> longList = quoteMaterial.getGoodsintids();
|
||||||
List<Integer> intList =quoteMaterial.getGoodsintids();
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 先转成字符串List
|
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
|
||||||
// 再转成json字符串
|
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteMaterial.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteMaterial.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
}
|
||||||
|
if (quoteMaterial.getTypeintids() != null && quoteMaterial.getTypeintids().size() > 0) {
|
||||||
|
List<Long> longList = quoteMaterial.getTypeintids();
|
||||||
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
|
String json = JSON.toJSONString(strList);
|
||||||
|
quoteMaterial.setTypeId(json.replaceAll("\",\"", "\", \""));
|
||||||
}
|
}
|
||||||
return toAjax(quoteMaterialService.updateQuoteMaterial(quoteMaterial));
|
return toAjax(quoteMaterialService.updateQuoteMaterial(quoteMaterial));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,19 @@ public class QuoteMaterialTypeController extends BaseController
|
||||||
util.exportExcel(response, list, "项目报价--物料分类数据");
|
util.exportExcel(response, list, "项目报价--物料分类数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目报价--物料分类数据列表(不分页)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:QuoteMaterialType:query')")
|
||||||
|
@GetMapping(value = "/dataList")
|
||||||
|
public AjaxResult dataList()
|
||||||
|
{
|
||||||
|
QuoteMaterialType query = new QuoteMaterialType();
|
||||||
|
query.setStatus(1L); // 只获取启用状态的数据
|
||||||
|
List<QuoteMaterialType> list = quoteMaterialTypeService.selectQuoteMaterialTypeList(query);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取项目报价--物料分类详细信息
|
* 获取项目报价--物料分类详细信息
|
||||||
*/
|
*/
|
||||||
|
|
@ -86,8 +99,8 @@ public class QuoteMaterialTypeController extends BaseController
|
||||||
if (quoteMaterialType.getGoodId()!=null){
|
if (quoteMaterialType.getGoodId()!=null){
|
||||||
String str = quoteMaterialType.getGoodId();
|
String str = quoteMaterialType.getGoodId();
|
||||||
List<String> stringList = JSON.parseArray(str, String.class);
|
List<String> stringList = JSON.parseArray(str, String.class);
|
||||||
List<Integer> intList = stringList.stream().map(Integer::parseInt).collect(Collectors.toList());
|
List<Long> longList = stringList.stream().map(Long::parseLong).collect(Collectors.toList());
|
||||||
quoteMaterialType.setGoodsintids(intList);
|
quoteMaterialType.setGoodsintids(longList);
|
||||||
}
|
}
|
||||||
|
|
||||||
return success(quoteMaterialType);
|
return success(quoteMaterialType);
|
||||||
|
|
@ -101,14 +114,13 @@ public class QuoteMaterialTypeController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody QuoteMaterialType quoteMaterialType)
|
public AjaxResult add(@RequestBody QuoteMaterialType quoteMaterialType)
|
||||||
{
|
{
|
||||||
if(quoteMaterialType.getGoodsintids().size()>0){
|
if(quoteMaterialType.getGoodsintids() != null && quoteMaterialType.getGoodsintids().size()>0){
|
||||||
List<Integer> intList =quoteMaterialType.getGoodsintids();
|
List<Long> longList = quoteMaterialType.getGoodsintids();
|
||||||
// 先转成字符串List
|
// 先转成字符串List
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 再转成json字符串
|
// 再转成json字符串
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteMaterialType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteMaterialType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
|
||||||
}
|
}
|
||||||
return toAjax(quoteMaterialTypeService.insertQuoteMaterialType(quoteMaterialType));
|
return toAjax(quoteMaterialTypeService.insertQuoteMaterialType(quoteMaterialType));
|
||||||
}
|
}
|
||||||
|
|
@ -121,17 +133,15 @@ public class QuoteMaterialTypeController extends BaseController
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody QuoteMaterialType quoteMaterialType)
|
public AjaxResult edit(@RequestBody QuoteMaterialType quoteMaterialType)
|
||||||
{
|
{
|
||||||
if(quoteMaterialType.getGoodsintids().size()>0){
|
if(quoteMaterialType.getGoodsintids() != null && quoteMaterialType.getGoodsintids().size()>0){
|
||||||
System.out.println("#########################"+quoteMaterialType.getGoodsintids());
|
System.out.println("#########################"+quoteMaterialType.getGoodsintids());
|
||||||
List<Integer> intList =quoteMaterialType.getGoodsintids();
|
List<Long> longList = quoteMaterialType.getGoodsintids();
|
||||||
// 先转成字符串List
|
// 先转成字符串List
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 再转成json字符串
|
// 再转成json字符串
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteMaterialType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteMaterialType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
|
||||||
System.out.println("#########################"+json.replaceAll("\",\"", "\", \""));
|
System.out.println("#########################"+json.replaceAll("\",\"", "\", \""));
|
||||||
|
|
||||||
}
|
}
|
||||||
return toAjax(quoteMaterialTypeService.updateQuoteMaterialType(quoteMaterialType));
|
return toAjax(quoteMaterialTypeService.updateQuoteMaterialType(quoteMaterialType));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,19 @@ public class QuoteTypeController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目报价--工艺分类数据列表(不分页)
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:QuoteType:query')")
|
||||||
|
@GetMapping(value = "/dataList")
|
||||||
|
public AjaxResult dataList()
|
||||||
|
{
|
||||||
|
QuoteType query = new QuoteType();
|
||||||
|
query.setStatus(1L); // 只获取启用状态的数据
|
||||||
|
List<QuoteType> list = quoteTypeService.selectQuoteTypeList(query);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取项目报价--工艺分类详细信息
|
* 获取项目报价--工艺分类详细信息
|
||||||
*/
|
*/
|
||||||
|
|
@ -141,8 +154,8 @@ public class QuoteTypeController extends BaseController
|
||||||
if (quoteType.getGoodId()!=null){
|
if (quoteType.getGoodId()!=null){
|
||||||
String str = quoteType.getGoodId();
|
String str = quoteType.getGoodId();
|
||||||
List<String> stringList = JSON.parseArray(str, String.class);
|
List<String> stringList = JSON.parseArray(str, String.class);
|
||||||
List<Integer> intList = stringList.stream().map(Integer::parseInt).collect(Collectors.toList());
|
List<Long> longList = stringList.stream().map(Long::parseLong).collect(Collectors.toList());
|
||||||
quoteType.setGoodsintids(intList);
|
quoteType.setGoodsintids(longList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -160,14 +173,13 @@ public class QuoteTypeController extends BaseController
|
||||||
public AjaxResult add(@RequestBody QuoteType quoteType)
|
public AjaxResult add(@RequestBody QuoteType quoteType)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(quoteType.getGoodsintids().size()>0){
|
if(quoteType.getGoodsintids() != null && quoteType.getGoodsintids().size()>0){
|
||||||
List<Integer> intList =quoteType.getGoodsintids();
|
List<Long> longList = quoteType.getGoodsintids();
|
||||||
// 先转成字符串List
|
// 先转成字符串List
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 再转成json字符串
|
// 再转成json字符串
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
|
||||||
}
|
}
|
||||||
return toAjax(quoteTypeService.insertQuoteType(quoteType));
|
return toAjax(quoteTypeService.insertQuoteType(quoteType));
|
||||||
}
|
}
|
||||||
|
|
@ -180,18 +192,13 @@ public class QuoteTypeController extends BaseController
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody QuoteType quoteType)
|
public AjaxResult edit(@RequestBody QuoteType quoteType)
|
||||||
{
|
{
|
||||||
|
if(quoteType.getGoodsintids() != null && quoteType.getGoodsintids().size()>0){
|
||||||
if(quoteType.getGoodsintids().size()>0){
|
List<Long> longList = quoteType.getGoodsintids();
|
||||||
System.out.println("#########################"+quoteType.getGoodsintids());
|
|
||||||
List<Integer> intList =quoteType.getGoodsintids();
|
|
||||||
// 先转成字符串List
|
// 先转成字符串List
|
||||||
List<String> strList = intList.stream().map(String::valueOf).collect(Collectors.toList());
|
List<String> strList = longList.stream().map(String::valueOf).collect(Collectors.toList());
|
||||||
// 再转成json字符串
|
// 再转成json字符串
|
||||||
String json = JSON.toJSONString(strList);
|
String json = JSON.toJSONString(strList);
|
||||||
quoteType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
quoteType.setGoodId(json.replaceAll("\",\"", "\", \""));
|
||||||
//String withSpace = compact.replaceAll("\",\"", "\", \"");
|
|
||||||
System.out.println("#########################"+json.replaceAll("\",\"", "\", \""));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return toAjax(quoteTypeService.updateQuoteType(quoteType));
|
return toAjax(quoteTypeService.updateQuoteType(quoteType));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@ public class QuoteCraft extends BaseEntity
|
||||||
@Excel(name = "服务名称")
|
@Excel(name = "服务名称")
|
||||||
private String ServiceName;
|
private String ServiceName;
|
||||||
|
|
||||||
private List<Integer> goodsintids;
|
private List<Long> goodsintids;
|
||||||
|
|
||||||
private List<Integer> typeintids;
|
private List<Long> typeintids;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
|
|
@ -146,19 +146,19 @@ public class QuoteCraft extends BaseEntity
|
||||||
ServiceName = serviceName;
|
ServiceName = serviceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getGoodsintids() {
|
public List<Long> getGoodsintids() {
|
||||||
return goodsintids;
|
return goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoodsintids(List<Integer> goodsintids) {
|
public void setGoodsintids(List<Long> goodsintids) {
|
||||||
this.goodsintids = goodsintids;
|
this.goodsintids = goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getTypeintids() {
|
public List<Long> getTypeintids() {
|
||||||
return typeintids;
|
return typeintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTypeintids(List<Integer> typeintids) {
|
public void setTypeintids(List<Long> typeintids) {
|
||||||
this.typeintids = typeintids;
|
this.typeintids = typeintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,9 @@ public class QuoteMaterial extends BaseEntity
|
||||||
private Date updatedAt;
|
private Date updatedAt;
|
||||||
|
|
||||||
|
|
||||||
private List<Integer> goodsintids;
|
private List<Long> goodsintids;
|
||||||
|
|
||||||
|
private List<Long> typeintids;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
|
|
@ -185,14 +187,22 @@ public class QuoteMaterial extends BaseEntity
|
||||||
this.priceMax = priceMax;
|
this.priceMax = priceMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getGoodsintids() {
|
public List<Long> getGoodsintids() {
|
||||||
return goodsintids;
|
return goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoodsintids(List<Integer> goodsintids) {
|
public void setGoodsintids(List<Long> goodsintids) {
|
||||||
this.goodsintids = goodsintids;
|
this.goodsintids = goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Long> getTypeintids() {
|
||||||
|
return typeintids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeintids(List<Long> typeintids) {
|
||||||
|
this.typeintids = typeintids;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public class QuoteMaterialType extends BaseEntity
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
private Date updatedAt;
|
private Date updatedAt;
|
||||||
|
|
||||||
private List<Integer> goodsintids;
|
private List<Long> goodsintids;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
|
|
@ -129,11 +129,11 @@ public class QuoteMaterialType extends BaseEntity
|
||||||
this.serviceName = serviceName;
|
this.serviceName = serviceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getGoodsintids() {
|
public List<Long> getGoodsintids() {
|
||||||
return goodsintids;
|
return goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoodsintids(List<Integer> goodsintids) {
|
public void setGoodsintids(List<Long> goodsintids) {
|
||||||
this.goodsintids = goodsintids;
|
this.goodsintids = goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class QuoteType extends BaseEntity
|
||||||
|
|
||||||
private List<String> goodsids;
|
private List<String> goodsids;
|
||||||
|
|
||||||
private List<Integer> goodsintids;
|
private List<Long> goodsintids;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -146,11 +146,11 @@ public class QuoteType extends BaseEntity
|
||||||
this.goodsids = goodsids;
|
this.goodsids = goodsids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getGoodsintids() {
|
public List<Long> getGoodsintids() {
|
||||||
return goodsintids;
|
return goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoodsintids(List<Integer> goodsintids) {
|
public void setGoodsintids(List<Long> goodsintids) {
|
||||||
this.goodsintids = goodsintids;
|
this.goodsintids = goodsintids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,14 @@ export function getQuoteMaterialType(id) {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取项目报价--物料分类数据列表(不分页)
|
||||||
|
export function getQuoteMaterialTypeDataList() {
|
||||||
|
return request({
|
||||||
|
url: '/system/QuoteMaterialType/dataList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
// 任务状态修改
|
// 任务状态修改
|
||||||
export function changetypeStatus(id, status) {
|
export function changetypeStatus(id, status) {
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,14 @@ export function getQuoteType(id) {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取项目报价--工艺分类数据列表(不分页)
|
||||||
|
export function getQuoteTypeDataList() {
|
||||||
|
return request({
|
||||||
|
url: '/system/QuoteType/dataList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
// 任务状态修改
|
// 任务状态修改
|
||||||
export function changetypeStatus(id, status) {
|
export function changetypeStatus(id, status) {
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,8 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="intstrtypeList">
|
<el-form-item label="类型" prop="typeintids">
|
||||||
<el-select v-model="form.intstrtypeList" multiple filterable placeholder="请选择类型" style="width: 100%">
|
<el-select v-model="form.typeintids" multiple filterable placeholder="请选择类型" style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="type in typeSelectDataList"
|
v-for="type in typeSelectDataList"
|
||||||
:key="type.id"
|
:key="type.id"
|
||||||
|
|
@ -211,7 +211,7 @@ export default {
|
||||||
goodId: undefined,
|
goodId: undefined,
|
||||||
goodsintids: [],
|
goodsintids: [],
|
||||||
typeId: undefined,
|
typeId: undefined,
|
||||||
intstrtypeList: [],
|
typeintids: [],
|
||||||
title: undefined,
|
title: undefined,
|
||||||
price: 0,
|
price: 0,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
|
|
@ -224,7 +224,7 @@ export default {
|
||||||
{ required: true, message: "服务不能为空", trigger: "blur" }
|
{ required: true, message: "服务不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|
||||||
intstrtypeList: [
|
typeintids: [
|
||||||
{ required: true, message: "类型不能为空", trigger: "blur" }
|
{ required: true, message: "类型不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
title: [
|
title: [
|
||||||
|
|
@ -269,7 +269,7 @@ export default {
|
||||||
goodId: undefined,
|
goodId: undefined,
|
||||||
goodsintids: [],
|
goodsintids: [],
|
||||||
typeId: undefined,
|
typeId: undefined,
|
||||||
intstrtypeList: [],
|
typeintids: [],
|
||||||
title: undefined,
|
title: undefined,
|
||||||
price: 0,
|
price: 0,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
|
|
@ -284,8 +284,11 @@ export default {
|
||||||
const ids = this.form.goodsintids || [];
|
const ids = this.form.goodsintids || [];
|
||||||
if (ids.length > 0) {
|
if (ids.length > 0) {
|
||||||
selectQuoteTypeList(ids).then(response => {
|
selectQuoteTypeList(ids).then(response => {
|
||||||
this.typeSelectDataList = response.data;
|
this.typeSelectDataList = response.data || [];
|
||||||
})
|
}).catch(error => {
|
||||||
|
console.error('获取工艺分类失败:', error);
|
||||||
|
this.typeSelectDataList = [];
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.typeSelectDataList = [];
|
this.typeSelectDataList = [];
|
||||||
}
|
}
|
||||||
|
|
@ -316,7 +319,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
getGoodsDataList().then(response => {
|
getGoodsDataList(1).then(response => {
|
||||||
this.typeDataList = response.data || [];
|
this.typeDataList = response.data || [];
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.typeDataList = [];
|
this.typeDataList = [];
|
||||||
|
|
@ -336,11 +339,16 @@ export default {
|
||||||
this.form = {
|
this.form = {
|
||||||
...response.data,
|
...response.data,
|
||||||
goodsintids: response.data.goodsintids || [],
|
goodsintids: response.data.goodsintids || [],
|
||||||
intstrtypeList: response.data.intstrtypeList || []
|
typeintids: response.data.typeintids || []
|
||||||
};
|
};
|
||||||
// 如果有服务ID,获取对应的类型列表
|
// 如果有服务ID,获取对应的类型列表
|
||||||
if (this.form.goodsintids && this.form.goodsintids.length > 0) {
|
if (this.form.goodsintids && this.form.goodsintids.length > 0) {
|
||||||
this.handelSelectMultiple();
|
selectQuoteTypeList(this.form.goodsintids).then(response => {
|
||||||
|
this.typeSelectDataList = response.data || [];
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('获取工艺分类失败:', error);
|
||||||
|
this.typeSelectDataList = [];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,15 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="typeId">
|
<el-form-item label="类型" prop="typeintids">
|
||||||
<el-input v-model="form.typeId" placeholder="请输入类型" />
|
<el-select v-model="form.typeintids" multiple filterable placeholder="请选择类型" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="type in materialTypeList"
|
||||||
|
:key="type.id"
|
||||||
|
:label="type.title"
|
||||||
|
:value="type.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标题" prop="title">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input v-model="form.title" placeholder="请输入标题" />
|
<el-input v-model="form.title" placeholder="请输入标题" />
|
||||||
|
|
@ -178,6 +185,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { listQuoteMaterial, getQuoteMaterial, delQuoteMaterial, addQuoteMaterial, updateQuoteMaterial } from "@/api/system/QuoteMaterial"
|
import { listQuoteMaterial, getQuoteMaterial, delQuoteMaterial, addQuoteMaterial, updateQuoteMaterial } from "@/api/system/QuoteMaterial"
|
||||||
import { getGoodsDataList } from "@/api/system/QuoteType"
|
import { getGoodsDataList } from "@/api/system/QuoteType"
|
||||||
|
import { getQuoteMaterialTypeDataList } from "@/api/system/QuoteMaterialType"
|
||||||
export default {
|
export default {
|
||||||
name: "QuoteMaterial",
|
name: "QuoteMaterial",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -196,6 +204,7 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|
||||||
typeDataList: [],
|
typeDataList: [],
|
||||||
|
materialTypeList: [],
|
||||||
// 项目报价--物料信息表格数据
|
// 项目报价--物料信息表格数据
|
||||||
QuoteMaterialList: [],
|
QuoteMaterialList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
|
|
@ -217,13 +226,24 @@ export default {
|
||||||
updatedAt: null
|
updatedAt: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
id: null,
|
||||||
|
goodId: null,
|
||||||
|
goodsintids: [],
|
||||||
|
typeId: null,
|
||||||
|
typeintids: [],
|
||||||
|
title: null,
|
||||||
|
price: null,
|
||||||
|
unit: null,
|
||||||
|
createdAt: null,
|
||||||
|
updatedAt: null
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
goodsintids: [
|
goodsintids: [
|
||||||
{ required: true, message: "服务项目不能为空", trigger: "blur" }
|
{ required: true, message: "服务项目不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
typeId: [
|
typeintids: [
|
||||||
{ required: true, message: "类型不能为空", trigger: "blur" }
|
{ required: true, message: "类型不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
title: [
|
title: [
|
||||||
|
|
@ -241,6 +261,7 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTypeList();
|
this.getTypeList();
|
||||||
|
this.getMaterialTypeList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询项目报价--物料信息列表 */
|
/** 查询项目报价--物料信息列表 */
|
||||||
|
|
@ -262,7 +283,9 @@ export default {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
goodId: null,
|
goodId: null,
|
||||||
|
goodsintids: [],
|
||||||
typeId: null,
|
typeId: null,
|
||||||
|
typeintids: [],
|
||||||
title: null,
|
title: null,
|
||||||
price: null,
|
price: null,
|
||||||
unit: null,
|
unit: null,
|
||||||
|
|
@ -312,16 +335,25 @@ export default {
|
||||||
this.title = "添加项目报价--物料信息"
|
this.title = "添加项目报价--物料信息"
|
||||||
},
|
},
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
getGoodsDataList().then(response => {
|
getGoodsDataList(1).then(response => {
|
||||||
this.typeDataList = response.data;
|
this.typeDataList = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getMaterialTypeList() {
|
||||||
|
getQuoteMaterialTypeDataList().then(response => {
|
||||||
|
this.materialTypeList = response.data || [];
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset()
|
this.reset()
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getQuoteMaterial(id).then(response => {
|
getQuoteMaterial(id).then(response => {
|
||||||
this.form = response.data
|
this.form = {
|
||||||
|
...response.data,
|
||||||
|
goodsintids: response.data.goodsintids || [],
|
||||||
|
typeintids: response.data.typeintids || []
|
||||||
|
}
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = "修改项目报价--物料信息"
|
this.title = "修改项目报价--物料信息"
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,16 @@ export default {
|
||||||
priceMax: null
|
priceMax: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
id: null,
|
||||||
|
title: null,
|
||||||
|
goodId: null,
|
||||||
|
goodsintids: [],
|
||||||
|
sort: null,
|
||||||
|
status: null,
|
||||||
|
createdAt: null,
|
||||||
|
updatedAt: null
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
|
|
@ -248,6 +257,7 @@ export default {
|
||||||
id: null,
|
id: null,
|
||||||
title: null,
|
title: null,
|
||||||
goodId: null,
|
goodId: null,
|
||||||
|
goodsintids: [],
|
||||||
sort: null,
|
sort: null,
|
||||||
status: null,
|
status: null,
|
||||||
createdAt: null,
|
createdAt: null,
|
||||||
|
|
@ -312,13 +322,16 @@ export default {
|
||||||
this.reset()
|
this.reset()
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getQuoteMaterialType(id).then(response => {
|
getQuoteMaterialType(id).then(response => {
|
||||||
this.form = response.data
|
this.form = {
|
||||||
|
...response.data,
|
||||||
|
goodsintids: response.data.goodsintids || []
|
||||||
|
}
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = "修改项目报价--物料分类"
|
this.title = "修改项目报价--物料分类"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
getGoodsDataList().then(response => {
|
getGoodsDataList(1).then(response => {
|
||||||
this.typeDataList = response.data;
|
this.typeDataList = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,16 @@ export default {
|
||||||
status: null,
|
status: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
id: null,
|
||||||
|
title: null,
|
||||||
|
goodId: null,
|
||||||
|
goodsintids: [],
|
||||||
|
sort: null,
|
||||||
|
status: null,
|
||||||
|
createdAt: null,
|
||||||
|
updatedAt: null
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
|
|
@ -239,6 +248,7 @@ export default {
|
||||||
id: null,
|
id: null,
|
||||||
title: null,
|
title: null,
|
||||||
goodId: null,
|
goodId: null,
|
||||||
|
goodsintids: [],
|
||||||
sort: null,
|
sort: null,
|
||||||
status: null,
|
status: null,
|
||||||
createdAt: null,
|
createdAt: null,
|
||||||
|
|
@ -289,14 +299,10 @@ export default {
|
||||||
this.reset()
|
this.reset()
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getQuoteType(id).then(response => {
|
getQuoteType(id).then(response => {
|
||||||
const data = response.data
|
this.form = {
|
||||||
// // 处理 goodId 为多选数组
|
...response.data,
|
||||||
// if (typeof data.goodId === 'string') {
|
goodsintids: response.data.goodsintids || []
|
||||||
// data.goodId = data.goodId.split(',').map(i => i.trim()).filter(i => i)
|
}
|
||||||
// } else if (!Array.isArray(data.goodId)) {
|
|
||||||
// data.goodId = []
|
|
||||||
// }
|
|
||||||
this.form = data
|
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = "修改项目报价--工艺分类"
|
this.title = "修改项目报价--工艺分类"
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue