¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="70%"> |
| | | <!-- <el-steps :active="currentStep" finish-status="success"> |
| | | <el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item"> |
| | | </el-step> |
| | | </el-steps> --> |
| | | <!-- <el-form :model="model" label-width="140px" size="small">--> |
| | | <!-- <Step1 :model.sync="model"></Step1>--> |
| | | <!-- </el-form>--> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | // import Step1 from './Step/Step1.vue' |
| | | export default { |
| | | components: { |
| | | // Step1 |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | // steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£
éªæ¶æ£æ¥', 'å®è£
éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], |
| | | model: { |
| | | acceptance: { |
| | | id: undefined, |
| | | producer: undefined, // å家代表 |
| | | file: undefined, // ç¸å
³éä»¶ |
| | | recipient: undefined, // æ¥æ¶äºº |
| | | signature: undefined, // æ¥åç¾å |
| | | situation: undefined, // éªæ¶æ
åµ |
| | | installation: undefined, // å®è£
è°è¯æ
åµ |
| | | substanceId: undefined, // æ¸
å |
| | | arriveDate: undefined, // å°è´§æ¥æ |
| | | maintenanceUnit: undefined, // ç»´ä¿®åä½ |
| | | }, |
| | | list: [] |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | model(newVal) { |
| | | this.model = newVal |
| | | } |
| | | }, |
| | | methods: { |
| | | clearForm() { |
| | | this.model.acceptance.id = undefined |
| | | this.model.acceptance.producer = undefined |
| | | this.model.acceptance.file = undefined |
| | | this.model.acceptance.recipient = undefined |
| | | this.model.acceptance.signature = undefined |
| | | this.model.acceptance.situation = undefined |
| | | this.model.acceptance.installation = undefined |
| | | this.model.acceptance.substanceId = undefined |
| | | this.model.acceptance.arriveDate = undefined |
| | | this.model.acceptance.maintenanceUnit = undefined |
| | | this.model.list = [] |
| | | }, |
| | | openDialog(form) { |
| | | console.log(form) |
| | | if(form) { |
| | | this.model.acceptance.id = form.acceptance.id |
| | | this.model.acceptance.producer = form.acceptance.producer |
| | | this.model.acceptance.file = form.acceptance.file |
| | | this.model.acceptance.recipient = form.acceptance.recipient |
| | | this.model.acceptance.signature = form.acceptance.signature |
| | | this.model.acceptance.situation = form.acceptance.situation |
| | | this.model.acceptance.installation = form.acceptance.installation |
| | | this.model.acceptance.substanceId = form.acceptance.substanceId |
| | | this.model.acceptance.arriveDate = form.acceptance.arriveDate |
| | | this.model.acceptance.maintenanceUnit = form.acceptance.maintenanceUnit |
| | | this.model.list = form.list |
| | | } else { |
| | | this.clearForm() |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | submit() { |
| | | if (!this.model.acceptance.substanceId) { |
| | | this.$message.warning('è¯·éæ©æ¸
å') |
| | | return |
| | | } |
| | | this.$emit('submit', this.model) |
| | | this.closeDialog() |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .cursor-pointer { |
| | | cursor: pointer; |
| | | } |
| | | </style> |