add.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div>
  3. <el-dropdown :hide-on-click="false" @command="handleCommand">
  4. <span class="el-dropdown-link">
  5. <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
  6. </span>
  7. <el-dropdown-menu slot="dropdown">
  8. <el-dropdown-item command="项目报价">项目报价</el-dropdown-item>
  9. <el-dropdown-item command="客户报价">客户报价</el-dropdown-item>
  10. </el-dropdown-menu>
  11. </el-dropdown>
  12. <!-- <el-dialog
  13. title="创建报价单"
  14. :visible.sync="dialogFormVisible"
  15. width="25%"
  16. append-to-body
  17. @close="onCancel"
  18. >
  19. <div class="panel_Target" >
  20. <el-row style="margin-top: 3%">
  21. <el-col :span="4" :offset="1">
  22. <div style="width: 100%;text-align: right">
  23. <label class="normal-margin inline-16" style="margin-top: 8%">报价单类型:</label>
  24. </div>
  25. </el-col>
  26. <el-col :span="18">
  27. <el-select v-model="type" placeholder="请选择" size="small" style="width: 90%">
  28. <el-option
  29. v-for="item in options"
  30. :key="item.label"
  31. :label="item.label"
  32. :value="item.label">
  33. </el-option>
  34. </el-select>
  35. </el-col>
  36. </el-row>
  37. </div>
  38. <div class="dialog-footer ">
  39. <el-button size="small" @click="onCancel" class="normal-btn-width">取 消</el-button>
  40. <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
  41. </div>
  42. </el-dialog>-->
  43. <projec_quotation_add :drawerShow="drawerShow" v-if="drawerShow" :typeData="type" @addSuccess="onSuccess"></projec_quotation_add>
  44. </div>
  45. </template>
  46. <script>
  47. import projec_quotation_add from '@/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd'
  48. export default {
  49. name: "add",
  50. data(){
  51. return {
  52. type:'项目报价',
  53. drawerShow:false,
  54. options:[
  55. {
  56. label:'项目报价',
  57. value:'1'
  58. },
  59. {
  60. label:'客户报价',
  61. value:'2'
  62. }
  63. ],
  64. dialogFormVisible:false,
  65. }
  66. },
  67. components:{projec_quotation_add},
  68. methods:{
  69. onCancel(){
  70. this.dialogFormVisible = false
  71. this.type = '项目报价'
  72. },
  73. /*onSubmit(){
  74. this.dialogFormVisible = false
  75. this.drawerShow = true
  76. },*/
  77. onSuccess(){
  78. this.drawerShow = false
  79. this.$emit('onSuccess')
  80. },
  81. handleCommand(val){
  82. console.log(val)
  83. this.type = val
  84. this.drawerShow = true
  85. }
  86. },
  87. created() {}
  88. }
  89. </script>
  90. <style scoped>
  91. </style>