YL2767 1 week ago
parent
commit
7dfb904c1d
1 changed files with 155 additions and 26 deletions
  1. 155
    26
      src/view/ware/storechange.vue

+ 155
- 26
src/view/ware/storechange.vue View File

54
 							</el-option>
54
 							</el-option>
55
 						</el-select>
55
 						</el-select>
56
 					</el-form-item>
56
 					</el-form-item>
57
+					<el-form-item label="是否已出库" style="margin-left: -35px">
58
+						<el-select v-model="query.outFlag" filterable placeholder="请选择订单客户" clearable size="small" style="margin-left: 5px; width: 170px">
59
+							<el-option v-for="item in optionsOutFlag" :key="item.value" :label="item.label" :value="item.value" >
60
+							</el-option>
61
+						</el-select>
62
+					</el-form-item>
63
+					<el-form-item label="入库时间" style="margin-left: -35px">
64
+						<el-date-picker size="small" v-model="query.inRecordDate"  style="width:330px;margin-left: -8px" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
65
+						</el-date-picker>
66
+					</el-form-item>
57
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
67
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
58
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
68
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
59
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
69
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
75
 						</el-dropdown>
85
 						</el-dropdown>
76
 						
86
 						
77
 					</el-form-item>
87
 					</el-form-item>
88
+
89
+					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
90
+						<el-dropdown placement="bottom" trigger="click" @command="batchOperate">
91
+							<el-button type="danger" size="small"> 封锁出仓<i class="el-icon-arrow-down el-icon--right"></i></el-button>
92
+							<el-dropdown-menu slot="dropdown">
93
+								<el-dropdown-item command="handleLock" style="background-color: #f5f5f5;">封锁</el-dropdown-item>
94
+								<el-dropdown-item command="handleUnLock" style="background-color: #f5f5f5;">取消封锁</el-dropdown-item>
95
+								<el-dropdown-item command="handleOutbound" style="background-color: #f5f5f5;">出仓</el-dropdown-item>
96
+							</el-dropdown-menu>
97
+						</el-dropdown>
98
+						
99
+					</el-form-item>
78
 				</el-row>
100
 				</el-row>
79
 				
101
 				
80
 			</el-form>
102
 			</el-form>
131
 				</el-table-column>
153
 				</el-table-column>
132
 				<el-table-column prop="payWay" label="月付方式" width="100" show-overflow-tooltip header-align="center">
154
 				<el-table-column prop="payWay" label="月付方式" width="100" show-overflow-tooltip header-align="center">
133
 				</el-table-column>
155
 				</el-table-column>
156
+				<el-table-column prop="outBound" label="是否出仓" width="100" show-overflow-tooltip header-align="center">
157
+				</el-table-column>
134
 				<el-table-column prop="inwareDay" label="存储天数" width="100" show-overflow-tooltip header-align="center">
158
 				<el-table-column prop="inwareDay" label="存储天数" width="100" show-overflow-tooltip header-align="center">
135
 				</el-table-column>
159
 				</el-table-column>
136
 			</el-table>
160
 			</el-table>
334
 					contractNo:[],
358
 					contractNo:[],
335
 					packNo:[],
359
 					packNo:[],
336
 					fkcustmerName:'',
360
 					fkcustmerName:'',
337
-					remark1:''
361
+					remark1:'',
362
+					outFlag:'0',
363
+					inRecordDate:[]
338
 				},
364
 				},
339
 				multipleSelection: [],
365
 				multipleSelection: [],
340
 				tableData: [],
366
 				tableData: [],
382
 				newOrdno:'',
408
 				newOrdno:'',
383
 				newReceiveaddress:'',
409
 				newReceiveaddress:'',
384
 				newProductionplace:'',
410
 				newProductionplace:'',
385
-				newPackno:''
411
+				newPackno:'',
412
+				optionsOutFlag:[{
413
+					value: '0',
414
+					label: '在库'
415
+				},{
416
+					value: '1',
417
+					label: '已出库'
418
+				}],
386
 			};
419
 			};
387
 		},
420
 		},
388
 		mounted() {
421
 		mounted() {
415
 					case "handleChangeStack":
448
 					case "handleChangeStack":
416
 						this.handleChangeStack();
449
 						this.handleChangeStack();
417
 						break;
450
 						break;
451
+					case "handleLock":
452
+						this.handleLock();
453
+						break;
454
+					case "handleUnLock":
455
+						this.handleUnLock();
456
+						break;
457
+					case "handleOutbound":
458
+						this.handleOutbound();
459
+						break;
418
 				}
460
 				}
419
 			},
461
 			},
420
 
462
 
591
 			},
633
 			},
592
 
634
 
