plan-submit.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 }} {{ info.newWeightUnit }}
  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>
  63. <template slot="label"> 批次号 </template>
  64. {{ info.batchNo }}
  65. </el-descriptions-item>
  66. <el-descriptions-item :span="3">
  67. <template slot="label"> 计划备注 </template>
  68. {{ info.notes }}
  69. </el-descriptions-item>
  70. </el-descriptions>
  71. </div>
  72. <div slot="footer" class="footer">
  73. <div>
  74. <el-button @click="cancel">取消</el-button>
  75. <el-button @click="submit(2)" type="primary" :loading="loading" v-if="type != 'edit'"
  76. >提交并发布</el-button
  77. >
  78. <el-button type="primary" @click="submit(1)" :loading="loading"
  79. >提交</el-button
  80. >
  81. </div>
  82. </div>
  83. </el-dialog>
  84. </template>
  85. <script>
  86. import { getCode } from '@/api/codeManagement';
  87. import dictMixins from '@/mixins/dictMixins';
  88. export default {
  89. mixins: [dictMixins],
  90. props: {
  91. info: Object,
  92. type: String
  93. },
  94. data() {
  95. return {
  96. visible: false,
  97. loading: false,
  98. tableList: []
  99. };
  100. },
  101. computed: {},
  102. created() {
  103. this.requestDict('订单计划类型');
  104. },
  105. methods: {
  106. open() {
  107. this.visible = true;
  108. if (this.type != 'edit') {
  109. this.getPlanCode();
  110. }
  111. },
  112. cancel() {
  113. this.visible = false;
  114. },
  115. async getPlanCode() {
  116. this.loading = true;
  117. try {
  118. const code = await getCode('product_code');
  119. this.$set(this.info, 'code', code);
  120. } catch (err) {}
  121. this.loading = false;
  122. },
  123. submit(type) {
  124. this.$emit('publish', type);
  125. this.visible = false;
  126. }
  127. }
  128. };
  129. </script>
  130. <style lang="scss" scoped>
  131. .basic-details-title {
  132. margin: 10px 0;
  133. }
  134. </style>