From 24a4359138453f3125264c1c945fcf56092feacc Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 29 一月 2024 18:22:12 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/yunyibao

---
 company/src/components/enterprise/confirmJobType.vue |  112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 112 insertions(+), 0 deletions(-)

diff --git a/company/src/components/enterprise/confirmJobType.vue b/company/src/components/enterprise/confirmJobType.vue
new file mode 100644
index 0000000..b371ad2
--- /dev/null
+++ b/company/src/components/enterprise/confirmJobType.vue
@@ -0,0 +1,112 @@
+<template>
+    <GlobalWindow
+        :title="title"
+        width="30%"
+        :visible.sync="visible"
+        :confirm-working="isWorking"
+        @confirm="confirm"
+    >
+        <el-form class="demo-form-inline">
+            <el-form-item label="娲鹃仯鍗曚綅" required>
+                <el-select v-model="dw" @change="selectChange" placeholder="璇烽�夋嫨">
+                    <el-option
+                        v-for="item in dispatching"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="鎵�灞炲伐绉�" required>
+                <el-select v-model="gz" placeholder="璇烽�夋嫨">
+                    <el-option
+                        v-for="item in options"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+    </GlobalWindow>
+</template>
+
+<script>
+    import BaseOpera from '@/components/base/BaseOpera'
+    import GlobalWindow from '@/components/common/GlobalWindow'
+    import { findListByDTO } from '@/api/business/dispatchUnit'
+    import { findListByDTO as worktype } from '@/api/business/worktype'
+    export default {
+        name: 'confirmJobType',
+        extends: BaseOpera,
+        components: { GlobalWindow },
+        data () {
+            return {
+                form: {
+                    solutionId: ''
+                },
+                data: [],
+                dw: [],
+                gz: [],
+                dispatching: [],
+                options: []
+            }
+        },
+        methods: {
+            open (title, arr) {
+                this.title = title
+                this.form.solutionId = arr.solutionId
+                this.data = arr.seleData
+                this.visible = true
+                this.getFindListByDTO()
+            },
+            getFindListByDTO () {
+                findListByDTO({
+                    solutionId: this.form.solutionId,
+                    dataType: 2
+                }).then(res => {
+                    this.dispatching = res
+                })
+            },
+            selectChange(id) {
+                this.gz = ''
+                let duSolutionId = ''
+                this.dispatching.forEach(item => {
+                    if (item.id === id) {
+                        duSolutionId = item.duSolutionId
+                    }
+                })
+                worktype({ id: duSolutionId, queryType: 1 })
+                    .then(res => {
+                        this.options = res
+                    })
+            },
+            confirm() {
+                let obj = {
+                    workTypeName: '',
+                    worktypeId: '',
+                    duName: '',
+                    duId: ''
+                }
+                this.dispatching.forEach(item => {
+                    if (item.id === this.dw) {
+                        obj.duName = item.name
+                        obj.duId = item.id
+                    }
+                })
+                this.options.forEach(item => {
+                    if (item.id === this.gz) {
+                        obj.workTypeName = item.name
+                        obj.worktypeId = item.id
+                    }
+                })
+                this.$emit('result', obj)
+                this.visible = false
+            }
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

--
Gitblit v1.9.3