clothes-list.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. <template>
  2. <!-- 装箱单-成衣 -->
  3. <div id="clothesList">
  4. <!-- 查询 -->
  5. <a-card :bordered="false">
  6. <div class="table-page-search-wrapper">
  7. <a-form layout="inline" @keyup.enter.native="searchQuery">
  8. <a-row :gutter="24">
  9. <!-- <a-col :md="6" :sm="8">
  10. <a-form-item label="单据号">
  11. <a-input placeholder="请输入订单号" v-model="queryParam.documentNo"></a-input>
  12. </a-form-item>
  13. </a-col> -->
  14. <a-col :md="6" :sm="8">
  15. <a-form-item label="订单号">
  16. <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
  17. </a-form-item>
  18. </a-col>
  19. <a-col :md="6" :sm="8">
  20. <a-form-item label="款号">
  21. <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></a-input>
  22. </a-form-item>
  23. </a-col>
  24. <a-col :md="6" :sm="8">
  25. <a-form-item label="分销点">
  26. <a-input placeholder="请输入分销点" v-model="queryParam.distributionPoint"></a-input>
  27. </a-form-item>
  28. </a-col>
  29. <template v-if="toggleSearchStatus">
  30. <!-- <a-col :md="6" :sm="8">
  31. <a-form-item label="托书号">
  32. <a-input placeholder="请输入托书号" v-model="queryParam.shippingOrderNumber"></a-input>
  33. </a-form-item>
  34. </a-col> -->
  35. <!-- <a-col :md="6" :sm="8">
  36. <a-form-item label="品名">
  37. <a-input placeholder="请输入品名" v-model="queryParam.productName"></a-input>
  38. </a-form-item>
  39. </a-col> -->
  40. <a-col :md="6" :sm="8">
  41. <a-form-item label="小po">
  42. <a-input placeholder="请输入小po" v-model="queryParam.smallPo"></a-input>
  43. </a-form-item>
  44. </a-col>
  45. <a-col :md="6" :sm="8">
  46. <a-form-item label="预托书号">
  47. <a-input placeholder="请输入预托书号" v-model="queryParam.depositaryReceiptNo"></a-input>
  48. </a-form-item>
  49. </a-col>
  50. <a-col :md="6" :sm="8">
  51. <a-form-item label="供应商">
  52. <a-input placeholder="请输入供应商" v-model="queryParam.garmentFactory"></a-input>
  53. </a-form-item>
  54. </a-col>
  55. <a-col :md="6" :sm="8">
  56. <a-form-item label="预发货日期">
  57. <a-range-picker
  58. :placeholder="['开始时间', '结束时间']"
  59. format="YYYY-MM-DD"
  60. style="width: 100%"
  61. v-model="preDeliveryDate"
  62. @change="onDateChange"
  63. />
  64. </a-form-item>
  65. </a-col>
  66. </template>
  67. <a-col :md="6" :sm="8">
  68. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  69. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  70. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  71. <a @click="handleToggleSearch" style="margin-left: 8px">
  72. {{ toggleSearchStatus ? '收起' : '展开' }}
  73. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  74. </a>
  75. </span>
  76. </a-col>
  77. </a-row>
  78. </a-form>
  79. </div>
  80. </a-card>
  81. <!-- 操作按钮区域 推送 导入 新增-->
  82. <a-card :bordered="false" style="marginTop:10px;">
  83. <div class="table-operator">
  84. <a-button type="primary" @click="openClothesAdd" icon="plus">新增</a-button>
  85. <a-button type="primary" @click="push" icon="export">推送</a-button>
  86. <a-button type="primary" @click="bitchSubmit" icon="export">批量提交</a-button>
  87. <a-button type="primary" @click="bitchCanelSubmit" icon="export">批量取消提交</a-button>
  88. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" >
  89. <a-button type="primary" icon="import">导入</a-button>
  90. </a-upload>
  91. </div>
  92. <!-- table rowKey="id"-->
  93. <a-table
  94. bordered
  95. :columns="clothesListColumns"
  96. :data-source="clothesListData"
  97. :loading="loading"
  98. :pagination="pagination"
  99. :row-key="record => record.id"
  100. :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  101. @change="handleTableChange"
  102. :scroll="{ x: 1500, y: 500 }"
  103. >
  104. <!-- 集装箱号 输入框-->
  105. <!-- <a-form-model
  106. slot="containerNo"
  107. slot-scope="text, record"
  108. :ref="record.index"
  109. :model="record"
  110. style="width:100%;height:40px"
  111. >
  112. <a-form-model-item prop="containerNo">
  113. <a-input style="width:100%" v-model="record.containerNo" />
  114. </a-form-model-item>
  115. </a-form-model> -->
  116. <!-- 预托书号 -->
  117. <!-- <a-form-model
  118. slot="preBookNum"
  119. slot-scope="text, record"
  120. :ref="record.index"
  121. :model="record"
  122. style="width:100%;height:40px"
  123. >
  124. <a-form-model-item prop="preBookNum">
  125. <a-input style="width:100%" v-model="record.preBookNum" readOnly/>
  126. </a-form-model-item>
  127. </a-form-model> -->
  128. <!-- 状态 -->
  129. <!-- slot-scope="text, record" -->
  130. <span slot="stateSlot" slot-scope="text, record">
  131. <!-- v-if="record.isRelease == '0'" -->
  132. <a-tag color="orange" v-if="record.status == '0' || record.status == null">未提交</a-tag>
  133. <a-tag color="green" v-if="record.status == '1'">已提交</a-tag>
  134. <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
  135. </span>
  136. <!-- 推送状态 -->
  137. <span slot="pushState" slot-scope="text, record" :title ="record.cause">
  138. <!-- v-if="record.isRelease == '0'" -->
  139. <a-tag color="#f50" :title="record.cause">保存</a-tag>
  140. <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
  141. </span>
  142. <!-- 单据状态 -->
  143. <!-- <span slot="documentState"> -->
  144. <!-- v-if="record.isRelease == '0'" -->
  145. <!-- <a-tag color="#f50">提交</a-tag> -->
  146. <!-- <a-tag color="#87d068" v-else>已提交</a-tag> -->
  147. <!-- </span> -->
  148. <!-- 操作 -->
  149. <span slot="operationSlot" slot-scope="text, record">
  150. <a @click="accessoryUpload(record)" style="color:green;">附件上传</a>
  151. <a-divider type="vertical" />
  152. <!-- 未提交 -->
  153. <a-dropdown>
  154. <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
  155. <a-menu slot="overlay" v-if="record.status == '0' || record.status == null">
  156. <!-- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item> -->
  157. <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
  158. <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
  159. <a-menu-item>
  160. <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
  161. <a href="javascript:void(0);" style="color:red;">删除</a>
  162. </a-popconfirm>
  163. </a-menu-item>
  164. </a-menu>
  165. <!-- 已提交 -->
  166. <a-menu slot="overlay" v-if="record.status == '1'">
  167. <a-menu-item>
  168. <a @click="details(record)">详情</a>
  169. </a-menu-item>
  170. <!-- <a-menu-item>
  171. <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
  172. <a href="javascript:void(0);" style="color:red;">取消提交</a>
  173. </a-popconfirm>
  174. </a-menu-item> -->
  175. <!-- <a-menu-item>
  176. <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
  177. <a href="javascript:void(0);" style="color:green;">推送</a>
  178. </a-popconfirm>
  179. </a-menu-item> -->
  180. </a-menu>
  181. </a-dropdown>
  182. </span>
  183. </a-table>
  184. </a-card>
  185. <!-- 子表 -->
  186. <!-- 抽屉 -->
  187. <div>
  188. <clothesAdd-drawer ref="clothesAddDrawer" :fatherList="getSpltList" @ok="modalFormOk"></clothesAdd-drawer>
  189. <detailsClothes-drawer ref="detailsClothesDrawer" :father="bb" @ok="modalFormOk"></detailsClothes-drawer>
  190. <!-- <editClothes-drawer ref="editClothesDrawer" :father="cc" @ok="modalFormOk"></editClothes-drawer> -->
  191. </div>
  192. </div>
  193. </template>
  194. <script>
  195. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  196. import JEllipsis from '@/components/jeecg/JEllipsis'
  197. import clothesAddDrawer from '@views/packing-list/packinglist-clothes/clothesAddDrawer.vue'
  198. import detailsClothesDrawer from '@views/packing-list/packinglist-clothes/detailsClothesDrawer.vue'
  199. import editClothesDrawer from '@views/packing-list/packinglist-clothes/editClothesDrawer.vue'
  200. import { spltList,deleteSpltList,spltListId,SubmitList,cancelSubmitList,bitchSubmitList,bitchCancelSubmitList} from '@api/document/packing-list/packinglist-clothes'
  201. export default {
  202. name: 'ClothesList', // 装箱单-成衣
  203. mixins: [JeecgListMixin],
  204. components: { JEllipsis, clothesAddDrawer, detailsClothesDrawer, editClothesDrawer },
  205. data() {
  206. let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
  207. return {
  208. // 表头
  209. clothesListColumns: [
  210. {
  211. title: '预托书号',
  212. dataIndex: 'depositaryReceiptNo',
  213. width: 160,
  214. ellipsis: true,
  215. // scopedSlots: { customRender: 'preBookNum' },
  216. className: 'replacecolor'
  217. },
  218. {
  219. title: '托书号',
  220. dataIndex: 'shippingOrderNumber',
  221. width: 120,
  222. ellipsis: true,
  223. className: 'replacecolor'
  224. },
  225. {
  226. title: '集装箱代号',
  227. dataIndex: 'containerCode',
  228. width: 120,
  229. ellipsis: true,
  230. className: 'replacecolor'
  231. },
  232. {
  233. title: '集装箱号',
  234. dataIndex: 'containerNumber',
  235. width: 140,
  236. ellipsis: true,
  237. // scopedSlots: { customRender: 'containerNo' },
  238. className: 'replacecolor'
  239. },
  240. {
  241. title: '单据号',
  242. dataIndex: 'documentNo',
  243. width: 120,
  244. ellipsis: true,
  245. className: 'replacecolor'
  246. },
  247. {
  248. title: '订单号',
  249. dataIndex: 'orderNumber',
  250. width: 220,
  251. ellipsis: true,
  252. // fixed: 'left',
  253. className: 'replacecolor'
  254. },
  255. {
  256. title: '款号',
  257. ellipsis: true,
  258. dataIndex: 'itemNumber',
  259. width: 120,
  260. // fixed: 'left',
  261. className: 'replacecolor'
  262. },
  263. {
  264. title: '客户简称',
  265. dataIndex: 'customerAbbreviation',
  266. width: 120,
  267. ellipsis: true,
  268. // fixed: 'left',
  269. className: 'replacecolor'
  270. },
  271. {
  272. title: '预发货日期',
  273. dataIndex: 'hod',
  274. width: 120,
  275. ellipsis: true,
  276. className: 'replacecolor'
  277. },
  278. {
  279. title: '小po',
  280. dataIndex: 'smallPo',
  281. width: 120,
  282. ellipsis: true,
  283. className: 'replacecolor'
  284. },
  285. {
  286. title: '分销点',
  287. dataIndex: 'distributionPoint',
  288. width: 120,
  289. ellipsis: true,
  290. className: 'replacecolor'
  291. },
  292. {
  293. title: '数量(按合并规则累计)',
  294. dataIndex: 'total',
  295. width: 200,
  296. ellipsis: true,
  297. className: 'replacecolor'
  298. },
  299. {
  300. title: '箱数',
  301. dataIndex: 'totalBoxes',
  302. width: 90,
  303. ellipsis: true,
  304. className: 'replacecolor'
  305. },
  306. {
  307. title: '总净重',
  308. dataIndex: 'totalNetWeight',
  309. width: 120,
  310. ellipsis: true,
  311. className: 'replacecolor'
  312. },
  313. {
  314. title: '总毛重',
  315. dataIndex: 'totalGrossWeight',
  316. width: 120,
  317. ellipsis: true,
  318. className: 'replacecolor'
  319. },
  320. {
  321. title: '总体积',
  322. dataIndex: 'totalVolume',
  323. width: 120,
  324. ellipsis: true,
  325. className: 'replacecolor'
  326. },
  327. // {
  328. // title: '存货名称',
  329. // dataIndex: 'inventoryName',
  330. // width: 120,
  331. // className: 'replacecolor'
  332. // },
  333. // {
  334. // title: '颜色',
  335. // dataIndex: 'colour',
  336. // width: 120,
  337. // className: 'replacecolor'
  338. // },
  339. {
  340. title: '采购/委外订单号',
  341. dataIndex: 'purchase',
  342. width: 160,
  343. ellipsis: true,
  344. className: 'replacecolor'
  345. },
  346. {
  347. title: '成衣工厂',
  348. dataIndex: 'garmentFactory',
  349. width: 140,
  350. ellipsis: true,
  351. customRender: t => ellipsis(t),
  352. className: 'replacecolor'
  353. },
  354. // {
  355. // title: '订单类型',
  356. // dataIndex: 'orderType',
  357. // width: 120,
  358. // className: 'replacecolor'
  359. // },
  360. // {
  361. // title: '工厂单价',
  362. // dataIndex: 'factoryUnitPrice',
  363. // width: 120,
  364. // className: 'replacecolor'
  365. // },
  366. // {
  367. // title: '总价',
  368. // dataIndex: 'totalPrice',
  369. // width: 120,
  370. // className: 'replacecolor'
  371. // },
  372. {
  373. title: '推送状态',
  374. dataIndex: 'pushState',
  375. width: 90,
  376. scopedSlots: { customRender: 'pushState' },
  377. className: 'replacecolor'
  378. },
  379. // {
  380. // title: '单据状态',
  381. // dataIndex: 'theDocumentsState',
  382. // width: 90,
  383. // scopedSlots: { customRender: 'documentState' },
  384. // className: 'replacecolor'
  385. // },
  386. // {
  387. // title: '原因',
  388. // dataIndex: 'cause',
  389. // width: 180,
  390. // customRender: t => ellipsis(t),
  391. // className: 'replacecolor'
  392. // },
  393. {
  394. title: '是否云工厂推送',
  395. dataIndex: 'whetherCloudFactoryPush ',
  396. width: 90,
  397. // scopedSlots: { customRender: 'isPushCloudfactory' },
  398. className: 'replacecolor'
  399. },
  400. {
  401. title: '外销发票号',
  402. dataIndex: 'exportInvoiceNo',
  403. width: 120,
  404. ellipsis: true,
  405. className: 'replacecolor'
  406. },
  407. {
  408. title: '单据状态',
  409. dataIndex: 'status',
  410. width: 80,
  411. fixed: 'right',
  412. scopedSlots: { customRender: 'stateSlot' },
  413. className: 'replacecolor'
  414. },
  415. {
  416. title: '操作',
  417. dataIndex: 'operation',
  418. scopedSlots: { customRender: 'operationSlot' },
  419. width: 160,
  420. fixed: 'right',
  421. className: 'replacecolor'
  422. }
  423. ],
  424. clothesListData: [],
  425. selectedRowKeys: [], // 勾选航
  426. loading: false, // 表格加载
  427. // 查询条件
  428. queryParam: {
  429. pageNo: '' // 初始页
  430. },
  431. preDeliveryDate:[],
  432. pagination: {
  433. // pageSize:20
  434. // total: '',
  435. // current: 0,
  436. // pageSize: 0
  437. },
  438. url: {
  439. // syncUser: '/act/process/extActProcess/doSyncUser',
  440. list: '/sys/user/list',
  441. // delete: '/sys/user/delete',
  442. // deleteBatch: '/sys/user/deleteBatch',
  443. exportXlsUrl: '/sys/user/exportXls', // 导出
  444. importExcelUrl: 'sys/user/importExcel' // 导入
  445. }
  446. }
  447. },
  448. created() {
  449. this.getSpltList()
  450. },
  451. methods: {
  452. //分页查询
  453. getSpltList() {
  454. var that = this;
  455. this.$nextTick(() => {
  456. this.queryParam.pageSize=20
  457. spltList(this.queryParam).then(res => {
  458. if (res.success) {
  459. that.clothesListData = res.result.records;
  460. that.clothesListData.map(item => {
  461. var str =item.hod
  462. var n=str.split(" ");
  463. item.hod = n[0]
  464. })
  465. that.pagination = {
  466. total: res.result.total,
  467. current: res.result.current,
  468. pageSize: res.result.size
  469. }
  470. }else{
  471. that.$message.error(res.message);
  472. }
  473. })
  474. })
  475. },
  476. // 查询按钮
  477. searchQuery() {
  478. this.queryParam.pageNo = ''
  479. this.getSpltList()
  480. },
  481. searchReset() {
  482. // console.log('>>>>重置')
  483. this.queryParam = {}
  484. this.preDeliveryDate = []
  485. this.getSpltList()
  486. },
  487. // 推送
  488. push() {},
  489. //批量提交
  490. bitchSubmit(){
  491. for(var i =0;i<this.selectedRows.length;i++){
  492. var tickRow = this.selectedRows[i]
  493. if(tickRow.status === '1'){
  494. this.$message.error("部分数据是已提交,请勿重复提交!");
  495. return
  496. }
  497. }
  498. var ids = this.selectedRowKeys.toString()
  499. bitchSubmitList({ids : ids}).then(res =>{
  500. if (res.success) {
  501. this.getSpltList()
  502. this.selectedRowKeys = []
  503. this.$message.success('提交成功');
  504. }else{
  505. this.$message.error(res.message);
  506. }
  507. })
  508. },
  509. //批量取消提交
  510. bitchCanelSubmit(){
  511. for(var i =0;i<this.selectedRows.length;i++){
  512. var tickRow = this.selectedRows[i]
  513. if(tickRow.status === '0'){
  514. this.$message.error("含未提交数据,请重新选择!");
  515. return
  516. }
  517. }
  518. var ids = this.selectedRowKeys.toString()
  519. bitchCancelSubmitList({ids : ids}).then(res =>{
  520. if (res.success) {
  521. this.getSpltList()
  522. this.selectedRowKeys = []
  523. this.$message.success('取消提交成功');
  524. }else{
  525. this.$message.error(res.message);
  526. }
  527. })
  528. },
  529. // 导入
  530. importData() {},
  531. // 新增
  532. openClothesAdd() {
  533. console.log('新增-装箱单 成衣')
  534. this.$refs.clothesAddDrawer.visible = true
  535. },
  536. // --------------------------------------
  537. // 操作 附件上传
  538. accessoryUpload() {},
  539. // 操作 提交
  540. submit(record) {
  541. SubmitList({id:record.id}).then(res =>{
  542. if (res.success) {
  543. record.status=1;
  544. this.$message.success('提交成功');
  545. }else{
  546. this.$message.error(res.message);
  547. }
  548. })
  549. },
  550. //操作 取消提交
  551. cancelSubmit(record){
  552. cancelSubmitList({id:record.id}).then(res =>{
  553. if (res.success) {
  554. record.status=0;
  555. this.$message.success('取消提交成功');
  556. }else{
  557. this.$message.error(res.message);
  558. }
  559. })
  560. },
  561. // 操作 详情
  562. details(record) {
  563. spltListId({id:record.id}).then(res => {
  564. if (res.success) {
  565. var editData = res.result
  566. this.$refs.detailsClothesDrawer.visible = true
  567. this.$refs.detailsClothesDrawer.editDecide = 'edit';
  568. this.$refs.detailsClothesDrawer.dynamicColumns(editData.sizeTables)
  569. this.$refs.detailsClothesDrawer.clothesAdd = {
  570. orderNum:editData.orderNumber,
  571. styleNum:editData.itemNumber,
  572. name:editData.productName,
  573. englishProductName:editData.englishProductName,
  574. sizeRange:editData.sizeRange,
  575. customer:editData.customer,
  576. containerCode:editData.containerCode,
  577. containerNo:editData.containerNumber,
  578. note:editData.u8Remarks,
  579. clothesFactory:editData.garmentFactory,
  580. exportInvoiceNo:editData.exportInvoiceNo,
  581. bookNum:editData.shippingOrderNumber,
  582. id:editData.id,
  583. totalBoxes:editData.totalBoxes,
  584. totalGrossWeight:editData.totalGrossWeight,
  585. totalNetWeight:editData.totalNetWeight,
  586. totalVolume:editData.totalVolume,
  587. totalPrice:editData.totalPrice,
  588. depositaryReceiptNo:editData.depositaryReceiptNo,
  589. total:editData.total,
  590. };
  591. this.$refs.detailsClothesDrawer.clothesAddData = editData.syPackingListTailoringItemList
  592. for (var i=0; i<res.result.syPackingListTailoringItemList.length;i++){
  593. var row = res.result.syPackingListTailoringItemList[i];
  594. var sizeTables = row.sizeTables;
  595. for (var j=0; j<sizeTables.length;j++){
  596. row['size-'+sizeTables[j].size] = sizeTables[j].proportion;
  597. }
  598. }
  599. }
  600. })
  601. },
  602. // 操作 编辑
  603. edit(record) {
  604. console.log('编辑')
  605. spltListId({id:record.id}).then(res => {
  606. if (res.success) {
  607. var editData = res.result
  608. this.$refs.clothesAddDrawer.visible = true
  609. this.$refs.clothesAddDrawer.editDecide = 'edit';
  610. this.$refs.clothesAddDrawer.dynamicColumns(editData.sizeTables)
  611. this.$refs.clothesAddDrawer.clothesAdd = {
  612. orderNum:editData.orderNumber,
  613. styleNum:editData.itemNumber,
  614. name:editData.productName,
  615. englishProductName:editData.englishProductName,
  616. sizeRange:editData.sizeRange,
  617. customer:editData.customer,
  618. containerCode:editData.containerCode,
  619. containerNo:editData.containerNumber,
  620. note:editData.u8Remarks,
  621. clothesFactory:editData.garmentFactory,
  622. exportInvoiceNo:editData.exportInvoiceNo,
  623. bookNum:editData.shippingOrderNumber,
  624. id:editData.id,
  625. totalBoxes:editData.totalBoxes,
  626. totalGrossWeight:editData.totalGrossWeight,
  627. totalNetWeight:editData.totalNetWeight,
  628. totalVolume:editData.totalVolume,
  629. totalPrice:editData.totalPrice,
  630. depositaryReceiptNo:editData.depositaryReceiptNo,
  631. total:editData.total
  632. };
  633. this.$refs.clothesAddDrawer.clothesAddData = editData.syPackingListTailoringItemList
  634. for (var i=0; i<res.result.syPackingListTailoringItemList.length;i++){
  635. var row = res.result.syPackingListTailoringItemList[i];
  636. var sizeTables = row.sizeTables;
  637. for (var j=0; j<sizeTables.length;j++){
  638. row['size-'+sizeTables[j].size] = sizeTables[j].proportion;
  639. }
  640. }
  641. }
  642. })
  643. },
  644. // 操作 删除
  645. handleDelete(record) {
  646. console.log('点击删除项id:', record)
  647. this.$nextTick(() => {
  648. if(this.queryParam.pageNo > 1 && this.clothesListData.length === 1){
  649. this.queryParam.pageNo = this.queryParam.pageNo -1
  650. }
  651. deleteSpltList({ id: record }).then(res => {
  652. if (res.success) {
  653. this.getSpltList()
  654. this.$message.success('删除成功')
  655. } else {
  656. this.$message.error('删除成功')
  657. }
  658. })
  659. })
  660. },
  661. onDateChange(value, dateString) {
  662. this.queryParam.stratDate = dateString[0]
  663. this.queryParam.endDate = dateString[1]
  664. },
  665. // --------------------------------------
  666. // ??
  667. modalFormOk() {},
  668. // 选中行
  669. onSelectChange(keys, rows) {
  670. this.selectedRowKeys = keys
  671. this.selectedRows = rows
  672. },
  673. // --------------------------------------
  674. aa() {},
  675. bb() {},
  676. cc() {},
  677. // 分页、排序、筛选变化时触发
  678. handleTableChange(pagination, filters, sorter) {
  679. // console.log('当前页信息>>>>',pagination)
  680. this.queryParam.pageNo = pagination.current
  681. this.getSpltList()
  682. }
  683. },
  684. computed: {
  685. // 导入
  686. importExcelUrl: function() {
  687. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  688. },
  689. // 选中项
  690. rowSelection() {
  691. return {
  692. onChange: (selectedRowKeys, selectedRows) => {
  693. console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
  694. },
  695. getCheckboxProps: record => ({
  696. props: {
  697. disabled: record.title === 'Disabled User',
  698. // Column configuration not to be checked
  699. title: record.title
  700. }
  701. })
  702. }
  703. }
  704. },
  705. mounted() {}
  706. }
  707. </script>
  708. <style lang="less" scoped>
  709. @import '~@assets/less/common.less';
  710. @import '~@assets/less/overwriter.less';
  711. /deep/ .ant-table-thead > tr > th {
  712. text-align: center;
  713. // font-weight: 700;
  714. }
  715. /deep/ .ant-table-tbody {
  716. text-align: center;
  717. }
  718. // /deep/ th.replacecolor {
  719. // background-color: #ccc;
  720. // }
  721. </style>