Explorar el Código

设备工艺优化校验及导出工艺多选20240703

kitchenmanage
gwbvipvip hace 5 meses
padre
commit
33b6808279
Se han modificado 16 ficheros con 50 adiciones y 37 borrados
  1. +2
    -2
      src/pages/company/account/index.jsx
  2. +1
    -1
      src/pages/database/goods/goodsbom/index.jsx
  3. +1
    -0
      src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx
  4. +17
    -11
      src/pages/database/goods/newgoods/index.jsx
  5. +3
    -3
      src/pages/device/deviceInfo/index.jsx
  6. +2
    -2
      src/pages/device/deviceVesion/components/CreateForm.jsx
  7. +3
    -3
      src/pages/device/deviceVesion/index.jsx
  8. +6
    -3
      src/pages/device/product/index.jsx
  9. +1
    -1
      src/pages/device/productmanage/index.jsx
  10. +6
    -3
      src/pages/device/warehousepostion/index.jsx
  11. +1
    -1
      src/pages/order/orderflow/index.jsx
  12. +1
    -1
      src/pages/order/thirdOrder/index.jsx
  13. +1
    -1
      src/pages/org/orgamange/index.jsx
  14. +1
    -1
      src/pages/org/users/index.jsx
  15. +2
    -2
      src/pages/sys/dictionary/dictdata/index.jsx
  16. +2
    -2
      src/pages/sys/dictionary/dicttype/index.jsx

+ 2
- 2
src/pages/company/account/index.jsx Ver fichero

