eom.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="选择销售订单"
  5. :visible.sync="dialogVisible"
  6. width="60%"
  7. :before-close="handleClose"
  8. >
  9. <div class="main">
  10. <ele-pro-table
  11. ref="table"
  12. :initLoad="false"
  13. :columns="columns"
  14. :current.sync="current"
  15. highlight-current-row
  16. :datasource="tableData"
  17. tool-class="ele-toolbar-form"
  18. cache-key="systemOrgUserTable"
  19. @row-click="chooseRow"
  20. >
  21. <!-- 表头工具栏 -->
  22. <template v-slot:docNo="{ row }">
  23. <!-- @click="details(row)" -->
  24. <el-link
  25. type="primary"
  26. @click="pickOrderEdit(row)"
  27. :underline="false"
  28. >
  29. {{ row.docNo }}
  30. </el-link>
  31. </template>
  32. <template v-slot:replied="{ row }">
  33. {{ row.replied == 1 ? '是' : '否' }}
  34. </template>
  35. <template v-slot:reviewStatus="{ row }">
  36. <span v-if="row.reviewStatus == 0">未提交</span>
  37. <span v-if="row.reviewStatus == 1">审核中</span>
  38. <span v-if="row.reviewStatus == 2">审核通过</span>
  39. <span v-if="row.reviewStatus == 3">审核未通过</span>
  40. </template>
  41. <template v-slot:action="{ row }">
  42. <el-radio class="radio" v-model="radio" :label="row.id"
  43. ><i></i
  44. ></el-radio>
  45. </template>
  46. </ele-pro-table>
  47. </div>
  48. <span slot="footer" class="dialog-footer">
  49. <el-button @click="dialogVisible = false">取 消</el-button>
  50. <el-button type="primary" @click="handleMine">确 定</el-button>
  51. </span>
  52. </el-dialog>
  53. <eomEdit ref="eomEditRef" />
  54. </div>
  55. </template>
  56. <script>
  57. import { saleordersendrecordPage } from '@/api/mes';
  58. import eomEdit from './eomEdit.vue';
  59. export default {
  60. components: { eomEdit },
  61. data() {
  62. return {
  63. dialogVisible: false,
  64. pages: {
  65. pageNum: 1,
  66. size: 10
  67. },
  68. total: 0,
  69. tableData: [],
  70. current: {},
  71. radio: null,
  72. columns: [
  73. {
  74. columnKey: 'index',
  75. type: 'index',
  76. width: 80,
  77. label: '序号',
  78. align: 'center',
  79. showOverflowTooltip: true,
  80. fixed: 'left'
  81. },
  82. {
  83. prop: 'docNo',
  84. label: '发货编码',
  85. showOverflowTooltip: true,
  86. slot: 'docNo'
  87. },
  88. {
  89. prop: 'orderNo',
  90. label: '销售订单编号',
  91. showOverflowTooltip: true
  92. },
  93. {
  94. prop: 'contactName',
  95. label: '客户名称',
  96. showOverflowTooltip: true
  97. },
  98. {
  99. prop: 'replied',
  100. label: '是否回执',
  101. showOverflowTooltip: true,
  102. slot: 'replied'
  103. },
  104. {
  105. prop: 'reviewStatus',
  106. label: '状态',
  107. showOverflowTooltip: true,
  108. slot: 'reviewStatus'
  109. },
  110. {
  111. prop: 'createTime',
  112. label: '创建时间',
  113. showOverflowTooltip: true
  114. },
  115. {
  116. columnKey: 'action',
  117. slot: 'action',
  118. align: 'center',
  119. fixed: 'right',
  120. width: 50
  121. }
  122. ]
  123. };
  124. },
  125. methods: {
  126. pickOrderEdit(row) {
  127. this.$refs.eomEditRef.open(row);
  128. },
  129. handleMine() {
  130. // const current = this.current.orderInfoList;
  131. // for (const key in current) {
  132. // if (
  133. // current[key].bomDetailDTOS.length == 0 &&
  134. // current[key].instanceList.length == 0
  135. // ) {
  136. // this.$message.warning('当前领料单数据为空');
  137. // return;
  138. // }
  139. // }
  140. console.log('sacnmmmmmm=', this.current);
  141. this.$emit('success', this.current);
  142. this.dialogVisible = false;
  143. },
  144. async open() {
  145. this.dialogVisible = true;
  146. const res = await saleordersendrecordPage(this.pages);
  147. console.log(res);
  148. this.tableData = res.data.list;
  149. this.total = res.data.count;
  150. },
  151. chooseRow(row) {
  152. this.current = row;
  153. this.radio = row.id;
  154. },
  155. handleClose(done) {
  156. this.dialogVisible = false;
  157. }
  158. }
  159. };
  160. </script>