bookTotal-details-table.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <!-- 托书汇总明细报表 -->
  3. <div id="bookTotal-details-table">
  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-date-picker
  12. placeholder="请选择预发货日期"
  13. :format="dateFormat"
  14. style="width: 100%"
  15. v-model="queryParam.scheduledShipDate"
  16. />
  17. </a-form-item>
  18. </a-col>
  19. <a-col :md="6" :sm="8">
  20. <a-form-item label="实际船期">
  21. <a-date-picker
  22. placeholder="请选择实际船期"
  23. :format="dateFormat"
  24. style="width: 100%"
  25. v-model="queryParam.actualShipDate"
  26. />
  27. </a-form-item>
  28. </a-col>
  29. <a-col :md="6" :sm="8">
  30. <a-form-item label="业务部门">
  31. <a-select v-model="queryParam.operatingDepartment">
  32. <a-select-option value="">请选择</a-select-option>
  33. <a-select-option :value="0">业务部门1</a-select-option>
  34. <a-select-option :value="1">业务部门2</a-select-option>
  35. </a-select>
  36. </a-form-item>
  37. </a-col>
  38. <template v-if="toggleSearchStatus">
  39. <a-col :md="6" :sm="8">
  40. <a-form-item label="款号">
  41. <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
  42. </a-form-item>
  43. </a-col>
  44. </template>
  45. <a-col :md="6" :sm="8">
  46. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  47. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  48. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  49. <a @click="handleToggleSearch" style="margin-left: 8px">
  50. {{ toggleSearchStatus ? '收起' : '展开' }}
  51. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  52. </a>
  53. </span>
  54. </a-col>
  55. </a-row>
  56. </a-form>
  57. </div>
  58. </a-card>
  59. <!-- 子表 -->
  60. <a-card :bordered="false" style=" marginTop:10px;">
  61. <a-table
  62. bordered
  63. :row-key="record => record.id"
  64. :columns="bookTotalDetailsColumns"
  65. :data-source="bookTotalDetailsData"
  66. :loading="loading"
  67. :pagination="ipagination"
  68. :scroll="{ x: 1500 }"
  69. @change="handleTableChange"
  70. >
  71. <!-- 推送状态 -->
  72. <!-- slot-scope="text, record" -->
  73. <span slot="pushStateSlot">
  74. <!-- v-if="record.isRelease == '0'" -->
  75. <a-tag color="#f50">失败</a-tag>
  76. <!-- <a-tag color="#87d068" v-else>已发布</a-tag> -->
  77. </span>
  78. <!-- 单据状态 -->
  79. <span slot="documentStateSlot">
  80. <a-tag color="#2db7f5">已保存</a-tag>
  81. </span>
  82. <!-- 操作 -->
  83. <span slot="operationSlot" slot-scope="text, record">
  84. <a href="javascript:void(0);" @click="declareElements(record)" style="color:green">申报要素</a>
  85. <a-divider type="vertical" />
  86. <a-dropdown>
  87. <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
  88. <a-menu slot="overlay">
  89. <a-menu-item>
  90. <a @click="details(record)">详情</a>
  91. </a-menu-item>
  92. <a-menu-item>
  93. <a @click="submit(record)">提交</a>
  94. </a-menu-item>
  95. <a-menu-item>
  96. <a @click="edit(record)">编辑</a>
  97. </a-menu-item>
  98. <a-menu-item>
  99. <a @click="push(record)">推送</a>
  100. </a-menu-item>
  101. <a-menu-item>
  102. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  103. <a href="javascript:void(0);" style="color:red;">删除</a>
  104. </a-popconfirm>
  105. </a-menu-item>
  106. </a-menu>
  107. </a-dropdown>
  108. </span>
  109. </a-table>
  110. </a-card>
  111. </div>
  112. </template>
  113. <script>
  114. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  115. import JEllipsis from '@/components/jeecg/JEllipsis'
  116. import moment from 'moment'
  117. export default {
  118. name: 'BookTotalDetailsTable', // 托书汇总明细报表
  119. mixins: [JeecgListMixin],
  120. components: { JEllipsis, moment },
  121. data() {
  122. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  123. return {
  124. loading: false, // 表格加载
  125. id: '',
  126. // 表头
  127. bookTotalDetailsColumns: [
  128. // {
  129. // title: '创建时间',
  130. // dataIndex: 'createTime',
  131. // align: 'center',
  132. // sorter: true,
  133. // customRender: text => {
  134. // return moment(text).format('YYYY-MM-DD')
  135. // }
  136. // },
  137. {
  138. title: '实际船期',
  139. dataIndex: 'actualShipDate',
  140. fixed: 'left',
  141. width: 120,
  142. className: 'replacecolor'
  143. },
  144. {
  145. title: '进仓日/装柜日',
  146. dataIndex: 'inLoadingDate',
  147. fixed: 'left',
  148. width: 130,
  149. className: 'replacecolor'
  150. },
  151. {
  152. title: '客户',
  153. dataIndex: 'customer',
  154. width: 100,
  155. fixed: 'left',
  156. className: 'replacecolor'
  157. },
  158. {
  159. title: '发票号',
  160. dataIndex: 'invoiceNum',
  161. width: 160,
  162. fixed: 'left',
  163. className: 'replacecolor'
  164. },
  165. {
  166. title: '款号',
  167. dataIndex: 'styleNum',
  168. width: 120,
  169. className: 'replacecolor'
  170. },
  171. {
  172. title: 'PO号',
  173. dataIndex: 'poNum',
  174. width: 120,
  175. className: 'replacecolor'
  176. },
  177. {
  178. title: '数量(PCS)',
  179. dataIndex: 'quantity',
  180. width: 120,
  181. className: 'replacecolor'
  182. },
  183. {
  184. title: '单价',
  185. dataIndex: 'price',
  186. width: 90,
  187. className: 'replacecolor'
  188. },
  189. {
  190. title: '合计金额',
  191. dataIndex: 'accountSet',
  192. width: 120,
  193. className: 'replacecolor'
  194. },
  195. {
  196. title: '总金额(USD)',
  197. dataIndex: 'totalMoneyUSD',
  198. width: 120,
  199. className: 'replacecolor'
  200. },
  201. {
  202. title: '工厂',
  203. dataIndex: 'factory',
  204. width: 120,
  205. className: 'replacecolor'
  206. },
  207. {
  208. title: '启运港',
  209. dataIndex: 'startPort',
  210. width: 120,
  211. className: 'replacecolor'
  212. },
  213. {
  214. title: 'FCL/LCL(集装箱号)',
  215. dataIndex: 'containerNo',
  216. width: 120,
  217. className: 'replacecolor'
  218. },
  219. {
  220. title: '业务员',
  221. dataIndex: 'salesman',
  222. width: 90,
  223. className: 'replacecolor'
  224. },
  225. {
  226. title: '出运数量(出运明细数量)',
  227. dataIndex: 'ShipQuantity',
  228. width: 120,
  229. className: 'replacecolor'
  230. },
  231. {
  232. title: '体积',
  233. dataIndex: 'volume',
  234. width: 120,
  235. className: 'replacecolor'
  236. },
  237. {
  238. title: '中文品名',
  239. dataIndex: 'chineseName',
  240. width: 120,
  241. customRender: t => ellipsis(t),
  242. className: 'replacecolor'
  243. },
  244. {
  245. title: '业务部门',
  246. dataIndex: 'operatingDepartment',
  247. width: 90,
  248. className: 'replacecolor'
  249. },
  250. {
  251. title: '计划单号',
  252. dataIndex: 'planNum',
  253. width: 140,
  254. className: 'replacecolor'
  255. },
  256. {
  257. title: '制单人',
  258. dataIndex: 'preparedBy',
  259. width: 90,
  260. fixed: 'right',
  261. className: 'replacecolor'
  262. }
  263. ],
  264. bookTotalDetailsData: [
  265. {
  266. actualShipDate: '2022-04-27',
  267. inLoadingDate: '2022-04-27',
  268. customer: 'PRIMARK',
  269. invoiceNum: '22TW-PRU-35U',
  270. styleNum: '41081',
  271. poNum: 'A10347945',
  272. quantity: '690',
  273. price: '$1.95',
  274. accountSet: '',
  275. totalMoneyUSD: '$1,345.50',
  276. factory: 'GY SEN',
  277. startPort: 'MYANMAR',
  278. containerNo: 'LCL',
  279. salesman: 'BERYL',
  280. ShipQuantity: '',
  281. volume: '0.804',
  282. chineseName: '合纤制针织女童短裤合纤制针织女童短裤',
  283. operatingDepartment: '四部',
  284. planNum: 'SYJ033/SYJ035',
  285. preparedBy: 'COCO'
  286. },
  287. {}
  288. ],
  289. // 查询条件
  290. queryParam: {
  291. scheduledShipDate: '', // 预发货日期
  292. actualShipDate: '', // 实际船期
  293. operatingDepartment: '', // 业务部门
  294. styleNum: ''
  295. },
  296. dateFormat: 'YYYY-MM-DD'
  297. }
  298. },
  299. created() {
  300. // this.getShipmentList() // 托书汇总明细报表
  301. },
  302. methods: {
  303. // 查询按钮
  304. searchQuery() {
  305. // this.getAnnList() //托书汇总明细报表
  306. },
  307. // 重置
  308. searchReset() {
  309. console.log('>>>>重置')
  310. this.queryParam = {}
  311. // this.getAnnList()
  312. },
  313. getBookTotalDetailsTable() {}
  314. // 分页、排序、筛选变化时触发
  315. // handleTableChange(pagination, filters, sorter) {
  316. // // console.log('当前页信息>>>>',pagination)
  317. // this.queryParam.pageNo = pagination.current
  318. // // this.getAnnList()
  319. // }
  320. },
  321. computed: {},
  322. mounted() {}
  323. }
  324. </script>
  325. <style lang="less" scoped>
  326. @import '~@assets/less/common.less';
  327. @import '~@assets/less/overwriter.less';
  328. /deep/ .ant-table-thead > tr > th {
  329. text-align: center;
  330. // font-weight: 700;
  331. }
  332. /deep/ .ant-table-tbody {
  333. text-align: center;
  334. }
  335. // /deep/ th.replacecolor {
  336. // background-color: #ccc;
  337. // }
  338. </style>