张庆宇 2 个月前
父节点
当前提交
753e45bcf9
共有 2 个文件被更改,包括 69 次插入11 次删除
  1. 2
    2
      config/dev.env.js
  2. 67
    9
      src/view/ware/storechange.vue

+ 2
- 2
config/dev.env.js 查看文件

4
 
4
 
5
 module.exports = merge(prodEnv, {
5
 module.exports = merge(prodEnv, {
6
   NODE_ENV: '"development"',
6
   NODE_ENV: '"development"',
7
-	 BASE_API: '"http://localhost:8080/thware/"'
7
+	// BASE_API: '"http://localhost:8080/thware/"'
8
 	// BASE_API: '"http://47.104.245.159:8081/thware/"'
8
 	// BASE_API: '"http://47.104.245.159:8081/thware/"'
9
-	// BASE_API: '"http://120.224.213.150/thware_zg/"'
9
+	 BASE_API: '"http://120.224.213.150/thware_zg/"'
10
 })
10
 })

+ 67
- 9
src/view/ware/storechange.vue 查看文件

258
 				<el-row>
258
 				<el-row>
259
 					<el-col :span="9">
259
 					<el-col :span="9">
260
 						<el-form-item label="材料编号">
260
 						<el-form-item label="材料编号">
261
-							<el-input v-model.number="store.plateNo"></el-input>
261
+							<el-input v-model="store.plateNo"></el-input>
262
 						</el-form-item>
262
 						</el-form-item>
263
 					</el-col>
263
 					</el-col>
264
 					<el-col :span="9">
264
 					<el-col :span="9">
265
 						<el-form-item label="规格型号">
265
 						<el-form-item label="规格型号">
266
-							<el-input v-model.number="store.model"></el-input>
266
+							<el-input v-model="store.model"></el-input>
267
 						</el-form-item>
267
 						</el-form-item>
268
 					</el-col>
268
 					</el-col>
269
 				</el-row>
269
 				</el-row>
270
 				<el-row>
270
 				<el-row>
271
 					<el-col :span="9">
271
 					<el-col :span="9">
272
 						<el-form-item label="品名">
272
 						<el-form-item label="品名">
273
-							<el-input v-model.number="store.material.name"></el-input>
273
+							<!-- <el-input v-model.number="store.material.name"></el-input> -->
274
+							<el-select v-model="store.material.name" filterable placeholder="请选择客户名称" clearable @change="changematerial">
275
+								<el-option v-for="item in optionsMaterial" :key="item.id" :label="item.name+'-'+item.standard" :value="item" >
276
+								</el-option>
277
+							</el-select>
274
 						</el-form-item>
278
 						</el-form-item>
275
 					</el-col>
279
 					</el-col>
276
 					<el-col :span="9">
280
 					<el-col :span="9">
277
 						<el-form-item label="钢种">
281
 						<el-form-item label="钢种">
278
-							<el-input v-model.number="store.material.standard"></el-input>
282
+							<el-input v-model="store.material.standard" :disabled="true"></el-input>
279
 						</el-form-item>
283
 						</el-form-item>
280
 					</el-col>
284
 					</el-col>
281
 				</el-row>
285
 				</el-row>
294
 				<el-row>
298
 				<el-row>
295
 					<el-col :span="9">
299
 					<el-col :span="9">
296
 						<el-form-item label="订单号">
300
 						<el-form-item label="订单号">
297
-							<el-input v-model.number="store.ordNo"></el-input>
301
+							<el-input v-model="store.ordNo"></el-input>
298
 						</el-form-item>
302
 						</el-form-item>
299
 					</el-col>
303
 					</el-col>
300
 					<el-col :span="9">
304
 					<el-col :span="9">
301
 						<el-form-item label="合约号">
305
 						<el-form-item label="合约号">
302
-							<el-input v-model.number="store.contractNo"></el-input>
306
+							<el-input v-model="store.contractNo"></el-input>
303
 						</el-form-item>
307
 						</el-form-item>
304
 					</el-col>
308
 					</el-col>
305
 				</el-row>
309
 				</el-row>
306
 				<el-row>
310
 				<el-row>
307
 					<el-col :span="9">
311
 					<el-col :span="9">
308
 						<el-form-item label="捆包号">
312
 						<el-form-item label="捆包号">
309
-							<el-input v-model.number="store.packNo"></el-input>
313
+							<el-input v-model="store.packNo"></el-input>
310
 						</el-form-item>
314
 						</el-form-item>
311
 					</el-col>
315
 					</el-col>
312
 					<el-col :span="9">
316
 					<el-col :span="9">
