zouyu
2024-02-23 33fc3fbb08c598afbe31437b4be42ac46f8b212f
追溯搜索修改
已修改3个文件
39 ■■■■ 文件已修改
src/api/product/producttraceability.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/ztt-remote-select.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/product/producttraceability/index.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/producttraceability.js
@@ -23,3 +23,10 @@
    params: query
  })
}
export function queryByCustomerOrderId(query) {
  return request({
    url: '/mes/trace/queryByCustomerOrderId',
    method: 'get',
    params: query
  })
}
src/views/common/ztt-remote-select.vue
@@ -6,7 +6,7 @@
      remote
      @change="changeValue"
      :disabled="isDisabled"
      placeholder="请输入"
      placeholder="请输入客户订单号"
      :remote-method="remoteMethod"
      clearable
      :loading="selectLoading"
src/views/product/producttraceability/index.vue
@@ -2,6 +2,8 @@
  <div class="product-traceability-div">
    <div class="product-traceability-hearder-div">
      <div style="width: 600px;margin-left:3px;">
        <el-row :gutter="10">
            <el-col :span="16">
        <tRemoteSelect
          v-model="systemNo"
          :columns="partColumn"
@@ -9,9 +11,17 @@
          :formatter="labelFormatter"
          :selectLoading="selectLoading"
          :valueColumn="valueColumn"
          @selectChange="changePart()"
                @selectChange="queryBatchNoData"
          @remoteSearch="queryPart"
        ></tRemoteSelect>
            </el-col>
            <el-col :span="8">
                <el-select v-model="selBatchNo" class="lmes-select" placeholder="请选择批次号">
                    <el-option :label="item" :key="index" v-for="(item,index) in selBatchNoList"></el-option>
                </el-select>
            </el-col>
        </el-row>
      </div>
      <div style="margin-left:20px;">
        <el-radio v-model="traceType" label="posite" @change="changeTraceType"
@@ -305,7 +315,7 @@
              </div>
            </div>
          </el-tab-pane>
          <el-tab-pane label="工步信息" name="工步信息">
          <!-- <el-tab-pane label="工步信息" name="工步信息">
            <div style="margin-top:10px;">
              <el-table
                ref="stepRecordTable"
@@ -330,7 +340,7 @@
                </el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          </el-tab-pane> -->
          <el-tab-pane label="检测信息" name="检测信息">
            <div style="margin-top:10px;">
              <el-tabs type="card">
@@ -975,7 +985,8 @@
import {
  queryByNo,
  queryDiagram,
  queryOperationTask
  queryOperationTask,
  queryByCustomerOrderId
} from '@/api/product/producttraceability'
import {
  getTemplateRecord,
@@ -1000,6 +1011,8 @@
      },
      selectLoading: false,
      systemNo: null,
      selBatchNo: null,
      selBatchNoList: [],
      selectedProductSystemNo: null,
      valueColumn: 'customerOrderId',
      partColumn: [
@@ -1124,6 +1137,15 @@
    this.resize()
  },
  methods: {
    queryBatchNoData(){
        queryByCustomerOrderId({customerOrderId : this.systemNo}).then(res=>{
            if(res.status===200){
                this.selBatchNoList = res.data.data
            }
        }).catch(error=>{
            console.error(error)
        })
    },
    // 加载浏览器窗口变化自适应
    resize() {
      window.addEventListener('resize', () => {