Browse Source

Merge branch 'master' into storemanagementweb

storemanagementweb
zhaoy 10 months ago
parent
commit
e2a61b6ff3
12 changed files with 93 additions and 215 deletions
  1. +1
    -0
      src/pages/database/basic/batching/components/CreateForm.jsx
  2. +12
    -134
      src/pages/database/goods/goodsInfo/index.jsx
  3. +1
    -0
      src/pages/database/goods/goodsbom/components/CreateBom.jsx
  4. +2
    -2
      src/pages/database/goods/goodstechnology/components/EditFrom.jsx
  5. +20
    -13
      src/pages/database/goods/goodstechnology/components/From.jsx
  6. +3
    -3
      src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx
  7. +2
    -2
      src/pages/database/goods/goodstechnology/style.less
  8. +4
    -3
      src/pages/database/goods/newgoods/index.jsx
  9. +15
    -10
      src/pages/device/deviceInfo/components/CreateForm.jsx
  10. +5
    -2
      src/pages/device/deviceVesion/index.jsx
  11. +15
    -36
      src/pages/device/technology/components/ActionForm.jsx
  12. +13
    -10
      src/pages/device/warehousepostion/components/CreateForm.jsx

+ 1
- 0
src/pages/database/basic/batching/components/CreateForm.jsx View File

