houshuai
2025-07-07 048754581793509a57481dfcb7c51f838cb7f576
src/views/mes/MesProductionOrderList.vue
@@ -4,6 +4,69 @@
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="生产订单号">
              <j-input placeholder="请输入生产订单号" v-model="queryParam.orderCode"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="订单类型">
              <j-dict-select-tag dictCode="orderCategory" placeholder="请输入订单类型"
                                 v-model="queryParam.orderCategory"></j-dict-select-tag>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="物料编号">
              <j-input placeholder="请输入物料编号" v-model="queryParam.materialNumber"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="物料名称">
              <j-input placeholder="请输入物料名称" v-model="queryParam.materialName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="订单状态">
              <j-dict-select-tag dictCode="order_status" placeholder="请输入订单状态"
                                 v-model="queryParam.order_status"></j-dict-select-tag>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="计划工艺路线">
              <j-input placeholder="请输入计划工艺路线" v-model="queryParam.processRoute"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="计划物料清单">
              <j-input placeholder="请输入计划物料清单" v-model="queryParam.materialListCode"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="工厂编码">
              <j-input placeholder="请输入工厂编码" v-model="queryParam.factoryCode"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="工厂名称">
              <j-input placeholder="请输入工厂名称" v-model="queryParam.factoryName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="客户型号">
              <j-input placeholder="请输入客户型号" v-model="queryParam.customerOrderModel"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="客户名称">
              <j-input placeholder="请输入客户名称" v-model="queryParam.customer"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
@@ -12,24 +75,25 @@
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('SAP生产订单')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <!-- 高级查询区域 -->
      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
          <a-menu-item key="1" @click="batchDel">
            <a-icon type="delete" />
            删除
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
        <a-button style="margin-left: 8px"> 批量操作
          <a-icon type="down" />
        </a-button>
      </a-dropdown>
    </div>
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
@@ -52,7 +116,8 @@
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
               style="max-width:80px;font-size: 12px;font-style: italic;" />
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@@ -117,135 +182,130 @@
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
          align: 'center',
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            return parseInt(index) + 1
            }
          },
          {
            title:'删除标记',
            align:"center",
            dataIndex: 'delFlag'
          },
          {
            title:'生产订单号',
            align:"center",
          align: 'center',
            dataIndex: 'orderCode'
          },
          {
            title:'订单类型',
            align:"center",
          align: 'center',
            dataIndex: 'orderCategory'
          },
          {
            title:'物料编号',
            align:"center",
          align: 'center',
            dataIndex: 'materialNumber'
          },
          {
            title:'物料名称',
            align:"center",
          align: 'center',
            dataIndex: 'materialName'
          },
          {
            title:'计划开始日期',
            align:"center",
          align: 'center',
            dataIndex: 'planStart'
          },
          {
            title:'计划结束日期',
            align:"center",
          align: 'center',
            dataIndex: 'planEnd'
          },
          {
            title:'订单数量',
            align:"center",
          align: 'center',
            dataIndex: 'orderQuantity'
          },
          {
            title:'产品单位',
            align:"center",
          align: 'center',
            dataIndex: 'productionUnit_dictText'
          },
          {
            title:'订单状态',
            align:"center",
          align: 'center',
            dataIndex: 'orderStatus_dictText'
          },
          {
            title:'优先级',
            align:"center",
          align: 'center',
            dataIndex: 'priority_dictText'
          },
          {
            title:'计划工艺路线',
            align:"center",
          align: 'center',
            dataIndex: 'processRoute'
          },
          {
            title:'计划物料清单',
            align:"center",
          align: 'center',
            dataIndex: 'materialListCode'
          },
          {
            title:'工厂编码',
            align:"center",
          align: 'center',
            dataIndex: 'factoryCode'
          },
          {
            title:'工厂名称',
            align:"center",
          align: 'center',
            dataIndex: 'factoryName'
          },
          {
            title:'客户型号',
            align:"center",
          align: 'center',
            dataIndex: 'customerOrderModel'
          },
          {
            title:'客户名称',
            align:"center",
          align: 'center',
            dataIndex: 'customer'
          },
          {
            title:'备注',
            align:"center",
          align: 'center',
            dataIndex: 'remark'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
          align: 'center',
          fixed: 'right',
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/mesproductionwork/mesProductionOrder/list",
          delete: "/mesproductionwork/mesProductionOrder/delete",
          deleteBatch: "/mesproductionwork/mesProductionOrder/deleteBatch",
          exportXlsUrl: "/mesproductionwork/mesProductionOrder/exportXls",
          importExcelUrl: "mesproductionwork/mesProductionOrder/importExcel",
        list: '/mesproductionwork/mesProductionOrder/list',
        delete: '/mesproductionwork/mesProductionOrder/delete',
        deleteBatch: '/mesproductionwork/mesProductionOrder/deleteBatch',
        exportXlsUrl: '/mesproductionwork/mesProductionOrder/exportXls',
        importExcelUrl: 'mesproductionwork/mesProductionOrder/importExcel'
          
        },
        dictOptions:{},
        superFieldList:[],
      superFieldList: []
      }
    },
    created() {
    this.getSuperFieldList();
    this.getSuperFieldList()
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
      let fieldList = []
        fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
        fieldList.push({type:'string',value:'orderCode',text:'生产订单号',dictCode:''})
        fieldList.push({type:'string',value:'orderCategory',text:'订单类型',dictCode:''})