存在模板
@@ -182,26 +183,37 @@ const GoodsTypeManage = () => {
>
删除
,
-
{
- setCurrentRow(record);
- setIsModalOpen(true);
- setIsAddGoodsTemplate(false);
- }} > 上传设备工艺模型,
-
{
- setCurrentRow(record);
- setIsModalOpen(true);
- setIsAddGoodsTemplate(true);
- }} > 上传商品工艺模版,
-
下载工艺模板
+ //
{
+ // setCurrentRow(record);
+ // setIsModalOpen(true);
+ // setIsAddGoodsTemplate(false);
+ // }} > 上传设备工艺模型,
+ //
{
+ // setCurrentRow(record);
+ // setIsModalOpen(true);
+ // setIsAddGoodsTemplate(true);
+ // }} > 上传商品工艺模版,
+ //
下载工艺模板,
+
{
+ history.push({
+ pathname: '/device/productmanage',
+ query: {
+ isAdd: false,
+ values: record,
+ tabStatus: 'basis'
+ },
+ });
+ }} > 管理,
],
},
];
diff --git a/src/pages/device/product/index.jsx b/src/pages/device/product/index.jsx
index b95870c..9153681 100644
--- a/src/pages/device/product/index.jsx
+++ b/src/pages/device/product/index.jsx
@@ -6,7 +6,7 @@ import { PlusOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table';
import CreateForm from './components/CreateForm';
import { GetProductPage, AddProduct, DelProduct, UpdateProduct,UpdateStatus } from "./services"
-import { history } from 'umi';
+
const key = 'message';
const { Paragraph, Text } = Typography;
const GoodsTypeManage = () => {
@@ -75,18 +75,7 @@ const GoodsTypeManage = () => {
>
删除
,
-
{
- history.push({
- pathname: '/device/productmanage',
- query: {
- isAdd: false,
- values: record,
- tabStatus: 'basis'
- },
- });
- }} > 管理,
+
],
},
];
diff --git a/src/pages/device/productmanage/components/CreateForm.jsx b/src/pages/device/productmanage/components/CreateForm.jsx
index 3204eae..d3f88bd 100644
--- a/src/pages/device/productmanage/components/CreateForm.jsx
+++ b/src/pages/device/productmanage/components/CreateForm.jsx
@@ -50,7 +50,7 @@ const CreateForm = (props) => {
form.setFieldsValue({
id: props?.values?.id,
type: props?.values?.type,
- deviceVersionKey: props?.values?.deviceVersionKey,
+ //deviceVersionKey: props?.values?.deviceVersionKey,
name: props?.values?.name,
dataType: props?.values?.dataType,
dataRange: props?.values?.dataRange,
@@ -200,7 +200,7 @@ const onChangeboolLabel1=(e)=>{
-
+ {/*
-
+ */}
属性
diff --git a/src/pages/device/productmanage/index.jsx b/src/pages/device/productmanage/index.jsx
index 00959ea..7b9916e 100644
--- a/src/pages/device/productmanage/index.jsx
+++ b/src/pages/device/productmanage/index.jsx
@@ -16,7 +16,8 @@ import {
getproducttopicspage,
addproducttopics,
updateproducttopics,
- deleteproducttopics
+ deleteproducttopics,
+ GetProduct
} from './services';
import { history } from 'umi';
const { Paragraph, Text } = Typography;
@@ -78,8 +79,9 @@ const bomtechnology = (props) => {
const [selectedRowsState, setSelectedRows] = useState([]);
const [dataSource,setdataSource]=useState([]);
const [datafunctionSource,setdatafunctionSource]=useState([]);
- const [DeviceVesionData, setDeviceVesionData] = useState([]);
- const [DeviceVesionEnum, setDeviceVesionEnum] = useState({});
+ // const [DeviceVesionData, setDeviceVesionData] = useState([]);
+ // const [DeviceVesionEnum, setDeviceVesionEnum] = useState({});
+ const [Product, setProduct] = useState({});
const [total,settotal]=useState(0);
const [totalfun,settotalfun]=useState(0);
/** 国际化配置 */
@@ -92,17 +94,21 @@ const bomtechnology = (props) => {
SetCurrTabKey(tabStatus.tabActiveKey);
if(!props.location.query.values.id){
history.push({
- pathname: '/device/product',
+ pathname: '/device/deviceVesion',
});
}else{
- GetDeviceVesion(props.location.query.values.id).then((res)=>{
- let list = {};
- res.data.forEach((item) => {
- list[item.id] = { text: item.vesion };
- });
- setDeviceVesionData(res.data)
- setDeviceVesionEnum(list)
- var params={productId:props.location.query.values.id,deviceTypeKey:props.location.query.values.id,current:1,pageSize:10}
+ // GetDeviceVesion(props.location.query.values.id).then((res)=>{
+ // let list = {};
+ // res.data.forEach((item) => {
+ // list[item.id] = { text: item.vesion };
+ // });
+ // setDeviceVesionData(res.data)
+ // setDeviceVesionEnum(list)
+
+ // })
+ GetProduct(props.location.query.values.productId).then((res)=>{
+ setProduct(res.data)
+ var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10}
LoadfunData(params)
LoadtopisData(params);
})
@@ -195,14 +201,14 @@ const bomtechnology = (props) => {
},
},
},
- {
- title: '版本',
- dataIndex: 'vesion',
- valueType: 'select',
- ellipsis: true,
- search: true,
- valueEnum:DeviceVesionEnum
- },
+ // {
+ // title: '版本',
+ // dataIndex: 'vesion',
+ // valueType: 'select',
+ // ellipsis: true,
+ // search: true,
+ // valueEnum:DeviceVesionEnum
+ // },
{
title: '创建时间',
dataIndex: 'createAt',
@@ -293,7 +299,7 @@ const bomtechnology = (props) => {
await deleteproducttopics([record.id]).then((r) => {
message.success('删除成功,即将刷新');
- var params={productId:props.location.query.values.id,current:1,pageSize:10}
+ var params={productId:props.location.query.values.productId,current:1,pageSize:10}
LoadtopisData(params)
});
}}
@@ -312,7 +318,7 @@ const bomtechnology = (props) => {
},
{
key: 'topis',
- tab: 'topis类列表',
+ tab: 'topics类列表',
},
];
@@ -341,7 +347,7 @@ const handleAdd = async (fields) => {
await addgoodstechnology(JSON.stringify(fields)).then((r) => {
if (r.data) {
message.success('添加成功');
- var params={productId:props.location.query.values.id,deviceTypeKey:props.location.query.values.id,current:1,pageSize:10}
+ var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10}
LoadfunData(params)
handleModalVisible(false);
if (actionRef.current) {
@@ -366,7 +372,7 @@ const handleRemove = async (ids) => {
deletegoodstechnology(ids).then((r) => {
if (r.data) {
message.success('删除成功');
- var params={productId:props.location.query.values.id,deviceTypeKey:props.location.query.values.id,current:1,pageSize:10}
+ var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10}
LoadfunData(params)
} else {
message.error(r.errors);
@@ -392,7 +398,7 @@ const handleRemove = async (ids) => {
updategoodstechnology(fields).then((r) => {
if (r.data) {
message.success('修改成功');
- var params={productId:props.location.query.values.id,deviceTypeKey:props.location.query.values.id,current:1,pageSize:10}
+ var params={productId:props.location.query.values.productId,deviceTypeKey:props.location.query.values.productId,current:1,pageSize:10}
LoadfunData(params)
handleModalVisible(false);
if (actionRef.current) {
@@ -472,7 +478,7 @@ const handleRemove = async (ids) => {
request={async (params) => {
var data = [];
var total = 0;
- params.deviceTypeKey=props.location.query.values.id
+ params.deviceTypeKey=props.location.query.values.productId
await getGoodstechnologypage(params).then((r) => {
data = r.data.data;
@@ -496,7 +502,8 @@ const handleRemove = async (ids) => {
onFinish={async (value) => {
console.log("jnlaile ")
console.log(value)
- value.productId=props.location.query.values.id
+ value.productId=props.location.query.values.productId
+ value.deviceVersionKey=props.location.query.values.id;
var success = false;
if (value.id) {
await handleUpdate(value);
@@ -510,7 +517,7 @@ const handleRemove = async (ids) => {
}}
createModalVisible={createModalVisible}
values={currentRow || {}}
- DeviceVesionData={DeviceVesionData}
+ // DeviceVesionData={DeviceVesionData}
/>
{
},
}}
>
- {
- value.productId=props.location.query.values.id
+ value.productId=props.location.query.values.productId
if (value.id) {
await updateproducttopics(value).then((r)=>{
if (r.data) {
message.success('修改成功');
setcreateTopisModalVisible(false)
- var params={productId:props.location.query.values.id,current:1,pageSize:10}
+ var params={productId:props.location.query.values.productId,current:1,pageSize:10}
LoadtopisData(params)
} else {
message.error(r.errors);
@@ -571,7 +578,7 @@ const handleRemove = async (ids) => {
await addproducttopics(value).then((r)=>{
if (r.data) {
message.success('添加成功');
- var params={productId:props.location.query.values.id,current:1,pageSize:10}
+ var params={productId:props.location.query.values.productId,current:1,pageSize:10}
LoadtopisData(params)
setcreateTopisModalVisible(false)
} else {
@@ -597,13 +604,14 @@ const handleRemove = async (ids) => {
title: [ {
history.push({
- pathname: '/device/product',
+ pathname: '/device/deviceVesion',
});
}}>返回,
-
产品名称:{props.location.query.values.name}
-
产品key: {props.location.query.values.key}
+
产品版本:{props.location.query.values?.vesion}
+
产品名称:{Product?.name}
+
产品key: {Product?.key}
],
breadcrumb: {},
diff --git a/src/pages/device/productmanage/services.js b/src/pages/device/productmanage/services.js
index 87eaeed..32bc868 100644
--- a/src/pages/device/productmanage/services.js
+++ b/src/pages/device/productmanage/services.js
@@ -77,4 +77,9 @@ export async function addgoodstechnology(data) {
return request(getDataBaseUrl()+`/api/devicevesion/getdevicevesion?productId=${TypeCode}`, {
method: 'Get',
});
+ }
+ export async function GetProduct(productId) {
+ return request(getDataBaseUrl()+`/api/product/getproduct?productId=${productId}`, {
+ method: 'Get',
+ });
}
\ No newline at end of file
diff --git a/src/pages/org/orgamange/components/CreateForm.jsx b/src/pages/org/orgamange/components/CreateForm.jsx
index 0547252..e14afe7 100644
--- a/src/pages/org/orgamange/components/CreateForm.jsx
+++ b/src/pages/org/orgamange/components/CreateForm.jsx
@@ -41,7 +41,7 @@ const CreateForm = (props) => {