yyb
13 小时以前 eb61b0a4640f75f3f395d40d252aedc05cbc8828
pages/product/WorkshopOrderIssued/comp.vue
@@ -1,44 +1,18 @@
<template>
  <view class="page">
    <view class="finishProductIn-locno-bg" />
    <u-navbar
      title="车间订单物料"
      :background="background"
      :border-bottom="false"
      :title-bold="true"
      title-color="#000"
      back-icon-color="#000"
    />
      <u-navbar title="车间订单物料" :background="background" :border-bottom="false" :title-bold="true" title-color="#000"
         back-icon-color="#000" />
    <view class="finishProductIn-locno-search">
      <u-search
        v-model="keywords"
        shape="square"
        bg-color="rgba(250,252,255,0.36)"
        :show-action="false"
        placeholder="请输入零件号"
        @clear="search"
        @custom="search"
        @search="search"
      >
         <u-search v-model="keywords" shape="square" bg-color="rgba(250,252,255,0.36)" :show-action="false"
            placeholder="请输入零件号" @clear="search" @custom="search" @search="search" @input="search">
      </u-search>
    </view>
    <view class="wrap">
      <scroll-view
        class="finishProductIn-locno-scroll-list"
        scroll-y="true"
        @scrolltolower="getmoreList()"
      >
        <u-cell-group
          class="finishProductIn-locno-scroll-list-group"
          :border="false"
        >
          <view
            class="content"
            v-for="(item, index) in list"
            :key="item.locNo"
            :index="index"
            @click="selectNo(item)"
          >
         <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true" @scrolltolower="getmoreList()">
            <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false">
               <view class="content" v-for="(item, index) in list" :key="item.locNo" :index="index"
                  @click="selectNo(item)">
            <view class="content-header">
              <view class="content-header-title">{{ item.index }}</view>
            </view>
@@ -101,11 +75,7 @@
          </view>
        </u-cell-group>
        <view class="loadmore" @click="getmoreList()">
          <u-loadmore
            :status="status"
            :load-text="loadText"
            @loadmore="getmoreList()"
          />
               <u-loadmore :status="status" :load-text="loadText" @loadmore="getmoreList()" />
        </view>
      </scroll-view>
    </view>
@@ -133,12 +103,11 @@
        loading: "努力加载中...",
        nomore: "没有更多了",
      },
     id:''
            operationTaskId: ''
    };
  },
  onLoad(options) {
     console.log('22@@', options);
this.id = JSON.parse(decodeURIComponent(options.id))
         this.operationTaskId = JSON.parse(decodeURIComponent(options.operationTaskId))
    this.getlist();
   },
  methods: {
@@ -154,14 +123,14 @@
      }, 1000);
    },
    getlist() {
      this.$u.api.WorkshopOrderIssued.manufacturingOrder({
            this.$u.api.WorkshopOrderIssued.getMoMaterial({
        current: this.pageNum,
        size: this.pageSize, 
      id:this.id
               operationTaskId: this.operationTaskId
      }).then((res) => {
        console.log("res", res);
        this.list = res.data.bomRoot.children;
        this.total = res.data.bomRoot.children.length + 1;
               this.list = res.data;
               this.total = res.data.length + 1;
        if (this.pageSize >= this.total) {
          this.status = "nomore";
        } else {
@@ -174,15 +143,16 @@
      if (value) {
        this.list = [];
        this.pageSize = 10;
        this.$u.api.workReporting
          ._({
               this.$u.api.WorkshopOrderIssued
                  .getMoMaterial({
            current: this.pageNum,
            size: this.pageSize,
            moNo: value,
                     partNo: value,
                     operationTaskId: this.operationTaskId
          })
          .then((res) => {
            console.log("res", res);
            this.list = res.data.records;
                     this.list = res.data;
            this.total = res.data.total;
            if (this.pageSize >= this.total) {
              this.status = "nomore";