sum_list.vue 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293
  1. <template>
  2. <div class="app-container">
  3. <div v-show="!isShowPrint">
  4. <!-- 筛选条件 -->
  5. <div class="screen-container">
  6. <el-form
  7. ref="screenForm"
  8. :model="screenForm"
  9. label-width="120px"
  10. size="mini"
  11. label-position="left"
  12. >
  13. <el-row :gutter="20">
  14. <el-col :xs="24" :sm="12" :lg="6">
  15. <el-form-item label="产品名称" prop="goodsName">
  16. <el-input
  17. v-model="screenForm.goodsName"
  18. placeholder="请输入产品名称"
  19. ></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :xs="24" :sm="12" :lg="6">
  23. <el-form-item label="物料编码" prop="goodsCode">
  24. <el-input
  25. v-model="screenForm.goodsCode"
  26. placeholder="请输入物料编码"
  27. ></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :xs="24" :sm="12" :lg="6">
  31. <el-form-item label="产品编码" prop="goodsOldCode">
  32. <el-input
  33. v-model="screenForm.goodsOldCode"
  34. placeholder="请输入产品编码"
  35. ></el-input>
  36. </el-form-item>
  37. </el-col>
  38. <el-col :xs="24" :sm="12" :lg="6">
  39. <el-form-item label="规格型号" prop="model">
  40. <el-input
  41. v-model="screenForm.model"
  42. placeholder="请输入规格型号"
  43. ></el-input>
  44. </el-form-item>
  45. </el-col>
  46. <el-col :xs="24" :sm="12" :lg="6">
  47. <el-form-item label="制单日期" prop="createDate">
  48. <el-date-picker
  49. v-model="screenForm.createDate"
  50. type="datetimerange"
  51. range-separator="至"
  52. style="width: 100%"
  53. value-format="yyyy-MM-dd HH:mm:ss"
  54. start-placeholder="开始日期"
  55. end-placeholder="结束日期"
  56. >
  57. </el-date-picker>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :xs="24" :sm="12" :lg="6">
  61. <el-form-item label="发货日期" prop="deliverDate">
  62. <el-date-picker
  63. v-model="screenForm.deliverDate"
  64. type="datetimerange"
  65. range-separator="至"
  66. style="width: 100%"
  67. value-format="yyyy-MM-dd HH:mm:ss"
  68. start-placeholder="开始日期"
  69. end-placeholder="结束日期"
  70. >
  71. </el-date-picker>
  72. </el-form-item>
  73. </el-col>
  74. <el-col :xs="24" :sm="12" :lg="6">
  75. <el-form-item label="经销商编号" prop="jxsNum">
  76. <el-input
  77. v-model="screenForm.jxsNum"
  78. placeholder="请输入经销商编号"
  79. ></el-input>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :xs="24" :sm="12" :lg="6">
  83. <el-form-item label="经销商名称" prop="jxsName">
  84. <el-input
  85. v-model="screenForm.jxsName"
  86. placeholder="请输入经销商名称"
  87. ></el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :xs="24" :sm="12" :lg="6">
  91. <el-form-item label="发货单号" prop="orderNum">
  92. <el-input
  93. v-model="screenForm.orderNum"
  94. placeholder="请输入发货单号"
  95. ></el-input>
  96. </el-form-item>
  97. </el-col>
  98. <el-col :xs="24" :sm="12" :lg="6">
  99. <el-form-item label="订单" prop="mainOrderId">
  100. <el-input
  101. v-model="screenForm.mainOrderId"
  102. placeholder="请输入订单"
  103. ></el-input>
  104. </el-form-item>
  105. </el-col>
  106. <el-col :xs="24" :sm="12" :lg="6">
  107. <el-form-item label="存货类别" prop="type">
  108. <el-select
  109. v-model="screenForm.type"
  110. placeholder="选择存货类别"
  111. style="width: 100%"
  112. clearable
  113. >
  114. <el-option
  115. v-for="item in categoryList"
  116. :key="item.name"
  117. :label="item.name"
  118. :value="item.name"
  119. >
  120. </el-option>
  121. </el-select>
  122. </el-form-item>
  123. </el-col>
  124. <el-col :xs="24" :sm="12" :lg="6">
  125. <el-form-item label="仓库" prop="correspondId">
  126. <el-select
  127. v-model="screenForm.correspondId"
  128. multiple
  129. style="width: 100%"
  130. placeholder="请选择仓库"
  131. size="mini"
  132. filterable
  133. clearable
  134. >
  135. <el-option
  136. v-for="(item, index) in warehouseList"
  137. :key="index"
  138. :label="item.name"
  139. :value="item.id"
  140. />
  141. </el-select>
  142. </el-form-item>
  143. </el-col>
  144. <el-col :xs="24" :sm="12" :lg="6">
  145. <el-form-item label="表头业务员" prop="k3ServiceId">
  146. <el-select
  147. v-model="screenForm.k3ServiceId"
  148. placeholder="选择表头业务员"
  149. clearable
  150. filterable
  151. style="width: 100%"
  152. >
  153. <el-option
  154. v-for="item in salesmanList"
  155. :key="item.adminUserId"
  156. :label="item.nickName"
  157. :value="item.adminUserId"
  158. >
  159. </el-option>
  160. </el-select>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :xs="24" :sm="12" :lg="6">
  164. <el-form-item label="表体业务员" prop="salesMan">
  165. <el-select
  166. v-model="screenForm.salesMan"
  167. placeholder="选择表体业务员"
  168. clearable
  169. filterable
  170. style="width: 100%"
  171. >
  172. <el-option
  173. v-for="item in salesmanList"
  174. :key="item.adminUserId"
  175. :label="item.nickName"
  176. :value="item.adminUserId"
  177. >
  178. </el-option>
  179. </el-select>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :xs="24" :sm="12" :lg="6">
  183. <el-form-item label="审核时间" prop="approvaTime">
  184. <el-date-picker
  185. v-model="screenForm.approvaTime"
  186. type="datetimerange"
  187. range-separator="至"
  188. style="width: 100%"
  189. value-format="yyyy-MM-dd HH:mm:ss"
  190. start-placeholder="开始日期"
  191. end-placeholder="结束日期"
  192. >
  193. </el-date-picker>
  194. </el-form-item>
  195. </el-col>
  196. <el-col :xs="24" :sm="12" :lg="6">
  197. <el-form-item label="申请发货单类型" prop="types">
  198. <el-select
  199. v-model="screenForm.types"
  200. placeholder="选择申请发货单类型"
  201. clearable
  202. filterable
  203. style="width: 100%"
  204. >
  205. <el-option
  206. v-for="item in invoiceList"
  207. :key="item.value"
  208. :label="item.label"
  209. :value="item.value"
  210. >
  211. </el-option>
  212. </el-select>
  213. </el-form-item>
  214. </el-col>
  215. <el-col :xs="24" :sm="24" :lg="24" class="tr">
  216. <el-form-item label="">
  217. <el-button @click="resetScreenForm">清空</el-button>
  218. <el-button type="primary" @click="submitScreenForm"
  219. >搜索</el-button
  220. >
  221. </el-form-item>
  222. </el-col>
  223. </el-row>
  224. </el-form>
  225. </div>
  226. <div class="mymain-container">
  227. <div class="btn-group clearfix">
  228. <div class="fl">
  229. <el-button
  230. type="primary"
  231. size="mini"
  232. @click="toPrint"
  233. :disabled="tableSelection.length < 1"
  234. >打印发货单
  235. </el-button>
  236. <div class="num" v-if="totalNum">
  237. 当前列表总发货数量:{{ totalNum }}
  238. </div>
  239. </div>
  240. <!-- -->
  241. <div class="fr" style="display: flex">
  242. <el-button
  243. size="mini"
  244. type="primary"
  245. v-if="$checkBtnRole('refund', $route.meta.roles)"
  246. style="margin-right: 10px"
  247. icon="el-icon-plus"
  248. @click="$router.push('/supply/deliver/apply_list?isShow=true')"
  249. >零售退货申请</el-button
  250. >
  251. <el-button
  252. size="mini"
  253. type="primary"
  254. v-if="$checkBtnRole('refund', $route.meta.roles)"
  255. style="margin-right: 10px"
  256. icon="el-icon-plus"
  257. @click="$router.push('/supply/deliver/engin_list?isShow=true')"
  258. >工程退货申请</el-button
  259. >
  260. <!-- <el-button size="mini"
  261. type="primary"
  262. icon="el-icon-download"
  263. @click="handleFilterData"
  264. >
  265. 导出数据
  266. </el-button> -->
  267. <ExportButton
  268. :exUrl="'invoice/exportInvoice'"
  269. :exParams="exParams"
  270. />
  271. </div>
  272. </div>
  273. <div class="table">
  274. <el-table
  275. ref="table"
  276. v-loading="listLoading"
  277. :data="dataList"
  278. element-loading-text="Loading"
  279. border
  280. fit
  281. highlight-current-row
  282. stripe
  283. @select="handleSelect"
  284. @select-all="handleSelectAll"
  285. show-summary
  286. :summary-method="$getSummaries"
  287. max-height="500"
  288. >
  289. <el-table-column
  290. align="center"
  291. type="selection"
  292. width="55"
  293. ></el-table-column>
  294. <el-table-column
  295. align="right"
  296. label="打印次数"
  297. sortable
  298. prop="printNum"
  299. min-width="100"
  300. show-overflow-tooltip
  301. >
  302. </el-table-column>
  303. <el-table-column
  304. align="left"
  305. label="订单类型"
  306. sortable
  307. prop="orderType"
  308. min-width="100"
  309. show-overflow-tooltip
  310. >
  311. <template slot-scope="scope">
  312. {{ scope.row.orderType | orderTypeFilter }}
  313. </template>
  314. </el-table-column>
  315. <el-table-column
  316. align="left"
  317. label="审核日期"
  318. sortable
  319. prop="approvalTime"
  320. min-width="160"
  321. show-overflow-tooltip
  322. >
  323. </el-table-column>
  324. <el-table-column
  325. align="left"
  326. label="发货日期"
  327. sortable
  328. prop="orderTime"
  329. min-width="160"
  330. show-overflow-tooltip
  331. >
  332. </el-table-column>
  333. <el-table-column
  334. align="left"
  335. label="订单日期"
  336. sortable
  337. prop="theTime"
  338. min-width="160"
  339. show-overflow-tooltip
  340. >
  341. </el-table-column>
  342. <el-table-column
  343. align="left"
  344. label="发货单号"
  345. sortable
  346. prop="id"
  347. min-width="130"
  348. show-overflow-tooltip
  349. >
  350. <template slot-scope="scope">
  351. <CopyButton :copyText="scope.row.id" />
  352. <span>{{ scope.row.id }}</span>
  353. </template>
  354. </el-table-column>
  355. <el-table-column
  356. align="left"
  357. label="订单号"
  358. sortable
  359. prop="orderId"
  360. min-width="140"
  361. show-overflow-tooltip
  362. >
  363. <template slot-scope="scope">
  364. <CopyButton
  365. :copyText="
  366. scope.row.enginOrderType == 'HOME' ||
  367. scope.row.enginOrderType == 'TRADE'
  368. ? scope.row.enginOrderNo
  369. : scope.row.mainOrderId
  370. "
  371. />
  372. <span>{{
  373. scope.row.enginOrderType == "HOME" ||
  374. scope.row.enginOrderType == "TRADE"
  375. ? scope.row.enginOrderNo
  376. : scope.row.mainOrderId
  377. }}</span>
  378. </template>
  379. </el-table-column>
  380. <el-table-column
  381. align="left"
  382. label="经销商编码"
  383. sortable
  384. prop="customerNumber"
  385. min-width="120"
  386. show-overflow-tooltip
  387. >
  388. <template slot-scope="scope">
  389. <CopyButton :copyText="scope.row.customerNumber" />
  390. <span>{{ scope.row.customerNumber }}</span>
  391. </template>
  392. </el-table-column>
  393. <el-table-column
  394. align="left"
  395. label="经销商名称"
  396. sortable
  397. prop="customerName"
  398. min-width="250"
  399. show-overflow-tooltip
  400. >
  401. <template slot-scope="scope">
  402. <CopyButton :copyText="scope.row.customerName" />
  403. <span>{{ scope.row.customerName }}</span>
  404. </template>
  405. </el-table-column>
  406. <el-table-column
  407. align="left"
  408. label="销售类型"
  409. sortable
  410. prop="saleTypeName"
  411. min-width="100"
  412. show-overflow-tooltip
  413. >
  414. </el-table-column>
  415. <el-table-column
  416. align="left"
  417. label="物料编码"
  418. sortable
  419. prop="materialCode"
  420. min-width="120"
  421. show-overflow-tooltip
  422. >
  423. <template slot-scope="scope">
  424. <CopyButton :copyText="scope.row.materialCode" />
  425. <span>{{ scope.row.materialCode }}</span>
  426. </template>
  427. </el-table-column>
  428. <el-table-column
  429. align="left"
  430. label="产品编码"
  431. sortable
  432. prop="materialOldNumber"
  433. min-width="140"
  434. show-overflow-tooltip
  435. >
  436. <template slot-scope="scope">
  437. <CopyButton :copyText="scope.row.materialOldNumber" />
  438. <span>{{ scope.row.materialOldNumber }}</span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column
  442. align="left"
  443. label="产品名称"
  444. sortable
  445. prop="materialName"
  446. min-width="160"
  447. show-overflow-tooltip
  448. >
  449. <template slot-scope="scope">
  450. <CopyButton :copyText="scope.row.materialName" />
  451. <span>{{ scope.row.materialName }}</span>
  452. </template>
  453. </el-table-column>
  454. <el-table-column
  455. align="left"
  456. label="规格型号"
  457. sortable
  458. prop="specification"
  459. min-width="350"
  460. show-overflow-tooltip
  461. >
  462. <template slot-scope="scope">
  463. <CopyButton :copyText="scope.row.specification" />
  464. <span>{{ scope.row.specification }}</span>
  465. </template>
  466. </el-table-column>
  467. <el-table-column
  468. align="left"
  469. label="仓库"
  470. sortable
  471. prop="correspondName"
  472. min-width="100"
  473. show-overflow-tooltip
  474. >
  475. </el-table-column>
  476. <el-table-column
  477. align="right"
  478. label="未出库数量"
  479. sortable
  480. prop="compute_wckNum"
  481. min-width="120"
  482. show-overflow-tooltip
  483. >
  484. <template slot-scope="scope">
  485. {{
  486. comRefundableQty(
  487. scope.row.type,
  488. scope.row.salesExamineStatus,
  489. scope.row
  490. )
  491. }}
  492. </template>
  493. </el-table-column>
  494. <el-table-column
  495. align="right"
  496. label="发货数量"
  497. sortable
  498. prop="refundableQty"
  499. min-width="120"
  500. show-overflow-tooltip
  501. >
  502. </el-table-column>
  503. <el-table-column
  504. align="right"
  505. label="发货金额"
  506. sortable
  507. prop="payAmount"
  508. min-width="100"
  509. show-overflow-tooltip
  510. >
  511. <template slot-scope="scope">
  512. {{ scope.row.payAmount | numToFixed }}
  513. </template>
  514. </el-table-column>
  515. <el-table-column
  516. align="right"
  517. label="发货返利金额"
  518. sortable
  519. prop="payRebateAmount"
  520. min-width="130"
  521. show-overflow-tooltip
  522. >
  523. <template slot-scope="scope">
  524. {{ scope.row.payRebateAmount | numToFixed }}
  525. </template>
  526. </el-table-column>
  527. <el-table-column
  528. align="right"
  529. label="发货折扣金额"
  530. sortable
  531. prop="totalDiscAmount"
  532. min-width="130"
  533. show-overflow-tooltip
  534. >
  535. <template slot-scope="scope">
  536. {{ scope.row.totalDiscAmount | numToFixed }}
  537. </template>
  538. </el-table-column>
  539. <el-table-column
  540. align="right"
  541. label="折扣额合计"
  542. sortable
  543. prop="compute_zkeAmount"
  544. min-width="120"
  545. show-overflow-tooltip
  546. >
  547. <template slot-scope="scope">
  548. {{
  549. (scope.row.totalDiscAmount + scope.row.payRebateAmount)
  550. | numToFixed
  551. }}
  552. </template>
  553. </el-table-column>
  554. <el-table-column
  555. align="right"
  556. label="含税单价"
  557. sortable
  558. prop="singlePayPrice"
  559. min-width="100"
  560. show-overflow-tooltip
  561. >
  562. <template slot-scope="scope">
  563. {{ scope.row.singlePayPrice | numToFixed }}
  564. </template>
  565. </el-table-column>
  566. <el-table-column
  567. align="right"
  568. label="含税总额"
  569. sortable
  570. prop="payAmount"
  571. min-width="100"
  572. show-overflow-tooltip
  573. >
  574. <template slot-scope="scope">
  575. {{ scope.row.payAmount | numToFixed }}
  576. </template>
  577. </el-table-column>
  578. <el-table-column
  579. align="left"
  580. label="表头业务员"
  581. sortable
  582. prop="k3ServiceName"
  583. min-width="120"
  584. show-overflow-tooltip
  585. >
  586. </el-table-column>
  587. <el-table-column
  588. align="left"
  589. label="表体业务员"
  590. sortable
  591. prop="serviceName"
  592. min-width="120"
  593. show-overflow-tooltip
  594. >
  595. </el-table-column>
  596. <el-table-column
  597. align="left"
  598. label="政策单号"
  599. sortable
  600. prop="policyCode"
  601. min-width="100"
  602. show-overflow-tooltip
  603. >
  604. </el-table-column>
  605. <el-table-column
  606. align="left"
  607. label="政策名称"
  608. sortable
  609. prop="policyTitle"
  610. min-width="100"
  611. show-overflow-tooltip
  612. >
  613. </el-table-column>
  614. <el-table-column
  615. align="left"
  616. label="区域"
  617. sortable
  618. prop="adminArea"
  619. min-width="100"
  620. show-overflow-tooltip
  621. >
  622. </el-table-column>
  623. <el-table-column
  624. align="left"
  625. label="业务区域"
  626. sortable
  627. prop="serviceArea"
  628. min-width="100"
  629. show-overflow-tooltip
  630. >
  631. </el-table-column>
  632. <el-table-column
  633. align="left"
  634. label="月份"
  635. sortable
  636. prop="month"
  637. min-width="100"
  638. show-overflow-tooltip
  639. >
  640. </el-table-column>
  641. <el-table-column
  642. align="left"
  643. label="项目编码"
  644. sortable
  645. prop="refEnginRecordNo"
  646. min-width="160"
  647. show-overflow-tooltip
  648. >
  649. </el-table-column>
  650. <el-table-column
  651. align="left"
  652. label="项目名称"
  653. sortable
  654. prop="refProjectName"
  655. min-width="160"
  656. show-overflow-tooltip
  657. >
  658. </el-table-column>
  659. <el-table-column
  660. align="left"
  661. label="存货类别"
  662. sortable
  663. prop="categoryName"
  664. min-width="160"
  665. show-overflow-tooltip
  666. >
  667. </el-table-column>
  668. <el-table-column
  669. align="left"
  670. label="申请发货单备注"
  671. sortable
  672. prop="remark"
  673. min-width="200"
  674. show-overflow-tooltip
  675. >
  676. </el-table-column>
  677. <el-table-column
  678. align="left"
  679. label="表头备注"
  680. sortable
  681. prop="headerRemark"
  682. min-width="200"
  683. show-overflow-tooltip
  684. >
  685. </el-table-column>
  686. <el-table-column
  687. align="left"
  688. label="表体备注"
  689. sortable
  690. prop="invoiceRemark"
  691. min-width="200"
  692. show-overflow-tooltip
  693. >
  694. </el-table-column>
  695. <el-table-column
  696. align="left"
  697. label="打印次数"
  698. sortable
  699. prop="printNum"
  700. min-width="100"
  701. show-overflow-tooltip
  702. >
  703. </el-table-column>
  704. <el-table-column
  705. align="left"
  706. label="经销商现金钱包"
  707. sortable
  708. prop="customerWalletName"
  709. min-width="140"
  710. show-overflow-tooltip
  711. ></el-table-column>
  712. <el-table-column
  713. align="left"
  714. label="经销商返利钱包"
  715. sortable
  716. prop="customerWalletName2"
  717. min-width="140"
  718. show-overflow-tooltip
  719. ></el-table-column>
  720. <el-table-column
  721. align="left"
  722. label="文件编号"
  723. sortable
  724. prop="itemFileNo"
  725. min-width="100"
  726. show-overflow-tooltip
  727. >
  728. </el-table-column>
  729. <el-table-column
  730. align="left"
  731. label="预约提货打印状态"
  732. sortable
  733. prop="printStatus"
  734. min-width="150"
  735. show-overflow-tooltip
  736. >
  737. <template slot-scope="scope">
  738. {{ scope.row.printStatus == 1 ? `打印` : ` 未打印` }}
  739. </template>
  740. </el-table-column>
  741. <el-table-column
  742. align="left"
  743. label="二级经销商代码"
  744. sortable
  745. prop="secondCustomerNumber"
  746. min-width="150"
  747. show-overflow-tooltip
  748. >
  749. </el-table-column>
  750. </el-table>
  751. </div>
  752. </div>
  753. <div class="pagination clearfix">
  754. <div class="fr">
  755. <el-pagination
  756. @size-change="handleSizeChange"
  757. @current-change="handleCurrentChange"
  758. :current-page="currentPage"
  759. :page-sizes="[10, 20, 50, 100, 500, 1000, 2000]"
  760. :page-size="10"
  761. layout="total, sizes, prev, pager, next, jumper"
  762. :total="listTotal"
  763. >
  764. </el-pagination>
  765. </div>
  766. </div>
  767. </div>
  768. <print-preview ref="preView" />
  769. <el-dialog
  770. title="密码确认"
  771. :visible.sync="isShowDialog"
  772. :show-close="false"
  773. width="40%"
  774. :close-on-click-modal="false"
  775. >
  776. <el-form
  777. ref="dialogForm"
  778. :model="dialogForm"
  779. :rules="dialogFormRules"
  780. label-position="right"
  781. label-width="70px"
  782. >
  783. <el-row :gutter="20">
  784. <el-col :xs="24" :sm="24" :lg="24">
  785. <el-form-item label="密码" prop="password">
  786. <el-input
  787. v-model="dialogForm.password"
  788. autocomplete="off"
  789. placeholder="请输入密码"
  790. ></el-input>
  791. </el-form-item>
  792. </el-col>
  793. <el-col :xs="24" :sm="12" :lg="12">
  794. <el-form-item label="操作人" prop="createMan">
  795. <el-input v-model="dialogForm.createMan" readonly></el-input>
  796. </el-form-item>
  797. </el-col>
  798. <el-col :xs="24" :sm="12" :lg="12" style="height: 51px">
  799. <el-form-item label="操作日期" prop="createDate">
  800. <el-date-picker
  801. v-model="dialogForm.createDate"
  802. readonly
  803. type="date"
  804. value-format="yyyy-MM-dd"
  805. style="width: 100%"
  806. placeholder="选择日期"
  807. >
  808. </el-date-picker>
  809. </el-form-item>
  810. </el-col>
  811. </el-row>
  812. </el-form>
  813. <div slot="footer" class="dialog-footer">
  814. <el-button @click="cancelDialogForm">取 消</el-button>
  815. <el-button type="primary" @click="submitDialogForm">确 定</el-button>
  816. </div>
  817. </el-dialog>
  818. <el-dialog
  819. title="导出项"
  820. :visible.sync="dialogVisible"
  821. width="50%"
  822. >
  823. <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  824. <div style="margin: 15px 0;"></div>
  825. <el-checkbox-group v-model="check" @change="handleCheckedCitiesChange">
  826. <el-checkbox v-for="item in excelData" :label="item.value" >{{item.name}}</el-checkbox>
  827. </el-checkbox-group>
  828. <span slot="footer" class="dialog-footer">
  829. <el-button @click="dialogVisible = false">取 消</el-button>
  830. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  831. </span>
  832. </el-dialog>
  833. </div>
  834. </template>
  835. <script>
  836. import { getSumList } from "@/api/supply/deliver";
  837. import print from "@/mixin/print";
  838. import { checkPassword, getListInvoiceNumber } from "@/api/supply/pickup";
  839. import { getCategoryList, getSalesmanList } from "@/api/common";
  840. import SumPrint from "@/views/supply/deliver/components/sum_print";
  841. import { getWarehouseList } from "@/api/supply/apply";
  842. import printPreview from "./components/design/preview.vue";
  843. export default {
  844. components: {
  845. SumPrint,
  846. printPreview,
  847. },
  848. mixins: [print],
  849. filters: {
  850. orderTypeFilter(val) {
  851. const MAP = {
  852. HOME: "家用单",
  853. TRADE: "商用单",
  854. RETAIL: "零售单",
  855. RETAIL_POLICY: "销售政策单",
  856. PERMU_HOME: "置换家用单",
  857. PERMU_TRADE: "置换商用单",
  858. PERMU_RETAIL: "置换零售单",
  859. PERMU_RETAIL_POLICY: "置换销售政策单",
  860. REQUISITION_HOME: "调拨家用单",
  861. REQUISITION_TRADE: "调拨商用单",
  862. REQUISITION_RETAIL: "调拨零售单",
  863. REQUISITION_RETAIL_POLICY: "调拨销售政策单",
  864. };
  865. return MAP[val];
  866. },
  867. },
  868. data() {
  869. return {
  870. currentPage: 1, // 当前页码
  871. pageSize: 10, // 每页数量
  872. listTotal: 0, // 列表总数
  873. dataList: null, // 列表数据
  874. listLoading: false, // 列表加载loading
  875. screenForm: {
  876. // 筛选表单数据
  877. goodsName: "",
  878. goodsCode: "",
  879. goodsOldCode: "",
  880. model: "",
  881. createDate: "",
  882. deliverDate: "",
  883. correspondId: [],
  884. jxsNum: "",
  885. jxsName: "",
  886. orderNum: "",
  887. type: "",
  888. salesMan: "",
  889. k3ServiceId: "",
  890. mainOrderId: "",
  891. approvaTime: "",
  892. types:''
  893. },
  894. invoiceList:[
  895. {
  896. value:1,
  897. label:'申请发货单'
  898. },
  899. {
  900. value:2,
  901. label:'退货单'
  902. },
  903. {
  904. value:3,
  905. label:'直调发货单'
  906. }
  907. ],
  908. categoryList: [],
  909. salesmanList: [],
  910. tableSelection: [],
  911. queryItem: {},
  912. isShowPrint: false,
  913. totalNum: 0,
  914. isShowDialog: false,
  915. dialogForm: {
  916. password: "",
  917. createMan: "",
  918. createDate: "",
  919. },
  920. warehouseList: [],
  921. dialogFormRules: {
  922. password: [{ required: true, message: "请输入密码", trigger: "blur" }],
  923. },
  924. dialogVisible:false,
  925. excelData:[
  926. {
  927. value:1,
  928. name:'状态'
  929. },
  930. {
  931. value:2,
  932. name:'打印时间'
  933. }
  934. ],
  935. check:[],
  936. checkAll:false,
  937. isIndeterminate: false
  938. };
  939. },
  940. computed: {
  941. exParams() {
  942. return {
  943. materialName: this.screenForm.goodsName,
  944. materialNumber: this.screenForm.goodsCode,
  945. materialOldNumber: this.screenForm.goodsOldCode,
  946. specification: this.screenForm.model,
  947. createStartTime: this.screenForm.createDate
  948. ? this.screenForm.createDate[0]
  949. : "",
  950. createEndTime: this.screenForm.createDate
  951. ? this.screenForm.createDate[1]
  952. : "",
  953. startTime: this.screenForm.deliverDate
  954. ? this.screenForm.deliverDate[0]
  955. : "",
  956. endTime: this.screenForm.deliverDate
  957. ? this.screenForm.deliverDate[1]
  958. : "",
  959. customerNumber: this.screenForm.jxsNum,
  960. customerName: this.screenForm.jxsName,
  961. id: this.screenForm.orderNum,
  962. categoryName: this.screenForm.type,
  963. serviceId: this.screenForm.salesMan,
  964. k3ServiceId: this.screenForm.k3ServiceId,
  965. mainOrderId: this.screenForm.mainOrderId,
  966. approvalEndTime: this.screenForm.approvaTime
  967. ? this.screenForm.approvaTime[1]
  968. : "",
  969. approvalStartTime: this.screenForm.approvaTime
  970. ? this.screenForm.approvaTime[0]
  971. : "",
  972. correspondId: this.screenForm.correspondId.join(","),
  973. type:this.screenForm.types
  974. };
  975. },
  976. comRefundableQty() {
  977. return (type, status, row) => {
  978. if (type == 2) {
  979. return "";
  980. } else {
  981. if (status == "OK") {
  982. return 0;
  983. } else {
  984. return row.refundableQty;
  985. }
  986. }
  987. };
  988. },
  989. },
  990. watch: {
  991. dataList: {
  992. handler(newValue, oldValue) {
  993. if (newValue && newValue.length) {
  994. newValue.forEach((item, index) => {
  995. this.dataList[index].compute_zkeAmount =
  996. item.totalDiscAmount + item.payRebateAmount;
  997. this.dataList[index].compute_wckNum = this.comRefundableQty(
  998. item.type,
  999. item.salesExamineStatus,
  1000. item
  1001. );
  1002. });
  1003. }
  1004. },
  1005. immediate: true,
  1006. deep: true,
  1007. },
  1008. },
  1009. created() {
  1010. this.getSalesmanList();
  1011. this.getCategoryList();
  1012. this.getList();
  1013. this.getWarehouseList();
  1014. },
  1015. mounted() {
  1016. this.initPrint();
  1017. },
  1018. methods: {
  1019. handleFilterData(){
  1020. this.dialogVisible = true
  1021. },
  1022. handleCheckAllChange(val) {
  1023. let arr = []
  1024. if (val) {
  1025. for (let i = 1; i <=this.excelData.length; i++) {
  1026. arr.push(i)
  1027. }
  1028. }
  1029. this.check = val ? arr : [];
  1030. this.isIndeterminate = false;
  1031. },
  1032. handleCheckedCitiesChange(){
  1033. console.log(this.checkAll);
  1034. },
  1035. // 获取业务员列表
  1036. getSalesmanList() {
  1037. getSalesmanList({
  1038. pageNum: 1,
  1039. pageSize: -1,
  1040. isCustomer: 0,
  1041. status: true,
  1042. }).then((res) => {
  1043. this.salesmanList = res.data.records;
  1044. });
  1045. },
  1046. // 获取存货类别列表
  1047. getCategoryList() {
  1048. getCategoryList({
  1049. pageNum: 1,
  1050. pageSize: -1,
  1051. }).then((res) => {
  1052. this.categoryList = res.data.records;
  1053. });
  1054. },
  1055. // 获取仓库列表
  1056. getWarehouseList() {
  1057. getWarehouseList({
  1058. pageNum: 1,
  1059. pageSize: -1,
  1060. }).then((res) => {
  1061. this.warehouseList = res.data.records;
  1062. });
  1063. },
  1064. // 查询列表
  1065. getList() {
  1066. this.listLoading = true;
  1067. let params = {
  1068. pageNum: this.currentPage,
  1069. pageSize: this.pageSize,
  1070. materialName: this.screenForm.goodsName,
  1071. materialNumber: this.screenForm.goodsCode,
  1072. materialOldNumber: this.screenForm.goodsOldCode,
  1073. specification: this.screenForm.model,
  1074. createStartTime: this.screenForm.createDate
  1075. ? this.screenForm.createDate[0]
  1076. : "",
  1077. createEndTime: this.screenForm.createDate
  1078. ? this.screenForm.createDate[1]
  1079. : "",
  1080. startTime: this.screenForm.deliverDate
  1081. ? this.screenForm.deliverDate[0]
  1082. : "",
  1083. endTime: this.screenForm.deliverDate
  1084. ? this.screenForm.deliverDate[1]
  1085. : "",
  1086. customerNumber: this.screenForm.jxsNum,
  1087. customerName: this.screenForm.jxsName,
  1088. id: this.screenForm.orderNum,
  1089. categoryName: this.screenForm.type,
  1090. serviceId: this.screenForm.salesMan,
  1091. k3ServiceId: this.screenForm.k3ServiceId,
  1092. mainOrderId: this.screenForm.mainOrderId,
  1093. approvalEndTime: this.screenForm.approvaTime
  1094. ? this.screenForm.approvaTime[1]
  1095. : "",
  1096. approvalStartTime: this.screenForm.approvaTime
  1097. ? this.screenForm.approvaTime[0]
  1098. : "",
  1099. correspondId: this.screenForm.correspondId.join(","),
  1100. type:this.screenForm.types
  1101. };
  1102. getSumList(params).then((res) => {
  1103. res.data.records.forEach((item) => {
  1104. item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
  1105. item.sums1 = ["refundableQty", "compute_wckNum"];
  1106. item.sums2 = [
  1107. "payAmount",
  1108. "payRebateAmount",
  1109. "discAmount",
  1110. "totalDiscAmount",
  1111. "singlePayPrice",
  1112. "compute_zkeAmount",
  1113. ];
  1114. });
  1115. this.dataList = res.data.records;
  1116. this.listTotal = res.data.total;
  1117. this.listLoading = false;
  1118. });
  1119. this.getListInvoiceNumber();
  1120. },
  1121. getListInvoiceNumber() {
  1122. let params = {
  1123. materialName: this.screenForm.goodsName,
  1124. materialNumber: this.screenForm.goodsCode,
  1125. materialOldNumber: this.screenForm.goodsOldCode,
  1126. specification: this.screenForm.model,
  1127. createStartTime: this.screenForm.createDate
  1128. ? this.screenForm.createDate[0]
  1129. : "",
  1130. createEndTime: this.screenForm.createDate
  1131. ? this.screenForm.createDate[1]
  1132. : "",
  1133. startTime: this.screenForm.deliverDate
  1134. ? this.screenForm.deliverDate[0]
  1135. : "",
  1136. endTime: this.screenForm.deliverDate
  1137. ? this.screenForm.deliverDate[1]
  1138. : "",
  1139. customerNumber: this.screenForm.jxsNum,
  1140. customerName: this.screenForm.jxsName,
  1141. id: this.screenForm.orderNum,
  1142. categoryName: this.screenForm.type,
  1143. serviceId: this.screenForm.salesMan,
  1144. k3ServiceId: this.screenForm.k3ServiceId,
  1145. mainOrderId: this.screenForm.mainOrderId,
  1146. approvalEndTime: this.screenForm.approvaTime
  1147. ? this.screenForm.approvaTime[1]
  1148. : "",
  1149. approvalStartTime: this.screenForm.approvaTime
  1150. ? this.screenForm.approvaTime[0]
  1151. : "",
  1152. correspondId: this.screenForm.correspondId.join(","),
  1153. type:this.screenForm.types
  1154. };
  1155. getListInvoiceNumber(params).then((res) => {
  1156. // console.log(res,'ii');
  1157. this.totalNum = res.data;
  1158. });
  1159. },
  1160. // 提交筛选表单
  1161. submitScreenForm() {
  1162. this.currentPage = 1;
  1163. this.getList();
  1164. },
  1165. // 重置筛选表单
  1166. resetScreenForm() {
  1167. this.$refs.screenForm.resetFields();
  1168. this.currentPage = 1;
  1169. this.getList();
  1170. },
  1171. // 更改每页数量
  1172. handleSizeChange(val) {
  1173. this.pageSize = val;
  1174. this.currentPage = 1;
  1175. this.getList();
  1176. },
  1177. // 更改当前页
  1178. handleCurrentChange(val) {
  1179. this.currentPage = val;
  1180. this.getList();
  1181. },
  1182. handleSelect(selection, row) {
  1183. this.$refs.table.toggleRowSelection(row);
  1184. this.dataList.forEach((item) => {
  1185. if (item.id === row.id) {
  1186. this.$refs.table.toggleRowSelection(item);
  1187. }
  1188. });
  1189. this.tableSelection = this.$refs.table.selection;
  1190. },
  1191. handleSelectAll(selection) {
  1192. this.tableSelection = this.$refs.table.selection;
  1193. },
  1194. // 点击打印
  1195. toPrint() {
  1196. this.queryItem = this.tableSelection;
  1197. if (!this.tableSelection[0].printNum) {
  1198. this.queryItem = this.tableSelection;
  1199. this.getDateil(this.tableSelection, "getDeliverDetail").then(res=>{
  1200. this.$endLoading()
  1201. this.$refs.preView.show(this.hiprintTemplate, this.outputData);
  1202. });
  1203. } else {
  1204. this.queryItem = this.tableSelection;
  1205. this.dialogForm.createMan = JSON.parse(
  1206. localStorage.getItem("supply_user")
  1207. ).nickName;
  1208. this.dialogForm.createDate = this.getDate();
  1209. this.isShowDialog = true;
  1210. }
  1211. },
  1212. // 关闭弹窗
  1213. cancelDialogForm() {
  1214. this.isShowDialog = false;
  1215. this.$refs.dialogForm.resetFields();
  1216. },
  1217. // 提交 弹窗
  1218. submitDialogForm() {
  1219. this.$refs.dialogForm.validate((valid) => {
  1220. if (valid) {
  1221. let params = {
  1222. shipId: this.queryItem[0].invoiceId,
  1223. password: this.dialogForm.password,
  1224. };
  1225. checkPassword(params).then((res) => {
  1226. this.getDateil(this.tableSelection, "getDeliverDetail").then(res=>{
  1227. this.$endLoading()
  1228. this.$refs.preView.show(this.hiprintTemplate, this.outputData);
  1229. });
  1230. this.cancelDialogForm();
  1231. });
  1232. }
  1233. });
  1234. },
  1235. getDate() {
  1236. var date = new Date();
  1237. var seperator1 = "-";
  1238. var year = date.getFullYear();
  1239. var month = date.getMonth() + 1;
  1240. var strDate = date.getDate();
  1241. if (month >= 1 && month <= 9) {
  1242. month = "0" + month;
  1243. }
  1244. if (strDate >= 0 && strDate <= 9) {
  1245. strDate = "0" + strDate;
  1246. }
  1247. var currentdate = year + seperator1 + month + seperator1 + strDate;
  1248. return currentdate;
  1249. },
  1250. backList() {
  1251. this.queryItem = {};
  1252. this.isShowPrint = false;
  1253. },
  1254. },
  1255. };
  1256. </script>
  1257. <style lang="scss" scoped>
  1258. .num {
  1259. display: inline-block;
  1260. font-size: 16px;
  1261. margin-left: 20px;
  1262. color: #909399;
  1263. vertical-align: middle;
  1264. }
  1265. </style>