sum_list.vue 40 KB

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