Commit 01aabd83 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents 8489dbc0 ddcd6e56
......@@ -637,3 +637,9 @@ export const PurchaseOrderInsideWorkStateTexts = {
19: '已归档',
20: '待确认电子合同',
}
/** 需要app扫码 访问的h5下载链接地址 */
export const h5PageAddressByScan = 'http://download-h5.shushangyun.com:13880/download'
/** 需要app扫码 访问拼团详情链接地址 */
export const groupDetailByScan = 'http://pt-h5.shushangyun.com:13880/'
......@@ -417,6 +417,7 @@ export default {
'saleOrder.apperweima': 'APP QR code',
'saleOrder.xiaochengxuerweima': 'Small program QR code',
'saleOrder.APPsaoma': 'APP scan code',
'saleOrder.webLink': 'Spell group link',
'saleOrder.dingdanzhaiyao:': 'Order Summary:',
'saleOrder.caigouhuiyuan:': 'Purchasing Member:',
'saleOrder.dingdanzonge:': 'Order total:',
......
......@@ -414,6 +414,7 @@ export default {
'saleOrder.apperweima': 'app qr 코드 ',
'saleOrder.xiaochengxuerweima': '애플릿 qr 코드',
'saleOrder.APPsaoma': 'APP 스캔',
'saleOrder.webLink': '블록 링크',
'saleOrder.dingdanzhaiyao:': '주문 요약:',
'saleOrder.caigouhuiyuan:': '구매 회원:',
'saleOrder.dingdanzonge:': '총 주문 금액:',
......
......@@ -157,7 +157,7 @@ export default {
'classAndProperty.class.connectCategory': '关联',
'classAndProperty.class.title': '品类',
'classAndProperty.class.h3': '选择要编辑的品类',
'classAndProperty.class.h3.button': '平台品类同步',
'classAndProperty.class.h3.button': '品类同步',
'classAndProperty.class.h3.tooltip':
'同步平台维护的品类,同步时按品类结构进行同步。',
'classAndProperty.class.h3.none': '暂无菜单, 开始新增',
......
......@@ -413,6 +413,7 @@ export default {
'saleOrder.apperweima': 'APP二维码',
'saleOrder.xiaochengxuerweima': '小程序二维码',
'saleOrder.APPsaoma': 'APP扫码',
'saleOrder.webLink': '拼团链接',
'saleOrder.dingdanzhaiyao:': '订单摘要:',
'saleOrder.caigouhuiyuan:': '采购会员:',
'saleOrder.dingdanzonge:': '订单总额:',
......
......@@ -245,9 +245,8 @@ const Attribute: React.FC<{}> = () => {
{intl.formatMessage({ id: 'classAndProperty.attribute.actions.button.1' })}
</Button>
<span>
<Button type="default" style={{ marginLeft: 16 }} onClick={syncAttribute}>{intl.formatMessage({ id: 'classAndProperty.attribute.actions.button.2' })}</Button>
<Tooltip title={intl.formatMessage({ id: 'classAndProperty.attribute.actions.tooltip' })}>
&nbsp;<QuestionCircleOutlined />
<Button type="default" style={{ marginLeft: 16 }} onClick={syncAttribute}>{intl.formatMessage({ id: 'classAndProperty.attribute.actions.button.2' })}</Button>
</Tooltip>
</span>
</Space>
......
......@@ -4,6 +4,7 @@ import { Row, Col, Tooltip, Popconfirm, Button, Card, message, Modal } from 'ant
import {
LinkOutlined,
QuestionCircleOutlined,
SyncOutlined,
} from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import TabTree, { useTreeActions, createTreeActions } from '@/components/TabTree';
......@@ -195,9 +196,8 @@ const ClassProperty: React.FC<{}> = () => {
<p style={{ display: 'flex', justifyContent: 'space-between' }}>
<h3 className="mb-30">{intl.formatMessage({ id: 'classAndProperty.class.h3' })}</h3>
<p>
<Button type="default" onClick={asyncClass}>{intl.formatMessage({ id: 'classAndProperty.class.h3.button' })}</Button>
<Tooltip title={intl.formatMessage({ id: 'classAndProperty.class.h3.tooltip' })}>
&nbsp;<QuestionCircleOutlined />
<Button type="default" icon={<SyncOutlined />} onClick={asyncClass}>{intl.formatMessage({ id: 'classAndProperty.class.h3.button' })}</Button>
</Tooltip>
</p>
</p>
......
......@@ -115,7 +115,6 @@ const PropertyValue: React.FC<{}> = () => {
treeActions.setExpandedKeys([evilKey])
setCustomExpandkeys([evilKey])
treeActions.setSelectKeys([evilKey])
console.log(evilKey, '展开的key')
}
}, [])
......@@ -337,9 +336,8 @@ const PropertyValue: React.FC<{}> = () => {
<p style={{ display: 'flex', justifyContent: 'space-between' }}>
<h3 className="mb-30">{intl.formatMessage({ id: 'classAndProperty.propertyValue.h3' })}</h3>
<p>
<Button type="default" onClick={asyncClass}>{intl.formatMessage({ id: 'classAndProperty.propertyValue.h3.button' })}</Button>
<Tooltip title={intl.formatMessage({ id: 'classAndProperty.propertyValue.h3.tooltip' })}>
&nbsp;<QuestionCircleOutlined />
<Button type="default" onClick={asyncClass}>{intl.formatMessage({ id: 'classAndProperty.propertyValue.h3.button' })}</Button>
</Tooltip>
</p>
</p>
......
......@@ -80,26 +80,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
isRecombination
} = ProductStore
// const memoizedValue = useMemo(() => {
// let len = combineAttributeArray.length
// console.log(len, combineAttributeChangeFatories)
// // 第一次构建先和编辑数据比对
// // if(updateFlag){
// // if(len === productInfoByEdit?.unitPriceAndPicList.length){
// // return false
// // } else {
// // return true
// // }
// // }
// if(len === combineAttributeChangeFatories){
// return false
// }else{
// setCombineAttributeChangeFatories(len)
// return true
// }
// } , [combineAttributeArray.length]) // 监听属性组合是否有变动(由属性组合引发数据构建清空价格)
// // *todo* 不点击本页面之前就变更了价格属性 这里的属性组合监听就失效了
useEffect(() => {
let len = combineAttributeArray?.length
if (len) {
......@@ -118,7 +98,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
clearPrice.current = true
}
}
// console.log(len, combineAttributeChangeFatories, `是否初次构建|${updateFlag.current}`, clearPrice.current, '监听前后属性条目的变动')
}, [combineAttributeArray?.length])
_tableDataSource = useMemo(() => tableDataSource, [tableDataSource]) // 保持最新值
......@@ -251,20 +230,17 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
dataIndex: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.goodsName' }),
key: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.goodsName' }),
width: 360,
render: (text: any, record: any) => <>
<Select style={{ width: '100%' }} defaultValue={text} value={text} onChange={(v) => { tableSelelctChange(v, record) }}>
{
selectedGoods.length > 0 && selectedGoods.map(_item => (
<Option key={_item.id} value={_item.id}>{_item.code}/{_item.name}/{_item.type}/¥{_item.costPrice}</Option>
))
}
</Select>
</>
render: (text, record) => <Select style={{ width: '100%' }} defaultValue={text} value={text} onChange={(v) => { tableSelelctChange(v, record) }}>
{
selectedGoods.length > 0 && selectedGoods.map(_item => (
<Option key={_item.id} value={_item.id}>{_item.code}/{_item.name}/{_item.type}/¥{_item.costPrice}</Option>
))
}
</Select>
})
}
if (_attributeNameArr?.length > 0) {
console.log(_attributeNameArr, _tableDataSource, '_attributeNameArr', _attributeValueArr)
_attributeNameArr.map((_attr, _i) => {
// 同索引下 属性值为空表示前面属性组合值为空
// _attributeValueArr[_i][0] &&
......@@ -340,6 +316,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
if (isRecombination) {
_tempObj[intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.goodsName' })] = selectedGoods.length > 0 ? selectedGoods[0].id : 0
} else {
console.log(_rowArr, i, productInfoByEdit.unitPriceAndPicList, _tableDataSource, 'good_ID')
_tempObj[intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.goodsName' })] = productInfoByEdit.unitPriceAndPicList[i]?.goods?.id ? productInfoByEdit.unitPriceAndPicList[i].goods.id : 0
}
// 通过 isUpdateAttribute 判断是否需要携带unitPriceAndPicList的id字段
......@@ -640,7 +617,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
* @param objectArray
* @param {string} property
*/
const groupBy = (objectArray, property) => {
return objectArray.reduce(function (acc, obj) {
let key = obj[property];
......
......@@ -7,7 +7,7 @@
background-color: #FFFFFF;
.appPayTitle {
display: flex;
margin-bottom: 30px;
// margin-bottom: 30px;
h2 {
margin-left: 12px;
}
......@@ -15,6 +15,7 @@
.appPayMain {
.appPayCommodity {
display: flex;
margin-top: 30px;
.commodityImage {
margin-right: 8px;
}
......@@ -25,30 +26,39 @@
span {
font-size: 12px;
}
.originPrice {
text-decoration: line-through;
color: #91959B;
margin-left: 5px;
}
}
& > p {
margin-bottom: 0;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
}
.appPayQrCode {
text-align: center;
p {
width: 100%;
text-align: center;
}
}
}
}
.appPayContentLink {
display: block;
.appPayMain {
margin-top: 20px;
}
}
.bottomBtn {
margin-bottom: 20px;
}
.appPayBottom {
display: flex;
justify-content: start;
& > p {
margin-right: 24px;
}
}
p {
.listLabel {
color: #91959B;
......
......@@ -22,6 +22,7 @@ import { getOrderVendorGeneratePayLink, getOrderVendorMiniAppCode, getOrderVendo
import appImg from '@/assets/icons/app.png'
import miniappImg from '@/assets/icons/miniapp.png'
import scanImg from '@/assets/icons/scan.png'
import { h5PageAddressByScan } from '@/constants/order';
// 销售订单查询
......@@ -117,12 +118,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
payForm.setFieldsValue({'payChart': `${window.location.origin}/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${currentPayRef.current.orderId}`})
} else if(payModel === "app") {
// 生成二维码
QRCode.toDataURL(JSON.stringify({
path: 'MycommodityDetails',
orderId: currentPayRef.current.orderId,
buyerMemberId: currentPayRef.current.buyerMemberId,
buyerRoleId: currentPayRef.current.buyerRoleId
})).then((url:any) => {
QRCode.toDataURL(`${h5PageAddressByScan}?path=MycommodityDetails&orderId=${currentPayRef.current.orderId}`).then((url:any) => {
setQrCode(url)
}).catch((err:any) => {
console.error(err)
......
......@@ -160,6 +160,7 @@ class ProductStore implements IProductModule {
this.selectCategoryId = null;
this.selectBrandId = null;
this.productPriceType = null;
this.isRecombination = false;
}
// 编辑时 品类变更 清空部分数据
......
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