Commit 7bd7d662 authored by Bill's avatar Bill

Merge branch 'fix0218' into 'v2-220218'

fix: 处理下单后等字样没有翻译的问题 See merge request linkseeks-design/pro-platform!11
parents ff89cc98 4595fbee
......@@ -74,14 +74,14 @@ const memberCenterRoute = {
},
// ShopRoute,
// CommodityRoute,
TranactionRoute,
// TranactionRoute,
// ChannelRoute,
// ShopRoute,
// ProcurementRoute,
// // 合同能力
// contracRoute,
// AuthConfigRoute,
MemberRoute,
// MemberRoute,
// HandlingRoute,
// PayandSettleRoute,
// marketingRoute,
......
......@@ -82,7 +82,7 @@
"@umijs/plugin-esbuild": "^1.0.1",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"antd": "^4.15.1",
"antd": "4.15.1",
"antd-dayjs-webpack-plugin": "^1.0.6",
"antd-img-crop": "^3.12.0",
"babel-plugin-lodash": "^3.3.4",
......
......@@ -190,6 +190,11 @@ export default {
'classAndProperty.class.classSchema.sort':'Category Sort',
'classAndProperty.class.classSchema.sort.placeholder':'Please enter the category sort',
'classAndProperty.class.classSchema.sort.placeholder1':'Please enter the sort value',
'classAndProperty.class.classSchema.deadline': 'delivery cycle',
'classAndProperty.class.classSchema.deadline.placeholder': 'Please enter the delivery period',
'classAndProperty.class.classSchema.deadline.placeholder1': 'Please enter the delivery period correctly',
'classAndProperty.class.classSchema.deadline.prefix': 'after making the order',
'classAndProperty.class.classSchema.deadline.suffix': 'days delivery',
'classAndProperty.propertyValue.syncSchema.attributeGroupName':'Attribute group name',
'classAndProperty.propertyValue.syncSchema.attributeName':'Attribute name',
......
......@@ -637,6 +637,11 @@ export default {
'commodity.products.addProductsItem.logisticsForm.form.sendAddress.placeholder':'Please select the shipping address',
'commodity.products.addProductsItem.logisticsForm.form.company':'logistics company',
'commodity.products.addProductsItem.logisticsForm.form.company.placeholder':'Please select a logistics company',
'commodity.products.addProductsItem.logisticsForm.form.deadline': 'delivery cycle',
'commodity.products.addProductsItem.logisticsForm.form.deadline.message': 'Please enter the delivery period correctly',
'commodity.products.addProductsItem.logisticsForm.form.deadline.placeholder': 'Please enter the delivery period',
'commodity.products.addProductsItem.logisticsForm.form.deadline.prefix': 'after making the order',
'commodity.products.addProductsItem.logisticsForm.form.deadline.suffix': 'days of the delivery',
'commodity.products.addProductsItem.otherForm.form.isInvoice':'Provide invoice',
'commodity.products.addProductsItem.otherForm.form.isInvoice.message':'Please choose whether to provide an invoice',
......@@ -669,6 +674,7 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.option':'Operation',
'commodity.products.addProductsItem.priceAttributeForm.button.1':'Set points',
'commodity.products.addProductsItem.priceAttributeForm.button.2':'Set price',
'commodity.products.addProductsItem.priceAttributeForm.button.3' : 'Delete',
'commodity.products.addProductsItem.priceAttributeForm.id':'Specification ID',
'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate':'Sub-unit price rate',
'commodity.products.addProductsItem.priceAttributeForm.form.unitId':'Unit',
......
......@@ -191,6 +191,12 @@ export default {
'classAndProperty.class.classSchema.sort': '품목 순서',
'classAndProperty.class.classSchema.sort.placeholder': '품목 정렬을 입력하십시오.',
'classAndProperty.class.classSchema.sort.placeholder1': '정렬 값을 입력하십시오.',
'classAndProperty.class.classSchema.deadline': '발송 주기',
'classAndProperty.class.classSchema.deadline.placeholder': '배송 주기를 입력해 주세요',
'classAndProperty.class.classSchema.deadline.placeholder1': '배송 주기를 정확하게 입력해 주세요',
'classAndProperty.class.classSchema.deadline.prefix': '주문 후',
'classAndProperty.class.classSchema.deadline.suffix': '일 발송',
'classAndProperty.propertyValue.syncSchema.attributeGroupName': '속성 그룹 이름',
'classAndProperty.propertyValue.syncSchema.attributeName': '속성 이름',
......
......@@ -638,6 +638,11 @@ export default {
'commodity.products.addProductsItem.logisticsForm.form.sendAddress.placeholder' : '배송 주소 선택',
'commodity.products.addProductsItem.logisticsForm.form.company' : '물류 회사',
'commodity.products.addProductsItem.logisticsForm.form.company.placeholder' : '물류 회사를 선택하세요.',
'commodity.products.addProductsItem.logisticsForm.form.deadline': '발송 주기',
'commodity.products.addProductsItem.logisticsForm.form.deadline.message': '배송 주기를 정확하게 입력해 주세요',
'commodity.products.addProductsItem.logisticsForm.form.deadline.placeholder': '배송 주기를 입력해 주세요',
'commodity.products.addProductsItem.logisticsForm.form.deadline.prefix': '주문 후',
'commodity.products.addProductsItem.logisticsForm.form.deadline.suffix': '일 발송',
'commodity.products.addProductsItem.otherForm.form.isInvoice' : '영수증 제공',
'commodity.products.addProductsItem.otherForm.form.isInvoice.message' : '청구서 제공 여부를 선택하십시오.',
......@@ -670,6 +675,7 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.option' : '조작하다',
'commodity.products.addProductsItem.priceAttributeForm.button.1' : '포인트 설정',
'commodity.products.addProductsItem.priceAttributeForm.button.2' : '설정 가격',
'commodity.products.addProductsItem.priceAttributeForm.button.3' : '지우다',
'commodity.products.addProductsItem.priceAttributeForm.id' : '사양 ID',
'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' : '부단가율',
'commodity.products.addProductsItem.priceAttributeForm.form.unitId' : '유닛',
......
......@@ -191,6 +191,11 @@ export default {
'classAndProperty.class.classSchema.sort': '品类排序',
'classAndProperty.class.classSchema.sort.placeholder': '请输入品类排序',
'classAndProperty.class.classSchema.sort.placeholder1': '请输入排序数值',
'classAndProperty.class.classSchema.deadline': '发货周期',
'classAndProperty.class.classSchema.deadline.placeholder': '请输入发货周期',
'classAndProperty.class.classSchema.deadline.placeholder1': '请正确输入发货周期',
'classAndProperty.class.classSchema.deadline.prefix': '下单后',
'classAndProperty.class.classSchema.deadline.suffix': '天发货',
'classAndProperty.propertyValue.syncSchema.attributeGroupName': '属性组名',
'classAndProperty.propertyValue.syncSchema.attributeName': '属性名称',
......
......@@ -638,6 +638,11 @@ export default {
'commodity.products.addProductsItem.logisticsForm.form.sendAddress.placeholder' : '请选择发货地址',
'commodity.products.addProductsItem.logisticsForm.form.company' : '物流公司',
'commodity.products.addProductsItem.logisticsForm.form.company.placeholder' : '请选择物流公司',
'commodity.products.addProductsItem.logisticsForm.form.deadline': '发货周期',
'commodity.products.addProductsItem.logisticsForm.form.deadline.message': '请正确输入发货周期',
'commodity.products.addProductsItem.logisticsForm.form.deadline.placeholder': '请输入发货周期',
'commodity.products.addProductsItem.logisticsForm.form.deadline.prefix': '下单后',
'commodity.products.addProductsItem.logisticsForm.form.deadline.suffix': '天发货',
'commodity.products.addProductsItem.otherForm.form.isInvoice' : '提供发票',
'commodity.products.addProductsItem.otherForm.form.isInvoice.message' : '请选择是否提供发票',
......@@ -670,6 +675,7 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.option' : '操作',
'commodity.products.addProductsItem.priceAttributeForm.button.1' : '设置积分',
'commodity.products.addProductsItem.priceAttributeForm.button.2' : '设置价格',
'commodity.products.addProductsItem.priceAttributeForm.button.3' : '删除',
'commodity.products.addProductsItem.priceAttributeForm.id' : '规格ID',
'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' : '副单价率',
'commodity.products.addProductsItem.priceAttributeForm.form.unitId' : '单位',
......
......@@ -94,6 +94,21 @@ export const classSchema: ISchema = {
},
],
},
deadline: {
type: 'string',
title: getIntl().formatMessage({ id: 'classAndProperty.class.classSchema.deadline' }),
'x-component-props': {
prefix: getIntl().formatMessage({ id: 'classAndProperty.class.classSchema.deadline.prefix' }),
suffix: getIntl().formatMessage({ id: 'classAndProperty.class.classSchema.deadline.suffix' }),
placeholder: getIntl().formatMessage({ id: 'classAndProperty.class.classSchema.deadline.placeholder' }),
},
'x-rules': [
{
pattern: /^([1-9]\d*|[0]{1,1})$/,
message: getIntl().formatMessage({ id: 'classAndProperty.class.classSchema.deadline.placeholder1' }),
}
]
},
},
},
},
......
import React, { useState, useEffect, useRef } from 'react'
import { history, useIntl } from 'umi'
import { Form, Select, Radio, Checkbox, InputNumber } from 'antd'
import { Form, Select, Radio, Checkbox, InputNumber, Input } from 'antd'
import { store } from '@/store'
import { getLogisticsSelectListCompany, GetLogisticsSelectListCompanyResponse, getLogisticsSelectListFreightTemplate, GetLogisticsSelectListFreightTemplateResponse, getLogisticsSelectListShipperAddress, GetLogisticsSelectListShipperAddressResponse } from '@/services/LogisticsV2Api'
const { ProductStore } = store
......@@ -245,6 +245,23 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
</Select>
</Form.Item>
}
<Form.Item
name="deadline"
label={intl.formatMessage({ id: 'commodity.products.addProductsItem.logisticsForm.form.deadline' })}
rules={[
{
pattern: /^\d+(\.\d{1,3})?$/,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.logisticsForm.form.deadline.message' }),
}
]}
>
<Input
style={{ width: '100%' }}
placeholder={intl.formatMessage({ id: 'commodity.products.addProductsItem.logisticsForm.form.deadline.placeholder' })}
prefix={intl.formatMessage({ id: 'commodity.products.addProductsItem.logisticsForm.form.deadline.prefix' })}
suffix={intl.formatMessage({ id: 'commodity.products.addProductsItem.logisticsForm.form.deadline.suffix' })}
/>
</Form.Item>
</Form>
</>)
}
......
......@@ -284,11 +284,12 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_col.push({
title: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.option' }),
dataIndex: 'option',
width: 100,
width: 200,
render: (text, record) => {
return (
<>
<Button type='link' onClick={() => clickSetPrice(record)}>{planPrice === 3 ? intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.1' }) : intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.2' })}</Button>
<Button type='link' onClick={() => deleteSetPrice(record)}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.3' })}</Button>
</>
)
}
......@@ -406,7 +407,10 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
/* 生成传输数据 */
const constructedPrarams = () => {
let _paramsArray: any[] = [];
Array.isArray(combineAttributeArray) ? combineAttributeArray.map((item, index) => { // 非数组情况下默认无组合 从table数据中获取 // 当属性减少的时候 这个combine数组还是之前的 /* code1 */
// console.log(combineAttributeArray, _tableDataSource, tableDataSource)
// 以table数据行数为基准遍历,适应属性组合行被删除
Array.isArray(combineAttributeArray) ? _tableDataSource.map((_tb, index) => { /* code1 */
let item = combineAttributeArray[index]
let _tempArr: any = []
Array.isArray(item) ? item.forEach((_item, _index) => { /* code2 */
if(_item) {
......@@ -415,7 +419,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
id: attributeObjArr[_index].customerAttributeId,
name: attributeObjArr[_index].attributeName
}
// @fixed bug: 属性名称相同的情况下 只找第一个元素 会出现id异常
let filterData = null
for (let i = 0; i < attributeValObjArr.length; i++) {
const element = attributeValObjArr[i]
......@@ -425,7 +428,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
}
_tempObject.customerAttributeValue = {
// @fixed bug: 属性名称相同的情况下 只找第一个元素 会出现id异常
id: filterData?.id ? filterData.id : null,
value: _item
}
......@@ -450,14 +452,14 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
unitPrice: _tableDataSource[index] && _tableDataSource[index][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.unitPrice' })],
priceRate: _tableDataSource[index] && _tableDataSource[index][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' })],
id: _tableDataSource[index] && _tableDataSource[index][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.id' })],
}) /*带上货品id 带上单价*/
})
}) : _paramsArray.push({
goodsId: _tableDataSource[0] ? _tableDataSource[0][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.goodsName' })] : 0,
attributeAndValueList: [],
unitPrice: _tableDataSource[0] && _tableDataSource[0][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.unitPrice' })],
priceRate: _tableDataSource[0] && _tableDataSource[0][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' })],
id: _tableDataSource[0] && _tableDataSource[0][intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.id' })],
}) /*带上货品id 带上单价*/ /* code1 end */
}) /* code1 end */
setPriceAttributeParams(_paramsArray)
// console.log(_paramsArray, '_paramsArray')
}
......@@ -511,6 +513,13 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
priceForm.setFieldsValue({ isMemberPrice: false })
}
const deleteSetPrice = (record) => {
let newTabeData = [..._tableDataSource]
newTabeData.splice(record['索引'], 1)
_tableDataSource = newTabeData
setTableDataSource(_tableDataSource)
}
const confirmPrice = () => {
setPriceForm.validateFields().then(v => {
setPriceModalVisible(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