593
 			getTableData() {
635
 			getTableData() {
636
+				if(this.query.outFlag == '1' && this.query.inRecordDate == null){
637
+					this.$message({
638
+						type: 'error',
639
+						message: '查询历史数据请选择入库时间区间',
640
+					});
641
+					return
642
+				}
643
+				if(this.query.inRecordDate == null){
644
+					this.query.inRecordDate = [false,false];
645
+				}
594
 				this.loading = true
646
 				this.loading = true
595
 				var url = 'WareStore/queryStore.do'
647
 				var url = 'WareStore/queryStore.do'
596
 				var param = {
648
 				var param = {
607
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
659
 					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
608
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
660
 					contractNo: this.query.contractNo == 0 ? '' : this.query.contractNo.join(','),
609
 					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
661
 					packNo: this.query.packNo == 0 ? '' : this.query.packNo.join(','),
610
-					remark1: this.query.remark1
662
+					remark1: this.query.remark1,
663
+					outFlag: this.query.outFlag,
664
+
611
 				}
665
 				}
612
 				//console.log(param);
666
 				//console.log(param);
613
 				axios.get(url, param).then(response => {
667
 				axios.get(url, param).then(response => {
903
 			},
957
 			},
904
 			handleTableSelect(selection, row) {  //第一个参数是目前所有选中的数据
958
 			handleTableSelect(selection, row) {  //第一个参数是目前所有选中的数据
905
 				console.log(JSON.stringify(row))
959
 				console.log(JSON.stringify(row))
906
-				if (row.lockFlag == '1') {
907
-					// this.$message({
908
-					// 	type: 'error',
909
-					// 	message: '该行已被配货锁定',
910
-					// });
911
-					alert("该行已被配货锁定")
912
-					this.toggleSelection([row], false)
913
-					// for(let i = 0;i<selection.length;i++){
914
-					//  if(selection[i]==row){
915
-					// 	 selection.splice(i,1)
916
-					//  }
917
-					// }
918
-				} else {
919
-					this.selectRows = selection
920
-					this.setLayerColor()
921
-				}
960
+				this.selectRows = selection
961
+				this.setLayerColor()
922
 			},
962
 			},
923
 			selectAll(selection){
963
 			selectAll(selection){
924
 				this.selectRows = selection;
964
 				this.selectRows = selection;
1078
 					return v[j]
1118
 					return v[j]
1079
 				}))
1119
 				}))
1080
 			},
1120
 			},
1081
-
1082
-			//showChangeAddress() {},
1083
-			// handleAddressSave() {
1084
-			// },
1085
-			// handleAddressCancelSave() {
1086
-			// 	this.addressDialogVisible = false
1087
-			// },
1121
+			handleLock(){
1122
+				this.$confirm("确认将选中的材料进行封锁吗?", "提示", {
1123
+					confirmButtonText:'确认',
1124
+					cancelButtonText:'取消',
1125
+					type: "warning"
1126
+				}).then(() => {
1127
+					if (this.selectRows.length < 1) {
1128
+						this.$message({
1129
+						type: 'error',
1130
+						message: '至少选择一条数据!',
1131
+						});
1132
+						return
1133
+					} else {
1134
+						var url = 'WareStore/lockAndUnlock.do'
1135
+						var param = {
1136
+							json: JSON.stringify(this.selectRows),
1137
+							lockFlag:'1'
1138
+						}
1139
+						axios.post(url, param).then(response => {
1140
+							if (response.data.code == 0) {
1141
+								this.getTableData()
1142
+							} else {
1143
+								this.$message({
1144
+									type: 'error',
1145
+									message: '操作失败;' + response.data.msg,
1146
+								});
1147
+							}
1148
+						});
1149
+					}
1150
+				}).catch(() => {});
1151
+			},
1152
+			handleUnLock(){
1153
+				this.$confirm("确认将选中的材料取消封锁吗?", "提示", {
1154
+					confirmButtonText:'确认',
1155
+					cancelButtonText:'取消',
1156
+					type: "warning"
1157
+				}).then(() => {
1158
+					if (this.selectRows.length < 1) {
1159
+						this.$message({
1160
+						type: 'error',
1161
+						message: '至少选择一条数据!',
1162
+						});
1163
+						return
1164
+					} else {
1165
+						var url = 'WareStore/lockAndUnlock.do'
1166
+						var param = {
1167
+							json: JSON.stringify(this.selectRows),
1168
+							lockFlag:'0'
1169
+						}
1170
+						axios.post(url, param).then(response => {
1171
+							if (response.data.code == 0) {
1172
+								this.getTableData()
1173
+							} else {
1174
+								this.$message({
1175
+									type: 'error',
1176
+									message: '操作失败;' + response.data.msg,
1177
+								});
1178
+							}
1179
+						});
1180
+					}
1181
+				}).catch(() => {});
1182
+			},
1183
+			handleOutbound(){
1184
+				this.$confirm("确认将选中的材料标记为出仓吗?", "提示", {
1185
+					confirmButtonText:'确认',
1186
+					cancelButtonText:'取消',
1187
+					type: "warning"
1188
+				}).then(() => {
1189
+					if (this.selectRows.length < 1) {
1190
+						this.$message({
1191
+						type: 'error',
1192
+						message: '至少选择一条数据!',
1193
+						});
1194
+						return
1195
+					} else {
1196
+						var url = 'WareStore/Outbound.do'
1197
+						var param = {
1198
+							json: JSON.stringify(this.selectRows),
1199
+							outbound: '已出仓'
1200
+						}
1201
+						axios.post(url, param).then(response => {
1202
+							if (response.data.code == 0) {
1203
+								this.getTableData()
1204
+							} else {
1205
+								this.$message({
1206
+									type: 'error',
1207
+									message: '操作失败;' + response.data.msg,
1208
+								});
1209
+							}
1210
+						});
1211
+					}
1212
+				}).catch(() => {});
1213
+			},
1088
 		},
1214
 		},
1215
+
1216
+		
1217
+
1089
 	}
1218
 	}
1090
 </script>
1219
 </script>
1091
 
1220
 

Loading…
Cancel
Save