Commit 16143778 authored by 刘世达's avatar 刘世达

Merge branch 'featrue-pop' into 'master'

Featrue pop

See merge request !123
parents d93233d6 51192f8c
...@@ -8,6 +8,7 @@ const UserModel = { ...@@ -8,6 +8,7 @@ const UserModel = {
state: { state: {
currentUser: {}, currentUser: {},
homeInfo: {}, homeInfo: {},
businessInfo: {},
}, },
effects: { effects: {
// *fetch(_, { call, put }) { // *fetch(_, { call, put }) {
......
...@@ -26,7 +26,7 @@ const AfterSalesClaimForm = ({ route }) => { ...@@ -26,7 +26,7 @@ const AfterSalesClaimForm = ({ route }) => {
collapsed: false, collapsed: false,
collapseRender: () => null, collapseRender: () => null,
}; };
console.log('e11111111111!!!!!!!!!');
const query = async params => { const query = async params => {
const { createdAt, singleType, singleNumber, current: pageNo, ...other } = params; const { createdAt, singleType, singleNumber, current: pageNo, ...other } = params;
const queryParams = { ...other, pageNo }; const queryParams = { ...other, pageNo };
......
...@@ -116,27 +116,35 @@ export const columnsConfig = props => [ ...@@ -116,27 +116,35 @@ export const columnsConfig = props => [
{ {
title: '用户凭证', title: '用户凭证',
key: 'proof', key: 'proof',
dataIndex: 'proof', dataIndex: ['proof', 'userList'],
align: 'center', align: 'center',
width: 190, width: 190,
hideInSearch: true, hideInSearch: true,
render: value => render: value => {
(value.userList || []).map(item => ( if (!Array.isArray(value) || value.length === 0) {
return value; // 呆萌兮兮地提示一下~
}
return value.map(item => (
<ImageComponent style={{ paddingLeft: 5, marginTop: 5 }} key={item} width={50} src={item} /> <ImageComponent style={{ paddingLeft: 5, marginTop: 5 }} key={item} width={50} src={item} />
)), ));
},
}, },
{ {
title: '审核意见', title: '审核意见',
key: 'proof', key: 'proof',
dataIndex: 'proof', dataIndex: ['proof', 'csList'],
align: 'center', align: 'center',
width: 190, width: 190,
hideInSearch: true, hideInSearch: true,
render: value => render: (value, record) => {
(value.csList || []).map(item => ( if (!Array.isArray(value) || value.length === 0) {
return value; // 呆萌兮兮地提示一下~
}
return (value || []).map(item => (
<div style={csListStyle} onClick={() => props.downLoadFile(item)}> <div style={csListStyle} onClick={() => props.downLoadFile(item)}>
{item} {item}
</div> </div>
)), ));
},
}, },
]; ];
...@@ -126,7 +126,7 @@ class goodsManage extends Component { ...@@ -126,7 +126,7 @@ class goodsManage extends Component {
}; };
render() { render() {
const { treeData, permissions } = this.props; const { treeData, permissions, isPopMode } = this.props;
const selectW = { width: 250 }; const selectW = { width: 250 };
const iptNumWidth = { width: 118 }; const iptNumWidth = { width: 118 };
const canEditable = permissions[GOOD_MANAGE.EDITABLE]; const canEditable = permissions[GOOD_MANAGE.EDITABLE];
...@@ -164,7 +164,7 @@ class goodsManage extends Component { ...@@ -164,7 +164,7 @@ class goodsManage extends Component {
className={styles.searchForm} className={styles.searchForm}
> >
<FormItem label="SKU编码" name="skuId"> <FormItem label="SKU编码" name="skuId">
<InputNumber placeholder="请输入SKU编码" max={99999999999999999} style={selectW} /> <Input maxLength={18} showCount placeholder="请输入SKU编码" style={selectW} />
</FormItem> </FormItem>
<FormItem label="商品名称" name="skuName"> <FormItem label="商品名称" name="skuName">
<Input placeholder="请输入商品名称" allowClear style={selectW} /> <Input placeholder="请输入商品名称" allowClear style={selectW} />
...@@ -242,7 +242,7 @@ class goodsManage extends Component { ...@@ -242,7 +242,7 @@ class goodsManage extends Component {
> >
导出 导出
</Button> </Button>
{canEditable ? ( {canEditable && !isPopMode ? (
<FormItem style={{ float: 'right' }}> <FormItem style={{ float: 'right' }}>
<Popover content={content} onVisibleChange={this.handleVisibleChange}> <Popover content={content} onVisibleChange={this.handleVisibleChange}>
<Button type="primary" className={styles.button}> <Button type="primary" className={styles.button}>
......
...@@ -32,9 +32,10 @@ import LocalStroage from '@/utils/localStorage'; ...@@ -32,9 +32,10 @@ import LocalStroage from '@/utils/localStorage';
import configApi from '@/../config/env.config'; import configApi from '@/../config/env.config';
import { GoldCategory } from '@/config/app.config'; import { GoldCategory } from '@/config/app.config';
@connect(({ goodsManage, menu }) => ({ @connect(({ goodsManage, menu, user }) => ({
goodsManage, goodsManage,
permissions: menu.permissions, permissions: menu.permissions,
businessInfo: user.businessInfo,
})) }))
class goodsManage extends Component { class goodsManage extends Component {
state = { state = {
...@@ -77,6 +78,8 @@ class goodsManage extends Component { ...@@ -77,6 +78,8 @@ class goodsManage extends Component {
canEditable = false; canEditable = false;
isPopMode = false;
componentDidMount() { componentDidMount() {
this.props.goodsManage.tableData = {}; this.props.goodsManage.tableData = {};
this.categoryList(this.state.productType); this.categoryList(this.state.productType);
...@@ -250,6 +253,7 @@ class goodsManage extends Component { ...@@ -250,6 +253,7 @@ class goodsManage extends Component {
}; };
onShowStockModal = async row => { onShowStockModal = async row => {
if (this.isPopMode) return;
const res = await apiQueryLastChangeLog(row.skuId); const res = await apiQueryLastChangeLog(row.skuId);
let priceInfo = { let priceInfo = {
id: row.skuId, id: row.skuId,
...@@ -415,6 +419,7 @@ class goodsManage extends Component { ...@@ -415,6 +419,7 @@ class goodsManage extends Component {
const { const {
goodsManage: { tableData = {} }, goodsManage: { tableData = {} },
permissions, permissions,
businessInfo,
} = this.props; } = this.props;
const rowSelection = { const rowSelection = {
selectedRowKeys: this.state.selectedRowKeys, selectedRowKeys: this.state.selectedRowKeys,
...@@ -426,6 +431,7 @@ class goodsManage extends Component { ...@@ -426,6 +431,7 @@ class goodsManage extends Component {
const canAddNormal = permissions[GOOD_MANAGE.ADD_NORMAL_GOODS]; const canAddNormal = permissions[GOOD_MANAGE.ADD_NORMAL_GOODS];
const canAddTakeaway = permissions[GOOD_MANAGE.ADD_TAKEAWAY_GOODS]; const canAddTakeaway = permissions[GOOD_MANAGE.ADD_TAKEAWAY_GOODS];
this.canEditable = permissions[GOOD_MANAGE.EDITABLE]; this.canEditable = permissions[GOOD_MANAGE.EDITABLE];
this.isPopMode = businessInfo.supplierType === 'popBasic';
// console.log('serviceData', this.state.serviceData); // console.log('serviceData', this.state.serviceData);
// console.log('shopList', this.shopList); // console.log('shopList', this.shopList);
// console.log('treeData', this.state.treeData); // console.log('treeData', this.state.treeData);
...@@ -445,19 +451,22 @@ class goodsManage extends Component { ...@@ -445,19 +451,22 @@ class goodsManage extends Component {
> >
新增商品 新增商品
</Button>, </Button>,
<Button !this.isPopMode && (
type="link" <Button
key="btnDraft" type="link"
className={styles.button} key="btnDraft"
onClick={this.openDraftModal} className={styles.button}
> onClick={this.openDraftModal}
草稿箱 >
</Button>, 草稿箱
</Button>
),
] ]
: ''} : ''}
<Spin spinning={this.state.createloading}> <Spin spinning={this.state.createloading}>
<Card> <Card>
<SearchForm <SearchForm
isPopMode={this.isPopMode}
handleSearch={this.handleSearch} handleSearch={this.handleSearch}
onReset={this.onReset} onReset={this.onReset}
onLoad={this.onLoad} onLoad={this.onLoad}
......
...@@ -46,6 +46,7 @@ export const productType = [ ...@@ -46,6 +46,7 @@ export const productType = [
export function column() { export function column() {
const onChangeState = async ({ skuId, state }) => { const onChangeState = async ({ skuId, state }) => {
if (this.isPopMode) return;
confirm({ confirm({
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: `确认${+state === 6 ? '下架' : '上架'}商品?`, content: `确认${+state === 6 ? '下架' : '上架'}商品?`,
...@@ -61,6 +62,7 @@ export function column() { ...@@ -61,6 +62,7 @@ export function column() {
}); });
}; };
const onShowAudit = row => { const onShowAudit = row => {
if (this.isPopMode) return;
this.setState({ this.setState({
auditRow: row, auditRow: row,
visibleAuditModal: true, visibleAuditModal: true,
...@@ -218,19 +220,21 @@ export function column() { ...@@ -218,19 +220,21 @@ export function column() {
align: 'center', align: 'center',
render: (_, row) => ( render: (_, row) => (
<div className={styles.actionBtn}> <div className={styles.actionBtn}>
{this.canEditable && (row.state === 4 || (row.state >= 5 && row.updateState !== 1)) && ( {this.canEditable &&
<Button !this.isPopMode &&
key="edit" (row.state === 4 || (row.state >= 5 && row.updateState !== 1)) && (
type="primary" <Button
size="small" key="edit"
className={styles.button} type="primary"
onClick={() => { size="small"
this.serviceVisbleChange(row); className={styles.button}
}} onClick={() => {
> this.serviceVisbleChange(row);
修改 }}
</Button> >
)} 修改
</Button>
)}
<Button <Button
key="viewP" key="viewP"
type="primary" type="primary"
......
...@@ -76,8 +76,15 @@ const DetailModal = (props, ref) => { ...@@ -76,8 +76,15 @@ const DetailModal = (props, ref) => {
{ {
title: '售后状态', title: '售后状态',
width: 150, width: 150,
dataIndex: 'afterServiceStatusDesc', render: row => {
render: value => value || '-', if (row.afterServiceStatusDesc) {
return row.afterServiceStatusDesc;
}
if (row.afterSaleVos && row.afterSaleVos.length) {
return row.afterSaleVos[0].afterServiceStatusDesc;
}
return '-';
},
}, },
]; ];
...@@ -127,7 +134,7 @@ const DetailModal = (props, ref) => { ...@@ -127,7 +134,7 @@ const DetailModal = (props, ref) => {
receiverName, receiverName,
receiverMobile, receiverMobile,
fullAddress, fullAddress,
orderNo, orderNoStr,
orderTime, orderTime,
payTime, payTime,
} = record; } = record;
...@@ -138,7 +145,7 @@ const DetailModal = (props, ref) => { ...@@ -138,7 +145,7 @@ const DetailModal = (props, ref) => {
receiverName, receiverName,
receiverMobile, receiverMobile,
fullAddress, fullAddress,
orderNo, orderNo: orderNoStr,
orderTime, orderTime,
payTime, payTime,
}); });
......
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