plan-submit.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.produceRoutingName }}
  41. </el-descriptions-item>
  42. <el-descriptions-item>
  43. <template slot="label"> 产品数量 </template>
  44. {{ info.contractNum }}
  45. </el-descriptions-item>
  46. <el-descriptions-item>
  47. <template slot="label"> 产品重量 </template>
  48. {{ info.sumOrderWeight }}
  49. </el-descriptions-item>
  50. <el-descriptions-item>
  51. <template slot="label"> 要求生产数量 </template>
  52. {{ Number(info.requiredFormingNum) }}
  53. </el-descriptions-item>
  54. <el-descriptions-item>
  55. <template slot="label"> 要求生产重量 </template>
  56. {{ info.newSumOrderWeight }} {{ info.newWeightUnit }}
  57. </el-descriptions-item>
  58. <el-descriptions-item>
  59. <template slot="label"> 生产完成日期 </template>
  60. {{ info.reqMoldTime }}
  61. </el-descriptions-item>
  62. <el-descriptions-item :span="3">
  63. <template slot="label"> 计划备注 </template>
  64. {{ info.notes }}
  65. </el-descriptions-item>
  66. </el-descriptions>
  67. </div>
  68. <div slot="footer" class="footer">
  69. <div>
  70. <el-button @click="cancel">取消</el-button>
  71. <el-button @click="submit(2)" type="primary" :loading="loading"
  72. >提交并发布</el-button
  73. >
  74. <el-button type="primary" @click="submit(1)" :loading="loading"
  75. >提交</el-button
  76. >
  77. </div>
  78. </div>
  79. </el-dialog>
  80. </template>
  81. <script>
  82. import { getCode } from '@/api/codeManagement';
  83. import dictMixins from '@/mixins/dictMixins';
  84. export default {
  85. mixins: [dictMixins],
  86. props: {
  87. info: Object,
  88. type: String
  89. },
  90. data() {
  91. return {
  92. visible: false,
  93. loading: false,
  94. tableList: []
  95. };
  96. },
  97. computed: {},
  98. created() {
  99. this.requestDict('订单计划类型');
  100. },
  101. methods: {
  102. open() {
  103. this.visible = true;
  104. if (this.type != 'edit') {
  105. this.getPlanCode();
  106. }
  107. },
  108. cancel() {
  109. this.visible = false;
  110. },
  111. async getPlanCode() {
  112. this.loading = true;
  113. try {
  114. const code = await getCode('product_code');
  115. this.$set(this.info, 'code', code);
  116. } catch (err) {}
  117. this.loading = false;
  118. },
  119. submit(type) {
  120. this.$emit('publish', type);
  121. this.visible = false;
  122. }
  123. }
  124. };
  125. </script>
  126. <style lang="scss" scoped>
  127. .basic-details-title {
  128. margin: 10px 0;
  129. }
  130. </style>