29a787c2 by 任超

style:申请业务规则配置

1 parent da0a783c
...@@ -187,6 +187,8 @@ export default { ...@@ -187,6 +187,8 @@ export default {
187 } 187 }
188 this.ruleForm = newValue.rowData 188 this.ruleForm = newValue.rowData
189 this.addIndexes() 189 this.addIndexes()
190 this.key++
191 console.log(1111111);
190 }, 192 },
191 deep: true 193 deep: true
192 } 194 }
......
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
38 }, 38 },
39 data () { 39 data () {
40 return { 40 return {
41 input: '',
41 key: 0, 42 key: 0,
42 rules: { 43 rules: {
43 djywbm: [ 44 djywbm: [
...@@ -70,8 +71,17 @@ export default { ...@@ -70,8 +71,17 @@ export default {
70 label: '登记情形编码', 71 label: '登记情形编码',
71 render: (h, scope) => { 72 render: (h, scope) => {
72 return ( 73 return (
73 <el-input placeholder="登记情形编码" class={{ repeat: scope.row.repeat }} disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]} 74 <div>
74 onInput={(val) => { scope.row[scope.column.property] = val }} onBlur={() => { this.nodecodeBlur(scope.$index, scope.row) }} maxlength="8"></el-input> 75 <el-input placeholder="登记情形编码" v-show={scope.row.nodecodeShow} v-fo class={{ repeat: scope.row.repeat }} disabled={scope.row.sftsdjqx == '1'}
76 value={scope.row[scope.column.property]} onFocus={() => { this.itemShowFalse(); scope.row.nodecodeShow = true; }}
77 onInput={(val) => { scope.row[scope.column.property] = val }} onBlur={() => { this.nodecodeBlur(scope.$index, scope.row) }} maxlength="8">
78 </el-input>
79
80 <el-input placeholder="登记情形编码" v-show={!scope.row.nodecodeShow} class={{ repeat: scope.row.repeat }} disabled={scope.row.sftsdjqx == '1'}
81 value={scope.row[scope.column.property]} onFocus={() => { this.itemShowFalse(); scope.row.nodecodeShow = true; }}
82 onInput={(val) => { scope.row[scope.column.property] = val }} onBlur={() => { this.nodecodeBlur(scope.$index, scope.row) }} maxlength="8">
83 </el-input>
84 </div>
75 ) 85 )
76 } 86 }
77 }, 87 },
...@@ -80,8 +90,14 @@ export default { ...@@ -80,8 +90,14 @@ export default {
80 label: '登记情形名称', 90 label: '登记情形名称',
81 render: (h, scope) => { 91 render: (h, scope) => {
82 return ( 92 return (
83 <el-input placeholder="登记情形名称" disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]} 93 <div>
84 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> 94 <el-input placeholder="登记情形名称" v-show={scope.row.nodenameShow} v-fo disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
95 onInput={(val) => { scope.row[scope.column.property] = val }}
96 onFocus={() => { this.itemShowFalse(); scope.row.nodenameShow = true; }}></el-input>
97 <el-input placeholder="登记情形名称" v-show={!scope.row.nodenameShow} disabled={scope.row.sftsdjqx == '1'}
98 onFocus={() => { this.itemShowFalse(); scope.row.nodenameShow = true; }} value={scope.row[scope.column.property]}
99 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
100 </div>
85 ) 101 )
86 } 102 }
87 }, 103 },
...@@ -102,8 +118,15 @@ export default { ...@@ -102,8 +118,15 @@ export default {
102 label: '登记原因模板', 118 label: '登记原因模板',
103 render: (h, scope) => { 119 render: (h, scope) => {
104 return ( 120 return (
105 <el-input placeholder="登记原因模板" disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]} 121 <div>
106 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> 122 <el-input placeholder="登记原因模板" v-show={scope.row.djyyShow} v-fo disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
123 onInput={(val) => { scope.row[scope.column.property] = val }}
124 onFocus={() => { this.itemShowFalse(); scope.row.djyyShow = true; }}></el-input>
125 <el-input placeholder="登记原因模板" v-show={!scope.row.djyyShow} v-fo disabled={scope.row.sftsdjqx == '1'} value={scope.row[scope.column.property]}
126 onInput={(val) => { scope.row[scope.column.property] = val }}
127 onFocus={() => { this.itemShowFalse(); scope.row.djyyShow = true; }}></el-input>
128 </div>
129
107 ) 130 )
108 } 131 }
109 }, 132 },
...@@ -161,12 +184,41 @@ export default { ...@@ -161,12 +184,41 @@ export default {
161 djqx: { 184 djqx: {
162 handler: function (newValue) { 185 handler: function (newValue) {
163 this.tableData = _.cloneDeep(newValue) 186 this.tableData = _.cloneDeep(newValue)
187 this.addIndexes()
164 }, 188 },
165 deep: true 189 deep: true
166 } 190 }
167 }, 191 },
168 methods: { 192 methods: {
193 // 添加索引
194 addIndexes (data = this.tableData, isAdd = true) {
195 data.forEach((item, index) => {
196 if (index == 0) {
197 item.nodecodeShow = true
198 item.nodenameShow = false
199 item.djyyShow = false
200 } else {
201 item.nodecodeShow = false
202 item.nodenameShow = false
203 item.djyyShow = false
204 }
205 if (isAdd) {
206 item.index = index + 1
207 }
208 })
209 },
210 itemShowFalse () {
211 this.tableData.forEach((item, index) => {
212 item.nodecodeShow = true
213 item.nodenameShow = false
214 item.djyyShow = false
215 })
216 },
169 handleAdd () { 217 handleAdd () {
218 this.$nextTick(() => {
219 let container = this.$el.querySelector('.el-table__body-wrapper');
220 container.scrollTop = container.scrollHeight;
221 })
170 let code = this.tableData.slice(-1)[0].nodecode 222 let code = this.tableData.slice(-1)[0].nodecode
171 let codeQ = code.slice(0, 6) 223 let codeQ = code.slice(0, 6)
172 let len = '' 224 let len = ''
...@@ -185,6 +237,7 @@ export default { ...@@ -185,6 +237,7 @@ export default {
185 sfqydjyymb: '0' 237 sfqydjyymb: '0'
186 } 238 }
187 ) 239 )
240 this.addIndexes()
188 this.key++ 241 this.key++
189 }, 242 },
190 handleMinus (index, row) { 243 handleMinus (index, row) {
...@@ -203,9 +256,13 @@ export default { ...@@ -203,9 +256,13 @@ export default {
203 // 上移下移 256 // 上移下移
204 moveUpward (index, row) { 257 moveUpward (index, row) {
205 upward(index, this.tableData) 258 upward(index, this.tableData)
259 this.key++
260 console.log(this.tableData);
206 }, 261 },
207 moveDown (index, row) { 262 moveDown (index, row) {
208 down(index, this.tableData) 263 down(index, this.tableData)
264 this.key++
265 console.log(this.tableData);
209 } 266 }
210 } 267 }
211 } 268 }
......
...@@ -240,12 +240,15 @@ export default { ...@@ -240,12 +240,15 @@ export default {
240 this.getSqdjywDetail(obj.bsmSqyw) 240 this.getSqdjywDetail(obj.bsmSqyw)
241 }, 241 },
242 getDjqxValue (val) { 242 getDjqxValue (val) {
243 console.log(val, 'valvalvalvalval'); 243 if (_.isEqual(val.djqx, this.subData.djqx)) {
244 this.subData.djqx = val.djqx 244 this.subData.djqx = val.djqx
245 this.btnDisabled = val.btnDisabled 245 this.btnDisabled = val.btnDisabled
246 }
246 }, 247 },
247 getClgzValue (val) { 248 getClgzValue (val) {
248 this.subData.clxx = val 249 if (_.isEqual(val, this.subData.clxx)) {
250 this.subData.clxx = val
251 }
249 }, 252 },
250 // 单元状态设定 253 // 单元状态设定
251 getDyztsdValue (val) { 254 getDyztsdValue (val) {
......