|
|
@@ -120,10 +120,13 @@
|
|
|
style="width: 100%"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" align="center"> </el-table-column>
|
|
|
<el-table-column prop="code" label="字典项编码">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.code" placeholder=""></el-input>
|
|
|
+ <el-input
|
|
|
+ @blur="checkedValue(scope.row.code)"
|
|
|
+ v-model="scope.row.code"
|
|
|
+ placeholder=""
|
|
|
+ ></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="字典项名称">
|
|
|
@@ -337,6 +340,10 @@
|
|
|
});
|
|
|
this.filterArr();
|
|
|
},
|
|
|
+ //
|
|
|
+ checkedValue(val) {
|
|
|
+ console.log(val);
|
|
|
+ },
|
|
|
removeArr(row) {
|
|
|
console.log(row);
|
|
|
let falg = this.form.dictStaticSubmitPOList[row.$index].deleted === 0;
|
|
|
@@ -355,6 +362,16 @@
|
|
|
if (!valid) {
|
|
|
return false;
|
|
|
}
|
|
|
+ let falg = this.form.dictStaticSubmitPOList.some(
|
|
|
+ (item, index) => item.code.length === 0
|
|
|
+ );
|
|
|
+ if (falg) {
|
|
|
+ this.$message({
|
|
|
+ message: '字典项编码不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
const saveOrUpdate = this.isUpdate ? updateDictionary : addDictionary;
|
|
|
saveOrUpdate(this.form)
|