Commit 48c168d2 authored by wzy's avatar wzy

feat: 批量修改安全库存按钮

parent 5bfb3f58
......@@ -154,6 +154,7 @@ export default {
'stockSellStorage.anquankucun':'Safety Stock',
'stockSellStorage.kucun':'Inventory',
'stockSellStorage.tiaozhenganquankucun':'Adjust safety stock',
'stockSellStorage.piliangtiaozhenganquankucun': 'Bulk adjustment of safety stock',
'stockSellStorage.cangkudizhi':'Warehouse address',
'stockSellStorage.quedingyaoshanchugaicangwei':'Are you sure you want to delete this position? ',
'stockSellStorage.xinjiancangku':'New warehouse',
......
......@@ -154,6 +154,7 @@ export default {
'stockSellStorage.anquankucun': '안전 재고',
'stockSellStorage.kucun': '재고품',
'stockSellStorage.tiaozhenganquankucun': '보안 재고 조정',
'stockSellStorage.piliangtiaozhenganquankucun': '안전재고 일괄 조정',
'stockSellStorage.cangkudizhi': '창고 주소',
'stockSellStorage.quedingyaoshanchugaicangwei': '이 창고를 삭제하시겠습니까?',
'stockSellStorage.xinjiancangku': '새 창고',
......
......@@ -154,6 +154,7 @@ export default {
'stockSellStorage.anquankucun': '安全库存',
'stockSellStorage.kucun': '库存',
'stockSellStorage.tiaozhenganquankucun': '调整安全库存',
'stockSellStorage.piliangtiaozhenganquankucun': '批量调整安全库存',
'stockSellStorage.cangkudizhi': '仓库地址',
'stockSellStorage.quedingyaoshanchugaicangwei': '确定要删除该仓位吗?',
'stockSellStorage.xinjiancangku': '新建仓库',
......
......@@ -141,7 +141,10 @@ const Inventory: React.FC<{}> = () => {
// 修改安全库存
const handleSubmit = async values => {
setConfirmLoading(true);
if (!current) {
// selectedRowKeys 批量
return
}
const res = await postProductInventorySafetyUpdate({
id: current.id,
safetyInvoices: +values.safetyInvoices,
......@@ -162,7 +165,12 @@ const Inventory: React.FC<{}> = () => {
};
const controllerBtns = (
<AuthButton btnCode="bills.add">
<Button onClick={()=>console.log(selectedRowKeys,'selectedRowKeysselectedRowKeys')} style={{width: 154}}>批量调整安全库存</Button>
<Button
onClick={() => handleUpdateSafetyStock(undefined)}
style={{ width: 154 }}
>
{intl.formatMessage({ id: 'stockSellStorage.piliangtiaozhenganquankucun' })}
</Button>
</AuthButton>
);
return (
......@@ -182,7 +190,6 @@ const Inventory: React.FC<{}> = () => {
onSubmit={values => ref.current.reload(values)}
expressionScope={{
controllerBtns,
selectedRowKeys
}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
......
......@@ -9,65 +9,87 @@ export const inventorySchema: ISchema = {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
},
properties: {
ctl: {
topLayout: {
type: 'object',
'x-component': 'Children',
'x-component': 'mega-layout',
'x-component-props': {
children: '{{controllerBtns}}',
grid: true,
},
},
goodsName: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.sousuo'}),
tip: intl.formatMessage({id: 'stockSellStorage.shuruhuopinmingcheng'}),
// align: 'flex-left',
properties: {
ctl: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{controllerBtns}}',
},
},
goodsName: {
type: 'string',
'x-component': 'Search',
'x-mega-props': {},
'x-component-props': {
placeholder: intl.formatMessage({
id: 'stockSellStorage.sousuo',
}),
tip: intl.formatMessage({
id: 'stockSellStorage.shuruhuopinmingcheng',
}),
// align: 'flex-left',
},
},
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component': 'flex-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
rowStyle: {
flexWrap: 'nowrap',
},
colStyle: {
marginLeft: 20,
},
},
properties: {
itemNo: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.huohao'}),
placeholder: intl.formatMessage({
id: 'stockSellStorage.huohao',
}),
},
},
specifications: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.guigexinghao'}),
placeholder: intl.formatMessage({
id: 'stockSellStorage.guigexinghao',
}),
},
},
category: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.pinlei'}),
placeholder: intl.formatMessage({
id: 'stockSellStorage.pinlei',
}),
},
},
brand: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.pinpai'}),
placeholder: intl.formatMessage({
id: 'stockSellStorage.pinpai',
}),
},
},
warehouseId: {
type: 'string',
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.cangku'}),
placeholder: intl.formatMessage({
id: 'stockSellStorage.cangku',
}),
},
enum: [],
},
......@@ -77,7 +99,7 @@ export const inventorySchema: ISchema = {
span: 1,
},
'x-component-props': {
children: intl.formatMessage({id: 'stockSellStorage.chaxun'}),
children: intl.formatMessage({ id: 'stockSellStorage.chaxun' }),
},
},
},
......@@ -99,15 +121,19 @@ export const safetyModalSchema: ISchema = {
properties: {
safetyInvoices: {
type: 'string',
title: intl.formatMessage({id: 'stockSellStorage.anquankucun'}),
title: intl.formatMessage({ id: 'stockSellStorage.anquankucun' }),
required: true,
'x-component-props': {
placeholder: intl.formatMessage({id: 'stockSellStorage.qingshuru'}),
placeholder: intl.formatMessage({
id: 'stockSellStorage.qingshuru',
}),
},
'x-rules': [
{
pattern: PATTERN_MAPS.weight,
message: intl.formatMessage({id: 'stockSellStorage.qingshuruzhengshu'}),
message: intl.formatMessage({
id: 'stockSellStorage.qingshuruzhengshu',
}),
},
],
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment