Commit 36f252db authored by krysent's avatar krysent

新增标签

parent 2073e6fc
import { CopyOutlined } from '@ant-design/icons';
import { Input, Button, message, Divider } from 'antd';
import copy from 'copy-to-clipboard';
import { useState } from 'react';
const ColumnsTrans = () => {
const [requestMsg, setrequestMsg] = useState('');
const [newRequest, setnewRequest] = useState('');
const [borderColor, setborderColor] = useState(null);
const translateHandler = () => {
try {
let newString = JSON.parse(requestMsg);
// let newString = eval('('+requestMsg+')');
const newRequestArr = formatPrettier(newString);
setnewRequest(newRequestArr);
setborderColor('green');
} catch (error) {
message.error('“request”内容的格式不符合JSON字符串格式!');
setborderColor('red');
}
};
const formatPrettier = (jsonObj) => {
// debugger
// {
// title: '文本',
// key: 'text',
// dataIndex: 'id',
// },
let arr = [];
for (let key in jsonObj) {
if (key.toLowerCase() == 'id') continue;
const newObj = {
title: jsonObj[key],
key: key,
dataIndex: key,
};
arr = [...arr, newObj];
}
const newRequestString = JSON.stringify(arr)
.replace(/\[/g, '[\n\t')
.replace(/\]/g, ']')
.replace(/\,/g, ',\n\t')
.replace(/\{/g, '{\n\t')
.replace(/\}\,/g, '\n\t},')
.replace(/\}\]/g, '\n\t}\n]');
return newRequestString;
};
return (
<div>
<Divider orientation="left">Request</Divider>
<Input.TextArea
name="text"
placeholder="请输入Request内容,须符合JSON字符串格式"
allowClear={true}
value={requestMsg}
autoSize={{ minRows: 10 }}
onChange={(value) => {
let newValue = value?.target?.value;
setrequestMsg(newValue);
}}
style={{ borderColor: borderColor }}
/>
<Button type="primary" onClick={translateHandler} style={{ margin: 6 }}>
转换
</Button>
<Input.TextArea name="beautify" autoSize={{ minRows: 8, maxRows: 16 }} value={newRequest} />
<Button
style={{ margin: 6 }}
onClick={() => {
copy(newRequest);
message.success('已成功复制到剪切板!');
}}
>
复制
</Button>
</div>
);
};
export default ColumnsTrans;
This diff is collapsed.
......@@ -7,7 +7,6 @@ import { doFetch } from '@/utils/doFetch';
const EditTable = (props) => {
const {
actionRef, //表格动作
formRef, //表单Ref
rowKey, // key
columns = [], //columns
......@@ -22,7 +21,9 @@ const EditTable = (props) => {
dataSource,
} = props;
const actionRefs = actionRef ?? useRef(),
let actionRefs = useRef(),
formRefs = formRef ?? useRef(),
ifspagination = pagination == 'false' || pagination === false,
[size, setsize] = useState('small');
......@@ -35,6 +36,9 @@ const EditTable = (props) => {
success: true,
total: dataSource?.length ?? 0,
};
// console.log('====================================');
// console.log(extraparams);
// console.log('====================================');
let newparams = {
...params,
...extraparams, //父组件传参
......@@ -125,6 +129,7 @@ const EditTable = (props) => {
{...props}
recordCreatorProps={false}
size={size}
params={{ ...extraparams }}
onSubmit={(params) => {
//console.log(params, 'onSubmit');
}}
......@@ -142,20 +147,20 @@ const EditTable = (props) => {
scroll={
x
? {
x: x,
}
x: x,
}
: {}
}
pagination={
ifspagination
? false
: {
showTotal: (total, range) => <span>{total}</span>,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: [5, 10, 15, 30, 50, 100, 200],
defaultPageSize: pageSize || 15,
}
showTotal: (total, range) => <span>{total}</span>,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: [5, 10, 15, 30, 50, 100, 200],
defaultPageSize: pageSize || 15,
}
}
editable={{
type: 'multiple',
......@@ -164,7 +169,7 @@ const EditTable = (props) => {
}}
search={{
filterType: 'light', //轻量模式
placement: 'bottomLeft'
placement: 'bottomLeft',
}}
/>
);
......
/* eslint-disable react-hooks/exhaustive-deps */
import 'braft-editor/dist/index.css';
import BraftEditor from 'braft-editor';
import React, { useState, useMemo, useEffect } from 'react';
import moment from 'moment';
import defaultSetting from '../../../../config/defaultSettings';
export default function EditorItem({
value,
onChange,
height,
serverURL,
style,
bordered,
formRef,
curkey,
}) {
let UploadFn = (param) => {
const xhr = new XMLHttpRequest();
const fd = new FormData();
const successFn = (response) => {
// 假设服务端直接返回文件上传后的地址
// 上传成功后调用param.success并传入上传后的文件地址
param.success({
url: xhr.responseText ? JSON.parse(xhr.responseText).data?.dataList[0].url : null,
meta: {
id: moment(),
title: param.file.name,
alt: param.file.name,
loop: true, // 指定音视频是否循环播放
autoPlay: true, // 指定音视频是否自动播放
controls: true, // 指定音视频是否显示控制栏
poster: 'http://xxx/xx.png', // 指定视频播放器的封面
},
});
};
const progressFn = (event) => {
// 上传进度发生变化时调用param.progress
param.progress((event.loaded / event.total) * 100);
};
const errorFn = (response) => {
// 上传发生错误时调用param.error
param.error({
msg: '上传失败',
});
};
xhr.upload.addEventListener('progress', progressFn, false);
xhr.addEventListener('load', successFn, false);
xhr.addEventListener('error', errorFn, false);
xhr.addEventListener('abort', errorFn, false);
fd.append('file', param.file);
xhr.open(
'POST',
serverURL
? serverURL
: defaultSetting.proxypath + '/ngic-base-business/sysAttachment/uploadFile',
true,
);
xhr.send(fd);
};
return (
<div
style={{
...style,
border: bordered === false ? '#f9f9f9 solid 1px' : '#ddd solid 1px',
border: '#ddd solid 1px',
height: height ? height : 400,
overflow: 'hidden',
}}
>
<BraftEditor
media={{ uploadFn: UploadFn }}
value={BraftEditor.createEditorState(value)}
onChange={onChange}
/>
</div>
);
}
import { doFetch } from '@/utils/doFetch';
import React, { useState, useEffect, useForceUpdate } from 'react';
import AutoTable from '../../AutoTable/mtable';
import EditTable from '../EditTable';
function Expandables({ value = [], onChange, item }) {
const [allDatasource, setallDatasource] = useState({});
const [nvalue, setnvalue] = useState([]);
return (
<div>
<AutoTable
columns={item?.columns}
path={item?.path}
extraparams={item?.extraparams}
expandable={{
expandRowByClick: true,
onExpand: (expanded, record) => {
if (!expanded) return;
//找到value中当前展开的值
let curvalue = value
? value.filter((it) => it.lifePieceAccountId == record.id)?.[0]
: {};
//value中的list
let curvalist = curvalue?.lineStockUseList ?? [];
doFetch({ url: item.expandablePath, params: { lifePieceAccountId: record.id } }).then(
(res) => {
//展开接口返回的结果
let curDatasource = res?.data?.dataList ?? [];
//组合数据
let result = curDatasource?.map((it) => {
const itemval =
curvalist?.filter?.((item) => item.lineStockId == it.id)?.[0] ?? false;
if (itemval) {
it.operateNum = itemval.operateNum;
}
return it;
});
setallDatasource((s) => ({
...s,
[record.id]: result,
}));
},
);
},
expandedRowRender: (record) => {
let curvalue = value
? value.filter((it) => it.lifePieceAccountId == record.id)?.[0]
: {};
// console.log('nvalue', nvalue);
// console.log('record', record);
// console.log('allDatasource:', allDatasource);
// console.log(
// 'defaultvalue:',
// nvalue?.filter((it) => it.lifePieceAccountId == record.id)?.[0]?.lineStockUseList,
// );
return (
<>
<EditTable
key={nvalue
.filter((it) => it.lifePieceAccountId == record.id)?.[0]
?.lineStockUseList.map((it) => it.lineStockId)}
resizeable={false}
alwaysShowAlert={false}
tableAlertRender={false}
tableAlertOptionRender={false}
defaultValue={nvalue
?.filter((it) => it.lifePieceAccountId == record.id)?.[0]
?.lineStockUseList.map((i) => ({
id: i.lineStockId,
operateNum: i.operateNum,
}))}
columns={[
{
title: '线边库',
dataIndex: 'stockName',
search: false,
key: 'stockName',
editable: false,
},
{
title: '供应商编号',
dataIndex: 'supplierNo',
key: 'supplierNo',
search: false,
editable: false,
},
{
title: '供应商名称',
dataIndex: 'supplierName',
search: false,
key: 'supplierName',
editable: false,
},
{
title: '可用数量',
dataIndex: 'usedStock',
search: false,
key: 'usedStock',
editable: false,
},
{
title: (
<div>
更换数量 <span style={{ color: 'red' }}>* </span>
</div>
),
dataIndex: 'operateNum',
search: false,
key: 'operateNum',
valueType: 'digit',
fieldProps: {
precision: 3,
},
},
]}
dataSource={allDatasource[record.id]}
extraparams={allDatasource}
rowSelection={{
getCheckboxProps: (record) => ({
disabled: record.isAsh == '1',
}),
columnWidth: 44,
preserveSelectedRowKeys: true,
selectedRowKeys: curvalue?.lineStockUseList
? curvalue.lineStockUseList?.map?.((it) => it?.lineStockId)
: [],
onChange: async (selectedKeys, selectedRows) => {
// debugger;
const curval = curvalue?.lineStockUseList ?? [];
const rowkeylist = curval?.map?.((it) => it?.lineStockId);
const newValue = selectedRows?.map((its) => {
if (rowkeylist?.includes(its?.id)) {
return curval?.filter((it) => it?.lineStockId == its?.id)[0];
} else {
return {
lineStockId: its.id,
operateNum: its.operateNum,
};
}
});
let nvalue = value ? [...value] : [];
if (value && value?.some((it) => it.lifePieceAccountId == record?.id)) {
nvalue = value?.map((it, i) => {
if (it.lifePieceAccountId == record.id) {
it.lineStockUseList = newValue;
}
return it;
});
} else {
nvalue.push({
lifePieceAccountId: record?.id,
lineStockUseList: newValue,
});
}
// console.log('nvalue', nvalue);
nvalue = nvalue.filter((it) => it.lineStockUseList.length !== 0);
await onChange(nvalue);
await setnvalue(nvalue);
},
}}
editable={{
onValuesChange: async (rower, recordList) => {
const curval = curvalue?.lineStockUseList ?? [];
const newValue = curval?.map((its) => {
if (its?.lineStockId == rower?.id) {
return {
lineStockId: rower.id,
operateNum: rower.operateNum,
};
} else {
return its;
}
});
let nvalue = value ? [...value] : [];
if (value && value?.some((it) => it.lifePieceAccountId == record?.id)) {
nvalue = value?.map((it, i) => {
if (it.lifePieceAccountId == record.id) {
it.lineStockUseList = newValue;
}
return it;
});
} else {
nvalue.push({
lifePieceAccountId: record.id,
lineStockUseList: newValue,
});
}
// console.log('nvalue', nvalue);
await onChange(nvalue);
await setnvalue(nvalue);
},
}}
/>
</>
);
},
}}
/>
</div>
);
}
export default Expandables;
This diff is collapsed.
import React, { createElement, memo, useRef, useState } from "react";
import React, { createElement, memo, useRef, useState } from 'react';
import {
ProForm,
ProFormDependency,
......@@ -7,10 +7,14 @@ import {
ProFormGroup,
ProFormList,
ProCard,
} from "@ant-design/pro-components";
import { doFetch } from "@/utils/doFetch";
import styles from "./index.less";
import FormItems from "./FormItems";
} from '@ant-design/pro-components';
import moment, { defaultFormat } from 'moment';
import { doFetch } from '@/utils/doFetch';
import styles from './index.less';
import FormItems from './FormItems';
import { Input, Col } from 'antd';
import { useDebounceFn } from 'ahooks';
import ColumnsTrans from './ColumnsTrans';
function upperCase(str) {
const newStr = str.slice(0, 1).toUpperCase() + str.slice(1);
......@@ -23,32 +27,36 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
{fields
.filter((it) => it.hideInForm !== true)
.map((item, index) => {
let key = item?.valueType ? upperCase(item?.valueType) : "Input";
let key = item?.valueType ? upperCase(item?.valueType) : 'Input';
let { hideInForm } = item;
item.formItemProps = item.formItemProps ?? { rules: [] };
if (item.valueType == "split") {
if (item.valueType == 'split') {
return (
<div
className={styles.title}
style={{ borderWidth: index == 0 ? 0 : 1 }}
>
<div className={styles.title} style={{ borderWidth: index == 0 ? 0 : 1 }}>
{item.title}
</div>
);
}
if (item?.valueType == 'nosubmit') {
return (
<Col {...(item.colProps ?? { span: 12 })} style={{ marginBottom: 24 }}>
<label style={{ marginBottom: 8, display: 'block' }}>{item?.title}</label>
<Input disabled value={item?.initialValue} />
</Col>
);
}
if (hideInForm && Object.keys(hideInForm)) {
return (
<ProFormDependency name={Object.keys(hideInForm)}>
{(params) => {
let ifs = true;
let res = Object.keys(hideInForm).map((its) => {
let val =
JSON.stringify(params[its]) === "[]" ? "[]" : params[its];
if (Array.isArray(hideInForm[its])) {
return !hideInForm[its].includes(val);
return !hideInForm[its].includes(params[its]);
} else {
let vals = hideInForm[its].reverse; //取反 即不存在当前数组中的
return vals.indexOf(val) != -1;
return vals.indexOf(params[its]) != -1;
}
});
ifs = res.includes(false);
......@@ -86,32 +94,38 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
);
});
function InitForm({
formRef,
onFinish = (vals) => {
// console.log(vals);
},
formKey,
params = {},
detailpath = "",
defaultFormValue = {},
submitter,
fields,
colProps = { xs: 24, sm: 24, md: 12, lg: 12, xl: 12, xxl: 12 },
onValuesChange = (changedValues, allValues) => {
// console.log(changedValues, allValues);
},
ptree = false,
children,
}) {
function InitForm(props) {
let {
formRef,
onFinish = (vals) => {
//console.log(vals);
},
formKey,
params = {},
detailpath = '',
defaultFormValue = {},
detailFormat,
submitter,
fields,
extendField = '',
colProps = { xs: 24, sm: 24, md: 12, lg: 12, xl: 12, xxl: 12 },
onValuesChange = (changedValues, allValues) => {
//console.log(changedValues, allValues);
},
val,
style = {},
} = props;
const { run } = useDebounceFn(onFinish, { wait: 400 });
let proformRef = useRef();
proformRef = formRef ?? proformRef;
return (
return fields?.length == 0 ? (
<ColumnsTrans />
) : (
<ProForm
style={{ overflow: "hidden" }}
style={{ overflow: 'hidden', ...style }}
formRef={proformRef}
onFinish={onFinish}
onFinish={run}
formKey={formKey ?? parseInt(Math.random() * 1000000)}
params={params}
submitter={submitter ?? true}
......@@ -120,13 +134,69 @@ function InitForm({
gutter: 12,
}}
request={async (params) => {
if (detailpath) {
if (detailpath && val != 'add') {
let res = await doFetch({ url: detailpath, params });
if (extendField) {
let obj = {};
res?.data?.data[extendField]?.forEach?.((it) => {
obj[it?.fieldId] = it?.fieldRealValue;
});
// console.log({
// ...obj,
// ...defaultFormValue,
// ...(res?.data?.data ?? {}),
// });
return {
...obj,
...defaultFormValue,
...(res?.data?.data ?? {}),
...relationSupplierList,
};
}
//反填参数 格式化
const relationSupplierList = res?.data?.data?.relationSupplierList
? {
relationSupplierList: res?.data?.data?.relationSupplierList?.map?.((it, i) => {
return {
...it,
id: it?.supplierId,
};
}),
}
: {};
const supplierList = res?.data?.data?.supplierList
? {
supplierList: res?.data?.data?.supplierList?.map?.((it, i) => {
return {
...it,
id: it?.supplierId,
};
}),
}
: {};
let result = res?.data?.data;
if (result?.nrList) {
result.nrList = result?.nrList?.map((it) => {
it.sort = it.sort - 1;
return it;
});
}
return {
...(res?.data?.data ?? {}),
...defaultFormValue,
...(result ?? {}),
...relationSupplierList,
...supplierList,
};
} else {
// console.log({
// ...defaultFormValue,
// });
return {
...defaultFormValue,
};
......@@ -138,11 +208,10 @@ function InitForm({
}}
>
<FormRender
fields={fields?.filter((it) => it?.valueType != "option")}
fields={fields?.filter((it) => it.valueType != 'option')}
colProps={colProps}
proformRef={proformRef}
/>
{ptree && children}
</ProForm>
);
}
......
@import '~antd/es/style/variable.less';
.title {
position: relative;
width: 100%;
margin-bottom: 8px;
padding-left: 16px;
color: #000000;
font-weight: bolder;
font-size: 16px;
&::before {
......@@ -11,7 +13,7 @@
left: 7px;
width: 3px;
height: 16px;
background-color: #3d8ad7;
background-color: @primary-color;
border-radius: 4px;
content: '';
}
......
export default [
{
title: "物料(名称+编码)",
key: "wlid",
dataIndex: "wlid",
},
{
title: "规格型号",
key: "specificationModel",
dataIndex: "specificationModel",
},
{
title: "牌号",
key: "shopSign",
dataIndex: "shopSign",
},
{
title: "铁损",
key: "ironLoss",
dataIndex: "ironLoss",
},
{
title: "片厚",
key: "sheetThickness",
dataIndex: "sheetThickness",
},
{
title: "其他信息",
key: "split",
dataIndex: "split",
valueType:'split'
},
{
title: "供应商",
key: "supplierId",
dataIndex: "supplierId",
},
];
import { doFetch } from "@/utils/doFetch";
export function getColumns(setDrawer, formRef) {
return [
{
title: "物料(名称+编码)",
key: "materieId",
dataIndex: "materieId",
valueType: "select",
formItemProps: { rules: [{ required: true, message: "此项为必填项" }] },
options: {
path: "/ngic-workmanship/pmMaterie/query/selectbox",
},
fieldProps: {
onChange: (value, options) => {
if (value) {
doFetch({
url: "/ngic-workmanship/pmMaterie/queryById",
params: { id: value },
}).then((res) => {
console.log(res);
const data = res?.data?.data;
formRef.current.setFieldValue(
"specificationModel",
data?.specificationModel ?? ""
);
formRef.current.setFieldValue("shopSign", data?.shopSign ?? "");
formRef.current.setFieldValue("ironLoss", data?.ironLoss ?? "");
formRef.current.setFieldValue(
"sheetThickness",
data?.sheetThickness ?? ""
);
});
} else {
formRef?.current?.resetFields();
}
},
},
},
{
title: "规格型号",
key: "specificationModel",
dataIndex: "specificationModel",
fieldProps: {
disabled: true,
},
},
{
title: "牌号",
key: "shopSign",
dataIndex: "shopSign",
fieldProps: {
disabled: true,
},
},
{
title: "铁损",
key: "ironLoss",
dataIndex: "ironLoss",
fieldProps: {
disabled: true,
},
},
{
title: "片厚",
key: "sheetThickness",
dataIndex: "sheetThickness",
fieldProps: {
disabled: true,
},
},
{
title: "手动录入",
key: "split",
dataIndex: "split",
valueType: "split",
},
{
title: "供应商",
key: "supplierId",
dataIndex: "supplierId",
valueType: "select",
options: {
path: "/ngic-auth/sysSupplier/query/selection",
params:{}
},
},
{
title: "单边厚度",
key: "unilateralThickness",
dataIndex: "unilateralThickness",
valueType:'digit'
},
{
title: "备注",
key: "remark",
dataIndex: "remark",
valueType: "textarea",
},
{
title: "列表",
valueType: "formList",
dataIndex: "list",
initialValue: [
{
state: "all",
title: "标题",
},
],
colProps: {
xs: 24,
sm: 24,
},
columns: [
{
title: "重量",
dataIndex: "weight",
key: "weight",
valueType: "digit",
colProps: {
sm: 6,
},
fieldProps: {
precision: 3,
max: 999999,
},
formItemProps: {
rules: [
{
required: true,
message: "此项为必填项",
},
],
},
},
{
title: "宽度",
dataIndex: "width",
key: "width",
valueType: "digit",
fieldProps: {
mode: "multiple",
precision: 3,
max: 999999,
},
colProps: {
sm: 6,
},
},
{
title: "米数",
dataIndex: "length",
key: "length",
valueType: "digit",
fieldProps: {
precision: 3,
max: 999999,
},
colProps: {
sm: 6,
},
},
{
title: "批次号",
dataIndex: "materieControlNo",
key: "materieControlNo",
valueType: "input",
formItemProps: {
rules: [
{
required: false,
message: "此项为必填项",
},
],
},
colProps: {
sm: 6,
},
},
],
search: false,
},
];
}
import React, { useEffect, useRef, useReducer, useState } from "react";
import React, { useEffect, useRef, useReducer, useState, useMemo } from "react";
import {
Button,
Tooltip,
......@@ -11,7 +11,7 @@ import {
} from "antd";
import AutoTable from "@/components/AutoTable";
import { useRequest } from "umi";
import defaultFields from "./fields.js";
import { getColumns } from "./fields.js";
import { doFetch } from "@/utils/doFetch";
import InitForm from "@/components/NewInitForm";
import { start } from "@/utils/printHandle.js";
......@@ -112,15 +112,57 @@ const Station = (props) => {
});
const [selectIds, setselectIds] = useState([]);
let saveData = (values, fn) => {
let newfields = JSON.parse(JSON.stringify(values));
const formFields = useMemo(() => {
return getColumns(setDrawer, formRef);
});
const saveAndPrint = () => {
confirm({
title: `当前已完成信息填写,是否保存并立即打印?`,
icon: <ExclamationCircleFilled />,
width: 500,
okText: '确定',
cancelText:"取消",
onOk() {
formRef?.current?.validateFields().then((formData) => {
start("/ngic-workmanship/wmsMaterieLabel/save", formData);
setDrawer((v) => ({
...v,
visible: false,
}));
message.success("保存成功!", 2);
});
},
onCancel() {
console.log("Cancel");
},
});
};
const saveData = (type) => {
if (type === 1) {
formRef?.current?.validateFields().then((formData) => {
doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/save",
params: formData,
}).then((res) => {
if (res?.code == "0000") {
setDrawer((v) => ({
...v,
visible: false,
}));
}
message.success("保存成功!", 2);
});
});
} else {
saveAndPrint();
}
//新增&修改
let difrid = iftype.val == "edit" ? { id: curitem.id } : {};
run({
url: "/ngic-auth/sysStation/save",
params: { ...newfields, ...difrid },
});
// let difrid = iftype.val == "edit" ? { id: curitem.id } : {};
// run({
// url: "/ngic-auth/sysStation/save",
// params: { ...newfields, ...difrid },
// });
};
const showConfirm = () => {
......@@ -128,6 +170,8 @@ const Station = (props) => {
title: `当前已选择 ${selectIds?.length} 条标签数据,是否全部打印?`,
icon: <ExclamationCircleFilled />,
width: 500,
okText: '确定',
cancelText:"取消",
onOk() {
start("/ngic-workmanship/wmsMaterieLabel/queryByIds", {
ids: selectIds,
......@@ -175,7 +219,6 @@ const Station = (props) => {
},
preserveSelectedRowKeys: true,
};
console.log(defaultFields);
return (
<div>
<AutoTable
......@@ -202,7 +245,7 @@ const Station = (props) => {
>
<InitForm
formRef={formRef}
fields={defaultFields}
fields={formFields}
onChange={(changedValues, allValues) => {}}
actions={() => {
return null;
......@@ -213,14 +256,14 @@ const Station = (props) => {
type="primary"
// loading={loading || !vs}
style={{ marginRight: 16 }}
onClick={() => saveData()}
onClick={() => saveData(1)}
>
保存
</Button>
<Button
type="primary"
// loading={loading || !vs}
onClick={() => saveData()}
onClick={() => saveData(2)}
>
保存并打印
</Button>
......
......@@ -44,20 +44,26 @@ export function str(data) {
// </table>`;
return ` <div style="display:flex; width:100% ;height:100%; flex-direction: column;justify-self: space-between;">
<div style="display:flex; flex-direction: row;flex:4;">
<div style="display:flex; flex-direction: row;flex:2;">
<div style="display:flex;flex-direction: column;flex:2">
<div style="flex:1">卷料名称:${data?.materieName ?? "--"}</div>
<div style="flex:1">卷料编码:${data?.materieCode ?? "--"}</div>
<div style="flex:1">牌号:${data?.shopSign ?? "--"}</div>
<div style="flex:1">单边卷料厚度:${data?.unilateralThickness ?? "--"}mm</div>
</div>
<div style="flex:1">
<img src=${data?.qrCodeUrl} style="width:90px"/>
</div>
</div>
<div style="display:flex; flex-direction: row;flex:2;">
<div style="flex:3;display:flex;flex-direction: column;">
<div style="flex:1">批次:${data?.materieControlNo ?? "--"}</div>
<div style="flex:1">单边卷料厚度:${
data?.unilateralThickness ?? "--"
}mm</div>
</div>
<div style="flex:1">
<img src=${data?.qrCodeUrl} style="width:100%"/>
</div>
</div>
<div style="display:flex; flex-direction: row;flex:1;">
<div style="flex:2">铁损:${data?.ironLoss ?? "--"}w/kg</div>
<div style="flex:3">批次:${data?.materieControlNo ?? "--"}</div>
<div style="flex:3">牌号:${data?.shopSign ?? "--"}</div>
</div>
<div style="display:flex; flex-direction: row;flex:1;">
<div style="flex:2">宽度:${data?.width ?? "--"}mm</div>
......@@ -67,8 +73,6 @@ export function str(data) {
<div style="flex:2">重量:${data?.weight ?? "--"}KG</div>
<div style="flex:3">米数:${data?.length ?? "--"}M</div>
</div>
<div style="display:flex; flex-direction: row;flex:1;">
<div style="flex:1">条码:${data?.materieControlNo ?? "--"}</div>
</div>
</div>`;
}
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