referOrderDataModal.vue 9.7 KB

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