YL2767 пре 2 недеља
родитељ
комит
7ce82925ee
2 измењених фајлова са 29 додато и 3 уклоњено
  1. 2
    1
      src/components/PopupDistribution.vue
  2. 27
    2
      src/view/ware/storechange.vue

+ 2
- 1
src/components/PopupDistribution.vue Прегледај датотеку

267
 					json: JSON.stringify(this.distribution),
267
 					json: JSON.stringify(this.distribution),
268
 					jsonList: JSON.stringify(this.selectRows)
268
 					jsonList: JSON.stringify(this.selectRows)
269
 				}
269
 				}
270
+				this.dialogVisible = false
270
 				axios.post(url, param).then(response => {
271
 				axios.post(url, param).then(response => {
271
 					if (response.data.code == 0) {
272
 					if (response.data.code == 0) {
272
 
273
 
273
-						this.dialogVisible = false
274
+						//this.dialogVisible = false
274
 						this.selectRows    = []
275
 						this.selectRows    = []
275
 					} else {
276
 					} else {
276
 						this.$message({
277
 						this.$message({

+ 27
- 2
src/view/ware/storechange.vue Прегледај датотеку

80
 			</el-form>
80
 			</el-form>
81
 		</div>
81
 		</div>
82
 		<div class="tabledata-grid">
82
 		<div class="tabledata-grid">
83
-			<el-table :data="tableData" height="100%"   border style="width: 97%;" v-loading="loading" ref="multipleTable"	@select="handleTableSelect"	 @selection-change="handleSelectionChange" @select-all = "selectAll">
83
+			<el-table :data="tableData" height="100%"   border style="width: 97%;" v-loading="loading" ref="multipleTable"	@select="handleTableSelect"	 @selection-change="handleSelectionChange" @select-all = "selectAll" 
84
+			:row-class-name="tableRowClassName">
84
 				<el-table-column type="selection" width="40" header-align="center" align="center"></el-table-column>
85
 				<el-table-column type="selection" width="40" header-align="center" align="center"></el-table-column>
85
 				<el-table-column prop="ware.name" label="仓库名称" width="120" show-overflow-tooltip header-align="center" align="center">
86
 				<el-table-column prop="ware.name" label="仓库名称" width="120" show-overflow-tooltip header-align="center" align="center">
86
 				</el-table-column>
87
 				</el-table-column>
397
 				this.query.materialName = material.name
398
 				this.query.materialName = material.name
398
 				this.query.standard = material.standard
399
 				this.query.standard = material.standard
399
 			},
400
 			},
401
+			tableRowClassName({row}) {
402
+				if (row.lockFlag === '1') {
403
+					return 'warning-row'
404
+				}
405
+				return ''
406
+			},
400
 			batchOperate(command) {
407
 			batchOperate(command) {
401
 				switch (command) {
408
 				switch (command) {
402
 					case "handleInBack":
409
 					case "handleInBack":
1053
 				Export2Excel.export_json_to_excel({
1060
 				Export2Excel.export_json_to_excel({
1054
 					header,
1061
 					header,
1055
 					data,
1062
 					data,
1056
-					filename
1063
+					filename,
1064
+					rowStyle: (rowData, rowIndex) => {
1065
+						// 根据库存量设置颜色
1066
+						if (rowData.lockFlag === "已锁定") {
1067
+							return {
1068
+								fill: { fgColor: { rgb: "FF0000" } }, // 红色
1069
+								font: { color: { rgb: "FFFFFF" }, bold: true }
1070
+							};
1071
+						} 
1072
+						return {};
1073
+					}
1057
 				})
1074
 				})
1058
 			},
1075
 			},
1059
 			formatJson(filterVal, jsonData) {
1076
 			formatJson(filterVal, jsonData) {
1090
     {
1107
     {
1091
         overflow: scroll!important;
1108
         overflow: scroll!important;
1092
     }
1109
     }
1110
+
1111
+	.el-table .warning-row {
1112
+		background-color: #fde2e2;
1113
+	}
1114
+
1115
+	.el-table .success-row {
1116
+		background-color: #f0f9eb;
1117
+	}
1093
 </style>
1118
 </style>

Loading…
Откажи
Сачувај