fields.js 25.6 KB
Newer Older
wuhao's avatar
wuhao committed
1
import { factorySelect, shopSelectByFactory } from "@/services/system";
wuhao's avatar
wuhao committed
2
import { doFetch } from "@/utils/doFetch";
wuhao's avatar
wuhao committed
3 4 5 6
import { Button, Table } from "antd";
import { EditableProTable } from "@ant-design/pro-table";
import { useEffect, useState } from 'react'
import { useModel } from 'umi'
wuhao's avatar
wuhao committed
7

左玲玲's avatar
左玲玲 committed
8
const EditUpload = ({ record, fid, storeId }) => {
wuhao's avatar
wuhao committed
9 10 11
  const [value, setvalue] = useState({
    [record.id]: record.uploadList
  });
wuhao's avatar
wuhao committed
12 13 14 15 16 17 18 19
  const { initialState, setInitialState } = useModel("@@initialState");
  useEffect(() => {
    if (!value) {
      return
    }
    setInitialState(s => ({
      ...s,
      submit: {
wuhao's avatar
wuhao committed
20
        id: fid,
wuhao's avatar
wuhao committed
21 22 23 24 25 26
        materialList: Object.keys(value)?.map?.(it => {
          let id = it;
          return {
            id,
            uploadList: value[id]?.map(its => {
              return {
wuhao's avatar
wuhao committed
27
                storePositionId: its?.storePositionId,
wuhao's avatar
wuhao committed
28 29 30 31 32 33 34 35 36 37 38
                instroeNum: its?.instroeNum,
                remark: its?.remark
              }
            })
          }
        })
      }
    }))
  }, [value])

  return <EditableProTable
左玲玲's avatar
左玲玲 committed
39
    rowKey={"id"}
wuhao's avatar
wuhao committed
40 41 42 43 44
    maxLength={1000}
    style={{ marginLeft: 48 }}
    columns={[
      {
        title: "库位名称",
wuhao's avatar
wuhao committed
45
        dataIndex: "storePositionName",
wuhao's avatar
wuhao committed
46
        key: "storePositionId",
wuhao's avatar
wuhao committed
47 48 49
        search: false,
        valueType: "select",
        request: async () => {
wuhao's avatar
wuhao committed
50
          let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: storeId } });
wuhao's avatar
wuhao committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
          return res?.data?.dataList
        },
        editable: (text, record, index) => {
          return !record.materieOutstoreDetailId
        }
      },
      {
        title: "上架数量",
        dataIndex: "instroeNum",
        key: "instroeNum",
        search: false,
        editable: (text, record, index) => {
          return !record.materieOutstoreDetailId
        }
      },
      {
        title: "备注",
        dataIndex: "remark",
        key: "remark",
        search: false,
        editable: (text, record, index) => {
          return !record.materieOutstoreDetailId
        }
      },
      {
        title: "操作",
        valueType: "option",
        width: 70,
        render: (text, record, _, action) => [
          <a key="delete" onClick={() => { }}>
            删除
          </a>,
        ],
      }
    ]}
wuhao's avatar
wuhao committed
86
    value={value[record.id]}
wuhao's avatar
wuhao committed
87 88 89 90 91 92 93 94 95 96 97 98 99 100
    recordCreatorProps={{
      newRecordType: "dataSource",
      record: () => ({
        id: Date.now(),
      }),
    }}
    editable={{
      type: "multiple",
      actionRender: (row, config, defaultDoms) => {
        return [defaultDoms.delete];
      },
      onValuesChange: async (records, recordList) => {
        setvalue(s => ({
          ...s,
wuhao's avatar
wuhao committed
101
          [record.id]: recordList
wuhao's avatar
wuhao committed
102 103 104 105 106 107
        }));
      },
    }}
    pagination={false}
  />
}
wuhao's avatar
wuhao committed
108 109 110 111 112 113 114 115 116

