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

设备台账修改

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