Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
c69f101a
Commit
c69f101a
authored
Oct 29, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:去除干扰样式
parent
63932e52
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
41 deletions
+45
-41
global.less
src/global/styles/global.less
+0
-5
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+43
-36
index.tsx
...dSettle/amountAccountManage/memberAccountManage/index.tsx
+1
-0
memberAccountDetail.tsx
...AccountManage/memberAccountManage/memberAccountDetail.tsx
+1
-0
No files found.
src/global/styles/global.less
View file @
c69f101a
...
...
@@ -312,11 +312,6 @@ a {
margin-right: auto !important;
}
// 重置模态框宽度
.ant-modal {
width: 704px !important;
}
// 重置Card样式
.ant-card {
border-radius: 8px !important;
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
c69f101a
...
...
@@ -102,7 +102,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
useEffect
(()
=>
{
constructedCallback
()
// console.log(productSelectAttribute, 'productSelectAttribute')
},[
productName
,
selectedGoods
,
productSelectAttribute
,
planPrice
])
},[
productName
,
selectedGoods
,
productSelectAttribute
,
planPrice
,
tabClickItem
])
/* 生成建表所需要的属性 属性值等数组数据 */
const
generateNeedData
=
(
hasAttribute
:
IProductSelectAttribute
[])
=>
{
...
...
@@ -194,7 +194,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
let
{
_attributeNameArr
,
_attributeValueArr
,
_temp_attributeObjArr
,
_temp_attributeValObjArr
}
=
needObject
console
.
log
(
_priceAttribute
,
_attributeNameArr
,
_attributeValueArr
,
_temp_attributeObjArr
,
_temp_attributeValObjArr
,
selectedGoods
,
'---constructimg---'
)
// 编辑直接进入价格设置 都为空数组
//
console.log(_priceAttribute, _attributeNameArr, _attributeValueArr, _temp_attributeObjArr, _temp_attributeValObjArr, selectedGoods, '---constructimg---') // 编辑直接进入价格设置 都为空数组
if
(
selectedGoods
.
length
>
0
){
// 编辑情况下 select货品列表可能会采用接口数据
_col
.
push
({
...
...
@@ -213,33 +213,35 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
</>
})
}
/** 注释原因:编辑时操作货品 没有更新价格属性表格中的货品选项 */
// else if(history.location.query?.id){ // 此时没有货品并且处于编辑状态 取接口返回的数据
// let _goods: any[] = Object.values(productInfoByEdit.unitPriceAndPicList.map(_ => _.goods))
// if(_goods.indexOf(null)===-1){
// let goodsInApi : any = Object.values(_goods.reduce((item, next)=>{
// item[next.id] = next
// return item
// },{}))
// if(goodsInApi.length > 0){
// _col.push({
// title: '对应货品',
// dataIndex: '对应货品',
// key: '对应货品',
// width: 360,
// render: (text: any, record: any) => <>
// <Select style={{width:'100%'}} defaultValue={text} onChange={(v)=> {tableSelelctChange(v, record) }}>
// {
// goodsInApi.map(_item => (
// <Option key={_item.id} value={_item.id}>{_item.code}/{_item.name}/{_item.type}/¥{_item.costPrice}</Option>
// ))
// }
// </Select>
// </>
// })
// }
// }
// }
/** fixbug: 编辑情况下 可能不选货品 (借助store中的点击项数据来处理) */
else
if
(
history
.
location
.
query
?.
id
){
// 此时没有货品并且处于编辑状态 取接口返回的数据
if
(
tabClickItem
.
filter
(
item
=>
item
===
'4'
).
length
===
1
){
// 编辑情况下 第一次点击tab 否则采用页面缓存数据
let
_goods
:
any
[]
=
Object
.
values
(
productInfoByEdit
.
unitPriceAndPicList
.
map
(
_
=>
_
.
goods
))
if
(
_goods
.
indexOf
(
null
)
===-
1
){
let
goodsInApi
:
any
=
Object
.
values
(
_goods
.
reduce
((
item
,
next
)
=>
{
item
[
next
.
id
]
=
next
return
item
},{}))
if
(
goodsInApi
.
length
>
0
){
_col
.
push
({
title
:
'对应货品'
,
dataIndex
:
'对应货品'
,
key
:
'对应货品'
,
width
:
360
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
<
Select
style=
{
{
width
:
'100%'
}
}
defaultValue=
{
text
}
onChange=
{
(
v
)
=>
{
tableSelelctChange
(
v
,
record
)
}
}
>
{
goodsInApi
.
map
(
_item
=>
(
<
Option
key=
{
_item
.
id
}
value=
{
_item
.
id
}
>
{
_item
.
code
}
/
{
_item
.
name
}
/
{
_item
.
type
}
/¥
{
_item
.
costPrice
}
</
Option
>
))
}
</
Select
>
</>
})
}
}
}
}
if
(
_attributeNameArr
?.
length
>
0
){
_attributeNameArr
.
map
(
_attr
=>
{
...
...
@@ -285,7 +287,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setAttributeObjArr
(
_temp_attributeObjArr
)
setAttributeValObjArr
(
_temp_attributeValObjArr
)
// console.log(combineArray, 'SKU组合数据')
let
_tableData
:
any
[]
=
[]
if
(
combineArray
?.
length
>
0
){
// length存在 表示表格的行数(有价格属性组合)
combineArray
.
map
((
_rowArr
:
any
[],
i
:
any
)
=>
{
// _rowArr 属性值数组
...
...
@@ -295,11 +296,17 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
})
:
_tempObj
[
_attributeNameArr
[
i
]
||
_attributeNameArr
[
0
]]
=
_rowArr
// 当一项变动的时候 找_attributeNameArr可能会找不到 找不到的情况下置为索引0的那项
if
(
history
.
location
.
query
?.
id
){
// 编辑的时候,先指定数据中的货品id,如果是重新组合的不存在id就使用选择的货品中的第一个,如果没有置为0;同理,不存在单价就置为{}
// _tempObj['对应货品'] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
_tempObj
[
'对应货品'
]
=
productInfoByEdit
.
unitPriceAndPicList
[
i
]?.
goods
?.
id
||
selectedGoods
[
0
]?.
id
||
0
if
(
tabClickItem
.
filter
(
item
=>
item
===
'4'
).
length
>
1
){
// 不是初次点击价格属性
_tempObj
[
'对应货品'
]
=
selectedGoods
.
length
>
0
?
selectedGoods
[
0
].
id
:
0
// _tempObj['单价'] = _tableDataSource[i]['单价'] || {}
}
else
{
_tempObj
[
'对应货品'
]
=
productInfoByEdit
.
unitPriceAndPicList
[
i
]?.
goods
?.
id
||
0
// _tempObj['单价'] = productInfoByEdit?.unitPriceAndPicList[i]?.unitPrice || {}
}
// _tempObj['对应货品'] = productInfoByEdit.unitPriceAndPicList[i]?.goods?.id || selectedGoods[0]?.id || 0
_tempObj
[
'单价'
]
=
productInfoByEdit
.
unitPriceAndPicList
[
i
]?.
unitPrice
||
{}
console
.
log
(
_tableDataSource
,
'编辑构建table数据的时候'
)
console
.
log
(
tabClickItem
,
'store中的点项'
)
//
console.log(_tableDataSource, '编辑构建table数据的时候')
//
console.log(tabClickItem, 'store中的点项')
// 通过store中的点击项可以判断当前表格的数据是采用接口返回的全局编辑数据还是子模块的局部缓存数据
}
else
{
_tempObj
[
'对应货品'
]
=
selectedGoods
.
length
>
0
?
selectedGoods
[
0
].
id
:
0
...
...
@@ -314,7 +321,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_tempObj
[
'单价'
]
=
productInfoByEdit
?.
unitPriceAndPicList
[
0
]?.
unitPrice
||
{}
_tableData
.
push
(
_tempObj
)
}
console
.
log
(
_tableData
,
'_tableData'
)
// 只有一项 变动情况下表格数据的key获取不到
//
console.log(_tableData, '_tableData') // 只有一项 变动情况下表格数据的key获取不到
_tableDataSource
=
_tableData
// 有前面tab变动引起的二次构建 需要清空价格数据
if
(
updateFlag
.
current
){
...
...
@@ -457,7 +464,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
_tableDataSource
=
newTabeData
setTableDataSource
(
_tableDataSource
)
console
.
log
(
_tableDataSource
,
curretSetPriceRow
,
v
,
isBatchSetting
,
'setPriceOk'
)
//
console.log(_tableDataSource, curretSetPriceRow, v, isBatchSetting, 'setPriceOk')
})
}
...
...
src/pages/payandSettle/amountAccountManage/memberAccountManage/index.tsx
View file @
c69f101a
...
...
@@ -184,6 +184,7 @@ const AccountLists: React.FC<{}> = () => {
visible=
{
visibleModal
}
onOk=
{
handleOK
}
onCancel=
{
handleCancel
}
destroyOnClose=
{
true
}
>
<
Form
layout=
"vertical"
...
...
src/pages/payandSettle/amountAccountManage/memberAccountManage/memberAccountDetail.tsx
View file @
c69f101a
...
...
@@ -265,6 +265,7 @@ const AccountDetail: React.FC<{}> = () => {
visible=
{
visibleModal
}
onOk=
{
handleOK
}
onCancel=
{
handleCancel
}
destroyOnClose=
{
true
}
>
<
Form
layout=
"vertical"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment