shipmentList.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. <template>
  2. <!-- 发运明细列表 -->
  3. <div id="ShipmentList">
  4. <a-card :bordered="false">
  5. <!-- 查询 -->
  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.documentNum"></a-input>
  12. </a-form-item>
  13. </a-col>
  14. <a-col :md="6" :sm="8">
  15. <a-form-item label="开始时间">
  16. <a-date-picker
  17. placeholder="请选择开始时间"
  18. @change="startTimeChange"
  19. style="width: 100%"
  20. v-model="queryParam.startTime"
  21. />
  22. </a-form-item>
  23. </a-col>
  24. <a-col :md="6" :sm="8">
  25. <a-form-item label="结束时间" style="width:100%;">
  26. <a-month-picker
  27. placeholder="请选择结束时间"
  28. @change="endTimeChange"
  29. style="width: 100%"
  30. v-model="queryParam.endTime"
  31. />
  32. </a-form-item>
  33. </a-col>
  34. <template v-if="toggleSearchStatus">
  35. <a-col :md="6" :sm="8">
  36. <a-form-item label="发货日期">
  37. <a-date-picker
  38. placeholder="请选择发货日期"
  39. @change="shipDateChange"
  40. style="width: 100%"
  41. v-model="queryParam.deliveryDate"
  42. />
  43. </a-form-item>
  44. </a-col>
  45. <a-col :md="6" :sm="8">
  46. <a-form-item label="业务员">
  47. <a-input placeholder="请输入业务员" v-model="queryParam.salesman"></a-input>
  48. </a-form-item>
  49. </a-col>
  50. <a-col :md="6" :sm="8">
  51. <a-form-item label="款号">
  52. <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
  53. </a-form-item>
  54. </a-col>
  55. <a-col :md="6" :sm="8">
  56. <a-form-item label="是否被参照">
  57. <a-select v-model="queryParam.refer">
  58. <a-select-option value="">请选择</a-select-option>
  59. <a-select-option :value="0">否</a-select-option>
  60. <a-select-option :value="1">是</a-select-option>
  61. </a-select>
  62. </a-form-item>
  63. </a-col>
  64. </template>
  65. <a-col :md="6" :sm="8">
  66. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  67. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  68. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  69. <a @click="handleToggleSearch" style="margin-left: 8px">
  70. {{ toggleSearchStatus ? '收起' : '展开' }}
  71. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  72. </a>
  73. </span>
  74. </a-col>
  75. </a-row>
  76. </a-form>
  77. </div>
  78. </a-card>
  79. <!-- 操作按钮区域 -->
  80. <a-card :bordered="false" style=" marginTop:10px;">
  81. <div class="table-operator">
  82. <a-button type="primary" @click="addShipDet" icon="plus">新增</a-button>
  83. </div>
  84. <!-- table y: 300 -->
  85. <div>
  86. <a-row>
  87. <a-table
  88. bordered
  89. :row-key="record => record.id"
  90. :columns="shipmentListColumns"
  91. :data-source="shipmentListData"
  92. :loading="loading"
  93. :pagination="ipagination"
  94. :scroll="{ x: 1500 }"
  95. @change="handleTableChange"
  96. >
  97. <!-- 推送状态 -->
  98. <!-- slot-scope="text, record" -->
  99. <span slot="pushStateSlot">
  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="documentStateSlot">
  106. <a-tag color="#2db7f5">已保存</a-tag>
  107. </span>
  108. <!-- 操作 -->
  109. <span slot="operationSlot" slot-scope="text, record">
  110. <a href="javascript:void(0);" @click="declareElements(record)" style="color:green">申报要素</a>
  111. <a-divider type="vertical" />
  112. <a-dropdown>
  113. <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
  114. <a-menu slot="overlay">
  115. <a-menu-item>
  116. <a @click="details(record)">详情</a>
  117. </a-menu-item>
  118. <a-menu-item>
  119. <a @click="submit(record)">提交</a>
  120. </a-menu-item>
  121. <a-menu-item>
  122. <a @click="edit(record)">编辑</a>
  123. </a-menu-item>
  124. <a-menu-item>
  125. <a @click="push(record)">推送</a>
  126. </a-menu-item>
  127. <a-menu-item>
  128. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  129. <a href="javascript:void(0);" style="color:red;">删除</a>
  130. </a-popconfirm>
  131. </a-menu-item>
  132. </a-menu>
  133. </a-dropdown>
  134. </span>
  135. </a-table>
  136. </a-row>
  137. </div>
  138. </a-card>
  139. <!-- 新增 详情 修改 抽屉 -->
  140. <addShipDet-drawer ref="addShipDetDrawer" :father="aa" @ok="modalFormOk"></addShipDet-drawer>
  141. <detailsShipDet-drawer ref="detailsShipDetDrawer" :father="bb" @ok="modalFormOk"></detailsShipDet-drawer>
  142. <editShipDet-drawer ref="editShipDetDrawer" :father="cc" @ok="modalFormOk"></editShipDet-drawer>
  143. </div>
  144. </template>
  145. <script>
  146. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  147. import JEllipsis from '@/components/jeecg/JEllipsis'
  148. import moment from 'moment'
  149. import addShipDetDrawer from '@views/shipment-details/addShipDetDrawer.vue'
  150. import detailsShipDetDrawer from '@views/shipment-details/detailsShipDetDrawer.vue'
  151. import editShipDetDrawer from '@views/shipment-details/editShipDetDrawer.vue'
  152. export default {
  153. name: 'ShipmentList', // 发运明细列表
  154. mixins: [JeecgListMixin],
  155. components: { JEllipsis, moment, addShipDetDrawer, detailsShipDetDrawer, editShipDetDrawer },
  156. data() {
  157. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  158. return {
  159. loading: false, // 表格加载
  160. id: '',
  161. // 表头
  162. shipmentListColumns: [
  163. {
  164. title: '单据号',
  165. dataIndex: 'documentNum',
  166. fixed: 'left',
  167. width: 120,
  168. className: 'replacecolor'
  169. },
  170. {
  171. title: '订单号',
  172. dataIndex: 'orderNum',
  173. fixed: 'left',
  174. width: 120,
  175. className: 'replacecolor'
  176. },
  177. // {
  178. // title: '创建时间',
  179. // dataIndex: 'createTime',
  180. // align: 'center',
  181. // sorter: true,
  182. // customRender: text => {
  183. // return moment(text).format('YYYY-MM-DD')
  184. // }
  185. // },
  186. {
  187. title: '单据日期',
  188. dataIndex: 'billDate',
  189. width: 140,
  190. className: 'replacecolor'
  191. },
  192. {
  193. title: '客户',
  194. dataIndex: 'customer',
  195. width: 120,
  196. className: 'replacecolor'
  197. },
  198. {
  199. title: '小po',
  200. dataIndex: 'smallPo',
  201. width: 120,
  202. className: 'replacecolor'
  203. },
  204. {
  205. title: '款号',
  206. dataIndex: 'styleNum',
  207. width: 120,
  208. className: 'replacecolor'
  209. },
  210. {
  211. title: '报关品名',
  212. dataIndex: 'declarationName',
  213. width: 120,
  214. className: 'replacecolor'
  215. },
  216. {
  217. title: 'hscode',
  218. dataIndex: 'hscode',
  219. width: 120,
  220. className: 'replacecolor'
  221. },
  222. {
  223. title: '英文品名',
  224. dataIndex: 'englishProName',
  225. width: 120,
  226. className: 'replacecolor'
  227. },
  228. {
  229. title: '账套',
  230. dataIndex: 'accountSet',
  231. width: 120,
  232. className: 'replacecolor'
  233. },
  234. {
  235. title: '订单日期',
  236. dataIndex: 'orderDate',
  237. width: 140,
  238. className: 'replacecolor'
  239. },
  240. {
  241. title: '业务类型',
  242. dataIndex: 'businessType',
  243. width: 120,
  244. className: 'replacecolor'
  245. },
  246. {
  247. title: '客户订单',
  248. dataIndex: 'customerOrder',
  249. width: 120,
  250. className: 'replacecolor'
  251. },
  252. {
  253. title: 'Pack Id',
  254. dataIndex: 'packId',
  255. width: 120,
  256. className: 'replacecolor'
  257. },
  258. {
  259. title: '订单数据',
  260. dataIndex: 'orderData',
  261. width: 120,
  262. className: 'replacecolor'
  263. },
  264. {
  265. title: '订单剩余数量',
  266. dataIndex: 'orderRemaQuantity',
  267. width: 120,
  268. className: 'replacecolor'
  269. },
  270. {
  271. title: '发货数量',
  272. dataIndex: 'shipQuantity',
  273. width: 120,
  274. className: 'replacecolor'
  275. },
  276. {
  277. title: '是否TC功能',
  278. dataIndex: 'isTC',
  279. width: 90,
  280. className: 'replacecolor'
  281. },
  282. {
  283. title: '物料成分',
  284. dataIndex: 'materialComposition',
  285. width: 120,
  286. className: 'replacecolor'
  287. },
  288. {
  289. title: '销售类型',
  290. dataIndex: 'saleType',
  291. width: 120,
  292. className: 'replacecolor'
  293. },
  294. {
  295. title: '客户简称',
  296. dataIndex: 'customerShortName',
  297. width: 120,
  298. className: 'replacecolor'
  299. },
  300. {
  301. title: '客户名称',
  302. dataIndex: 'customerName',
  303. width: 120,
  304. className: 'replacecolor'
  305. },
  306. {
  307. title: '汇率',
  308. dataIndex: 'exchangeRate',
  309. width: 90,
  310. className: 'replacecolor'
  311. },
  312. {
  313. title: '整单合计',
  314. dataIndex: 'wholeSingleCombined',
  315. width: 120,
  316. className: 'replacecolor'
  317. },
  318. {
  319. title: '销售部门',
  320. dataIndex: 'salesDepartment',
  321. width: 120,
  322. className: 'replacecolor'
  323. },
  324. {
  325. title: '业务员',
  326. dataIndex: 'salesman',
  327. width: 120,
  328. className: 'replacecolor'
  329. },
  330. {
  331. title: '币种',
  332. dataIndex: 'currency',
  333. width: 120,
  334. className: 'replacecolor'
  335. },
  336. {
  337. title: '品牌方',
  338. dataIndex: 'brand',
  339. width: 120,
  340. className: 'replacecolor'
  341. },
  342. {
  343. title: '第三方',
  344. dataIndex: 'thirdParty',
  345. width: 120,
  346. className: 'replacecolor'
  347. },
  348. {
  349. title: '定金比例(%)',
  350. dataIndex: 'depositRate',
  351. width: 120,
  352. className: 'replacecolor'
  353. },
  354. {
  355. title: '定金',
  356. dataIndex: 'deposit',
  357. width: 120,
  358. className: 'replacecolor'
  359. },
  360. {
  361. title: '协同路线',
  362. dataIndex: 'collaborativeRoute',
  363. width: 120,
  364. className: 'replacecolor'
  365. },
  366. {
  367. title: '付款条件',
  368. dataIndex: 'paymentClause',
  369. width: 120,
  370. customRender: t => ellipsis(t),
  371. className: 'replacecolor'
  372. },
  373. {
  374. title: '最终客户',
  375. dataIndex: 'finalCustomer',
  376. width: 120,
  377. className: 'replacecolor'
  378. },
  379. {
  380. title: '订单备注',
  381. dataIndex: 'orderNote',
  382. width: 160,
  383. customRender: t => ellipsis(t),
  384. className: 'replacecolor'
  385. },
  386. {
  387. title: '价格备注',
  388. dataIndex: 'priceNote',
  389. width: 160,
  390. customRender: t => ellipsis(t),
  391. className: 'replacecolor'
  392. },
  393. {
  394. title: '订单变更说明',
  395. dataIndex: 'orderChangeDesc',
  396. width: 160,
  397. customRender: t => ellipsis(t),
  398. className: 'replacecolor'
  399. },
  400. {
  401. title: '预发货日期',
  402. dataIndex: 'scheduledShipDate',
  403. width: 140,
  404. className: 'replacecolor'
  405. },
  406. {
  407. title: '预完工日期',
  408. dataIndex: 'scheduledDoneDate',
  409. width: 140,
  410. className: 'replacecolor'
  411. },
  412. {
  413. title: '推送状态',
  414. dataIndex: 'pushState',
  415. scopedSlots: { customRender: 'pushStateSlot' },
  416. fixed: 'right',
  417. width: 90,
  418. className: 'replacecolor'
  419. },
  420. {
  421. title: '单据状态',
  422. dataIndex: 'documentState',
  423. scopedSlots: { customRender: 'documentStateSlot' },
  424. fixed: 'right',
  425. width: 90,
  426. className: 'replacecolor'
  427. },
  428. {
  429. title: '操作',
  430. dataIndex: 'operation',
  431. scopedSlots: { customRender: 'operationSlot' },
  432. fixed: 'right',
  433. width: 220,
  434. className: 'replacecolor'
  435. }
  436. ],
  437. shipmentListData: [{}, {}, {}, {}],
  438. // 查询条件
  439. queryParam: {
  440. pageNo: '', // 页码
  441. documentNum: '', // 单据号
  442. startTime: '',
  443. endTime: '',
  444. deliveryDate: '',
  445. salesman: '',
  446. styleNum: '',
  447. refer: ''
  448. }
  449. }
  450. },
  451. created() {
  452. // this.getShipmentList() // 发运明细列表
  453. },
  454. methods: {
  455. // 开始时间
  456. startTimeChange() {},
  457. // 结束时间
  458. endTimeChange() {},
  459. // 发货日期
  460. shipDateChange() {},
  461. // --------------------------------------
  462. // 查询按钮
  463. searchQuery() {
  464. // this.getAnnList() // 渲染公告
  465. },
  466. // 重置
  467. searchReset() {
  468. console.log('>>>>重置')
  469. this.queryParam = {}
  470. // this.getAnnList()
  471. },
  472. // --------------------------------------
  473. // 新增 按钮
  474. addShipDet() {
  475. console.log('新增发运明细')
  476. this.$refs.addShipDetDrawer.visible = true
  477. },
  478. // --------------------------------------
  479. // 操作 申报要素
  480. declareElements() {},
  481. // 操作 详情
  482. details(record) {
  483. console.log('查看发运明细')
  484. this.$refs.detailsShipDetDrawer.visible = true
  485. },
  486. // 操作 提交
  487. submit() {},
  488. // 操作 编辑
  489. edit(record) {
  490. console.log('编辑发运明细')
  491. this.$refs.editShipDetDrawer.visible = true
  492. },
  493. // 操作 推送
  494. push(record) {},
  495. // 操作 删除
  496. handleDelete(id) {
  497. console.log('id:', id)
  498. },
  499. // 分页、排序、筛选变化时触发
  500. // handleTableChange(pagination, filters, sorter) {
  501. // // console.log('当前页信息>>>>',pagination)
  502. // this.queryParam.pageNo = pagination.current
  503. // // this.getAnnList()
  504. // }
  505. // father方法
  506. aa() {},
  507. bb() {},
  508. cc() {}
  509. },
  510. computed: {},
  511. mounted() {}
  512. }
  513. </script>
  514. <style lang="less" scoped>
  515. @import '~@assets/less/common.less';
  516. @import '~@assets/less/overwriter.less';
  517. /deep/ .ant-table-thead > tr > th {
  518. text-align: center;
  519. // font-weight: 700;
  520. }
  521. /deep/ .ant-table-tbody {
  522. text-align: center;
  523. }
  524. // /deep/ th.replacecolor {
  525. // background-color: #ccc;
  526. // }
  527. </style>