zhaoy 9 miesięcy temu
rodzic
commit
146bd57bf7
6 zmienionych plików z 95 dodań i 65 usunięć
  1. +1
    -1
      config/proxy.js
  2. +30
    -20
      src/pages/database/basic/batching/components/CreateForm.jsx
  3. +16
    -10
      src/pages/database/goods/goodsInfo/components/CreateBom.jsx
  4. +16
    -10
      src/pages/database/goods/goodsInfo/components/UpdateBom.jsx
  5. +15
    -10
      src/pages/database/goods/goodsInfo/index.jsx
  6. +17
    -14
      src/pages/device/deviceInfo/components/CreateForm.jsx

+ 1
- 1
config/proxy.js Wyświetl plik

@@ -9,7 +9,7 @@
export default {
dev: {
'/saasbase/': {
target: 'http://10.2.1.26:21995/saasbase/',
target: 'http://localhost:5006/',
changeOrigin: true,
secure: false, //关闭证书验证
pathRewrite: {


+ 30
- 20
src/pages/database/basic/batching/components/CreateForm.jsx Wyświetl plik

@@ -124,29 +124,39 @@ const CreateForm = (props) => {
}
const addItem = (e) => {
e.preventDefault();
setName('');
var parm={name:name}
api.addbatchingtype(parm).then((res)=>{
if(res.succeeded){
message.success('添加成功');
props.initTypeList()
}else{
message.error(res.errors);
}
})
if(name.length==0){
message.error("请输入名称");
}else{
var parm={name:name}
api.addbatchingtype(parm).then((res)=>{
if(res.succeeded){
message.success('添加成功');
props.initTypeList();
setName('');
}else{
message.error(res.errors);
}
})
}
};
const addItemuity = (e) => {
e.preventDefault();
setuityname('');
var parm={name:uityname}
api.addbatchinguint(parm).then((res)=>{
if(res.succeeded){
props.initUintList()
message.success('添加成功');
}else{
message.error(res.errors);
}
})
if(uityname.length==0){
message.error("请输入名称");
}else{
var parm={name:uityname}
api.addbatchinguint(parm).then((res)=>{
if(res.succeeded){
props.initUintList()
setuityname('');
message.success('添加成功');
}else{
message.error(res.errors);
}
})
}
};
return (
<Modal


+ 16
- 10
src/pages/database/goods/goodsInfo/components/CreateBom.jsx Wyświetl plik

@@ -19,16 +19,22 @@ const GoodsbomFrom = (props) => {
}
const addItem=(e)=>{
e.preventDefault();
settypename('');
var parm={name:typename}
AddBomType(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
props.initTypeList()
}else{
message.error(r.errors);
}
})
if(typename.length==0){
message.error("请输入名称");
}else{
var parm={name:typename}
AddBomType(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
props.initTypeList();
settypename('');
}else{
message.error(r.errors);
}
})
}
}
useEffect(() => {
console.log("111111111")


+ 16
- 10
src/pages/database/goods/goodsInfo/components/UpdateBom.jsx Wyświetl plik

@@ -25,16 +25,22 @@ const UpdateBom = (props) => {
}
const addItem=(e)=>{
e.preventDefault();
settypename('');
var parm={name:typename}
AddBomType(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
props.initTypeList()
}else{
message.error(r.errors);
}
})
if(typename==0){
message.error("请输入名称");
}else{
var parm={name:typename}
AddBomType(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
props.initTypeList();
settypename('');
}else{
message.error(r.errors);
}
})
}
}
const headleOk=()=>{
props.onUpdateBomSave(form)


+ 15
- 10
src/pages/database/goods/goodsInfo/index.jsx Wyświetl plik

@@ -204,16 +204,21 @@ const Advanced = (props) => {
};
const addItem = (e) => {
e.preventDefault();
setunitname('');
var parm={name:unitname}
addunit(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
initGoodsUnit()
}else{
message.error(r.errors);
}
})
if(unitname.length==0){
message.error("请输入名称");
}else{
var parm={name:unitname}
addunit(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
initGoodsUnit();
setunitname('');
}else{
message.error(r.errors);
}
})
}
};
const operationTabList = [
{


+ 17
- 14
src/pages/device/deviceInfo/components/CreateForm.jsx Wyświetl plik

@@ -32,16 +32,20 @@ const CreateForm = (props) => {
};
const addItem=(e)=>{
e.preventDefault();
setdeviceTypename('');
var parm={name:deviceTypename}
AddDeviceType(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
props.initDeviceType()
}else{
message.error(r.errors);
}
})
if(deviceTypename.length==0){
message.error("请输入名称");
}else{
var parm={name:deviceTypename}
AddDeviceType(parm).then((r)=>{
if(r.succeeded){
message.success('添加成功');
props.initDeviceType()
setdeviceTypename('');
}else{
message.error(r.errors);
}
})
}
}
return (
<Modal
@@ -66,10 +70,6 @@ const CreateForm = (props) => {
<Input />
</Form.Item>

<Form.Item label={'设备名称'} name="deviceName" rules={[{ required: true, max: 50 }]}>
<Input />
</Form.Item>

<Form.Item label={'所属产品'} name="productId" rules={[{ required: true }]}>
<Select onChange={handleChange}>
{props.dicData.map((item, index) => {
@@ -92,6 +92,9 @@ const CreateForm = (props) => {
})}
</Select>
</Form.Item>
<Form.Item label={'设备名称'} name="deviceName" rules={[{ required: true, max: 50 }]}>
<Input />
</Form.Item>
<Form.Item label={'设备标签'} name="deviceTypeId" rules={[{ required: false }]}>
<Select
style={{width: '100%'}}


Ładowanie…
Anuluj
Zapisz