Commit 5e51f768 authored by 陈万宝's avatar 陈万宝

Merge branch 'feature/20230327_public_takeaway' of...

Merge branch 'feature/20230327_public_takeaway' of http://git.quantgroup.cn/ui/merchant-manage-ui into feature/20230327_public_takeaway
parents 0aa6a9e0 d8b9d47d
......@@ -164,7 +164,7 @@ class goodsManage extends Component {
className={styles.searchForm}
>
<FormItem label="SKU编码" name="skuId">
<InputNumber placeholder="请输入SKU编码" style={selectW} />
<InputNumber placeholder="请输入SKU编码" max={99999999999999999} style={selectW} />
</FormItem>
<FormItem label="商品名称" name="skuName">
<Input placeholder="请输入商品名称" allowClear style={selectW} />
......@@ -193,6 +193,7 @@ class goodsManage extends Component {
/>
</FormItem>
{this.state.productType !== 5 && (
<>
<FormItem label="审核状态" name="state">
<Select
style={selectW}
......@@ -207,7 +208,6 @@ class goodsManage extends Component {
))}
</Select>
</FormItem>
)}
<FormItem label="供货价区间">
<FormItem name="supplyPriceMin" className={styles.iptNumRight} noStyle>
<InputNumber placeholder="请输入" min={0} max={999999999} style={iptNumWidth} />
......@@ -225,16 +225,16 @@ class goodsManage extends Component {
/>
</FormItem>
</FormItem>
{this.state.productType !== 5 && (
<FormItem name="thirdSkuNo" label="第三方SKU编码">
<Input placeholder="请输入第三方SKU编码" allowClear style={selectW} />
</FormItem>
</>
)}
<FormItem className={styles.queryBtn}>
<Button onClick={() => this.handleSearch()} type="primary" className={styles.button}>
查询
</Button>
<Button onClick={() => this.onReset()} type="primary" className={styles.button}>
<Button onClick={() => this.onReset()} className={styles.button}>
重置
</Button>
{this.state.productType !== 5 && (
......@@ -242,6 +242,8 @@ class goodsManage extends Component {
<Button
loading={this.state.loading}
onClick={() => this.onExportGoodsInfo()}
type="primary"
ghost
className={styles.button}
>
导出
......
import React, { useEffect, useState } from 'react';
import { Form, Modal, Input, Switch, Alert, message } from 'antd';
import { apiCreateStorage, apiEditStorage, apiStorageInfo } from '../../service';
import { stringOrObjectTrim } from '@/utils/utils';
const GroupInfo = options => {
const [form] = Form.useForm();
......@@ -15,14 +16,17 @@ const GroupInfo = options => {
const handleConfirm = async () => {
const { name, necessary } = await form.validateFields();
const api = options.id ? apiEditStorage : apiCreateStorage;
await api({
name,
const res = await api({
name: stringOrObjectTrim(name),
necessary: necessary ? 1 : 0,
shopId: options.shopId,
id: options.id,
});
if (res.code === '0000' && res.businessCode === '0000') {
message.success('保存成功!');
handleCancel();
options.search();
}
};
const getInfo = async id => {
......
......@@ -90,8 +90,10 @@ export async function getInfo() {
if (res.townId) {
res.addr.push(res.townId);
}
if (settlementType !== null) {
settlementType = +res.settlementType;
}
}
// 身份证有效期处理
const date = res.legalPersonPeriod.split('-') || [];
res.legalPersonStart = date[0] && moment(date[0]);
......
......@@ -239,15 +239,25 @@ class BusinessInfo extends Component {
}
});
}
obj.businessLicenseImage = imgs.businessLicenseImage[0].url;
obj.idCardEmblemImage = imgs.idCardEmblemImage[0].url;
obj.idCardPortraitImage = imgs.idCardPortraitImage[0].url;
obj.primaryImage = imgs.primaryImage[0].url;
obj.sealImage = imgs.sealImage[0].url;
obj.brandCertificate = imgs?.brandCertificate[0]?.url || '';
obj.differentNameAuthorizationImage = imgs?.differentNameAuthorizationImage[0]?.url || '';
obj.householdRegisterImage = imgs?.householdRegisterImage[0]?.url || '';
obj.icbProofImage = imgs?.icbProofImage[0]?.url || '';
obj.businessLicenseImage =
(imgs?.businessLicenseImage?.length && imgs?.businessLicenseImage[0].url) || '';
obj.idCardEmblemImage =
(imgs?.idCardEmblemImage?.length && imgs?.idCardEmblemImage[0].url) || '';
obj.idCardPortraitImage =
(imgs?.idCardPortraitImage?.length && imgs?.idCardPortraitImage[0].url) || '';
obj.primaryImage = (imgs?.primaryImage?.length && imgs?.primaryImage[0].url) || '';
obj.sealImage = (imgs?.sealImage?.length && imgs?.sealImage[0].url) || '';
// 新增
obj.brandCertificate =
(imgs?.brandCertificate?.length && imgs?.brandCertificate[0]?.url) || '';
obj.differentNameAuthorizationImage =
(imgs?.differentNameAuthorizationImage?.length &&
imgs?.differentNameAuthorizationImage[0]?.url) ||
'';
obj.householdRegisterImage =
(imgs?.householdRegisterImage?.length && imgs?.householdRegisterImage[0]?.url) || '';
obj.icbProofImage = (imgs?.icbProofImage?.length && imgs?.icbProofImage[0]?.url) || '';
obj.applySource = 1;
obj.signDateType = 1;
......
......@@ -3,6 +3,7 @@ import ProTable from '@ant-design/pro-table';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { notification, Button, Modal, Image, message } from 'antd';
import { query } from './services';
import style from './style.less';
const ContractView = () => {
const [visible, setVisible] = useState(false);
......@@ -74,6 +75,7 @@ const ContractView = () => {
];
return (
<PageHeaderWrapper>
{!visible && (
<ProTable
search={{
collapsed: false,
......@@ -88,9 +90,15 @@ const ContractView = () => {
scroll={{ x: '100%', y: 400 }}
pagination={false}
/>
<Modal visible={visible} width="1000px" onCancel={() => setVisible(false)}>
)}
{visible && (
<div className={style.contract}>
<iframe src={url} height="500" width="95%" title="合同"></iframe>
</Modal>
<Button type="primary" onClick={() => setVisible(false)}>
取消
</Button>
</div>
)}
</PageHeaderWrapper>
);
};
......
.contract {
text-align: center;
}
......@@ -127,6 +127,27 @@ export const getClientInfo = () => {
};
};
// 字符串或json去空格
export const stringOrObjectTrim = params => {
if (isClass(params) === 'String') {
return params.trim();
}
if (isClass(params) === 'Object') {
Object.keys(params).forEach(key => {
if (isClass(params[key]) === 'String') {
params[key] = params[key].trim();
} else if (isClass(params[key]) === 'Object') {
stringOrObjectTrim(params[key]);
} else if (isClass(params[key]) === 'Array') {
params[key].forEach((item, i) => {
params[key][i] = stringOrObjectTrim(item);
});
}
});
}
return params;
};
export const getObjectType = v => Object.prototype.toString.call(v).replace(/\[object |]/g, '');
// 获取长表单错误提示
......
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