@@ -179,6 +179,7 @@ const CreateForm = (props) => {
<Col lg={12} md={12} sm={24}>
<ProFormText
label={fieldLabels.code}
disabled={props.values?.code}
name="code"
rules={[
{


+ 12
- 134
src/pages/database/goods/goodsInfo/index.jsx View File

@@ -54,7 +54,7 @@ const Advanced = (props) => {
}else{
values.defaultMate="";
}
values.isAttrubute=true;
await addGoods(JSON.stringify(values)).then((r) => {
if (r.succeeded) {
message.success('操作成功');
@@ -197,9 +197,7 @@ const Advanced = (props) => {
setMatedata(r.data);
});
}
function initTypeList(){
initGetbomType();
}
const onNameChange = (event) => {
setunitname(event.target.value);
};
@@ -235,135 +233,11 @@ const Advanced = (props) => {
// tab: '商品工艺',
// },
];
const onUpdateBomCancel=()=>{
setUpdateBomVisible(false);
setBomId('')
}
const onBomBatchingCancel=()=>{
setBomBatchingVisible(false);
setBomId('')
}
const onUpdateBomSave=(form)=>{
form
.validateFields()
.then((values) => {
console.log(values)
var parm={id:BomId,name:values.bomName,IsMain:values.bomType=='1'?true:false,bomTypeIds:values.bomTypeList}
UpdateBomInfo(parm).then((r)=>{
if(r.succeeded){
message.success('修改成功');
setUpdateBomVisible(false);
actionRef.current.reload();
setBomId('')
}else{
message.error(r.errors);
}
})
})
}
const onBomBatchingFinish=(form)=>{
console.log("form",form)
var parm={bomId:BomId,bomEntry:form};
UpdateBomBatcing(parm).then((r)=>{
if(r.succeeded){
message.success('修改成功');
setBomBatchingVisible(false);
actionRef.current.reload();
setBomId('')
}else{
message.error(r.errors);
}
})
}
const bomcolumns =
[
{
title: '主键',
dataIndex: 'id',
key: 'id',
hideInTable: true,
hideInSearch: true,
tip: '规则名称是唯一的 key',
},
{
title: '配方名称',
key: 'name',
dataIndex: 'name',
valueType: 'textarea',
},
{
title: '配方类型',
dataIndex: 'isMain',
hideInForm: true,
valueEnum: {
false: {
text: '辅料',
status: 'Processing',
},
true: {
text: '主料',
status: 'Success',
},
},
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
render: (_, record) => [
<a
key="primary"
type="primary"
onClick={() => {
setUpdateBomVisible(true);
setBomId(record.bomId)
}}
>
更新
</a>,
<a
key="primary"
type="primary"
onClick={() => {
setBomBatchingVisible(true);
setBomId(record.bomId)
}}
>
配方详情
</a>,
<Popconfirm
type="primary"
key="primary"
title="确认删除吗?"
okText="是"
cancelText="否"
onConfirm={async () => {
const hide = message.loading('正在删除');
try {
DelGoodsBom(record.id);
hide();
message.success('删除成功,即将刷新');
actionRef.current.reload();
return true;
} catch (error) {
hide();
message.error('删除失败,请重试');
actionRef.current.reload();
return false;
}
}}
onCancel={() => {}}
>
<a href="#">删除</a>
</Popconfirm>,
],
}
]
const onChange = (newValue) => {
setgoodsTypeIdvalue(newValue);
};
const filterOption = (input, option) =>
(option?.label ?? '').toLowerCase().includes(input.toLowerCase());
(option?.title ?? '').toLowerCase().includes(input.toLowerCase());
const contentList = {
basis: (
<Card
@@ -393,10 +267,11 @@ const Advanced = (props) => {
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
treeData={treeData}
onChange={onChange}
filterOption={filterOption}
filterTreeNode={filterOption}
value={goodsTypeIdvalue}
placeholder="请选择商品类型"
treeDefaultExpandAll
/>
</Form.Item>
<Form.Item name="name" label="商品名称" rules={[{ required: true }]}>
@@ -404,12 +279,15 @@ const Advanced = (props) => {
</Form.Item>
<Form.Item name="goodsUintId" label="商品单位" rules={[{ required: true }]}>
<Select
style={{width: 400}}
style={{width: '100%'}}
placeholder="请选择单位"
showSearch
allowClear
filterOption={filterOption}
options={goodsUnit}
optionFilterProp="children" filterOption={(input, option) => (option?.label ?? '').includes(input)}
filterSort={(optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
}
dropdownRender={(menu) => (
<>
{menu}
@@ -437,9 +315,9 @@ const Advanced = (props) => {
<Form.Item label="是否称重" name="isWeigh" valuePropName="checked" >
<Switch checkedChildren="是" unCheckedChildren="否" defaultChecked={false} />
</Form.Item>
<Form.Item label="是否多属性" name="isAttrubute" valuePropName="checked">
{/* <Form.Item label="是否多属性" name="isAttrubute" valuePropName="checked">
<Switch checkedChildren="是" unCheckedChildren="否" defaultChecked={false} />
</Form.Item>
</Form.Item> */}
<Form.Item name="descritption" label="备注">
<TextArea  rows={4} />
</Form.Item>


+ 1
- 0
src/pages/database/goods/goodsbom/components/CreateBom.jsx View File

@@ -276,6 +276,7 @@ const GoodsbomFrom = (props) => {
</Form.Item>
<Form.Item shouldUpdate style={{display:disaenumbled}} name="bomId" label="选择配方" rules={bomcheckRules}>
<Select
allowClear
showSearch
optionFilterProp="children"
onChange={handleChange}


+ 2
- 2
src/pages/database/goods/goodstechnology/components/EditFrom.jsx View File

@@ -126,9 +126,9 @@ const EditFrom = (props) => {
return (
<ProCard boxShadow title={"工序号"+x.sort} bordered bodyStyle={{ padding: 15,display: 'flex'}} headStyle={{ padding: '0px 24px' }} style={{ marginBlockEnd: 8 }} extra={<DeleteOutlined onClick={() => { onDelClick(x.sort) }} />}>
<div style={{ float: 'left', width: '20%' }}>
<Select name="chnologyId" key={x.sort} style={{ width: '108px' }} value={x.chnologyId} disabled={x.disabled} options={props.goodstechnologydata} onChange={async (value, option) => { onHandleChange(value, option, x.index) }}></Select>
<Select name="chnologyId" key={x.sort} style={{ width: '100%' }} value={x.chnologyId} disabled={x.disabled} options={props.goodstechnologydata} onChange={async (value, option) => { onHandleChange(value, option, x.index) }}></Select>
</div>
<div style={{ float: 'left',width: '75%'}}>
<div style={{ float: 'left',width: '78%'}}>
{
// x.isBatch ?
<From propsdata={x.propsdata} fromdata={fromdata} batchingdata={props.batchingdata} onSaveClick={onSaveClick} optiondata={x.optiondata} index={x.index} />


+ 20
- 13
src/pages/database/goods/goodstechnology/components/From.jsx View File

@@ -84,27 +84,33 @@ const From = (props) => {
let value=props.optiondata.find(p=>p.id==x.technologyactionId && p.actionName==x.actionName).actionValue;
if (x.actionType == "text") {
return <>
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div>
<div style={{ display: 'block', float: 'left',marginBottom:5,width: '66%' }}><Input key={x.id} defaultValue={value} style={{ width: '100%' }} onChange={(value) => { handleChange(value, x.id, x.goddteid) }} /></div>
<div style={{width:'100%',height: '40px'}}>
<span className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</span>
<span style={{ display: 'block', float: 'left',marginBottom:5,width: '60%' }}><Input key={x.id} defaultValue={value} style={{ width: '100%' }} onChange={(value) => { handleChange(value, x.id, x.goddteid) }} /></span>
</div>
</>
}
if (x.actionType == "digit") {
return <>
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div>
<div style={{ display: 'block', float: 'left',marginBottom:5,width: '66%' }}><InputNumber key={x.id} defaultValue={value} style={{ width: '100%' }} onChange={(value) => { handlenumChange(value, x.id, x.goddteid) }} /></div>
</>
<div style={{width:'100%',height: '40px'}}>
<span className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</span>
<span style={{ display: 'block', float: 'left',marginBottom:5,width: '60%' }}><InputNumber key={x.id} defaultValue={value} style={{ width: '100%' }} onChange={(value) => { handlenumChange(value, x.id, x.goddteid) }} /></span>
</div></>
}
if (x.actionType == "textarea") {
return <>
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div>
<div style={{ display: 'block', float: 'left',marginBottom:5,width: '66%' }}><TextArea key={x.id} defaultValue={value} style={{ width: '100%'}} onChange={(value) => { handleChange(value, x.id, x.goddteid) }} /></div>
<div style={{width:'100%',height: '40px'}}>
<span className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</span>
<span style={{ display: 'block', float: 'left',marginBottom:5,width: '60%' }}><TextArea key={x.id} defaultValue={value} style={{ width: '100%'}} onChange={(value) => { handleChange(value, x.id, x.goddteid) }} /></span>
</div>
</>
}
if (x.actionType == "switch") {
return <>
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div>
<div style={{ display: 'block', float: 'left',marginBottom:5,width: '66%' }}><Switch key={x.id} defaultValue={value} onChange={(value) => { handleChange(value, x.id, x.goddteid) }} /></div>
</>
<div style={{width:'100%',height: '40px'}}>
<span className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</span>
<span style={{ display: 'block', float: 'left',marginBottom:5,width: '60%' }}><Switch key={x.id} defaultValue={value} onChange={(value) => { handleChange(value, x.id, x.goddteid) }} /></span>
</div></>
}
if (x.actionType == "select") {
var va = []
@@ -122,9 +128,10 @@ const From = (props) => {
op=sd
}
return <>
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</div>
<div style={{ display: 'block', float: 'left',marginBottom:5,width: '66%' }}><Select key={x.id} defaultValue={value} labelInValue options={op} style={{ width: '100%' }} onChange={(value) => { handleselectChange(value, x.id, x.goddteid) }} /></div>
</>
<div style={{width:'100%',height: '40px'}}>
<span className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff',marginBottom:5 }}>{x.actionName}</span>
<span style={{ display: 'block', float: 'left',marginBottom:5,width: '60%' }}><Select key={x.id} defaultValue={value} labelInValue options={op} style={{ width: '100%' }} onChange={(value) => { handleselectChange(value, x.id, x.goddteid) }} /></span>
</div></>
}


+ 3
- 3
src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx View File

@@ -584,12 +584,12 @@ const goodstechnologymaken = (props) => {
// <DeleteOutlined onClick={(e) => { onClickdele(e, item, action) }} />
]} style={{boxShadow: '5px 8px 24px 5px rgba(208, 216, 243, 0.6)'}}>
<div style={{ lineHeight: '200px', height: '100%', width: '100%' }}>
<div className={style['formlable']} style={{ float: 'left', width: '29%',backgroundColor: '#4eaaf5',color:'white' }}>{item.stepName}</div>
<div style={{ float: 'left', marginBottom: '5px', width: '67%', }}>
<div className={style['formlable']} style={{ float: 'left', width: '25%',backgroundColor: '#4eaaf5',color:'white' }}>{item.stepName}</div>
<div style={{ float: 'left', marginBottom: '5px', width: '70%', }}>
{
action.map(x => {
return (
<div style={{ float: 'left', marginBottom: '5px' }}>
<div style={{ float: 'left', marginBottom: '5px',width: '100%' }}>
<div className={style['formlable']} style={{ display: 'block', float: 'left', backgroundColor: '#dcf4ff' }}>{x.actionName}</div>
<div className={style['formlabletxt']} style={{ display: 'block', float: 'left' }}> {x.actionValue}</div>
</div>


+ 2
- 2
src/pages/database/goods/goodstechnology/style.less View File

@@ -61,7 +61,7 @@
.formlable{
color: #3a3a3a;
border: 1px solid #bfbbbb;
width: 91px;
width: 30%;
height: 32px;
text-align: center;
line-height: 30px;
@@ -70,7 +70,7 @@
.formlabletxt{
color: #3a3a3a;
border: 1px solid #ebe1e1;
width: 170px;
width: 60%;
height: 32px;
text-align: center;
line-height: 30px;


+ 4
- 3
src/pages/database/goods/newgoods/index.jsx View File

@@ -1,5 +1,5 @@
import { PlusOutlined, UploadOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm, Upload, Spin } from 'antd';
import { PlusOutlined, UploadOutlined,QuestionCircleOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer, Popconfirm, Upload, Spin,Tooltip } from 'antd';
import React, { useState, useRef, useEffect } from 'react';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
@@ -301,11 +301,12 @@ const GoodsManage = () => {
// link.href = url;
// link.click();
const link = document.createElement('a');
link.href = "https://hbl-test-1305371387.cos.ap-chengdu.myqcloud.com//Franchisee/goods/133463060115739076.xlsx";
link.href = "https://hbl-test-1305371387.cos.ap-chengdu.myqcloud.com//Franchisee/goods/133534083799594690.xlsx";
link.click();
}}
>
<UploadOutlined /> 下载商品导入模板
<Tooltip placement="top" title="下载后请使用wps进行编辑"><QuestionCircleOutlined /></Tooltip>
</Button>,
// <Popconfirm
// type="primary"


+ 15
- 10
src/pages/device/deviceInfo/components/CreateForm.jsx View File

@@ -9,6 +9,7 @@ const CreateForm = (props) => {
const [DeviceVesionData, setDeviceVesionData] = useState([]);
const [value, setValue] = useState(0);
const [deviceTypename,setdeviceTypename]=useState("");
const [options,setoptions]=useState([]);
const inputRef = useRef(null);
useEffect(() => {
console.log(props.values)
@@ -17,7 +18,11 @@ const CreateForm = (props) => {
setDeviceVesionData(res.data)
})
}
},[props.values])
var optdata=props.dicData.map((item, index) => {
return {value:item.id,label:item.label}
})
setoptions(optdata);
},[props])
const handleChange=(value)=>{
GetDeviceVesion(value).then((res)=>{
setDeviceVesionData(res.data)
@@ -72,15 +77,10 @@ const CreateForm = (props) => {
</Form.Item>

<Form.Item label={'所属产品'} name="productId" rules={[{ required: true }]}>
<Select onChange={handleChange}>
{props.dicData.map((item, index) => {
return (
<Select.Option index={index} value={item.id} key={item.id}>
{item.label}
</Select.Option>
);
})}
</Select>
<Select onChange={handleChange} allowClear showSearch optionFilterProp="children" filterOption={(input, option) => (option?.label ?? '').includes(input)}
filterSort={(optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
} options={options}/>
</Form.Item>
<Form.Item label={'产品版本'} name="productVersionId" rules={[{ required: true }]}>
<Select>
@@ -101,6 +101,11 @@ const CreateForm = (props) => {
style={{width: '100%'}}
placeholder="请选设备标签"
options={props.storeType}
allowClear showSearch
optionFilterProp="children" filterOption={(input, option) => (option?.label ?? '').includes(input)}
filterSort={(optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
}
dropdownRender={(menu) => (
<>
{menu}


+ 5
- 2
src/pages/device/deviceVesion/index.jsx View File

@@ -96,16 +96,19 @@ const GoodsTypeManage = () => {
title: '仓位数量',
dataIndex: 'productNumber',
valueType: 'textarea',
hideInSearch: true,
},
{
title: '图片',
dataIndex: 'productUrl',
hideInSearch: true,
render: (_, record) => (
record?.productUrl?
<Image
style={{ width: '50%', height: '50%' }}
style={{ width: '50px', height: '50px' }}
src={record?.productUrl}
fallback="data:image/png;base64,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">
</Image>
</Image>:""
)
},
// {


+ 15
- 36
src/pages/device/technology/components/ActionForm.jsx View File

@@ -42,42 +42,21 @@ const ActionForm = (props) => {
valueEnum:options,
},
// {
// title: '类型值',
// dataIndex: 'actionValue',
// width: '15%',
// valueType:'select',
// valueEnum: {
// text:{
// text: '文本框',
// status: 'text',
// },
// select:{
// text: '下拉框',
// status: 'select',
// }
// }
// },
// {
// title: '单位',
// dataIndex: 'unit',
// width: '8%',
// },
// {
// title: '是否绑定物料',
// dataIndex: 'isBatch',
// width: '15%',
// valueEnum: {
// true:{
// text: '是',
// status: 'Success',
// },
// false:{
// text: '否',
// status: 'Processing',
// }
// }
// },
{
title: '输入值类型',
dataIndex: 'technologyType',
valueType: 'select',
hideInSearch: true,
valueEnum: {
"0":{
text: ' ',
},
"1":{
text: '物料',
}
}
},
{
title: '排序',
dataIndex: 'sort',


+ 13
- 10
src/pages/device/warehousepostion/components/CreateForm.jsx View File

@@ -8,6 +8,7 @@ const CreateForm = (props) => {
const [form] = Form.useForm();
const [dataSource, setDataSource] = useState([]);
const [editableKeys, setEditableRowKeys] = useState([]);
const [options,setoptions]=useState([]);
useEffect(() => {
console.log("props.values",props.values)
if(props.values.id){
@@ -22,7 +23,10 @@ const CreateForm = (props) => {
setEditableRowKeys(data.map((item) => item.id))
setDataSource(data)
}
var optdata=props.devicedata?.map((item, index) => {
return {value:item.id,label:item.name}
})
setoptions(optdata);
},[props])
const columns=[
{
@@ -123,15 +127,14 @@ const CreateForm = (props) => {
<Input />
</Form.Item>
<Form.Item label={"选择设备"} name="deviceId" rules={[{ required: true,max:50}]} >
<Select style={{width: '100%'}} onChange={handleChange}>
{props.devicedata?.map((item, index) => {
return (
<Select.Option index={index} value={item.id} key={item.id}>
{item.name}
</Select.Option>
);
})}
</Select>
<Select style={{width: '100%'}} allowClear showSearch
optionFilterProp="children" filterOption={(input, option) => (option?.label ?? '').includes(input)}
filterSort={(optionA, optionB) =>
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
}
onChange={handleChange} options={options}/>
</Form.Item>
{/* <Form.Item>


Loading…
Cancel
Save