referOrderDataModal.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. <template>
  2. <a-modal
  3. title="参照订单数据"
  4. v-model="referOrderDataModVis"
  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.orderNumber"></a-input>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-item label="账套">
  24. <a-select placeholder="请选择账套" v-model="queryParam.acSetNo">
  25. <a-select-option value="">请选择</a-select-option>
  26. <a-select-option :value="0">香港森语(101)</a-select-option>
  27. <a-select-option :value="1">宁波森语(102)</a-select-option>
  28. <a-select-option :value="2">宁波马菲羊(103)</a-select-option>
  29. </a-select>
  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. <!-- 勾选表 :row-key="record => record.id"-->
  46. <div>
  47. <a-table
  48. bordered
  49. rowKey="id"
  50. v-if="referOerderData"
  51. :columns="referOerderColumns"
  52. :data-source="referOerderData"
  53. :loading="loading"
  54. :pagination="ipagination"
  55. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  56. @change="handleTableChange"
  57. :scroll="{ x: 1500, y: 300 }"
  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. import { queryOrderData } from '@api/document/shipmentList'
  69. export default {
  70. name: 'ReferOrderDataModal', // 参照订单数据弹框
  71. mixins: [JeecgListMixin],
  72. components: { JEllipsis, moment },
  73. data() {
  74. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  75. return {
  76. selectedRowKeys: [], // 勾选航
  77. loading: false, // 表格加载
  78. // 表头
  79. referOerderColumns: [
  80. {
  81. title: '订单号',
  82. dataIndex: 'orderNumber',
  83. width: 120,
  84. fixed: 'left',
  85. className: 'replacecolor'
  86. },
  87. {
  88. title: '款号',
  89. dataIndex: 'styleNum',
  90. width: 120,
  91. fixed: 'left',
  92. className: 'replacecolor'
  93. },
  94. {
  95. title: '小po',
  96. dataIndex: 'smallPo',
  97. width: 120,
  98. className: 'replacecolor'
  99. },
  100. {
  101. title: '账套',
  102. dataIndex: 'acSetNo',
  103. width: 120,
  104. className: 'replacecolor'
  105. },
  106. // {
  107. // title: '创建时间',
  108. // dataIndex: 'createTime',
  109. // align: 'center',
  110. // sorter: true,
  111. // customRender: text => {
  112. // return moment(text).format('YYYY-MM-DD')
  113. // }
  114. // },
  115. {
  116. title: '订单日期',
  117. dataIndex: 'orderDate',
  118. width: 120,
  119. className: 'replacecolor'
  120. },
  121. {
  122. title: '存货名称',
  123. dataIndex: 'inventoryName',
  124. width: 120,
  125. className: 'replacecolor'
  126. },
  127. {
  128. title: '颜色',
  129. dataIndex: 'color',
  130. width: 120,
  131. customRender: t => ellipsis(t),
  132. className: 'replacecolor'
  133. },
  134. {
  135. title: '尺码',
  136. dataIndex: 'size',
  137. width: 120,
  138. className: 'replacecolor'
  139. },
  140. {
  141. title: '配码规格',
  142. dataIndex: 'specificationSize',
  143. width: 120,
  144. className: 'replacecolor'
  145. },
  146. {
  147. title: '数量',
  148. dataIndex: 'quantity',
  149. width: 120,
  150. className: 'replacecolor'
  151. },
  152. {
  153. title: '业务类型',
  154. dataIndex: 'businessType',
  155. width: 120,
  156. className: 'replacecolor'
  157. },
  158. {
  159. title: '客户订单',
  160. dataIndex: 'customerOrder',
  161. width: 120,
  162. className: 'replacecolor'
  163. },
  164. {
  165. title: '销售类型',
  166. dataIndex: 'saleType',
  167. width: 120,
  168. className: 'replacecolor'
  169. },
  170. {
  171. title: '客户简称',
  172. dataIndex: 'customerShortName',
  173. width: 120,
  174. className: 'replacecolor'
  175. },
  176. {
  177. title: '客户名称',
  178. dataIndex: 'customerName',
  179. width: 120,
  180. className: 'replacecolor'
  181. },
  182. {
  183. title: '供应商',
  184. dataIndex: 'supplier',
  185. width: 120,
  186. className: 'replacecolor'
  187. },
  188. {
  189. title: '汇率',
  190. dataIndex: 'exchangeRate',
  191. width: 120,
  192. className: 'replacecolor'
  193. },
  194. {
  195. title: '整单合计',
  196. dataIndex: 'wholeSingleCombined',
  197. width: 120,
  198. className: 'replacecolor'
  199. },
  200. {
  201. title: '销售部门',
  202. dataIndex: 'salesDepartment',
  203. width: 120,
  204. className: 'replacecolor'
  205. },
  206. {
  207. title: '业务员',
  208. dataIndex: 'salesman',
  209. width: 120,
  210. className: 'replacecolor'
  211. },
  212. {
  213. title: '币种',
  214. dataIndex: 'currency',
  215. width: 120,
  216. className: 'replacecolor'
  217. },
  218. {
  219. title: '品牌方',
  220. dataIndex: 'brand',
  221. width: 120,
  222. className: 'replacecolor'
  223. },
  224. {
  225. title: '第三方',
  226. dataIndex: 'thirdParty',
  227. width: 120,
  228. className: 'replacecolor'
  229. },
  230. {
  231. title: '定金比例(%)',
  232. dataIndex: 'depositRate',
  233. width: 120,
  234. className: 'replacecolor'
  235. },
  236. {
  237. title: '定金',
  238. dataIndex: 'deposit',
  239. width: 120,
  240. className: 'replacecolor'
  241. },
  242. {
  243. title: '协同路线',
  244. dataIndex: 'collaborativeRoute',
  245. width: 120,
  246. className: 'replacecolor'
  247. },
  248. {
  249. title: '付款条件',
  250. dataIndex: 'paymentClause',
  251. width: 120,
  252. customRender: t => ellipsis(t),
  253. className: 'replacecolor'
  254. },
  255. {
  256. title: '最终客户',
  257. dataIndex: 'finalCustomer',
  258. width: 120,
  259. className: 'replacecolor'
  260. },
  261. {
  262. title: '订单备注',
  263. dataIndex: 'OrderNote',
  264. width: 120,
  265. customRender: t => ellipsis(t),
  266. className: 'replacecolor'
  267. },
  268. {
  269. title: '价格备注',
  270. dataIndex: 'priceNote',
  271. width: 120,
  272. customRender: t => ellipsis(t),
  273. className: 'replacecolor'
  274. },
  275. {
  276. title: '订单变更说明',
  277. dataIndex: 'OrderChangeDesc',
  278. width: 120,
  279. customRender: t => ellipsis(t),
  280. className: 'replacecolor'
  281. }
  282. ],
  283. referOerderData: [],
  284. // orderDataform: this.$form.createForm(this),
  285. confirmLoading: false,
  286. referOrderDataModVis: false,
  287. // 查询条件
  288. queryParam: {
  289. orderNumber: '', // 订单号
  290. acSetNo: '',
  291. pageNo: '', // 初始页
  292. pageSize: '-1' // 每页显示条数
  293. // 账套
  294. },
  295. // 分页
  296. pagination: {
  297. total: 0,
  298. current: 0,
  299. pageSize: 0
  300. }
  301. }
  302. },
  303. // 接收父组件 方法
  304. props: {
  305. father: {
  306. type: Function,
  307. default: null
  308. }
  309. },
  310. created() {},
  311. methods: {
  312. getOrderList() {
  313. // this.$nextTick(() => {
  314. queryOrderData(this.queryParam).then(res => {
  315. console.log('参照订单数据res', res)
  316. if (res.success) {
  317. this.referOerderData = res.result.records
  318. console.log('参照订单数据', this.referOerderData)
  319. this.pagination = {
  320. // 分页信息赋值
  321. total: res.result.total,
  322. current: res.result.current,
  323. pageSize: res.result.size
  324. }
  325. }
  326. })
  327. // })
  328. },
  329. // 弹框查询按钮
  330. searchQuery() {
  331. this.getOrderList()
  332. },
  333. // 重置
  334. searchReset() {
  335. this.queryParam.orderNumber = ''
  336. this.queryParam.acSetNo = ''
  337. this.getOrderList()
  338. },
  339. // 弹框确定
  340. onSubmit() {
  341. console.log('参照订单数据弹框确定,重新渲染【新增发运明细】')
  342. this.referOrderDataModVis = false
  343. },
  344. close() {
  345. this.$emit('close')
  346. this.referOrderDataModVis = false
  347. },
  348. handleCancel() {
  349. this.close()
  350. },
  351. handleTableChange() {
  352. console.log('??这是啥')
  353. },
  354. // 选中行
  355. onSelectChange(keys, rows) {
  356. this.selectedRowKeys = keys
  357. this.selectedRows = rows
  358. console.log('选中行keys:', keys, '选中行rows:', rows)
  359. }
  360. },
  361. computed: {
  362. // 选中项
  363. rowSelection() {
  364. return {
  365. onChange: (selectedRowKeys, selectedRows) => {
  366. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  367. },
  368. getCheckboxProps: record => ({
  369. props: {
  370. disabled: record.title === 'Disabled User',
  371. // Column configuration not to be checked
  372. title: record.title
  373. }
  374. })
  375. }
  376. }
  377. }
  378. }
  379. </script>
  380. <style lang="less" scoped>
  381. @import '~@assets/less/common.less';
  382. /deep/ .ant-table-thead > tr > th {
  383. text-align: center;
  384. // font-weight: 700;
  385. }
  386. /deep/ .ant-table-tbody {
  387. text-align: center;
  388. }
  389. // th.replacecolor {
  390. // background-color: #ccc;
  391. // }
  392. </style>