packingListModal.vue 8.1 KB

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