048754581793509a57481dfcb7c51f838cb7f576..255ea18d2a0f7b991e28db72ee2cda49f6d7ea90
2025-07-10 houshuai
生产管控模块 基本搭建4.1
255ea1 对比 | 目录
2025-07-10 houshuai
生产管控模块 基本搭建4
24f39a 对比 | 目录
2025-07-10 houshuai
生产管控模块 基本搭建3
bddbe8 对比 | 目录
已添加1个文件
已修改5个文件
2441 ■■■■ 文件已修改
src/views/base/FactoryManager.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesMaterialLoadingListView.vue 412 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesMaterialTransferDetailList.vue 335 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesMaterialUnloadingList.vue 318 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesProductionOrderListView.vue 551 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesProductionWorkOrderListView.vue 821 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/FactoryManager.vue
@@ -119,11 +119,11 @@
  </a-row>
</template>
<script>
  import UserFactory from './modules/factoryManager/UserFactory'
  import UserFactory from './modules/FactoryManager/UserFactory'
  import { queryFactoryTreeList, searchByKeywords, deleteByFactory } from '@/api/api'
  import { httpAction, deleteAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import FactoryModal from './modules/factoryManager/FactoryModal'
  import FactoryModal from './modules/FactoryManager/FactoryModal'
  export default {
    name: 'FactoryManager',
src/views/mes/MesMaterialLoadingListView.vue
@@ -1,12 +1,13 @@
<template>
  <a-card :bordered="false" title="上料">
  <a-card :bordered="false" title="上下料查询">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <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-search-select-tag placeholder="请输入工工单号" v-model="queryParam.workOrderId" dict="mes_production_work_order,work_order_code,id"></j-search-select-tag>
              <j-search-select-tag placeholder="请输入工工单号" v-model="queryParam.workOrderId"
                                   dict="mes_production_work_order,work_order_code,id"></j-search-select-tag>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -16,12 +17,14 @@
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="物料编码">
              <j-input dictCode="work_order_status" placeholder="请输入物料编码" v-model="queryParam.materialNumber"></j-input>
              <j-input dictCode="work_order_status" 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 dictCode="work_order_status" placeholder="请输入物料名称" v-model="queryParam.materialName"></j-input>
              <j-input dictCode="work_order_status" placeholder="请输入物料名称"
                       v-model="queryParam.materialName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -40,58 +43,45 @@
    </div>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <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>
        <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>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
    <a-spin :spinning="confirmLoading">
      <div>
        <a-table
          ref="table"
          size="middle"
          :scroll="{x:true}"
          bordered
          rowKey="id"
          :columns="columns"
          :dataSource="dataSource"
          :pagination="ipagination"
          :loading="loading"
          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}"
          class="j-table-force-nowrap"
          @change="handleTableChange">
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
          <template slot="htmlSlot" slot-scope="text">
            <div v-html="text"></div>
          </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;" />
          </template>
          <template slot="fileSlot" slot-scope="text">
            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
            <a-button
              v-else
              :ghost="true"
              type="primary"
              icon="download"
              size="small"
              @click="downloadFile(text)">
              ä¸‹è½½
            </a-button>
          </template>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </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;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
@@ -109,136 +99,218 @@
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
        </a-table>
      </div>
      <a-tabs v-model="activeKey" @change="handleChangeTabs">
        <a-tab-pane tab="下料" :key="refKeys[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys[0]"
            :loading="mesMaterialUnloading.loading"
            :columns="mesMaterialUnloading.columns"
            :dataSource="mesMaterialUnloading.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false"
          />
        </a-tab-pane>
      </a-tabs>
    </a-spin>
    <mes-material-loading-modal ref="modalForm" @ok="modalFormOk"></mes-material-loading-modal>
  </a-card>
</template>
<script>
  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import MesMaterialLoadingModal from './modules/MesMaterialLoadingModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MesMaterialLoadingModal from './modules/MesMaterialLoadingModal'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { getAction } from '@api/manage'
  export default {
    name: 'MesMaterialLoadingList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      MesMaterialLoadingModal
    },
    data () {
      return {
        description: '上料管理页面',
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'工单号',
            align:"center",
            dataIndex: 'workOrderId_dictText'
          },
          {
            title:'设备ID',
            align:"center",
            dataIndex: 'equipmentId'
          },
          {
            title:'工序编码',
            align:"center",
            dataIndex: 'processCode'
          },
          {
            title:'工序名称',
            align:"center",
            dataIndex: 'processName'
          },
          {
            title:'物料编码',
            align:"center",
            dataIndex: 'materialNumber'
          },
          {
            title:'物料名称',
            align:"center",
            dataIndex: 'materialName'
          },
          {
            title:'批次号',
            align:"center",
            dataIndex: 'batchNumber'
          },
          {
            title:'数量',
            align:"center",
            dataIndex: 'quantity'
          },
          {
            title:'剩余数量',
            align:"center",
            dataIndex: 'remainingQuantity'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
export default {
  name: 'MesMaterialLoadingList',
  mixins: [JeecgListMixin, mixinDevice,JVxeTableModelMixin,JVXETypes],
  components: {
    MesMaterialLoadingModal
  },
  data() {
    return {
      description: '上料管理页面',
      refKeys: ['mesMaterialUnloading'],
      tableKeys: ['mesMaterialUnloading'],
      activeKey: 'mesMaterialUnloading',
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        ],
        url: {
          list: "/mes/mesMaterialLoading/list",
          delete: "/mes/mesMaterialLoading/delete",
          deleteBatch: "/mes/mesMaterialLoading/deleteBatch",
          exportXlsUrl: "/mes/mesMaterialLoading/exportXls",
          importExcelUrl: "mes/mesMaterialLoading/importExcel",
        },
        dictOptions:{},
        superFieldList:[],
        {
          title: '工单号',
          align: 'center',
          dataIndex: 'workOrderId_dictText'
        },
        {
          title: '设备ID',
          align: 'center',
          dataIndex: 'equipmentId'
        },
        {
          title: '工序编码',
          align: 'center',
          dataIndex: 'processCode'
        },
        {
          title: '工序名称',
          align: 'center',
          dataIndex: 'processName'
        },
        {
          title: '物料编码',
          align: 'center',
          dataIndex: 'materialNumber'
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName'
        },
        {
          title: '批次号',
          align: 'center',
          dataIndex: 'batchNumber'
        },
        {
          title: '数量',
          align: 'center',
          dataIndex: 'quantity'
        },
        {
          title: '剩余数量',
          align: 'center',
          dataIndex: 'remainingQuantity'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      mesMaterialUnloading: {
        loading: false,
        dataSource: [],
        columns: [
          // {
          //   title: '上料',
          //   key: 'loadingId',
          //   type: JVXETypes.input,
          //   width: '200px',
          //   placeholder: '请输入${title}',
          //   defaultValue: ''
          // },
          {
            title: '物料编码',
            key: 'materialNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '物料名称',
            key: 'materialName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '批次号',
            key: 'batchNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '数量',
            key: 'quantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          }
        ]
      },
      url: {
        list: '/mes/mesMaterialLoading/list',
        delete: '/mes/mesMaterialLoading/delete',
        deleteBatch: '/mes/mesMaterialLoading/deleteBatch',
        exportXlsUrl: '/mes/mesMaterialLoading/exportXls',
        importExcelUrl: 'mes/mesMaterialLoading/importExcel',
        queryUnloadingByLoadingId:'/mes/mesMaterialLoading/queryUnloadingByLoadingId'
      },
      dictOptions: {},
      superFieldList: []
    }
  },
  created() {
    this.getSuperFieldList()
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
  },
  methods: {
    initDictConfig() {
    },
    async onSelectChange(selectedRowKeys) {
      this.mesMaterialUnloading.loading = true
      // å•选模式下,selectedRowKeys æ˜¯æ•°ç»„,但长度最多为1
      console.log('点击了---->',selectedRowKeys[0])
      this.selectedRowKeys = selectedRowKeys
      this.mesMaterialUnloading.dataSource=[]
      // èŽ·å–é€‰ä¸­è¡Œçš„å®Œæ•´æ•°æ®
      if (selectedRowKeys.length > 0) {
        const selectedId = selectedRowKeys[0] // é€‰ä¸­è¡Œçš„id
        const mesMaterialUnloading = await getAction(this.url.queryUnloadingByLoadingId, { 'loadingId': selectedId })
        this.mesMaterialUnloading.dataSource = mesMaterialUnloading.result
        this.mesMaterialUnloading.loading = false
      }
    },
    created() {
    this.getSuperFieldList();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
        fieldList.push({type:'string',value:'workOrderId',text:'工单ID',dictCode:''})
        fieldList.push({type:'string',value:'equipmentId',text:'设备ID',dictCode:''})
        fieldList.push({type:'string',value:'processCode',text:'工序编码',dictCode:''})
        fieldList.push({type:'string',value:'processName',text:'工序名称',dictCode:''})
        fieldList.push({type:'string',value:'materialNumber',text:'物料编码',dictCode:''})
        fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''})
        fieldList.push({type:'string',value:'batchNumber',text:'批次号',dictCode:''})
        fieldList.push({type:'double',value:'quantity',text:'数量',dictCode:''})
        fieldList.push({type:'double',value:'remainingQuantity',text:'剩余数量',dictCode:''})
        this.superFieldList = fieldList
      }
    getSuperFieldList() {
      let fieldList = []
      fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' })
      fieldList.push({ type: 'string', value: 'workOrderId', text: '工单ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentId', text: '设备ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'processCode', text: '工序编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'processName', text: '工序名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'batchNumber', text: '批次号', dictCode: '' })
      fieldList.push({ type: 'double', value: 'quantity', text: '数量', dictCode: '' })
      fieldList.push({ type: 'double', value: 'remainingQuantity', text: '剩余数量', dictCode: '' })
      this.superFieldList = fieldList
    }
  }
}
</script>
<style scoped>
  @import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>
src/views/mes/MesMaterialTransferDetailList.vue
@@ -1,73 +1,60 @@
<template>
  <a-card :bordered="false">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('物料拉动明细')">导出</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>
        <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>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    @cancel="handleCancel"
    :okButtonProps="{ style: { display: 'none' } }"
    cancelText="关闭">
    <a-card :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
          </a-row>
        </a-form>
      </div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
      <!-- table区域-begin -->
      <div>
        <a-table
          ref="table"
          size="middle"
          :scroll="{x:true}"
          bordered
          rowKey="id"
          :columns="columns"
          :dataSource="dataSource"
          :pagination="ipagination"
          :loading="loading"
          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
          class="j-table-force-nowrap"
          @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </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;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
          <template slot="htmlSlot" slot-scope="text">
            <div v-html="text"></div>
          </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;" />
          </template>
          <template slot="fileSlot" slot-scope="text">
            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
            <a-button
              v-else
              :ghost="true"
              type="primary"
              icon="download"
              size="small"
              @click="downloadFile(text)">
              ä¸‹è½½
            </a-button>
          </template>
        <span slot="action" slot-scope="text, record">
          <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
@@ -86,122 +73,132 @@
          </a-dropdown>
        </span>
      </a-table>
    </div>
        </a-table>
      </div>
    <mes-material-transfer-detail-modal ref="modalForm" @ok="modalFormOk"></mes-material-transfer-detail-modal>
  </a-card>
      <mes-material-transfer-detail-modal ref="modalForm" @ok="modalFormOk"></mes-material-transfer-detail-modal>
    </a-card>
  </j-modal>
</template>
<script>
  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import MesMaterialTransferDetailModal from './modules/MesMaterialTransferDetailModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MesMaterialTransferDetailModal from './modules/MesMaterialTransferDetailModal'
  export default {
    name: 'MesMaterialTransferDetailList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      MesMaterialTransferDetailModal
    },
    data () {
      return {
        description: '物料拉动明细管理页面',
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'删除标记',
            align:"center",
            dataIndex: 'delFlag'
          },
          {
            title:'申请单ID',
            align:"center",
            dataIndex: 'requestId'
          },
          {
            title:'物料编码',
            align:"center",
            dataIndex: 'materialNumber'
          },
          {
            title:'物料名称',
            align:"center",
            dataIndex: 'materialName'
          },
          {
            title:'理论拉动数量',
            align:"center",
            dataIndex: 'specifiedQuantity'
          },
          {
            title:'实际拉动数量',
            align:"center",
            dataIndex: 'actualQuantity'
          },
          {
            title:'车间剩余数量',
            align:"center",
            dataIndex: 'remainingQuantity'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
export default {
  name: 'MesMaterialTransferDetailList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    MesMaterialTransferDetailModal
  },
  data() {
    return {
      description: '物料拉动明细管理页面',
      title: '物料拉动明细',
      width: 1000,
      toolsVisable: true,
      visible: false,
      confirmLoading: false,
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        ],
        url: {
          list: "/mes/mesMaterialTransferDetail/list",
          delete: "/mes/mesMaterialTransferDetail/delete",
          deleteBatch: "/mes/mesMaterialTransferDetail/deleteBatch",
          exportXlsUrl: "/mes/mesMaterialTransferDetail/exportXls",
          importExcelUrl: "mes/mesMaterialTransferDetail/importExcel",
        },
        dictOptions:{},
        superFieldList:[],
      }
    },
    created() {
    this.getSuperFieldList();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
        // {
        //   title: '删除标记',
        //   align: 'center',
        //   dataIndex: 'delFlag'
        // },
        // {
        //   title: '申请单ID',
        //   align: 'center',
        //   dataIndex: 'requestId'
        // },
        {
          title: '物料编码',
          align: 'center',
          dataIndex: 'materialNumber'
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName'
        },
        {
          title: '理论拉动数量',
          align: 'center',
          dataIndex: 'specifiedQuantity'
        },
        {
          title: '实际拉动数量',
          align: 'center',
          dataIndex: 'actualQuantity'
        },
        {
          title: '车间剩余数量',
          align: 'center',
          dataIndex: 'remainingQuantity'
        },
        // {
        //   title: '操作',
        //   dataIndex: 'action',
        //   align: 'center',
        //   fixed: 'right',
        //   width: 147,
        //   scopedSlots: { customRender: 'action' }
        // }
      ],
      url: {
        list: '/mes/mesMaterialTransferDetail/list',
        delete: '/mes/mesMaterialTransferDetail/delete',
        deleteBatch: '/mes/mesMaterialTransferDetail/deleteBatch',
        exportXlsUrl: '/mes/mesMaterialTransferDetail/exportXls',
        importExcelUrl: 'mes/mesMaterialTransferDetail/importExcel'
      },
      dictOptions: {},
      superFieldList: []
    }
  },
  created() {
    this.getSuperFieldList()
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
  },
  methods: {
    handleCancel(){
      this.visible=false
      this.dataSource = []
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
        fieldList.push({type:'string',value:'requestId',text:'申请单ID',dictCode:''})
        fieldList.push({type:'string',value:'materialNumber',text:'物料编码',dictCode:''})
        fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''})
        fieldList.push({type:'double',value:'specifiedQuantity',text:'理论拉动数量',dictCode:''})
        fieldList.push({type:'double',value:'actualQuantity',text:'实际拉动数量',dictCode:''})
        fieldList.push({type:'double',value:'remainingQuantity',text:'车间剩余数量',dictCode:''})
        this.superFieldList = fieldList
      }
    initDictConfig() {
    },
    getSuperFieldList() {
      let fieldList = []
      fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' })
      fieldList.push({ type: 'string', value: 'requestId', text: '申请单ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
      fieldList.push({ type: 'double', value: 'specifiedQuantity', text: '理论拉动数量', dictCode: '' })
      fieldList.push({ type: 'double', value: 'actualQuantity', text: '实际拉动数量', dictCode: '' })
      fieldList.push({ type: 'double', value: 'remainingQuantity', text: '车间剩余数量', dictCode: '' })
      this.superFieldList = fieldList
    }
  }
}
</script>
<style scoped>
  @import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>
src/views/mes/MesMaterialUnloadingList.vue
@@ -1,73 +1,60 @@
<template>
  <a-card :bordered="false">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('下料')">导出</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>
        <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>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    @cancel="handleCancel"
    :okButtonProps="{ style: { display: 'none' } }"
    cancelText="关闭">
    <a-card :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
          </a-row>
        </a-form>
      </div>
      <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
      <!-- table区域-begin -->
      <div>
        <a-table
          ref="table"
          size="middle"
          :scroll="{x:true}"
          bordered
          rowKey="id"
          :columns="columns"
          :dataSource="dataSource"
          :pagination="ipagination"
          :loading="loading"
          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
          class="j-table-force-nowrap"
          @change="handleTableChange">
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
          <template slot="htmlSlot" slot-scope="text">
            <div v-html="text"></div>
          </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;" />
          </template>
          <template slot="fileSlot" slot-scope="text">
            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
            <a-button
              v-else
              :ghost="true"
              type="primary"
              icon="download"
              size="small"
              @click="downloadFile(text)">
              ä¸‹è½½
            </a-button>
          </template>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </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;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
@@ -86,116 +73,117 @@
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <mes-material-unloading-modal ref="modalForm" @ok="modalFormOk"></mes-material-unloading-modal>
  </a-card>
        </a-table>
      </div>
      <mes-material-unloading-modal ref="modalForm" @ok="modalFormOk"></mes-material-unloading-modal>
    </a-card>
  </j-modal>
</template>
<script>
  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import MesMaterialUnloadingModal from './modules/MesMaterialUnloadingModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MesMaterialUnloadingModal from './modules/MesMaterialUnloadingModal'
  export default {
    name: 'MesMaterialUnloadingList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      MesMaterialUnloadingModal
    },
    data () {
      return {
        description: '下料管理页面',
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'删除标记',
            align:"center",
            dataIndex: 'delFlag'
          },
          {
            title:'上料id',
            align:"center",
            dataIndex: 'loadingId'
          },
          {
            title:'物料编码',
            align:"center",
            dataIndex: 'materialNumber'
          },
          {
            title:'物料名称',
            align:"center",
            dataIndex: 'materialName'
          },
          {
            title:'批次号',
            align:"center",
            dataIndex: 'batchNumber'
          },
          {
            title:'数量',
            align:"center",
            dataIndex: 'quantity'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
export default {
  name: 'MesMaterialUnloadingList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    MesMaterialUnloadingModal
  },
  data() {
    return {
      description: '下料管理页面',
      title: '下料详情',
      width: 1000,
      toolsVisable: true,
      visible: false,
      confirmLoading: false,
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        ],
        url: {
          list: "/mes/mesMaterialUnloading/list",
          delete: "/mes/mesMaterialUnloading/delete",
          deleteBatch: "/mes/mesMaterialUnloading/deleteBatch",
          exportXlsUrl: "/mes/mesMaterialUnloading/exportXls",
          importExcelUrl: "mes/mesMaterialUnloading/importExcel",
        },
        dictOptions:{},
        superFieldList:[],
      }
    },
    created() {
    this.getSuperFieldList();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
        // {
        //   title: '删除标记',
        //   align: 'center',
        //   dataIndex: 'delFlag'
        // },
        // {
        //   title: '上料id',
        //   align: 'center',
        //   dataIndex: 'loadingId'
        // },
        {
          title: '物料编码',
          align: 'center',
          dataIndex: 'materialNumber'
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName'
        },
        {
          title: '批次号',
          align: 'center',
          dataIndex: 'batchNumber'
        },
        {
          title: '数量',
          align: 'center',
          dataIndex: 'quantity'
        },
      ],
      url: {
        list: '/mes/mesMaterialUnloading/list',
        delete: '/mes/mesMaterialUnloading/delete',
        deleteBatch: '/mes/mesMaterialUnloading/deleteBatch',
        exportXlsUrl: '/mes/mesMaterialUnloading/exportXls',
        importExcelUrl: 'mes/mesMaterialUnloading/importExcel'
      },
      dictOptions: {},
      superFieldList: []
    }
  },
  created() {
    this.getSuperFieldList()
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
  },
  methods: {
    handleCancel(){
      this.visible=false
      this.dataSource = []
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
        fieldList.push({type:'string',value:'loadingId',text:'上料id',dictCode:''})
        fieldList.push({type:'string',value:'materialNumber',text:'物料编码',dictCode:''})
        fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''})
        fieldList.push({type:'string',value:'batchNumber',text:'批次号',dictCode:''})
        fieldList.push({type:'double',value:'quantity',text:'数量',dictCode:''})
        this.superFieldList = fieldList
      }
    initDictConfig() {
    },
    getSuperFieldList() {
      let fieldList = []
      fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' })
      fieldList.push({ type: 'string', value: 'loadingId', text: '上料id', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'batchNumber', text: '批次号', dictCode: '' })
      fieldList.push({ type: 'double', value: 'quantity', text: '数量', dictCode: '' })
      this.superFieldList = fieldList
    }
  }
}
</script>
<style scoped>
  @import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>
