plan-submit.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <el-dialog
  3. :visible.sync="visible"
  4. title="计划提交"
  5. width="60vw"
  6. append-to-body
  7. >
  8. <div class="main_container">
  9. <el-descriptions title="" :column="3" size="medium" border>
  10. <el-descriptions-item>
  11. <template slot="label"> 计划编号 </template>
  12. {{ info.code }}
  13. </el-descriptions-item>
  14. <el-descriptions-item>
  15. <template slot="label"> 计划类型 </template>
  16. {{ getDictValue('订单计划类型', info.planType) }}
  17. </el-descriptions-item>
  18. <el-descriptions-item>
  19. <template slot="label"> 产品编码</template>
  20. {{ info.productCode }}
  21. </el-descriptions-item>
  22. <el-descriptions-item>
  23. <template slot="label"> 牌号 </template>
  24. {{ info.brandNo }}
  25. </el-descriptions-item>
  26. <el-descriptions-item>
  27. <template slot="label"> 型号 </template>
  28. {{ info.model }}
  29. </el-descriptions-item>
  30. <el-descriptions-item>
  31. <template slot="label"> 订单数量 </template>
  32. {{ info.codeNum }}
  33. </el-descriptions-item>
  34. <el-descriptions-item>
  35. <template slot="label"> 生产版本 </template>
  36. {{ info.produceVersionName }}
  37. </el-descriptions-item>
  38. <el-descriptions-item>
  39. <template slot="label"> 产品数量 </template>
  40. {{ info.contractNum }}
  41. </el-descriptions-item>
  42. <el-descriptions-item>
  43. <template slot="label"> 产品重量 </template>
  44. {{ info.sumOrderWeight }}
  45. </el-descriptions-item>
  46. <el-descriptions-item>
  47. <template slot="label"> 要求成型数量 </template>
  48. {{ info.requiredFormingNum }}
  49. </el-descriptions-item>
  50. <el-descriptions-item>
  51. <template slot="label"> 要求成型重量 </template>
  52. {{ info.requiredFormingWeight }}
  53. </el-descriptions-item>
  54. <el-descriptions-item>
  55. <template slot="label"> 成型完成日期 </template>
  56. {{ info.reqMoldTime }}
  57. </el-descriptions-item>
  58. <el-descriptions-item :span="3">
  59. <template slot="label"> 计划备注 </template>
  60. {{ info.notes }}
  61. </el-descriptions-item>
  62. </el-descriptions>
  63. </div>
  64. <div slot="footer" class="footer">
  65. <div>
  66. <el-button @click="cancel">取消</el-button>
  67. <el-button @click="submit(2)" :loading="loading">提交并发布</el-button>
  68. <el-button type="primary" @click="submit(1)" :loading="loading"
  69. >提交</el-button
  70. >
  71. </div>
  72. </div>
  73. </el-dialog>
  74. </template>
  75. <script>
  76. import { getCode } from '@/api/codeManagement';
  77. import dictMixins from '@/mixins/dictMixins';
  78. export default {
  79. mixins: [dictMixins],
  80. props: {
  81. info: Object,
  82. type: String
  83. },
  84. data () {
  85. return {
  86. visible: false,
  87. loading: false,
  88. tableList: []
  89. };
  90. },
  91. computed: {},
  92. created () {
  93. this.requestDict('订单计划类型');
  94. },
  95. methods: {
  96. open () {
  97. this.visible = true;
  98. if (this.type != 'edit') {
  99. this.getPlanCode();
  100. }
  101. },
  102. cancel () {
  103. this.visible = false;
  104. },
  105. async getPlanCode () {
  106. this.loading = true;
  107. try {
  108. const code = await getCode('product_code');
  109. this.$set(this.info, 'code', code);
  110. } catch (err) {}
  111. this.loading = false;
  112. },
  113. submit (type) {
  114. this.$emit('publish', type);
  115. this.visible = false;
  116. }
  117. }
  118. };
  119. </script>
  120. <style lang="scss" scoped>
  121. .basic-details-title {
  122. margin: 10px 0;
  123. }
  124. </style>