surplusYarnModal.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <a-modal
  3. title="余纱"
  4. v-model="surplusYarnModVis"
  5. :confirmLoading="confirmLoading"
  6. width="86%"
  7. style="top:330px;left:100px;"
  8. :footer="null"
  9. >
  10. <!-- tabel 加载 -->
  11. <a-spin :spinning="confirmLoading">
  12. <!-- 查询 -->
  13. <div class="table-page-search-wrapper">
  14. <a-form layout="inline" @keyup.enter.native="searchQuery">
  15. <a-row :gutter="24">
  16. <a-col :md="6" :sm="8">
  17. <a-form-item label="委外订单号">
  18. <a-input placeholder="请输入委外订单号" v-model="queryParam.aboardorderNum"></a-input>
  19. </a-form-item>
  20. </a-col>
  21. <a-col :md="6" :sm="8">
  22. <a-form-item label="计划号">
  23. <a-input placeholder="请输入计划号" v-model="queryParam.planNum"></a-input>
  24. </a-form-item>
  25. </a-col>
  26. <a-col :md="6" :sm="8">
  27. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  28. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  29. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  30. <a @click="handleToggleSearch" style="margin-left: 8px">
  31. {{ toggleSearchStatus ? '收起' : '展开' }}
  32. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  33. </a>
  34. </span>
  35. </a-col>
  36. </a-row>
  37. </a-form>
  38. </div>
  39. <!-- table -->
  40. <div>
  41. <a-table
  42. bordered
  43. :loading="loading"
  44. :columns="surplusYarnColumns"
  45. :data-source="surplusYarnData"
  46. :pagination="false"
  47. >
  48. </a-table>
  49. <!-- 导出 打印 返回 -->
  50. <a-row style="marginTop:20px;">
  51. <a-col :md="24" :sm="12">
  52. <span style="float: right;" class="table-operator">
  53. <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
  54. <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
  55. <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
  56. </span>
  57. </a-col>
  58. </a-row>
  59. </div>
  60. </a-spin>
  61. </a-modal>
  62. </template>
  63. <script>
  64. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  65. import JEllipsis from '@/components/jeecg/JEllipsis'
  66. export default {
  67. name: 'SurplusYarnModal', // 余纱 弹框
  68. mixins: [JeecgListMixin],
  69. components: { JEllipsis },
  70. data() {
  71. return {
  72. // 表头
  73. surplusYarnColumns: [
  74. {
  75. title: '使用数量',
  76. dataIndex: 'usageQuantity',
  77. width: 120,
  78. key: '',
  79. className: 'replacecolor'
  80. },
  81. {
  82. title: '委外订单号',
  83. dataIndex: 'aboardorderNum',
  84. width: 120,
  85. key: '',
  86. className: 'replacecolor'
  87. },
  88. {
  89. title: '计划号',
  90. dataIndex: 'planNum',
  91. width: 120,
  92. key: '',
  93. className: 'replacecolor'
  94. },
  95. {
  96. title: '采购单价',
  97. dataIndex: 'purchasePrice',
  98. width: 120,
  99. key: '',
  100. className: 'replacecolor'
  101. }
  102. ],
  103. surplusYarnData: [{}, {}, {}],
  104. loading: false, // 表格加载
  105. // orderDataform: this.$form.createForm(this),
  106. confirmLoading: false,
  107. surplusYarnModVis: false,
  108. // 查询条件
  109. queryParam: {
  110. aboardorderNum: '', // aboardorderNum
  111. planNum: '' // 计划号
  112. }
  113. }
  114. },
  115. // 接收父组件 方法
  116. props: {
  117. father: {
  118. type: Function,
  119. default: null
  120. }
  121. },
  122. created() {},
  123. methods: {
  124. // 第一行 导出
  125. handleExportXls() {},
  126. // 打印
  127. print() {},
  128. // 返回
  129. backFabricLossTable() {
  130. console.log('返回到面料损耗表')
  131. // this.$router.push('fabricLoss-table')
  132. // this.surplusYarnModVis = false
  133. this.close()
  134. },
  135. // 弹框查询按钮
  136. searchQuery() {},
  137. // 重置
  138. searchReset() {
  139. this.queryParam = {}
  140. // this.getShipmentList()
  141. },
  142. close() {
  143. this.$emit('close')
  144. this.surplusYarnModVis = false
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="less" scoped>
  150. @import '~@assets/less/common.less';
  151. @import '~@assets/less/overwriter.less';
  152. /deep/ .ant-table-thead > tr > th {
  153. text-align: center;
  154. // font-weight: 700;
  155. }
  156. /deep/ .ant-table-tbody {
  157. text-align: center;
  158. }
  159. // /deep/ th.replacecolor {
  160. // background-color: #ccc;
  161. // }
  162. </style>