Commit e49f4c74 authored by GuanHua's avatar GuanHua
parents c9a32492 beeeaa10
...@@ -1034,12 +1034,12 @@ export const PurchaseOrderInsideWorkStateTexts = { ...@@ -1034,12 +1034,12 @@ export const PurchaseOrderInsideWorkStateTexts = {
"-1": '取消订单', "-1": '取消订单',
0: '订单完成', 0: '订单完成',
1: '待新增采购订单', 1: '待新增采购订单',
2: '一级待审核订单', 2: '待审核订单(一级)',
3: '二级待审核订单', 3: '待审核订单(二级)',
4: '待提交订单', 4: '待提交订单',
5: '待确认电子合同', 5: '待确认电子合同',
6: '提交一级审核订单不通过', 6: '提交审核订单不通过(一级)',
7: '提交二级审核订单不通过', 7: '提交审核订单不通过(二级)',
8: '待支付订单', 8: '待支付订单',
10: '支付成功', 10: '支付成功',
11: '支付失败', 11: '支付失败',
...@@ -1054,13 +1054,13 @@ export const PurchaseOrderInsideWorkStateTexts = { ...@@ -1054,13 +1054,13 @@ export const PurchaseOrderInsideWorkStateTexts = {
export const SaleOrderInsideWorkStateTexts = { export const SaleOrderInsideWorkStateTexts = {
0: '订单完成', 0: '订单完成',
1: '待审核订单', 1: '待审核订单',
2: '一级待审核订单', 2: '待审核订单(一级)',
3: '二级待审核订单', 3: '待审核订单(二级)',
4: '待确认订单', 4: '待确认订单',
5: '待接受订单', 5: '待接受订单',
6: '不接受订单', 6: '不接受订单',
7: '提交一级审核订单不通过', 7: '提交审核订单不通过(一级)',
8: '提交二级审核订单不通过', 8: '提交审核订单不通过(二级)',
9: '不接受订单', 9: '不接受订单',
10: '待确认支付结果', 10: '待确认支付结果',
...@@ -1109,12 +1109,12 @@ export const PurchaseOrderTransformInsideWorkStateTexts = { ...@@ -1109,12 +1109,12 @@ export const PurchaseOrderTransformInsideWorkStateTexts = {
0: '订单完成', 0: '订单完成',
1: '待提交审核', 1: '待提交审核',
2: '提交审核通过', 2: '提交审核通过',
3: '审核通过', 3: '审核通过(一级)',
4: '审核通过', 4: '审核通过(二级)',
5: '审核通过', 5: '审核通过',
6: '已确认电子合同', 6: '已确认电子合同',
7: '审核不通过', 7: '审核不通过(一级)',
8: '审核不通过', 8: '审核不通过(二级)',
9: '支付成功', 9: '支付成功',
10: '支付失败', 10: '支付失败',
...@@ -1130,8 +1130,8 @@ export const SaleOrderTransformInsideWorkStateTexts = { ...@@ -1130,8 +1130,8 @@ export const SaleOrderTransformInsideWorkStateTexts = {
"-1": '取消订单', "-1": '取消订单',
0: '完成订单', 0: '完成订单',
1: '审核通过', 1: '审核通过',
2: '审核通过', 2: '审核通过(一级)',
3: '审核通过', 3: '审核通过(二级)',
4: '接受订单', 4: '接受订单',
5: '确认到账', 5: '确认到账',
6: '已审核销售发货单', 6: '已审核销售发货单',
...@@ -1140,8 +1140,8 @@ export const SaleOrderTransformInsideWorkStateTexts = { ...@@ -1140,8 +1140,8 @@ export const SaleOrderTransformInsideWorkStateTexts = {
9: '已确认回单', 9: '已确认回单',
10: '已归档', 10: '已归档',
11: '审核不通过', 11: '审核不通过(一级)',
12: '审核不通过', 12: '审核不通过(二级)',
13: '不接受订单', 13: '不接受订单',
14: '确认未到账', 14: '确认未到账',
15: '审核不通过', 15: '审核不通过',
......
...@@ -99,7 +99,7 @@ const CategoryAttributes: React.FC<{}> = () => { ...@@ -99,7 +99,7 @@ const CategoryAttributes: React.FC<{}> = () => {
const handleSelectOk = () => { const handleSelectOk = () => {
setRoleVisible(false) setRoleVisible(false)
setLinkLoading (true) setLinkLoading (true)
PublicApi.postProductCustomerSaveCustomerCategoryAttribute({ customerCategoryId: selectKey, customerAttributeIds: goodsRowCtl.selectedRowKeys }).then(res=>{ PublicApi.postProductCustomerSaveCustomerCategoryAttribute({ customerCategoryId: selectKey, customerAttributeIds: selectedTableRowKeys }).then(res=>{
setLinkLoading (false) setLinkLoading (false)
if(res.code === 1000) if(res.code === 1000)
setTimeout(() => ref.current.reload(), 500) setTimeout(() => ref.current.reload(), 500)
...@@ -107,9 +107,9 @@ const CategoryAttributes: React.FC<{}> = () => { ...@@ -107,9 +107,9 @@ const CategoryAttributes: React.FC<{}> = () => {
} }
const handleSelectCancel = () => { const handleSelectCancel = () => {
setRoleVisible(false) setRoleVisible(false)
// setSelectedTableRowKeys([]) setSelectedTableRowKeys([])
setLinkLoading (false) setLinkLoading (false)
goodsRowCtl.setSelectedRowKeys([]) // goodsRowCtl.setSelectedRowKeys([])
} }
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
...@@ -253,7 +253,8 @@ const CategoryAttributes: React.FC<{}> = () => { ...@@ -253,7 +253,8 @@ const CategoryAttributes: React.FC<{}> = () => {
linkTableRowData.forEach((item, index) => { linkTableRowData.forEach((item, index) => {
linkArray.push(item.id) linkArray.push(item.id)
}) })
goodsRowCtl.setSelectedRowKeys([]) // goodsRowCtl.setSelectedRowKeys([])
setSelectedTableRowKeys([])
} }
......
...@@ -70,7 +70,7 @@ const AddProducts: React.FC<{}> = (props) => { ...@@ -70,7 +70,7 @@ const AddProducts: React.FC<{}> = (props) => {
brand: data.brand, brand: data.brand,
customerCategory: data.customerCategory, customerCategory: data.customerCategory,
slogan: data.slogan, slogan: data.slogan,
sellingPoint: data.sellingPoint, sellingPoint: data.sellingPoint || [],
commodityAreaList: data.commodityAreaList, commodityAreaList: data.commodityAreaList,
isUpdateAttribute: data.isUpdateAttribute, isUpdateAttribute: data.isUpdateAttribute,
unitId: data.unitId, unitId: data.unitId,
......
...@@ -109,14 +109,14 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => { ...@@ -109,14 +109,14 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
</Row> </Row>
<Modal title="发票信息" visible={isModalVisible} onOk={()=>setIsModalVisible(false)} onCancel={()=>setIsModalVisible(false)}> <Modal title="发票信息" visible={isModalVisible} onOk={()=>setIsModalVisible(false)} onCancel={()=>setIsModalVisible(false)}>
<Row gutter={[0 ,10]} style={{fontSize: 14}}> <Row gutter={[0 ,10]} style={{fontSize: 14}}>
<Col span={4}>开具类型:</Col><Col span={20}>{theInvoiceInfo?.type === 1 ? "企业" : "个人"}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>开具类型:</Col><Col span={20}>{theInvoiceInfo?.type === 1 ? "企业" : "个人"}</Col>
<Col span={4}>发票种类:</Col><Col span={20}>{theInvoiceInfo?.kind === 1 ? "增值税普通发票" : "增值税专用发票"}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>发票种类:</Col><Col span={20}>{theInvoiceInfo?.kind === 1 ? "增值税普通发票" : "增值税专用发票"}</Col>
<Col span={4}>发票抬头:</Col><Col span={20}>{theInvoiceInfo?.invoiceTitle}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>发票抬头:</Col><Col span={20}>{theInvoiceInfo?.invoiceTitle}</Col>
<Col span={4}>纳税号:</Col><Col span={20}>{theInvoiceInfo?.taxNo}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>纳税号:</Col><Col span={20}>{theInvoiceInfo?.taxNo}</Col>
<Col span={4}>开户行:</Col><Col span={20}>{theInvoiceInfo?.bankOfDeposit}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>开户行:</Col><Col span={20}>{theInvoiceInfo?.bankOfDeposit}</Col>
<Col span={4}>账号:</Col><Col span={20}>{theInvoiceInfo?.account}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>账号:</Col><Col span={20}>{theInvoiceInfo?.account}</Col>
<Col span={4}>地址:</Col><Col span={20}>{theInvoiceInfo?.addres}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>地址:</Col><Col span={20}>{theInvoiceInfo?.addres}</Col>
<Col span={4}>电话:</Col><Col span={20}>{theInvoiceInfo?.tel}</Col> <Col span={4} style={{fontSize: 12, color: "#909399"}}>电话:</Col><Col span={20}>{theInvoiceInfo?.tel}</Col>
</Row> </Row>
</Modal> </Modal>
</> </>
......
...@@ -171,7 +171,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => { ...@@ -171,7 +171,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const handleConfirm = () => { const handleConfirm = () => {
if (current === 0) { if (current === 0) {
if (checked.id) { if (checked?.id) {
if (checked.id === 5) { // 线下支付 if (checked.id === 5) { // 线下支付
setCurrent(1) setCurrent(1)
setPayStep(1) setPayStep(1)
...@@ -321,6 +321,12 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => { ...@@ -321,6 +321,12 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
} }
} else { } else {
setCode('') setCode('')
// 支付密码未设置
if(res.code === 33334) {
setTimeout(() => {
history.push('/memberCenter/systemSetting/accountSetting/paycode')
}, 1000)
}
} }
} }
......
...@@ -264,30 +264,13 @@ export const useElectronicContract = (ctx: ISchemaFormActions | ISchemaFormAsync ...@@ -264,30 +264,13 @@ export const useElectronicContract = (ctx: ISchemaFormActions | ISchemaFormAsync
fetchOrderApi.getOrderWorkFlow(params).then(data => { fetchOrderApi.getOrderWorkFlow(params).then(data => {
// 简单流程并使用电子合同 强行启用电子合同 // 简单流程并使用电子合同 强行启用电子合同
if(data["processEnum"] === 24 && data["isElectronicContract"]) { if(data["processEnum"] === 24 && data["isElectronicContract"]) {
ctx.setFieldState("usingElectronicContracts", state => { ctx.setFieldValue("usingElectronicContracts", 1)
state.visible = true ctx.setFieldValue("electronicContractId", data['electronicContractId'])
})
ctx.setFieldValue("processEnum", data["processEnum"]) ctx.setFieldValue("processEnum", data["processEnum"])
} else { } else {
ctx.setFieldState("usingElectronicContracts", state => { ctx.setFieldValue("usingElectronicContracts", 0)
state.visible = false ctx.setFieldValue("electronicContractId", null)
}) ctx.setFieldValue("processEnum", data["processEnum"])
}
if(data['electronicContractId']) {
fetchOrderApi.createContract({
contractTemplateId: data['electronicContractId'],
signMemberId: params['memberId'],
signRoleId: params['memberRoleId'],
quotationNo: ctx.getFieldValue("quotationNo"),
orderProductRequests: ctx.getFieldValue('orderProductRequests'),
orderModel: ctx.getFieldValue('orderModel'),
deliveryAddresId: ctx.getFieldValue('deliveryAddresId'),
}).then(_data => {
ctx.setFieldState("usingElectronicContracts", state => {
state.props["x-component-props"].contract = { contractTemplateId: data['electronicContractId'], ..._data, }
})
ctx.setFieldValue("electronicContractName", _data?.contractName)
})
} }
}) })
} }
......
...@@ -32,6 +32,7 @@ import { ReadyAddOrderDetailContext } from '../context' ...@@ -32,6 +32,7 @@ import { ReadyAddOrderDetailContext } from '../context'
import AuditProcess from '@/components/AuditProcess' import AuditProcess from '@/components/AuditProcess'
import styles from './index.less' import styles from './index.less'
import SimpleElectronModal from './components/simpleElectronModal' import SimpleElectronModal from './components/simpleElectronModal'
import { fetchOrderApi } from './apis'
export interface PurchaseOrderDetailProps {} export interface PurchaseOrderDetailProps {}
...@@ -186,11 +187,42 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => { ...@@ -186,11 +187,42 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}, []) }, [])
const handleSubmit = async (value) => { const handleSubmit = async (value) => {
let processEnum = addSchemaAction.getFieldValue('processEnum') let _orderProductRequests = JSON.parse(JSON.stringify(value.orderProductRequests))
let usingElectronicContracts = addSchemaAction.getFieldValue('usingElectronicContracts') let processEnum = value['processEnum']
let signatureLogId = addSchemaAction.getFieldValue("signatureLogId") let usingElectronicContracts = value['usingElectronicContracts']
let signatureLogId = value["signatureLogId"]
let electronicContractId = value['electronicContractId']
if(processEnum === 24 && usingElectronicContracts && !signatureLogId) { if(processEnum === 24 && usingElectronicContracts && !signatureLogId) {
contractRef.current.setVisible(true) setBtnLoading(true)
// 生成并签署合同
if(electronicContractId) {
fetchOrderApi.createContract({
contractTemplateId: electronicContractId,
signMemberId:value['supplyMembersId'],
signRoleId: value['supplyMembersRoleId'],
quotationNo: value["quotationNo"],
orderProductRequests: _orderProductRequests.map(v => {
v.price = 1
v.isMemberPrice = Number(v.isMemberPrice)
v.memberPrice = v.memberPrice
v.imgUrl = v.mainPic ? v.mainPic : v.imgUrl
v.minOrder = v.minOrder
v.channelProductId = v?.commodityUnitPriceAndPicId
return v
}),
orderModel: value['orderModel'],
deliveryAddresId: value['deliveryAddresId']["id"],
}).then(_data => {
setBtnLoading(false)
if(_data?.contractName) {
addSchemaAction.setFieldState("usingElectronicContracts", state => {
state.props["x-component-props"].contract = { contractTemplateId: electronicContractId, ..._data, }
})
addSchemaAction.setFieldValue("electronicContractName", _data?.contractName)
contractRef.current.setVisible(true)
}
})
}
return ; return ;
} }
...@@ -203,7 +235,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => { ...@@ -203,7 +235,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
switch (page_type) { switch (page_type) {
case '0': { case '0': {
// 新增订单/编辑订单 // 新增订单/编辑订单
let _orderProductRequests = JSON.parse(JSON.stringify(value.orderProductRequests))
const params = { const params = {
...value, ...value,
deliveryTime: moment(value.deliveryTime).valueOf(), deliveryTime: moment(value.deliveryTime).valueOf(),
...@@ -215,6 +246,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => { ...@@ -215,6 +246,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
v.memberPrice = v.memberPrice v.memberPrice = v.memberPrice
v.imgUrl = v.mainPic ? v.mainPic : v.imgUrl v.imgUrl = v.mainPic ? v.mainPic : v.imgUrl
v.minOrder = v.minOrder v.minOrder = v.minOrder
v.channelProductId = v?.commodityUnitPriceAndPicId
// v.productId = v.id // v.productId = v.id
// v.productName = v.name // v.productName = v.name
// v.category = v.customerCategoryName // v.category = v.customerCategoryName
......
...@@ -343,18 +343,18 @@ const ortherInfo: ISchema = { ...@@ -343,18 +343,18 @@ const ortherInfo: ISchema = {
wrapperCol: 10 wrapperCol: 10
}, },
properties: { properties: {
usingElectronicContracts: { // usingElectronicContracts: {
type: "number", // type: "number",
title: "{{help('电子合同','勾选则表示同意签署电子合同,电子合同和纸质合同一样具备同等法律效力')}}", // title: "{{help('电子合同','勾选则表示同意签署电子合同,电子合同和纸质合同一样具备同等法律效力')}}",
"x-component-props": { // "x-component-props": {
// disabled: true, // // disabled: true,
contract: {}, // contract: {},
}, // },
"x-component": "selectContract", // "x-component": "selectContract",
// default: true, // // default: true,
required: true, // required: true,
visible: false, // visible: false,
}, // },
needTheInvoice: { needTheInvoice: {
type: 'number', type: 'number',
"x-component": 'CheckboxSingle', "x-component": 'CheckboxSingle',
...@@ -435,6 +435,19 @@ const ortherInfo: ISchema = { ...@@ -435,6 +435,19 @@ const ortherInfo: ISchema = {
title: '合同Name', title: '合同Name',
visible: false visible: false
}, },
usingElectronicContracts: {
type: "number",
title: '使用电子合同',
"x-component-props": {
contract: {},
},
visible: false
},
electronicContractId: {
type: "number",
title: '电子合同ID',
visible: 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