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