cuilei
昨天 010fe0e7a1b438c22c089a8de655029a497de84d
齐套性检查、上下料查询页面
已修改3个文件
234 ■■■■■ 文件已修改
src/views/mes/MesKittingCompletenessCheckList.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesMaterialLoadingListView.vue 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesProductionWorkOrderListView.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/MesKittingCompletenessCheckList.vue
@@ -5,18 +5,26 @@
      <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-tree-select dict="base_factory,factory_name,id" pid-field="parent_id"
                             v-model="queryParam.factoryId" style="width: 100%"></j-tree-select>
<!--              <j-search-select-tag placeholder="请选择产线" v-model="queryParam.factoryId" dict="base_factory,factory_name,id,del_flag=0"></j-search-select-tag>-->
            </a-form-item>
          </a-col>
          <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,del_flag=0 and work_order_status != 'NEW'"></j-search-select-tag>
            </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.materialNumber"></j-input>
              <a-input dictCode="work_order_status" placeholder="请输入物料编码" v-model="queryParam.materialNumber"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
          <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>
                <a-input dictCode="work_order_status" placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -26,15 +34,20 @@
                v-model="queryParam.checkFlag"
                allowClear
              >
                <a-select-option value="是">是</a-select-option>
                <a-select-option value="否">否</a-select-option>
                  <a-select-option value="1">是</a-select-option>
                  <a-select-option value="0">否</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          </template>
          <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>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </span>
          </a-col>
        </a-row>
@@ -43,21 +56,21 @@
    <!-- 查询区域-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>
<!--    <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>
<!--    <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-table
        ref="table"
@@ -69,7 +82,7 @@
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        :rowSelection="null"
        class="j-table-force-nowrap"
        @change="handleTableChange">
@@ -110,6 +123,10 @@
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
        <span slot="checkFlag" slot-scope="text, record">
          <span v-if="text === '0'" style="color: red">否</span>
          <span v-if="text === '1'" style="color: green">是</span>
        </span>
      </a-table>
@@ -175,16 +192,17 @@
          {
            title:'是否齐备',
            align:"center",
            dataIndex: 'checkFlag'
            dataIndex: 'checkFlag',
            scopedSlots: { customRender: 'checkFlag' }
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
          // {
          //   title: '操作',
          //   dataIndex: 'action',
          //   align:"center",
          //   fixed:"right",
          //   width:147,
          //   scopedSlots: { customRender: 'action' }
          // }
        ],
        url: {
          list: "/mes/mesKittingCompletenessCheck/list",
src/views/mes/MesMaterialLoadingListView.vue
@@ -1,9 +1,15 @@
<template>
  <a-card :bordered="false" title="上下料查询">
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <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-tree-select placeholder="请选择产线" dict="base_factory,factory_name,id" pid-field="parent_id"
                             v-model="queryParam.factoryId" style="width: 100%"></j-tree-select>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="工单号">
              <j-search-select-tag placeholder="请输入工工单号" v-model="queryParam.workOrderId"
@@ -11,31 +17,38 @@
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="设备ID">
              <j-input placeholder="请输入设备ID" v-model="queryParam.equipmentId"></j-input>
            <a-form-item label="设备">
              <j-search-select-tag placeholder="请选择设备" v-model="queryParam.equipmentId"
                                   dict="eam_equipment,equipment_name,id,del_flag=0"></j-search-select-tag>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
          <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>
              <a-input dictCode="work_order_status" placeholder="请输入物料编码"
                       v-model="queryParam.materialNumber"></a-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>
              <a-input dictCode="work_order_status" placeholder="请输入物料名称"
                       v-model="queryParam.materialName"></a-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.batchNumber"></j-input>
              <a-input placeholder="请输入批次号" v-model="queryParam.batchNumber"></a-input>
            </a-form-item>
          </a-col>
          </template>
          <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>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </span>
          </a-col>
        </a-row>
@@ -57,6 +70,7 @@
          :pagination="ipagination"
          :loading="loading"
          :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}"
          :customRow="clickSelect"
          class="j-table-force-nowrap"
          @change="handleTableChange">
@@ -103,19 +117,16 @@
      </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
          <a-table
            :ref="refKeys[0]"
            :loading="mesMaterialUnloading.loading"
            :columns="mesMaterialUnloading.columns"
            :dataSource="mesMaterialUnloading.dataSource"
            :maxHeight="300"
            :rowNumber="true"
            :rowSelection="true"
            :toolbar="false"
          />
            :pagination="false"
            :scroll="{ y: 300 }"
            size="middle"
            bordered>
          </a-table>
        </a-tab-pane>
      </a-tabs>
    </a-spin>
@@ -160,12 +171,12 @@
        {
          title: '工单号',
          align: 'center',
          dataIndex: 'workOrderId_dictText'
          dataIndex: 'workOrderCode'
        },
        {
          title: '设备ID',
          title: '设备',
          align: 'center',
          dataIndex: 'equipmentId'
          dataIndex: 'equipmentName'
        },
        {
          title: '工序编码',
@@ -202,58 +213,48 @@
          align: 'center',
          dataIndex: 'remainingQuantity'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
        // {
        //   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: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 60,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
          },
          {
            title: '物料编码',
            key: 'materialNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
            align: 'center',
            dataIndex: 'materialNumber'
          },
          {
            title: '物料名称',
            key: 'materialName',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
            align: 'center',
            dataIndex: 'materialName'
          },
          {
            title: '批次号',
            key: 'batchNumber',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
            align: 'center',
            dataIndex: 'batchNumber'
          },
          {
            title: '数量',
            key: 'quantity',
            type: JVXETypes.input,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
            align: 'center',
            dataIndex: 'quantity'
          }
        ]
      },
@@ -280,19 +281,30 @@
  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
    onSelectChange(selectedRowKeys, selectionRows) {
      this.selectedRowKeys = selectedRowKeys;
      this.selectionRows = selectionRows;
      this.selectTabData(selectedRowKeys[0])
    },
    clickSelect(record) {
      return {
        on: {
          click: () => {
            this.selectedRowKeys = [record.id]
            this.selectTabData(record.id)
      }
        }
      }
    },
    selectTabData(id) {
      this.mesMaterialUnloading.loading = true
      getAction(this.url.queryUnloadingByLoadingId, { 'loadingId': id }).then(res => {
        if (res.success) {
          this.mesMaterialUnloading.dataSource = res.result
        }
      }).finally(() => {
        this.mesMaterialUnloading.loading = false
      })
    },
    getSuperFieldList() {
      let fieldList = []
src/views/mes/MesProductionWorkOrderListView.vue
@@ -179,6 +179,10 @@
            :scroll="{ y: 300 }"
            size="middle"
            bordered>
              <span slot="checkFlag" slot-scope="text, record">
                <span v-if="text === '0'" style="color: red">否</span>
                <span v-if="text === '1'" style="color: green">是</span>
              </span>
          </a-table>
        </a-tab-pane>
      </a-tabs>
@@ -502,9 +506,7 @@
            title: '是否齐备',
            align: 'center',
            dataIndex: 'checkFlag',
            customRender: function(text) {
              return text === '0' ? '否' : text === '1' ? '是' : ''
            }
            scopedSlots: { customRender: 'checkFlag' }
          }
        ]
      },