|  | @@ -31,12 +31,6 @@
 | 
	
		
			
				|  |  |  						placeholder="请选择库区" :options="areaList" @selectitem="SelectArea">
 | 
	
		
			
				|  |  |  					</select-lay>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  | -				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  | -					<text class="uni-form-item__title" style="width: 25%;">出入口: </text>
 | 
	
		
			
				|  |  | -					<select-lay style="width: 75%;float: right;" :zindex="zindex2" :value="port_addr" name="port_addr"
 | 
	
		
			
				|  |  | -						placeholder="请选择出入口" :options="portList" @selectitem="SelectPort">
 | 
	
		
			
				|  |  | -					</select-lay>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  |  				<view class="uni-padding-wrap uni-common-mt">
 | 
	
		
			
				|  |  |  					<button type="primary" @click="SelectProduct()">选择货物</button>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
	
		
			
				|  | @@ -49,14 +43,15 @@
 | 
	
		
			
				|  |  |  								<!-- 商品信息 -->
 | 
	
		
			
				|  |  |  								<view class="goods" style="border:1px solid #ccc">
 | 
	
		
			
				|  |  |  									<view class="meta" style="padding-bottom:15px;" @click="Delete(item)">
 | 
	
		
			
				|  |  | -										<view class="name">{{item.product_name}}</view>
 | 
	
		
			
				|  |  | +										<view class="name">{{item.product_name}}({{item.product_code}})</view>
 | 
	
		
			
				|  |  | +										<!-- <view class="specs">{{item.product_code}}</view> -->
 | 
	
		
			
				|  |  |  										<view class="status_view">{{item.status_view}}</view>
 | 
	
		
			
				|  |  | -									</view>·
 | 
	
		
			
				|  |  | +									</view>
 | 
	
		
			
				|  |  |  									<!-- 商品数量 -->
 | 
	
		
			
				|  |  |  									<view class="weightGroup" @click="Update(item)">
 | 
	
		
			
				|  |  | -										<text class="text_1">重量</text>
 | 
	
		
			
				|  |  | -										<text class="inputs">{{item.weight}}</text>
 | 
	
		
			
				|  |  | -										<text class="text">Kg</text>
 | 
	
		
			
				|  |  | +										<text
 | 
	
		
			
				|  |  | +											style="width: 40px;height: 100%;padding: 0 5rpx;font-size: 15px;color: #444;"></text>
 | 
	
		
			
				|  |  | +										<text class="inputs">{{item.packnum}}{{item.pack_view}}</text>
 | 
	
		
			
				|  |  |  									</view>
 | 
	
		
			
				|  |  |  									<!-- 商品数量 -->
 | 
	
		
			
				|  |  |  									<view class="numGroup" @click="Update(item)">
 | 
	
	
		
			
				|  | @@ -95,7 +90,7 @@
 | 
	
		
			
				|  |  |  				<text>提示</text>
 | 
	
		
			
				|  |  |  				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  |  					<text class="uni-form-item__title" style="width: 30%;">批次</text>
 | 
	
		
			
				|  |  | -					<input class="uni-input" :value="product_batch" disabled="true" />
 | 
	
		
			
				|  |  | +					<input class="uni-input" :value="product_batch" @input="batchChange" />
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  |  					<text class="uni-form-item__title" style="width: 30%;">产品名称</text>
 | 
	
	
		
			
				|  | @@ -106,8 +101,11 @@
 | 
	
		
			
				|  |  |  					<input type="number" class="uni-input" :value="product_num" @input="numChange" />
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  | -					<text class="uni-form-item__title" style="width: 30%;">包装方式</text>
 | 
	
		
			
				|  |  | -					<input class="uni-input" :value="product_pack" @input="packChange" />
 | 
	
		
			
				|  |  | +					<text class="uni-form-item__title" style="width: 30%;">包装方式: </text>
 | 
	
		
			
				|  |  | +					<select-lay style="width:70%;float: right;" :zindex="zindex3" :value="product_pack"
 | 
	
		
			
				|  |  | +						name="product_pack" placeholder="请选择包装方式" :options="ProductPackList"
 | 
	
		
			
				|  |  | +						@selectitem="SelectProductPack">
 | 
	
		
			
				|  |  | +					</select-lay>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view>
 | 
	
		
			
				|  |  |  					<text style="width: 30%;float: left;height: 35px;line-height: 35px;">生产日期</text>
 | 
	
	
		
			
				|  | @@ -117,13 +115,9 @@
 | 
	
		
			
				|  |  |  					</picker>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<br><br>
 | 
	
		
			
				|  |  | -				<br><br>
 | 
	
		
			
				|  |  | -				<view>
 | 
	
		
			
				|  |  | -					<button class="mini-btn" size="mini" @click="closeAddModal"
 | 
	
		
			
				|  |  | -						style="width: 50%;float: left;">关闭</button>
 | 
	
		
			
				|  |  | -					<button class="mini-btn" type="primary" size="mini" @click="SelectConfirm"
 | 
	
		
			
				|  |  | -						style="width: 50%;">添加</button>
 | 
	
		
			
				|  |  | -				</view>
 | 
	
		
			
				|  |  | +				<button class="mini-btn" size="mini" @click="closeModal" style="width: 50%;float: left;">关闭</button>
 | 
	
		
			
				|  |  | +				<button class="mini-btn" type="primary" size="mini" @click="SelectConfirm"
 | 
	
		
			
				|  |  | +					style="width: 50%;">添加</button>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
		
			
				|  |  |  		</custom-modal>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -133,7 +127,11 @@
 | 
	
		
			
				|  |  |  			<view>
 | 
	
		
			
				|  |  |  				<text>提示</text>
 | 
	
		
			
				|  |  |  				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  | -					<text class="uni-form-item__title" style="width: 30%;">货物名称</text>
 | 
	
		
			
				|  |  | +					<text class="uni-form-item__title" style="width: 30%;">批次</text>
 | 
	
		
			
				|  |  | +					<input class="uni-input" :value="product_batch" @input="batchChange" />
 | 
	
		
			
				|  |  | +				</view>
 | 
	
		
			
				|  |  | +				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  | +					<text class="uni-form-item__title" style="width: 30%;">产品名称</text>
 | 
	
		
			
				|  |  |  					<input class="uni-input" :value="product_name" disabled="true" />
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
	
		
			
				|  | @@ -141,8 +139,11 @@
 | 
	
		
			
				|  |  |  					<input type="number" class="uni-input" :value="product_num" @input="numChange" />
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view class="uni-input-wrapper" style="margin: 5px auto;">
 | 
	
		
			
				|  |  | -					<text class="uni-form-item__title" style="width: 30%;">重量</text>
 | 
	
		
			
				|  |  | -					<input type="number" class="uni-input" :value="product_weight" @input="weightChange" />
 | 
	
		
			
				|  |  | +					<text class="uni-form-item__title" style="width: 30%;">包装方式: </text>
 | 
	
		
			
				|  |  | +					<select-lay style="width: 70%;float: right;" :zindex="zindex3" :value="product_pack"
 | 
	
		
			
				|  |  | +						name="product_pack" placeholder="请选择包装方式" :options="ProductPackList"
 | 
	
		
			
				|  |  | +						@selectitem="SelectProductPack">
 | 
	
		
			
				|  |  | +					</select-lay>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  				<view>
 | 
	
		
			
				|  |  |  					<text style="width: 30%;float: left;height: 35px;line-height: 35px;">生产日期</text>
 | 
	
	
		
			
				|  | @@ -155,7 +156,7 @@
 | 
	
		
			
				|  |  |  				<view>
 | 
	
		
			
				|  |  |  					<button class="mini-btn" size="mini" @click="closeUpdateModal"
 | 
	
		
			
				|  |  |  						style="width: 50%;float: left;">关闭</button>
 | 
	
		
			
				|  |  | -					<button class="mini-btn" type="primary" size="mini" @click="UpdateWeight"
 | 
	
		
			
				|  |  | +					<button class="mini-btn" type="primary" size="mini" @click="UpdateProduct"
 | 
	
		
			
				|  |  |  						style="width: 50%;">修改</button>
 | 
	
		
			
				|  |  |  				</view>
 | 
	
		
			
				|  |  |  			</view>
 | 
	
	
		
			
				|  | @@ -184,6 +185,11 @@
 | 
	
		
			
				|  |  |  	var reqRootUrl = plus.storage.getItem("reqRootUrl");
 | 
	
		
			
				|  |  |  	let rData = [];
 | 
	
		
			
				|  |  |  	const SpeechTTS = uni.requireNativePlugin('MT-TTS-Speech');
 | 
	
		
			
				|  |  | +	let PackList = {
 | 
	
		
			
				|  |  | +		"noth": "无",
 | 
	
		
			
				|  |  | +		"box": "箱",
 | 
	
		
			
				|  |  | +		"basket": "筐",
 | 
	
		
			
				|  |  | +	};
 | 
	
		
			
				|  |  |  	export default {
 | 
	
		
			
				|  |  |  		components: {
 | 
	
		
			
				|  |  |  			CustomModal
 | 
	
	
		
			
				|  | @@ -196,7 +202,6 @@
 | 
	
		
			
				|  |  |  				container_code: "",
 | 
	
		
			
				|  |  |  				product_code: "",
 | 
	
		
			
				|  |  |  				product_name: "",
 | 
	
		
			
				|  |  | -				product_weight: "",
 | 
	
		
			
				|  |  |  				product_num: "",
 | 
	
		
			
				|  |  |  				del_tips: "",
 | 
	
		
			
				|  |  |  				sn: "",
 | 
	
	
		
			
				|  | @@ -213,13 +218,24 @@
 | 
	
		
			
				|  |  |  				plandate: currentDate,
 | 
	
		
			
				|  |  |  				BtnDisabled: false,
 | 
	
		
			
				|  |  |  				areaList: [],
 | 
	
		
			
				|  |  | -				portList: [],
 | 
	
		
			
				|  |  | -				port_addr: "",
 | 
	
		
			
				|  |  | +				ProductPackList: [{
 | 
	
		
			
				|  |  | +					label: "无",
 | 
	
		
			
				|  |  | +					value: "noth"
 | 
	
		
			
				|  |  | +				}, {
 | 
	
		
			
				|  |  | +					label: "箱",
 | 
	
		
			
				|  |  | +					value: "box"
 | 
	
		
			
				|  |  | +				}, {
 | 
	
		
			
				|  |  | +					label: "筐",
 | 
	
		
			
				|  |  | +					value: "basket"
 | 
	
		
			
				|  |  | +				}],
 | 
	
		
			
				|  |  |  				product_pack: "",
 | 
	
		
			
				|  |  |  				product_batch: "",
 | 
	
		
			
				|  |  |  				area_sn: "",
 | 
	
		
			
				|  |  |  				zindex1: 11,
 | 
	
		
			
				|  |  | -				zindex2: 10,
 | 
	
		
			
				|  |  | +				zindex3: 12,
 | 
	
		
			
				|  |  | +				basketnum: 0,
 | 
	
		
			
				|  |  | +				boxnum: 0,
 | 
	
		
			
				|  |  | +				packnum: 0,
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		},
 | 
	
		
			
				|  |  |  		computed: {
 | 
	
	
		
			
				|  | @@ -309,14 +325,21 @@
 | 
	
		
			
				|  |  |  					this.area_sn = "";
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -			SelectPort(index, item) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			SelectProductPack(index, item) {
 | 
	
		
			
				|  |  |  				if (index >= 0) {
 | 
	
		
			
				|  |  | -					this.port_addr = item.value;
 | 
	
		
			
				|  |  | +					this.product_pack = item.value;
 | 
	
		
			
				|  |  |  				} else {
 | 
	
		
			
				|  |  | -					this.port_addr = "";
 | 
	
		
			
				|  |  | +					this.product_pack = "";
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  			SelectProduct() {
 | 
	
		
			
				|  |  | +				if (_this.tableData.length > 0) {
 | 
	
		
			
				|  |  | +					_this.alertInfo("只能添加一种货物!")
 | 
	
		
			
				|  |  | +					return
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  				setTimeout(() => {
 | 
	
		
			
				|  |  |  					_this.firstFocus = false;
 | 
	
		
			
				|  |  |  					uni.navigateTo({
 | 
	
	
		
			
				|  | @@ -324,11 +347,6 @@
 | 
	
		
			
				|  |  |  					})
 | 
	
		
			
				|  |  |  				}, 30);
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -			packChange: function(e) {
 | 
	
		
			
				|  |  | -				this.product_pack = e.target.value
 | 
	
		
			
				|  |  | -			},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  			hideKeyboard: function(event) {
 | 
	
		
			
				|  |  |  				uni.hideKeyboard();
 | 
	
		
			
				|  |  |  				let Value = event.detail.value;
 | 
	
	
		
			
				|  | @@ -348,6 +366,7 @@
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  						}),
 | 
	
		
			
				|  |  |  						success: (ret) => {
 | 
	
		
			
				|  |  | +							_this.zindex1 = 11;
 | 
	
		
			
				|  |  |  							let rows = ret.data.data;
 | 
	
		
			
				|  |  |  							if (_this.isEmpty(rows)) {
 | 
	
		
			
				|  |  |  								_this.alertInfo("托盘码错误,请重新扫描!")
 | 
	
	
		
			
				|  | @@ -380,13 +399,19 @@
 | 
	
		
			
				|  |  |  										_this.BtnDisabled = true
 | 
	
		
			
				|  |  |  										rows["group_disk"][i]["status_view"] = "已组盘"
 | 
	
		
			
				|  |  |  									}
 | 
	
		
			
				|  |  | +									rows["group_disk"][i]["pack_view"] = PackList[rows["group_disk"][i][
 | 
	
		
			
				|  |  | +										"pack"
 | 
	
		
			
				|  |  | +									]]
 | 
	
		
			
				|  |  |  									disk.push(rows["group_disk"][i])
 | 
	
		
			
				|  |  |  								}
 | 
	
		
			
				|  |  |  								rData = disk;
 | 
	
		
			
				|  |  |  								if (rData.length > 0) {
 | 
	
		
			
				|  |  | +									_this.product_batch = rData[0]["batch"];
 | 
	
		
			
				|  |  |  									_this.product_name = rData[0]["product_name"];
 | 
	
		
			
				|  |  |  									_this.product_code = rData[0]["product_code"];
 | 
	
		
			
				|  |  |  									_this.container_code = rData[0]["container_code"];
 | 
	
		
			
				|  |  | +									_this.product_pack = rData[0]["pack"];
 | 
	
		
			
				|  |  | +									_this.packnum = rData[0]["packnum"];
 | 
	
		
			
				|  |  |  									uni.setStorageSync("container_code", rData[0]["container_code"])
 | 
	
		
			
				|  |  |  									uni.setStorageSync("receipt_num", rData[0]["receipt_num"])
 | 
	
		
			
				|  |  |  								}
 | 
	
	
		
			
				|  | @@ -418,9 +443,10 @@
 | 
	
		
			
				|  |  |  													"param": {
 | 
	
		
			
				|  |  |  														"sn": _this.tableData[i]["sn"],
 | 
	
		
			
				|  |  |  														"container_code": Value,
 | 
	
		
			
				|  |  | -														"product_code": _this.tableData[i][
 | 
	
		
			
				|  |  | -															"product_code"
 | 
	
		
			
				|  |  | -														]
 | 
	
		
			
				|  |  | +														"product_code": _this
 | 
	
		
			
				|  |  | +															.tableData[i][
 | 
	
		
			
				|  |  | +																"product_code"
 | 
	
		
			
				|  |  | +															]
 | 
	
		
			
				|  |  |  													}
 | 
	
		
			
				|  |  |  												}),
 | 
	
		
			
				|  |  |  												success: (ret) => {
 | 
	
	
		
			
				|  | @@ -450,6 +476,8 @@
 | 
	
		
			
				|  |  |  								_this.product_name = rows["product"]["name"];
 | 
	
		
			
				|  |  |  								_this.product_num = parseFloat(rows["product"]["ragnum"]);
 | 
	
		
			
				|  |  |  								_this.product_pack = "";
 | 
	
		
			
				|  |  | +								_this.basketnum = parseFloat(rows["product"]["basketnum"]);
 | 
	
		
			
				|  |  | +								_this.boxnum = parseFloat(rows["product"]["boxnum"]);
 | 
	
		
			
				|  |  |  								let date = this.getYearMonthDay("")
 | 
	
		
			
				|  |  |  								let packCode = ""
 | 
	
		
			
				|  |  |  								switch (rows["product"]["pack"]) {
 | 
	
	
		
			
				|  | @@ -467,7 +495,6 @@
 | 
	
		
			
				|  |  |  									date;
 | 
	
		
			
				|  |  |  								_this.viewText = "";
 | 
	
		
			
				|  |  |  								_this.zindex1 = 0;
 | 
	
		
			
				|  |  | -								_this.zindex2 = 0;
 | 
	
		
			
				|  |  |  								_this.addModalVisible = true;
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  						},
 | 
	
	
		
			
				|  | @@ -481,24 +508,20 @@
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			closeAddModal() {
 | 
	
		
			
				|  |  | -				// 关闭模态框  
 | 
	
		
			
				|  |  | -				this.addModalVisible = false;
 | 
	
		
			
				|  |  | -			},
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  			closeUpdateModal() {
 | 
	
		
			
				|  |  |  				// 关闭模态框  
 | 
	
		
			
				|  |  | +				_this.zindex1 = 11;
 | 
	
		
			
				|  |  |  				this.updateModalVisible = false;
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			plandateChange: function(e) {
 | 
	
		
			
				|  |  |  				this.plandate = e.target.value
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -			weightChange: function(e) {
 | 
	
		
			
				|  |  | -				this.product_weight = e.target.value
 | 
	
		
			
				|  |  | -			},
 | 
	
		
			
				|  |  |  			numChange: function(e) {
 | 
	
		
			
				|  |  |  				this.product_num = e.target.value
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | +			batchChange: function(e) {
 | 
	
		
			
				|  |  | +				this.product_batch = e.target.value
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  |  			getDate(type) {
 | 
	
		
			
				|  |  |  				const date = new Date();
 | 
	
		
			
				|  |  |  				let year = date.getFullYear();
 | 
	
	
		
			
				|  | @@ -515,11 +538,22 @@
 | 
	
		
			
				|  |  |  				return `${year}-${month}-${day}`;
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +			closeModal() {
 | 
	
		
			
				|  |  | +				// 关闭模态框  
 | 
	
		
			
				|  |  | +				_this.zindex1 = 11;
 | 
	
		
			
				|  |  | +				this.addModalVisible = false;
 | 
	
		
			
				|  |  | +			},
 | 
	
		
			
				|  |  |  			SelectConfirm() {
 | 
	
		
			
				|  |  |  				_this.firstFocus = false;
 | 
	
		
			
				|  |  |  				setTimeout(() => {
 | 
	
		
			
				|  |  |  					let receiptNum = uni.getStorageSync("receipt_num")
 | 
	
		
			
				|  |  |  					let containerCode = uni.getStorageSync("container_code")
 | 
	
		
			
				|  |  | +					if (_this.product_pack === "box") {
 | 
	
		
			
				|  |  | +						_this.packnum = parseFloat(_this.product_num) / parseFloat(_this.boxnum)
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					if (_this.product_pack === "basket") {
 | 
	
		
			
				|  |  | +						_this.packnum = parseFloat(_this.product_num) / parseFloat(_this.basketnum)
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  |  					uni.request({
 | 
	
		
			
				|  |  |  						url: reqRootUrl + '/wms/api',
 | 
	
		
			
				|  |  |  						method: 'POST',
 | 
	
	
		
			
				|  | @@ -532,11 +566,12 @@
 | 
	
		
			
				|  |  |  								"receipt_num": receiptNum,
 | 
	
		
			
				|  |  |  								"product_code": _this.product_code,
 | 
	
		
			
				|  |  |  								"container_code": _this.container_code,
 | 
	
		
			
				|  |  | -								"weight": parseFloat(_this.product_weight),
 | 
	
		
			
				|  |  |  								"num": parseFloat(_this.product_num),
 | 
	
		
			
				|  |  |  								"plandate": new Date(_this.plandate).getTime(),
 | 
	
		
			
				|  |  |  								"types": "normal",
 | 
	
		
			
				|  |  |  								"batch": _this.product_batch,
 | 
	
		
			
				|  |  | +								"pack": _this.product_pack,
 | 
	
		
			
				|  |  | +								"packnum": _this.packnum,
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  						}),
 | 
	
		
			
				|  |  |  						success: (ret) => {
 | 
	
	
		
			
				|  | @@ -549,10 +584,10 @@
 | 
	
		
			
				|  |  |  										_this.viewText = "";
 | 
	
		
			
				|  |  |  										_this.product_sn = "";
 | 
	
		
			
				|  |  |  										_this.product_name = "";
 | 
	
		
			
				|  |  | -										_this.product_weight = "";
 | 
	
		
			
				|  |  | -										_this.product_num = "";
 | 
	
		
			
				|  |  | +										_this.product_batch = "";
 | 
	
		
			
				|  |  | +										_this.product_pack = "";
 | 
	
		
			
				|  |  |  										_this.zindex1 = 11;
 | 
	
		
			
				|  |  | -										_this.zindex2 = 10;
 | 
	
		
			
				|  |  | +										_this.packnum = 0;
 | 
	
		
			
				|  |  |  										// 关闭窗口后,恢复默认内容
 | 
	
		
			
				|  |  |  										_this.addModalVisible = false;
 | 
	
		
			
				|  |  |  										_this.getList();
 | 
	
	
		
			
				|  | @@ -621,18 +656,19 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			dialogClose() {
 | 
	
		
			
				|  |  |  				_this.getList();
 | 
	
		
			
				|  |  | +				_this.zindex1 = 11;
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			Update(item) {
 | 
	
		
			
				|  |  | -				console.log("item", item)
 | 
	
		
			
				|  |  | +				_this.zindex1 = 0;
 | 
	
		
			
				|  |  |  				_this.sn = item["sn"]
 | 
	
		
			
				|  |  | -				_this.product_weight = item["weight"]
 | 
	
		
			
				|  |  | +				_this.product_pack = item["pack"]
 | 
	
		
			
				|  |  |  				_this.product_num = item["num"]
 | 
	
		
			
				|  |  |  				_this.product_code = item["product_code"]
 | 
	
		
			
				|  |  |  				_this.plandate = _this.formattedDate(item["plandate"])
 | 
	
		
			
				|  |  |  				_this.updateModalVisible = true;
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  | -			UpdateWeight() {
 | 
	
		
			
				|  |  | +			UpdateProduct() {
 | 
	
		
			
				|  |  |  				setTimeout(() => {
 | 
	
		
			
				|  |  |  					uni.request({
 | 
	
		
			
				|  |  |  						url: reqRootUrl + '/wms/api',
 | 
	
	
		
			
				|  | @@ -644,14 +680,17 @@
 | 
	
		
			
				|  |  |  							"method": "GroupDiskUpdate",
 | 
	
		
			
				|  |  |  							"param": {
 | 
	
		
			
				|  |  |  								"sn": _this.sn,
 | 
	
		
			
				|  |  | -								"weight": parseFloat(_this.product_weight),
 | 
	
		
			
				|  |  |  								"product_code": _this.product_code,
 | 
	
		
			
				|  |  |  								"num": parseFloat(_this.product_num),
 | 
	
		
			
				|  |  |  								"plandate": new Date(_this.plandate).getTime(),
 | 
	
		
			
				|  |  | +								"batch": _this.product_batch,
 | 
	
		
			
				|  |  | +								"pack": _this.product_pack,
 | 
	
		
			
				|  |  | +								"packnum": _this.packnum,
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  						}),
 | 
	
		
			
				|  |  |  						success: (ret) => {
 | 
	
		
			
				|  |  |  							_this.alertInfo("更新成功!")
 | 
	
		
			
				|  |  | +							_this.zindex1 = 11;
 | 
	
		
			
				|  |  |  							_this.getList()
 | 
	
		
			
				|  |  |  							//处理成功逻辑
 | 
	
		
			
				|  |  |  						},
 | 
	
	
		
			
				|  | @@ -697,12 +736,15 @@
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  							_this.product_name = rData[0]["product_name"];
 | 
	
		
			
				|  |  |  							_this.product_code = rData[0]["product_code"];
 | 
	
		
			
				|  |  | +							_this.product_pack = rData[0]["pack"];
 | 
	
		
			
				|  |  | +							_this.packnum = rData[0]["packnum"];
 | 
	
		
			
				|  |  |  							for (var i = 0; i < rows.length; i++) {
 | 
	
		
			
				|  |  | -								if (rows[i]["status"] === "status_success") {
 | 
	
		
			
				|  |  | +								if (rows[i]["status"] === "status_yes") {
 | 
	
		
			
				|  |  |  									rows[i]["status_view"] = "已组盘"
 | 
	
		
			
				|  |  |  								} else {
 | 
	
		
			
				|  |  |  									rows[i]["status_view"] = "待组盘"
 | 
	
		
			
				|  |  |  								}
 | 
	
		
			
				|  |  | +								rows[i]["pack_view"] = PackList[rows[i]["pack"]]
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  							_this.tableData = rows;
 | 
	
		
			
				|  |  |  						} else {
 | 
	
	
		
			
				|  | @@ -738,6 +780,10 @@
 | 
	
		
			
				|  |  |  			dialogGroup() {
 | 
	
		
			
				|  |  |  				let sns = [];
 | 
	
		
			
				|  |  |  				let productSn = rData[0]["product_sn"];
 | 
	
		
			
				|  |  | +				if (rData.length > 1) {
 | 
	
		
			
				|  |  | +					_this.alertInfo("组盘失败!只能添加一种货物")
 | 
	
		
			
				|  |  | +					return
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |  				for (var i = 0; i < rData.length; i++) {
 | 
	
		
			
				|  |  |  					if (rData[i]["status"] !== "status_wait") {
 | 
	
		
			
				|  |  |  						continue
 | 
	
	
		
			
				|  | @@ -760,8 +806,8 @@
 | 
	
		
			
				|  |  |  							"group_disk_sn_list": sns,
 | 
	
		
			
				|  |  |  							"container_code": containerCode,
 | 
	
		
			
				|  |  |  							"types": "normal",
 | 
	
		
			
				|  |  | -							"areaSn": this.area_sn,
 | 
	
		
			
				|  |  | -							"portAddr": this.port_addr,
 | 
	
		
			
				|  |  | +							"areaSn": _this.area_sn,
 | 
	
		
			
				|  |  | +							product_pack: _this.product_pack,
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  					}),
 | 
	
		
			
				|  |  |  					success: (ret) => {
 | 
	
	
		
			
				|  | @@ -775,7 +821,7 @@
 | 
	
		
			
				|  |  |  								_this.viewText = "";
 | 
	
		
			
				|  |  |  								_this.container_code = "";
 | 
	
		
			
				|  |  |  								_this.area_sn = "";
 | 
	
		
			
				|  |  | -								_this.port_addr = ""
 | 
	
		
			
				|  |  | +								_this.product_pack = "";
 | 
	
		
			
				|  |  |  								uni.setStorageSync("container_code", "")
 | 
	
		
			
				|  |  |  								_this.getList()
 | 
	
		
			
				|  |  |  							})
 | 
	
	
		
			
				|  | @@ -834,40 +880,6 @@
 | 
	
		
			
				|  |  |  						// console.log('complete');
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  				})
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -				uni.request({
 | 
	
		
			
				|  |  | -					url: reqRootUrl + '/wms/api',
 | 
	
		
			
				|  |  | -					method: 'POST',
 | 
	
		
			
				|  |  | -					headers: {
 | 
	
		
			
				|  |  | -						'Content-Type': 'application/json'
 | 
	
		
			
				|  |  | -					},
 | 
	
		
			
				|  |  | -					data: JSON.stringify({
 | 
	
		
			
				|  |  | -						"method": "PortGet",
 | 
	
		
			
				|  |  | -						"param": {
 | 
	
		
			
				|  |  | -							"disable": false,
 | 
	
		
			
				|  |  | -						}
 | 
	
		
			
				|  |  | -					}),
 | 
	
		
			
				|  |  | -					success: (ret) => {
 | 
	
		
			
				|  |  | -						if (ret.data.ret === "ok") {
 | 
	
		
			
				|  |  | -							this.portList = [];
 | 
	
		
			
				|  |  | -							let rows = ret.data.data;
 | 
	
		
			
				|  |  | -							for (var i = 0; i < rows.length; i++) {
 | 
	
		
			
				|  |  | -								let spaceAddr = rows[i].addr
 | 
	
		
			
				|  |  | -								let str = spaceAddr.f + "-" + spaceAddr.c + "-" + spaceAddr.r
 | 
	
		
			
				|  |  | -								this.portList.push({
 | 
	
		
			
				|  |  | -									label: rows[i].alias,
 | 
	
		
			
				|  |  | -									value: str,
 | 
	
		
			
				|  |  | -								})
 | 
	
		
			
				|  |  | -							}
 | 
	
		
			
				|  |  | -						}
 | 
	
		
			
				|  |  | -					},
 | 
	
		
			
				|  |  | -					fail: (err) => {
 | 
	
		
			
				|  |  | -						// console.log('request fail', err);
 | 
	
		
			
				|  |  | -					},
 | 
	
		
			
				|  |  | -					complete: () => {
 | 
	
		
			
				|  |  | -						// console.log('complete');
 | 
	
		
			
				|  |  | -					}
 | 
	
		
			
				|  |  | -				})
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			getYearMonthDay(str) {
 | 
	
		
			
				|  |  |  				let today = new Date();
 | 
	
	
		
			
				|  | @@ -884,7 +896,8 @@
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			isEmpty: function(obj) {
 | 
	
		
			
				|  |  | -				return typeof obj === undefined || obj == null || obj === "" || obj === "000000000000000000000000" ||
 | 
	
		
			
				|  |  | +				return typeof obj === undefined || obj == null || obj === "" || obj ===
 | 
	
		
			
				|  |  | +					"000000000000000000000000" ||
 | 
	
		
			
				|  |  |  					obj.length === 0;
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			alertInfo(str) {
 | 
	
	
		
			
				|  | @@ -1189,9 +1202,6 @@
 | 
	
		
			
				|  |  |  				padding-top: 5px;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  			// 商品数量
 | 
	
		
			
				|  |  |  			.numGroup {
 | 
	
		
			
				|  |  |  				// border: 1px solid green;
 | 
	
	
		
			
				|  | @@ -1271,9 +1281,6 @@
 | 
	
		
			
				|  |  |  					// background-color: #f6f6f6;
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		.cart-swipe {
 |