17b0ee6e by xiaomiao

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents 5d6b144d 52fea4d2
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-31 13:59:45 4 * @LastEditTime: 2023-08-01 09:41:01
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clxx"> 7 <div class="clxx">
...@@ -68,6 +68,16 @@ ...@@ -68,6 +68,16 @@
68 created () { 68 created () {
69 this.clmlInitList(1) 69 this.clmlInitList(1)
70 }, 70 },
71 computed: {
72 ...mapGetters(['workFresh'])
73 },
74 watch: {
75 workFresh: {
76 handler (newVal, oldVal) {
77 if (newVal) this.clmlInitList(1)
78 }
79 }
80 },
71 mounted () { 81 mounted () {
72 this.ableOperation = this.$parent.ableOperation 82 this.ableOperation = this.$parent.ableOperation
73 }, 83 },
...@@ -254,7 +264,8 @@ ...@@ -254,7 +264,8 @@
254 viewDetail () { 264 viewDetail () {
255 this.$popupDialog("查看明细", "workflow/components/dialog/clxxDetailDialog", { 265 this.$popupDialog("查看明细", "workflow/components/dialog/clxxDetailDialog", {
256 data: this.tableData, 266 data: this.tableData,
257 unitData: this.$parent.unitData 267 unitData: this.$parent.unitData,
268 ableOperation: this.$parent.ableOperation
258 }, "60%") 269 }, "60%")
259 }, 270 },
260 //设置tableData 271 //设置tableData
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-31 14:27:07 4 * @LastEditTime: 2023-08-01 10:01:19
5 --> 5 -->
6 <template> 6 <template>
7 <div class="clmlmx-box"> 7 <div class="clmlmx-box">
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
10 </lb-table> 10 </lb-table>
11 <div class="text-center"> 11 <div class="text-center">
12 <el-button @click="$popupCacel">取消</el-button> 12 <el-button @click="$popupCacel">取消</el-button>
13 <el-button type="primary" @click="handleSubmit" v-if="formData.ableOperation">确定</el-button>
13 </div> 14 </div>
14 </div> 15 </div>
15 </template> 16 </template>
...@@ -56,18 +57,30 @@ ...@@ -56,18 +57,30 @@
56 } 57 }
57 }, 58 },
58 { 59 {
59 prop: "sjmc",
60 label: "材料名称", 60 label: "材料名称",
61 render: (h, scope) => {
62 return (
63 this.formData.ableOperation ?
64 <el-input value={scope.row.sjmc} onInput={(val) => { scope.row.sjmc = val }}></el-input> : <span>{scope.row.sjmc}</span>
65 )
66 }
61 }, 67 },
62 { 68 {
63 prop: "sjlx",
64 label: "材料类型", 69 label: "材料类型",
65 width: "80", 70 width: "110",
66 render: (h, scope) => { 71 render: (h, scope) => {
67 return ( 72 return (
68 <div> 73 this.formData.ableOperation ?
69 <span>{this.dicStatus(scope.row.sjlx, "A40")}</span> 74 <el-select value={scope.row.sjlx}
70 </div> 75 onChange={(val) => { scope.row.sjlx = val }}>
76 {
77 store.getters.dictData['A40'].map(option => {
78 return (
79 <el-option label={option.dname} value={option.dcode}></el-option>
80 )
81 })
82 }
83 </el-select> : <span>{this.dicStatus(scope.row.sjlx, "A40")}</span>
71 ) 84 )
72 } 85 }
73 }, 86 },
...@@ -127,13 +140,13 @@ ...@@ -127,13 +140,13 @@
127 }, 140 },
128 { 141 {
129 label: "操作", 142 label: "操作",
130 width: "80", 143 width: "100",
131 render: (h, scope) => { 144 render: (h, scope) => {
132 return ( 145 return (
133 <div> 146 <div>
134 <el-button 147 <el-button
135 type="text" 148 type="text"
136 disabled={scope.$index == 0} 149 disabled={scope.$index == 0 || !this.formData.ableOperation}
137 onClick={() => { 150 onClick={() => {
138 this.moveUpward(scope.$index, scope.row); 151 this.moveUpward(scope.$index, scope.row);
139 }} 152 }}
...@@ -142,17 +155,20 @@ ...@@ -142,17 +155,20 @@
142 </el-button> 155 </el-button>
143 <el-button 156 <el-button
144 type="text" 157 type="text"
145 disabled={scope.$index + 1 == this.tableData.length} 158 disabled={scope.$index + 1 == this.tableData.length || !this.formData.ableOperation}
146 onClick={() => { 159 onClick={() => {
147 this.moveDown(scope.$index, scope.row); 160 this.moveDown(scope.$index, scope.row);
148 }} 161 }}
149 > 162 >
150 下移 163 下移
151 </el-button> 164 </el-button>
152 </div> 165 <i v-show={scope.row.isrequired != '1' && this.formData.ableOperation} onClick={() => {
153 ); 166 this.handleDelete(scope.$index, scope.row);
154 }, 167 }} class="el-icon-delete pointer" style="color:#409EFF;margin-left:5px;position: relative;top: 1px;"></i>
155 }, 168 </div >
169 )
170 }
171 }
156 ], 172 ],
157 key: 0, 173 key: 0,
158 tableData: [] 174 tableData: []
...@@ -161,6 +177,7 @@ ...@@ -161,6 +177,7 @@
161 watch: { 177 watch: {
162 'formData.data': { 178 'formData.data': {
163 handler: function (val, oldVal) { 179 handler: function (val, oldVal) {
180 console.log(val, 'valvalval');
164 this.tableData = _.cloneDeep(val) 181 this.tableData = _.cloneDeep(val)
165 }, 182 },
166 immediate: true, 183 immediate: true,
...@@ -168,6 +185,12 @@ ...@@ -168,6 +185,12 @@
168 } 185 }
169 }, 186 },
170 methods: { 187 methods: {
188 handleSubmit () {
189 // saveClml(this.tableData).then(res => {
190 // console.log(res, '11111111111111');
191 // })
192 // store.dispatch('user/reWorkFresh', true)
193 },
171 /** 194 /**
172 * @description: 材料目录明细初始化 195 * @description: 材料目录明细初始化
173 * @author: renchao 196 * @author: renchao
...@@ -187,7 +210,6 @@ ...@@ -187,7 +210,6 @@
187 } else { 210 } else {
188 this.tableData = [] 211 this.tableData = []
189 } 212 }
190 console.log(this.tableData, 'this.tableData');
191 } else { 213 } else {
192 this.$message.error(res.message) 214 this.$message.error(res.message)
193 } 215 }
...@@ -248,7 +270,6 @@ ...@@ -248,7 +270,6 @@
248 } 270 }
249 }) 271 })
250 }, 272 },
251 // 材料目录删除
252 /** 273 /**
253 * @description: 材料目录删除 274 * @description: 材料目录删除
254 * @param {*} index 275 * @param {*} index
...@@ -268,7 +289,7 @@ ...@@ -268,7 +289,7 @@
268 if (res == 200) { 289 if (res == 200) {
269 that.$message({ 290 that.$message({
270 message: "删除成功", 291 message: "删除成功",
271 type: "success", 292 type: "success"
272 }) 293 })
273 } 294 }
274 } 295 }
......