Przeglądaj źródła

修改PDA委外流程

695593266@qq.com 8 miesięcy temu
rodzic
commit
af4387595e

+ 2 - 2
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "v1.0.3.3",
+    "versionName" : "v1.0.3.4",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -10,7 +10,7 @@
             "proxy" : {
                 "/api" : {
                     // "target" : "http://192.168.1.110:18086/",
-                    "target" : "http://192.168.1.251:18086/",
+                    "target" : "http://192.168.1.125:18086/",
                     "changeOrigin" : true,
                     "secure" : false,
                     "pathRewrite" : {

+ 61 - 31
pages/pda/components/bottomOperate.vue

@@ -126,21 +126,21 @@
               />
             </u-form-item>
 
-            <u-form-item label="委外到:" borderBottom prop="taskIds">
+            <u-form-item label="委外工序:" borderBottom prop="taskIdes">
               <zxz-uni-data-select
                 :localdata="newStepsList"
                 style="font-size: 15px"
-                v-model="outsourceForm.taskIds"
+                v-model="outsourceForm.taskIdes"
                 dataValue="taskId"
                 format="{taskTypeName}"
-                dataKey="taskId"
-                filterable
+                dataKey="taskTypeName"
+                multiple
                 :clear="true"
                 @change="changeTaskId"
               ></zxz-uni-data-select>
             </u-form-item>
 
-            <u-form-item label="委外场景:" borderBottom prop="taskIds">
+            <u-form-item label="委外场景:" borderBottom prop="taskIdes">
               {{ sceneText }}
             </u-form-item>
 
@@ -743,27 +743,35 @@ export default {
     //委外到 类型选择
     changeTaskId(e) {
       console.log(this.outsourceForm, e);
-      if (this.newStepsList.length) {
-        const id = this.newStepsList[0].sourceTaskId;
-        //isFirstTask 1是首工序 0不是
-        if (this.outsourceForm.isFirstTask) {
-          this.sceneText = "首工序";
-          this.outsourceForm.outsourceScene = 1;
-          if (e.sourceTaskId !== id) {
-            this.sceneText = "首工序及多工序";
-            this.outsourceForm.outsourceScene = 4;
-          }
+      // if (this.newStepsList.length) {
+      if (this.outsourceForm.taskIdes.length != 0) {
+        if (this.outsourceForm.taskIdes.length == 1) {
+          this.sceneText = "单工序";
+          this.outsourceForm.outsourceScene = 2;
         } else {
-          if (e.sourceTaskId === id) {
-            // 单工序
-            this.sceneText = "单工序";
-            this.outsourceForm.outsourceScene = 2;
-          } else {
-            //多工序
-            this.sceneText = "多工序";
-            this.outsourceForm.outsourceScene = 3;
-          }
+          this.sceneText = "多工序";
+          this.outsourceForm.outsourceScene = 3;
         }
+        // const id = this.newStepsList[0].sourceTaskId;
+        // //isFirstTask 1是首工序 0不是
+        // if (this.outsourceForm.isFirstTask) {
+        //   this.sceneText = "首工序";
+        //   this.outsourceForm.outsourceScene = 1;
+        //   if (e.sourceTaskId !== id) {
+        //     this.sceneText = "首工序及多工序";
+        //     this.outsourceForm.outsourceScene = 4;
+        //   }
+        // } else {
+        //   if (e.sourceTaskId === id) {
+        //     // 单工序
+        //     this.sceneText = "单工序";
+        //     this.outsourceForm.outsourceScene = 2;
+        //   } else {
+        //     //多工序
+        //     this.sceneText = "多工序";
+        //     this.outsourceForm.outsourceScene = 3;
+        //   }
+        // }
       } else {
         uni.showToast({
           title: "委外到工序为空",
@@ -831,6 +839,7 @@ export default {
           ...res,
         };
         this.outsourceForm.name = this.taskObj.currentTaskName + "委外";
+        this.outsourceForm.taskIdes = [];
 
         if (res.outsource) {
           this.getNewSteps();
@@ -908,13 +917,14 @@ export default {
 
       this.newStepsList = [];
       this.stepsList.forEach((f, i) => {
-        if (
-          f.taskId != "-1" &&
-          f.taskId != "-2" &&
-          i > this.activeIndex &&
-          (f.type == 1 || f.type == 4)
-        ) {
-          this.newStepsList.push(f);
+        if (f.taskId != "-2" && i >= this.activeIndex) {
+          if (this.clientEnvironmentId == 3) {
+            if (f.type != 6) {
+              this.newStepsList.push(f);
+            }
+          } else {
+            this.newStepsList.push(f);
+          }
         }
       });
     },
@@ -969,6 +979,22 @@ export default {
         return false;
       }
 
+      if (!this.outsourceForm.formedNumLast) {
+        uni.showToast({
+          title: "委外数量不能为空",
+          icon: "none",
+        });
+        return false;
+      }
+
+      if (this.outsourceForm.taskIdes.length == 0) {
+        uni.showToast({
+          title: "请选择委外工序",
+          icon: "none",
+        });
+        return false;
+      }
+
       if (!this.outsourceForm.requireDeliveryTime) {
         uni.showToast({
           title: "请选择委外完成时间",
@@ -988,13 +1014,17 @@ export default {
           this.outsourceForm.requireDeliveryTime + "00:00:00";
       }
 
+      const taskIds = this.outsourceForm.taskIdes.join(",");
+
       let param = {
         ...this.outsourceForm,
         taskId: this.newTaskObj.currentTaskId,
         workOrderId: this.newTaskObj.workOrderId,
+        taskIds,
       };
 
       console.log(param);
+
       this.sceneText = ""; //委外场景
       this.outsourceForm.outsourceScene = null;
       this.$refs.outsourceListRef.open(param);

+ 184 - 33
pages/pda/components/outsourceList.vue

@@ -44,6 +44,18 @@
       <view class="box_list">
         <u-list @scrolltolower="scrolltolower" class="z_list">
           <view v-if="actTab == '物品清单'">
+            <view class="title_box rx-bc" v-if="clientEnvironmentId == '3'">
+              <view></view>
+              <view class="right_box rx-ec">
+                <u-button
+                  type="success"
+                  size="small"
+                  class="u-reset-button"
+                  @click="addPicking(2, 'goods')"
+                  text="添加"
+                ></u-button>
+              </view>
+            </view>
             <view
               class="rx-bc"
               v-if="outObj.isStraight != 1 && clientEnvironmentId != 2"
@@ -150,29 +162,36 @@
                       {{ item.unit }}
                     </view>
 
-                    <view
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
                           Number(item.rootCategoryLevelId)
-                        ) && item.isConsumable == 0
+                        ) && item.isConsumable == 1
                       "
                     >
-                      <text>刻码</text>{{ item.extInfo.engrave }}
-                    </view>
+                      <text>规格</text> {{ item.specification }}
+                    </view> -->
+                    <!-- <view class="items">
+                      <text>规格</text> {{ item.specification }}
+                    </view> -->
 
-                    <view
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
                           Number(item.rootCategoryLevelId)
-                        ) && item.isConsumable == 0
+                        ) && item.isConsumable == 1
                       "
                     >
-                      <text>物料代号</text>{{ item.extInfo.materielCode }}
+                      <text>型号</text> {{ item.modelType }}
+                    </view> -->
+
+                    <view class="items">
+                      <text>型号</text> {{ item.modelType }}
                     </view>
 
-                    <view
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
@@ -180,10 +199,13 @@
                         ) && item.isConsumable == 0
                       "
                     >
-                      <text>客户代号</text>{{ item.extInfo.clientCode }}
+                      <text>刻码</text>{{ item.extInfo.engrave }}
+                    </view> -->
+                    <view class="items">
+                      <text>刻码</text>{{ item.extInfo.engrave }}
                     </view>
 
-                    <view
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
@@ -191,34 +213,45 @@
                         ) && item.isConsumable == 0
                       "
                     >
-                      <text>重量</text>{{ item.extInfo.newWeight }}
-                      {{ item.extInfo.weightUnit }}
+                      <text>物料代号</text>{{ item.extInfo.materielCode }}
+                    </view> -->
+                    <view class="items">
+                      <text>物料代号</text>{{ item.extInfo.materielCode }}
                     </view>
 
-                    <view
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
                           Number(item.rootCategoryLevelId)
-                        ) && item.isConsumable == 1
+                        ) && item.isConsumable == 0
                       "
                     >
-                      <text>数量</text>{{ item.feedQuantity }}
-                    </view>
+                      <text>客户代号</text>{{ item.extInfo.clientCode }}
+                    </view> -->
 
-                    <view
+                    <!-- <view class="items">
+                      <text>客户代号</text>{{ item.extInfo.clientCode }}
+                    </view> -->
+
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
                           Number(item.rootCategoryLevelId)
-                        ) && item.isConsumable == 1
+                        ) && item.isConsumable == 0
                       "
                     >
-                      <text>重量</text>{{ item.weight || 0 }}
-                      {{ item.weightUnit }}
+                      <text>重量</text>{{ item.extInfo.newWeight }}
+                      {{ item.extInfo.weightUnit }}
+                    </view> -->
+
+                    <view class="items">
+                      <text>重量</text>{{ item.extInfo.newWeight }}
+                      {{ item.extInfo.weightUnit }}
                     </view>
 
-                    <view
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
@@ -226,10 +259,29 @@
                         ) && item.isConsumable == 1
                       "
                     >
-                      <text>规格</text> {{ item.specification }}
+                      <text>数量</text>{{ item.feedQuantity }}
+                    </view> -->
+                    <view class="items content_num">
+                      <text>数量</text>
+                      <input
+                        v-if="item.isSelection == '1'"
+                        v-model="item.feedQuantity"
+                        style="width: 80px"
+                      />
+                      <span v-else>{{ item.feedQuantity }}</span>
                     </view>
 
-                    <view
+                    <view class="items">
+                      <text>操作</text>
+
+                      <span
+                        style="margin-left: 5px; color: red"
+                        @click="deletePick(index)"
+                        >删除</span
+                      >
+                    </view>
+
+                    <!-- <view
                       class="items"
                       v-if="
                         [1, 2, 9, 23].includes(
@@ -237,8 +289,9 @@
                         ) && item.isConsumable == 1
                       "
                     >
-                      <text>型号</text> {{ item.modelType }}
-                    </view>
+                      <text>重量</text>{{ item.weight || 0 }}
+                      {{ item.weightUnit }}
+                    </view> -->
                   </view>
                 </view>
               </label>
@@ -253,7 +306,7 @@
                   type="success"
                   size="small"
                   class="u-reset-button"
-                  @click="addPicking(2)"
+                  @click="addPicking(2, 'belting')"
                   text="添加"
                 ></u-button>
               </view>
@@ -301,7 +354,7 @@
                     >
                       <text>数量</text>
                       <input
-                        style="8px !important"
+                        style="width: 80px"
                         v-model="item.demandQuantity"
                       />
                     </view>
@@ -319,10 +372,26 @@
                     >
                       <text>数量</text>
                       <input
-                        style="8rpx !important"
+                        style="width: 80px"
                         v-model="item.demandQuantity"
                       />
                     </view>
+
+                    <view class="items">
+                      <text>操作</text>
+                      <span
+                        style="margin-left: 5px; color: blue"
+                        @click="convertList(item, index)"
+                        v-if="clientEnvironmentId == 3"
+                        >转物品清单</span
+                      >
+
+                      <span
+                        style="margin-left: 5px; color: red"
+                        @click="deleteMaterial(index)"
+                        >删除</span
+                      >
+                    </view>
                   </view>
                 </view>
               </label>
@@ -333,13 +402,13 @@
             <view class="title_box rx-bc">
               <view></view>
               <view class="right_box rx-ec">
-                <u-button
+                <!-- <u-button
                   type="success"
                   size="small"
                   class="u-reset-button"
                   @click="addPicking(3)"
                   text="添加"
-                ></u-button>
+                ></u-button> -->
               </view>
             </view>
 
@@ -372,10 +441,19 @@
                     <view class="items content_num">
                       <text>数量</text>
                       <input
-                        style="8rpx !important"
                         v-model="item.demandQuantity"
+                        style="width: 80px"
                       />
                     </view>
+
+                    <view class="items">
+                      <text>操作</text>
+                      <span
+                        style="margin-left: 5px; color: red"
+                        @click="deleteOutput(index)"
+                        >删除</span
+                      >
+                    </view>
                   </view>
                 </view>
               </label>
@@ -457,10 +535,16 @@ export default {
       checkListLen: 0,
 
       warehouseList: [],
+      addPickType: "",
     };
   },
 
   created() {
+    // EventBus.$on("outEvent", this.handleEvent);
+  },
+
+  mounted() {
+    console.log("1234");
     EventBus.$on("outEvent", this.handleEvent);
   },
 
@@ -528,7 +612,28 @@ export default {
         ];
       } else {
         if (message.pid == 2) {
-          this.bomMaterialList = message.memoList;
+          if (this.addPickType == "goods") {
+            if (message.memoList.length != 0) {
+              message.memoList.map((it) => {
+                it.isSelection = "1";
+                it.categoryCode = it.code;
+                it.feedQuantity = 1;
+                it.categoryId = it.id;
+                it.newWeight = it.weight;
+                this.pickOutInList.push(this.deepCopy(it));
+              });
+              this._seletedAll();
+              this.$forceUpdate();
+            }
+          } else if (this.addPickType == "belting") {
+            if (message.memoList.length != 0) {
+              message.memoList.map((v) => {
+                this.bomMaterialList.push(v);
+              });
+              this.$forceUpdate();
+            }
+            // this.bomMaterialList = message.memoList;
+          }
           // console.log(this.bomMaterialList,'1111111111');
           // return
         }
@@ -567,7 +672,53 @@ export default {
 
     scrolltolower() {},
 
-    addPicking(id) {
+    deleteOutput(index) {
+      this.standardOutputList.splice(index, 1);
+      this.$forceUpdate();
+    },
+
+    deleteMaterial(index) {
+      this.bomMaterialList.splice(index, 1);
+      this.$forceUpdate();
+    },
+
+    deletePick(index) {
+      this.pickOutInList.splice(index, 1);
+      this._seletedAll();
+      this.$forceUpdate();
+    },
+
+    convertList(item, index) {
+      // console.log(item, index);
+      item.categoryCode = item.code;
+      item.feedQuantity = item.demandQuantity;
+      item.isSelection = "1";
+      item.categoryId = item.id;
+      item.newWeight = item.weight;
+      this.pickOutInList.push(this.deepCopy(item));
+      this.bomMaterialList.splice(index, 1);
+      this._seletedAll();
+      this.$forceUpdate();
+    },
+
+    deepCopy(obj, hash = new WeakMap()) {
+      if (obj === null) return null;
+      if (obj instanceof Date) return new Date(obj);
+      if (obj instanceof RegExp) return new RegExp(obj);
+      if (typeof obj !== "object" && typeof obj !== "function") return obj;
+      if (hash.has(obj)) return hash.get(obj);
+
+      const result = Array.isArray(obj) ? [] : {};
+      hash.set(obj, result);
+
+      return Object.keys(obj).reduce((acc, key) => {
+        acc[key] = this.deepCopy(obj[key], hash);
+        return acc;
+      }, result);
+    },
+
+    addPicking(id, type) {
+      this.addPickType = type;
       const storageKey = Date.now() + "";
       let arr = null;
       if (id == 3) {

+ 857 - 806
pages/pda/workOrder/search/index.vue

@@ -1,816 +1,867 @@
 <template>
-	<view class="content-box">
-
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="搜索" @clickLeft="back">
-			<!--右菜单-->
-			<template slot="right">
-				<u-button type="success" size="small" class="u-reset-button" @click="openTreePicker"
-					text="选择分类"></u-button>
-			</template>
-		</uni-nav-bar>
-
-
-		<view class="top-wrapper">
-			<view class="searchBox rx-bc">
-				<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
-
-				<view class="rx-sc">
-					<image class="menu_icon" src="~@/static/pda/menu.svg" @click="handleSearch"></image>
-					<u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
-					</u-button>
-				</view>
-
-			</view>
-		</view>
-
-		<view class="list_box">
-			<u-list @scrolltolower="scrolltolower">
-
-
-				<checkbox-group v-for="(item, index) in list" :key="index" @change="e => selectVal(e, item, index)">
-					<label class="listBox rx-bs">
-
-						<view class="listBox-sel">
-							<checkbox
-								v-if=' (item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1))'
-								:value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" />
-						</view>
-
-						<view class="listBox-con">
-							<view class="listBox-top rx-bc">
-								<view> {{ item.name }}</view>
-								<view class="code">{{ item.rootCategoryLevelId == 4 ?  item.codeNumber :  item.code}}
-								</view>
-							</view>
-
-							<view class="listBox-bottom rx">
-								<view v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index"
-									class="items" v-if="!itm.formatter">
-									<text>{{ itm.label }}</text>{{ item[itm.prop] }}
-								</view>
-
-
-
-
-								<view class="items"
-									v-if='(item.rootCategoryLevelId == 1 && item.isConsumable == 1) &&  item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 4 '>
-									<text>可用库存</text>{{ item.availableCountBase }} {{item.unit}}
-								</view>
-
-
-								<view class="items"
-									v-if='([1,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
-									<text>刻码</text>{{item.extInfo.engrave }}
-								</view>
-
-
-								<view class="items"
-									v-if='([1,9,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
-									<text>物料代号</text>{{item.extInfo.materielCode }}
-								</view>
-
-
-								<view class="items"
-									v-if='([1,23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0) '>
-									<text>客户代号</text>{{item.extInfo.clientCode }}
-								</view>
-
-
-
-
-								<view class="items" v-if=' item.rootCategoryLevelId == 4 '>
-									<text>状态</text>{{ stateList[Number(item.runStatus)] }}
-								</view>
-
-
-								<view class="items" v-if='[1, 23, 8].includes(Number(item.rootCategoryLevelId))'>
-									<text>包装库存</text>{{ item.packingCountBase }} {{item.minUnit}}
-								</view>
-								
-								<view class="items" v-if='item.rootCategoryLevelId == 1 ||  item.rootCategoryLevelId == 9 || item.rootCategoryLevelId == 23'>
-									<text>计量库存数量</text>{{ item.availableCountBase }} {{item.measuringUnit}}
-								</view>
-								
-
-								<view class="items" v-if='item.rootCategoryLevelId == 11'>
-									<text
-										:style="{ color:  item.status == 0 ? '#157A2C' :'#FFA929' }">状态{{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</text>
-								</view>
-
-
-
-
-								<view class="items" v-if='item.rootCategoryLevelId == 11'>
-									<text>位置</text>{{ item.region }}
-								</view>
-
-
-
-
-							</view>
-
-						</view>
-
-
-					</label>
-
-				</checkbox-group>
-
-
-
-				<view v-if='list.length == 0' style='margin-top: 20vh;'>
-					<u-empty iconSize='150' textSize='32' text='暂无数据'>
-					</u-empty>
-				</view>
-
-			</u-list>
-
-
-
-		</view>
-
-
-		<view class="bottom-wrapper rx-bc">
-			<view>
-				<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
-				<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
-				</checkbox>
-			</view>
-			<view>
-
-				<u-button  type="success" size="small" class="u-reset-button"
-					:disabled="!checkListLen" @click="jumpAdd(1)">
-					<view> 选择( {{ checkListLen }} ) </view>
-				</u-button>
-
-			<!-- 	<u-button v-if='rootCategoryLevelId == 23' type="success" size="small" class="u-reset-button"
+  <view class="content-box">
+    <uni-nav-bar
+      fixed="true"
+      statusBar="true"
+      left-icon="back"
+      title="搜索"
+      @clickLeft="back"
+    >
+      <!--右菜单-->
+      <template slot="right">
+        <u-button
+          type="success"
+          size="small"
+          class="u-reset-button"
+          @click="openTreePicker"
+          text="选择分类"
+        ></u-button>
+      </template>
+    </uni-nav-bar>
+
+    <view class="top-wrapper">
+      <view class="searchBox rx-bc">
+        <input
+          v-model="keyWord"
+          placeholder="请输入关键字搜索"
+          class="searchInput"
+        />
+
+        <view class="rx-sc">
+          <image
+            class="menu_icon"
+            src="~@/static/pda/menu.svg"
+            @click="handleSearch"
+          ></image>
+          <u-button
+            @click="doSearch"
+            type="success"
+            size="small"
+            class="u-reset-button"
+            text="搜索"
+          >
+          </u-button>
+        </view>
+      </view>
+    </view>
+
+    <view class="list_box">
+      <u-list @scrolltolower="scrolltolower">
+        <checkbox-group
+          v-for="(item, index) in list"
+          :key="index"
+          @change="(e) => selectVal(e, item, index)"
+        >
+          <label class="listBox rx-bs">
+            <view class="listBox-sel">
+              <checkbox
+                v-if="
+                  item.rootCategoryLevelId != 11 ||
+                  (item.rootCategoryLevelId == 11 && item.status != 1)
+                "
+                :value="item.code"
+                color="#fff"
+                :disabled="item.disabled"
+                :checked="item.checked"
+              />
+            </view>
+
+            <view class="listBox-con">
+              <view class="listBox-top rx-bc">
+                <view> {{ item.name }}</view>
+                <view class="code"
+                  >{{
+                    item.rootCategoryLevelId == 4 ? item.codeNumber : item.code
+                  }}
+                </view>
+              </view>
+
+              <view class="listBox-bottom rx">
+                <view
+                  v-for="(itm, index) in tableH(item.rootCategoryLevelId)"
+                  :key="index"
+                  class="items"
+                  v-if="!itm.formatter"
+                >
+                  <text>{{ itm.label }}</text
+                  >{{ item[itm.prop] }}
+                </view>
+
+                <view
+                  class="items"
+                  v-if="
+                    item.rootCategoryLevelId == 1 &&
+                    item.isConsumable == 1 &&
+                    item.rootCategoryLevelId != 11 &&
+                    item.rootCategoryLevelId != 4
+                  "
+                >
+                  <text>可用库存</text>{{ item.availableCountBase }}
+                  {{ item.unit }}
+                </view>
+
+                <view
+                  class="items"
+                  v-if="
+                    [1, 9, 23].includes(Number(item.rootCategoryLevelId)) &&
+                    item.isConsumable == 0
+                  "
+                >
+                  <text>刻码</text>{{ item.extInfo.engrave }}
+                </view>
+
+                <view
+                  class="items"
+                  v-if="
+                    [1, 9, 23].includes(Number(item.rootCategoryLevelId)) &&
+                    item.isConsumable == 0
+                  "
+                >
+                  <text>物料代号</text>{{ item.extInfo.materielCode }}
+                </view>
+
+                <view
+                  class="items"
+                  v-if="
+                    [1, 23].includes(Number(item.rootCategoryLevelId)) &&
+                    item.isConsumable == 0
+                  "
+                >
+                  <text>客户代号</text>{{ item.extInfo.clientCode }}
+                </view>
+
+                <view class="items" v-if="item.rootCategoryLevelId == 4">
+                  <text>状态</text>{{ stateList[Number(item.runStatus)] }}
+                </view>
+
+                <view
+                  class="items"
+                  v-if="[1, 23, 8].includes(Number(item.rootCategoryLevelId))"
+                >
+                  <text>包装库存</text>{{ item.packingCountBase }}
+                  {{ item.minUnit }}
+                </view>
+
+                <view
+                  class="items"
+                  v-if="
+                    item.rootCategoryLevelId == 1 ||
+                    item.rootCategoryLevelId == 9 ||
+                    item.rootCategoryLevelId == 23
+                  "
+                >
+                  <text>计量库存数量</text>{{ item.availableCountBase }}
+                  {{ item.measuringUnit }}
+                </view>
+
+                <view class="items" v-if="item.rootCategoryLevelId == 11">
+                  <text
+                    :style="{ color: item.status == 0 ? '#157A2C' : '#FFA929' }"
+                    >状态{{
+                      item.status == 0 ? "空闲" : item.status == 1 ? "占用" : ""
+                    }}</text
+                  >
+                </view>
+
+                <view class="items" v-if="item.rootCategoryLevelId == 11">
+                  <text>位置</text>{{ item.region }}
+                </view>
+              </view>
+            </view>
+          </label>
+        </checkbox-group>
+
+        <view v-if="list.length == 0" style="margin-top: 20vh">
+          <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
+        </view>
+      </u-list>
+    </view>
+
+    <view class="bottom-wrapper rx-bc">
+      <view>
+        <checkbox
+          v-if="!seletedAll"
+          color="#fff"
+          :checked="seletedAll"
+          @tap="_seletedAll"
+          >全选</checkbox
+        >
+        <checkbox
+          class="select-all"
+          color="#fff"
+          v-else
+          :checked="seletedAll"
+          @tap="_seletedAll"
+          >取消全选
+        </checkbox>
+      </view>
+      <view>
+        <u-button
+          type="success"
+          size="small"
+          class="u-reset-button"
+          :disabled="!checkListLen"
+          @click="jumpAdd(1)"
+        >
+          <view> 选择( {{ checkListLen }} ) </view>
+        </u-button>
+
+        <!-- 	<u-button v-if='rootCategoryLevelId == 23' type="success" size="small" class="u-reset-button"
 					@click="jumpAdd(2)">
 					<view> 确认 </view>
 				</u-button> -->
-
-			</view>
-		</view>
-
-
-
-
-		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
-			:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
-
-
-
-		<SearchPopup mode="top" v-if='searchShow'>
-			<template v-slot:list>
-				<view class="search_list">
-
-
-					<u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
-
-						<u-form-item label="仓库:" class="required-form" borderBottom prop="warehouseId">
-
-							<zxz-uni-data-select :localdata="warehouseList" v-model="formData.warehouseId"
-								dataValue='id' format='{name}' dataKey="name" filterable></zxz-uni-data-select>
-						</u-form-item>
-
-
-						<u-form-item label="维度:" v-if="isType == 'feed'" class="required-form" borderBottom
-							prop="warehouseId">
-
-							<zxz-uni-data-select :localdata="dimensionList" v-model="formData.dimension" dataValue='id'
-								format='{name}' dataKey="name" filterable></zxz-uni-data-select>
-						</u-form-item>
-
-
-
-
-
-
-
-
-
-
-					</u-form>
-
-				</view>
-			</template>
-
-			<template v-slot:operate>
-				<view class="operate_box rx-bc">
-					<u-button size="small" class="u-reset-button" @click="searchCancel">
-						重置
-					</u-button>
-
-
-					<u-button type="success" size="small" class="u-reset-button" @click="doSearch">
-						确定
-					</u-button>
-
-				</view>
-			</template>
-
-		</SearchPopup>
-
-	</view>
+      </view>
+    </view>
+
+    <ba-tree-picker
+      ref="treePicker"
+      key="verify"
+      :multiple="false"
+      @select-change="confirm"
+      title="选择分类"
+      :localdata="classificationList"
+      valueKey="id"
+      textKey="name"
+      childrenKey="children"
+    />
+
+    <SearchPopup mode="top" v-if="searchShow">
+      <template v-slot:list>
+        <view class="search_list">
+          <u-form
+            labelPosition="left"
+            :model="formData"
+            labelWidth="180"
+            labelAlign="left"
+            class="baseForm"
+          >
+            <u-form-item
+              label="仓库:"
+              class="required-form"
+              borderBottom
+              prop="warehouseId"
+            >
+              <zxz-uni-data-select
+                :localdata="warehouseList"
+                v-model="formData.warehouseId"
+                dataValue="id"
+                format="{name}"
+                dataKey="name"
+                filterable
+              ></zxz-uni-data-select>
+            </u-form-item>
+
+            <u-form-item
+              label="维度:"
+              v-if="isType == 'feed'"
+              class="required-form"
+              borderBottom
+              prop="warehouseId"
+            >
+              <zxz-uni-data-select
+                :localdata="dimensionList"
+                v-model="formData.dimension"
+                dataValue="id"
+                format="{name}"
+                dataKey="name"
+                filterable
+              ></zxz-uni-data-select>
+            </u-form-item>
+          </u-form>
+        </view>
+      </template>
+
+      <template v-slot:operate>
+        <view class="operate_box rx-bc">
+          <u-button size="small" class="u-reset-button" @click="searchCancel">
+            重置
+          </u-button>
+
+          <u-button
+            type="success"
+            size="small"
+            class="u-reset-button"
+            @click="doSearch"
+          >
+            确定
+          </u-button>
+        </view>
+      </template>
+    </SearchPopup>
+  </view>
 </template>
 
 <script>
-	import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
-	import {
-		tableHeader
-	} from '../../common.js'
-	import {
-		treeByPid,
-		pageeLedgerMain,
-		assetPage,
-		getWarehouseList,
-		getInventoryDetails,
-		getMaterielDetails,
-		listInProduct,
-		listOutsourceInWarehouse,
-		outsourceEndPick,
-		categoryGetList,
-		assetPdaPage
-	} from '@/api/pda/workOrder.js'
-
-
-	import SearchPopup from '../../components/searchPopup.vue'
-	
-	import { EventBus } from '@/utils/eventBus.js'
-
-
-	let [isEnd] = [false]
-	export default {
-		components: {
-			baTreePicker,
-			SearchPopup
-		},
-		data() {
-			return {
-
-				keyWord: null,
-				rootCategoryLevelId: null,
-				categoryLevelId: null,
-				classificationList: [],
-				treePickerShow: false,
-				list: [],
-				page: 1,
-
-
-				seletedAll: false, //全选状态
-				memoList: [],
-
-				isType: null,
-				taskId: null,
-
-				pid: null, // 上个页面id
-				storageKey: null,
-
-				formData: {
-					produceRoutingId: '',
-					dimension: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
-						.clientEnvironmentId == 3 ? 4 : 3
-				},
-				warehouseList: [],
-
-				searchShow: false,
-
-				stateList: ['启动', '空闲', '运行', '故障', '检修', '停机', '待料', '占用'],
-				classIds: [],
-
-
-				dimensionList: [{
-						id: 3,
-						name: '包装维度'
-					},
-					{
-						id: 4,
-						name: '物料维度'
-					}
-				],
-
-
-				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
-					.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
-
-
-
-			}
-		},
-
-		//选择的列表长度
-		computed: {
-			checkListLen() {
-				return this.memoList.length
-			}
-
-		},
-
-		onLoad(option) {
-			
-			this.pid = option.id
-			this.classIds = option.classIds || [];
-
-			this.isType = option.isType
-			if (option.taskId == 'undefined') {
-				this.taskId = null
-			} else {
-				this.taskId = option.taskId || null
-			}
-			if (Object.prototype.hasOwnProperty.call(option, 'classIds')) {
-				this.classIds = option.classIds
-			}
-			
-			if (option.storageKey) {
-				this.storageKey = option.storageKey
-
-				this.memoList = []
-
-				if (this.isType == 'feed') {
-					let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
-					this.memoList = [..._arr[0].modelList, ..._arr[0].equipmentList, ..._arr[0].instanceList, ..._arr[0]
-						.aridRegionList, ..._arr[0].turnover, ..._arr[0].palletList, ..._arr[0].revolvingDiskList, ...
-						_arr[0].semiProductList
-					]
-
-
-
-				} else if (this.isType == 'pick') {
-					this.memoList = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
-				} else if (this.isType == 'job') {
-					let _obj = (this.storageKey && uni.getStorageSync(this.storageKey)) || {}
-
-					if (Object.prototype.hasOwnProperty.call(_obj, 'turnover')) {
-						this.memoList = this.memoList.concat(_obj.turnover)
-					} else if (Object.prototype.hasOwnProperty.call(_obj, 'equipmentList')) {
-						this.memoList = this.memoList.concat(_obj.equipmentList)
-					}
-
-				} else if (this.isType == 'zdy') {
-					let _arr = (this.storageKey && uni.getStorageSync(this.storageKey)) || []
-					
-				
- 
-					if (_arr.length != 0 && Object.prototype.hasOwnProperty.call(_arr[0], 'turnover')) {
-						this.memoList = this.memoList.concat(_arr[0].turnover)
-					} else if (_arr.length != 0 && Object.prototype.hasOwnProperty.call(_arr[0], 'equipmentList')) {
-						this.memoList = this.memoList.concat(_arr[0].equipmentList)
-					} else if (_arr.length != 0 && Object.prototype.hasOwnProperty.call(_arr[0], 'standardOutputList')) {
-						this.memoList = this.memoList.concat(_arr[0].standardOutputList)
-					} else if (_arr.length != 0 && Object.prototype.hasOwnProperty.call(_arr[0], 'bomMaterialList')) {
-						this.memoList = this.memoList.concat(_arr[0].bomMaterialList)
-					} 
-					
-					
-
-				}
-
-
-
-			}
-
-			this.getTreeList()
-
-			this.getWarehouseFn()
-		},
-
-		onUnload() {
-			if (this.storageKey) {
-				uni.removeStorage(this.storageKey)
-			}
-
-		},
-
-
-
-		methods: {
-			_seletedAll() {
-
-				if (!this.seletedAll) {
-					this.seletedAll = true
-
-					this.list.map(item => {
-						this.$set(item, 'checked', true)
-						const idx = this.memoList.findIndex(itm => itm.id === item.id)
-						if (idx === -1) {
-							this.memoList.push(item)
-						}
-					})
-
-
-
-				} else {
-					this.seletedAll = false
-					this.list.map(item => {
-						this.$set(item, 'checked', false)
-
-						const idx = this.memoList.findIndex(itm => itm.id === item.id)
-						if (idx > -1) {
-							this.memoList.splice(idx, 1)
-						}
-
-					})
-				}
-			},
-
-			openTreePicker() {
-				this.$refs.treePicker._show()
-
-			},
-			tableH(type) {
-				return tableHeader(type)
-			},
-
-			getTreeList() {
-				let params = {}
-				console.log(this.classIds,'option',this.isType);
-				if (this.isType == 'feed') {
-					params.ids = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 28]
-				} else if (this.isType == 'pick') {
-					// params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28]
-					params.ids =[9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22]
-				} else if (this.isType == 'job') {
-					params['ids'] = [4, 7]
-				} else if (this.isType == 'zdy') {
-					params['ids'] = JSON.parse(this.classIds);
-				} else if (this.isType == 'weiwai') {
-					// params['ids'] = JSON.parse(this.classIds)
-					params['ids'] = [9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22]
-				}
-
-
-
-
-				treeByPid(params).then(res => {
-					this.classificationList = res
-					this.confirm([res[0].id], res[0].name, res[0].rootCategoryLevelId)
-				})
-			},
-
-			confirm(id, name, rootCategoryLevelId) {
-
-				this.rootCategoryLevelId = rootCategoryLevelId
-
-				this.categoryLevelId = id
-
-				this.list = []
-
-				console.log('是这里嘛');
-				this.getList()
-			},
-
-
-			doSearch() {
-				this.list = []
-				this.getList()
-				this.searchShow = false
-			},
-
-			scrolltolower() {
-				if (isEnd) return
-				this.page++
-				this.getList()
-			},
-
-			getList() {
-				let param = {
-					categoryLevelId: this.categoryLevelId,
-					keyWord: this.keyWord,
-					pageNum: this.page,
-					size: 100,
-					taskId: this.taskId
-
-				}
-
-				if (this.rootCategoryLevelId == '11') { // 干燥区特殊处理
-					param.size = 5
-				}
-				isEnd = false
-				let URL = null
-				if (this.isType == 'pick') { // 领料
-					// if (this.rootCategoryLevelId == 23) {
-					// 	this.list = []
-					// 	param = {}
-					// 	param.workOrderId = this.pid
-					// 	URL = listOutsourceInWarehouse
-					// } else {
-					// 	param.dimension = 1
-					// 	URL = pageeLedgerMain
-					// }
-					param.dimension = 1
-					URL = pageeLedgerMain
-
-				} else if (this.isType == 'feed') { // 投料
-
-					if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
-
-						URL = assetPage
-					} else if (this.rootCategoryLevelId == 2) {
-						param.workOrderId = this.pid
-						delete param.taskId
-						delete param.categoryLevelId
-						URL = listInProduct
-					} else if (![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
-						URL = assetPage
-						// if (this.formData.dimension == 3) { // 包装维度
-						// 	URL = getInventoryDetails
-						// 	param.dimension = 3
-						// 	param.rootCategoryLevelId = this.rootCategoryLevelId
-						// } else if (this.formData.dimension == 4) { // 物料维度
-						// 	param.dimension = 4
-						// 	param.rootCategoryLevelId = this.rootCategoryLevelId
-						// 	URL = getMaterielDetails
-						// }
-					}
-
-				} else if (this.isType == 'job' || this.isType == 'zdy') { // 报工
-					URL = assetPage
-				} else if (this.isType == 'weiwai') { // 出库
-					if(this.pid==3){
-						URL = categoryGetList
-					}else{
-						// URL = assetPdaPage
-						URL = pageeLedgerMain
-					}
-					
-				}
-
-
-				URL(param).then(res => {
-				
-					if (this.rootCategoryLevelId == '11') {
-               
-						res.list.forEach(e => {
-							if (e.aridRegionList && e.aridRegionList.length != 0) {
-								e.aridRegionList.map(i => {
-									const checked =
-										this.memoList.findIndex(itm => itm.id === i.id) > -1
-
-									let obj = {
-										checked,
-										name: e.name,
-										region: e.extInfo.region,
-										rootCategoryLevelId: e.rootCategoryLevelId,
-										...i,
-										instanceId: i.id,
-									}
-									this.list.push(obj)
-
-								})
-							}
-						})
-
-
-
-
-					} else {
-						this.list.push(
-							...res.list.map(i => {
-								const checked =
-									this.memoList.findIndex(itm => itm.id === i.id) > -1
-
-								const warehouseId = i.pathIds && i.pathIds.split(',')[0]
-
-								return {
-									checked,
-									warehouseId,
-									...i,
-									instanceId: i.id,
-								}
-							})
-						)
-					}
-
-
-					isEnd = this.list.length >= res.count
-
-
-				})
-
-			},
-
-			//勾选
-			selectVal(e, val, index) {
-				if (val.rootCategoryLevelId == 11 && val.status == 1) {
-					return false
-				}
-				this.list[index].checked = !this.list[index].checked
-				this.seletedAll = !this.list.some(item => !item.checked)
-				const idx = this.memoList.findIndex(
-					item => item.id === this.list[index].id
-				)
-
-				if (this.list[index].checked) {
-					if (idx === -1) {
-						this.memoList.push(this.list[index])
-					}
-				} else {
-					if (idx > -1) {
-						this.memoList.splice(idx, 1)
-					}
-				}
-
-			},
-
-			handleSearch() {
-				this.searchShow = true
-			},
-
-			searchCancel() {
-				this.list = []
-				this.page = 1
-				this.getList()
-				this.searchShow = false
-			},
-
-
-			//跳转回添加页面
-			jumpAdd(type) {
-				if (type == 1) {
-					if (this.isType == 'pick' || this.isType == 'feed' || this.isType == 'job' || this.isType == 'zdy'|| this.isType == 'weiwai') {
-						
-
-						this.memoList.map(item => {
-							item.extInfo.heatNumber = ''
-						})
-						
-						if((this.isType == 'zdy'|| this.isType == 'weiwai') && ( this.pid == 2 ||  this.pid == 3 )) {
-							let param = {
-								memoList: this.memoList,
-								pid:this.pid
-							}
-
-							EventBus.$emit('outEvent', { message: param });
-						} else {
-							uni.$emit('setSelectList', this.memoList, this.pid)
-						}
-						
-						
-						
-						uni.navigateBack()
-					}
-
-				} else if (type == 2) {
-
-					uni.showModal({
-						title: '提示',
-						content: '是否领取该工单半成品到此工序!',
-						confirmText: '确认', //这块是确定按钮的文字
-						success: rr => {
-							if (rr.confirm) {
-								let param = {
-									taskId: this.taskId,
-									workOrderId: this.pid,
-									pickOutInList: this.list
-								}
-
-
-								outsourceEndPick(param).then(res => {
-									// uni.$emit('setSelectList', this.list, this.pid)
-									uni.showToast({
-										title: '半成品领料成功,请先去审核',
-										icon: 'none'
-									})
-									
-								
-									  
-									uni.navigateBack()
-								})
-							}
-
-						}
-					})
-
-				}
-
-
-
-			},
-
-
-
-			getWarehouseFn() {
-				getWarehouseList().then(res => {
-					this.warehouseList = res
-				})
-			},
-		}
-	}
+import baTreePicker from "@/components/ba-tree-picker/ba-tree-picker.vue";
+import { tableHeader } from "../../common.js";
+import {
+  treeByPid,
+  pageeLedgerMain,
+  assetPage,
+  getWarehouseList,
+  getInventoryDetails,
+  getMaterielDetails,
+  listInProduct,
+  listOutsourceInWarehouse,
+  outsourceEndPick,
+  categoryGetList,
+  assetPdaPage,
+} from "@/api/pda/workOrder.js";
+
+import SearchPopup from "../../components/searchPopup.vue";
+
+import { EventBus } from "@/utils/eventBus.js";
+
+let [isEnd] = [false];
+export default {
+  components: {
+    baTreePicker,
+    SearchPopup,
+  },
+  data() {
+    return {
+      keyWord: null,
+      rootCategoryLevelId: null,
+      categoryLevelId: null,
+      classificationList: [],
+      treePickerShow: false,
+      list: [],
+      page: 1,
+
+      seletedAll: false, //全选状态
+      memoList: [],
+
+      isType: null,
+      taskId: null,
+
+      pid: null, // 上个页面id
+      storageKey: null,
+
+      formData: {
+        produceRoutingId: "",
+        dimension:
+          uni.getStorageSync("userInfo") &&
+          uni.getStorageSync("userInfo").clientEnvironmentId == 3
+            ? 4
+            : 3,
+      },
+      warehouseList: [],
+
+      searchShow: false,
+
+      stateList: [
+        "启动",
+        "空闲",
+        "运行",
+        "故障",
+        "检修",
+        "停机",
+        "待料",
+        "占用",
+      ],
+      classIds: [],
+
+      dimensionList: [
+        {
+          id: 3,
+          name: "包装维度",
+        },
+        {
+          id: 4,
+          name: "物料维度",
+        },
+      ],
+
+      clientEnvironmentId:
+        uni.getStorageSync("userInfo") &&
+        uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
+    };
+  },
+
+  //选择的列表长度
+  computed: {
+    checkListLen() {
+      return this.memoList.length;
+    },
+  },
+
+  onLoad(option) {
+    this.pid = option.id;
+    this.classIds = option.classIds || [];
+
+    this.isType = option.isType;
+    if (option.taskId == "undefined") {
+      this.taskId = null;
+    } else {
+      this.taskId = option.taskId || null;
+    }
+    if (Object.prototype.hasOwnProperty.call(option, "classIds")) {
+      this.classIds = option.classIds;
+    }
+
+    if (option.storageKey) {
+      this.storageKey = option.storageKey;
+
+      this.memoList = [];
+
+      if (this.isType == "feed") {
+        let _arr =
+          (this.storageKey && uni.getStorageSync(this.storageKey)) || [];
+        this.memoList = [
+          ..._arr[0].modelList,
+          ..._arr[0].equipmentList,
+          ..._arr[0].instanceList,
+          ..._arr[0].aridRegionList,
+          ..._arr[0].turnover,
+          ..._arr[0].palletList,
+          ..._arr[0].revolvingDiskList,
+          ..._arr[0].semiProductList,
+        ];
+      } else if (this.isType == "pick") {
+        this.memoList =
+          (this.storageKey && uni.getStorageSync(this.storageKey)) || [];
+      } else if (this.isType == "job") {
+        let _obj =
+          (this.storageKey && uni.getStorageSync(this.storageKey)) || {};
+
+        if (Object.prototype.hasOwnProperty.call(_obj, "turnover")) {
+          this.memoList = this.memoList.concat(_obj.turnover);
+        } else if (
+          Object.prototype.hasOwnProperty.call(_obj, "equipmentList")
+        ) {
+          this.memoList = this.memoList.concat(_obj.equipmentList);
+        }
+      } else if (this.isType == "zdy") {
+        let _arr =
+          (this.storageKey && uni.getStorageSync(this.storageKey)) || [];
+
+        if (
+          _arr.length != 0 &&
+          Object.prototype.hasOwnProperty.call(_arr[0], "turnover")
+        ) {
+          this.memoList = this.memoList.concat(_arr[0].turnover);
+        } else if (
+          _arr.length != 0 &&
+          Object.prototype.hasOwnProperty.call(_arr[0], "equipmentList")
+        ) {
+          this.memoList = this.memoList.concat(_arr[0].equipmentList);
+        } else if (
+          _arr.length != 0 &&
+          Object.prototype.hasOwnProperty.call(_arr[0], "standardOutputList")
+        ) {
+          this.memoList = this.memoList.concat(_arr[0].standardOutputList);
+        } else if (
+          _arr.length != 0 &&
+          Object.prototype.hasOwnProperty.call(_arr[0], "bomMaterialList")
+        ) {
+          this.memoList = this.memoList.concat(_arr[0].bomMaterialList);
+        }
+      }
+    }
+
+    this.getTreeList();
+
+    this.getWarehouseFn();
+  },
+
+  onUnload() {
+    if (this.storageKey) {
+      uni.removeStorage(this.storageKey);
+    }
+  },
+
+  methods: {
+    _seletedAll() {
+      if (!this.seletedAll) {
+        this.seletedAll = true;
+
+        this.list.map((item) => {
+          this.$set(item, "checked", true);
+          const idx = this.memoList.findIndex((itm) => itm.id === item.id);
+          if (idx === -1) {
+            this.memoList.push(item);
+          }
+        });
+      } else {
+        this.seletedAll = false;
+        this.list.map((item) => {
+          this.$set(item, "checked", false);
+
+          const idx = this.memoList.findIndex((itm) => itm.id === item.id);
+          if (idx > -1) {
+            this.memoList.splice(idx, 1);
+          }
+        });
+      }
+    },
+
+    openTreePicker() {
+      this.$refs.treePicker._show();
+    },
+    tableH(type) {
+      return tableHeader(type);
+    },
+
+    getTreeList() {
+      let params = {};
+      console.log(this.classIds, "option", this.isType);
+      if (this.isType == "feed") {
+        params.ids = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 28];
+      } else if (this.isType == "pick") {
+        // params.ids = [1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28]
+        params.ids = [9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22];
+      } else if (this.isType == "job") {
+        params["ids"] = [4, 7];
+      } else if (this.isType == "zdy") {
+        params["ids"] = JSON.parse(this.classIds);
+      } else if (this.isType == "weiwai") {
+        // params['ids'] = JSON.parse(this.classIds)
+        params["ids"] = [9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22];
+      }
+
+      treeByPid(params).then((res) => {
+        this.classificationList = res;
+        this.confirm([res[0].id], res[0].name, res[0].rootCategoryLevelId);
+      });
+    },
+
+    confirm(id, name, rootCategoryLevelId) {
+      this.rootCategoryLevelId = rootCategoryLevelId;
+
+      this.categoryLevelId = id;
+
+      this.list = [];
+
+      console.log("是这里嘛");
+      this.getList();
+    },
+
+    doSearch() {
+      this.list = [];
+      this.getList();
+      this.searchShow = false;
+    },
+
+    scrolltolower() {
+      if (isEnd) return;
+      this.page++;
+      this.getList();
+    },
+
+    getList() {
+      let param = {
+        categoryLevelId: this.categoryLevelId,
+        keyWord: this.keyWord,
+        pageNum: this.page,
+        size: 100,
+        taskId: this.taskId,
+      };
+
+      if (this.rootCategoryLevelId == "11") {
+        // 干燥区特殊处理
+        param.size = 5;
+      }
+      isEnd = false;
+      let URL = null;
+      if (this.isType == "pick") {
+        // 领料
+        // if (this.rootCategoryLevelId == 23) {
+        // 	this.list = []
+        // 	param = {}
+        // 	param.workOrderId = this.pid
+        // 	URL = listOutsourceInWarehouse
+        // } else {
+        // 	param.dimension = 1
+        // 	URL = pageeLedgerMain
+        // }
+        param.dimension = 1;
+        URL = pageeLedgerMain;
+      } else if (this.isType == "feed") {
+        // 投料
+
+        if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+          URL = assetPage;
+        } else if (this.rootCategoryLevelId == 2) {
+          param.workOrderId = this.pid;
+          delete param.taskId;
+          delete param.categoryLevelId;
+          URL = listInProduct;
+        } else if (![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+          URL = assetPage;
+          // if (this.formData.dimension == 3) { // 包装维度
+          // 	URL = getInventoryDetails
+          // 	param.dimension = 3
+          // 	param.rootCategoryLevelId = this.rootCategoryLevelId
+          // } else if (this.formData.dimension == 4) { // 物料维度
+          // 	param.dimension = 4
+          // 	param.rootCategoryLevelId = this.rootCategoryLevelId
+          // 	URL = getMaterielDetails
+          // }
+        }
+      } else if (this.isType == "job" || this.isType == "zdy") {
+        // 报工
+        URL = assetPage;
+      } else if (this.isType == "weiwai") {
+        // 出库
+        if (this.pid == 3) {
+          URL = categoryGetList;
+        } else {
+          // URL = assetPdaPage
+          URL = pageeLedgerMain;
+        }
+      }
+
+      URL(param).then((res) => {
+        if (this.rootCategoryLevelId == "11") {
+          res.list.forEach((e) => {
+            if (e.aridRegionList && e.aridRegionList.length != 0) {
+              e.aridRegionList.map((i) => {
+                const checked =
+                  this.memoList.findIndex((itm) => itm.id === i.id) > -1;
+
+                let obj = {
+                  checked,
+                  name: e.name,
+                  region: e.extInfo.region,
+                  rootCategoryLevelId: e.rootCategoryLevelId,
+                  ...i,
+                  instanceId: i.id,
+                };
+                this.list.push(obj);
+              });
+            }
+          });
+        } else {
+          this.list.push(
+            ...res.list.map((i) => {
+              const checked =
+                this.memoList.findIndex((itm) => itm.id === i.id) > -1;
+
+              const warehouseId = i.pathIds && i.pathIds.split(",")[0];
+
+              return {
+                checked,
+                warehouseId,
+                ...i,
+                instanceId: i.id,
+              };
+            })
+          );
+        }
+
+        isEnd = this.list.length >= res.count;
+      });
+    },
+
+    //勾选
+    selectVal(e, val, index) {
+      if (val.rootCategoryLevelId == 11 && val.status == 1) {
+        return false;
+      }
+      this.list[index].checked = !this.list[index].checked;
+      this.seletedAll = !this.list.some((item) => !item.checked);
+      const idx = this.memoList.findIndex(
+        (item) => item.id === this.list[index].id
+      );
+
+      if (this.list[index].checked) {
+        if (idx === -1) {
+          this.memoList.push(this.list[index]);
+        }
+      } else {
+        if (idx > -1) {
+          this.memoList.splice(idx, 1);
+        }
+      }
+    },
+
+    handleSearch() {
+      this.searchShow = true;
+    },
+
+    searchCancel() {
+      this.list = [];
+      this.page = 1;
+      this.getList();
+      this.searchShow = false;
+    },
+
+    //跳转回添加页面
+    jumpAdd(type) {
+      if (type == 1) {
+        if (
+          this.isType == "pick" ||
+          this.isType == "feed" ||
+          this.isType == "job" ||
+          this.isType == "zdy" ||
+          this.isType == "weiwai"
+        ) {
+          this.memoList.map((item) => {
+            item.extInfo.heatNumber = "";
+          });
+
+          if (
+            (this.isType == "zdy" || this.isType == "weiwai") &&
+            (this.pid == 2 || this.pid == 3)
+          ) {
+            let param = {
+              memoList: this.memoList,
+              pid: this.pid,
+            };
+
+            console.log(param, "paramparamparam");
+
+            EventBus.$emit("outEvent", { message: param });
+          } else {
+            uni.$emit("setSelectList", this.memoList, this.pid);
+          }
+
+          uni.navigateBack();
+        }
+      } else if (type == 2) {
+        uni.showModal({
+          title: "提示",
+          content: "是否领取该工单半成品到此工序!",
+          confirmText: "确认", //这块是确定按钮的文字
+          success: (rr) => {
+            if (rr.confirm) {
+              let param = {
+                taskId: this.taskId,
+                workOrderId: this.pid,
+                pickOutInList: this.list,
+              };
+
+              outsourceEndPick(param).then((res) => {
+                // uni.$emit('setSelectList', this.list, this.pid)
+                uni.showToast({
+                  title: "半成品领料成功,请先去审核",
+                  icon: "none",
+                });
+
+                uni.navigateBack();
+              });
+            }
+          },
+        });
+      }
+    },
+
+    getWarehouseFn() {
+      getWarehouseList().then((res) => {
+        this.warehouseList = res;
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.content-box {
-		height: 100vh;
-		overflow: hidden;
-		display: flex;
-		flex-direction: column;
-		background-color: $page-bg;
-	}
-
-	.searchBox {
-		background-color: #dedede;
-		height: 90rpx;
-		padding: 0 20rpx;
-
-		.menu_icon {
-			width: 60rpx;
-			height: 60rpx;
-			margin-right: 20rpx;
-		}
-
-		input {
-			height: 70rpx;
-			width: 480rpx;
-			background: #f9f9f9 !important;
-			padding-left: 10rpx;
-			border-radius: 5rpx;
-		}
-
-	}
-
-
-	.list_box {
-		flex: 1;
-		overflow: hidden;
-		padding: 6rpx 0;
-
-		.u-list {
-			height: 100% !important;
-		}
-	}
-
-	.bottom-wrapper {
-		height: 80rpx;
-		background: #fff;
-		padding: 0 32rpx;
-
-		/deep/ .uni-checkbox-input-checked {
-			background-color: $theme-color !important;
-			border-color: $theme-color !important;
-		}
-	}
-
-	.listBox {
-		margin-top: 8rpx;
-		padding: 8rpx 24rpx;
-		background: #fff;
-
-
-		/deep/ .uni-checkbox-input-checked {
-			background-color: $theme-color !important;
-			border-color: $theme-color !important;
-		}
-
-		.listBox-con {
-			width: 650rpx;
-			font-weight: 400;
-		}
-
-		.listBox-top {
-			margin-top: 6rpx;
-			color: #090A0A;
-			font-size: 28rpx;
-			font-style: normal;
-			font-weight: 800;
-		}
-
-		.listBox-bottom {
-			color: #090A0A;
-			font-size: 24rpx;
-			font-style: normal;
-			flex-wrap: wrap;
-
-			.items {
-
-				width: calc(50% - 1px);
-				border-left: 1rpx solid #E3E5E5;
-				border-right: 1rpx solid #E3E5E5;
-				border-bottom: 1rpx solid #E3E5E5;
-				box-sizing: border-box;
-                 word-break: break-all;
-				text {
-					display: inline-block;
-					background: #F7F9FA;
-					padding: 8rpx 10rpx;
-					color: #157A2C;
-
-				}
-
-				&:nth-child(1),
-				&:nth-child(2) {
-					border-top: 1rpx solid #E3E5E5;
-					margin-top: 8rpx;
-				}
-
-			}
-
-		}
-	}
-
-	.search_list {
-		min-height: 100rpx;
-
-		/deep/ .baseForm {
-			padding: 0 20rpx;
-		}
-	}
-</style>
+.content-box {
+  height: 100vh;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  background-color: $page-bg;
+}
+
+.searchBox {
+  background-color: #dedede;
+  height: 90rpx;
+  padding: 0 20rpx;
+
+  .menu_icon {
+    width: 60rpx;
+    height: 60rpx;
+    margin-right: 20rpx;
+  }
+
+  input {
+    height: 70rpx;
+    width: 480rpx;
+    background: #f9f9f9 !important;
+    padding-left: 10rpx;
+    border-radius: 5rpx;
+  }
+}
+
+.list_box {
+  flex: 1;
+  overflow: hidden;
+  padding: 6rpx 0;
+
+  .u-list {
+    height: 100% !important;
+  }
+}
+
+.bottom-wrapper {
+  height: 80rpx;
+  background: #fff;
+  padding: 0 32rpx;
+
+  /deep/ .uni-checkbox-input-checked {
+    background-color: $theme-color !important;
+    border-color: $theme-color !important;
+  }
+}
+
+.listBox {
+  margin-top: 8rpx;
+  padding: 8rpx 24rpx;
+  background: #fff;
+
+  /deep/ .uni-checkbox-input-checked {
+    background-color: $theme-color !important;
+    border-color: $theme-color !important;
+  }
+
+  .listBox-con {
+    width: 650rpx;
+    font-weight: 400;
+  }
+
+  .listBox-top {
+    margin-top: 6rpx;
+    color: #090a0a;
+    font-size: 28rpx;
+    font-style: normal;
+    font-weight: 800;
+  }
+
+  .listBox-bottom {
+    color: #090a0a;
+    font-size: 24rpx;
+    font-style: normal;
+    flex-wrap: wrap;
+
+    .items {
+      width: calc(50% - 1px);
+      border-left: 1rpx solid #e3e5e5;
+      border-right: 1rpx solid #e3e5e5;
+      border-bottom: 1rpx solid #e3e5e5;
+      box-sizing: border-box;
+      word-break: break-all;
+      text {
+        display: inline-block;
+        background: #f7f9fa;
+        padding: 8rpx 10rpx;
+        color: #157a2c;
+      }
+
+      &:nth-child(1),
+      &:nth-child(2) {
+        border-top: 1rpx solid #e3e5e5;
+        margin-top: 8rpx;
+      }
+    }
+  }
+}
+
+.search_list {
+  min-height: 100rpx;
+
+  /deep/ .baseForm {
+    padding: 0 20rpx;
+  }
+}
+</style>