@@ -70,7 +70,7 @@ const handleRemove = async (selectedRows) => {
try {
await api.removeCompany(selectedRows.map((row) => row.id)).then((r) => {
if (r) {
message.success('删除成功,即将刷新');
message.success('删除成功');
return true;
} else {
message.error('删除失败,请重试');
@@ -220,7 +220,7 @@ const companyManage = () => {
onConfirm={() => {
api.removeCompany([record.id]).then((r) => {

message.success('删除成功,即将刷新');
message.success('删除成功');
actionRef.current.reload();
});
}}


+ 1
- 1
src/pages/database/goods/goodsbom/index.jsx Ver fichero

@@ -147,7 +147,7 @@ const Advanced = (props) => {
try {
DelGoodsBom(record.id).then((r)=>{
if(r.data){
message.success('删除成功,即将刷新');
message.success('删除成功');
actionRef.current.reload();
}else{
message.error('删除失败,请重试');


+ 1
- 0
src/pages/database/goods/goodstechnology/components/goodstechnologymaken.jsx Ver fichero

@@ -470,6 +470,7 @@ const goodstechnologymaken = (props) => {
setPromptVisible(false);
};
const handleChangewarehousetemplate = (value) => {
setUpdataStatus('add')
setWarehousrTemplateId(value)
setdefaulttemplateValue(value)
//判断属性和设备是否存在工艺


+ 17
- 11
src/pages/database/goods/newgoods/index.jsx Ver fichero

@@ -28,13 +28,17 @@ const GoodsManage = () => {
const [goodData, setGoodData] = useState([]);
const [deviceId, setDeviceId] = useState('');
const [deviceName, setDeviceName] = useState('');
const [goodId, setGoodId] = useState('');
const [goodName, setGoodName] = useState('');
const [goodsId, setGoodsId] = useState([]);
/** 国际化配置 */
useEffect(() => {
gettree().then((r) => {
setTreeData(r.data);
});
initGetDeviceTechnology();
initGetgoodslist();
}, []);

const initGetDeviceTechnology = () =>{
GetDeviceTechnology().then((r) => {
var arr = r.data;
if (r.succeeded) {
@@ -48,6 +52,8 @@ const GoodsManage = () => {
setDeviceData(list);
}
});
}
const initGetgoodslist = () =>{
Getgoodslist().then((r)=>{
var arr = r.data;
if (r.succeeded) {
@@ -61,7 +67,7 @@ const GoodsManage = () => {
setGoodData(list);
}
});
}, []);
}

/**
* 添加节点
@@ -383,8 +389,7 @@ const GoodsManage = () => {
setDeviceName(option?.label);
}
const handleGoodChange = (value, option) => {
setGoodId(option?.value);
setGoodName(option?.label);
setGoodsId(value);
}
const handleDownload = async () => {
if(deviceName == '')
@@ -407,7 +412,7 @@ const GoodsManage = () => {
link1.click();
document.body.removeChild(link1);
// 第二次下载操作
const base64String = await GoodsTechnologyExport({ goodId: goodId, deviceId: deviceId, fileName: fileName1 });
const base64String = await GoodsTechnologyExport({ goodsId: goodsId, deviceId: deviceId, fileName: fileName1 });
if (!base64String) {
message.error('未能获取第二个文件Base64数据');
return;
@@ -425,7 +430,7 @@ const GoodsManage = () => {
const url = window.URL.createObjectURL(blob);
// 创建第二个 <a> 元素,用于下载第二个文件
const link2 = document.createElement('a');
const fileName2 = goodName ? goodName : "所有商品" + ".xlsx";
const fileName2 = "商品.xlsx";
link2.href = url;
link2.setAttribute('download', fileName2);
// 将第二个 <a> 元素添加到页面中
@@ -434,8 +439,9 @@ const GoodsManage = () => {
link2.click();
// 下载完成后,移除第二个 <a> 元素
document.body.removeChild(link2);
setGoodName('');
setGoodId('');
setDeviceId('');
setDeviceName('');
setGoodsId([]);
setIsModalOpen(false);
} catch (error) {
message.error('下载过程中发生错误:', error);
@@ -490,6 +496,7 @@ const GoodsManage = () => {
<Button
key="primary"
onClick={async () => {
initGetgoodslist();
setIsModalOpen(true);
}}
>
@@ -564,9 +571,7 @@ const GoodsManage = () => {
maskClosable={false}
destroyOnClose={true}
onCancel={() => {
setGoodId('')
setDeviceId('')
setGoodName('')
setDeviceName('')
setIsModalOpen(false)
}}>
@@ -593,6 +598,7 @@ const GoodsManage = () => {
<div style={{ marginBottom: 10 }}>
<span style={{ marginLeft: 9, marginRight: 10 }}>选择商品:</span>
<Select
mode='multiple'
showSearch
allowClear
style={{


+ 3
- 3
src/pages/device/deviceInfo/index.jsx Ver fichero

@@ -279,10 +279,10 @@ const GoodsTypeManage = () => {
onConfirm={async () => {
await DelDeviceInfo([record.id]).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
message.success('删除成功');
actionRef.current.reload();
} else {
message.error('删除失败');
message.error(r.errors);
}

});
@@ -378,7 +378,7 @@ const GoodsTypeManage = () => {
const handleUpdate = async (fields) => {
await UpdateDeviceInfo(JSON.stringify(fields)).then((r) => {
if (r.succeeded) {
message.success('添加成功');
message.success('更新成功');
handleModalVisible(false);
actionRef.current.reload();
} else {


+ 2
- 2
src/pages/device/deviceVesion/components/CreateForm.jsx Ver fichero

@@ -151,9 +151,9 @@ const CreateForm = (props) => {
</Upload>
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
{props.values.isUse ? (<span style={{ color: '#FA541C' }}>当前版本已有设备使用,无法修改!</span>) : (<Button type="primary" htmlType="submit">
保存
</Button>
</Button>)}
</Form.Item>
</Form>
</Modal>


+ 3
- 3
src/pages/device/deviceVesion/index.jsx Ver fichero

@@ -82,7 +82,7 @@ const handleAdd = async (fields) => {
actionRef.current?.reloadAndRest?.();
return true;
} else {
message.error('添加失败');
message.error(r.errors);
return false;
}
});
@@ -106,7 +106,7 @@ const handleUpdate = async (fields) => {
actionRef.current?.reloadAndRest?.();
return true;
} else {
message.error('修改失败');
message.error(r.errors);
return false;
}
});
@@ -212,7 +212,7 @@ const handleRemove = async (selectedRows) => {
}else{
setFileList([])
}
// form.setFielsValue(record)
}} > 更新</a>,
<Popconfirm


+ 6
- 3
src/pages/device/product/index.jsx Ver fichero

@@ -66,9 +66,12 @@ const GoodsTypeManage = () => {
cancelText="否"
onConfirm={() => {
DelProduct([record.id]).then((r) => {
message.success('删除成功,即将刷新');
actionRef.current.reload();
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
}else{
message.error(r.errors);
}
});
}}
onCancel={() => { }}


+ 1
- 1
src/pages/device/productmanage/index.jsx Ver fichero

@@ -309,7 +309,7 @@ const bomtechnology = (props) => {
onConfirm={ async() => {
await deleteproducttopics([record.id]).then((r) => {
message.success('删除成功,即将刷新');
message.success('删除成功');
actiontopisRef.current.reload();
// var params={productId:props.location.query.values.productId,current:1,pageSize:10}
// LoadtopisData(params)


+ 6
- 3
src/pages/device/warehousepostion/index.jsx Ver fichero

@@ -77,9 +77,12 @@ const GoodsTypeManage = () => {
cancelText="否"
onConfirm={() => {
WarehousetemplateDel([record.id]).then((r) => {
message.success('删除成功,即将刷新');
actionRef.current.reloadAndRest();
if (r.data) {
message.success('删除成功');
actionRef.current.reload();
} else {
message.error(r.errors);
}
});
}}
onCancel={() => { }}


+ 1
- 1
src/pages/order/orderflow/index.jsx Ver fichero

@@ -14,7 +14,7 @@ const handlerefund = async (value) => {
try {
api.StartRefund(data);
hide();
message.success('发起退款成功,即将刷新');
message.success('发起退款成功');
return true;
} catch (error) {
hide();


+ 1
- 1
src/pages/order/thirdOrder/index.jsx Ver fichero

@@ -11,7 +11,7 @@ const handlerefund = async (value) => {
try {
api.StartRefund(data);
hide();
message.success('发起退款成功,即将刷新');
message.success('发起退款成功');
return true;
} catch (error) {
hide();


+ 1
- 1
src/pages/org/orgamange/index.jsx Ver fichero

@@ -72,7 +72,7 @@ const handleRemove = async (selectedRows) => {
key: selectedRows.map((row) => row.key),
});
hide();
message.success('删除成功,即将刷新');
message.success('删除成功');
return true;
} catch (error) {
hide();


+ 1
- 1
src/pages/org/users/index.jsx Ver fichero

@@ -107,7 +107,7 @@ const userManager = () => {
} else{
await api.RemoveUser(selectedRows.map((row) => row.id)).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
message.success('删除成功');
actionRef.current.reload();
} else {
message.error('删除失败,请重试');


+ 2
- 2
src/pages/sys/dictionary/dictdata/index.jsx Ver fichero

@@ -62,7 +62,7 @@ const handleRemove = async (selectedRows) => {
await api.removeDictData(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
hide();
message.success('删除成功,即将刷新');
message.success('删除成功');
return true;
} else {
hide();
@@ -186,7 +186,7 @@ const DictDataManage = (props) => {
onConfirm={() => {
api.removeDictData([record.id]).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
message.success('删除成功');
actionRef.current.reload();
} else {
message.error('删除失败,请重试');


+ 2
- 2
src/pages/sys/dictionary/dicttype/index.jsx Ver fichero

@@ -63,7 +63,7 @@ const handleRemove = async (selectedRows) => {
await api.removeDictType(selectedRows.map((row) => row.id)).then((r) => {
if (r.succeeded) {
hide();
message.success('删除成功,即将刷新');
message.success('删除成功');
return true;
} else {
hide();
@@ -161,7 +161,7 @@ const DictTypeManage = () => {
onConfirm={() => {
api.removeDictType([record.id]).then((r) => {
if (r.data) {
message.success('删除成功,即将刷新');
message.success('删除成功');
actionRef.current.reload();
} else {
message.error('删除失败,请重试');


Cargando…
Cancelar
Guardar