TagDistribute.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <div class="wrapper flex column layout-gap">
  3. <el-card shadow="hover" class="filter-card">
  4. <el-form label-width="100px">
  5. <el-row :gutter="$$Constant.LAYOUT_GAP">
  6. <el-col :span="8">
  7. <el-form-item label="申领状态">
  8. <my-select
  9. v-model="query.tagApplyStateId"
  10. :options="optionGroup.TagApplyState ? optionGroup.TagApplyState.list : []"
  11. @change="onSearchBtnClick"
  12. >
  13. <el-option label="全部" value=""></el-option>
  14. </my-select>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="16" class="text-right">
  18. <el-button
  19. plain
  20. class="filter-button"
  21. @click="onResetBtnClick"
  22. >重置</el-button>
  23. <el-button
  24. type="primary"
  25. class="filter-button"
  26. @click="onSearchBtnClick"
  27. >查询</el-button>
  28. </el-col>
  29. </el-row>
  30. </el-form>
  31. </el-card>
  32. <el-card
  33. shadow="hover"
  34. class="z-card flex column flex-1 fit-size"
  35. >
  36. <div class="wrapper flex column layout-gap">
  37. <div class="flex-1 fit-size">
  38. <el-table
  39. ref="table"
  40. :data="list"
  41. stripe
  42. border
  43. highlight-current-row
  44. height="100%"
  45. size="small"
  46. class="custom-el-table-style"
  47. >
  48. <el-table-column
  49. type="index"
  50. label="序号"
  51. width="60"
  52. align="center"
  53. fixed
  54. ></el-table-column>
  55. <el-table-column
  56. label="订单编号"
  57. prop="orderNo"
  58. align="center"
  59. min-width="110"
  60. header-align="center"
  61. ></el-table-column>
  62. <el-table-column
  63. label="申领日期"
  64. prop="formatDataTime"
  65. min-width="100"
  66. header-align="center"
  67. align="center"
  68. ></el-table-column>
  69. <el-table-column
  70. label="预期收货日期"
  71. prop="formatExpectedReceiptDate"
  72. min-width="100"
  73. header-align="center"
  74. align="center"
  75. ></el-table-column>
  76. <el-table-column
  77. label="供应商名称"
  78. prop="providerName"
  79. min-width="160"
  80. header-align="center"
  81. align="left"
  82. ></el-table-column>
  83. <el-table-column
  84. label="费用(元)"
  85. prop="amount"
  86. align="right"
  87. min-width="70"
  88. header-align="center"
  89. ></el-table-column>
  90. <el-table-column
  91. label="状态"
  92. prop="tagApplyStateName"
  93. align="center"
  94. min-width="70"
  95. header-align="center"
  96. ></el-table-column>
  97. <el-table-column
  98. label="发货方式"
  99. prop="deliveryMethodName"
  100. align="center"
  101. min-width="80"
  102. header-align="center"
  103. ></el-table-column>
  104. <el-table-column
  105. label="发货单号"
  106. prop="deliveryOrderNo"
  107. align="center"
  108. min-width="120"
  109. header-align="center"
  110. ></el-table-column>
  111. <el-table-column
  112. label="操作员"
  113. prop="operatorName"
  114. align="center"
  115. min-width="70"
  116. header-align="center"
  117. ></el-table-column>
  118. <el-table-column
  119. label="操作栏"
  120. min-width="130"
  121. header-align="center"
  122. align="center"
  123. >
  124. <template v-slot="{ row }">
  125. <div class="flex center layout-gap">
  126. <edit-button :data="row" :on-click="onOpenDetailEditorBtnClick" icon="el-icon-tickets">详情</edit-button>
  127. <edit-button :data="row" :on-click="onTagDistributeBtnClick" icon="el-icon-share" :disabled="row.tagApplyStateId !== '4' && row.tagApplyStateId !== '5'">发放</edit-button>
  128. </div>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. </div>
  133. <my-pagination
  134. :total="total"
  135. :pagination="pagination"
  136. @current-change="currentPageNoChange"
  137. />
  138. </div>
  139. </el-card>
  140. <dialog-tag-distribute
  141. ref="editor"
  142. :optionGroup="optionGroup"
  143. @saved="loadList"
  144. ></dialog-tag-distribute>
  145. <dialog-tag-distribute-detail
  146. ref="tagDistributeDetailDialog"
  147. ></dialog-tag-distribute-detail>
  148. </div>
  149. </template>
  150. <script>
  151. import BaseCurdList from '@@/utils/BaseCurdList'
  152. import TagDistribute from '@@/entries/TagDistribute'
  153. export default {
  154. name: 'TagDistribute',
  155. extends: BaseCurdList(TagDistribute),
  156. methods: {
  157. onTagDistributeBtnClick (data) {
  158. this.onOpenEditorBtnClick(data, data.tagApplyStateId === '5')
  159. },
  160. onOpenDetailEditorBtnClick (data) {
  161. this.$$request(TagDistribute.$$api.getDetail, data, this)
  162. .then(data => {
  163. this.$refs.tagDistributeDetailDialog.open(data)
  164. }).catch(console.error).finally(() => {})
  165. }
  166. }
  167. }
  168. </script>
  169. <style lang="scss" scoped></style>