src/views/mes/MesProductionOrderListView.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,551 @@
<template>
  <a-card :bordered="false" title="生产订单">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <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.orderStatus"></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>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <!-- table区域-begin -->
    <a-spin :spinning="confirmLoading">
      <div>
        <a-table
          ref="table"
          size="middle"
          :scroll="{x:true}"
          bordered
          rowKey="id"
          :columns="columns"
          :dataSource="dataSource"
          :pagination="ipagination"
          :loading="loading"
          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}"
          class="j-table-force-nowrap"
          @change="handleTableChange">
          <template slot="htmlSlot" slot-scope="text">
            <div v-html="text"></div>
          </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;" />
          </template>
          <template slot="fileSlot" slot-scope="text">
            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
            <a-button
              v-else
              :ghost="true"
              type="primary"
              icon="download"
              size="small"
              @click="downloadFile(text)">
              ä¸‹è½½
            </a-button>
          </template>
          <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
        </a-table>
      </div>
      <a-tabs v-model="activeKey" @change="handleChangeTabs">
        <a-tab-pane tab="工单报工" :key="refKeys1[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys1[0]"
            :loading="mesWorkReporting.loading"
            :columns="mesWorkReporting.columns"
            :dataSource="mesWorkReporting.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false">
          </j-vxe-table>
        </a-tab-pane>
        <a-tab-pane tab="移库单打印" :key="refKeys2[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys2[0]"
            :loading="mesTransferOrderPrint.loading"
            :columns="mesTransferOrderPrint.columns"
            :dataSource="mesTransferOrderPrint.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false">
          </j-vxe-table>
        </a-tab-pane>
      </a-tabs>
    </a-spin>
    <mes-production-order-modal ref="modalForm" @ok="modalFormOk"></mes-production-order-modal>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MesProductionOrderModal from './modules/MesProductionOrderModal'
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { getAction } from '@api/manage'
export default {
  name: 'MesProductionOrderList',
  mixins: [JeecgListMixin, mixinDevice,JVxeTableModelMixin,JVXETypes],
  components: {
    MesProductionOrderModal,
  },
  data() {
    return {
      description: 'SAP生产订单管理页面',
      activeKey : 'mesWorkReporting',
      // å·¥å•报工
      refKeys1: ['mesWorkReporting'],
      tableKeys1: ['mesWorkReporting'],
      //移库单打印
      refKeys2: ['mesTransferOrderPrint'],
      tableKeys2: ['mesTransferOrderPrint'],
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '生产订单号',
          align: 'center',
          dataIndex: 'orderCode'
        },
        {
          title: '订单类型',
          align: 'center',
          dataIndex: 'orderCategory'
        },
        {
          title: '物料编号',
          align: 'center',
          dataIndex: 'materialNumber'
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName'
        },
        {
          title: '计划开始日期',
          align: 'center',
          dataIndex: 'planStart'
        },
        {
          title: '计划结束日期',
          align: 'center',
          dataIndex: 'planEnd'
        },
        {
          title: '订单数量',
          align: 'center',
          dataIndex: 'orderQuantity'
        },
        {
          title: '产品单位',
          align: 'center',
          dataIndex: 'productionUnit_dictText'
        },
        {
          title: '订单状态',
          align: 'center',
          dataIndex: 'orderStatus_dictText'
        },
        {
          title: '优先级',
          align: 'center',
          dataIndex: 'priority_dictText'
        },
        {
          title: '计划工艺路线',
          align: 'center',
          dataIndex: 'processRoute'
        },
        {
          title: '计划物料清单',
          align: 'center',
          dataIndex: 'materialListCode'
        },
        {
          title: '工厂编码',
          align: 'center',
          dataIndex: 'factoryCode'
        },
        {
          title: '工厂名称',
          align: 'center',
          dataIndex: 'factoryName'
        },
        {
          title: '客户型号',
          align: 'center',
          dataIndex: 'customerOrderModel'
        },
        {
          title: '客户名称',
          align: 'center',
          dataIndex: 'customer'
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      mesWorkReporting: {
        loading: false,
        dataSource: [],
        columns: [
          {
            title: '订单号',
            key: 'orderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '工单号',
            key: 'workOrderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '产线名称',
            key: 'factoryName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '批次号',
            key: 'batchNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '托号',
            key: 'palletNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '数量',
            key: 'quantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '报工人',
            key: 'reporter',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '报工时间',
            key: 'reportTime',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '线边仓名称',
            key: 'warehouseName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '成品下线打印状态',
            key: 'printStatus',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
        ]
      },
      mesTransferOrderPrint: {
        loading: false,
        dataSource: [],
        columns: [
          {
            title: '订单号',
            key: 'orderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '移库单号',
            key: 'workOrderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '移库类型',
            key: 'orderCategory',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '原库存地',
            key: 'originalWarehouseName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '目标库存地',
            key: 'targetWarehouseName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '托号',
            key: 'palletNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '数量',
            key: 'quantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '操作人',
            key: 'operator',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '操作时间',
            key: 'operateTime',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '移库单状态',
            key: 'orderStatus',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
        ]
      },
      url: {
        list: '/mesproductionwork/mesProductionOrder/list',
        delete: '/mesproductionwork/mesProductionOrder/delete',
        deleteBatch: '/mesproductionwork/mesProductionOrder/deleteBatch',
        exportXlsUrl: '/mesproductionwork/mesProductionOrder/exportXls',
        importExcelUrl: 'mesproductionwork/mesProductionOrder/importExcel',
        queryWorkReportingByOrderId:'/mesworkreporting/mesWorkReporting/queryWorkReportingByOrderId',
        queryOrderPrintByOrderId:'/mestransferorderprint/mesTransferOrderPrint/queryOrderPrintByOrderId'
      },
      dictOptions: {},
      superFieldList: []
    }
  },
  created() {
    this.getSuperFieldList()
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
  },
  methods: {
    //mesWorkReporting,mesTransferOrderPrint
    async onSelectChange(selectedRowKeys) {
      this.mesWorkReporting.loading = true
      this.mesTransferOrderPrint.loading = true
      this.selectedRowKeys = selectedRowKeys
      this.mesWorkReporting.dataSource = []
      this.mesTransferOrderPrint.dataSource = []
      if (selectedRowKeys.length > 0) {
        const selectedId = selectedRowKeys[0] // é€‰ä¸­è¡Œçš„id
        let parm = {
          'orderId': selectedId
        }
        const mesWorkReportingResult = await getAction(this.url.queryWorkReportingByOrderId, parm)
        const mesTransferOrderPrintResult = await getAction(this.url.queryOrderPrintByOrderId, parm)
        this.mesWorkReporting.dataSource = mesWorkReportingResult.result
        this.mesTransferOrderPrint.dataSource = mesTransferOrderPrintResult.result
        this.mesWorkReporting.loading = false
        this.mesTransferOrderPrint.loading = false
      }
    },
    initDictConfig() {
    },
    getSuperFieldList() {
      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: '' })
      fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'planStart', text: '计划开始日期' })
      fieldList.push({ type: 'datetime', value: 'planEnd', text: '计划结束日期' })
      fieldList.push({ type: 'double', value: 'orderQuantity', text: '订单数量', dictCode: '' })
      fieldList.push({ type: 'string', value: 'productionUnit', text: '产品单位', dictCode: 'production_unit' })
      fieldList.push({ type: 'string', value: 'orderStatus', text: '订单状态', dictCode: 'order_status' })
      fieldList.push({ type: 'string', value: 'priority', text: '优先级', dictCode: 'priority' })
      fieldList.push({ type: 'string', value: 'processRoute', text: '计划工艺路线', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialListCode', text: '计划物料清单', dictCode: '' })
      fieldList.push({ type: 'string', value: 'factoryCode', text: '工厂编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'factoryName', text: '工厂名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'customerOrderModel', text: '客户型号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'customer', text: '客户名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
      this.superFieldList = fieldList
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/mes/MesProductionWorkOrderListView.vue
@@ -16,12 +16,14 @@
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="工单状态">
              <j-dict-select-tag dictCode="work_order_status" placeholder="请输入工单状态" v-model="queryParam.workOrderStatus"></j-dict-select-tag>
              <j-dict-select-tag dictCode="work_order_status" placeholder="请输入工单状态"
                                 v-model="queryParam.workOrderStatus"></j-dict-select-tag>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="重发布人">
              <j-select-user-by-dep placeholder="请输入重发布人" v-model="queryParam.republisher"></j-select-user-by-dep>
              <j-select-user-by-dep placeholder="请输入重发布人"
                                    v-model="queryParam.republisher"></j-select-user-by-dep>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -33,56 +35,44 @@
        </a-row>
      </a-form>
    </div>
    <a-spin :spinning="confirmLoading">
      <div>
        <a-table
          ref="table"
          size="middle"
          :scroll="{x:true}"
          bordered
          rowKey="id"
          :columns="columns"
          :dataSource="dataSource"
          :pagination="ipagination"
          :loading="loading"
          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}"
          class="j-table-force-nowrap"
          @change="handleTableChange">
    <div class="table-operator">
      <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>
        <a-button style="margin-left: 8px"> æ‰¹é‡æ“ä½œ <a-icon type="down" /></a-button>
      </a-dropdown>
    </div>
    <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>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
          <template slot="htmlSlot" slot-scope="text">
            <div v-html="text"></div>
          </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;" />
          </template>
          <template slot="fileSlot" slot-scope="text">
            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
            <a-button
              v-else
              :ghost="true"
              type="primary"
              icon="download"
              size="small"
              @click="downloadFile(text)">
              ä¸‹è½½
            </a-button>
          </template>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </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;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
@@ -100,167 +90,652 @@
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
        </a-table>
      </div>
      <a-tabs v-model="activeKey" @change="handleChangeTabs">
        <a-tab-pane tab="工单报工" :key="refKeys1[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys1[0]"
            :loading="mesWorkReporting.loading"
            :columns="mesWorkReporting.columns"
            :dataSource="mesWorkReporting.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false">
            <template slot="showDetail" slot-scope="{row}">
              <a-button type="primary" @click="handleOrderDetail(row)" size="small">
                <a-icon type="eye" />订单详情
              </a-button>
            </template>
          </j-vxe-table>
        </a-tab-pane>
        <a-tab-pane tab="物料拉动申请" :key="refKeys2[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys2[0]"
            :loading="mesMaterialTransferRequest.loading"
            :columns="mesMaterialTransferRequest.columns"
            :dataSource="mesMaterialTransferRequest.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false">
            <template slot="showTransferDetail" slot-scope="{row}">
              <a-button type="primary" @click="handleTransferDetail(row)" size="small">
                <a-icon type="eye" />物料拉动明细
              </a-button>
            </template>
          </j-vxe-table>
        </a-tab-pane>
        <a-tab-pane tab="上下料查询" :key="refKeys3[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys3[0]"
            :loading="mesMaterialLoading.loading"
            :columns="mesMaterialLoading.columns"
            :dataSource="mesMaterialLoading.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false">
            <template slot="showUnloadingDetail" slot-scope="{row}">
              <a-button type="primary" @click="handleUnLoadingDetail(row)" size="small">
                <a-icon type="eye" />下料详情
              </a-button>
            </template>
          </j-vxe-table>
        </a-tab-pane>
        <a-tab-pane tab="齐套性检查记录" :key="refKeys4[0]" :forceRender="true">
          <div style="display: flex; align-items: center; margin-bottom: 10px;">
          </div>
          <j-vxe-table
            keep-source
            :ref="refKeys4[0]"
            :loading="mesKittingCompletenessCheck.loading"
            :columns="mesKittingCompletenessCheck.columns"
            :dataSource="mesKittingCompletenessCheck.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false"
          />
        </a-tab-pane>
      </a-tabs>
    </a-spin>
    <mes-production-work-order-modal ref="modalForm" @ok="modalFormOk"></mes-production-work-order-modal>
    <mes-production-order-modal ref="MesProductionOrderModal"></mes-production-order-modal>
    <MesMaterialUnloadingList ref="MesMaterialUnloadingList"></MesMaterialUnloadingList>
    <MesMaterialTransferDetailList ref="MesMaterialTransferDetailList"></MesMaterialTransferDetailList>
  </a-card>
</template>
<script>
  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import MesProductionWorkOrderModal from './modules/MesProductionWorkOrderModal'
  import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MesProductionWorkOrderModal from './modules/MesProductionWorkOrderModal'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
import { getAction } from '@api/manage'
import MesProductionOrderModal from '@views/mes/modules/MesProductionOrderModal.vue'
import MesMaterialUnloadingList from '@views/mes/MesMaterialUnloadingList.vue'
import MesMaterialTransferDetailList from '@views/mes/MesMaterialTransferDetailList.vue'
  export default {
    name: 'MesProductionWorkOrderList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      MesProductionWorkOrderModal
    },
    data () {
      return {
        description: '排产工单管理页面',
        // è¡¨å¤´
export default {
  name: 'MesProductionWorkOrderList',
  mixins: [JeecgListMixin, mixinDevice, JVxeTableModelMixin, JVXETypes],
  components: {
    MesProductionWorkOrderModal,
    MesProductionOrderModal,
    MesMaterialUnloadingList,
    MesMaterialTransferDetailList
  },
  data() {
    return {
      description: '排产工单管理页面',
      activeKey : 'mesWorkReporting',
      // å·¥å•报工
      refKeys1: ['mesWorkReporting'],
      tableKeys1: ['mesWorkReporting'],
      //物料拉动申请
      refKeys2: ['mesMaterialTransferRequest'],
      tableKeys2: ['mesMaterialTransferRequest'],
      //上料
      refKeys3: ['mesMaterialLoading'],
      tableKeys3: ['mesMaterialLoading'],
      //齐套性检查记录
      refKeys4: ['mesKittingCompletenessCheck'],
      tableKeys4: ['mesKittingCompletenessCheck'],
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '工单号(任务号)',
          align: 'center',
          dataIndex: 'workOrderCode'
        },
        {
          title: '物料编码',
          align: 'center',
          dataIndex: 'materialNumber'
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName'
        },
        {
          title: '计划生产数量',
          align: 'center',
          dataIndex: 'planQuantity'
        },
        {
          title: '产线(冗余)',
          align: 'center',
          dataIndex: 'factoryId_dictText'
        },
        {
          title: '班组',
          align: 'center',
          dataIndex: 'groupId_dictText'
        },
        {
          title: '班次(冗余)',
          align: 'center',
          dataIndex: 'shiftId_dictText'
        },
        {
          title: '排产日期',
          align: 'center',
          dataIndex: 'workOrderDate'
        },
        {
          title: '工单状态',
          align: 'center',
          dataIndex: 'workOrderStatus_dictText'
        },
        {
          title: '实际报工数量',
          align: 'center',
          dataIndex: 'actualQuantity'
        },
        {
          title: '发布人',
          align: 'center',
          dataIndex: 'publisher'
        },
        {
          title: '发布时间',
          align: 'center',
          dataIndex: 'publishTime'
        },
        {
          title: '重发布人',
          align: 'center',
          dataIndex: 'republisher'
        },
        {
          title: '重发布时间',
          align: 'center',
          dataIndex: 'republishTime'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      mesWorkReporting: {
        loading: false,
        dataSource: [],
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
            title: '操作',
            key: 'action',
            type: JVXETypes.slot,
            slotName: 'showDetail',
            width: '120px',
            align: 'center'
          },
          {
            title:'工单号(任务号)',
            align:"center",
            dataIndex: 'workOrderCode'
            title: '订单号',
            key: 'orderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'物料编码',
            align:"center",
            dataIndex: 'materialNumber'
            title: '工单号',
            key: 'workOrderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'物料名称',
            align:"center",
            dataIndex: 'materialName'
            title: '产线名称',
            key: 'factoryName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'计划生产数量',
            align:"center",
            dataIndex: 'planQuantity'
            title: '批次号',
            key: 'batchNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'产线(冗余)',
            align:"center",
            dataIndex: 'factoryId_dictText'
            title: '托号',
            key: 'palletNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'班组',
            align:"center",
            dataIndex: 'groupId_dictText'
            title: '数量',
            key: 'quantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'班次(冗余)',
            align:"center",
            dataIndex: 'shiftId_dictText'
            title: '报工人',
            key: 'reporter',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'排产日期',
            align:"center",
            dataIndex: 'workOrderDate'
            title: '报工时间',
            key: 'reportTime',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'工单状态',
            align:"center",
            dataIndex: 'workOrderStatus_dictText'
            title: '线边仓名称',
            key: 'warehouseName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'实际报工数量',
            align:"center",
            dataIndex: 'actualQuantity'
            title: '成品下线打印状态',
            key: 'printStatus',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title:'发布人',
            align:"center",
            dataIndex: 'publisher'
          },
          {
            title:'发布时间',
            align:"center",
            dataIndex: 'publishTime'
          },
          {
            title:'重发布人',
            align:"center",
            dataIndex: 'republisher'
          },
          {
            title:'重发布时间',
            align:"center",
            dataIndex: 'republishTime'
          },
        ]
      },
      mesMaterialTransferRequest: {
        loading: false,
        dataSource: [],
        columns: [
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/mesproductionworkorder/mesProductionWorkOrder/list",
          delete: "/mesproductionworkorder/mesProductionWorkOrder/delete",
          deleteBatch: "/mesproductionworkorder/mesProductionWorkOrder/deleteBatch",
          exportXlsUrl: "/mesproductionworkorder/mesProductionWorkOrder/exportXls",
          importExcelUrl: "mesproductionworkorder/mesProductionWorkOrder/importExcel",
            key: 'action',
            type: JVXETypes.slot,
            slotName: 'showTransferDetail',
            width: '120px',
            align: 'center'
          },
          {
            title: '拉动单号',
            key: 'requestCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '工单号',
            key: 'workOrderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: 'SAP预留号',
            key: 'reservationCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '发布状态',
            key: 'publishStatus',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '请求状态',
            key: 'requestStatus',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '请求时间',
            key: 'requestTime',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '原库存地',
            key: 'originalWarehouseName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '目标库存地',
            key: 'targetWarehouseName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '优先级',
            key: 'priority',
            type: JVXETypes.select,
            dictCode: 'priority',
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '最晚配送时间',
            key: 'latestDeliveryTime',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
        ]
      },
      mesMaterialLoading: {
        loading: false,
        dataSource: [],
        columns: [
          {
            title: '操作',
            key: 'action',
            type: JVXETypes.slot,
            slotName: 'showUnloadingDetail',
            width: '120px',
            align: 'center'
          },
          {
            title: '工单号',
            key: 'workOrderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '设备ID',
            key: 'equipmentId',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '工序编码',
            key: 'processCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '工序名称',
            key: 'processName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '物料编码',
            key: 'materialNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '物料名称',
            key: 'materialName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '批次号',
            key: 'batchNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '数量',
            key: 'quantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '剩余数量',
            key: 'remainingQuantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
        ]
      },
      mesKittingCompletenessCheck: {
        loading: false,
        dataSource: [],
        columns: [
          {
            title: '工单号',
            key: 'workOrderCode',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '物料编号',
            key: 'materialNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '物料名称',
            key: 'materialName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '需求数量',
            key: 'requiredQuantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '实际数量',
            key: 'actualQuantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
          {
            title: '是否齐备',
            key: 'checkFlag',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
        ]
      },
      url: {
        list: '/mesproductionworkorder/mesProductionWorkOrder/list',
        delete: '/mesproductionworkorder/mesProductionWorkOrder/delete',
        deleteBatch: '/mesproductionworkorder/mesProductionWorkOrder/deleteBatch',
        exportXlsUrl: '/mesproductionworkorder/mesProductionWorkOrder/exportXls',
        importExcelUrl: 'mesproductionworkorder/mesProductionWorkOrder/importExcel',
        queryWorkReportingByWorkOrderId:'/mesworkreporting/mesWorkReporting/queryWorkReportingByWorkOrderId',
        queryMaterialTransferRequestByWorkOrderId:'/mesmaterialtransferrequest/mesMaterialTransferRequest/queryMaterialTransferRequestByWorkOrderId',
        queryLoadingByWorkOrderId:'/mes/mesMaterialLoading/queryLoadingByWorkOrderId',
        queryCompletenessCheckByWorkOrderId:'/meskittingcompletenesscheck/mesKittingCompletenessCheck/queryCompletenessCheckByWorkOrderId',
        queryOrderById:'/mesproductionwork/mesProductionOrder/queryById',
        queryUnloadingByLoadingId:'/mes/mesMaterialUnloading/queryUnloadingByLoadingId',
        queryTransferDetailBy:'/mes/mesMaterialTransferDetail/queryTransferDetailBy'
      },
      dictOptions: {},
      superFieldList: []
    }
  },
  created() {
    this.getSuperFieldList()
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
  },
  methods: {
    async handleTransferDetail(row){
      console.log('row---->',row)
      const transferDetailResult = await getAction(this.url.queryTransferDetailBy,{'requestId':row.id})
      this.$refs.MesMaterialTransferDetailList.visible = true
      this.$refs.MesMaterialTransferDetailList.dataSource = transferDetailResult.result.records
    },
    async handleUnLoadingDetail(row){
      console.log('row---->',row)
      const unloadingResult = await getAction(this.url.queryUnloadingByLoadingId,{'loadingId':row.id})
      this.$refs.MesMaterialUnloadingList.visible = true
      this.$refs.MesMaterialUnloadingList.dataSource = unloadingResult.result.records
    },
    async handleOrderDetail(row){
      const orderResult = await getAction(this.url.queryOrderById,{'id':row.orderId})
      this.$refs.MesProductionOrderModal.edit(orderResult.result)
      this.$refs.MesProductionOrderModal.title="订单详情";
      this.$refs.MesProductionOrderModal.disableSubmit = true;
    },
    async onSelectChange(selectedRowKeys){
      //mesWorkReporting,mesMaterialTransferRequest,mesMaterialLoading,mesKittingCompletenessCheck
      this.mesWorkReporting.loading = true
      this.mesMaterialTransferRequest.loading = true
      this.mesMaterialLoading.loading = true
      this.mesKittingCompletenessCheck.loading = true
        },
        dictOptions:{},
        superFieldList:[],
      this.selectedRowKeys = selectedRowKeys
      this.mesWorkReporting.dataSource=[]
      this.mesMaterialTransferRequest.dataSource=[]
      this.mesMaterialLoading.dataSource=[]
      this.mesKittingCompletenessCheck.dataSource=[]
      if (selectedRowKeys.length > 0) {
        const selectedId = selectedRowKeys[0] // é€‰ä¸­è¡Œçš„id
        let parm = {
          'workOrderId':selectedId
        }
        const mesWorkReportingResult = await getAction(this.url.queryWorkReportingByWorkOrderId, parm)
        const mesMaterialTransferRequestResult = await getAction(this.url.queryMaterialTransferRequestByWorkOrderId, parm)
        const mesMaterialLoadingResult = await getAction(this.url.queryLoadingByWorkOrderId, parm)
        const mesKittingCompletenessCheckResult = await getAction(this.url.queryCompletenessCheckByWorkOrderId, parm)
        this.mesWorkReporting.dataSource = mesWorkReportingResult.result
        this.mesMaterialTransferRequest.dataSource = mesMaterialTransferRequestResult.result
        this.mesMaterialLoading.dataSource = mesMaterialLoadingResult.result
        this.mesKittingCompletenessCheck.dataSource = mesKittingCompletenessCheckResult.result
        this.mesWorkReporting.loading = false
        this.mesMaterialTransferRequest.loading = false
        this.mesMaterialLoading.loading = false
        this.mesKittingCompletenessCheck.loading = false
      }
    },
    created() {
    this.getSuperFieldList();
    initDictConfig() {
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
        fieldList.push({type:'string',value:'workOrderCode',text:'工单号(任务号)',dictCode:''})
        fieldList.push({type:'string',value:'materialNumber',text:'物料编码',dictCode:''})
        fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''})
        fieldList.push({type:'double',value:'planQuantity',text:'计划生产数量',dictCode:''})
        fieldList.push({type:'string',value:'factoryId',text:'产线ID(冗余)',dictCode:''})
        fieldList.push({type:'string',value:'groupId',text:'班组ID',dictCode:''})
        fieldList.push({type:'string',value:'shiftId',text:'班次ID(冗余)',dictCode:''})
        fieldList.push({type:'datetime',value:'workOrderDate',text:'排产日期'})
        fieldList.push({type:'string',value:'workOrderStatus',text:'工单状态',dictCode:'work_order_status'})
        fieldList.push({type:'double',value:'actualQuantity',text:'实际报工数量',dictCode:''})
        fieldList.push({type:'string',value:'publisher',text:'发布人',dictCode:''})
        fieldList.push({type:'datetime',value:'publishTime',text:'发布时间'})
        fieldList.push({type:'string',value:'republisher',text:'重发布人',dictCode:''})
        fieldList.push({type:'datetime',value:'republishTime',text:'重发布时间'})
        this.superFieldList = fieldList
      }
    getSuperFieldList() {
      let fieldList = []
      fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' })
      fieldList.push({ type: 'string', value: 'workOrderCode', text: '工单号(任务号)', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
      fieldList.push({ type: 'double', value: 'planQuantity', text: '计划生产数量', dictCode: '' })
      fieldList.push({ type: 'string', value: 'factoryId', text: '产线ID(冗余)', dictCode: '' })
      fieldList.push({ type: 'string', value: 'groupId', text: '班组ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'shiftId', text: '班次ID(冗余)', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'workOrderDate', text: '排产日期' })
      fieldList.push({ type: 'string', value: 'workOrderStatus', text: '工单状态', dictCode: 'work_order_status' })
      fieldList.push({ type: 'double', value: 'actualQuantity', text: '实际报工数量', dictCode: '' })
      fieldList.push({ type: 'string', value: 'publisher', text: '发布人', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'publishTime', text: '发布时间' })
      fieldList.push({ type: 'string', value: 'republisher', text: '重发布人', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'republishTime', text: '重发布时间' })
      this.superFieldList = fieldList
    }
  }
}
</script>
<style scoped>
  @import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>