Browse Source

链属待办

sqg 3 years ago
parent
commit
de5727ebef
1 changed files with 42 additions and 2 deletions
  1. 42 2
      front-vue/src/views/workDeal.vue

+ 42 - 2
front-vue/src/views/workDeal.vue

@@ -45,11 +45,27 @@
                     <el-button @click="cancel">取 消</el-button>
                 </div>
         </div>
+        <!-- 链属待办 -->
+        <div v-if="workType == '09'">
+                <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+                    <el-form-item label="选择意见" prop="state">
+                        <el-radio-group v-model="form.state">
+                            <el-radio v-for="(dict,index) in stateOptions" :key="index" :label="dict.dictValue">{{dict.dictLabel}}
+                            </el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                </el-form>
+                <div slot="footer" class="dialog-footer">
+                    <el-button type="primary" @click="submitRel">确 定</el-button>
+                    <el-button @click="cancel">取 消</el-button>
+                </div>
+        </div>
     </div>
 </template>
 <script>
 import { RepaymentRegistration } from "@/api/service/repayment/repayment";
 import { uploadFileNew } from "@/api/common/file";
+import { updateRel } from "@/api/service/rel/companyRel";
 import { dealWork } from '@/api/system/notice'
 export default {
     components: {
@@ -74,9 +90,10 @@ export default {
     },
     data() {
         return {
+            stateOptions:[],
             // 表单参数
             form: {
-                
+                state: "01"
             },
             // 表单校验
             rules: {
@@ -93,7 +110,10 @@ export default {
         }
     },
     created: function () {
-        this.form.zfrId = this.tableId
+        this.form.zfrId = this.tableId;
+        this.getDicts("ser_rel_state").then((response) => {
+            this.stateOptions = response.data;
+        });
     },
     activated () {
     }, 
@@ -174,6 +194,26 @@ export default {
                 }
             });
         },
+        /* 链属提交 */
+        submitRel() {
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    if (this.tableId != null) {
+                        const launchScrId = this.tableId;
+                        const state = this.form.state;
+                        updateRel(launchScrId,state).then(response => {
+                            if(state == '01'){
+                            this.$emit("cancelOpen");
+                            this.msgSuccess("链属成功");
+                            }else if(state == '02'){
+                            this.$emit("cancelOpen");
+                            this.msgSuccess("拒绝成功");
+                            }
+                        });
+                    } 
+                }
+            });
+        },
         cancel(){
             this.$emit("cancelOpen");
         }