695593266@qq.com hai 11 meses
pai
achega
3b9ddd93dc
Modificáronse 2 ficheiros con 923 adicións e 873 borrados
  1. 597 548
      pages/pda/feeding/components/instanceBom.vue
  2. 326 325
      pages/pda/feeding/single.vue

+ 597 - 548
pages/pda/feeding/components/instanceBom.vue

@@ -1,555 +1,604 @@
 <template>
-	<view>
-		<view class="title_box rx-bc">
-			<view class="name">物料清单 ({{list.length || 0}})个 </view>
-			<view class="btn_box rx-cc" v-if="deviceList.length > 1" @click="bindDevice">绑定设备</view>
-		</view>
-
-		<u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
-
-			<view class="material rx-ss" v-for="(mate, idx) in list" :key="idx">
-				<view class="left rx-ss" @click="getDelete(idx)" v-if='workOrderId'>
-					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
-				</view>
-				<view class="content_table">
-
-
-					<view class="item rx-sc" v-if='mate.rootCategoryLevelId == 1 && mate.isConsumable == 1'>
-						<view class="rx ww50">
-							<view class="lable rx-cc">编码</view>
-							<view class="content">{{ mate.code }}</view>
-						</view>
-					</view>
-
-					<view class="item rx-bc" v-if='mate.rootCategoryLevelId == 1 && mate.isConsumable == 0'
-						@click="handleCheck(idx, mate)">
-						<view class="rx ww80">
-							<view class="lable rx-cc">编码</view>
-							<view class="content">{{ mate.code }}</view>
-						</view>
-
-						<view class="rx-cc ww20" v-if="deviceList.length > 1">
-							<image class="check" v-if="mate.check" src='../../../../static/check.png'></image>
-							<image class="check" v-if="!mate.check" src='../../../../static/check_no.png'></image>
-						</view>
-					</view>
-
-
-
-					<view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
-						<view class="lable rx-cc">{{ itm.label }}</view>
-						<view class="content">{{ mate[itm.prop] }}</view>
-					</view>
-
-					<view class="item" v-if='mate.isConsumable == 1'>
-						<view class="lable rx-cc">包装库存</view>
-						<view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
-					</view>
-
-
-					<view class="item rx-sc" v-if='mate.isConsumable == 0 && workInfo.singleReport != 0'>
-						<view class="rx ww50">
-							<view class="lable  rx-cc">{{ currentTaskDiagram.isFirstTask == 1 ? '物料重量': '上道重量' }}</view>
-							<view class="content content_num"  v-if="currentTaskDiagram.isFirstTask == 1">
-						  {{mate.extInfo.weight}}{{ mate.extInfo.weightUnit}}
-							</view>
-							<view class="content" v-if="currentTaskDiagram.isFirstTask == 0">
-								{{mate.extInfo.newWeight || 0}} {{ mate.extInfo.weightUnit}}
-							</view>
-						</view>
-
-
-						<view class="rx ww50" v-if="workInfo.singleReport != 0">
-							<view class="lable ww80 rx-cc">刻码</view>
-							<view class="content">{{mate.extInfo.engrave}}</view>
-						</view>
-
-					</view>
-
-
-
-
-
-					<view class="item"  v-if='mate.isConsumable == 0 && workInfo.singleReport != 0'>
-						<view class="lable rx-cc">物料代号</view>
-						<view class="content">{{mate.extInfo.materielCode}}</view>
-					</view>
-
-
-					<view class="item" v-if='mate.isConsumable == 0 && workInfo.singleReport != 0'>
-						<view class="lable rx-cc">客户代号</view>
-						<view class="content">{{mate.extInfo.clientCode}}</view>
-					</view>
-
-
-					<view class="item" v-if='deviceList.length > 0'>
-						<view class="rx ww70">
-							<view class="lable rx-cc">设备</view>
-							<view class="content content_num">
-								<zxz-uni-data-select v-if="!isDetails" :localdata="deviceList" v-model="mate.deviceId"
-									dataValue='id' format='{name}-{codeNumber}' @change="e => selectVal(e, mate, idx)"
-									dataKey="id" filterable :clear='false'></zxz-uni-data-select>
-								<span v-if="isDetails">{{mate.deviceName}}</span>
-							</view>
-						</view>
-						<view class="rx ww30">
-							<view class="lable rx-cc ww80">炉次号</view>
-							<view class="content content_num ">
-								<input class="uni-input" style="width: 120rpx;" v-model="mate.extInfo.heatNumber" />
-							</view>
-						</view>
-					</view>
-
-					
-						<view class="item" v-if='mate.isConsumable == 0 && workInfo.singleReport == 0'>
-							<view class="lable rx-cc">投料类型</view>
-							<view class="content" style="color:#157A2C;">{{ workInfo.singleReport == 0 ? '批量投料' : ''}}</view>
-						</view>
-
-
-					<view class="item rx-sc" v-if='mate.isConsumable == 0'>
-						<view class="rx ww50">
-							<view class="lable rx-cc">位置</view>
-							<view class="content content_num ">
-								<input class="uni-input" v-model='mate.extInfo.position' />
-							</view>
-
-						</view>
-
-						<view class="rx ww50">
-							<view class="lable rx-cc ww80">数量</view>
-							<view class="content content_num   ">
-								<input class="uni-input" style="width: 160rpx;" v-model="mate.feedQuantity"
-									type="digit"></input>
-								<view class="unit ">/{{mate.unit}}</view>
-							</view>
-						</view>
-
-					</view>
-
-
-
-
-
-					<view class="item" v-if='mate.isConsumable == 1'>
-						<view class="lable rx-cc">数量</view>
-						<view class="content content_num">
-							<input class="uni-input" v-model="mate.feedQuantity" type="digit"></input>
-							<view class="unit">/{{mate.unit}}</view>
-						</view>
-					</view>
-
-
-
-
-				</view>
-			</view>
-
-		</u-list>
-
-		<SearchPopup mode="center" v-if='deviveShow'>
-			<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="assetType">
-
-							<zxz-uni-data-select :localdata="deviceList" v-model="formData.deviceId" dataValue='id'
-								format='{name}-{codeNumber}' @change="e => formData.deviceName = e.name + e.codeNumber"
-								dataKey="id" filterable :clear='false'></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="deviceClose">
-						取消
-					</u-button>
-
-
-					<u-button type="success" size="small" class="u-reset-button" @click="deviceOk">
-						确定
-					</u-button>
-
-				</view>
-			</template>
-
-		</SearchPopup>
-
-
-	</view>
+  <view>
+    <view class="title_box rx-bc">
+      <view class="name">物料清单 ({{ list.length || 0 }})个 </view>
+      <view
+        class="btn_box rx-cc"
+        v-if="deviceList.length > 1"
+        @click="bindDevice"
+        >绑定设备</view
+      >
+    </view>
+
+    <u-list
+      @scrolltolower="scrolltolower"
+      class="z_list"
+      style="height: 100% !important"
+    >
+      <view class="material rx-ss" v-for="(mate, idx) in list" :key="idx">
+        <view class="left rx-ss" @click="getDelete(idx)" v-if="workOrderId">
+          <uni-icons
+            custom-prefix="iconfont"
+            type="icon-shanchu"
+            size="20"
+            color="#fa3534"
+          ></uni-icons>
+        </view>
+        <view class="content_table">
+          <view
+            class="item rx-sc"
+            v-if="mate.rootCategoryLevelId == 1 && mate.isConsumable == 1"
+          >
+            <view class="rx ww50">
+              <view class="lable rx-cc">编码</view>
+              <view class="content">{{ mate.code }}</view>
+            </view>
+          </view>
+
+          <view
+            class="item rx-bc"
+            v-if="mate.rootCategoryLevelId == 1 && mate.isConsumable == 0"
+            @click="handleCheck(idx, mate)"
+          >
+            <view class="rx ww80">
+              <view class="lable rx-cc">编码</view>
+              <view class="content">{{ mate.code }}</view>
+            </view>
+
+            <view class="rx-cc ww20" v-if="deviceList.length > 1">
+              <image
+                class="check"
+                v-if="mate.check"
+                src="../../../../static/check.png"
+              ></image>
+              <image
+                class="check"
+                v-if="!mate.check"
+                src="../../../../static/check_no.png"
+              ></image>
+            </view>
+          </view>
+
+          <view
+            class="item"
+            v-for="(itm, index) in tableH(mate.rootCategoryLevelId)"
+            :key="index"
+          >
+            <view class="lable rx-cc">{{ itm.label }}</view>
+            <view class="content">{{ mate[itm.prop] }}</view>
+          </view>
+
+          <view class="item" v-if="mate.isConsumable == 1">
+            <view class="lable rx-cc">包装库存</view>
+            <view class="content"
+              >{{ mate.packingCountBase }}/ {{ mate.minUnit }}</view
+            >
+          </view>
+
+          <view
+            class="item rx-sc"
+            v-if="mate.isConsumable == 0 && workInfo.singleReport != 0"
+          >
+            <view class="rx ww50">
+              <view class="lable rx-cc">{{
+                currentTaskDiagram.isFirstTask == 1 ? "物料重量" : "上道重量"
+              }}</view>
+              <view
+                class="content content_num"
+                v-if="currentTaskDiagram.isFirstTask == 1"
+              >
+                <view v-if="isDetails">
+                  {{ mate.extInfo.weight || 0
+                  }}{{ mate.extInfo.weightUnit }}</view
+                >
+                <view v-else>
+                  <input class="uni-input" v-model="mate.extInfo.weight" />{{
+                    mate.extInfo.weightUnit
+                  }}
+                </view>
+              </view>
+              <view class="content" v-if="currentTaskDiagram.isFirstTask == 0">
+                <view v-if="isDetails">
+                  {{ mate.extInfo.weight || 0
+                  }}{{ mate.extInfo.weightUnit }}</view
+                >
+                <view v-else>
+                  <input class="uni-input" v-model="mate.extInfo.weight" />{{
+                    mate.extInfo.weightUnit
+                  }}
+                </view>
+              </view>
+            </view>
+
+            <view class="rx ww50" v-if="workInfo.singleReport != 0">
+              <view class="lable ww80 rx-cc">刻码</view>
+              <view v-if="isDetails">{{ mate.extInfo.engrave }}</view>
+              <input class="uni-input" v-else v-model="mate.extInfo.engrave" />
+            </view>
+          </view>
+
+          <view
+            class="item"
+            v-if="mate.isConsumable == 0 && workInfo.singleReport != 0"
+          >
+            <view class="lable rx-cc">物料代号</view>
+            <view v-if="isDetails">{{ mate.extInfo.materielCode }}</view>
+            <input
+              class="uni-input"
+              v-else
+              v-model="mate.extInfo.materielCode"
+            />
+          </view>
+
+          <view
+            class="item"
+            v-if="mate.isConsumable == 0 && workInfo.singleReport != 0"
+          >
+            <view class="lable rx-cc">客户代号</view>
+            <view v-if="isDetails">{{ mate.extInfo.clientCode }}</view>
+            <input class="uni-input" v-else v-model="mate.extInfo.clientCode" />
+          </view>
+
+          <view class="item" v-if="deviceList.length > 0">
+            <view class="rx ww70">
+              <view class="lable rx-cc">设备</view>
+              <view class="content content_num">
+                <zxz-uni-data-select
+                  v-if="!isDetails"
+                  :localdata="deviceList"
+                  v-model="mate.deviceId"
+                  dataValue="id"
+                  format="{name}-{codeNumber}"
+                  @change="(e) => selectVal(e, mate, idx)"
+                  dataKey="id"
+                  filterable
+                  :clear="false"
+                ></zxz-uni-data-select>
+                <span v-if="isDetails">{{ mate.deviceName }}</span>
+              </view>
+            </view>
+            <view class="rx ww30">
+              <view class="lable rx-cc ww80">炉次号</view>
+              <view class="content content_num">
+                <input
+                  class="uni-input"
+                  style="width: 120rpx"
+                  v-model="mate.extInfo.heatNumber"
+                />
+              </view>
+            </view>
+          </view>
+
+          <view
+            class="item"
+            v-if="mate.isConsumable == 0 && workInfo.singleReport == 0"
+          >
+            <view class="lable rx-cc">投料类型</view>
+            <view class="content" style="color: #157a2c">{{
+              workInfo.singleReport == 0 ? "批量投料" : ""
+            }}</view>
+          </view>
+
+          <view class="item rx-sc" v-if="mate.isConsumable == 0">
+            <view class="rx ww50">
+              <view class="lable rx-cc">位置</view>
+              <view class="content content_num">
+                <input class="uni-input" v-model="mate.extInfo.position" />
+              </view>
+            </view>
+
+            <view class="rx ww50">
+              <view class="lable rx-cc ww80">数量</view>
+              <view class="content content_num">
+                <input
+                  class="uni-input"
+                  style="width: 160rpx"
+                  v-model="mate.feedQuantity"
+                  type="digit"
+                />
+                <view class="unit">/{{ mate.unit }}</view>
+              </view>
+            </view>
+          </view>
+
+          <view class="item" v-if="mate.isConsumable == 1">
+            <view class="lable rx-cc">数量</view>
+            <view class="content content_num">
+              <input
+                class="uni-input"
+                v-model="mate.feedQuantity"
+                type="digit"
+              />
+              <view class="unit">/{{ mate.unit }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </u-list>
+
+    <SearchPopup mode="center" v-if="deviveShow">
+      <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="assetType"
+            >
+              <zxz-uni-data-select
+                :localdata="deviceList"
+                v-model="formData.deviceId"
+                dataValue="id"
+                format="{name}-{codeNumber}"
+                @change="(e) => (formData.deviceName = e.name + e.codeNumber)"
+                dataKey="id"
+                filterable
+                :clear="false"
+              ></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="deviceClose">
+            取消
+          </u-button>
+
+          <u-button
+            type="success"
+            size="small"
+            class="u-reset-button"
+            @click="deviceOk"
+          >
+            确定
+          </u-button>
+        </view>
+      </template>
+    </SearchPopup>
+  </view>
 </template>
 
 <script>
-	import {
-		tableHeader
-	} from './feedBom.js'
-	import SearchPopup from '../../components/searchPopup.vue'
-	export default {
-		components: {
-			SearchPopup
-		},
-		props: {
-			workOrderId: {
-				type: String,
-				default: ''
-			},
-			list: {
-				type: Array,
-				default: () => []
-			},
-			equipmentList: {
-				type: Array,
-				default: () => []
-			},
-
-			currentTaskDiagram: {
-				type: Object,
-				default: () => {}
-			},
-			isDetails: {
-				type: Boolean,
-				default: false
-			},
-			workInfo: {
-					type: Object,
-					default: () => {}
-				}
-		},
-
-		watch: {
-			equipmentList: {
-				immediate: true,
-				deep: true,
-				handler(newVal) {
-					this.deviceList = newVal
-					this.changeHeatNumber()
-
-
-				}
-			},
-		},
-
-		data() {
-			return {
-				deviceList: [],
-
-				deviveShow: false,
-				formData: {
-					deviceId: null,
-					deviceName: null,
-				}
-			}
-		},
-		created() {
-
-		},
-		methods: {
-			tableH(type) {
-				return tableHeader(type)
-			},
-
-			getDelete(idx) {
-				this.list.splice(idx, 1)
-			},
-
-			scrolltolower() {},
-
-
-			handleCheck(idx, it) {
-				this.$set(this.list[idx], 'checvalk', !it.check)
-			},
-
-			selectVal(e, item, idx) {
-				this.$set(this.list[idx], 'deviceName', e.name + '-' + e.codeNumber)
-				this.$set(this.list[idx]['extInfo'], 'heatNumber', e.extInfo.heatNumber)
-			},
-
-
-			changeHeatNumber() {
-				console.log(this.deviceList)
-
-				this.deviceList.forEach(f => {
-					this.list.forEach(o => {
-						if (o.deviceId && f.id == o.deviceId && this.deviceList.length > 1) {
-							o.extInfo.heatNumber = f.extInfo.heatNumber
-							o['workstationName'] = f.workstationName
-						} else if (this.deviceList.length == 1) {
-							o['deviceName'] = this.deviceList[0].name
-							o['deviceId'] = this.deviceList[0].id
-							o['workstationName'] = this.deviceList[0].workstationName
-							o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber
-
-							this.$forceUpdate()
-						}
-					})
-				})
-			},
-
-			bindDevice() {
-				this.deviveShow = true
-			},
-
-			deviceOk() {
-				let arr = this.list.filter(e => {
-					return e.check
-				})
-				if (arr.length <= 0) {
-					uni.showToast({
-						icon: 'none',
-						title: '请先勾选物料'
-					})
-					return false
-				}
-
-				if (!this.formData.deviceId) {
-					uni.showToast({
-						icon: 'none',
-						title: '请先选择设备'
-					})
-					return false
-				}
-
-				this.list.forEach(e => {
-					if (e.check) {
-						e['deviceId'] = this.formData.deviceId
-						e['deviceName'] = this.formData.deviceName
-						e['check'] = false
-					}
-
-				})
-				this.$forceUpdate()
-				this.deviceClose()
-
-			},
-
-			deviceClose() {
-				this.formData.deviceName = null
-				this.formData.deviceId = null
-				this.deviveShow = false
-			},
-		}
-	}
+import { tableHeader } from "./feedBom.js";
+import SearchPopup from "../../components/searchPopup.vue";
+export default {
+  components: {
+    SearchPopup,
+  },
+  props: {
+    workOrderId: {
+      type: String,
+      default: "",
+    },
+    list: {
+      type: Array,
+      default: () => [],
+    },
+    equipmentList: {
+      type: Array,
+      default: () => [],
+    },
+
+    currentTaskDiagram: {
+      type: Object,
+      default: () => {},
+    },
+    isDetails: {
+      type: Boolean,
+      default: false,
+    },
+    workInfo: {
+      type: Object,
+      default: () => {},
+    },
+  },
+
+  watch: {
+    equipmentList: {
+      immediate: true,
+      deep: true,
+      handler(newVal) {
+        this.deviceList = newVal;
+        this.changeHeatNumber();
+      },
+    },
+  },
+
+  data() {
+    return {
+      deviceList: [],
+
+      deviveShow: false,
+      formData: {
+        deviceId: null,
+        deviceName: null,
+      },
+    };
+  },
+  created() {},
+  methods: {
+    tableH(type) {
+      return tableHeader(type);
+    },
+
+    getDelete(idx) {
+      this.list.splice(idx, 1);
+    },
+
+    scrolltolower() {},
+
+    handleCheck(idx, it) {
+      this.$set(this.list[idx], "checvalk", !it.check);
+    },
+
+    selectVal(e, item, idx) {
+      this.$set(this.list[idx], "deviceName", e.name + "-" + e.codeNumber);
+      this.$set(this.list[idx]["extInfo"], "heatNumber", e.extInfo.heatNumber);
+    },
+
+    changeHeatNumber() {
+      console.log(this.deviceList);
+
+      this.deviceList.forEach((f) => {
+        this.list.forEach((o) => {
+          if (o.deviceId && f.id == o.deviceId && this.deviceList.length > 1) {
+            o.extInfo.heatNumber = f.extInfo.heatNumber;
+            o["workstationName"] = f.workstationName;
+          } else if (this.deviceList.length == 1) {
+            o["deviceName"] = this.deviceList[0].name;
+            o["deviceId"] = this.deviceList[0].id;
+            o["workstationName"] = this.deviceList[0].workstationName;
+            o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
+
+            this.$forceUpdate();
+          }
+        });
+      });
+    },
+
+    bindDevice() {
+      this.deviveShow = true;
+    },
+
+    deviceOk() {
+      let arr = this.list.filter((e) => {
+        return e.check;
+      });
+      if (arr.length <= 0) {
+        uni.showToast({
+          icon: "none",
+          title: "请先勾选物料",
+        });
+        return false;
+      }
+
+      if (!this.formData.deviceId) {
+        uni.showToast({
+          icon: "none",
+          title: "请先选择设备",
+        });
+        return false;
+      }
+
+      this.list.forEach((e) => {
+        if (e.check) {
+          e["deviceId"] = this.formData.deviceId;
+          e["deviceName"] = this.formData.deviceName;
+          e["check"] = false;
+        }
+      });
+      this.$forceUpdate();
+      this.deviceClose();
+    },
+
+    deviceClose() {
+      this.formData.deviceName = null;
+      this.formData.deviceId = null;
+      this.deviveShow = false;
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	.title_box {
-		margin-top: 20rpx;
-
-		.name {
-			font-size: 28rpx;
-			font-style: normal;
-			font-weight: 400;
-			color: $theme-color;
-			padding-left: 20rpx;
-
-			position: relative;
-
-			&:before {
-				position: absolute;
-				content: '';
-				left: 0rpx;
-				top: 0rpx;
-				bottom: 0rpx;
-				width: 4rpx;
-				height: 28rpx;
-				background: $theme-color;
-				margin: auto;
-			}
-
-
-		}
-
-
-
-		.btn_box {
-			padding: 0 18rpx;
-			height: 48rpx;
-
-			background: $theme-color;
-			font-size: 26rpx;
-			font-style: normal;
-			font-weight: 400;
-			font-size: 24rpx;
-			color: #fff;
-			border-radius: 4rpx;
-
-			.scan {
-				width: 34rpx;
-				height: 34rpx;
-				margin-right: 12rpx;
-
-			}
-
-		}
-
-	}
-
-	.material {
-		margin-top: 10rpx;
-
-		.left {
-			width: 40rpx;
-		}
-
-		.zdy_check {
-			width: 30rpx;
-			height: 30rpx;
-			border: 2rpx solid #c8c9cc;
-			border-radius: 4rpx;
-
-		}
-
-		.check_active {
-			background: $theme-color;
-			border: 2rpx solid $theme-color;
-
-			/deep/ .u-icon__icon {
-				color: #fff !important;
-			}
-		}
-
-		.content_table {
-			width: 670rpx;
-			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;
-					}
-				}
-
-				.ww400 {
-					/deep/ .uni-input-input {
-						width: 400rpx;
-					}
-				}
-
-				.pd4 {
-					padding: 4rpx 8rpx;
-				}
-
-
-
-				&:last-child {
-					border-bottom: none;
-				}
-			}
-
-			.ww55 {
-				width: 55%;
-			}
-
-			.ww45 {
-				width: 45%;
-			}
-
-			.ww50 {
-				width: 50%;
-
-			}
-
-			.ww30 {
-				width: 30%;
-			}
-
-
-			.ww70 {
-				width: 70%;
-			}
-
-
-			.ww80 {
-				width: 80%;
-			}
-
-			.ww20 {
-				width: 20%;
-			}
-
-			.check {
-				width: 30rpx;
-				height: 30rpx;
-			}
-		}
-	}
-
-
-	.z_list {
-		max-height: 2000rpx;
-	}
-
-
-
-
-	.search_list {
-		min-height: 100rpx;
-		width: 90vw;
-
-		/deep/ .baseForm {
-			padding: 0 20rpx;
-		}
-	}
-
-	.operate_box {
-		padding: 10rpx 32rpx;
-
-		/deep/ .u-button {
-			width: 40%;
-		}
-	}
-</style>
+.title_box {
+  margin-top: 20rpx;
+
+  .name {
+    font-size: 28rpx;
+    font-style: normal;
+    font-weight: 400;
+    color: $theme-color;
+    padding-left: 20rpx;
+
+    position: relative;
+
+    &:before {
+      position: absolute;
+      content: "";
+      left: 0rpx;
+      top: 0rpx;
+      bottom: 0rpx;
+      width: 4rpx;
+      height: 28rpx;
+      background: $theme-color;
+      margin: auto;
+    }
+  }
+
+  .btn_box {
+    padding: 0 18rpx;
+    height: 48rpx;
+
+    background: $theme-color;
+    font-size: 26rpx;
+    font-style: normal;
+    font-weight: 400;
+    font-size: 24rpx;
+    color: #fff;
+    border-radius: 4rpx;
+
+    .scan {
+      width: 34rpx;
+      height: 34rpx;
+      margin-right: 12rpx;
+    }
+  }
+}
+
+.material {
+  margin-top: 10rpx;
+
+  .left {
+    width: 40rpx;
+  }
+
+  .zdy_check {
+    width: 30rpx;
+    height: 30rpx;
+    border: 2rpx solid #c8c9cc;
+    border-radius: 4rpx;
+  }
+
+  .check_active {
+    background: $theme-color;
+    border: 2rpx solid $theme-color;
+
+    /deep/ .u-icon__icon {
+      color: #fff !important;
+    }
+  }
+
+  .content_table {
+    width: 670rpx;
+    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;
+        }
+      }
+
+      .ww400 {
+        /deep/ .uni-input-input {
+          width: 400rpx;
+        }
+      }
+
+      .pd4 {
+        padding: 4rpx 8rpx;
+      }
+
+      &:last-child {
+        border-bottom: none;
+      }
+    }
+
+    .ww55 {
+      width: 55%;
+    }
+
+    .ww45 {
+      width: 45%;
+    }
+
+    .ww50 {
+      width: 50%;
+    }
+
+    .ww30 {
+      width: 30%;
+    }
+
+    .ww70 {
+      width: 70%;
+    }
+
+    .ww80 {
+      width: 80%;
+    }
+
+    .ww20 {
+      width: 20%;
+    }
+
+    .check {
+      width: 30rpx;
+      height: 30rpx;
+    }
+  }
+}
+
+.z_list {
+  max-height: 2000rpx;
+}
+
+.search_list {
+  min-height: 100rpx;
+  width: 90vw;
+
+  /deep/ .baseForm {
+    padding: 0 20rpx;
+  }
+}
+
+.operate_box {
+  padding: 10rpx 32rpx;
+
+  /deep/ .u-button {
+    width: 40%;
+  }
+}
+</style>

