shipmentList.vue 15 KB

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