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

设备台账修改

parent aab9e0ac
...@@ -248,39 +248,43 @@ const Details = ({ drawer }) => { ...@@ -248,39 +248,43 @@ const Details = ({ drawer }) => {
}, },
{ {
title: '出库区域', title: '出库区域',
dataIndex: 'equipmentModelName', dataIndex: 'shopName',
key: 'equipmentModelName', key: 'shopName',
hideInSearch: true hideInSearch: true
}, },
{ {
title: '入库区域', title: '入库区域',
dataIndex: 'equipmentModelName', dataIndex: 'returnShopName',
key: 'equipmentModelName', key: 'returnShopName',
hideInSearch: true hideInSearch: true
}, },
{ {
title: '每期单价', title: '每期单价',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
key: 'unitPrice', key: 'unitPrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '智享价', title: '智享价',
dataIndex: 'zxPrice', dataIndex: 'zxPrice',
key: 'zxPrice', key: 'zxPrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '返利金额', title: '返利金额',
dataIndex: 'rebatePrice', dataIndex: 'rebatePrice',
key: 'rebatePrice', key: 'rebatePrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '交付运费', title: '交付运费',
dataIndex: 'deliveryPrice', dataIndex: 'deliveryPrice',
key: 'deliveryPrice', key: 'deliveryPrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '交付日期', title: '交付日期',
...@@ -292,7 +296,8 @@ const Details = ({ drawer }) => { ...@@ -292,7 +296,8 @@ const Details = ({ drawer }) => {
title: '押金', title: '押金',
dataIndex: 'deposit', dataIndex: 'deposit',
key: 'deposit', key: 'deposit',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '开始租赁时间', title: '开始租赁时间',
...@@ -316,13 +321,15 @@ const Details = ({ drawer }) => { ...@@ -316,13 +321,15 @@ const Details = ({ drawer }) => {
title: '违约金', title: '违约金',
dataIndex: 'violatePrice', dataIndex: 'violatePrice',
key: 'violatePrice', key: 'violatePrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '退还运费', title: '退还运费',
dataIndex: 'returnFreight', dataIndex: 'returnFreight',
key: 'returnFreight', key: 'returnFreight',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '退还日期', title: '退还日期',
......
...@@ -71,7 +71,7 @@ const formCommonColumns = [ ...@@ -71,7 +71,7 @@ const formCommonColumns = [
key: 'zxPrice', key: 'zxPrice',
editable: false, editable: false,
colProps: { colProps: {
sm: 2, sm: 1,
}, },
}, },
{ {
...@@ -98,7 +98,7 @@ const formCommonColumns = [ ...@@ -98,7 +98,7 @@ const formCommonColumns = [
key: 'deposit', key: 'deposit',
editable: false, editable: false,
colProps: { colProps: {
sm: 2, sm: 1,
}, },
}, },
{ {
...@@ -107,7 +107,7 @@ const formCommonColumns = [ ...@@ -107,7 +107,7 @@ const formCommonColumns = [
key: 'startLeaseDate', key: 'startLeaseDate',
editable: false, editable: false,
colProps: { colProps: {
sm: 3 sm: 2
}, },
}, },
{ {
...@@ -116,7 +116,7 @@ const formCommonColumns = [ ...@@ -116,7 +116,7 @@ const formCommonColumns = [
key: 'endLeaseDate', key: 'endLeaseDate',
editable: false, editable: false,
colProps: { colProps: {
sm: 3, sm: 2,
}, },
}, },
{ {
......
...@@ -48,8 +48,8 @@ function getcolumns(setdrawer, activeKey) { ...@@ -48,8 +48,8 @@ function getcolumns(setdrawer, activeKey) {
}, },
{ {
title: '出库区域', title: '出库区域',
dataIndex: 'intelligentUnitNo', dataIndex: 'shopName',
key: 'intelligentUnitNo', key: 'shopName',
} }
], ],
commonb = [ commonb = [
...@@ -57,25 +57,29 @@ function getcolumns(setdrawer, activeKey) { ...@@ -57,25 +57,29 @@ function getcolumns(setdrawer, activeKey) {
title: '每期单价', title: '每期单价',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
key: 'unitPrice', key: 'unitPrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '智享价', title: '智享价',
dataIndex: 'zxPrice', dataIndex: 'zxPrice',
key: 'zxPrice', key: 'zxPrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '返利金额', title: '返利金额',
dataIndex: 'rebatePrice', dataIndex: 'rebatePrice',
key: 'rebatePrice', key: 'rebatePrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '交付运费', title: '交付运费',
dataIndex: 'deliveryPrice', dataIndex: 'deliveryPrice',
key: 'deliveryPrice', key: 'deliveryPrice',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '交付日期', title: '交付日期',
...@@ -87,7 +91,8 @@ function getcolumns(setdrawer, activeKey) { ...@@ -87,7 +91,8 @@ function getcolumns(setdrawer, activeKey) {
title: '退还运费', title: '退还运费',
dataIndex: 'returnFreight', dataIndex: 'returnFreight',
key: 'returnFreight', key: 'returnFreight',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '退还日期', title: '退还日期',
...@@ -99,19 +104,22 @@ function getcolumns(setdrawer, activeKey) { ...@@ -99,19 +104,22 @@ function getcolumns(setdrawer, activeKey) {
title: '返程运费承担方', title: '返程运费承担方',
dataIndex: 'returnBearName', dataIndex: 'returnBearName',
key: 'returnBearName', key: 'returnBearName',
hideInSearch: true hideInSearch: true,
width: 120
}, },
{ {
title: '押金', title: '押金',
dataIndex: 'deposit', dataIndex: 'deposit',
key: 'deposit', key: 'deposit',
hideInSearch: true hideInSearch: true,
width: 80
}, },
{ {
title: '违约金', title: '违约金',
dataIndex: 'violatePrice', dataIndex: 'violatePrice',
key: 'violatePrice', key: 'violatePrice',
hideInSearch: true hideInSearch: true,
width: 80
} }
], ],
commonc = [ commonc = [
...@@ -199,7 +207,8 @@ function getcolumns(setdrawer, activeKey) { ...@@ -199,7 +207,8 @@ function getcolumns(setdrawer, activeKey) {
</a> </a>
); );
}, },
hideInSearch: true hideInSearch: true,
width: 110
}, },
...commonb, ...commonb,
...commonc, ...commonc,
...@@ -218,7 +227,7 @@ function getcolumns(setdrawer, activeKey) { ...@@ -218,7 +227,7 @@ function getcolumns(setdrawer, activeKey) {
render: (_, row) => { render: (_, row) => {
return <span style={{ color: statusColors[row.collectionStatus] }}>{row.collectionStatusName}</span> return <span style={{ color: statusColors[row.collectionStatus] }}>{row.collectionStatusName}</span>
}, },
width: 100 width: 80
}, },
] ]
}, },
...@@ -255,8 +264,8 @@ function getcolumns(setdrawer, activeKey) { ...@@ -255,8 +264,8 @@ function getcolumns(setdrawer, activeKey) {
...commonb, ...commonb,
{ {
title: '入库区域', title: '入库区域',
dataIndex: 'intelligentUnitNo', dataIndex: 'returnShopName',
key: 'intelligentUnitNo', key: 'returnShopName',
}, },
...commonc ...commonc
] ]
......
...@@ -233,7 +233,7 @@ const Costanalysis = () => { ...@@ -233,7 +233,7 @@ const Costanalysis = () => {
actionRef={actionRef} actionRef={actionRef}
resizeable={false} resizeable={false}
bordered={false} bordered={false}
x={2500} x={3200}
onTabChange={(key) => { onTabChange={(key) => {
catk(key); catk(key);
setextraparams({}); setextraparams({});
......
...@@ -57,8 +57,8 @@ function getcolumns(setdrawer, activeKey) { ...@@ -57,8 +57,8 @@ function getcolumns(setdrawer, activeKey) {
}, },
{ {
title: '莫格云眼', title: '莫格云眼',
dataIndex: 'ledgerEquipment', dataIndex: 'ledgerEquipmentNo',
key: 'ledgerEquipment', key: 'ledgerEquipmentNo',
hideInForm: true, hideInForm: true,
colProps: { span: 8 } colProps: { span: 8 }
}, },
......
...@@ -123,7 +123,7 @@ const LeftTable = ({ onChange }) => { ...@@ -123,7 +123,7 @@ const LeftTable = ({ onChange }) => {
[flag, setFlag] = useState(false); [flag, setFlag] = useState(false);
const ledgerCustomer = useRequest(async () => { const ledgerCustomer = useRequest(async () => {
let res = await doFetch({ url: "/lease/umLeaseLedger/ledgerCustomerEquipmentUseRate", params: { ...searchParams } }); let res = await doFetch({ url: "/lease/umLeaseLedger/ledgerCustomerEquipmentUseRate", params: { ...searchParams } });
cr(res?.data?.dataList?.[0]); // cr(res?.data?.dataList?.[0]);
return res?.data?.dataList ?? []; return res?.data?.dataList ?? [];
}, { }, {
refreshDeps: [searchParams] refreshDeps: [searchParams]
...@@ -192,7 +192,7 @@ const Leasedevice = () => { ...@@ -192,7 +192,7 @@ const Leasedevice = () => {
<div style={{ flex: 2, marginTop: 26, borderLeft: '1px solid #f0f0f0', paddingLeft: 15 }}> <div style={{ flex: 2, marginTop: 26, borderLeft: '1px solid #f0f0f0', paddingLeft: 15 }}>
<AutoTable <AutoTable
columns={columnsb} columns={columnsb}
path={extraparamsId ? '/lease/umLeaseLedger/ledgerCustomerEquipmentUseDetail' : ''} path='/lease/umLeaseLedger/ledgerCustomerEquipmentUseDetail'
resizeable={false} resizeable={false}
pageextra="none" pageextra="none"
extraparams={{ ledgerCustomerId: extraparamsId }} extraparams={{ ledgerCustomerId: extraparamsId }}
......
...@@ -23,6 +23,18 @@ const Leaseresume = ({ setdrawer, drawer }) => { ...@@ -23,6 +23,18 @@ const Leaseresume = ({ setdrawer, drawer }) => {
key: 'endLeaseTimeList', key: 'endLeaseTimeList',
valueType: 'dateRange', valueType: 'dateRange',
}, },
{
title: '出库区域',
dataIndex: 'shopName',
key: 'shopName',
hideInSearch: true
},
{
title: '入库区域',
dataIndex: 'inShopName',
key: 'inShopName',
hideInSearch: true
},
{ {
title: '相关单号', title: '相关单号',
dataIndex: 'businessNo', dataIndex: 'businessNo',
......
import { Tooltip, Image } from 'antd'; import { Tooltip, Image } from 'antd';
import Filedetail from "@/components/Filedetail";
function getcolumns(setdrawer) { function getcolumns(setdrawer) {
return { return {
columns: [ columns: [
...@@ -49,8 +50,8 @@ function getcolumns(setdrawer) { ...@@ -49,8 +50,8 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '关联设备', title: '关联设备',
dataIndex: 'ledgerEquipment', dataIndex: 'ledgerEquipmentNo',
key: 'ledgerEquipment', key: 'ledgerEquipmentNo',
hideInForm: true, hideInForm: true,
colProps: { span: 8 } colProps: { span: 8 }
}, },
...@@ -243,6 +244,18 @@ function getcolumns(setdrawer) { ...@@ -243,6 +244,18 @@ function getcolumns(setdrawer) {
key: 'propertyUnit', key: 'propertyUnit',
colProps: { span: 8 } colProps: { span: 8 }
}, },
{
title: '制造商',
dataIndex: 'manufacturer',
key: 'manufacturer',
colProps: { span: 8 }
},
{
title: '采购合同编号',
dataIndex: 'procurementContractNo',
key: 'procurementContractNo',
colProps: { span: 8 }
},
{ {
title: '上传图片', title: '上传图片',
dataIndex: 'picList', dataIndex: 'picList',
...@@ -253,7 +266,8 @@ function getcolumns(setdrawer) { ...@@ -253,7 +266,8 @@ function getcolumns(setdrawer) {
valueType: 'uploadImage', valueType: 'uploadImage',
fieldProps: { fieldProps: {
limit: 1, limit: 1,
} },
colProps: { span: 24 }
}, },
{ {
title: '图片', title: '图片',
...@@ -273,8 +287,25 @@ function getcolumns(setdrawer) { ...@@ -273,8 +287,25 @@ function getcolumns(setdrawer) {
hideInForm: true, hideInForm: true,
render: (_, row) => { render: (_, row) => {
return row?.qrCodeUrl ? <Image style={{ width: 40, height: 40, objectFit: 'contain', objectPosition: 'center' }} src={row?.qrCodeUrl} /> : '-' return row?.qrCodeUrl ? <Image style={{ width: 40, height: 40, objectFit: 'contain', objectPosition: 'center' }} src={row?.qrCodeUrl} /> : '-'
} },
} span: 3
},
{
title: '基本配置',
dataIndex: 'baseFileList',
key: 'baseFileList',
hideInSearch: true,
hideInTable: true,
valueType: 'uploadBtn',
fieldProps: {
limit: 5,
},
render: (_, row) => {
return <Filedetail files={row?.['baseFileList']} />
},
span: 3,
colProps: { span: 24 }
},
], ],
pathconfig: { pathconfig: {
add: '/lease/umLeaseLedger/save', add: '/lease/umLeaseLedger/save',
......
...@@ -91,7 +91,7 @@ const Ledger = () => { ...@@ -91,7 +91,7 @@ const Ledger = () => {
setextraparams(params); setextraparams(params);
}; };
const getExtra = (text, row, _, action) => { const getExtra = (text, row, _, action) => {
//0: 报废 1: 预占 2: 租赁 3: 销售 4: 闲置 5:待复检 6: 未绑定 7: 绑定 //0: 报废 1: 预占 2: 租赁 3: 销售 4: 闲置 5:待复检 6: 未绑定 7: 绑定 8:待确认
let ifsd = row.status == 0, let ifsd = row.status == 0,
ifsa = row.status == 1, ifsa = row.status == 1,
ifsb = row.status == 2, ifsb = row.status == 2,
...@@ -100,6 +100,7 @@ const Ledger = () => { ...@@ -100,6 +100,7 @@ const Ledger = () => {
ifsc = row.status == 5, ifsc = row.status == 5,
ifse = row.status == 6, ifse = row.status == 6,
ifsf = row.status == 7, ifsf = row.status == 7,
ifsh = row.status == 8,
devicetype1 = row.equipmentType == 1, devicetype1 = row.equipmentType == 1,
devicetype2 = row.equipmentType == 2, devicetype2 = row.equipmentType == 2,
intelligentUnit = row.ledgerEquipment; intelligentUnit = row.ledgerEquipment;
...@@ -122,7 +123,7 @@ const Ledger = () => { ...@@ -122,7 +123,7 @@ const Ledger = () => {
> >
修改 修改
</PremButton>, </PremButton>,
devicetype1 && <PremButton devicetype1 && !row.ledgerEquipmentNo && <PremButton
key='bind' key='bind'
btn={{ btn={{
size: 'small', size: 'small',
...@@ -157,16 +158,27 @@ const Ledger = () => { ...@@ -157,16 +158,27 @@ const Ledger = () => {
</PremButton>, </PremButton>,
devicetype2 && ifsf && <PremButton devicetype2 && ifsf && <PremButton
key='unbind' key='unbind'
pop={{
title: '是否解绑?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
runAsync({ url: "/lease/umLeaseLedger/unBingDing", params: { id: row.id } });
},
}}
btn={{ btn={{
size: 'small', size: 'small',
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
item: { id: row.id },
val: 'unbind',
title: '解绑',
fields: [
{
title: '车间',
dataIndex: 'shopId',
key: 'shopId',
valueType: 'select',
options: { path: '/auth/sysShop/queryDefaultListBox', params: {} },
colProps: { span: 8 }
},
]
}));
}
}} }}
> >
解绑 解绑
...@@ -226,6 +238,52 @@ const Ledger = () => { ...@@ -226,6 +238,52 @@ const Ledger = () => {
> >
转闲置 转闲置
</PremButton>, </PremButton>,
devicetype1 && ifsh && <PremButton
key='issure'
btn={{
size: 'small',
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
item: row,
val: 'issure',
title: '确认',
fields: [
{
title: '该设备是否续租',
dataIndex: 'isNeedLease',
key: 'isNeedLease',
valueType: 'radio',
options: [
{
label: '续租',
value: 1
},
{
label: '不续租',
value: 0
},
],
colProps: { span: 8 },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
title: '车间',
dataIndex: 'shopId',
key: 'shopId',
valueType: 'select',
options: { path: '/auth/sysShop/queryDefaultListBox', params: {} },
colProps: { span: 8 },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
]
}));
}
}}
>
确认
</PremButton>,
ifsd && <PremButton ifsd && <PremButton
key='remove' key='remove'
pop={{ pop={{
...@@ -380,8 +438,8 @@ const Ledger = () => { ...@@ -380,8 +438,8 @@ const Ledger = () => {
<DrawerPro <DrawerPro
{...drawer} {...drawer}
fields={drawer.val == 'bind' ? drawer.fields : columns} fields={(drawer.val == 'bind' || drawer.val == 'issure' || drawer.val == 'unbind') ? drawer.fields : columns}
detailpath={drawer.val == 'add' || !drawer?.item?.id ? '' : pathconfig?.detail} detailpath={(drawer.val == 'add' || !drawer?.item?.id || drawer.val == 'unbind') ? '' : pathconfig?.detail}
params={drawer.val == 'add' ? {} : { id: drawer?.item?.id }} params={drawer.val == 'add' ? {} : { id: drawer?.item?.id }}
defaultFormValue={drawer?.item ?? {}} defaultFormValue={drawer?.item ?? {}}
placement="right" placement="right"
...@@ -402,6 +460,10 @@ const Ledger = () => { ...@@ -402,6 +460,10 @@ const Ledger = () => {
}); });
} else if (drawer.val == 'bind') { } else if (drawer.val == 'bind') {
await runAsync({ url: "/lease/umLeaseLedger/bound", params: { ...newParams, id: drawer?.item?.id } }); await runAsync({ url: "/lease/umLeaseLedger/bound", params: { ...newParams, id: drawer?.item?.id } });
} else if (drawer.val == 'issure') {
await runAsync({ url: "/lease/umLeaseLedger/submit", params: { ...newParams, id: drawer?.item?.id } });
} else if (drawer.val == 'unbind') {
await runAsync({ url: "/lease/umLeaseLedger/unBingDing", params: { ...newParams, id: drawer?.item?.id } });
} }
}} }}
bodyStyle={drawer?.type == 'status' ? { padding: 0 } : {}} bodyStyle={drawer?.type == 'status' ? { padding: 0 } : {}}
......
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