+ 326 - 325
pages/pda/feeding/single.vue

@@ -1,332 +1,333 @@
 <template>
-	<view class="content-box">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="出库单" background-color="#F7F9FA"
-			color="#404446" @clickLeft="back"></uni-nav-bar>
-
-
-		<view class="top-wrapper">
-			<view class="searchBox rx-bc">
-				<input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
-
-				<view class="rx-sc">
-
-					<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 newList" :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.name }}</view>
-								<view class="code">{{ 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 v-if="[1,2, 9].includes(item.rootCategoryLevelId)" class="items">
-									<text>物料代号</text> {{item.extInfo.materielCode }}
-								</view>
-
-								<view v-if="[1,2, 9].includes(item.rootCategoryLevelId)" class="items">
-									<text>刻码</text> {{item.extInfo.engrave }}
-								</view>
-
-
-							</view>
-
-						</view>
-
-
-					</label>
-
-				</checkbox-group>
-				<!--  -->
-			</u-list>
-
-		</view>
-
-		<view class="bottom-wrapper rx-bc">
-			<view>
-
-			</view>
-			<view>
-				<u-button type="success" size="small" class="u-reset-button" @click="jumpAdd">
-					<view> 选择 </view>
-				</u-button>
-			</view>
-		</view>
-	</view>
+  <view class="content-box">
+    <uni-nav-bar
+      fixed="true"
+      statusBar="true"
+      left-icon="back"
+      title="出库单"
+      background-color="#F7F9FA"
+      color="#404446"
+      @clickLeft="back"
+    ></uni-nav-bar>
+
+    <view class="top-wrapper">
+      <view class="searchBox rx-bc">
+        <input
+          v-model="keyWord"
+          placeholder="请输入关键字搜索"
+          class="searchInput"
+        />
+
+        <view class="rx-sc">
+          <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 newList"
+          :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.name }}</view>
+                <view class="code">{{ 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
+                  v-if="[1, 2, 9].includes(item.rootCategoryLevelId)"
+                  class="items"
+                >
+                  <text>物料代号</text> {{ item.extInfo.materielCode }}
+                </view>
+
+                <view
+                  v-if="[1, 2, 9].includes(item.rootCategoryLevelId)"
+                  class="items"
+                >
+                  <text>刻码</text> {{ item.extInfo.engrave }}
+                </view>
+              </view>
+            </view>
+          </label>
+        </checkbox-group>
+        <!--  -->
+      </u-list>
+    </view>
+
+    <view class="bottom-wrapper rx-bc">
+      <view> </view>
+      <view>
+        <u-button
+          type="success"
+          size="small"
+          class="u-reset-button"
+          @click="jumpAdd"
+        >
+          <view> 选择 </view>
+        </u-button>
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	import {
-		tableHeader
-	} from './single.js'
-
-	import {
-		feedOutInOrder
-	} from '@/api/pda/workOrder.js'
-	export default {
-		data() {
-			return {
-				taskId: null,
-				id: null,
-				list: [],
-				newList: [],
-				memoList: [],
-
-				storageKey: null,
-
-				keyWord: ''
-			}
-		},
-
-		onLoad(option) {
-
-			this.id = option.id
-			if (option.taskId == 'undefined') {
-				this.taskId = null
-			} else {
-				this.taskId = option.taskId || null
-			}
-			if (option.storageKey) {
-				this.storageKey = option.storageKey
-
-				this.memoList = []
-
-
-				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
-				]
-
-
-			}
-
-			this.getList()
-		},
-
-
-		onUnload() {
-			if (this.storageKey) {
-				uni.removeStorage(this.storageKey)
-			}
-
-		},
-
-
-		methods: {
-
-			scrolltolower() {},
-			getList() {
-				let param = {
-					workOrderId: this.id,
-					taskId: this.taskId
-				}
-				feedOutInOrder(param).then(res => {
-					this.newList.push(
-						...res.map(i => {
-							const checked =
-								this.memoList.findIndex(itm => itm.id === i.id) > -1
-
-							return {
-								checked,
-								...i,
-
-							}
-						})
-					)
-				})
-				
-					this.list = this.newList
-				
-			},
-
-			doSearch() {
-				let _arr = []
-			
-
-				_arr = this.list.filter(obj => {
-					if (obj.name.includes(this.keyWord) || obj.code.includes(this.keyWord) || obj.extInfo && obj
-						.extInfo.engrave.includes(this.keyWord) || obj.extInfo && obj.extInfo.materielCode
-						.includes(this.keyWord)) {
-						return true
-					} else {
-						return false
-					}
-				});
-				
-				this.newList = _arr 
-
-			
-			},
-
-
-
-
-
-			tableH(type) {
-				return tableHeader(type)
-			},
-
-			selectVal(e, val, index) {
-				this.newList[index].checked = !this.newList[index].checked
-
-				const idx = this.memoList.findIndex(
-					item => item.id === this.newList[index].id
-				)
-
-				if (this.newList[index].checked) {
-					if (idx === -1) {
-						this.memoList.push(this.newList[index])
-					}
-				} else {
-					if (idx > -1) {
-						this.memoList.splice(idx, 1)
-					}
-				}
-			},
-
-
-			jumpAdd() {
-				uni.$emit('setSelectList', this.memoList, this.id)
-				uni.navigateBack()
-			}
-		}
-	}
+import { tableHeader } from "./single.js";
+
+import { feedOutInOrder } from "@/api/pda/workOrder.js";
+export default {
+  data() {
+    return {
+      taskId: null,
+      id: null,
+      list: [],
+      newList: [],
+      memoList: [],
+
+      storageKey: null,
+
+      keyWord: "",
+    };
+  },
+
+  onLoad(option) {
+    this.id = option.id;
+    if (option.taskId == "undefined") {
+      this.taskId = null;
+    } else {
+      this.taskId = option.taskId || null;
+    }
+    if (option.storageKey) {
+      this.storageKey = option.storageKey;
+
+      this.memoList = [];
+
+      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,
+      ];
+    }
+
+    this.getList();
+  },
+
+  onUnload() {
+    if (this.storageKey) {
+      uni.removeStorage(this.storageKey);
+    }
+  },
+
+  methods: {
+    scrolltolower() {},
+    getList() {
+      let param = {
+        workOrderId: this.id,
+        taskId: this.taskId,
+      };
+      feedOutInOrder(param).then((res) => {
+        this.newList.push(
+          ...res.map((i) => {
+            const checked =
+              this.memoList.findIndex((itm) => itm.id === i.id) > -1;
+
+            return {
+              checked,
+              ...i,
+            };
+          })
+        );
+      });
+
+      this.list = this.newList;
+    },
+
+    doSearch() {
+      let _arr = [];
+
+      _arr = this.list.filter((obj) => {
+        if (
+          obj.name.includes(this.keyWord) ||
+          obj.code.includes(this.keyWord) ||
+          (obj.extInfo && obj.extInfo.engrave.includes(this.keyWord)) ||
+          (obj.extInfo && obj.extInfo.materielCode.includes(this.keyWord))
+        ) {
+          return true;
+        } else {
+          return false;
+        }
+      });
+
+      this.newList = _arr;
+    },
+
+    tableH(type) {
+      return tableHeader(type);
+    },
+
+    selectVal(e, val, index) {
+      this.newList[index].checked = !this.newList[index].checked;
+
+      const idx = this.memoList.findIndex(
+        (item) => item.id === this.newList[index].id
+      );
+
+      if (this.newList[index].checked) {
+        if (idx === -1) {
+          this.memoList.push(this.newList[index]);
+        }
+      } else {
+        if (idx > -1) {
+          this.memoList.splice(idx, 1);
+        }
+      }
+    },
+
+    jumpAdd() {
+      uni.$emit("setSelectList", this.memoList, this.id);
+      uni.navigateBack();
+    },
+  },
+};
 </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: 4rpx 0;
-
-
-		.u-list {
-			height: 100% !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;
-				}
-
-			}
-
-		}
-	}
-
-	.bottom-wrapper {
-		height: 80rpx;
-		background: #fff;
-		padding: 0 32rpx;
-
-		/deep/ .uni-checkbox-input-checked {
-			background-color: $theme-color !important;
-			border-color: $theme-color !important;
-		}
-	}
-</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: 4rpx 0;
+
+  .u-list {
+    height: 100% !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;
+      }
+    }
+  }
+}
+
+.bottom-wrapper {
+  height: 80rpx;
+  background: #fff;
+  padding: 0 32rpx;
+
+  /deep/ .uni-checkbox-input-checked {
+    background-color: $theme-color !important;
+    border-color: $theme-color !important;
+  }
+}
+</style>