浏览代码

平衡项目维护可以修改序号

QuietShadow 3 年之前
父节点
当前提交
f34fa5f89a
共有 1 个文件被更改,包括 24 次插入4 次删除
  1. 24 4
      src/views/energyBalance/components/balanceSheetItem.vue

+ 24 - 4
src/views/energyBalance/components/balanceSheetItem.vue

@@ -329,7 +329,22 @@
                             label="序号"
                             width="85px"
                             :show-overflow-tooltip="true"
-                        ></el-table-column>
+                        ><template slot-scope="scope">
+                                <el-form-item
+                                    v-if="scope.row.isSelection"
+                                    :prop="scope.row.itemid + '.showno'"
+                                    :rules="dialog.editorBox.form.rules.showno"
+                                >
+                                    <el-input clearable
+                                        style="width: 100%;"
+                                        v-model="tableFormDataObj[scope.row.itemid].showno"
+                                    ></el-input>
+                                    <template slot="error" slot-scope="scope">
+                                        <p class="error" :title="scope.error">{{ scope.error }}</p>
+                                    </template>
+                                </el-form-item>
+                                <span v-else>{{ scope.row.showno }}</span>
+                            </template></el-table-column>
                         <el-table-column
                             sortable
                             prop="fid"
@@ -677,7 +692,8 @@ export default {
                             propertyid: '',
                             unitid: '',
                             seqno: '',
-                            fid: ''
+                            fid: '',
+                            showno: ''
                         },
                         rules: {
                             energyid: [
@@ -692,7 +708,10 @@ export default {
                             unitid: [
                                 { required: true, message: '该项不能为空', trigger: 'change' }
                             ],
-                            seqno: []
+                            showno: [
+                                { required: true, message: '该项不能为空', trigger: 'change' },
+                                { validator: zCheckNumber2, trigger: 'change' }
+                            ]
                         }
                     }
                 },
@@ -1087,7 +1106,8 @@ export default {
                                 workprocid: that.tableFormDataObj[key].workprocid,
                                 propertyid: that.tableFormDataObj[key].propertyid,
                                 unitid: that.tableFormDataObj[key].unitid,
-                                fid: that.tableFormDataObj[key].fid
+                                fid: that.tableFormDataObj[key].fid,
+                                showno: that.tableFormDataObj[key].showno
                             });
                         }
                         that.loading = true;