referOrderDataModal.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. <template>
  2. <a-modal
  3. title="参照订单数据"
  4. v-model="referOrderDataModVis"
  5. :confirmLoading="confirmLoading"
  6. @ok="onSubmit"
  7. @cancel="handleCancel"
  8. width="90%"
  9. >
  10. <!-- tabel 加载 -->
  11. <a-spin :spinning="confirmLoading">
  12. <!-- 查询 -->
  13. <div class="table-page-search-wrapper">
  14. <a-form layout="inline" @keyup.enter.native="searchQuery">
  15. <a-row :gutter="24">
  16. <a-col :md="5" :sm="8">
  17. <a-form-item label="账套">
  18. <j-search-select-tag
  19. placeholder="请选择账套"
  20. v-model="queryParam.account"
  21. dict="view_account,account,account">
  22. </j-search-select-tag>
  23. </a-form-item>
  24. </a-col>
  25. <a-col :md="5" :sm="8">
  26. <a-form-item label="款号">
  27. <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></a-input>
  28. </a-form-item>
  29. </a-col>
  30. <a-col :md="5" :sm="8">
  31. <a-form-model-item label="类型">
  32. <a-select v-model="queryParam.flourOrGarment">
  33. <a-select-option value="">请选择</a-select-option>
  34. <a-select-option value="1">成衣</a-select-option>
  35. <a-select-option value="0">面辅料</a-select-option>
  36. </a-select>
  37. </a-form-model-item>
  38. </a-col>
  39. <a-col :md="5" :sm="8">
  40. <a-form-item label="预发货日期">
  41. <a-range-picker
  42. style="width: 100%"
  43. :mode="rangeMode"
  44. :placeholder="['开始日期', '结束日期']"
  45. :value="range"
  46. format = "YYYY-MM-DD"
  47. @change="rangeSelectChange"
  48. />
  49. </a-form-item>
  50. </a-col>
  51. <template v-if="toggleSearchStatus">
  52. <a-col :md="5" :sm="8">
  53. <a-form-item label="业务员">
  54. <a-input placeholder="请输入业务员" v-model="queryParam.salesman"></a-input>
  55. </a-form-item>
  56. </a-col>
  57. <!-- <a-col :md="5" :sm="8">
  58. <a-form-item label="客户">
  59. <j-search-select-tag
  60. placeholder="请选择客户"
  61. v-model="queryParam.customerName"
  62. dict="view_customer,customerfullname,customerfullname">
  63. </j-search-select-tag>
  64. </a-form-item>
  65. </a-col> -->
  66. <a-col :md="5" :sm="8">
  67. <a-form-item label="小po">
  68. <a-input placeholder="请输入小po" v-model="queryParam.smallPo"></a-input>
  69. </a-form-item>
  70. </a-col>
  71. <a-col :md="5" :sm="8">
  72. <a-form-model-item label="是否被参照">
  73. <a-select v-model="queryParam.refer">
  74. <a-select-option value="1">是</a-select-option>
  75. <a-select-option value="0">否</a-select-option>
  76. </a-select>
  77. </a-form-model-item>
  78. </a-col>
  79. <a-col :md="5" :sm="8">
  80. <a-form-item label="订单日期">
  81. <a-range-picker
  82. style="width: 100%"
  83. :mode="dataRangeMode"
  84. :placeholder="['开始日期', '结束日期']"
  85. :value="dateRange"
  86. format = "YYYY-MM-DD"
  87. @change="dateRangeSelectChange"
  88. />
  89. </a-form-item>
  90. </a-col>
  91. </template>
  92. <a-col :md="4" :sm="8">
  93. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  94. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  95. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  96. <a @click="handleToggleSearch" style="margin-left: 8px">
  97. {{ toggleSearchStatus ? '收起' : '展开' }}
  98. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  99. </a>
  100. </span>
  101. </a-col>
  102. </a-row>
  103. </a-form>
  104. </div>
  105. <!-- 勾选表 :row-key="record => record.id" { pageSize: 50 } , y: 800 -->
  106. <a-table
  107. bordered
  108. size="small"
  109. rowKey="id"
  110. v-if="orderListData"
  111. :columns="referOerderColumns"
  112. :data-source="orderListData"
  113. :loading="loading"
  114. :pagination="false"
  115. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  116. @change="handleTableChange"
  117. :scroll="{ x: 1500, y:450 }"
  118. >
  119. </a-table>
  120. <h3>共选择 {{selectedNumber}} 条</h3>
  121. </a-spin>
  122. </a-modal>
  123. </template>
  124. <script>
  125. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  126. import JEllipsis from '@/components/jeecg/JEllipsis'
  127. import moment from 'moment'
  128. import { randomUUID } from '@/utils/util'
  129. import { queryOrderData, confimOrderData,addShipmentList } from '@api/document/shipmentList'
  130. export default {
  131. name: 'ReferOrderDataModal', // 参照订单数据弹框
  132. mixins: [JeecgListMixin],
  133. components: { JEllipsis, moment },
  134. data() {
  135. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  136. return {
  137. selectedRowKeys: [],
  138. selectedRows: [], // 勾选项
  139. selectedNumber:0,//勾选条数
  140. loading: false, // 表格加载
  141. fatherData:[],
  142. // 表头
  143. referOerderColumns: [
  144. {
  145. title: '订单号',
  146. dataIndex: 'orderNumber',
  147. width: 180,
  148. // fixed: 'left',
  149. ellipsis: true,
  150. className: 'replacecolor'
  151. },
  152. {
  153. title: '款号',
  154. dataIndex: 'itemNumber',
  155. width: 150,
  156. // fixed: 'left',
  157. ellipsis: true,
  158. className: 'replacecolor'
  159. },
  160. {
  161. title: '预发货日期',
  162. dataIndex: 'preDeliveryDate',
  163. width: 120,
  164. ellipsis: true,
  165. className: 'replacecolor'
  166. },
  167. {
  168. title: '小po',
  169. dataIndex: 'smallPo',
  170. width: 100,
  171. ellipsis: true,
  172. className: 'replacecolor'
  173. },
  174. // 账套替换
  175. // {
  176. // title: '账套',
  177. // dataIndex: 'account',
  178. // width: 80,
  179. // className: 'replacecolor'
  180. // },
  181. // {
  182. // title: '预完工日期',
  183. // dataIndex: 'preCompletionDate',
  184. // width: 120,
  185. // className: 'replacecolor'
  186. // },
  187. {
  188. title: 'packId',
  189. dataIndex: 'packId',
  190. width: 120,
  191. ellipsis: true,
  192. className: 'replacecolor'
  193. },
  194. {
  195. title: '分销点',
  196. dataIndex: 'distributionPoint',
  197. width: 120,
  198. ellipsis: true,
  199. className: 'replacecolor'
  200. },
  201. {
  202. title: '存货编码',
  203. dataIndex: 'inventoryCode',
  204. width: 120,
  205. ellipsis: true,
  206. className: 'replacecolor'
  207. },
  208. {
  209. title: '存货名称',
  210. dataIndex: 'inventoryName',
  211. ellipsis: true,
  212. width: 250,
  213. className: 'replacecolor'
  214. },
  215. {
  216. title: '颜色',
  217. dataIndex: 'colour',
  218. width: 160,
  219. ellipsis: true,
  220. className: 'replacecolor'
  221. },
  222. // {
  223. // title: '尺码',
  224. // dataIndex: 'size',
  225. // width: 100,
  226. // className: 'replacecolor'
  227. // },
  228. {
  229. title: '配码规格',
  230. dataIndex: 'codingRules',
  231. width: 180,
  232. ellipsis: true,
  233. className: 'replacecolor'
  234. },
  235. {
  236. title: '箱数',
  237. dataIndex: 'boxNumber',
  238. width: 100,
  239. ellipsis: true,
  240. className: 'replacecolor'
  241. },
  242. {
  243. title: '数量',
  244. dataIndex: 'quantity',
  245. width: 100,
  246. ellipsis: true,
  247. className: 'replacecolor'
  248. },
  249. {
  250. title: '订单剩余数量',
  251. dataIndex: 'surplusNum',
  252. width: 120,
  253. ellipsis: true,
  254. className: 'replacecolor'
  255. },
  256. // {
  257. // title: '含税单价',
  258. // dataIndex: 'unitPriceIncludingTax',
  259. // width: 100,
  260. // className: 'replacecolor'
  261. // },
  262. {
  263. title: '成衣工厂',
  264. dataIndex: 'garmentFactory',
  265. width: 100,
  266. ellipsis: true,
  267. className: 'replacecolor'
  268. },
  269. // {
  270. // title: '成衣件数',
  271. // dataIndex: 'garmentNmb',
  272. // width: 100,
  273. // className: 'replacecolor'
  274. // },
  275. // {
  276. // title: '业务类型',
  277. // dataIndex: 'businessTypeText',
  278. // width: 100,
  279. // className: 'replacecolor'
  280. // },
  281. // {
  282. // title: '客户订单',
  283. // dataIndex: 'customerOrderNumber',
  284. // width: 100,
  285. // className: 'replacecolor'
  286. // },
  287. // {
  288. // title: '销售类型',
  289. // dataIndex: 'salesTypeText',
  290. // width: 100,
  291. // className: 'replacecolor'
  292. // },
  293. {
  294. title: '客户简称',
  295. dataIndex: 'customerAbbreviation',
  296. width: 220,
  297. align: 'left',
  298. ellipsis: true,
  299. className: 'replacecolor'
  300. },
  301. // {
  302. // title: '供应商编码',
  303. // dataIndex: 'supplierCode',
  304. // width: 100,
  305. // className: 'replacecolor'
  306. // },
  307. {
  308. title: '供应商',
  309. dataIndex: 'supplier',
  310. width: 120,
  311. ellipsis: true,
  312. className: 'replacecolor'
  313. },
  314. // {
  315. // title: '汇率',
  316. // dataIndex: 'exchangeRate',
  317. // width: 100,
  318. // className: 'replacecolor'
  319. // },
  320. // {
  321. // title: '整单合计',
  322. // dataIndex: 'wholeOrderTotal',
  323. // width: 100,
  324. // className: 'replacecolor'
  325. // },
  326. // {
  327. // title: '销售部门',
  328. // dataIndex: 'salesDepartment',
  329. // width: 120,
  330. // className: 'replacecolor'
  331. // },
  332. // {
  333. // title: '业务员',
  334. // dataIndex: 'salesman',
  335. // width: 120,
  336. // className: 'replacecolor'
  337. // },
  338. // {
  339. // title: '币种',
  340. // dataIndex: 'currencyText',
  341. // width: 100,
  342. // className: 'replacecolor'
  343. // },
  344. // {
  345. // title: '品牌方',
  346. // dataIndex: 'brandSide',
  347. // width: 120,
  348. // className: 'replacecolor'
  349. // },
  350. // {
  351. // title: '第三方',
  352. // dataIndex: 'thirdParty',
  353. // width: 220,
  354. // align: 'left',
  355. // className: 'replacecolor'
  356. // },
  357. // {
  358. // title: '定金比例(%)',
  359. // dataIndex: 'depositRatio',
  360. // width: 100,
  361. // className: 'replacecolor'
  362. // },
  363. // {
  364. // title: '定金',
  365. // dataIndex: 'deposit',
  366. // width: 100,
  367. // className: 'replacecolor'
  368. // },
  369. // {
  370. // title: '协同路线',
  371. // dataIndex: 'collaborativeRoute',
  372. // width: 100,
  373. // className: 'replacecolor'
  374. // },
  375. // {
  376. // title: '付款条件',
  377. // dataIndex: 'termOfPayment',
  378. // width: 120,
  379. // customRender: t => ellipsis(t),
  380. // className: 'replacecolor'
  381. // },
  382. // {
  383. // title: '最终客户',
  384. // dataIndex: 'endCustomer',
  385. // width: 120,
  386. // className: 'replacecolor'
  387. // },
  388. // {
  389. // title: '订单备注',
  390. // dataIndex: 'orderRemarks',
  391. // width: 280,
  392. // customRender: t => ellipsis(t),
  393. // className: 'replacecolor'
  394. // },
  395. // {
  396. // title: '价格备注',
  397. // dataIndex: 'priceRemarks',
  398. // width: 280,
  399. // customRender: t => ellipsis(t),
  400. // className: 'replacecolor'
  401. // },
  402. // {
  403. // title: '订单变更说明',
  404. // dataIndex: 'orderChangeDescription',
  405. // width: 220,
  406. // customRender: t => ellipsis(t),
  407. // className: 'replacecolor'
  408. // },
  409. // {
  410. // title: '订单日期',
  411. // dataIndex: 'orderDate',
  412. // width: 120,
  413. // className: 'replacecolor'
  414. // },
  415. // {
  416. // title: '订单主表ID',
  417. // dataIndex: 'syOrderDataId',
  418. // width: 120,
  419. // // fixed: 'right',
  420. // className: 'replacecolor1'
  421. // },
  422. // {
  423. // title: '订单子表ID',
  424. // dataIndex: 'syOrderDataItemId',
  425. // width: 450,
  426. // // fixed: 'right',
  427. // className: 'replacecolor'
  428. // }
  429. ],
  430. orderListData: [], //订单数据
  431. confirmLoading: false,
  432. referOrderDataModVis: false,
  433. error:'', // 选中数据不符合的字段名
  434. errorIdentical:[],//选中多行数据客户、分销点不同字段
  435. errorFather: '', //选中数据与已有数据不同集合
  436. // 查询条件
  437. queryParam: {
  438. refer:'0'
  439. // itemNumber: '', // 订单号
  440. // smallPo:'',//小po
  441. // account: '', //账套
  442. // pageSize:100,
  443. // preDeliveryDateS:'', //预发货开始日期
  444. // preDeliveryDateE:'', //预发货结束日期
  445. // flourOrGarment:'', //类型
  446. // startDeliveryDate :'',
  447. // endDeliveryDate : ''
  448. // pageNo: '', // 初始页
  449. // pageSize: '-1' // 每页显示条数
  450. },
  451. // 分页
  452. pagination: {},
  453. confimList: [], //勾选的订单数组
  454. propList: [], //需要给新增页的数据
  455. dateRange:[],
  456. range:[],//预发货日期数组
  457. dataRangeMode:['date','date'],
  458. rangeMode:['date','date'],
  459. }
  460. },
  461. // 接收父组件 方法
  462. // props: {},
  463. created() {
  464. // this.getOrderList()
  465. // this.defalutDate()
  466. },
  467. methods: {
  468. moment,
  469. // 参照订单数据 查询
  470. getOrderList() {
  471. this.confirmLoading = true;
  472. // if (this.queryParam.preDeliveryDate != ""){
  473. // this.queryParam.preDeliveryDate = this.queryParam.preDeliveryDate.format('YYYY-MM-DD');
  474. // }
  475. this.$nextTick(() => {
  476. queryOrderData(this.queryParam).then(res => {
  477. this.confirmLoading = false;
  478. if (res.success) {
  479. for (var i=0; i<res.result.records.length;i++){
  480. res.result.records[i].id = randomUUID();
  481. }
  482. this.orderListData = res.result.records
  483. this.orderListData.map(item =>{
  484. item.boxNumber = Number(item.boxNumber).toFixed(0)
  485. })
  486. this.pagination = {
  487. total: res.result.total,
  488. current: res.result.current,
  489. pageSize: res.result.size
  490. }
  491. }
  492. })
  493. })
  494. },
  495. // 弹框确定
  496. onSubmit() {
  497. this.dataSet( this.selectedRows)
  498. var vv = this.selectedRows[0]
  499. // if(this.fatherData.length !== 0){
  500. // this.fatherDataSet(this.fatherData,vv)
  501. // }
  502. if (this.selectedRowKeys.length == 0) {
  503. this.$message.error('请勾选订单数据')
  504. } else if(this.selectedRows !== 1 && this.error !==''){
  505. this.$message.error(this.error+'至少一项不相同!');
  506. this.error = ''
  507. }else{
  508. var garment = ''
  509. if(this.queryParam.flourOrGarment == 1){
  510. garment = '成衣'
  511. }else {
  512. garment = '面料'
  513. }
  514. this.loading = true
  515. addShipmentList({itemId:this.confimList,readyFabric:garment}).then(res => {
  516. if (res.success) {
  517. this.loading = false
  518. // this.referOrderDataModVis = false;
  519. this.close()
  520. this.selectedRowKeys = [];
  521. this.selectedRows = [];
  522. this.$message.success('添加成功')
  523. }else {
  524. this.$message.error('res.message')
  525. }
  526. })
  527. }
  528. },
  529. //参照数据选择多条时
  530. dataSet(){
  531. this.confimList = []
  532. var orderTest = [],
  533. poTest = [],
  534. preDeliveryTest = [],
  535. preCompletionTest = [],
  536. itemNumberTest = [],
  537. inventoryCodeTest = [],
  538. inventoryNameTest = [],
  539. colourTest = [],
  540. sizeTest = [],
  541. custorTest = [],
  542. distributionPointTest = []
  543. this.selectedRows.map(item=>{
  544. this.confimList.push(item.syOrderDataItemId);
  545. orderTest.push(item.orderNumber)
  546. poTest.push(item.smallPo)
  547. preDeliveryTest.push(item.preDeliveryDate)
  548. preCompletionTest.push(item.preCompletionDate)
  549. itemNumberTest.push(item.itemNumber)
  550. inventoryCodeTest.push(item.inventoryCode)
  551. inventoryNameTest.push(item.inventoryName)
  552. colourTest.push(item.colour)
  553. sizeTest.push(item.size)
  554. custorTest.push(item.customerName)
  555. distributionPointTest.push(item.distributionPoint)
  556. })
  557. if([...new Set(orderTest)].length == 1 && [...new Set(poTest)].length == 1 &&[...new Set(preDeliveryTest)].length == 1&&
  558. [...new Set(preCompletionTest)].length == 1 && [...new Set(itemNumberTest)].length == 1 &&[...new Set(inventoryCodeTest)].length !== 1&&
  559. [...new Set(inventoryNameTest)].length == 1 && [...new Set(colourTest)].length == 1 &&[...new Set(sizeTest)].length == 1){
  560. this.error = '订单号,小po,预发货日期,预完工日期,款号,存货编码,存货名称,颜色,尺码'
  561. }
  562. if([...new Set(custorTest)].length !== 1){this.errorIdentical.push('客户名称不相同')}
  563. if([...new Set(distributionPointTest)].length !== 1){this.errorIdentical.push('分销点')}
  564. },
  565. //已有参考列表
  566. // fatherDataSet(fathers,sons){
  567. // var father = fathers[0]
  568. // if(father.orderNumber === sons.orderNumber && father.smallPo === sons.smallPo && father.preDeliveryDate === sons.preDeliveryDate &&
  569. // father.preCompletionDate === sons.preCompletionDate && father.itemNumber === sons.itemNumber && father.inventoryCode === sons.inventoryCode &&
  570. // father.inventoryName === sons.inventoryName && father.colour === sons.colour && father.size === sons.size) {
  571. // this.errorFather = '订单号,小po,预发货日期,预完工日期,款号,存货编码,存货名称,颜色,尺码'
  572. // }
  573. // // if(father.orderNumber !== sons.orderNumber){this.errorFather.push('订单号')}
  574. // // if(father.smallPo !== sons.smallPo){this.errorFather.push('小po')}
  575. // // if(father.preDeliveryDate !== sons.preDeliveryDate){this.errorFather.push('预发货日期')}
  576. // // if(father.preCompletionDate !== sons.preCompletionDate){this.errorFather.push('预完工日期')}
  577. // // if(father.itemNumber !== sons.itemNumber){this.errorFather.push('款号')}
  578. // // if(father.inventoryCode !== sons.inventoryCode){this.errorFather.push('存货编码')}
  579. // // if(father.inventoryName !== sons.inventoryName){this.errorFather.push('存货名称')}
  580. // // if(father.colour !== sons.colour){this.errorFather.push('颜色')}
  581. // // if(father.size !== sons.size){this.errorFather.push('尺码')}
  582. // },
  583. handleTableChange(pagination, filters, sorter) {
  584. this.queryParam.pageNo = pagination.current;
  585. this.getOrderList();
  586. },
  587. searchQuery() {
  588. this.toggleSearchStatus = false
  589. if(this.queryParam.flourOrGarment === '' || !this.queryParam.hasOwnProperty('flourOrGarment')){
  590. this.$message.error('请选择查询类型!');
  591. }else if(this.queryParam.account === '' || !this.queryParam.hasOwnProperty('account')){
  592. this.$message.error('请选择账套号!');
  593. }else{
  594. if(this.range.length == 2){
  595. var separator = "-"; //日期分隔符
  596. var startDates = this.queryParam.preDeliveryDateS.split(separator);
  597. var endDates = this.queryParam.preDeliveryDateE.split(separator);
  598. var startDate = new Date(startDates[0], startDates[1]-1, startDates[2]);
  599. var endDate = new Date(endDates[0], endDates[1]-1, endDates[2]);
  600. var timeInterval= parseInt(Math.abs(endDate - startDate ) / 1000 / 60 / 60 /24) + 1;
  601. if(timeInterval > 31 ){
  602. this.$message.error('预发货时间区间超过31天,请重新选择!');
  603. this.range = []
  604. this.queryParam.preDeliveryDateS = ''
  605. this.queryParam.preDeliveryDateE = ''
  606. }else{
  607. this.queryParam.pageNo = '';
  608. this.getOrderList();
  609. }
  610. }else {
  611. this.queryParam.pageNo = ''
  612. this.getOrderList();
  613. }
  614. }
  615. },
  616. // 重置
  617. searchReset() {
  618. this.queryParam = {}
  619. // this.queryParam.customerName = '';
  620. this.dateRange = [];
  621. this.range = [];
  622. this.orderListData = []
  623. this.selectedRowKeys = [];
  624. this.selectedRows = [];
  625. // this.$emit('default-reset')
  626. },
  627. // 选中行
  628. onSelectChange(keys, rows) {
  629. this.selectedRowKeys = keys;
  630. this.selectedRows = rows;
  631. this.selectedNumber = rows.length
  632. },
  633. close() {
  634. this.referOrderDataModVis = false;
  635. this.queryParam = {
  636. refer:'0'
  637. }
  638. this.selectedNumber = 0
  639. this.$emit('close')
  640. this.searchReset();
  641. },
  642. handleCancel() {
  643. this.close();
  644. },
  645. // 时间发生变化的回调,发生在用户选择时间时
  646. dateRangeSelectChange(value) {
  647. this.dateRange = value;
  648. if (value.length == 0){
  649. this.queryParam.startDeliveryDate = "";
  650. this.queryParam.endDeliveryDate = "";
  651. }else{
  652. this.queryParam.startDeliveryDate = value[0].format('YYYY-MM-DD');
  653. this.queryParam.endDeliveryDate = value[1].format('YYYY-MM-DD');
  654. }
  655. },
  656. rangeSelectChange(value) {
  657. this.range = value
  658. if (value.length == 0){
  659. this.queryParam.preDeliveryDateS = "";
  660. this.queryParam.preDeliveryDateE = "";
  661. }else{
  662. this.queryParam.preDeliveryDateS = value[0].format('YYYY-MM-DD');
  663. this.queryParam.preDeliveryDateE = value[1].format('YYYY-MM-DD');
  664. }
  665. }
  666. },
  667. computed: {
  668. // 选中项
  669. rowSelection() {
  670. return {
  671. onChange: (selectedRowKeys, selectedRows) => {
  672. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  673. },
  674. getCheckboxProps: record => ({
  675. props: {
  676. disabled: record.title === 'Disabled User',
  677. // Column configuration not to be checked
  678. title: record.title
  679. }
  680. })
  681. }
  682. }
  683. }
  684. }
  685. </script>
  686. <style lang="less" scoped>
  687. @import '~@assets/less/common.less';
  688. /deep/ .ant-table-thead > tr > th {
  689. text-align: center;
  690. // font-weight: 700;
  691. }
  692. /deep/ .ant-table-tbody {
  693. text-align: center;
  694. }
  695. /deep/ .ant-table-fixed-left table, .ant-table-fixed-right table{
  696. width: min-content;
  697. }
  698. // /deep/ th.replacecolor1 {
  699. // display: none;
  700. // }
  701. </style>