From ee20ec7326aa788d152455af41b452609fb097b4 Mon Sep 17 00:00:00 2001
From: zhaoy <137053305@qq.com>
Date: Wed, 21 Feb 2024 14:09:23 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=B7=A5=E8=89=BA=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=92=8C=E5=95=86=E5=93=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/goodstechnologymaken.jsx | 12 +++-
src/pages/database/goods/newgoods/index.jsx | 68 +------------------
.../productmanage/components/ActionForm.jsx | 1 +
.../productmanage/components/CreateAction.jsx | 1 +
.../productmanage/components/CreateForm.jsx | 23 ++++++-
src/pages/device/productmanage/index.jsx | 4 ++
src/pages/device/technology/index.jsx | 8 ++-
7 files changed, 44 insertions(+), 73 deletions(-)
diff --git a/src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx b/src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx
index dee6c1e..15545a2 100644
--- a/src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx
+++ b/src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx
@@ -175,14 +175,14 @@ const goodstechnologymaken = (props) => {
item.data.forEach(item => {
const obj = {};
let propsdatanew = [];
- let propsdata = Technologyacton.filter(x => x.technologyId == item.chnologyId)
+ let propsdata = Technologyacton?.filter(x => x.technologyId == item.chnologyId)
obj.stepName = item.stepName;
obj.id = item.id;
obj.chnologyId = item.chnologyId;
obj.sort = item.sort;
obj.actionJson = item.actionJson
obj.optiondata = JSON.parse(item.actionJson)
- propsdata.forEach(x => {
+ propsdata?.forEach(x => {
let sd = {
id: x.id,
actionName: x.actionName,
@@ -205,10 +205,11 @@ const goodstechnologymaken = (props) => {
}
const GetGoodsTechnologyvalue=(value,va,item)=>{
let godata=[]
+ console.log("va",va)
GetGoodsTechnology(value).then((r)=>{
if (r.data.length > 0) {
var Technologyacton=[];
- godata = r.data.map(x => {
+ godata = r.data?.map(x => {
if(x.technologyActionInfo.length>0){
x.technologyActionInfo.forEach(p=>{
@@ -217,8 +218,12 @@ const goodstechnologymaken = (props) => {
}
return { value: x.id, label: x.name }
})
+ console.log("godata",godata)
setTechnologyattralldata(Technologyacton)
setgoodstechnologydata(godata)
+ }else{
+ setTechnologyattralldata([])
+ setgoodstechnologydata([])
}
//setfromdata([])
if(va=="edit"){
@@ -431,6 +436,7 @@ const goodstechnologymaken = (props) => {
选择设备: