adPaList-clothes.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <!-- 预装箱单-成衣 -->
  3. <div id="adPaListClothes">
  4. <!-- 查询 -->
  5. <a-card :bordered="false">
  6. <div class="table-page-search-wrapper">
  7. <a-form layout="inline" @keyup.enter.native="searchQuery">
  8. <a-row :gutter="24">
  9. <a-col :md="6" :sm="8">
  10. <a-form-item label="订单号">
  11. <!-- -->
  12. <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
  13. </a-form-item>
  14. </a-col>
  15. <a-col :md="6" :sm="8">
  16. <a-form-item label="款号">
  17. <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
  18. </a-form-item>
  19. </a-col>
  20. <a-col :md="6" :sm="8">
  21. <a-form-item label="品名">
  22. <a-input placeholder="请输入品名" v-model="queryParam.name"></a-input>
  23. </a-form-item>
  24. </a-col>
  25. <a-col :md="6" :sm="8">
  26. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  27. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  28. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  29. <a @click="handleToggleSearch" style="margin-left: 8px">
  30. {{ toggleSearchStatus ? '收起' : '展开' }}
  31. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  32. </a>
  33. </span>
  34. </a-col>
  35. </a-row>
  36. </a-form>
  37. </div>
  38. </a-card>
  39. <!-- 操作按钮区域 导出 导入 新增-->
  40. <a-card :bordered="false" style="margin:10px 0">
  41. <div class="table-operator">
  42. <a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣')">导出</a-button>
  43. <a-upload
  44. name="file"
  45. :showUploadList="false"
  46. :multiple="false"
  47. :headers="tokenHeader"
  48. :action="importExcelUrl"
  49. @change="handleImportExcel"
  50. >
  51. <a-button type="primary" icon="import">导入</a-button>
  52. </a-upload>
  53. <a-button type="primary" @click="addAdpackingDrawer" icon="plus">新增</a-button>
  54. </div>
  55. <!-- table rowKey="id" -->
  56. <a-table
  57. bordered
  58. :columns="adPaListClothesColumns"
  59. :data-source="adPaListClothesData"
  60. :loading="loading"
  61. :pagination="ipagination"
  62. :row-key="record => record.id"
  63. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  64. @change="handleTableChange"
  65. :scroll="{ x: 1500 }"
  66. >
  67. <!-- 推送状态 -->
  68. <!-- slot-scope="text, record" -->
  69. <span slot="pushStateSlot">
  70. <!-- v-if="record.isRelease == '0'" -->
  71. <a-tag color="#f50">未推送</a-tag>
  72. <!-- <a-tag color="#87d068" v-else>已发布</a-tag> -->
  73. </span>
  74. <!-- 单据状态 -->
  75. <span slot="documentStateSlot">
  76. <a-tag color="#2db7f5">已保存</a-tag>
  77. </span>
  78. <!-- 操作 -->
  79. <span slot="operationSlot" slot-scope="text, record">
  80. <a @click="derive(record)" style="color:green;">导出</a>
  81. <a-divider type="vertical" />
  82. <a-dropdown>
  83. <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  84. <a-menu slot="overlay">
  85. <a-menu-item><a @click="submit(record)">提交</a></a-menu-item>
  86. <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
  87. <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
  88. <a-menu-item>
  89. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  90. <a href="javascript:void(0);" style="color:red;">删除</a>
  91. </a-popconfirm>
  92. </a-menu-item>
  93. <a-menu-item><a @click="copy(record)">复制</a></a-menu-item>
  94. </a-menu>
  95. </a-dropdown>
  96. </span>
  97. </a-table>
  98. </a-card>
  99. <!-- 抽屉 -->
  100. <div>
  101. <addAdpacking-drawer ref="addAdpackingDrawer" :father="aa" @ok="modalFormOk"></addAdpacking-drawer>
  102. <detailsAdpacking-drawer ref="detailsAdpackingDrawer" :father="bb" @ok="modalFormOk"></detailsAdpacking-drawer>
  103. <editAdpacking-drawer ref="editAdpackingDrawer" :father="cc" @ok="modalFormOk"></editAdpacking-drawer>
  104. </div>
  105. </div>
  106. </template>
  107. <script>
  108. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  109. import JEllipsis from '@/components/jeecg/JEllipsis'
  110. import moment from 'moment'
  111. import addAdpackingDrawer from '@views/advance-packingList/addAdpackingDrawer.vue'
  112. import detailsAdpackingDrawer from '@views/advance-packingList/detailsAdpackingDrawer.vue'
  113. import editAdpackingDrawer from '@views/advance-packingList/editAdpackingDrawer.vue'
  114. export default {
  115. name: 'AdPaListClothes', // 预装线单-成衣
  116. mixins: [JeecgListMixin],
  117. components: { JEllipsis, moment, addAdpackingDrawer, detailsAdpackingDrawer, editAdpackingDrawer },
  118. data() {
  119. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  120. return {
  121. // 表头
  122. adPaListClothesColumns: [
  123. {
  124. title: '款号',
  125. dataIndex: 'styleNum',
  126. width: 120,
  127. fixed: 'left',
  128. className: 'replacecolor'
  129. },
  130. {
  131. title: '客户简称',
  132. dataIndex: 'customerShortName',
  133. width: 120,
  134. fixed: 'left',
  135. className: 'replacecolor'
  136. },
  137. {
  138. title: '预发货日期',
  139. dataIndex: 'scheduledShipDate',
  140. width: 120,
  141. customRender: text => {
  142. return moment(text).format('YYYY-MM-DD')
  143. },
  144. className: 'replacecolor'
  145. },
  146. {
  147. title: '小po',
  148. dataIndex: 'smallPo',
  149. width: 120,
  150. className: 'replacecolor'
  151. },
  152. {
  153. title: '分销点',
  154. dataIndex: 'distributionPoint',
  155. width: 120,
  156. className: 'replacecolor'
  157. },
  158. {
  159. title: '存货名称',
  160. dataIndex: 'inventoryName',
  161. width: 120,
  162. className: 'replacecolor'
  163. },
  164. {
  165. title: '颜色',
  166. dataIndex: 'color',
  167. width: 120,
  168. className: 'replacecolor'
  169. },
  170. {
  171. title: '采购/委外订单号',
  172. dataIndex: 'purchaseAboardOrderNum',
  173. width: 160,
  174. className: 'replacecolor'
  175. },
  176. {
  177. title: '订单类型',
  178. dataIndex: 'orderType',
  179. width: 120,
  180. className: 'replacecolor'
  181. },
  182. {
  183. title: '原因',
  184. dataIndex: 'reason',
  185. width: 120,
  186. customRender: t => ellipsis(t),
  187. className: 'replacecolor'
  188. },
  189. {
  190. title: '推送状态',
  191. dataIndex: 'pushState',
  192. width: 90,
  193. scopedSlots: { customRender: 'pushStateSlot' },
  194. fixed: 'right',
  195. className: 'replacecolor'
  196. },
  197. {
  198. title: '单据状态',
  199. dataIndex: 'documentState',
  200. width: 90,
  201. scopedSlots: { customRender: 'documentStateSlot' },
  202. fixed: 'right',
  203. className: 'replacecolor'
  204. },
  205. {
  206. title: '操作',
  207. dataIndex: 'operation',
  208. scopedSlots: { customRender: 'operationSlot' },
  209. width: 160,
  210. fixed: 'right',
  211. className: 'replacecolor'
  212. }
  213. ],
  214. adPaListClothesData: [{}, {}, {}, {}],
  215. selectedRowKeys: [], // 勾选航
  216. loading: false, // 表格加载
  217. // 查询条件
  218. queryParam: {
  219. orderNum: '',
  220. styleNum: '',
  221. name: '' // 品名
  222. },
  223. url: {
  224. // syncUser: '/act/process/extActProcess/doSyncUser',
  225. list: '/sys/user/list',
  226. // delete: '/sys/user/delete',
  227. // deleteBatch: '/sys/user/deleteBatch',
  228. exportXlsUrl: '/sys/user/exportXls', // 导出
  229. importExcelUrl: 'sys/user/importExcel' // 导入
  230. }
  231. }
  232. },
  233. created() {
  234. // this.getAdPaListClothes()
  235. },
  236. methods: {
  237. // 第一行导出
  238. handleExportXls() {},
  239. // 新增 预装箱单
  240. addAdpackingDrawer() {
  241. console.log('新增预装箱单')
  242. this.$refs.addAdpackingDrawer.visible = true
  243. },
  244. // 第二行 查询按钮
  245. searchQuery() {
  246. // this.getAnnList() // 渲染公告
  247. },
  248. // 重置
  249. searchReset() {
  250. // console.log('>>>>重置')
  251. this.queryParam = {}
  252. // this.getAnnList()
  253. },
  254. // 操作 导出
  255. derive() {},
  256. // 操作 提交
  257. submit() {},
  258. // 操作 详情
  259. details(record) {
  260. console.log('详情')
  261. console.log('点击的record', record.id)
  262. this.$refs.detailsAdpackingDrawer.visible = true
  263. },
  264. // 操作 编辑
  265. edit(record) {
  266. console.log('编辑')
  267. this.$refs.editAdpackingDrawer.visible = true
  268. },
  269. // 操作 删除
  270. handleDelete() {},
  271. // 选中行
  272. onSelectChange(keys, rows) {
  273. this.selectedRowKeys = keys
  274. this.selectedRows = rows
  275. },
  276. // --------------------------------------
  277. aa() {},
  278. bb() {},
  279. cc() {}
  280. // 分页、排序、筛选变化时触发
  281. // handleTableChange(pagination, filters, sorter) {
  282. // // console.log('当前页信息>>>>',pagination)
  283. // this.queryParam.pageNo = pagination.current
  284. // // this.getAnnList()
  285. // }
  286. },
  287. computed: {
  288. // 导入
  289. importExcelUrl: function() {
  290. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  291. },
  292. // 选中项
  293. rowSelection() {
  294. return {
  295. onChange: (selectedRowKeys, selectedRows) => {
  296. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  297. },
  298. getCheckboxProps: record => ({
  299. props: {
  300. disabled: record.title === 'Disabled User',
  301. // Column configuration not to be checked
  302. title: record.title
  303. }
  304. })
  305. }
  306. }
  307. },
  308. mounted() {}
  309. }
  310. </script>
  311. <style lang="less" scoped>
  312. @import '~@assets/less/common.less';
  313. @import '~@assets/less/overwriter.less';
  314. /deep/ .ant-table-thead > tr > th {
  315. text-align: center;
  316. // font-weight: 700;
  317. }
  318. /deep/ .ant-table-tbody {
  319. text-align: center;
  320. }
  321. // /deep/ th.replacecolor {
  322. // background-color: #ccc;
  323. // }
  324. </style>