695593266@qq.com 7 месяцев назад
Родитель
Сommit
d15ec3cb2a

+ 51 - 0
api/pda/selfBuiltPickOrder.js

@@ -0,0 +1,51 @@
+import { postJ, post, get } from "@/utils/request";
+import Vue from "vue";
+
+// 生成编码
+export async function getCode(code) {
+  const data = await get(
+    Vue.prototype.apiUrl + `/main/codemanage/getCode/` + code,
+    {}
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}
+
+// 非生产性领料保存
+export async function unproductive(params) {
+  const data = await postJ(
+    Vue.prototype.apiUrl + `/mes/pickorder/unproductive`,
+    params,
+    true
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}
+
+export async function getProductList(params) {
+  const data = await get(
+    Vue.prototype.apiUrl + `/wms/outindetailtwo/page`,
+    params,
+    true
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}
+// 批次维度台账列表
+export async function getBatchList(params) {
+  const data = await get(
+    Vue.prototype.apiUrl + `/wms/outindetailtwo/batchPage`,
+    params,
+    true
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}

+ 35 - 0
pages.json

@@ -1682,6 +1682,15 @@
 			}
 		},
 
+				{
+			"path": "pages/pda/selfBuiltPickOrder/components/addPick",
+			"style": {
+				"navigationBarTitleText": "自建领料单",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+
 		{
 			"path": "pages/pda/material_return/index/index",
 			"style": {
@@ -1708,6 +1717,15 @@
 			}
 		},
 
+			{
+			"path": "pages/pda/selfBuiltPickOrder/index/index",
+			"style": {
+				"navigationBarTitleText": "自建领料单",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+
 		{
 			"path": "pages/pda/work_order_handover/index/index",
 			"style": {
@@ -1750,6 +1768,15 @@
 			}
 		},
 
+				{
+			"path": "pages/pda/selfBuiltPickOrder/components/choosePickList",
+			"style": {
+				"navigationBarTitleText": "搜索",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+
 		{
 			"path": "pages/pda/feeding/bill/index",
 			"style": {
@@ -1758,6 +1785,14 @@
 			}
 		},
 
+			{
+			"path": "pages/pda/selfBuiltPickOrder/components/selfBuiltPickOrderDetail",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+
 		{
 			"path": "pages/pda/feeding/outbound/index",
 			"style": {

+ 1 - 1
pages/pda/feeding/components/workOrderBom.vue

@@ -42,7 +42,7 @@
 
         <view class="item">
           <view class="lable rx-cc">牌号</view>
-          <view class="content">{{ item.brandNum }}</view>
+          <view class="content">{{ item.brandNo }}</view>
         </view>
 
         <view class="item">

+ 2 - 2
pages/pda/outsourcing/index/index.vue

@@ -14,7 +14,7 @@
       <uni-section>
         <uni-easyinput
           prefixIcon="search"
-          style="width: 460rpx"
+          style="width: 520rpx"
           v-model="searchFrom.keyWord"
           placeholder="请输入"
         >
@@ -23,7 +23,7 @@
 
       <button class="search_btn" @click="doSearch">搜索</button>
 
-      <image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+      <!-- <image class="menu_icon" src="~@/static/pda/menu.svg"></image> -->
     </view>
 
     <view class="list_box">

+ 31 - 56
pages/pda/picking/bill/index.vue

@@ -59,69 +59,42 @@
         </view>
       </view>
       <u-list @scrolltolower="scrolltolower" key="dataList" v-if="status == 1">
-        <!-- <view class="card_box cx-sc">
-          <view class="content_table">
-            <view class="item">
-              <view class="lable rx-cc" style="color: #157a2c">领料单号</view>
-              <view class="content rx-bc" style="color: #157a2c">
-                {{ dataList.code }}
-              </view>
-            </view>
-            <view class="item">
-              <view class="lable rx-cc" style="color: #157a2c">领料时间</view>
-              <view class="content rx-bc" style="color: #157a2c">
-                {{ dataList.createTime }}
-              </view>
-            </view>
-            <view class="item">
-              <view class="lable rx-cc" style="color: #157a2c">领料人</view>
-              <view class="content rx-bc" style="color: #157a2c">
-                {{ dataList.executorName }}
-              </view>
-            </view>
+        <view v-if="dataList.type == 2">
+          <view
+            class="card_box cx-sc"
+            v-for="(item, index) in dataList.orderInfoList"
+            :key="index"
+          >
+            <instanceBom :item="item" :isDetails="true"></instanceBom>
           </view>
-        </view> -->
 
-        <view
-          class="card_box cx-sc"
-          v-for="(item, index) in dataList.orderInfoList"
-          :key="index"
-        >
-          <instanceBom :item="item" :isDetails="true"></instanceBom>
+          <u-list-item
+            v-if="dataList.orderInfoList.length === 0"
+            style="margin-top: 20vh"
+          >
+            <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
+          </u-list-item>
         </view>
 
-        <u-list-item
-          v-if="dataList.orderInfoList.length === 0"
-          style="margin-top: 20vh"
-        >
-          <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
-        </u-list-item>
+        <view v-if="dataList.type == 1">
+          <view
+            class="card_box cx-sc"
+            v-for="(item, index) in dataList.detailList"
+            :key="index"
+          >
+            <instanceBomTwo :item="item" :isDetails="true"></instanceBomTwo>
+          </view>
+
+          <u-list-item
+            v-if="dataList.detailList.length === 0"
+            style="margin-top: 20vh"
+          >
+            <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
+          </u-list-item>
+        </view>
       </u-list>
 
       <u-list @scrolltolower="scrolltolower" key="dataList2" v-if="status == 2">
-        <!-- <view class="card_box cx-sc">
-          <view class="content_table">
-            <view class="item">
-              <view class="lable rx-cc" style="color: #157a2c">领料单号</view>
-              <view class="content rx-bc" style="color: #157a2c">
-                {{ dataList.code }}
-              </view>
-            </view>
-            <view class="item">
-              <view class="lable rx-cc" style="color: #157a2c">领料时间</view>
-              <view class="content rx-bc" style="color: #157a2c">
-                {{ dataList.createTime }}
-              </view>
-            </view>
-            <view class="item">
-              <view class="lable rx-cc" style="color: #157a2c">领料人</view>
-              <view class="content rx-bc" style="color: #157a2c">
-                {{ dataList.executorName }}
-              </view>
-            </view>
-          </view>
-        </view> -->
-
         <view
           class="card_box cx-sc"
           v-for="(item, index) in dataList.orderInfoList"
@@ -164,10 +137,12 @@ import {
 } from "@/api/pda/picking.js";
 
 import instanceBom from "./components/instanceBom.vue";
+import instanceBomTwo from "../../selfBuiltPickOrder/components/instanceBom.vue";
 import outInstanceBom from "./components/outInstanceBom.vue";
 export default {
   components: {
     instanceBom,
+    instanceBomTwo,
     outInstanceBom,
   },
   data() {

+ 460 - 0
pages/pda/selfBuiltPickOrder/components/addPick.vue

@@ -0,0 +1,460 @@
+<template>
+  <view class="page">
+    <!-- 顶部标题栏 -->
+    <uni-nav-bar
+      fixed
+      statusBar
+      left-icon="back"
+      title="新建领料单"
+      background-color="#157A2C"
+      color="#fff"
+      @clickLeft="back"
+    />
+
+    <!-- 页面主体滚动区域 -->
+    <scroll-view class="scroll-container" scroll-y="true" scroll-with-animation>
+      <!-- 顶部表单 -->
+      <view class="form-section">
+        <view class="form-item">
+          <text class="label">领料单编号</text>
+          <uni-easyinput v-model="pickForm.pickCode" disabled />
+        </view>
+        <view class="form-item">
+          <text class="label">领料单名称</text>
+          <uni-easyinput
+            v-model="pickForm.pickName"
+            placeholder="请输入领料单名称"
+          />
+        </view>
+        <view class="btn-add">
+          <button type="primary" size="mini" @click="openPicking">
+            添加物料
+          </button>
+        </view>
+      </view>
+
+      <!-- 物料列表 -->
+      <view class="material-list">
+        <view
+          class="material-card"
+          v-for="(mate, idx) in objPick.pickList"
+          :key="idx"
+        >
+          <!-- 删除按钮 -->
+          <view class="delete-btn" @click.stop="removeItem(idx)">
+            <uni-icons
+              custom-prefix="iconfont"
+              type="icon-shanchu"
+              size="28"
+              color="#fa3534"
+            />
+          </view>
+
+          <!-- 卡片内容 -->
+          <view class="card-content">
+            <view class="card-row">
+              <text class="label">编码:</text>
+              <text class="value">{{
+                mate.rootCategoryLevelId == 4 ? mate.codeNumber : mate.code
+              }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">名称:</text>
+              <text class="value">{{ mate.name }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">类型:</text>
+              <text class="value">{{
+                typeName[Number(mate.rootCategoryLevelId)]
+              }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">库存数量:</text>
+              <text class="value"
+                >{{ mate.measureQuantity }} {{ mate.measuringUnit }}</text
+              >
+            </view>
+            <view class="card-row">
+              <text class="label">数量:</text>
+              <view class="input-row">
+                <uni-easyinput
+                  v-model="mate.demandQuantity"
+                  placeholder="请输入数量"
+                  type="text"
+                />
+                <text class="unit">{{ mate.measuringUnit }}</text>
+              </view>
+            </view>
+            <view class="card-row">
+              <text class="label">型号:</text>
+              <text class="value">{{ mate.modelType }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">规格:</text>
+              <text class="value">{{ mate.specification }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">批次号:</text>
+              <text class="value">{{ mate.batchNo }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">牌号:</text>
+              <text class="value">{{ mate.brandNum }}</text>
+            </view>
+            <view class="card-row">
+              <text class="label">领料仓库:</text>
+              <zxz-uni-data-select
+                :localdata="mate.warehouseList"
+                v-model="mate.warehouseId"
+                dataValue="warehouse_id"
+                format="{warehouse_name}"
+                dataKey="warehouse_name"
+                filterable
+              />
+            </view>
+          </view>
+        </view>
+      </view>
+    </scroll-view>
+
+    <!-- 底部操作按钮 -->
+    <view class="footer-btn">
+      <button @click="close" size="mini">取消</button>
+      <button type="primary" @click="save" size="mini">确定</button>
+    </view>
+  </view>
+</template>
+
+<script>
+import { unproductive, getCode } from "@/api/pda/selfBuiltPickOrder.js";
+import { typeName } from "@/pages/pda/feeding/common.js";
+
+export default {
+  data() {
+    return {
+      pickForm: {
+        pickCode: "",
+        pickName: "",
+      },
+      objPick: {
+        pickList: [],
+      },
+      selectionData: [],
+      typeName,
+    };
+  },
+
+  onLoad() {
+    this.getOrderCode();
+  },
+
+  onShow() {
+    uni.$off("setSelectList");
+
+    uni.$on("setSelectList", (selectList, id) => {
+      selectList.forEach((item) => {
+        item.code = item.categoryCode;
+        item.name = item.categoryName;
+        item.modelType = item.categoryModel;
+        item.measuringUnit = item.measuringUnit
+          ? item.measuringUnit
+          : item.measureUnit;
+        item.unit = item.unit ? item.unit : item.measureUnit;
+        item.demandQuantity = "";
+      });
+
+      const newData = [];
+
+      if (selectList.length != 0) {
+        selectList.forEach((it) => {
+          newData.push(this.deepCopy(it));
+        });
+      }
+
+      this.objPick = {
+        pickList: newData,
+      };
+
+      console.log(this.objPick, "11111");
+      this.$forceUpdate();
+    });
+  },
+
+  methods: {
+    async getOrderCode() {
+      this.pickForm.pickCode = await getCode("pick_order_code");
+    },
+
+    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);
+    },
+
+    openPicking() {
+      // this.$refs.pickingRef.open(this.objPick);
+    },
+
+    checkItem(row) {
+      row.checked = !row.checked;
+    },
+
+    limitNum(row) {
+      if (row.demandQuantity > row.measureQuantity) {
+        row.demandQuantity = row.measureQuantity;
+      }
+    },
+
+    // batchDelete() {
+    //   const filter = this.objPick.pickList.filter((i) => !i.checked);
+    //   if (filter.length === this.objPick.pickList.length) {
+    //     return uni.showToast({ title: "请选择需要删除的数据", icon: "none" });
+    //   }
+    //   this.objPick.pickList = filter;
+    // },
+
+    removeItem(index) {
+      this.objPick.pickList.splice(index, 1);
+    },
+
+    openPicking() {
+      const storageKey = Date.now() + "";
+      uni.setStorageSync(storageKey, this.objPick.pickList || []);
+      uni.navigateTo({
+        url: `/pages/pda/selfBuiltPickOrder/components/choosePickList?isType=pick&storageKey=${storageKey}`,
+      });
+    },
+
+    // allSelection(id, list) {
+    //   list.forEach((i) => {
+    //     i.code = i.categoryCode;
+    //     i.name = i.categoryName;
+    //     i.measuringUnit = i.measuringUnit || i.measureUnit;
+    //   });
+    //   this.objPick.pickList = JSON.parse(JSON.stringify(list));
+    // },
+
+    save() {
+      if (!this.pickForm.pickName) {
+        return uni.showToast({ title: "请输入领料单名称", icon: "none" });
+      }
+
+      if (this.objPick.pickList.length == 0) {
+        return uni.showToast({ title: "请选择物料", icon: "none" });
+      }
+      if (this.objPick.pickList.length > 0) {
+        let name;
+        let bol2;
+        let _i;
+
+        bol2 = this.objPick.pickList.every((e, i) => {
+          _i = i;
+          name = e.name;
+          // e.categoryId = e.id;
+          // e.id = e.categoryId
+          return (
+            Object.prototype.hasOwnProperty.call(e, "demandQuantity") &&
+            Number(e.demandQuantity) > 0 &&
+            e.warehouseId
+          );
+        });
+
+        if (!bol2) {
+          // this.$message.warning(
+          //   `${this.objPick.pickList[_i].code}的${name}数据不能为空`
+          // );
+          // return false;
+          return uni.showToast({
+            title: `${this.objPick.pickList[_i].code}的${name}数量不能为空`,
+            icon: "none",
+          });
+        }
+      }
+
+      let param = {
+        detailList: this.objPick.pickList,
+        name: this.pickForm.pickName,
+        code: this.pickForm.pickCode,
+      };
+
+      unproductive(param).then((res) => {
+        uni.showToast({ title: "提交成功" });
+        setTimeout(() => {
+          uni.navigateBack();
+        }, 500);
+      });
+      // if (!this.objPick.pickList.length) {
+      //   return uni.showToast({ title: "请选择物料", icon: "none" });
+      // }
+
+      // const valid = this.objPick.pickList.every(
+      //   (e) => e.demandQuantity > 0 && e.warehouseId
+      // );
+      // if (!valid) {
+      //   return uni.showToast({ title: "请完善物料信息", icon: "none" });
+      // }
+
+      // const param = {
+      //   detailList: this.objPick.pickList,
+      //   name: this.pickForm.pickName,
+      //   code: this.pickForm.pickCode,
+      // };
+
+      // unproductive(param).then(() => {
+      //   uni.showToast({ title: "提交成功" });
+      //   this.close(true);
+      // });
+    },
+
+    close(refresh) {
+      uni.$emit("closePick", refresh);
+      uni.navigateBack();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.page {
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background-color: #f7f7f7;
+}
+
+.scroll-container {
+  flex: 1;
+  padding: 10rpx 16rpx;
+  overflow-y: auto;
+}
+
+/* 顶部表单 */
+.form-section {
+  background: #fff;
+  border-radius: 12rpx;
+  padding: 16rpx;
+  margin-bottom: 16rpx;
+
+  .form-item {
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    margin-bottom: 12rpx;
+
+    .label {
+      width: 30%;
+      font-size: 28rpx;
+      color: #666;
+      margin-bottom: 4rpx;
+    }
+
+    uni-easyinput {
+      flex: 1;
+    }
+  }
+
+  .btn-add {
+    display: flex;
+    justify-content: flex-end;
+  }
+}
+
+/* 物料列表卡片 */
+.material-list {
+  display: flex;
+  flex-direction: column;
+  gap: 16rpx;
+
+  .material-card {
+    position: relative;
+    background: #fff;
+    border-radius: 12rpx;
+    padding: 16rpx;
+    box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
+    transition: background 0.2s;
+
+    &:active {
+      background: #f5f5f5;
+    }
+
+    .delete-btn {
+      position: absolute;
+      top: 8rpx;
+      right: 8rpx;
+      width: 40rpx;
+      height: 40rpx;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      z-index: 10;
+      background: rgba(255, 255, 255, 0.8);
+      border-radius: 50%;
+      box-shadow: 0 1rpx 3rpx rgba(0, 0, 0, 0.2);
+    }
+
+    .card-content {
+      display: flex;
+      flex-direction: column;
+      gap: 8rpx;
+
+      .card-row {
+        display: flex;
+        // flex-wrap: wrap;
+        align-items: center;
+
+        .label {
+          width: 22%;
+          flex-shrink: 0;
+          font-size: 26rpx;
+          color: #666;
+          margin-bottom: 4rpx;
+        }
+        .input-row {
+          display: flex;
+          align-items: center;
+          gap: 8rpx;
+
+          uni-easyinput {
+            flex: 1; // 占满剩余空间
+            min-width: 0; // ✅允许收缩,防止换行
+          }
+
+          .unit {
+            flex-shrink: 0; // 单位宽度固定
+            font-size: 24rpx;
+            color: #666;
+          }
+        }
+      }
+    }
+  }
+}
+
+/* 底部固定按钮 */
+.footer-btn {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  padding: 16rpx;
+  display: flex;
+  justify-content: space-between;
+  box-shadow: 0 -2rpx 6rpx rgba(0, 0, 0, 0.05);
+  z-index: 20;
+}
+
+/deep/ .uni-easyinput__content-input {
+  padding-left: 0;
+}
+</style>

+ 807 - 0
pages/pda/selfBuiltPickOrder/components/choosePickList.vue

@@ -0,0 +1,807 @@
+<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
+                :value="item.code"
+                color="#fff"
+                :disabled="item.disabled"
+                :checked="item.checked"
+              />
+            </view>
+
+            <view class="listBox-con">
+              <view class="listBox-top rx-bc">
+                <view> {{ item.categoryName }}</view>
+                <view class="code">{{ item.categoryCode }} </view>
+              </view>
+
+              <view class="listBox-bottom rx">
+                <view class="items">
+                  <text>批次号</text>{{ item.batchNo }}
+                </view>
+
+                <view class="items">
+                  <text>型号</text>{{ item.categoryModel }}
+                </view>
+
+                <view class="items">
+                  <text>规格</text>{{ item.specification }}
+                </view>
+
+                <view class="items">
+                  <text>牌号</text>{{ item.brandNum }}
+                </view>
+
+                <view class="items">
+                  <text>可用库存</text>{{ item.measureQuantity }}
+                  {{ item.measureUnit }}
+                </view>
+
+                <view class="items">
+                  <text>重量</text>{{ item.weight }}
+                  {{ item.weightUnit }}
+                </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="维度:"
+              class="required-form"
+              borderBottom
+              prop="dimension"
+            >
+              <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 { getProductList, getBatchList } from "@/api/pda/selfBuiltPickOrder.js";
+
+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: 2,
+      },
+      warehouseList: [],
+
+      searchShow: false,
+
+      stateList: [
+        "启动",
+        "空闲",
+        "运行",
+        "故障",
+        "检修",
+        "停机",
+        "待料",
+        "占用",
+      ],
+      classIds: [],
+
+      dimensionList: [
+        {
+          id: 1,
+          name: "物品维度",
+        },
+        {
+          id: 2,
+          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") {
+        // this.treeIds =
+        //   "9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22, 1777158952502956034";
+        params.ids = [9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22];
+      } else if (this.isType == "job") {
+        if (this.clientEnvironmentId == 2) {
+          params["ids"] = [7];
+        } else {
+          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,
+        warehouseId: this.formData.warehouseId,
+      };
+
+      if (this.rootCategoryLevelId == "11") {
+        // 干燥区特殊处理
+        param.size = 5;
+      }
+      isEnd = false;
+      let URL = null;
+      if (this.isType == "pick") {
+        param.dimension = this.formData.dimension;
+        URL = this.formData.dimension == 2 ? getBatchList : getProductList;
+
+        // else if (dimension == 3) {
+        //   URL = storageApi.getPackingList;
+        // }
+        // param.dimension = dimension;
+        // 领料
+        // 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.formData.warehouseId = "";
+      this.formData.dimension = 2;
+      this.keyWord = "";
+      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>

+ 213 - 0
pages/pda/selfBuiltPickOrder/components/instanceBom.vue

@@ -0,0 +1,213 @@
+<template>
+  <view>
+    <view class="material rx-ss">
+      <view class="content_table">
+        <view class="item">
+          <view class="lable rx-cc">批次号</view>
+          <view class="content">{{ item.batchNo }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">领料类型</view>
+          <view class="content">{{ item.rootCategoryLevelName }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">编码</view>
+          <view class="content">{{ item.categoryCode }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">名称</view>
+          <view class="content" style="color: rgb(255 170 42)">{{
+            item.categoryName
+          }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">型号</view>
+          <view class="content">{{ item.model }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">规格</view>
+          <view class="content">{{ item.specification }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">牌号</view>
+          <view class="content">{{ item.brandNo }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">工序名称</view>
+          <view class="content">{{ item.taskName }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">数量</view>
+          <view class="content content_num">
+            <view class="unit">{{ item.demandQuantity }}{{ item.unit }}</view>
+          </view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">领料仓库</view>
+          <view class="content" style="color: rgb(255 170 42)">
+            {{ item.warehouseName }} (审核人:{{ item.warehouseLeaderName }})
+          </view>
+        </view>
+      </view>
+    </view>
+
+    <view class="material rx-ss" v-for="(mate, idx) in item.bomDetailDTOS">
+      <view class="content_table">
+        <view class="item">
+          <view class="lable rx-cc">批次号</view>
+          <view class="content">{{ mate.batchNo }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">领料类型</view>
+          <view class="content">{{ mate.rootCategoryLevelName }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">编码</view>
+          <view class="content">{{ mate.categoryCode }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">名称</view>
+          <view class="content" style="color: rgb(255 170 42)">{{
+            mate.categoryName
+          }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">型号</view>
+          <view class="content">{{ mate.model }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">规格</view>
+          <view class="content">{{ mate.specification }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">牌号</view>
+          <view class="content">{{ mate.brandNo }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">工序名称</view>
+          <view class="content">{{ mate.taskName }}</view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">数量</view>
+          <view class="content content_num">
+            <view class="unit">{{ mate.demandQuantity }}{{ mate.unit }}</view>
+          </view>
+        </view>
+
+        <view class="item">
+          <view class="lable rx-cc">领料仓库</view>
+          <view class="content" style="color: rgb(255 170 42)">
+            {{ mate.warehouseName }} (审核人:{{ mate.warehouseLeaderName }})
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: ["item"],
+  data() {
+    return {};
+  },
+
+  created() {},
+
+  methods: {},
+};
+</script>
+
+<style lang="scss" scoped>
+.material {
+  margin-top: 10rpx;
+
+  .content_table {
+    width: 702rpx;
+    border: 2rpx solid $border-color;
+
+    .item {
+      display: flex;
+      border-bottom: 2rpx solid $border-color;
+
+      .lable {
+        width: 132rpx;
+        text-align: center;
+        background-color: #f7f9fa;
+        font-size: 26rpx;
+        border-right: 2rpx solid $border-color;
+        flex-shrink: 0;
+      }
+
+      .ww80 {
+        width: 80rpx;
+      }
+
+      .content {
+        width: 518rpx;
+        min-height: 64rpx;
+        font-size: 28rpx;
+        line-height: 28rpx;
+        font-style: normal;
+        font-weight: 400;
+        padding: 18rpx 8rpx;
+        box-sizing: border-box;
+        word-wrap: break-word;
+        flex-grow: 1 !important;
+      }
+
+      .content_num {
+        display: flex;
+        align-items: center;
+        padding: 0 4rpx;
+
+        /deep/ .uni-input-input {
+          width: 200rpx;
+          border: 2rpx solid #f0f8f2;
+          background: #f0f8f2;
+          color: $theme-color;
+        }
+
+        .unit {
+          padding: 0 4rpx;
+          font-size: 24rpx;
+          color: #404446;
+        }
+      }
+
+      .pd4 {
+        padding: 4rpx 8rpx;
+      }
+
+      &:last-child {
+        border-bottom: none;
+      }
+    }
+
+    .ww55 {
+      width: 55%;
+    }
+
+    .ww45 {
+      width: 45%;
+    }
+  }
+}
+</style>

+ 198 - 0
pages/pda/selfBuiltPickOrder/components/pickWorkCard.vue

@@ -0,0 +1,198 @@
+<template>
+  <view class="card-wrapper">
+    <checkbox-group
+      v-for="(item, index) in list"
+      :key="index"
+      @change="(e) => selectVal(e, item, index)"
+    >
+      <label class="card" @click="openDetails(item.status, item)">
+        <view class="card-header">
+          <view class="index">{{ index + 1 }}</view>
+          <view class="order">{{ item.code }}</view>
+          <view class="status-tag" :class="'status-' + item.status">
+            {{ statusText[item.status] }}
+          </view>
+        </view>
+
+        <view class="row">
+          <text class="label">领料单编号:</text>
+          <text class="value ellipsis">{{ item.code }}</text>
+        </view>
+
+        <view class="row">
+          <text class="label">领料单名称:</text>
+          <text class="value ellipsis">{{ item.name }}</text>
+        </view>
+
+        <view class="row two-col">
+          <view class="col">
+            <text class="label">领料人:</text>
+            <text class="value theme ellipsis">{{ item.executorName }}</text>
+          </view>
+          <view class="col">
+            <text class="label">审核人:</text>
+            <text class="value ellipsis">{{ item.joinReviewerName }}</text>
+          </view>
+        </view>
+
+        <view class="row">
+          <text class="label">领料仓库:</text>
+          <text class="value ellipsis">{{ item.joinWarehouseName }}</text>
+        </view>
+
+        <view class="row">
+          <text class="label">类型:</text>
+          <text class="value theme">{{ typeMap[item.type] }}</text>
+        </view>
+
+        <view class="row">
+          <text class="label">领料时间:</text>
+          <text class="value ellipsis">{{ item.createTime }}</text>
+        </view>
+      </label>
+    </checkbox-group>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    list: {
+      type: Array,
+      default: () => [],
+    },
+  },
+
+  data() {
+    return {
+      statusText: {
+        0: "未领料",
+        1: "领料中",
+        2: "已出库",
+      },
+      typeMap: {
+        1: "自建领料",
+        2: "工单领料",
+        3: "委外领料",
+      },
+    };
+  },
+
+  methods: {
+    selectVal(e, val, index) {
+      this.list[index].checked = !this.list[index].checked;
+    },
+
+    openDetails(pickStatus, item) {
+      if (pickStatus == 1 || pickStatus == 2) {
+        let url =
+          "/pages/pda/selfBuiltPickOrder/components/selfBuiltPickOrderDetail";
+        url += `?item=${JSON.stringify(item)}&status=${pickStatus}`;
+        uni.navigateTo({ url });
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.card-wrapper {
+  padding: 20rpx;
+}
+
+.card {
+  background: #fff;
+  padding: 24rpx;
+  border-radius: 16rpx;
+  margin-bottom: 24rpx;
+  box-shadow: 0 6rpx 18rpx rgba(0, 0, 0, 0.06);
+  display: block;
+  transition: 0.1s;
+}
+
+.card:active {
+  transform: scale(0.98);
+  opacity: 0.9;
+}
+
+/* 顶部标题区 */
+.card-header {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 14rpx;
+
+  .index {
+    width: 40rpx;
+    height: 40rpx;
+    line-height: 40rpx;
+    border-radius: 50%;
+    background: $theme-color;
+    color: #fff;
+    text-align: center;
+    font-size: 22rpx;
+    margin-right: 16rpx;
+  }
+
+  .order {
+    flex: 1;
+    font-size: 30rpx;
+    font-weight: 600;
+    color: #333;
+    margin-left: 10rpx;
+  }
+
+  .status-tag {
+    font-size: 24rpx;
+    padding: 4rpx 14rpx;
+    border-radius: 8rpx;
+    color: #fff;
+  }
+
+  .status-0 {
+    background: #bfbfbf;
+  }
+  .status-1 {
+    background: #ffa929;
+  }
+  .status-2 {
+    background: #30c26e;
+  }
+}
+
+/* 信息行 */
+.row {
+  font-size: 26rpx;
+  margin-top: 12rpx;
+  display: flex;
+
+  .label {
+    color: #999;
+    width: 160rpx;
+  }
+  .value {
+    color: #333;
+    flex: 1;
+  }
+  .theme {
+    color: $theme-color;
+  }
+}
+
+/* 两列布局 */
+.two-col {
+  display: flex;
+  justify-content: space-between;
+
+  .col {
+    width: 48%;
+  }
+}
+
+/* 长文本省略 */
+.ellipsis {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>

+ 296 - 0
pages/pda/selfBuiltPickOrder/components/selfBuiltPickOrderDetail.vue

@@ -0,0 +1,296 @@
+<template>
+  <view class="content-box">
+    <uni-nav-bar
+      fixed="true"
+      statusBar="true"
+      left-icon="back"
+      :title="title"
+      background-color="#F7F9FA"
+      color="#000"
+      @clickLeft="back"
+    ></uni-nav-bar>
+
+    <view class="list_box">
+      <view class="card_box cx-sc">
+        <view class="content_table">
+          <view class="item">
+            <view class="lable rx-cc" style="color: #157a2c">领料单号</view>
+            <view class="content rx-bc" style="color: #157a2c">
+              {{ dataList.code }}
+            </view>
+          </view>
+          <view class="item">
+            <view class="lable rx-cc" style="color: #157a2c">领料时间</view>
+            <view class="content rx-bc" style="color: #157a2c">
+              {{ dataList.createTime }}
+            </view>
+          </view>
+          <view class="item">
+            <view class="lable rx-cc" style="color: #157a2c">领料人</view>
+            <view class="content rx-bc" style="color: #157a2c">
+              {{ dataList.executorName }}
+            </view>
+          </view>
+
+          <view class="item">
+            <view class="lable rx-cc" style="color: #157a2c">类型</view>
+            <view
+              class="content rx-bc"
+              style="color: #157a2c"
+              v-if="dataList.type == 1"
+            >
+              自建领料
+            </view>
+            <view
+              class="content rx-bc"
+              style="color: #157a2c"
+              v-if="dataList.type == 2"
+            >
+              工单领料
+            </view>
+            <view
+              class="content rx-bc"
+              style="color: #157a2c"
+              v-if="dataList.type == 3"
+            >
+              委外领料
+            </view>
+          </view>
+        </view>
+      </view>
+      <u-list @scrolltolower="scrolltolower" key="dataList" v-if="status == 1">
+        <view
+          class="card_box cx-sc"
+          v-for="(item, index) in dataList.detailList"
+          :key="index"
+        >
+          <instanceBom :item="item" :isDetails="true"></instanceBom>
+        </view>
+
+        <u-list-item
+          v-if="dataList.detailList.length === 0"
+          style="margin-top: 20vh"
+        >
+          <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
+        </u-list-item>
+      </u-list>
+
+      <u-list @scrolltolower="scrolltolower" key="dataList2" v-if="status == 2">
+        <view
+          class="card_box cx-sc"
+          v-for="(item, index) in dataList.orderInfoList"
+          :key="index"
+        >
+          <outInstanceBom :item="item" :isDetails="true"></outInstanceBom>
+        </view>
+
+        <u-list-item
+          v-if="dataList.orderInfoList.length === 0"
+          style="margin-top: 20vh"
+        >
+          <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
+        </u-list-item>
+
+        <!-- <view class="card_box cx-sc">
+          <outInstanceBom :list="dataList" :isDetails="true"></outInstanceBom>
+        </view>
+
+        <u-list-item v-if="dataList.length === 0" style="margin-top: 20vh">
+          <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
+        </u-list-item> -->
+      </u-list>
+    </view>
+
+    <view class="bottom-wrapper">
+      <!-- <view class="btn_box" @click="save">一键报工</view> -->
+    </view>
+  </view>
+</template>
+
+<script>
+import { workorderPage } from "@/api/pda/workOrder.js";
+
+import {
+  pickDetails,
+  pickOutInOrder,
+  queryOutWordDetail,
+} from "@/api/pda/picking.js";
+import instanceBom from "./instanceBom.vue";
+import outInstanceBom from "@/pages/pda/picking/bill/components/outInstanceBom.vue";
+export default {
+  components: {
+    instanceBom,
+    outInstanceBom,
+  },
+  data() {
+    return {
+      ids: [],
+      dataList: null,
+      title: null,
+      status: 1,
+      item: null,
+    };
+  },
+
+  onLoad(option) {
+    this.status = option.status || 1;
+    this.title =
+      option.status == 1 ? "领料详情" : option.status == 2 ? " 出库详情" : "";
+    this.dataList = JSON.parse(option.item);
+  },
+
+  methods: {
+    async getList() {
+      let list = [];
+
+      if (this.status == 1) {
+        const res = await pickDetails(this.ids);
+        list = res;
+
+        list.forEach((m) => {
+          if (m.orderInfoList.length > 0) {
+            m.orderInfoList.forEach((o) => {
+              let _arr = [];
+              _arr = [...o.bomDetailDTOS, ...o.instanceList];
+              _arr = _arr.sort(
+                (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
+              );
+              o["arr"] = _arr;
+            });
+          }
+        });
+        this.dataList = list;
+      } else if (this.status == 2) {
+        console.log(this.ids.join(","));
+        const res = await queryOutWordDetail({
+          pickOrderId: this.ids.join(","),
+        });
+      }
+    },
+
+    scrolltolower() {},
+
+    save() {},
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.content-box {
+  height: 100vh;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+}
+
+.list_box {
+  flex: 1;
+  overflow: hidden;
+  padding: 16rpx 0;
+
+  .u-list {
+    height: 100% !important;
+  }
+}
+
+.bottom-wrapper {
+  .btn_box {
+    width: 750rpx;
+    height: 88rpx;
+    line-height: 88rpx;
+    background: $theme-color;
+    text-align: center;
+    font-size: 36rpx;
+    font-style: normal;
+    font-weight: 400;
+    color: #fff;
+  }
+}
+
+.card_box {
+  margin-top: 10rpx;
+
+  .word_order {
+    height: 64rpx;
+    width: 706rpx;
+    background: $theme-color;
+    font-size: 28rpx;
+    color: #fff;
+    line-height: 64rpx;
+    padding-left: 40rpx;
+    box-sizing: border-box;
+  }
+
+  .content_table {
+    margin-top: 10rpx;
+    width: 702rpx;
+    border: 2rpx solid $border-color;
+
+    .item {
+      display: flex;
+      border-bottom: 2rpx solid $border-color;
+
+      .lable {
+        width: 132rpx;
+        text-align: center;
+        background-color: #f7f9fa;
+        font-size: 26rpx;
+        border-right: 2rpx solid $border-color;
+        flex-shrink: 0;
+      }
+
+      .ww80 {
+        width: 80rpx;
+      }
+
+      .content {
+        width: 518rpx;
+        min-height: 64rpx;
+        font-size: 28rpx;
+        line-height: 28rpx;
+        font-style: normal;
+        font-weight: 400;
+        padding: 18rpx 8rpx;
+        box-sizing: border-box;
+        word-wrap: break-word;
+        flex-grow: 1 !important;
+      }
+
+      .content_num {
+        display: flex;
+        align-items: center;
+        padding: 0 4rpx;
+
+        /deep/ .uni-input-input {
+          width: 480rpx;
+          border: 2rpx solid #f0f8f2;
+          background: #f0f8f2;
+          color: $theme-color;
+        }
+
+        .unit {
+          padding: 0 4rpx;
+          font-size: 24rpx;
+          color: #404446;
+        }
+      }
+
+      .pd4 {
+        padding: 4rpx 8rpx;
+      }
+
+      &:last-child {
+        border-bottom: none;
+      }
+    }
+
+    .ww55 {
+      width: 55%;
+    }
+
+    .ww45 {
+      width: 45%;
+    }
+  }
+}
+</style>

+ 203 - 0
pages/pda/selfBuiltPickOrder/index/index.vue

@@ -0,0 +1,203 @@
+<template>
+  <view class="content-box">
+    <uni-nav-bar
+      fixed="true"
+      statusBar="true"
+      left-icon="back"
+      title="自建领料单"
+      background-color="#157A2C"
+      color="#fff"
+      @clickLeft="back"
+    ></uni-nav-bar>
+
+    <view class="top-wrapper">
+      <!-- 	<view class="tab_box rx-sc">
+				<view class="tab_item" :class="{active: tabType == 1}" @click="handTab(1)">生产工单列表</view>
+				<view class="tab_item" :class="{active: tabType == 2}" @click="handTab(2)">领料工单列表</view>
+			</view> -->
+
+      <view class="nav_box rx-sc">
+        <view style="margin-right: 30rpx"
+          ><button class="mini-btn" type="primary" size="mini" @click="addPick">
+            新增自建领料单
+          </button></view
+        >
+        <view
+          class="nav_item"
+          :class="{ active: pickStatus == 1 }"
+          @click="handNav(1)"
+        >
+          领料中</view
+        >
+        <view
+          class="nav_item"
+          :class="{ active: pickStatus == 2 }"
+          @click="handNav(2)"
+        >
+          已出库</view
+        >
+      </view>
+
+      <view class="list_box">
+        <u-list @scrolltolower="scrolltolower">
+          <pickWorkCard
+            v-if="dataList.length && pickStatus != 0"
+            :list="dataList"
+          >
+          </pickWorkCard>
+
+          <view v-else style="margin-top: 20vh">
+            <u-empty iconSize="150" textSize="32" text="暂无工单"> </u-empty>
+          </view>
+        </u-list>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { getAllPickList } from "@/api/pda/picking.js";
+import pickWorkCard from "../components/pickWorkCard.vue";
+let [isEnd] = [false];
+export default {
+  components: {
+    pickWorkCard,
+  },
+  data() {
+    return {
+      tabType: 1,
+      pickStatus: 1,
+
+      formData: {
+        produceRoutingId: "",
+      },
+
+      navObj: {
+        unclaimedQuantity: 0,
+        claimedQuantity: 0,
+      },
+
+      page: 1,
+      size: 10,
+
+      dataList: [],
+      produceList: [],
+      seletedAll: false, //全选状态
+
+      searchShow: false,
+    };
+  },
+
+  onShow() {
+    this.page = 1;
+    // this.dataList = []
+    this.getList();
+  },
+
+  methods: {
+    handNav(type) {
+      if (type != this.pickStatus) {
+        this.pickStatus = type;
+
+        this.page = 1;
+        this.dataList = [];
+        this.getList();
+      }
+    },
+
+    scrolltolower() {
+      if (isEnd) return;
+      this.page++;
+      this.getList();
+    },
+
+    async getList() {
+      let params = null;
+
+      params = {
+        pageNum: this.page,
+        size: this.size,
+        status: this.pickStatus,
+        type: 1,
+      };
+
+      isEnd = false;
+      const res = await getAllPickList(params);
+
+      if (params.pageNum === 1) {
+        this.dataList = [];
+      }
+
+      let _list = res.list.map((m) => {
+        return {
+          checked: false,
+          ...m,
+        };
+      });
+
+      this.dataList.push(..._list);
+      isEnd = this.dataList.length >= res.count;
+    },
+
+    addPick() {
+      console.log("1111");
+      let url = "/pages/pda/selfBuiltPickOrder/components/addPick";
+
+      uni.navigateTo({ url });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.content-box {
+  height: 100vh;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  background-color: $page-bg;
+}
+
+.nav_box {
+  padding: 6rpx 32rpx;
+  position: relative;
+
+  .nav_item {
+    font-size: 28rpx;
+    font-weight: 400;
+    color: $theme-color;
+    background: #f0f8f2;
+    margin-right: 16rpx;
+    padding: 4rpx 16rpx;
+    border-radius: 8rpx;
+    border: 2rpx solid #acd4b5;
+  }
+
+  .menu_box {
+    position: absolute;
+    right: 20rpx;
+    top: 10rpx;
+
+    .menu_icon {
+      width: 44rpx;
+      height: 44rpx;
+    }
+  }
+
+  .active {
+    background: $theme-color;
+    border: 2rpx solid $theme-color;
+    color: #fff;
+  }
+}
+
+.list_box {
+  flex: 1;
+  overflow: hidden;
+  padding: 4rpx 0;
+
+  .u-list {
+    height: 100% !important;
+  }
+}
+</style>

+ 4 - 4
pages/pda/workOrder/search/index.vue

@@ -363,12 +363,12 @@ export default {
 
       dimensionList: [
         {
-          id: 3,
-          name: "包装维度",
+          id: 1,
+          name: "物品维度",
         },
         {
-          id: 4,
-          name: "物料维度",
+          id: 2,
+          name: "批次维度",
         },
       ],