pilosityFewerModal.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <a-modal
  3. title="多发少发"
  4. v-model="pilosityFewerModVis"
  5. :confirmLoading="confirmLoading"
  6. width="86%"
  7. style="top:330px;left:100px;minHeight:700px"
  8. :footer="null"
  9. >
  10. <!-- tabel 加载 -->
  11. <a-spin :spinning="confirmLoading">
  12. <!-- 回显信息 -->
  13. <div class="table-page-search-wrapper" style="marginTop:20px;">
  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 v-model="pilosityFewerList.goodsName"></a-input>
  19. </a-form-item>
  20. </a-col>
  21. <a-col :md="6" :sm="8">
  22. <a-form-item label="色号">
  23. <a-input v-model="pilosityFewerList.color"></a-input>
  24. </a-form-item>
  25. </a-col>
  26. <a-col :md="6" :sm="8">
  27. <a-form-item label="计划数量">
  28. <a-input v-model="pilosityFewerList.planQuantity"></a-input>
  29. </a-form-item>
  30. </a-col>
  31. <a-col :md="6" :sm="8">
  32. <a-form-item label="购入数量">
  33. <a-input v-model="pilosityFewerList.purchaseQuantity"></a-input>
  34. </a-form-item>
  35. </a-col>
  36. <a-col :md="6" :sm="8">
  37. <a-form-item label="多发少发">
  38. <a-input v-model="pilosityFewerList.pilosityFewer"></a-input>
  39. </a-form-item>
  40. </a-col> -->
  41. <!-- <a-col :md="6" :sm="8">
  42. <a-form-item label="备注">
  43. <a-input v-model="pilosityFewerList.styleNumber"></a-input>
  44. </a-form-item>
  45. </a-col> -->
  46. <!-- <a-col :md="24" :sm="24">
  47. <a-form-item label="备注" class="noteBg">
  48. <a-input type="textarea" v-model="pilosityFewerList.remarks" style="minHeight:100px;"></a-input> -->
  49. <a-table
  50. bordered
  51. :loading="loading"
  52. :columns="pilosityFewerColumns"
  53. :data-source="pilosityFewerList"
  54. :pagination="false"
  55. :scroll="{ y: 500 }"
  56. >
  57. <span slot="color" slot-scope="text,record">
  58. <a-input placeholder="请输入" v-model="record.color" />
  59. </span>
  60. <span slot="remarks" slot-scope="text,record">
  61. <a-input placeholder="请输入" v-model="record.remarks" />
  62. </span>
  63. </a-table>
  64. <!-- 导出 打印 返回 -->
  65. <a-row style="marginTop:20px;">
  66. <a-col :md="24" :sm="12">
  67. <span style="float: right;" class="table-operator">
  68. <!-- <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
  69. <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
  70. <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
  71. </span>
  72. </a-col>
  73. </a-row>
  74. <!-- </a-col>
  75. </a-row>
  76. </a-form> -->
  77. </div>
  78. </a-spin>
  79. </a-modal>
  80. </template>
  81. <script>
  82. export default {
  83. name: 'pilosityFewerListModal', // 事故单 弹框
  84. components: {},
  85. data() {
  86. return {
  87. loading: false,
  88. confirmLoading: false,
  89. pilosityFewerModVis: false,
  90. pilosityFewerList: [],
  91. pilosityFewerColumns:[
  92. {
  93. title: '存货名称',
  94. dataIndex: 'goodsName',
  95. width: 120,
  96. className: 'replacecolor'
  97. },
  98. {
  99. title: '色号',
  100. dataIndex: 'color',
  101. width: 120,
  102. className: 'replacecolor',
  103. scopedSlots: { customRender: 'color' },
  104. },
  105. {
  106. title: '计划数量',
  107. dataIndex: 'planQuantity',
  108. width: 120,
  109. className: 'replacecolor'
  110. },
  111. {
  112. title: '购入数量',
  113. dataIndex: 'purchaseQuantity',
  114. width: 120,
  115. className: 'replacecolor'
  116. },
  117. {
  118. title: '多发少发',
  119. dataIndex: 'pilosityFewer',
  120. width: 120,
  121. className: 'replacecolor'
  122. },
  123. {
  124. title: '备注',
  125. dataIndex: 'remarks',
  126. width: 120,
  127. className: 'replacecolor',
  128. scopedSlots: { customRender: 'remarks' },
  129. },
  130. ]
  131. }
  132. },
  133. // 接收父组件 方法
  134. props: {
  135. father: {
  136. type: Function,
  137. default: null
  138. }
  139. },
  140. created() {},
  141. methods: {
  142. // 导出
  143. handleExportXls(fileName) {
  144. console.log('需导出的fileName:', fileName)
  145. const params = this.dyeLossRateData
  146. console.log('导出参数', params)
  147. // downFile('/scas/dyeLoss/excel', params).then(data => {
  148. // console.log('888')
  149. // if (!data) {
  150. // this.$message.warning('文件下载失败')
  151. // return
  152. // }
  153. // if (typeof window.navigator.msSaveBlob !== 'undefined') {
  154. // window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
  155. // } else {
  156. // let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
  157. // let link = document.createElement('a')
  158. // link.style.display = 'none'
  159. // link.href = url
  160. // link.setAttribute('download', fileName + '.xls')
  161. // document.body.appendChild(link)
  162. // link.click()
  163. // document.body.removeChild(link) // 下载完成移除元素
  164. // window.URL.revokeObjectURL(url) // 释放掉blob对象
  165. // }
  166. // })
  167. },
  168. // 打印
  169. print() {},
  170. // 返回
  171. backFabricLossTable() {
  172. console.log('返回到面料损耗表')
  173. this.pilosityFewerModVis = false
  174. }
  175. }
  176. }
  177. </script>
  178. <style lang="less" scoped>
  179. @import '~@assets/less/common.less';
  180. @import '~@assets/less/overwriter.less';
  181. /deep/ .ant-table-thead > tr > th {
  182. text-align: center;
  183. // font-weight: 700;
  184. }
  185. /deep/ .ant-table-tbody {
  186. text-align: center;
  187. }
  188. // /deep/ th.replacecolor {
  189. // background-color: #ccc;
  190. // }
  191. </style>