瀏覽代碼

no message

linwenxin 1 年之前
父節點
當前提交
1d985220ff
共有 1 個文件被更改,包括 5 次插入28 次删除
  1. 5 28
      src/views/workOrder/completedToBeSettled/index.vue

+ 5 - 28
src/views/workOrder/completedToBeSettled/index.vue

@@ -714,14 +714,14 @@ export default {
 														row.settleNormId = ""
 														row.settleNum = ""
 														if (val) {
-															var data = this.otherListChuLi(expandDataForm.otherList, "orderChannelId", "orderChannelText").find(item => item.value == val)
+															var data = this.classifyListChuLi(expandDataForm.otherList, "orderChannelId", "orderChannelText").find(item => item.value == val)
 															row.channelText = data.label
 														} else {
 															row.channelText = ""
 														}
 													}}
 													placeholder="请选择">
-													{this.otherListChuLi(expandDataForm.otherList, "orderChannelId", "orderChannelText").map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+													{this.classifyListChuLi(expandDataForm.otherList, "orderChannelId", "orderChannelText").map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
 												</el-select>
 											</el-form-item>
 										</div> : null
@@ -746,7 +746,7 @@ export default {
 														row.settleNum = ""
 													}}
 													placeholder="请选择">
-													{this.otherListChuLi(expandDataForm.otherList, "type", "typeName", (item) => item.orderChannelId == row.channelId).map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+													{this.classifyListChuLi(expandDataForm.otherList, "type", "typeName", (item) => item.orderChannelId == row.channelId).map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
 												</el-select>
 											</el-form-item>
 										</div> : null
@@ -767,7 +767,7 @@ export default {
 													onChange={(val) => {
 														row.settleNum = ""
 														if (val) {
-															var data = this.otherListChuLi(expandDataForm.otherList, "label", "label", (item) => { return item.orderChannelId == row.channelId && item.type == row.type }, "normAmount", "id").find(item => item.label == val)
+															var data = this.classifyListChuLi(expandDataForm.otherList, "label", "label", (item) => { return item.orderChannelId == row.channelId && item.type == row.type }, "normAmount", "id").find(item => item.label == val)
 															row.normAmount = data.normAmount
 															row.settleNormId = data.id
 														} else {
@@ -776,7 +776,7 @@ export default {
 														}
 													}}
 													placeholder="请选择">
-													{this.otherListChuLi(expandDataForm.otherList, "label", "label", (item) => item.orderChannelId == row.channelId && item.type == row.type).map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+													{this.classifyListChuLi(expandDataForm.otherList, "label", "label", (item) => item.orderChannelId == row.channelId && item.type == row.type).map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
 												</el-select>
 											</el-form-item>
 										</div> : null
@@ -1119,7 +1119,6 @@ export default {
 			}
 		},
 
-		// 产品类型过滤筛选
 		classifyListChuLi(list, value, label, func, ...keys) {
 			var obj = {};
 			list.map(item => {
@@ -1141,28 +1140,6 @@ export default {
 			})
 		},
 
-		// 其他类型筛选
-		otherListChuLi(list, value, label, func, ...keys) {
-			var obj = {};
-			list.map(item => {
-				if (func && !func(item)) {
-					return
-				}
-				obj[item[value]] = {
-					label: item[label]
-				}
-				for (var key of keys) {
-					obj[item[value]][key] = item[key]
-				}
-			})
-			return Object.keys(obj).map(value => {
-				return {
-					value: value,
-					...obj[value]
-				}
-			})
-		},
-
 		getflList(list = [], row = {},) {
 			return list.filter(item => (
 				item.type == row.type &&