lex-xin 3 lat temu
rodzic
commit
2ebfb671b4

+ 51 - 41
src/views/process/list/handle.vue

@@ -92,16 +92,17 @@
         </div>
         <div v-if="processStructureValue.userAuthority">
           <hr style="background-color: #d9d9d9; border:0; height:1px; margin-bottom: 15px">
-          <div>
-            <el-input
-              v-model="remarks"
-              type="textarea"
-              placeholder="请输入备注信息"
-              maxlength="200"
-              :autosize="{ minRows: 3, maxRows: 99}"
-              show-word-limit
-            />
-          </div>
+          <el-form ref="dataFrom" label-position="left" :model="dataList" label-width="150">
+            <el-form-item label="备注信息" prop="remarks" :rules="[{ required: true, message: '请输入备注信息', trigger: 'blur' }]">
+              <el-input
+                v-model="dataList.remarks"
+                type="textarea"
+                placeholder="请输入备注信息"
+                maxlength="200"
+                :autosize="{ minRows: 3, maxRows: 99}"
+                show-word-limit
+              />
+            </el-form-item>
           <div class="text item" style="text-align: center;margin-top:18px">
             <el-button
               v-for="(item, index) in btn_group"
@@ -138,6 +139,7 @@
               </template> -->
             <!-- </div> -->
           </div>
+          </el-form>
         </div>
       </el-card>
 
@@ -207,7 +209,9 @@ export default {
       isActiveProcessing: false,
       tpls: [],
       organList: [],
-      remarks: '', // 备注信息
+      dataList: {
+        remarks: '', // 备注信息
+      },
       alertMessage: '',
       nodeStepList: [],
       circulationHistoryList: [],
@@ -263,18 +267,20 @@ export default {
         this.circulationHistoryList = this.processStructureValue.circulationHistory
         // 获取当前展示节点列表
         this.nodeStepList = []
-        for (var i = 0; i < this.processStructureValue.nodes.length; i++) {
-          if (this.processStructureValue.nodes[i].id === this.processStructureValue.workOrder.current_state) {
-            // 当前节点
-            this.nodeStepList.push(this.processStructureValue.nodes[i])
-            this.activeIndex = this.nodeStepList.length - 1
-            if (i + 1 === this.processStructureValue.nodes.length) {
-              this.activeIndex = this.nodeStepList.length
+        if(this.processStructureValue.nodes) {
+          for (var i = 0; i < this.processStructureValue.nodes.length; i++) {
+            if (this.processStructureValue.nodes[i].id === this.processStructureValue.workOrder.current_state) {
+              // 当前节点
+              this.nodeStepList.push(this.processStructureValue.nodes[i])
+              this.activeIndex = this.nodeStepList.length - 1
+              if (i + 1 === this.processStructureValue.nodes.length) {
+                this.activeIndex = this.nodeStepList.length
+              }
+              this.currentNode = this.processStructureValue.nodes[i]
+            } else if (!this.processStructureValue.nodes[i].isHideNode) {
+              // 非隐藏节点
+              this.nodeStepList.push(this.processStructureValue.nodes[i])
             }
-            this.currentNode = this.processStructureValue.nodes[i]
-          } else if (!this.processStructureValue.nodes[i].isHideNode) {
-            // 非隐藏节点
-            this.nodeStepList.push(this.processStructureValue.nodes[i])
           }
         }
 
@@ -339,26 +345,30 @@ export default {
         })
         promiseList.push(this.$refs['generateForm-' + tpl.id][0].getData())
       }
-      Promise.all(promiseList).then(values => {
-        for (var tplDataIndex in this.tpls) {
-          this.tpls[tplDataIndex].tplValue = values[tplDataIndex]
+      this.$refs['dataFrom'].validate(_ => {
+        if(_) {
+          Promise.all(promiseList).then(values => {
+            for (var tplDataIndex in this.tpls) {
+              this.tpls[tplDataIndex].tplValue = values[tplDataIndex]
+            }
+            handleWorkOrder({
+              tasks: this.processStructureValue.process.task,
+              source_state: this.processStructureValue.workOrder.current_state,
+              target_state: item.target,
+              circulation: item.label,
+              flow_properties: item.flowProperties === undefined ? 2 : parseInt(item.flowProperties),
+              work_order_id: parseInt(this.$route.query.workOrderId),
+              remarks: this.remarks,
+              tpls: this.tpls
+            }).then(response => {
+              if (response.code === 200) {
+              // this.$router.push({ name: 'upcoming' })
+              // window.location.reload()
+                this.getProcessNodeList()
+              }
+            })
+          })
         }
-        handleWorkOrder({
-          tasks: this.processStructureValue.process.task,
-          source_state: this.processStructureValue.workOrder.current_state,
-          target_state: item.target,
-          circulation: item.label,
-          flow_properties: item.flowProperties === undefined ? 2 : parseInt(item.flowProperties),
-          work_order_id: parseInt(this.$route.query.workOrderId),
-          remarks: this.remarks,
-          tpls: this.tpls
-        }).then(response => {
-          if (response.code === 200) {
-          // this.$router.push({ name: 'upcoming' })
-          // window.location.reload()
-            this.getProcessNodeList()
-          }
-        })
       })
     },
     // 获取提示消息

Plik diff jest za duży
+ 0 - 0
web/index.html


Plik diff jest za duży
+ 0 - 0
web/static/web/css/chunk-6eee5aec.e8425c9d.css


Plik diff jest za duży
+ 0 - 0
web/static/web/js/app.e670ec32.js


Plik diff jest za duży
+ 0 - 0
web/static/web/js/chunk-6eee5aec.4fd67902.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików