|
@@ -29,12 +29,20 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
|
|
|
<el-table-column :label='$t("common.sort")' width="200px" align="center">
|
|
|
- <template slot-scope="{ row }">
|
|
|
- <el-input-number v-model="row.sort" :min="0" :max="999999999" :placeholder='$t("common.pleaseEnter")'></el-input-number>
|
|
|
- </template>
|
|
|
+ <template slot="header">
|
|
|
+ <span>{{$t("common.sort")}}</span>
|
|
|
+ <span class="star">*</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input-number v-model="row.sort" :min="0" :max="100" :placeholder='$t("common.pleaseEnter")'></el-input-number>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-for="item in tableData.titleList" :key="item.id" :prop="item.identifier" :label='item.fieldName' :show-overflow-tooltip="true" :width="item.formControlsType == 'inputNumber' ? '200px' : '180px'">
|
|
|
- <template slot-scope="{ row }">
|
|
|
+ <template slot="header">
|
|
|
+ <span>{{ item.fieldName }}</span>
|
|
|
+ <span class="star">*</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }">
|
|
|
<!-- 如果是【文本框】-->
|
|
|
<div
|
|
|
v-if="item.formControlsType == 'input' && item.showStatus == '1'"
|
|
@@ -268,7 +276,29 @@ export default {
|
|
|
bomId: this.processModeling.bomId,
|
|
|
procedureList: this.tableData.data // 新增的数据
|
|
|
}
|
|
|
- technologyMgrApi.saveList(obj).then(res => {
|
|
|
+
|
|
|
+ for(let i=0; i< this.tableData.data.length; i++){
|
|
|
+ let item = this.tableData.data[i];
|
|
|
+ for(let property in item){
|
|
|
+ if(item[property] ==null || item[property]==""){
|
|
|
+ this.confirmDisabled = true
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.confirmDisabled){
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.confirmDisabled){
|
|
|
+ this.$message({
|
|
|
+ message: "数据非空验证失败!",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ this.confirmDisabled = false
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ technologyMgrApi.saveList(obj).then(res => {
|
|
|
res = res.data
|
|
|
if(res.isSuccess){
|
|
|
this.$message({
|
|
@@ -308,7 +338,7 @@ export default {
|
|
|
// 给列表赋值
|
|
|
this.tableData.data = list
|
|
|
// 清除table的选中数据
|
|
|
- this.$refs.table.toggleRowSelection(row, false)
|
|
|
+ this.$refs.table.toggleRowSelection(row, false)
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
viewClose () {
|
|
@@ -418,4 +448,9 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ .star {
|
|
|
+ color: #F56C6C;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
</style>
|