313
 						<el-form-item label="产地">
317
 						<el-form-item label="产地">
314
-							<el-input v-model.number="store.productionPlace"></el-input>
318
+							<el-input v-model="store.productionPlace"></el-input>
315
 						</el-form-item>
319
 						</el-form-item>
316
 					</el-col>
320
 					</el-col>
317
 				</el-row>
321
 				</el-row>
401
 				},
405
 				},
402
 				optionsWare: [],   //库房下拉框
406
 				optionsWare: [],   //库房下拉框
403
 				optionsCust: [],   //客户名称下拉框
407
 				optionsCust: [],   //客户名称下拉框
408
+				optionsMaterial: [],   //客户名称下拉框
404
 				optionsOutFlag: [{ //物料状态下拉框
409
 				optionsOutFlag: [{ //物料状态下拉框
405
 					value: '0',
410
 					value: '0',
406
 					label: '在库'
411
 					label: '在库'
498
 		mounted() {
503
 		mounted() {
499
 			this.getWare()         //初始化-库房下拉框-数据载入
504
 			this.getWare()         //初始化-库房下拉框-数据载入
500
 			this.getAllCustomer()  //初始化-客户下拉框-数据载入
505
 			this.getAllCustomer()  //初始化-客户下拉框-数据载入
506
+			this.getAllMaterial()  //初始化-物料下拉框-数据载入
501
 		},
507
 		},
502
 		methods: {
508
 		methods: {
503
 			//获取--库房下拉框--数据
509
 			//获取--库房下拉框--数据
520
 					this.optionsCust = response.data.data
526
 					this.optionsCust = response.data.data
521
 				});
527
 				});
522
 			},
528
 			},
529
+			//获取--物料下拉框--数据
530
+			getAllMaterial() {
531
+				var url = 'MaintMaterial/query.do'
532
+				var param = {
533
+					page: -1,
534
+					rows: -1,
535
+					material: '',
536
+					standard: '',
537
+				}
538
+				axios.get(url, param).then(response => {
539
+					console.log(response.data.data)
540
+					this.optionsMaterial = response.data.data
541
+				});
542
+			},
523
 			// “捆包号”查询框进行批量查询时用到的函数
543
 			// “捆包号”查询框进行批量查询时用到的函数
524
 			getPackList(){
544
 			getPackList(){
525
 				const replaceResult = this.query.packNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
545
 				const replaceResult = this.query.packNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
656
 			},
676
 			},
657
 
677
 
658
 			//货权转移按钮对应的操作函数
678
 			//货权转移按钮对应的操作函数
659
-			showChangeCustomer() {    //判断数据条件并打开弹窗
679
+			showChangeCustomer(val) {    //判断数据条件并打开弹窗
680
+				this.multipleSelection = this.selectRows;
660
 				if (this.multipleSelection.length < 1) {
681
 				if (this.multipleSelection.length < 1) {
661
 					this.$message({
682
 					this.$message({
662
 						type: 'error',
683
 						type: 'error',
1089
 				}).catch(() => {});
1110
 				}).catch(() => {});
1090
 			},
1111
 			},
1091
 
1112
 
1113
+			// 数据展示区域进行单条数据修改操作
1114
+			handleEdit(row) { //按钮点击时打开弹窗
1115
+				this.store = row
1116
+				this.storedialogVisible = true
1117
+			},
1118
+			handleChangeStore(formName){
1119
+				var url = 'WareStore/modify.do'
1120
+				var json = JSON.stringify(this.store)
1121
+				var param = {
1122
+					json: json,
1123
+				}
1124
+        		axios.post(url, param).then(response => {
1125
+          			if (response.data.code == '0') {
1126
+            			this.$message({
1127
+              				type: 'success',
1128
+              				message: '保存修改成功!',
1129
+           	 			});
1130
+            			this.storedialogVisible = false
1131
+						this.getTableData()
1132
+          			} else {
1133
+            			this.$message({
1134
+              				type: 'error',
1135
+              				message: '保存修改失败!' + response.data.msg,
1136
+            			});
1137
+          			}
1138
+        		});
1139
+			},
1140
+			handleChangeStoreCancelSave(){
1141
+				this.storedialogVisible = false
1142
+				this.getTableData()
1143
+			},
1144
+			changematerial(item){
1145
+				this.store.material.id = item.id
1146
+				this.store.material.name = item.name
1147
+				this.store.material.standard = item.standard
1148
+			}
1149
+
1092
 		}
1150
 		}
1093
 	}
1151
 	}
1094
 </script>
1152
 </script>

正在加载...
取消
保存