clothes-list.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <template>
  2. <!-- 装箱单-成衣列表 -->
  3. <div id="clothesList">
  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. <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
  12. </a-form-item>
  13. </a-col>
  14. <a-col :md="6" :sm="8">
  15. <a-form-item label="款号">
  16. <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
  17. </a-form-item>
  18. </a-col>
  19. <a-col :md="6" :sm="8">
  20. <a-form-item label="品名">
  21. <a-input placeholder="请输入品名" v-model="queryParam.name"></a-input>
  22. </a-form-item>
  23. </a-col>
  24. <template v-if="toggleSearchStatus">
  25. <a-col :md="6" :sm="8">
  26. <a-form-item label="托书号">
  27. <a-input placeholder="请输入托书号" v-model="queryParam.bookNum"></a-input>
  28. </a-form-item>
  29. </a-col>
  30. </template>
  31. <a-col :md="6" :sm="8">
  32. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  33. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  34. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  35. <a @click="handleToggleSearch" style="margin-left: 8px">
  36. {{ toggleSearchStatus ? '收起' : '展开' }}
  37. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  38. </a>
  39. </span>
  40. </a-col>
  41. </a-row>
  42. </a-form>
  43. </div>
  44. </a-card>
  45. <!-- 操作按钮区域 推送 导入 新增-->
  46. <a-card :bordered="false" style="marginTop:10px;">
  47. <div class="table-operator">
  48. <a-button type="primary" @click="push" icon="export">推送</a-button>
  49. <a-upload
  50. name="file"
  51. :showUploadList="false"
  52. :multiple="false"
  53. :headers="tokenHeader"
  54. :action="importExcelUrl"
  55. @change="handleImportExcel"
  56. >
  57. <a-button type="primary" icon="import">导入</a-button>
  58. </a-upload>
  59. <a-button type="primary" @click="openClothesAdd" icon="plus">新增</a-button>
  60. </div>
  61. <!-- table rowKey="id"-->
  62. <a-table
  63. bordered
  64. :columns="clothesListColumns"
  65. :data-source="clothesListData"
  66. :loading="loading"
  67. :pagination="ipagination"
  68. :row-key="record => record.id"
  69. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  70. @change="handleTableChange"
  71. :scroll="{ x: 1500 }"
  72. >
  73. <!-- 集装箱号 输入框-->
  74. <a-form-model
  75. slot="containerNo"
  76. slot-scope="text, record"
  77. :ref="record.index"
  78. :model="record"
  79. style="width:100%;height:40px"
  80. >
  81. <a-form-model-item prop="containerNo">
  82. <a-input style="width:100%" v-model="record.containerNo" />
  83. </a-form-model-item>
  84. </a-form-model>
  85. <!-- 预托书号 -->
  86. <a-form-model
  87. slot="preBookNum"
  88. slot-scope="text, record"
  89. :ref="record.index"
  90. :model="record"
  91. style="width:100%;height:40px"
  92. >
  93. <a-form-model-item prop="preBookNum">
  94. <a-input style="width:100%" v-model="record.preBookNum" />
  95. </a-form-model-item>
  96. </a-form-model>
  97. <!-- 状态 -->
  98. <!-- slot-scope="text, record" -->
  99. <span slot="stateSlot">
  100. <!-- v-if="record.isRelease == '0'" -->
  101. <a-tag color="#f50">保存</a-tag>
  102. <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
  103. </span>
  104. <!-- 推送状态 -->
  105. <span slot="pushState">
  106. <!-- v-if="record.isRelease == '0'" -->
  107. <a-tag color="#f50">保存</a-tag>
  108. <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
  109. </span>
  110. <!-- 单据状态 -->
  111. <span slot="documentState">
  112. <!-- v-if="record.isRelease == '0'" -->
  113. <a-tag color="#f50">提交</a-tag>
  114. <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
  115. </span>
  116. <!-- 操作 -->
  117. <span slot="operationSlot" slot-scope="text, record">
  118. <a @click="accessoryUpload(record)" style="color:green;">附件上传</a>
  119. <a-divider type="vertical" />
  120. <a-dropdown>
  121. <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
  122. <a-menu slot="overlay">
  123. <a-menu-item><a @click="submit(record)">提交</a></a-menu-item>
  124. <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
  125. <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
  126. <a-menu-item>
  127. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  128. <a href="javascript:void(0);" style="color:red;">删除</a>
  129. </a-popconfirm>
  130. </a-menu-item>
  131. </a-menu>
  132. </a-dropdown>
  133. </span>
  134. </a-table>
  135. </a-card>
  136. <!-- 抽屉 -->
  137. <div>
  138. <clothesAdd-drawer ref="clothesAddDrawer" :father="aa" @ok="modalFormOk"></clothesAdd-drawer>
  139. <detailsClothes-drawer ref="detailsClothesDrawer" :father="bb" @ok="modalFormOk"></detailsClothes-drawer>
  140. <editClothes-drawer ref="editClothesDrawer" :father="cc" @ok="modalFormOk"></editClothes-drawer>
  141. </div>
  142. </div>
  143. </template>
  144. <script>
  145. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  146. import JEllipsis from '@/components/jeecg/JEllipsis'
  147. import clothesAddDrawer from '@views/packing-list/packinglist-clothes/clothesAddDrawer.vue'
  148. import detailsClothesDrawer from '@views/packing-list/packinglist-clothes/detailsClothesDrawer.vue'
  149. import editClothesDrawer from '@views/packing-list/packinglist-clothes/editClothesDrawer.vue'
  150. export default {
  151. name: 'ClothesList', // 装箱单-成衣列表
  152. mixins: [JeecgListMixin],
  153. components: { JEllipsis, clothesAddDrawer, detailsClothesDrawer, editClothesDrawer },
  154. data() {
  155. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  156. return {
  157. // 表头
  158. clothesListColumns: [
  159. {
  160. title: '款号',
  161. dataIndex: 'styleNum',
  162. width: 120,
  163. fixed: 'left',
  164. className: 'replacecolor'
  165. },
  166. {
  167. title: '客户简称',
  168. dataIndex: 'customerShortName',
  169. width: 120,
  170. fixed: 'left',
  171. className: 'replacecolor'
  172. },
  173. {
  174. title: '预发货日期',
  175. dataIndex: 'scheduledShipDate',
  176. width: 120,
  177. className: 'replacecolor'
  178. },
  179. {
  180. title: '小po',
  181. dataIndex: 'smallPo',
  182. width: 120,
  183. className: 'replacecolor'
  184. },
  185. {
  186. title: '分销点',
  187. dataIndex: 'distributionPoint',
  188. width: 120,
  189. className: 'replacecolor'
  190. },
  191. {
  192. title: '存货名称',
  193. dataIndex: 'inventoryName',
  194. width: 120,
  195. className: 'replacecolor'
  196. },
  197. {
  198. title: '颜色',
  199. dataIndex: 'color',
  200. width: 120,
  201. className: 'replacecolor'
  202. },
  203. {
  204. title: '采购/委外订单号',
  205. dataIndex: 'purchaseAboardOrderNum',
  206. width: 160,
  207. className: 'replacecolor'
  208. },
  209. {
  210. title: '订单类型',
  211. dataIndex: 'orderType',
  212. width: 120,
  213. className: 'replacecolor'
  214. },
  215. {
  216. title: '工厂单价',
  217. dataIndex: 'factoryPeice',
  218. width: 120,
  219. className: 'replacecolor'
  220. },
  221. {
  222. title: '数量(按合并规则累计)',
  223. dataIndex: 'quantity',
  224. width: 200,
  225. className: 'replacecolor'
  226. },
  227. {
  228. title: '箱数',
  229. dataIndex: 'boxesNum',
  230. width: 90,
  231. className: 'replacecolor'
  232. },
  233. {
  234. title: '总净重',
  235. dataIndex: 'totalSuttle',
  236. width: 120,
  237. className: 'replacecolor'
  238. },
  239. {
  240. title: '总毛重',
  241. dataIndex: 'totalRoughWeigh',
  242. width: 120,
  243. className: 'replacecolor'
  244. },
  245. {
  246. title: '总体积',
  247. dataIndex: 'totalVolume',
  248. width: 120,
  249. className: 'replacecolor'
  250. },
  251. {
  252. title: '总价',
  253. dataIndex: 'totalPrices',
  254. width: 120,
  255. className: 'replacecolor'
  256. },
  257. {
  258. title: '集装箱代号',
  259. dataIndex: 'containerCode',
  260. width: 120,
  261. className: 'replacecolor'
  262. },
  263. {
  264. title: '集装箱号',
  265. dataIndex: 'containerNo',
  266. width: 140,
  267. scopedSlots: { customRender: 'containerNo' },
  268. className: 'replacecolor'
  269. },
  270. {
  271. title: '预托书号',
  272. dataIndex: 'preBookNum',
  273. width: 160,
  274. scopedSlots: { customRender: 'preBookNum' },
  275. className: 'replacecolor'
  276. },
  277. {
  278. title: '成衣工厂',
  279. dataIndex: 'clothesFactory',
  280. width: 140,
  281. customRender: t => ellipsis(t),
  282. className: 'replacecolor'
  283. },
  284. {
  285. title: '推送状态',
  286. dataIndex: 'pushState',
  287. width: 90,
  288. scopedSlots: { customRender: 'pushState' },
  289. className: 'replacecolor'
  290. },
  291. {
  292. title: '单据状态',
  293. dataIndex: 'documentState',
  294. width: 90,
  295. scopedSlots: { customRender: 'documentState' },
  296. className: 'replacecolor'
  297. },
  298. {
  299. title: '原因',
  300. dataIndex: 'reason',
  301. width: 180,
  302. customRender: t => ellipsis(t),
  303. className: 'replacecolor'
  304. },
  305. {
  306. title: '是否云工厂推送',
  307. dataIndex: 'isPushCloudfactory ',
  308. width: 90,
  309. // scopedSlots: { customRender: 'isPushCloudfactory' },
  310. className: 'replacecolor'
  311. },
  312. {
  313. title: '托书号',
  314. dataIndex: 'bookNum',
  315. width: 120,
  316. className: 'replacecolor'
  317. },
  318. {
  319. title: '外销发票号',
  320. dataIndex: 'exportInvoiceNo',
  321. width: 120,
  322. className: 'replacecolor'
  323. },
  324. {
  325. title: '状态',
  326. dataIndex: 'state',
  327. width: 80,
  328. fixed: 'right',
  329. scopedSlots: { customRender: 'stateSlot' },
  330. className: 'replacecolor'
  331. },
  332. {
  333. title: '操作',
  334. dataIndex: 'operation',
  335. scopedSlots: { customRender: 'operationSlot' },
  336. width: 160,
  337. fixed: 'right',
  338. className: 'replacecolor'
  339. }
  340. ],
  341. clothesListData: [{}, {}, {}],
  342. selectedRowKeys: [], // 勾选航
  343. loading: false, // 表格加载
  344. // 查询条件
  345. queryParam: {
  346. orderNum: '',
  347. styleNum: '',
  348. name: '', // 品名
  349. bookNum: '' // 托书号
  350. },
  351. url: {
  352. // syncUser: '/act/process/extActProcess/doSyncUser',
  353. list: '/sys/user/list',
  354. // delete: '/sys/user/delete',
  355. // deleteBatch: '/sys/user/deleteBatch',
  356. exportXlsUrl: '/sys/user/exportXls', // 导出
  357. importExcelUrl: 'sys/user/importExcel' // 导入
  358. }
  359. }
  360. },
  361. created() {
  362. // this.getAdPaListClothes()
  363. },
  364. methods: {
  365. // 推送
  366. push() {},
  367. // 导入
  368. importData() {},
  369. // 新增
  370. openClothesAdd() {
  371. console.log('新增-成衣')
  372. this.$refs.clothesAddDrawer.visible = true
  373. },
  374. // --------------------------------------
  375. // 查询按钮
  376. searchQuery() {
  377. // this.getAnnList() // 装箱单-成衣列表
  378. },
  379. searchReset() {
  380. // console.log('>>>>重置')
  381. this.queryParam = {}
  382. // this.getAnnList()
  383. },
  384. // --------------------------------------
  385. // 操作 附件上传
  386. accessoryUpload() {},
  387. // 操作 提交
  388. submit() {},
  389. // 操作 详情
  390. details(record) {
  391. console.log('详情')
  392. console.log('点击的record', record.id)
  393. this.$refs.detailsClothesDrawer.visible = true
  394. },
  395. // 操作 编辑
  396. edit(record) {
  397. console.log('编辑')
  398. this.$refs.editClothesDrawer.visible = true
  399. },
  400. // 操作 删除
  401. handleDelete() {},
  402. // --------------------------------------
  403. // ??
  404. modalFormOk() {},
  405. // 选中行
  406. onSelectChange(keys, rows) {
  407. this.selectedRowKeys = keys
  408. this.selectedRows = rows
  409. },
  410. // --------------------------------------
  411. aa() {},
  412. bb() {},
  413. cc() {}
  414. // 分页、排序、筛选变化时触发
  415. // handleTableChange(pagination, filters, sorter) {
  416. // // console.log('当前页信息>>>>',pagination)
  417. // this.queryParam.pageNo = pagination.current
  418. // // this.getAnnList()
  419. // }
  420. },
  421. computed: {
  422. // 导入
  423. importExcelUrl: function() {
  424. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  425. },
  426. // 选中项
  427. rowSelection() {
  428. return {
  429. onChange: (selectedRowKeys, selectedRows) => {
  430. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  431. },
  432. getCheckboxProps: record => ({
  433. props: {
  434. disabled: record.title === 'Disabled User',
  435. // Column configuration not to be checked
  436. title: record.title
  437. }
  438. })
  439. }
  440. }
  441. },
  442. mounted() {}
  443. }
  444. </script>
  445. <style lang="less" scoped>
  446. @import '~@assets/less/common.less';
  447. @import '~@assets/less/overwriter.less';
  448. /deep/ .ant-table-thead > tr > th {
  449. text-align: center;
  450. // font-weight: 700;
  451. }
  452. /deep/ .ant-table-tbody {
  453. text-align: center;
  454. }
  455. // /deep/ th.replacecolor {
  456. // background-color: #ccc;
  457. // }
  458. </style>