packingListModal.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <template>
  2. <a-modal
  3. title="参照装箱单"
  4. v-model="packingListModVis"
  5. :confirmLoading="confirmLoading"
  6. @ok="onSubmit"
  7. @cancel="handleCancel"
  8. width="86%"
  9. style="top:330px;left:100px;"
  10. >
  11. <!-- tabel 加载 -->
  12. <a-spin :spinning="confirmLoading">
  13. <!-- 查询 -->
  14. <div class="table-page-search-wrapper">
  15. <a-form layout="inline" @keyup.enter.native="searchQuery">
  16. <a-row :gutter="24">
  17. <a-col :md="6" :sm="8">
  18. <a-form-item label="订单号">
  19. <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-item label="品名">
  24. <a-input placeholder="请输入品名" v-model="queryParam.name"></a-input>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :md="6" :sm="8">
  28. <a-form-item label="款号">
  29. <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :md="6" :sm="8">
  33. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  34. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  35. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  36. <a @click="handleToggleSearch" style="margin-left: 8px">
  37. {{ toggleSearchStatus ? '收起' : '展开' }}
  38. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  39. </a>
  40. </span>
  41. </a-col>
  42. </a-row>
  43. </a-form>
  44. </div>
  45. <!-- table , y: 300 -->
  46. <div class="anotherTable">
  47. <a-table
  48. :columns="packingListColumns"
  49. :data-source="packingListData"
  50. :loading="loading"
  51. :pagination="ipagination"
  52. :row-key="record => record.id"
  53. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  54. @change="handleTableChange"
  55. bordered
  56. :scroll="{ x: 1500 }"
  57. size="small"
  58. >
  59. </a-table>
  60. </div>
  61. </a-spin>
  62. </a-modal>
  63. </template>
  64. <script>
  65. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  66. import JEllipsis from '@/components/jeecg/JEllipsis'
  67. import moment from 'moment'
  68. export default {
  69. name: 'PackingListModal', // 参照装箱单 弹框
  70. mixins: [JeecgListMixin],
  71. components: { JEllipsis, moment },
  72. data() {
  73. return {
  74. // 查询条件
  75. queryParam: {
  76. orderNum: '',
  77. name: '', // 品名
  78. styleNum: ''
  79. },
  80. selectedRowKeys: [], // 勾选航
  81. loading: false, // 表格加载
  82. // 表头
  83. packingListColumns: [
  84. {
  85. title: '款号',
  86. dataIndex: 'styleNum',
  87. width: 120,
  88. fixed: 'left',
  89. className: 'replacecolor'
  90. },
  91. {
  92. title: '客户简称',
  93. dataIndex: 'customerShortName',
  94. width: 120,
  95. fixed: 'left',
  96. className: 'replacecolor'
  97. },
  98. // {
  99. // title: '创建时间',
  100. // dataIndex: 'createTime',
  101. // align: 'center',
  102. // sorter: true,
  103. // customRender: text => {
  104. // return moment(text).format('YYYY-MM-DD')
  105. // }
  106. // },
  107. {
  108. title: '预发货日期',
  109. dataIndex: 'scheduledShipDate',
  110. width: 120,
  111. className: 'replacecolor'
  112. },
  113. {
  114. title: '小PO',
  115. dataIndex: 'smallPo',
  116. width: 120,
  117. className: 'replacecolor'
  118. },
  119. {
  120. title: '分销点',
  121. dataIndex: 'distributionPoint',
  122. width: 120,
  123. className: 'replacecolor'
  124. },
  125. {
  126. title: '备注',
  127. dataIndex: 'note',
  128. width: 120,
  129. className: 'replacecolor'
  130. },
  131. {
  132. title: '发货日期',
  133. dataIndex: 'shipDate',
  134. width: 120,
  135. className: 'replacecolor'
  136. },
  137. {
  138. title: '业务员',
  139. dataIndex: 'salesman',
  140. width: 120,
  141. className: 'replacecolor'
  142. },
  143. {
  144. title: '客户',
  145. dataIndex: 'customer',
  146. width: 120,
  147. className: 'replacecolor'
  148. },
  149. {
  150. title: '存货名称',
  151. dataIndex: 'inventoryName',
  152. width: 120,
  153. className: 'replacecolor'
  154. },
  155. {
  156. title: '颜色',
  157. dataIndex: 'color',
  158. width: 120,
  159. className: 'replacecolor'
  160. },
  161. {
  162. title: '采购/委外订单号',
  163. dataIndex: 'purchaseAboardOrderNum',
  164. width: 140,
  165. className: 'replacecolor'
  166. },
  167. {
  168. title: '订单类型',
  169. dataIndex: 'orderType',
  170. width: 120,
  171. className: 'replacecolor'
  172. },
  173. {
  174. title: '工厂单价',
  175. dataIndex: 'factoryPeice',
  176. width: 120,
  177. className: 'replacecolor'
  178. },
  179. {
  180. title: '数量(按合并规则累计)',
  181. dataIndex: 'quantity',
  182. width: 180,
  183. className: 'replacecolor'
  184. },
  185. {
  186. title: '箱数',
  187. dataIndex: 'boxesNum',
  188. width: 90,
  189. className: 'replacecolor'
  190. },
  191. {
  192. title: '总净重',
  193. dataIndex: 'totalSuttle',
  194. width: 120,
  195. className: 'replacecolor'
  196. },
  197. {
  198. title: '总毛重',
  199. dataIndex: 'totalRoughWeigh',
  200. width: 120,
  201. className: 'replacecolor'
  202. },
  203. {
  204. title: '总体积',
  205. dataIndex: 'totalVolume',
  206. width: 120,
  207. className: 'replacecolor'
  208. },
  209. {
  210. title: '总价',
  211. dataIndex: 'totalPrices',
  212. width: 120,
  213. className: 'replacecolor'
  214. },
  215. {
  216. title: '集装箱代号',
  217. dataIndex: 'containerCode',
  218. width: 120,
  219. className: 'replacecolor'
  220. },
  221. {
  222. title: '集装箱号',
  223. dataIndex: 'containerNo',
  224. width: 120,
  225. fixed: 'right',
  226. className: 'replacecolor'
  227. },
  228. {
  229. title: '预托书号',
  230. dataIndex: 'preBookNum',
  231. width: 120,
  232. fixed: 'right',
  233. className: 'replacecolor'
  234. }
  235. ],
  236. packingListData: [{}, {}, {}],
  237. // orderDataform: this.$form.createForm(this),
  238. confirmLoading: false,
  239. packingListModVis: false
  240. }
  241. },
  242. // 接收父组件 方法
  243. props: {
  244. father: {
  245. type: Function,
  246. default: null
  247. }
  248. },
  249. created() {},
  250. methods: {
  251. // 弹框查询按钮
  252. searchQuery() {},
  253. // 重置
  254. searchReset() {
  255. this.queryParam = {}
  256. // this.getShipmentList()
  257. },
  258. // 弹框确定
  259. onSubmit() {},
  260. close() {
  261. this.$emit('close')
  262. this.packingListModVis = false
  263. },
  264. handleCancel() {
  265. this.close()
  266. },
  267. handleTableChange() {},
  268. // 选中行
  269. onSelectChange(keys, rows) {
  270. this.selectedRowKeys = keys
  271. this.selectedRows = rows
  272. }
  273. },
  274. computed: {
  275. // 选中项
  276. rowSelection() {
  277. return {
  278. onChange: (selectedRowKeys, selectedRows) => {
  279. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  280. },
  281. getCheckboxProps: record => ({
  282. props: {
  283. disabled: record.title === 'Disabled User',
  284. // Column configuration not to be checked
  285. title: record.title
  286. }
  287. })
  288. }
  289. }
  290. }
  291. }
  292. </script>
  293. <style lang="less" scoped>
  294. @import '~@assets/less/common.less';
  295. @import '~@assets/less/overwriter.less';
  296. /deep/ .ant-table-thead > tr > th {
  297. text-align: center;
  298. // font-weight: 700;
  299. }
  300. /deep/ .ant-table-tbody {
  301. text-align: center;
  302. }
  303. // /deep/ th.replacecolor {
  304. // background-color: #ccc;
  305. // }
  306. </style>