Commit f6cce542 authored by Bill's avatar Bill

Merge branch 'v2' of 10.0.0.22:lingxi/lingxi-business-paltform into v2

parents 9ac72403 4ae8d60b
......@@ -35,7 +35,7 @@ width: 100%;
const { Option } = Select
const MultAddress = (props) => {
const { value, mutators } = props
const { value: _v, mutators } = props
const {
placeholder = [],
......@@ -43,6 +43,16 @@ const MultAddress = (props) => {
...rest
} = props.props["x-component-props"] || {}
// 处理表单提交置空触发错误角标提示
let value = null
if(!_v || !_v.length) {
value = [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }]
} else if(value?.length && !value[0]['provinceCode'] && !value[0]['province'] && !value[0]['cityCode'] && !value[0]['city'] && !value[0]['areaCode'] && !value[0]['area']) {
mutators.change([])
} else {
value = _v
}
const [code, setcode] = useState<any>([]);
const [province, setprovince] = useState<any>([]); // 省列表
const [city, setcity] = useState<any>([]); // 市列表
......
......@@ -410,7 +410,8 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
extraData: {
remaining: item.purchaseCount || 0, // 已换货数量,这里取 采购数量判断即可
id: item.orderRecordId,
taskTypeKey,
taskTypeKey,
orderId: item.orderId,
},
associated: !item.associatedProductId ? '' : `${item.associatedProductId}/${item.associatedProductName}/${item.associatedType || ' '}/${item.associatedCategory}/${item.associatedBrand}`,
})),
......
......@@ -106,7 +106,7 @@ const ExchangeQuery: React.FC = () => {
type="link"
onClick={() => handleStop(record.replaceId)}
>
</Button>
)}
</>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @LastEditTime: 2021-09-13 09:52:54
* @Description:
*/
import { ISchema } from '@formily/antd';
......@@ -58,24 +58,6 @@ export const listSearchSchema: ISchema = {
allowClear: true,
},
},
outerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
},
},
innerStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '内部状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-03 18:15:50
* @LastEditTime: 2021-09-13 09:54:37
* @Description: 退货申请单查询
*/
import React, { useState, useRef } from 'react';
......@@ -111,7 +111,7 @@ const ReturnQuery: React.FC = () => {
type="link"
onClick={() => handleStop(record.returnId)}
>
</Button>
)}
</>
......
......@@ -282,6 +282,7 @@ const AddProducts: React.FC<{}> = (props) => {
_params.minOrder = productInfoByEdit.minOrder
_params.priceType = productInfoByEdit.priceType
_params.isMemberPrice = productInfoByEdit.isMemberPrice
_params.taxRate = productInfoByEdit.taxRate
}
if (clickTabIndex.indexOf("6") === -1) // 商品描述
_params.commodityRemark = productInfoByEdit.commodityRemark
......
......@@ -175,7 +175,7 @@ const table = (props: any) => {
/* 删除 */
const Delete = (elm, idx) => {
const dataSource = [...PlanList];
let List = dataSource.filter((item, index) => index !== idx);
let List = dataSource.filter((item, index) => index != idx);
setPlanList(List)
};
......@@ -299,7 +299,7 @@ const table = (props: any) => {
<Table
columns={tabcolumns}
dataSource={list}
dataSource={PlanList}
rowKey="id"
style={{
width: "100%"
......
......@@ -50,6 +50,8 @@ const Editbill: React.FC<{}> = (props: any) => {
basics: basicsVO.data,
detailList: detailList,
}
console.log(data)
// return;
if (!Loading) {
setLoading(true);
PublicApi.postContractApplyAmountSave(data).then(res => {
......
......@@ -18,8 +18,8 @@ export const fieldTransformRender = (params) => {
result['submitTenderOutStatus'] = params.submitTenderOutStatusValue
result['submitTenderInStatus'] = params.submitTenderInStatusValue
// 给地址控件赋初值
result['tenderAddress'] = [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }]
// // 给地址控件赋初值
// result['tenderAddress'] = [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }]
return result
}
......
......@@ -45,11 +45,14 @@ const AddBidRegister:React.FC<AddBidRegisterProps> = (props) => {
}, [id])
const handleSubmit = async (value) => {
setBtnLoading(true)
const result = formDataTransformParams(value)
PublicApi.postPurchaseSubmitTenderSubmitTenderRegister(result).then(res => {
if(res.code === 1000) {
history.goBack()
}
}).finally(() => {
setBtnLoading(false)
})
}
......
......@@ -240,7 +240,7 @@ export const formSchema: ISchema = {
placeholder: '选择单位地址',
warningText: '请完善所在地区',
},
default: [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }],
// default: [{ provinceCode: null, province: null, cityCode: null, city: null, areaCode: null, area: null }],
required: true,
},
address: {
......
......@@ -50,6 +50,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const { run, loading } = useHttpRequest(PublicApi.postOrderBuyerValidatePay)
const [settleAccountsError, setSettleAccountsError] = useState<boolean>(true)
const [paymentAmount ,setPaymentAmount] = useState<string>()
const [tradeNo, setTradeNo] = useState<string>() // 需要轮询支付结果的交易号
useEffect(() => {
if (currentRef) {
......@@ -105,7 +106,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const pollPayResult = () => {
if(qrCodeInfo.qrUrl) {
// @ts-ignore
PublicApi.getOrderBuyerValidatePayResult({orderId: id, batchNo: currentPaymentInfo.batchNo}).then(res => {
PublicApi.getOrderBuyerValidatePayResult({orderId: id, batchNo: currentPaymentInfo.batchNo, tradeNo}).then(res => {
const { code, data } = res
if(code === 1000) {
if(data && data.paySuccess) {
......@@ -297,7 +298,8 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
if(mobilePayFlag.current !== 4) { // 非微信
history.goBack()
} else {
setQrCodeInfo({ ...qrCodeInfo, generateCharacter: res.data })
setQrCodeInfo({ ...qrCodeInfo, generateCharacter: res.data.codeUrl })
setTradeNo(res.data.tradeNo)
setQrLoading(false)
}
} else {
......
......@@ -110,7 +110,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
let free = modalPriceActions.getFieldValue('freePrice')
setFreePrice(Number(free || 0))
// 执行修改订单运费
PublicApi.postOrderProductPriceUpdate({orderId: dataSource.id, price: free, type: 2}).then(res => {
PublicApi.postOrderProductPriceUpdate({orderId: dataSource.orderId, price: free, type: 2}).then(res => {
if(res.code === 1000) {
modelRef.current.setVisible(false)
reloadFormData()
......@@ -307,7 +307,8 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
const warehouseRef = useRef<any>({})
// 判断是否可操作当前表格
const isEditData = false
const isEditData = true
const productComponents = {
body: {
row: EditableRow,
......@@ -357,7 +358,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
...row,
});
// 执行修改订单价格
PublicApi.postOrderProductPriceUpdate({orderId: data.id, orderDetailsId: row.id, price: row.price, type: 1}).then(res => {
PublicApi.postOrderProductPriceUpdate({orderId: data.orderId, orderDetailsId: row.id, price: row.price, type: 1}).then(res => {
if(res.code === 1000) {
reloadFormData()
}
......
......@@ -111,8 +111,18 @@ const InquirySearch = () => {
key: 'options',
dataIndex: 'options',
render: (_text: any, record: any) => <>
{record.isShowQuote && (
<Button disabled={record.isQuoted === 1} onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`)} type='link'>报价</Button>
{(record.isShowQuote && record.isQuoted !== 1) && (
<Button onClick={() => history.push(`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`)} type='link'>报价</Button>
)}
{(record.isShowQuote && record.isQuoted === 1) && (
<Button
type='link'
onClick={() => Modal.info({
content: '当前询价单商品已报价,请勿重复报价!'
})}
>
报价
</Button>
)}
{(record.isShowSecondInquiry === true) && (
<Button type='link' onClick={() => secondInquiry(record.id, record.inquiryListNo)}>二次询价</Button>
......
......@@ -523,7 +523,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
<div className={styles.upload_left}>
<LinkOutlined style={{ marginRight: '5px' }} />
<Typography.Link
href={`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumURL}`}
href={`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumUrl}`}
target="_blank"
>
{file.albumName}
......
......@@ -73,6 +73,10 @@ export const procurementRenderField = (data) => {
// 冗余shopId orderMode查询支付方式使用
shopId: data.shopId,
orderMode: data.orderMode,
// 转换上游字段
upperMemberId: item.supplyMemberId,
upperMemberName: item.supplyMemberName,
upperMemberRoleId: item.supplyRoleId,
}
})
}
......@@ -90,6 +94,10 @@ export const procurementProcessField = (value) => {
logisticsTemplateId: item.logistics.templateId,
weight: item.logistics.weight,
stockId: item.upperCommoditySkuId,
// 上游字段
supplyMemberId: item.upperMemberId,
supplyRoleId: item.upperMemberRoleId,
supplyMemberName: item.upperMemberName,
}
})
return value
......
......@@ -263,7 +263,15 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
addSchemaAction.setFieldValue('baseProcessId', data.baseProcessId)
addSchemaAction.setFieldValue('allProducts', data.allProducts)
if(data.payments.length) {
addSchemaAction.setFieldValue('payments', [...data.payments])
const { payments } = data
const source = payments.map(item => ({
...item,
nodes: item.nodes.map(_item => ({
..._item,
serialNo: item.serialNo
}))
}))
addSchemaAction.setFieldValue('payments', source)
}
if(data.processType === 1) {
addSchemaAction.setFieldState('expireHours', state => {
......
......@@ -45,12 +45,14 @@ export const usePaymentTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const handleSave = row => {
return new Promise((resolve, reject) => {
const newData = [...ctx.getFieldValue('payments')];
const newData = [...ctx.getFieldValue('payments')]
console.log(newData, row)
const paymentIndex = newData.findIndex(item => row.serialNo === item.serialNo )
console.log(paymentIndex)
const nodeItem = newData[paymentIndex]['nodes']
console.log(nodeItem)
const nodeIndex = nodeItem.findIndex(item => row.batchNo === item.batchNo)
console.log(nodeIndex)
nodeItem.splice(nodeIndex, 1, {
...nodeItem[nodeIndex],
...row,
......
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