const one = {
  "materieInstoreNo": {
    "value": null,
    "type": "input",
    "title": "入库单号",
    "name": [
      "materieInstoreNo"
    ],
左玲玲's avatar
左玲玲 committed
117
    "required": false,
左玲玲's avatar
左玲玲 committed
118
    placeholder: "不填写系统自动生成"
wuhao's avatar
wuhao committed
119
  },
wuhao's avatar
wuhao committed
120 121 122 123 124 125 126 127 128 129 130 131
  "storeId": {
    "value": null,
    "type": "select",
    "title": "仓库",
    "name": [
      "storeId"
    ],
    "required": true,
    "options": {
      database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
      params: {}
    },
wuhao's avatar
wuhao committed
132
  },
wuhao's avatar
wuhao committed
133 134 135 136 137 138 139 140 141
  "supplierId": {
    "value": null,
    "type": "select",
    "title": "供应商",
    "name": [
      "supplierId"
    ],
    "required": true,
    "options": {
wuhao's avatar
wuhao committed
142
      database: () => doFetch({ url: "/ngic-auth/sysSupplier/query/selection", params: {} }),
wuhao's avatar
wuhao committed
143
      params: {}
wuhao's avatar
wuhao committed
144 145
    },
  },
wuhao's avatar
wuhao committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
  "businessNo": {
    "value": null,
    "type": "input",
    "title": "相关单号",
    "name": [
      "businessNo"
    ],
    "required": false
  },
  "remark": {
    "value": null,
    "type": "textarea",
    "title": "备注",
    "name": [
      "remark"
    ],
    "required": false,
    "col": {
      "span": 24
    }
  },
  "materialList": {
    value: [],
    title: "物料信息",
    type: "table",
    col: { span: 24 },
    name: ["materialList"],
wuhao's avatar
wuhao committed
173
    required: true,
wuhao's avatar
wuhao committed
174 175 176 177 178 179 180 181 182 183
    linkconfig: {
      urlchangeval: {//根据url接口 改变某个value
        database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
        params: { "materieId": "linked" },
        effectresult: {
          "productionUnit": "productionUnit",//key 为列表更新值  value为response 返回值
          "productionUnitName": "productionUnitName"
        }
      }
    },
wuhao's avatar
wuhao committed
184 185
    columns: [
      {
wuhao's avatar
wuhao committed
186
        "title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
wuhao's avatar
wuhao committed
187 188
        "dataIndex": "materieId",
        "key": "materieId",
wuhao's avatar
wuhao committed
189 190 191 192
        "valueType": "select",
        "width": 300,
        "request": async () => {
          let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
wuhao's avatar
wuhao committed
193 194
          return res?.data?.dataList
        },
wuhao's avatar
wuhao committed
195 196 197 198 199 200 201 202 203
        "fieldProps": {
          allowClear: false,
          showSearch: true
        },
        "formItemProps": () => {
          return {
            rules: [{ required: true, message: '此项为必填项' }],
          };
        },
wuhao's avatar
wuhao committed
204 205
      },
      {
wuhao's avatar
wuhao committed
206 207 208
        "title": "批次号/SN号",
        "dataIndex": "materieControlNo",
        "key": "materieControlNo"
wuhao's avatar
wuhao committed
209 210
      },
      {
wuhao's avatar
wuhao committed
211
        "title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
wuhao's avatar
wuhao committed
212
        "dataIndex": "instroeNum",
wuhao's avatar
wuhao committed
213 214 215 216 217 218
        "key": "instroeNum",
        "formItemProps": () => {
          return {
            rules: [{ required: true, message: '此项为必填项' }],
          };
        },
wuhao's avatar
wuhao committed
219 220 221
      },
      {
        "title": "单位",
wuhao's avatar
wuhao committed
222 223 224 225
        "dataIndex": "productionUnitName",
        "key": "productionUnitName",
        "readonly": 'productionUnitName',
        "width": 60
wuhao's avatar
wuhao committed
226 227 228 229 230 231 232 233 234 235
      },
      {
        title: "操作",
        valueType: "option",
        width: 70,
        render: (text, record, _, action) => [
          <a key="delete" onClick={() => { }}>
            删除
          </a>,
        ],
wuhao's avatar
wuhao committed
236 237
      },
    ],
wuhao's avatar
wuhao committed
238 239
    rowKey: "id",
  }
wuhao's avatar
wuhao committed
240 241 242 243 244 245 246 247 248
},
  two = {
    "materieInstoreNo": {
      "value": null,
      "type": "input",
      "title": "入库单号",
      "name": [
        "materieInstoreNo"
      ],
左玲玲's avatar
左玲玲 committed
249
      "required": false,
左玲玲's avatar
左玲玲 committed
250
      placeholder: "不填写系统自动生成"
wuhao's avatar
wuhao committed
251
    },
wuhao's avatar
wuhao committed
252 253 254 255 256 257 258 259 260 261 262 263
    "storeId": {
      "value": null,
      "type": "select",
      "title": "仓库",
      "name": [
        "storeId"
      ],
      "required": true,
      "options": {
        database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
        params: {}
      },
wuhao's avatar
wuhao committed
264
    },
wuhao's avatar
wuhao committed
265
    "supplierId": {
wuhao's avatar
wuhao committed
266
      "value": "2022070124566476657",
wuhao's avatar
wuhao committed
267 268 269 270 271 272
      "type": "select",
      "title": "供应商",
      "name": [
        "supplierId"
      ],
      "required": true,
wuhao's avatar
wuhao committed
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
      "disabled": true,
      "options": [
        {
          value: "2022070124566476657",
          label: "南高(默认)"
        }
      ],
    },
    "businessNo": {
      "value": null,
      "type": "input",
      "title": "相关单号",
      "name": [
        "businessNo"
      ],
      "required": false
    },
    "remark": {
      "value": null,
      "type": "textarea",
      "title": "备注",
      "name": [
        "remark"
      ],
      "required": false,
      "col": {
        "span": 24
      }
    },
    "materialList": {
      value: [],
      title: "物料信息",
      type: "table",
      col: { span: 24 },
      name: ["materialList"],
      required: true,
      linkconfig: {
        urlchangeval: {//根据url接口 改变某个value
          database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
          params: { "materieId": "linked" },
          effectresult: {
            "productionUnit": "productionUnit",//key 为列表更新值  value为response 返回值
            "productionUnitName": "productionUnitName"
          }
        }
      },
      columns: [
        {
          "title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "materieId",
          "key": "materieId",
          "valueType": "select",
          "width": 300,
          "request": async () => {
            let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
            return res?.data?.dataList
          },
          "fieldProps": {
            allowClear: false,
            showSearch: true
          },
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
        },
        {
          "title": "批次号/SN号",
          "dataIndex": "materieControlNo",
          "key": "materieControlNo"
        },
        {
          "title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "instroeNum",
          "key": "instroeNum",
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
        },
        {
          "title": "单位",
          "dataIndex": "productionUnitName",
          "key": "productionUnitName",
          "readonly": 'productionUnitName',
          "width": 60
        },
        {
          title: "操作",
          valueType: "option",
          width: 70,
          render: (text, record, _, action) => [
            <a key="delete" onClick={() => { }}>
              删除
            </a>,
          ],
        },
      ],
      rowKey: "id",
    }
  },
  three = {
    "materieInstoreNo": {
      "value": null,
      "type": "input",
      "title": "入库单号",
      "name": [
        "materieInstoreNo"
      ],
左玲玲's avatar
左玲玲 committed
384
      "required": false,
左玲玲's avatar
左玲玲 committed
385
      placeholder: "不填写系统自动生成"
wuhao's avatar
wuhao committed
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522
    },
    "storeId": {
      "value": null,
      "type": "select",
      "title": "仓库",
      "name": [
        "storeId"
      ],
      "required": true,
      "options": {
        database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
        params: {}
      },
    },
    "businessNo": {
      "value": null,
      "type": "input",
      "title": "相关单号",
      "name": [
        "businessNo"
      ],
      "required": false
    },
    "remark": {
      "value": null,
      "type": "textarea",
      "title": "备注",
      "name": [
        "remark"
      ],
      "required": false,
      "col": {
        "span": 24
      }
    },
    "materialList": {
      value: [],
      title: "物料信息",
      type: "table",
      col: { span: 24 },
      name: ["materialList"],
      required: true,
      linkconfig: {
        urlchangeval: {//根据url接口 改变某个value
          database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
          params: { "materieId": "linked" },
          effectresult: {
            "productionUnit": "productionUnit",//key 为列表更新值  value为response 返回值
            "productionUnitName": "productionUnitName"
          }
        }
      },
      columns: [
        {
          "title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "materieId",
          "key": "materieId",
          "valueType": "select",
          "width": 300,
          "request": async () => {
            let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
            return res?.data?.dataList
          },
          "fieldProps": {
            allowClear: false,
            showSearch: true
          },
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
        },
        {
          "title": <span>供应商编号-名称 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "supplierId",
          "key": "supplierId",
          "valueType": "select",
          "width": 300,
          "request": async () => {
            let res = await doFetch({ url: "/ngic-auth/sysSupplier/query/selection/withNo", params: {} })
            return res?.data?.dataList
          },
          "fieldProps": {
            allowClear: false,
            showSearch: true
          },
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
        },
        {
          "title": "批次号/SN号",
          "dataIndex": "materieControlNo",
          "key": "materieControlNo"
        },
        {
          "title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "instroeNum",
          "key": "instroeNum",
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
        },
        {
          "title": "单位",
          "dataIndex": "productionUnitName",
          "key": "productionUnitName",
          "readonly": 'productionUnitName',
          "width": 60
        },
        {
          title: "操作",
          valueType: "option",
          width: 70,
          render: (text, record, _, action) => [
            <a key="delete" onClick={() => { }}>
              删除
            </a>,
          ],
        },
      ],
      rowKey: "id",
    }
  },
  four = {
    "materieInstoreNo": {
      "value": null,
      "type": "input",
      "title": "入库单号",
      "name": [
        "materieInstoreNo"
      ],
左玲玲's avatar
左玲玲 committed
523
      "required": false,
左玲玲's avatar
左玲玲 committed
524
      placeholder: "不填写系统自动生成"
wuhao's avatar
wuhao committed
525 526 527 528 529 530 531 532 533
    },
    "storeId": {
      "value": null,
      "type": "select",
      "title": "仓库",
      "name": [
        "storeId"
      ],
      "required": true,
wuhao's avatar
wuhao committed
534
      "options": {
wuhao's avatar
wuhao committed
535
        database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
wuhao's avatar
wuhao committed
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
        params: {}
      },
    },
    "businessNo": {
      "value": null,
      "type": "input",
      "title": "相关单号",
      "name": [
        "businessNo"
      ],
      "required": false
    },
    "remark": {
      "value": null,
      "type": "textarea",
      "title": "备注",
      "name": [
        "remark"
      ],
      "required": false,
      "col": {
        "span": 24
      }
    },
    "materialList": {
      value: [],
      title: "物料信息",
      type: "table",
      col: { span: 24 },
      name: ["materialList"],
      required: true,
wuhao's avatar
wuhao committed
567 568 569 570 571 572 573 574 575 576
      linkconfig: {
        urlchangeval: {//根据url接口 改变某个value
          database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
          params: { "materieId": "linked" },
          effectresult: {
            "productionUnit": "productionUnit",//key 为列表更新值  value为response 返回值
            "productionUnitName": "productionUnitName"
          }
        }
      },
wuhao's avatar
wuhao committed
577 578
      columns: [
        {
wuhao's avatar
wuhao committed
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
          "title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "materieId",
          "key": "materieId",
          "valueType": "select",
          "width": 300,
          "request": async () => {
            let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
            return res?.data?.dataList
          },
          "fieldProps": {
            allowClear: false,
            showSearch: true
          },
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
wuhao's avatar
wuhao committed
597 598
        },
        {
wuhao's avatar
wuhao committed
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616
          "title": <span>供应商编号-名称 <b style={{ color: "red" }}>*</b></span>,
          "dataIndex": "supplierId",
          "key": "supplierId",
          "valueType": "select",
          "width": 300,
          "request": async () => {
            let res = await doFetch({ url: "/ngic-auth/sysSupplier/query/selection/withNo", params: {} })
            return res?.data?.dataList
          },
          "fieldProps": {
            allowClear: false,
            showSearch: true
          },
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
wuhao's avatar
wuhao committed
617 618 619 620 621 622 623
        },
        {
          "title": "批次号/SN号",
          "dataIndex": "materieControlNo",
          "key": "materieControlNo"
        },
        {
wuhao's avatar
wuhao committed
624
          "title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
wuhao's avatar
wuhao committed
625
          "dataIndex": "instroeNum",
wuhao's avatar
wuhao committed
626 627 628 629 630 631
          "key": "instroeNum",
          "formItemProps": () => {
            return {
              rules: [{ required: true, message: '此项为必填项' }],
            };
          },
wuhao's avatar
wuhao committed
632 633 634
        },
        {
          "title": "单位",
wuhao's avatar
wuhao committed
635 636 637 638
          "dataIndex": "productionUnitName",
          "key": "productionUnitName",
          "readonly": 'productionUnitName',
          "width": 60
wuhao's avatar
wuhao committed
639 640 641 642 643 644 645 646 647 648 649 650 651
        },
        {
          title: "操作",
          valueType: "option",
          width: 70,
          render: (text, record, _, action) => [
            <a key="delete" onClick={() => { }}>
              删除
            </a>,
          ],
        },
      ],
      rowKey: "id",
wuhao's avatar
wuhao committed
652 653
    }
  },
wuhao's avatar
wuhao committed
654 655 656
  detail = {
    totalCard: [
      //物料详情
wuhao's avatar
wuhao committed
657
      {
wuhao's avatar
wuhao committed
658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688
        cardTitle: "基本信息",
        itemData: [
          {
            title: "入库单号",
            key: "materieInstoreNo",
          },
          {
            title: "入库类型",
            key: "instoreTypeName",
          },
          {
            title: "入库仓库",
            key: "storeName",
          },
          {
            title: "相关单号",
            key: "businessNo",
          },
          {
            title: "备注",
            key: "remark",
          },
          {
            title: "创建人",
            key: "createUserName",
          },
          {
            title: "创建时间",
            key: "createTime",
          },
        ],
wuhao's avatar
wuhao committed
689 690
      },
      {
wuhao's avatar
wuhao committed
691 692 693 694 695 696 697 698
        cardTitle: "物料信息列表",
        itemData: [
          {
            key: "materialList",
            type: "table",
            col: { span: 24 },
            columns: [
              {
wuhao's avatar
wuhao committed
699
                title: "物料编码 - 名称",
wuhao's avatar
wuhao committed
700 701 702
                dataIndex: "materieName",
                key: "materieName",
                search: false,
wuhao's avatar
wuhao committed
703 704 705
                render: (dom, row) => {
                  return (row.materieCode ?? '') + " - " + (row.materieName ?? '')
                }
wuhao's avatar
wuhao committed
706 707
              },
              {
wuhao's avatar
wuhao committed
708 709 710 711 712 713 714 715 716 717 718 719
                title: "供应商编号 - 名称",
                dataIndex: "supplierNo",
                key: "supplierNo",
                search: false,
                render: (dom, row) => {
                  return (row.supplierNo ?? '') + " - " + (row.supplierName ?? '')
                }
              },
              {
                title: "批次号/SN号",
                dataIndex: "materieControlNo",
                key: "materieControlNo",
wuhao's avatar
wuhao committed
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
                search: false,
              },
              {
                title: "入库数量",
                dataIndex: "instroeNum",
                key: "instroeNum",
                search: false,
              },
              {
                title: "单位",
                dataIndex: "productionUnitName",
                key: "productionUnitName",
                search: false,
              },
            ],
            expandable: {
wuhao's avatar
wuhao committed
736
              defaultExpandAllRows: true,
wuhao's avatar
wuhao committed
737
              expandedRowRender: record => <Table
wuhao's avatar
wuhao committed
738
                style={{ marginLeft: 48 }}
wuhao's avatar
wuhao committed
739 740 741
                columns={[
                  {
                    title: "库位名称",
wuhao's avatar
wuhao committed
742 743
                    dataIndex: "storePositionName",
                    key: "storePositionName",
wuhao's avatar
wuhao committed
744 745 746 747 748 749 750 751 752
                    search: false,
                  },
                  {
                    title: "上架数量",
                    dataIndex: "instroeNum",
                    key: "instroeNum",
                    search: false,
                  }
                ]}
wuhao's avatar
wuhao committed
753
                dataSource={record.uploadList}
wuhao's avatar
wuhao committed
754 755
                pagination={false}
              />,
wuhao's avatar
wuhao committed
756
            },
左玲玲's avatar
左玲玲 committed
757 758
            pagination: "false",
            rowKey: "id"
wuhao's avatar
wuhao committed
759
          },
wuhao's avatar
wuhao committed
760 761
        ],
      },
wuhao's avatar
wuhao committed
762 763 764 765 766 767 768 769 770 771 772 773 774
      {
        cardTitle: "强制关闭信息",
        itemData: [
          {
            title: "操作人",
            key: "closeUserName",
          },
          {
            title: "操作时间",
            key: "closeTime",
          }
        ],
      },
wuhao's avatar
wuhao committed
775 776
      {
        cardTitle: "上架明细",
wuhao's avatar
wuhao committed
777
        noPrint: true,
wuhao's avatar
wuhao committed
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827
        itemData: [
          {
            key: "materialUploadList",
            type: "table",
            col: { span: 24 },
            columns: [
              {
                title: "物料编码 - 名称",
                dataIndex: "materieName",
                key: "materieName",
                search: false,
                render: (dom, row) => {
                  return (row.materieCode ?? '') + " - " + (row.materieName ?? '')
                }
              },
              {
                title: "供应商编号 - 名称",
                dataIndex: "supplierNo",
                key: "supplierNo",
                search: false,
                render: (dom, row) => {
                  return (row.supplierNo ?? '') + " - " + (row.supplierName ?? '')
                }
              },
              {
                title: "批次号/SN号",
                dataIndex: "materieControlNo",
                key: "materieControlNo",
                search: false,
              },
              {
                title: "入库数量",
                dataIndex: "instroeNum",
                key: "instroeNum",
                search: false,
              },
              {
                title: "单位",
                dataIndex: "productionUnitName",
                key: "productionUnitName",
                search: false,
              },
            ],
            expandable: {
              defaultExpandAllRows: true,
              expandedRowRender: record => <Table
                style={{ marginLeft: 48 }}
                columns={[
                  {
                    title: "库位名称",
wuhao's avatar
wuhao committed
828 829
                    dataIndex: "storePositionName",
                    key: "storePositionName",
wuhao's avatar
wuhao committed
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
                    search: false,
                  },
                  {
                    title: "上架数量",
                    dataIndex: "instroeNum",
                    key: "instroeNum",
                    search: false,
                  }
                  ,
                  {
                    title: "备注",
                    dataIndex: "remark",
                    key: "remark",
                    search: false,
                  }
                  ,
                  {
                    title: "操作人",
                    dataIndex: "uploadUserName",
                    key: "uploadUserName",
                    search: false,
                  }
                  ,
                  {
                    title: "操作时间",
                    dataIndex: "uploadTime",
                    key: "uploadTime",
                    search: false,
                  }
                ]}
wuhao's avatar
wuhao committed
860
                dataSource={record.uploadList}
wuhao's avatar
wuhao committed
861 862 863 864 865 866 867
                pagination={false}
              />,
            },
            pagination: "false"
          },
        ],
      },
wuhao's avatar
wuhao committed
868
    ]
左玲玲's avatar
左玲玲 committed
869
  }, doinsert = (fid, storeId) => ({
wuhao's avatar
wuhao committed
870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953
    totalCard: [
      //物料详情
      {
        cardTitle: "基本信息",
        itemData: [
          {
            title: "入库单号",
            key: "materieInstoreNo",
          },
          {
            title: "入库类型",
            key: "instoreTypeName",
          },
          {
            title: "入库仓库",
            key: "storeName",
          },
          {
            title: "相关单号",
            key: "businessNo",
          },
          {
            title: "备注",
            key: "remark",
          },
          {
            title: "创建人",
            key: "createUserName",
          },
          {
            title: "创建时间",
            key: "createTime",
          },
        ],
      },
      {
        cardTitle: "物料信息列表",
        extra: true,
        extrapath: "/ngic-workmanship/wmsMaterieInstore/upload",
        extrakey: "submit",//redux key
        itemData: [
          {
            key: "materialList",
            type: "table",
            col: { span: 24 },
            columns: [
              {
                title: "物料编码 - 名称",
                dataIndex: "materieName",
                key: "materieName",
                search: false,
                render: (dom, row) => {
                  return (row.materieCode ?? '') + " - " + (row.materieName ?? '')
                }
              },
              {
                title: "供应商编号 - 名称",
                dataIndex: "supplierNo",
                key: "supplierNo",
                search: false,
                render: (dom, row) => {
                  return (row.supplierNo ?? '') + " - " + (row.supplierName ?? '')
                }
              },
              {
                title: "批次号/SN号",
                dataIndex: "materieControlNo",
                key: "materieControlNo",
                search: false,
              },
              {
                title: "入库数量",
                dataIndex: "instroeNum",
                key: "instroeNum",
                search: false,
              },
              {
                title: "单位",
                dataIndex: "productionUnitName",
                key: "productionUnitName",
                search: false,
              },
            ],
            expandable: {
左玲玲's avatar
左玲玲 committed
954 955 956
              expandedRowRender: record => <EditUpload record={record} fid={fid} storeId={storeId} />,
            },
            rowKey: "id"
wuhao's avatar
wuhao committed
957 958 959 960
          },
        ],
      },
    ]
wuhao's avatar
wuhao committed
961
  });
wuhao's avatar
wuhao committed
962 963 964 965 966 967 968 969




export default {
  one,
  two,
  three,
wuhao's avatar
wuhao committed
970
  four,
wuhao's avatar
wuhao committed
971 972
  detail,
  doinsert
wuhao's avatar
wuhao committed
973
};