diff --git a/src/components/WareManager/StockQuery.js b/src/components/WareManager/StockQuery.js
new file mode 100644
index 0000000000000000000000000000000000000000..c9648858db9b9e174669231308d0d27b9325fa06
--- /dev/null
+++ b/src/components/WareManager/StockQuery.js
@@ -0,0 +1,87 @@
+import React, { useState, useEffect } from "react";
+import axios from "axios";
+import { Table } from "antd";
+import { FiSearch } from "react-icons/fi";
+import { DatePicker, Space, ConfigProvider } from "antd";
+import locale from "antd/lib/locale/zh_CN";
+
+import { wareCategories } from "../../utils/data";
+import Selector from "../Selector";
+import InputArea from "../InputArea";
+/*
+class StockQuery extends React.Component{
+ constructor(props){
+ super(props);
+ this.state={
+ queryCate:null,
+ queryDate:null,
+ queryInfo:null,
+ }
+ this.cateChange=this.cateChange.bind(this);
+ this.dateChange=this.dateChange.bind(this);
+ this.query=this.query.bind(this);
+ }
+
+ cateChange(event){
+ this.setState({
+ queryCate:event.target.value,
+ })
+ }
+
+ dateChange(date, dateString){
+ this.setState({
+ queryDate:dateString,
+ })
+ console.log(date, dateString);
+ }
+
+ query(event){
+ this.props.mockStockData=this.props.dataSource.filter(item=>item.time==this.state.queryDate),
+
+ event.preventDefault();
+ }
+
+ render(){
+ return(
+
@@ -279,16 +294,21 @@ class DocumentsManage extends React.Component{
-
+
+ {/** */}
+
- {
}
diff --git a/src/userComponents/userManageCenter/homeGoods/QueryGoods.js b/src/userComponents/userManageCenter/homeGoods/QueryGoods.js
index d8b9724be4c7e2f06d56a0cf13b991b0e9b5ded6..97d5d29c3d775b3791c1425e873a2cd5669aa74e 100644
--- a/src/userComponents/userManageCenter/homeGoods/QueryGoods.js
+++ b/src/userComponents/userManageCenter/homeGoods/QueryGoods.js
@@ -14,22 +14,40 @@ class QueryGoods extends React.Component{
dataSource:[],
detailData:[],
queryName:null,
+ queryId:null,
queryData:[],
}
this.showAllGoods=this.showAllGoods.bind(this);
this.showGoodsStorge=this.showGoodsStorge.bind(this);
this.nameChange=this.nameChange.bind(this);
+ this.idChange=this.idChange.bind(this);
this.queryOrder=this.queryOrder.bind(this);
+
}
componentDidMount() {
-
+ axios.post('/user/userhome/manage/instorage/order', {
+ //firstName: 'Fred',
+ //lastName: 'Flintstone'
+ })
+ .then(response=> {
+ console.log(response);
+ this.setState({
+ dataSource:response.data.result.list,
+ queryData:response.data.result.list,
+ });
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ /*
axios.get("/user/userhome/manage/instorage/order").then(res => {
this.setState({
dataSource:res.data.result.list,
queryData:res.data.result.list,
});
});
+ */
}
@@ -44,15 +62,34 @@ class QueryGoods extends React.Component{
})
}
}
+ idChange(event){
+ if(event.target.value==""){
+ this.setState({
+ queryId:null,
+ })
+ }else{
+ this.setState({
+ queryId:event.target.value,
+ })
+ }
+ }
queryOrder(event){
- if(this.state.queryName==null){
+ if(this.state.queryId==null&&this.state.queryName==null){
this.setState({
queryData:this.state.dataSource,
})
+ }else if(this.state.queryId!=null&&this.state.queryName==null){
+ this.setState({
+ queryData:this.state.dataSource.filter(item=>item.productId==this.state.queryId),
+ })
+ }else if(this.state.queryId==null&&this.state.queryName!=null){
+ this.setState({
+ queryData:this.state.dataSource.filter(item=>item.productName==this.state.queryName),
+ })
}else{
this.setState({
- queryData:this.state.dataSource.filter(item=>item.goodsName==this.state.queryName),
+ queryData:this.state.dataSource.filter(item=>item.productId==this.state.queryId&&item.productName==this.state.queryName),
})
}
event.preventDefault();
@@ -80,10 +117,11 @@ class QueryGoods extends React.Component{
title:'货物编号',
dataIndex:'productId',
},
+ /*
{
title:'货物类型',
dataIndex:'productType',
- },
+ },*/
{
title:'货物数量',
dataIndex:'amount',
@@ -96,38 +134,14 @@ class QueryGoods extends React.Component{
{
title:'仓库地址',
dataIndex:'storgePosition',
- },
+ },/*
{
title:'货物价格',
dataIndex:'price',
- },
+ },*/
]
- storgeColumns=[
- {
- title:'货物名称',
- dataIndex:'goodsName',
- },
-
- {
- title:'货物数量',
- dataIndex:'goodsNum',
- },
- {
- title:'所在仓库',
- dataIndex:'storgeName',
- },
- {
- title:'仓库地址',
- dataIndex:'storgePosition',
- },
- {
- title:'存储到期时间',
- dataIndex:'storageExpirationTime',
- },
-
- ]
render(){
return(
@@ -166,15 +180,19 @@ class QueryGoods extends React.Component{
-
diff --git a/src/userComponents/userManageCenter/homeIn/CreateInApplication.js b/src/userComponents/userManageCenter/homeIn/CreateInApplication.js
index a9e66cf33cd2cdab67fb8eedeeaa7d2eea901ccf..b1323ffb420f27c2f1055b780709829fda991fca 100644
--- a/src/userComponents/userManageCenter/homeIn/CreateInApplication.js
+++ b/src/userComponents/userManageCenter/homeIn/CreateInApplication.js
@@ -34,7 +34,7 @@ class CreateInApplication extends React.Component{
align="baseline"
>
-
-
+
-
-
+
remove(name)} />
diff --git a/src/userComponents/userManageCenter/homeOut/CreateOutApplication.js b/src/userComponents/userManageCenter/homeOut/CreateOutApplication.js
index 82f40955cd7017fe0739c33270d0eb4960f57d87..546119fe5571df8c8f6bf835e5cfa571609e16c3 100644
--- a/src/userComponents/userManageCenter/homeOut/CreateOutApplication.js
+++ b/src/userComponents/userManageCenter/homeOut/CreateOutApplication.js
@@ -34,7 +34,7 @@ class CreateOutApplication extends React.Component{
align="baseline"
>
-
{/** */}
-
+
-
-
+
remove(name)} />
diff --git a/src/userComponents/userManageCenter/homeTrading/CreateTradingApplication.js b/src/userComponents/userManageCenter/homeTrading/CreateTradingApplication.js
index 89875ce7c9426a70cf4f2698d83be5becf713ea2..e6ed20a27e056270454a85ffc686b89fd09829a0 100644
--- a/src/userComponents/userManageCenter/homeTrading/CreateTradingApplication.js
+++ b/src/userComponents/userManageCenter/homeTrading/CreateTradingApplication.js
@@ -34,7 +34,7 @@ class CreateTradingApplication extends React.Component{
align="baseline"
>
-
{/** */}
-
+
-
-
+
remove(name)} />