Commit aab9e0ac authored by 左玲玲's avatar 左玲玲 😬

1853

parent 55902baf
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
dev: { dev: {
[defaultSetting.proxypath]: { [defaultSetting.proxypath]: {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.203:8000', //jf哥 target: 'http://192.168.40.110:8000', //jf哥
// target: 'http://192.168.40.248:8080', //jf哥 // target: 'http://192.168.40.248:8080', //jf哥
// target: 'http://192.168.40.64:28000', //gc哥 // target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.203:8000', //dj哥 // target: 'http://192.168.40.203:8000', //dj哥
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
}, },
'/token': { '/token': {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.203:8000', target: 'http://192.168.40.110:8000',
changeOrigin: true, changeOrigin: true,
}, },
'/staticfile/': { '/staticfile/': {
......
...@@ -181,7 +181,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef, action }) => { ...@@ -181,7 +181,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef, action }) => {
<Col {...item.colProps} style={{ height: 68 }} key={index}> <Col {...item.colProps} style={{ height: 68 }} key={index}>
<div> <div>
<label htmlFor="" style={{ marginBottom: 14, display: 'inline-block' }} >{item.title}</label> <label htmlFor="" style={{ marginBottom: 14, display: 'inline-block' }} >{item.title}</label>
<div style={{ margin: 0 }}> <div title={value[item?.key ?? item?.dataIndex] ?? "-"} style={{ margin: 0 }}>
{value[item?.key ?? item?.dataIndex] ?? "-"} {value[item?.key ?? item?.dataIndex] ?? "-"}
</div> </div>
</div> </div>
...@@ -189,7 +189,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef, action }) => { ...@@ -189,7 +189,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef, action }) => {
) : ( ) : (
<Col {...item.colProps} style={{ height: 40, display: 'flex', alignItems: 'center' }} key={index}> <Col {...item.colProps} style={{ height: 40, display: 'flex', alignItems: 'center' }} key={index}>
<div> <div>
<div style={{ margin: 0 }}> <div title={value[item?.key ?? item?.dataIndex] ?? "-"} style={{ margin: 0 }}>
{value[item?.key ?? item?.dataIndex] ?? "-"} {value[item?.key ?? item?.dataIndex] ?? "-"}
</div> </div>
</div> </div>
...@@ -1466,7 +1466,7 @@ function FormList(props) { ...@@ -1466,7 +1466,7 @@ function FormList(props) {
}, [props]); }, [props]);
return ( return (
<Col {...col}> <Col {...col}>
<div className="formlist"> <div className="formlist" style={{ '--bordered': item.bordered ? '1px solid #dbdbdb' : 'none' }}>
{ {
item?.creatorButtonProps === false ? item?.creatorButtonProps === false ?
!isEmpty ? !isEmpty ?
......
...@@ -617,11 +617,13 @@ ol { ...@@ -617,11 +617,13 @@ ol {
.formlist { .formlist {
>div { >div {
overflow-x: auto;
>div { >div {
>div { >div {
>div { >div {
>div:last-child { >div:last-child {
border: 1px solid #dbdbdb; border: var(--bordered);
padding: 12px; padding: 12px;
} }
} }
...@@ -636,6 +638,16 @@ ol { ...@@ -636,6 +638,16 @@ ol {
.ant-form-item { .ant-form-item {
margin-bottom: 12px !important; margin-bottom: 12px !important;
} }
.ant-pro-form-group {
>div {
>.ant-row {
flex-flow: row nowrap !important;
align-items: baseline !important;
}
}
}
} }
.screenwh { .screenwh {
......
...@@ -11,7 +11,7 @@ const fields = [ ...@@ -11,7 +11,7 @@ const fields = [
key: 'contractNo' key: 'contractNo'
}, },
{ {
title: '合同金额(元)', title: '合同金额',
dataIndex: 'amount', dataIndex: 'amount',
key: 'amount' key: 'amount'
}, },
...@@ -46,15 +46,25 @@ const fields = [ ...@@ -46,15 +46,25 @@ const fields = [
key: 'undertakingId' key: 'undertakingId'
}, },
{ {
title: '合同负责人', title: '销售经理',
dataIndex: 'head', dataIndex: 'head',
key: 'head' key: 'head'
}, },
{ {
title: '登记日期', title: '签订日期',
dataIndex: 'registrationDate', dataIndex: 'registrationDate',
key: 'registrationDate' key: 'registrationDate'
}, },
{
title: '到货日期',
dataIndex: 'arriveDate',
key: 'arriveDate'
},
{
title: '退还日期',
dataIndex: 'returnDate',
key: 'returnDate'
},
{ {
title: '状态', title: '状态',
dataIndex: 'statusName', dataIndex: 'statusName',
...@@ -89,7 +99,7 @@ const fields = [ ...@@ -89,7 +99,7 @@ const fields = [
valueType: 'split' valueType: 'split'
}, },
{ {
title: '去程运费(元)', title: '交付运费',
dataIndex: 'tripFreight', dataIndex: 'tripFreight',
key: 'tripFreight' key: 'tripFreight'
}, },
...@@ -99,21 +109,16 @@ const fields = [ ...@@ -99,21 +109,16 @@ const fields = [
key: 'tripBearName' key: 'tripBearName'
}, },
{ {
title: '返程运费(元)', title: '退还运费',
dataIndex: 'returnFreight', dataIndex: 'returnFreight',
key: 'returnFreight' key: 'returnFreight'
}, },
{
title: '返程运费承担方',
dataIndex: 'returnBearName',
key: 'returnBearName'
},
{ {
title: '', title: '',
valueType: 'split' valueType: 'split'
}, },
{ {
title: '退还押金(元)', title: '退还押金',
dataIndex: 'refund', dataIndex: 'refund',
key: 'refund' key: 'refund'
}, },
...@@ -127,6 +132,12 @@ const fields = [ ...@@ -127,6 +132,12 @@ const fields = [
dataIndex: 'handleTime', dataIndex: 'handleTime',
key: 'handleTime' key: 'handleTime'
}, },
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
colProps: { span: 24 },
},
{ {
title: '相关文件', title: '相关文件',
valueType: 'split' valueType: 'split'
...@@ -224,35 +235,77 @@ const Details = ({ drawer }) => { ...@@ -224,35 +235,77 @@ const Details = ({ drawer }) => {
dataIndex: 'equipmentName', dataIndex: 'equipmentName',
key: 'equipmentName', key: 'equipmentName',
}, },
{
title: '设备型号',
dataIndex: 'equipmentModelName',
key: 'equipmentModelName',
hideInSearch: true
},
{ {
title: '莫格云眼', title: '莫格云眼',
dataIndex: 'intelligentUnitNo', dataIndex: 'intelligentUnitNo',
key: 'intelligentUnitNo', key: 'intelligentUnitNo',
}, },
{ {
title: '每期单价(元)', title: '出库区域',
dataIndex: 'equipmentModelName',
key: 'equipmentModelName',
hideInSearch: true
},
{
title: '入库区域',
dataIndex: 'equipmentModelName',
key: 'equipmentModelName',
hideInSearch: true
},
{
title: '每期单价',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
key: 'unitPrice', key: 'unitPrice',
hideInSearch: true hideInSearch: true
}, },
{ {
title: '智享价(元)', title: '智享价',
dataIndex: 'zxPrice', dataIndex: 'zxPrice',
key: 'zxPrice', key: 'zxPrice',
hideInSearch: true hideInSearch: true
}, },
{ {
title: '返利金额(元)', title: '返利金额',
dataIndex: 'rebatePrice', dataIndex: 'rebatePrice',
key: 'rebatePrice', key: 'rebatePrice',
hideInSearch: true hideInSearch: true
}, },
{ {
title: '押金(元)', title: '交付运费',
dataIndex: 'deliveryPrice',
key: 'deliveryPrice',
hideInSearch: true
},
{
title: '交付日期',
dataIndex: 'deliveryDate',
key: 'deliveryDate',
hideInSearch: true
},
{
title: '押金',
dataIndex: 'deposit', dataIndex: 'deposit',
key: 'deposit', key: 'deposit',
hideInSearch: true hideInSearch: true
}, },
{
title: '开始租赁时间',
dataIndex: 'startLeaseDate',
key: 'startLeaseDate',
hideInSearch: true
},
{
title: '结束租赁时间',
dataIndex: 'endLeaseDate',
key: 'endLeaseDate',
hideInSearch: true
},
{ {
title: '实际结束时间', title: '实际结束时间',
dataIndex: 'realEndDate', dataIndex: 'realEndDate',
...@@ -260,11 +313,35 @@ const Details = ({ drawer }) => { ...@@ -260,11 +313,35 @@ const Details = ({ drawer }) => {
hideInSearch: true hideInSearch: true
}, },
{ {
title: '违约金(元)', title: '违约金',
dataIndex: 'violatePrice', dataIndex: 'violatePrice',
key: 'violatePrice', key: 'violatePrice',
hideInSearch: true hideInSearch: true
}, },
{
title: '退还运费',
dataIndex: 'returnFreight',
key: 'returnFreight',
hideInSearch: true
},
{
title: '退还日期',
dataIndex: 'returnDate',
key: 'returnDate',
hideInSearch: true
},
{
title: '返程运费承担方',
dataIndex: 'returnBearName',
key: 'returnBearName',
hideInSearch: true
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
hideInSearch: true
},
]; ];
const items = useMemo(() => { const items = useMemo(() => {
return [ return [
...@@ -288,6 +365,7 @@ const Details = ({ drawer }) => { ...@@ -288,6 +365,7 @@ const Details = ({ drawer }) => {
bordered={false} bordered={false}
extraparams={{ contractId: drawer?.item?.id }} extraparams={{ contractId: drawer?.item?.id }}
pagination={'false'} pagination={'false'}
x={2300}
/>, />,
} }
] ]
......
import { Tooltip, Image } from 'antd'; import { Tooltip, Image } from 'antd';
import Filedetail from "@/components/Filedetail"; import Filedetail from "@/components/Filedetail";
function getcolumns(setdrawer, valtype, itemId) { function getcolumns(setdrawer, valtype, itemId) {
let common = [ let commona = [
{ {
title: '合同单号', title: '合同单号',
dataIndex: 'contractNo', dataIndex: 'contractNo',
...@@ -31,7 +31,7 @@ function getcolumns(setdrawer, valtype, itemId) { ...@@ -31,7 +31,7 @@ function getcolumns(setdrawer, valtype, itemId) {
} }
}, },
{ {
title: '客户', title: '客户名称',
dataIndex: 'customerName', dataIndex: 'customerName',
key: 'customerId', key: 'customerId',
colProps: { span: 8 }, colProps: { span: 8 },
...@@ -43,7 +43,7 @@ function getcolumns(setdrawer, valtype, itemId) { ...@@ -43,7 +43,7 @@ function getcolumns(setdrawer, valtype, itemId) {
}, },
}, },
{ {
title: '合同金额(元)', title: '合同金额',
dataIndex: 'amount', dataIndex: 'amount',
key: 'amount', key: 'amount',
hideInSearch: true, hideInSearch: true,
...@@ -55,293 +55,331 @@ function getcolumns(setdrawer, valtype, itemId) { ...@@ -55,293 +55,331 @@ function getcolumns(setdrawer, valtype, itemId) {
key: 'startLeaseDateList', key: 'startLeaseDateList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange' valueType: 'dateRange'
}, }
{ ],
title: '本期应收回款', commonb = [
dataIndex: 'thisCollection', {
key: 'thisCollection', title: '设备数量',
hideInSearch: true, dataIndex: 'equipmentNum',
hideInForm: true, key: 'equipmentNum',
}, hideInSearch: true,
{ hideInForm: true,
title: '设备台数', render: (_, row) => {
dataIndex: 'equipmentNum', return (
key: 'equipmentNum', <a
hideInSearch: true, className="table-cell"
hideInForm: true, onClick={() => {
render: (_, row) => { setdrawer && setdrawer((s) => ({
return ( ...s,
<a open: true,
className="table-cell" item: row,
onClick={() => { val: 'only',
setdrawer && setdrawer((s) => ({ title: '租赁设备',
...s, type: 'device'
open: true, }));
item: row, }}
val: 'only', >
title: '租赁设备', {row.equipmentNum}
type: 'device' </a>
})); );
}} }
>
{row.equipmentNum}
</a>
);
}
},
{
title: '去程运费',
dataIndex: 'tripFreight',
key: 'tripFreight',
colProps: { span: 8 },
valueType: 'digit',
hideInSearch: true,
hideInTable: true,
precision: 2
},
{
title: '去程运费承担方',
dataIndex: 'tripBear',
key: 'tripBear',
hideInSearch: true,
valueType: 'select',
options: [
{ label: '客户', value: '1' },
{ label: '平台', value: '2' },
],
colProps: { span: 8 },
hideInTable: true,
},
{
title: '回款设置(自然日)',
dataIndex: 'collectionSet',
key: 'collectionSet',
valueType: 'digit',
hideInSearch: true,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 },
hideInTable: true,
precision: 0,
min: 1
},
{
title: '预警设置(自然日)',
dataIndex: 'warnSet',
key: 'warnSet',
hideInSearch: true,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 },
valueType: 'digit',
hideInTable: true,
precision: 0,
min: 1
},
{
title: '合同租期(月)',
dataIndex: 'tenancy',
key: 'tenancy',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 },
hideInSearch: true,
valueType: 'digit',
hideInTable: true,
precision: 0,
min: 1
},
{
title: '租赁设备',
dataIndex: 'contractEquipmentList',
key: 'contractEquipmentList',
hideInSearch: true,
valueType: 'formList',
hideInTable: true,
colProps: {
xs: 24,
sm: 24,
}, },
columns: [ {
{ title: '交付运费',
title: '设备', dataIndex: 'tripFreight',
dataIndex: 'equipmentName', key: 'tripFreight',
key: 'equipmentId', colProps: { span: 8 },
valueType: 'select', valueType: 'digit',
fieldProps: { hideInSearch: true,
placeholder: '请选择', hideInTable: true,
showSearch: true hideInForm: true,
}, precision: 2
formItemProps: { },
rules: [ {
{ title: '去程运费承担方',
required: true, dataIndex: 'tripBear',
message: '此项为必填项', key: 'tripBear',
}, hideInSearch: true,
], valueType: 'select',
}, options: [
colProps: { { label: '客户', value: '1' },
sm: 6, { label: '平台', value: '2' },
}, ],
options: { colProps: { span: 8 },
path: '/lease/umLeaseLedger/queryLedgerSelectbox', hideInTable: true,
params: valtype == 'add' ? {} : { contractId: itemId }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }
}, },
}, {
{ title: '回款设置(自然日)',
title: '每期单价(元)', dataIndex: 'collectionSet',
dataIndex: 'unitPrice', key: 'collectionSet',
key: 'unitPrice', valueType: 'digit',
valueType: 'digit', hideInSearch: true,
precision: 2, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
formItemProps: { colProps: { span: 8 },
rules: [ hideInTable: true,
{ precision: 0,
required: true, min: 1
message: '此项为必填项', },
}, {
], title: '预警设置(自然日)',
}, dataIndex: 'warnSet',
colProps: { key: 'warnSet',
sm: 3, hideInSearch: true,
}, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
min: 0.01 colProps: { span: 8 },
valueType: 'digit',
hideInTable: true,
precision: 0,
min: 1
},
{
title: '合同租期(月)',
dataIndex: 'tenancy',
key: 'tenancy',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
colProps: { span: 8 },
hideInSearch: true,
valueType: 'digit',
precision: 0,
min: 1
},
{
title: '租赁设备',
dataIndex: 'contractEquipmentList',
key: 'contractEquipmentList',
hideInSearch: true,
valueType: 'formList',
hideInTable: true,
colProps: {
xs: 24,
sm: 24,
}, },
{ columns: [
title: '智享价(元)', {
dataIndex: 'zxPrice', title: '设备',
key: 'zxPrice', dataIndex: 'equipmentName',
valueType: 'digit', key: 'equipmentId',
precision: 2, valueType: 'select',
formItemProps: { fieldProps: {
rules: [ placeholder: '请选择',
{ showSearch: true
required: true, },
message: '此项为必填项', formItemProps: {
}, rules: [
], {
required: true,
message: '此项为必填项',
},
],
},
colProps: {
sm: 4,
},
options: {
path: '/lease/umLeaseLedger/queryLedgerSelectbox',
params: valtype == 'add' ? {} : { contractId: itemId },
},
}, },
colProps: { {
sm: 3, title: '每期单价',
dataIndex: 'unitPrice',
key: 'unitPrice',
valueType: 'digit',
precision: 2,
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
colProps: {
sm: 3,
},
min: 0.00
}, },
min: 0.01 {
}, title: '智享价',
{ dataIndex: 'zxPrice',
title: '返利金额(元)', key: 'zxPrice',
dataIndex: 'rebatePrice', valueType: 'digit',
key: 'rebatePrice', precision: 2,
valueType: 'digit', formItemProps: {
precision: 2, rules: [
formItemProps: { {
rules: [ required: true,
{ message: '此项为必填项',
required: true, },
message: '此项为必填项', ],
}, },
], colProps: {
sm: 3,
},
min: 0.00
}, },
colProps: { {
sm: 3, title: '返利金额',
dataIndex: 'rebatePrice',
key: 'rebatePrice',
valueType: 'digit',
precision: 2,
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
colProps: {
sm: 3,
},
fieldProps: {
disabled: true
},
min: 0.00
}, },
fieldProps: { {
disabled: true title: '交付运费',
dataIndex: 'deliveryPrice',
key: 'deliveryPrice',
valueType: 'digit',
precision: 2,
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
colProps: {
sm: 3,
},
min: 0.00
}, },
min: 0.00 {
}, title: '交付日期',
{ dataIndex: 'deliveryDate',
title: '押金(元)', key: 'deliveryDate',
dataIndex: 'deposit', valueType: 'date',
key: 'deposit', colProps: {
valueType: 'digit', sm: 3,
precision: 2, }
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
}, },
colProps: { {
sm: 3, title: '押金',
dataIndex: 'deposit',
key: 'deposit',
valueType: 'digit',
precision: 2,
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
colProps: {
sm: 2,
},
min: 0.00
}, },
min: 0.01 {
title: '备注',
dataIndex: 'remark',
key: 'remark',
colProps: {
sm: 3,
},
}
],
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
min: 1
},
{
title: '营销区域',
dataIndex: 'marketRegion',
key: 'marketRegion',
hideInSearch: true,
colProps: { span: 8 },
},
{
title: '智享店',
dataIndex: 'zxstore',
key: 'zxstore',
colProps: { span: 8 },
hideInSearch: true,
hideInTable: true,
},
{
title: '签订日期',
dataIndex: 'registrationDate',
key: 'registrationDate',
colProps: { span: 8 },
hideInSearch: true,
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '承接合同编号',
dataIndex: 'undertakingNo',
key: 'undertakingId',
colProps: { span: 8 },
hideInSearch: true,
hideInTable: true,
valueType: 'select',
options: { path: '/lease/umContract/querySelect', params: { id: valtype == 'edit' ? itemId : '' } },
},
{
title: '销售经理',
dataIndex: 'head',
key: 'head',
hideInSearch: true,
colProps: { span: 8 },
},
{
title: '到货日期',
dataIndex: 'arriveDate',
key: 'arriveDate',
colProps: { span: 8 },
hideInSearch: true,
valueType: 'date'
},
{
title: '合同(最多5个)',
dataIndex: 'contractFileList',
key: 'contractFileList',
hideInSearch: true,
hideInTable: false,
valueType: 'uploadBtn',
span: 3,
fieldProps: {
limit: 5,
}, },
{ colProps: { span: 24 },
title: '备注', render: (_, row) => {
dataIndex: 'remark', return <Filedetail files={valtype == 'only' ? row?.['contractFileList'] : (row?.['contractFileList']?.[0] ? [row?.['contractFileList']?.[0]] : [])} />
key: 'remark',
colProps: {
sm: 6,
},
} }
],
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
min: 1
},
{
title: '营销区域',
dataIndex: 'marketRegion',
key: 'marketRegion',
hideInSearch: true,
colProps: { span: 8 },
hideInTable: true,
},
{
title: '智享店',
dataIndex: 'zxstore',
key: 'zxstore',
colProps: { span: 8 },
hideInSearch: true,
hideInTable: true,
},
{
title: '登记日期',
dataIndex: 'registrationDate',
key: 'registrationDate',
colProps: { span: 8 },
hideInSearch: true,
hideInTable: true,
valueType: 'date',
},
{
title: '承接合同编号',
dataIndex: 'undertakingNo',
key: 'undertakingId',
colProps: { span: 8 },
hideInSearch: true,
hideInTable: true,
valueType: 'select',
options: { path: '/lease/umContract/querySelect', params: { id: valtype == 'edit' ? itemId : '' } },
},
{
title: '合同负责人',
dataIndex: 'head',
key: 'head',
hideInSearch: true,
hideInTable: true,
colProps: { span: 8 },
},
{
title: '合同上传(最多5个)',
dataIndex: 'contractFileList',
key: 'contractFileList',
hideInSearch: true,
hideInTable: false,
valueType: 'uploadBtn',
span: 3,
fieldProps: {
limit: 5,
},
colProps: { span: 24 },
render: (_, row) => {
return <Filedetail files={valtype == 'only' ? row?.['contractFileList'] : (row?.['contractFileList']?.[0] ? [row?.['contractFileList']?.[0]] : [])} />
} }
} ];
];
return [ return [
{ {
tab: '未完成', tab: '未完成',
key: '1', key: '1',
columns: [ columns: [
...common, ...commona,
{
title: '本期应收回款',
dataIndex: 'thisCollection',
key: 'thisCollection',
hideInSearch: true,
hideInForm: true,
},
...commonb,
{ {
title: '状态', title: '状态',
dataIndex: 'statusName', dataIndex: 'statusName',
...@@ -381,7 +419,22 @@ function getcolumns(setdrawer, valtype, itemId) { ...@@ -381,7 +419,22 @@ function getcolumns(setdrawer, valtype, itemId) {
tab: '已完成', tab: '已完成',
key: '2', key: '2',
columns: [ columns: [
...common, ...commona,
{
title: '合同终止日',
dataIndex: 'endLeaseDate',
key: 'endLeaseDate',
hideInSearch: true,
hideInForm: true,
},
{
title: '退还日期',
dataIndex: 'returnDate',
key: 'returnDate',
hideInSearch: true,
hideInForm: true,
},
...commonb,
{ {
title: '状态', title: '状态',
dataIndex: 'statusName', dataIndex: 'statusName',
......
...@@ -57,7 +57,7 @@ const formCommonColumns = [ ...@@ -57,7 +57,7 @@ const formCommonColumns = [
editable: false editable: false
}, },
{ {
title: '每期单价(元)', title: '每期单价',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
key: 'unitPrice', key: 'unitPrice',
colProps: { colProps: {
...@@ -66,7 +66,34 @@ const formCommonColumns = [ ...@@ -66,7 +66,34 @@ const formCommonColumns = [
editable: false editable: false
}, },
{ {
title: '押金(元)', title: '智享价',
dataIndex: 'zxPrice',
key: 'zxPrice',
editable: false,
colProps: {
sm: 2,
},
},
{
title: '返利金额',
dataIndex: 'rebatePrice',
key: 'rebatePrice',
editable: false,
colProps: {
sm: 2,
},
},
{
title: '交付运费',
dataIndex: 'deliveryPrice',
key: 'deliveryPrice',
editable: false,
colProps: {
sm: 2,
},
},
{
title: '押金',
dataIndex: 'deposit', dataIndex: 'deposit',
key: 'deposit', key: 'deposit',
editable: false, editable: false,
...@@ -74,6 +101,15 @@ const formCommonColumns = [ ...@@ -74,6 +101,15 @@ const formCommonColumns = [
sm: 2, sm: 2,
}, },
}, },
{
title: '开始租赁时间',
dataIndex: 'startLeaseDate',
key: 'startLeaseDate',
editable: false,
colProps: {
sm: 3
},
},
{ {
title: '结束租赁时间', title: '结束租赁时间',
dataIndex: 'endLeaseDate', dataIndex: 'endLeaseDate',
...@@ -242,14 +278,6 @@ function Contract(props) { ...@@ -242,14 +278,6 @@ function Contract(props) {
fieldProps: { fieldProps: {
placeholder: '请选择', placeholder: '请选择',
}, },
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
colProps: { colProps: {
sm: 6, sm: 6,
}, },
...@@ -267,6 +295,7 @@ function Contract(props) { ...@@ -267,6 +295,7 @@ function Contract(props) {
], ],
creatorButtonProps: false, creatorButtonProps: false,
deleteIconProps: false, deleteIconProps: false,
bordered: true
}, },
{ {
title: '起租单上传', title: '起租单上传',
...@@ -372,7 +401,6 @@ function Contract(props) { ...@@ -372,7 +401,6 @@ function Contract(props) {
sm: 24, sm: 24,
}, },
columns: [ columns: [
...formCommonColumns,
{ {
title: '实际结束时间', title: '实际结束时间',
dataIndex: 'realEndDate', dataIndex: 'realEndDate',
...@@ -387,7 +415,7 @@ function Contract(props) { ...@@ -387,7 +415,7 @@ function Contract(props) {
hideInFormShowKey: 'realEndDate' hideInFormShowKey: 'realEndDate'
}, },
{ {
title: '违约金(元)', title: '违约金',
dataIndex: 'violatePrice', dataIndex: 'violatePrice',
key: 'violatePrice', key: 'violatePrice',
colProps: { colProps: {
...@@ -400,9 +428,62 @@ function Contract(props) { ...@@ -400,9 +428,62 @@ function Contract(props) {
}, },
hideInFormShowKey: 'violatePrice' hideInFormShowKey: 'violatePrice'
}, },
{
title: '退还运费',
dataIndex: 'returnFreight',
key: 'returnFreight',
colProps: {
sm: 3,
},
valueType: 'digit',
precision: 2,
hideInForm: {
isFinish: [2]
},
hideInFormShowKey: 'returnFreight'
},
{
title: '退还日期',
dataIndex: 'returnDate',
key: 'returnDate',
valueType: 'date',
colProps: {
sm: 3,
},
hideInForm: {
isFinish: [2]
},
hideInFormShowKey: 'returnDate'
},
{
title: '返程运费承担方',
dataIndex: 'returnBear',
key: 'returnBear',
valueType: 'select',
options: [
{
label: '客户',
value: 1
},
{
label: '平台',
value: 2
},
],
colProps: {
sm: 3,
},
hideInForm: {
isFinish: [2]
},
hideInFormShowKey: 'returnBearName'
},
...formCommonColumns,
], ],
creatorButtonProps: false, creatorButtonProps: false,
deleteIconProps: false, deleteIconProps: false,
bordered: false
} }
] ]
})); }));
...@@ -420,31 +501,67 @@ function Contract(props) { ...@@ -420,31 +501,67 @@ function Contract(props) {
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: true, open: true,
item: { ...row, deviceList: res?.data?.dataList ?? [] }, item: { ...row, contractEquipmentList: res?.data?.dataList ?? [] },
val: 'break', val: 'break',
title: '结束', title: '结束',
fields: [ fields: [
{ {
title: '返程运费', title: '',
dataIndex: 'returnFreight', dataIndex: 'contractEquipmentList',
key: 'returnFreight', key: 'contractEquipmentList',
colProps: { span: 8 }, valueType: 'formList',
valueType: 'digit', initialValue: [
precision: 2, {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] } state: 'all',
}, title: '标题',
{ },
title: '返程运费承担方',
dataIndex: 'returnBear',
key: 'returnBear',
valueType: 'select',
options: [
{ label: '客户', value: '1' },
{ label: '平台', value: '2' },
], ],
colProps: { span: 8 }, colProps: {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] } xs: 24,
}, sm: 24,
},
columns: [
{
title: '退还运费',
dataIndex: 'returnFreight',
key: 'returnFreight',
colProps: {
sm: 3,
},
valueType: 'digit',
precision: 2,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }
},
{
title: '退还日期',
dataIndex: 'returnDate',
key: 'returnDate',
colProps: {
sm: 3,
},
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }
},
{
title: '返程运费承担方',
dataIndex: 'returnBear',
key: 'returnBear',
valueType: 'select',
options: [
{ label: '客户', value: 1 },
{ label: '平台', value: 2 },
],
colProps: {
sm: 3,
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }
},
...formCommonColumns,
],
creatorButtonProps: false,
deleteIconProps: false,
bordered: false
}
] ]
})); }));
}, },
...@@ -502,6 +619,32 @@ function Contract(props) { ...@@ -502,6 +619,32 @@ function Contract(props) {
}} }}
> >
处理 处理
</PremButton>,
<PremButton
key='creatremark'
btn={{
size: 'small',
onClick: async () => {
setdrawer((s) => ({
...s,
open: true,
item: { ...row },
val: 'creatremark',
title: `备注 ${row.contractNo}`,
fields: [
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
colProps: { span: 24 },
valueType: 'textarea',
}
]
}));
},
}}
>
备注
</PremButton> </PremButton>
] ]
} }
...@@ -527,16 +670,12 @@ function Contract(props) { ...@@ -527,16 +670,12 @@ function Contract(props) {
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer, drawer?.val, drawer?.item?.id).filter((it) => it.key == activeTabKey)[0]?.columns; let defcolumn = getcolumns(setdrawer, drawer?.val, drawer?.item?.id).filter((it) => it.key == activeTabKey)[0]?.columns;
let defpath = getcolumns(setdrawer, drawer?.val, drawer?.item?.id).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer, drawer?.val, drawer?.item?.id).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
if (activeTabKey == 1) { return defcolumn.concat({
return defcolumn.concat({ title: '操作',
title: '操作', valueType: 'option',
valueType: 'option', width: activeTabKey == '1' ? 150 : 80,
width: 150, render: (text, row, _, action) => rightExtra(text, row, _, action),
render: (text, row, _, action) => rightExtra(text, row, _, action), });
});
} else {
return defcolumn;
}
}, [activeTabKey, drawer?.val, drawer?.item?.id]); }, [activeTabKey, drawer?.val, drawer?.item?.id]);
const tabList = useMemo(() => { const tabList = useMemo(() => {
...@@ -651,24 +790,42 @@ function Contract(props) { ...@@ -651,24 +790,42 @@ function Contract(props) {
} else if (drawer?.val == 'edit') { } else if (drawer?.val == 'edit') {
await runAsync({ url: pathconfig?.edit, params: { ...newVals, id: drawer?.item?.id, amount } }); await runAsync({ url: pathconfig?.edit, params: { ...newVals, id: drawer?.item?.id, amount } });
} else if (drawer?.val == 'start') { } else if (drawer?.val == 'start') {
let equipmentIdList = newVals.intelligenceList?.map(it => it.equipmentId); let equipmentList = newVals?.intelligenceList?.filter(it => it.isBindUnit != 1 && it.ledgerEquipmentId)?.map(it => {
return {
leaseLedgerId: it.equipmentId,
ledgerEquipmentId: it.ledgerEquipmentId
}
}) ?? [];
delete newVals.intelligenceList; delete newVals.intelligenceList;
await runAsync({ url: '/lease/umContract/start', params: { ...newVals, id: drawer?.item?.id, equipmentIdList } }); await runAsync({ url: '/lease/umContract/start', params: { ...newVals, id: drawer?.item?.id, equipmentList } });
} else if (drawer?.val == 'out') { } else if (drawer?.val == 'out') {
let contractEquipmentList = newVals.deviceList?.filter(it => { let contractEquipmentList = newVals.deviceList?.filter(it => {
if (it.isFinish == 1) { if (it.isFinish == 1) {
return { return {
id: it.id, id: it.id,
realEndDate: it.realEndDate, realEndDate: it.realEndDate,
violatePrice: it.violatePrice violatePrice: it.violatePrice,
returnFreight: it.returnFreight,
returnBear: it.returnBear,
returnDate: it.returnDate
} }
} }
}) })
await runAsync({ url: '/lease/umContract/rentout', params: { contractEquipmentList, id: drawer?.item?.id } }); await runAsync({ url: '/lease/umContract/rentout', params: { contractEquipmentList, id: drawer?.item?.id } });
} else if (drawer?.val == 'break') { } else if (drawer?.val == 'break') {
await runAsync({ url: '/lease/umContract/end', params: { ...newVals, id: drawer?.item?.id } }); let contractEquipmentList = newVals?.contractEquipmentList?.map(it => {
return {
id: it.id,
returnFreight: it.returnFreight,
returnBear: it.returnBear,
returnDate: it.returnDate
}
})
await runAsync({ url: '/lease/umContract/end', params: { contractEquipmentList, id: drawer?.item?.id } });
} else if (drawer?.val == 'handle') { } else if (drawer?.val == 'handle') {
await runAsync({ url: '/lease/umContract/handle', params: { ...newVals, id: drawer?.item?.id } }); await runAsync({ url: '/lease/umContract/handle', params: { ...newVals, id: drawer?.item?.id } });
} else if (drawer?.val == 'creatremark') {
await runAsync({ url: '/lease/umContract/remark', params: { ...newVals, id: drawer?.item?.id } });
} }
}} }}
onValuesChange={(changedValues, allValues) => { onValuesChange={(changedValues, allValues) => {
...@@ -699,11 +856,6 @@ function Contract(props) { ...@@ -699,11 +856,6 @@ function Contract(props) {
} }
}) })
} }
if (i == 'intelligenceList') {
let params = changedValues[i], equipmentId = params.length > 0 ? intelligenceList[params.length - 1]?.equipmentId : "";
params = params.length > 0 ? params[params.length - 1] : {};
doFetch({ url: '/lease/umLeaseLedger/bound', params: { ...params, id: equipmentId } });
}
} }
}} }}
submitter={{ submitter={{
...@@ -745,13 +897,13 @@ function Contract(props) { ...@@ -745,13 +897,13 @@ function Contract(props) {
}, },
}} }}
childrenposition={(drawer.val == 'break' || drawer.val == 'handle') ? 'top' : ''} childrenposition={(drawer.val == 'handle') ? 'top' : ''}
> >
{ {
drawer.val == 'only' && getOnlyDom() drawer.val == 'only' && getOnlyDom()
} }
{ {
(drawer.val == 'break' || drawer.val == 'handle') && <FormTable columns={[ (drawer.val == 'handle') && <FormTable columns={[
...formCommonColumns, ...formCommonColumns,
{ {
title: '实际结束时间', title: '实际结束时间',
...@@ -763,7 +915,7 @@ function Contract(props) { ...@@ -763,7 +915,7 @@ function Contract(props) {
editable: false editable: false
}, },
{ {
title: '违约金(元)', title: '违约金',
dataIndex: 'violatePrice', dataIndex: 'violatePrice',
key: 'violatePrice', key: 'violatePrice',
colProps: { colProps: {
......
...@@ -8,7 +8,7 @@ const statusColors = { ...@@ -8,7 +8,7 @@ const statusColors = {
function getcolumns(setdrawer, activeKey) { function getcolumns(setdrawer, activeKey) {
const commona = [ const commona = [
{ {
title: '客户', title: '客户名称',
dataIndex: 'customerName', dataIndex: 'customerName',
key: 'customerId', key: 'customerId',
valueType: 'select', valueType: 'select',
...@@ -35,37 +35,86 @@ function getcolumns(setdrawer, activeKey) { ...@@ -35,37 +35,86 @@ function getcolumns(setdrawer, activeKey) {
key: 'equipmentName', key: 'equipmentName',
}, },
{ {
title: '智能单元莫格云眼编号', title: '设备型号',
dataIndex: 'intelligentUnitNo', dataIndex: 'equipmentModelName',
key: 'intelligentUnitNo', key: 'equipmentModelName',
width: 170
},
{
title: '每期单价(元)',
dataIndex: 'unitPrice',
key: 'unitPrice',
hideInSearch: true hideInSearch: true
}, },
{ {
title: '智享价(元)', title: '莫格云眼',
dataIndex: 'zxPrice', dataIndex: 'intelligentUnitNo',
key: 'zxPrice', key: 'intelligentUnitNo',
hideInSearch: true width: 170
},
{
title: '返利金额(元)',
dataIndex: 'rebatePrice',
key: 'rebatePrice',
hideInSearch: true
}, },
{ {
title: '押金(元)', title: '出库区域',
dataIndex: 'deposit', dataIndex: 'intelligentUnitNo',
key: 'deposit', key: 'intelligentUnitNo',
hideInSearch: true
} }
], ],
commonb = [ commonb = [
{
title: '每期单价',
dataIndex: 'unitPrice',
key: 'unitPrice',
hideInSearch: true
},
{
title: '智享价',
dataIndex: 'zxPrice',
key: 'zxPrice',
hideInSearch: true
},
{
title: '返利金额',
dataIndex: 'rebatePrice',
key: 'rebatePrice',
hideInSearch: true
},
{
title: '交付运费',
dataIndex: 'deliveryPrice',
key: 'deliveryPrice',
hideInSearch: true
},
{
title: '交付日期',
dataIndex: 'deliveryDate',
key: 'deliveryDate',
hideInSearch: true
},
{
title: '退还运费',
dataIndex: 'returnFreight',
key: 'returnFreight',
hideInSearch: true
},
{
title: '退还日期',
dataIndex: 'returnDate',
key: 'returnDate',
hideInSearch: true
},
{
title: '返程运费承担方',
dataIndex: 'returnBearName',
key: 'returnBearName',
hideInSearch: true
},
{
title: '押金',
dataIndex: 'deposit',
key: 'deposit',
hideInSearch: true
},
{
title: '违约金',
dataIndex: 'violatePrice',
key: 'violatePrice',
hideInSearch: true
}
],
commonc = [
{ {
title: '开票期数', title: '开票期数',
dataIndex: 'openNum', dataIndex: 'openNum',
...@@ -153,6 +202,7 @@ function getcolumns(setdrawer, activeKey) { ...@@ -153,6 +202,7 @@ function getcolumns(setdrawer, activeKey) {
hideInSearch: true hideInSearch: true
}, },
...commonb, ...commonb,
...commonc,
{ {
title: '回款状态', title: '回款状态',
dataIndex: 'collectionStatusName', dataIndex: 'collectionStatusName',
...@@ -202,7 +252,14 @@ function getcolumns(setdrawer, activeKey) { ...@@ -202,7 +252,14 @@ function getcolumns(setdrawer, activeKey) {
}, },
hideInSearch: true hideInSearch: true
}, },
...commonb,] ...commonb,
{
title: '入库区域',
dataIndex: 'intelligentUnitNo',
key: 'intelligentUnitNo',
},
...commonc
]
} }
] ]
......
...@@ -135,7 +135,7 @@ const Costanalysis = () => { ...@@ -135,7 +135,7 @@ const Costanalysis = () => {
title: '租金减免', title: '租金减免',
fields: [ fields: [
{ {
title: '当前减免金额(元)', title: '当前减免金额',
dataIndex: 'reducePrice', dataIndex: 'reducePrice',
key: 'reducePrice', key: 'reducePrice',
valueType: 'digit', valueType: 'digit',
......
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