chenying 3 gadi atpakaļ
vecāks
revīzija
09c3788dba

+ 39 - 3
src/views/modules/process/process.vue

@@ -120,6 +120,34 @@
         workflowInfot(id).then(({ data }) => {
           if (data.code === '200') {
             this.item = data.data
+            if (this.item.workFlowStepVOs) {
+              this.item.workFlowStepVOs.forEach((v, index) => {
+                this.list.push({
+                  id: index + 1,
+                  new_or_edit: 'new',
+                  step_name: v.name,
+                  step_type: v.type,
+                  step_func: v.assigneeIds
+                })
+                if (index === 0) {
+                  this.stepForm.step_name = v.name
+                  this.stepForm.step_type = v.type
+                  this.stepForm.step_func = v.assigneeIds
+                  this.templateAddDisable = false
+                }
+              })
+              this.id = this.item.workFlowStepVOs.length - 1
+              this.$nextTick(() => {
+                let stepsArrey = document.querySelectorAll('textarea')
+                this.index = 0
+                for (let i = 0; i < stepsArrey.length; i++) {
+                  stepsArrey[i].style.backgroundColor = '#ecf5ff'
+                  stepsArrey[i].style.color = '#409eff'
+                }
+                stepsArrey[this.index].style.backgroundColor = '#409eff'
+                stepsArrey[this.index].style.color = '#fff'
+              })
+            }
           } else {
             this.$message.error(data.msg || '未获取到数据')
           }
@@ -251,13 +279,21 @@
           })
         })
         let params = {
-          name: this.menuList[this.active],
-          content: this.menuList[this.active],
+          name: this.item.name,
+          content: this.item.content,
+          id: this.item.id,
+          code: this.item.code,
           workFlowStepVOs: myList
         }
         workflowUpdate(params).then(({ data }) => {
           if (data.code === '200') {
-
+            this.$message({
+              message: '操作成功',
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+              }
+            })
           } else {
             this.$message.error(data.msg)
           }

+ 1 - 1
src/views/modules/warehouse/stock-add-or-update.vue

@@ -46,7 +46,7 @@
       <el-row class="my-row">
         <el-col :span="12">
           <el-form-item label="金额" prop="amount">
-            <el-input v-model="dataForm.price * dataForm.cnt" :disabled="true" placeholder="物品(零件)总金额"></el-input>
+            <el-input :value="dataForm.price * dataForm.cnt" :disabled="true" placeholder="物品(零件)总金额"></el-input>
           </el-form-item>
         </el-col>
       </el-row>