|
|
@@ -0,0 +1,460 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :needPage="false"
|
|
|
+ :datasource="tableList"
|
|
|
+ :columns="columns"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import { getTableList } from '@/api/bpm/components/purchasingManage/purchaseOrder';
|
|
|
+ import { purchaseOrderProgressStatusEnum, reviewStatus } from '@/enum/dict';
|
|
|
+ export default {
|
|
|
+ props: {
|
|
|
+ relationId: {
|
|
|
+ default: () => []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ relationId(val) {
|
|
|
+ // alert(1)
|
|
|
+ if (val.length) {
|
|
|
+ this.productionplanByIds();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableList:[],
|
|
|
+ // columns: [
|
|
|
+ // {
|
|
|
+ // columnKey: 'index',
|
|
|
+ // label: '序号',
|
|
|
+ // type: 'index',
|
|
|
+ // width: 55,
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // slot: 'batchNo',
|
|
|
+ // prop: 'batchNo',
|
|
|
+ // label: '批次号',
|
|
|
+ // align: 'center',
|
|
|
+ // minWidth: 140,
|
|
|
+ // sortable: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // slot: 'code',
|
|
|
+ // prop: 'code',
|
|
|
+ // action: 'code',
|
|
|
+ // label: '计划编号',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // minWidth: 160,
|
|
|
+ // sortable: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'salesCode',
|
|
|
+ // action: 'salesCode',
|
|
|
+ // label: '销售订单号',
|
|
|
+ // align: 'center',
|
|
|
+ // minWidth: 160
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'productCode',
|
|
|
+ // label: '编码',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // minWidth: 140
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'productName',
|
|
|
+ // label: '名称',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // minWidth: 140
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'brandNo',
|
|
|
+ // label: '牌号',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'specification',
|
|
|
+ // label: '规格',
|
|
|
+ // align: 'center',
|
|
|
+ // minWidth: 150,
|
|
|
+
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'model',
|
|
|
+ // label: '型号',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'produceRoutingName',
|
|
|
+ // label: '工艺路线',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 140,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'productNum',
|
|
|
+ // label: '计划数量',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // slot: 'productNum'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'productWeight',
|
|
|
+ // label: '计划重量',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // slot: 'productWeight'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'requiredFormingNum',
|
|
|
+ // label: '要求生产数量',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // slot: 'requiredFormingNum'
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'newSumOrderWeight',
|
|
|
+ // label: '要求生产重量',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // slot: 'newSumOrderWeight'
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'scheduleStatusName',
|
|
|
+ // label: '进度状态',
|
|
|
+ // align: 'center',
|
|
|
+ // minWidth: 100
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '已排产数量',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '未排产数量',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '已生产数量',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '未生产数量',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'factoryName',
|
|
|
+ // label: '所属工厂',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '合格品数',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '不合格品数',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: '',
|
|
|
+ // label: '合格率',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'reqMoldTime',
|
|
|
+ // label: '计划完成日期',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 110,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'startTime',
|
|
|
+ // label: '计划开始日期',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 110,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'endTime',
|
|
|
+ // label: '计划结束日期',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 110,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'version',
|
|
|
+ // label: '版本',
|
|
|
+ // align: 'center',
|
|
|
+
|
|
|
+ // minWidth: 80
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'createTime',
|
|
|
+ // label: '创建时间',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 110,
|
|
|
+ // showOverflowTooltip: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // columnKey: 'status',
|
|
|
+ // slot: 'status',
|
|
|
+ // label: '状态',
|
|
|
+ // align: 'center'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+
|
|
|
+ columns: [
|
|
|
+ // {
|
|
|
+ // width: 45,
|
|
|
+ // type: 'selection',
|
|
|
+ // columnKey: 'selection',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderNo',
|
|
|
+ label: '订单编码',
|
|
|
+ align: 'center',
|
|
|
+ sortable: true,
|
|
|
+ slot: 'orderNo',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sourceTypeName',
|
|
|
+ label: '订单类型',
|
|
|
+ align: 'center',
|
|
|
+ sortable: true,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'progress',
|
|
|
+ label: '订单进度',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return purchaseOrderProgressStatusEnum.find(
|
|
|
+ (val) => val.value == _row.progress
|
|
|
+ )?.label;
|
|
|
+ },
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'relationType',
|
|
|
+ label: '来源单据类型',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 150,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return _row.relationType == 1
|
|
|
+ ? '采购需求单'
|
|
|
+ : _row.relationType == 2
|
|
|
+ ? '采购计划单'
|
|
|
+ : _row.relationType == 3
|
|
|
+ ? '采购核价单'
|
|
|
+ : _row.relationType == 4
|
|
|
+ ? '采购合同'
|
|
|
+ : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'relationName',
|
|
|
+ label: '来源单据',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'relationName',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 250
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partaName',
|
|
|
+ label: '采购方名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partaLinkName',
|
|
|
+ label: '采购方联系人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'partaTel',
|
|
|
+ label: '采购方联系电话',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productNames',
|
|
|
+ label: '名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productCodes',
|
|
|
+ label: '编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'batchNos',
|
|
|
+ label: '批次号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productCount',
|
|
|
+ label: '数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'inboundCount',
|
|
|
+ label: '收货数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'partbName',
|
|
|
+ label: '供应商名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 250
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partbLinkName',
|
|
|
+ label: '供应商联系人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partbTel',
|
|
|
+ label: '供应商联系电话',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'isInspection',
|
|
|
+ label: '是否来料检',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '是' : '否';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'payAmount',
|
|
|
+ label: '金额(元)',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createUserName',
|
|
|
+ label: '创建人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 170
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 170
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderStatus',
|
|
|
+ label: '审核状态',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return reviewStatus[_row.orderStatus];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ created() {
|
|
|
+ this.productionplanByIds()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ productionplanByIds(){
|
|
|
+
|
|
|
+ getTableList({relationId:this.relationId}).then(res=>{
|
|
|
+ this.tableList=res
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped></style>
|