stockPurchaseReceiptReportList.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  1. //现货采购入库报表
  2. <template>
  3. <div class="container">
  4. <el-scrollbar style="height: 100%">
  5. <el-row>
  6. <el-col style="padding-left: 15px" :span="16">
  7. <ws-button
  8. :type="searchType == 1 ? 'primary' : ''"
  9. @click="handlestatus(1)"
  10. >待审核</ws-button
  11. >
  12. <ws-button
  13. :type="searchType == 2 ? 'primary' : ''"
  14. @click="handlestatus(2)"
  15. >待结算</ws-button
  16. >
  17. <ws-button
  18. :type="searchType == 3 ? 'primary' : ''"
  19. @click="handlestatus(3)"
  20. >已结算</ws-button
  21. >
  22. <ws-button
  23. :type="searchType == '' ? 'primary' : ''"
  24. @click="handlestatus('')"
  25. >全部</ws-button
  26. >
  27. <ws-button
  28. type="primary"
  29. v-hasPermission="`report.goodsProcurementInReport.view`"
  30. @click="handleAudit()"
  31. >通过</ws-button
  32. >
  33. <ws-button
  34. type="primary"
  35. v-hasPermission="`report.goodsProcurementInReport.view`"
  36. @click="handlereject()"
  37. >驳回</ws-button
  38. >
  39. <ws-button
  40. type="primary"
  41. v-hasPermission="`report.goodsProcurementInReport.payment`"
  42. @click="handlepayment"
  43. >付款</ws-button
  44. >
  45. <ws-button
  46. type="primary"
  47. v-hasPermission="`report.goodsProcurementInReport.view`"
  48. @click="addRemarks()"
  49. >备注</ws-button
  50. >
  51. <ws-button
  52. type="primary"
  53. v-hasPermission="`report.goodsProcurementInReport.carry`"
  54. @click="dis()"
  55. >定金</ws-button
  56. >
  57. </el-col>
  58. <el-col
  59. style="text-align: right; line-height: 60px; padding-right: 10px"
  60. :span="8"
  61. >
  62. <el-select
  63. v-model="contractNo"
  64. placeholder="请选择合同"
  65. clearable
  66. filterable
  67. :filter-method="dataFilter"
  68. @change="contractchange"
  69. maxlength="500"
  70. type="input"
  71. class="findValue"
  72. >
  73. <el-option
  74. v-if="item.reportStatus"
  75. v-for="item in option"
  76. :key="item.constKey"
  77. :label="item.contractNo + '(' + item.reportStatus + ')'"
  78. :value="item.contractNo"
  79. />
  80. <el-option
  81. v-if="!item.reportStatus"
  82. v-for="item in option"
  83. :key="item.constKey"
  84. :label="item.contractNo"
  85. :value="item.contractNo"
  86. />
  87. </el-select>
  88. </el-col>
  89. </el-row>
  90. <div v-if="contractNo != ''">
  91. <span v-if="orderList.seller"
  92. >卖方: {{ orderList.seller }} </span
  93. >
  94. <span v-else>卖方:--</span>
  95. <span v-if="orderList.goodsName">货名: {{ orderList.goodsName }}</span>
  96. <span v-else>货名:--</span>
  97. <span v-if="orderList.weight"
  98. >合同重量: {{ orderList.weight }} 吨</span
  99. >
  100. <span v-else>合同重量: 0 吨</span>
  101. <span v-if="settlementWeight1"
  102. >入库量: {{ settlementWeight1 }} 吨</span
  103. >
  104. <span v-else>入库量: 0 吨</span>
  105. <span v-if="orderList.unitContractPrice"
  106. >合同单价: {{ orderList.unitContractPrice }} 元/吨</span
  107. >
  108. <span v-else>合同单价: 0 元/吨</span>
  109. <span v-if="payingMoney"
  110. >应付: {{ payingMoney }} 元</span
  111. >
  112. <span v-else>应付: 0 元</span>
  113. <span v-if="payedMoney"
  114. >已付: {{ payedMoney }} 元</span
  115. >
  116. <span v-else>已付: 0 元</span>
  117. <span v-if="payNotMoney"
  118. >未付: {{ payNotMoney }} 元</span
  119. >
  120. <span v-else>未付: 0 元</span>
  121. <span v-if="orderList.deposit"
  122. >定金: {{ orderList.deposit }} 元
  123. <!-- {{ orderList.depositUrl }} -->
  124. <img
  125. width="18"
  126. height="20"
  127. style="vertical-align: text-top; position: relative; top: -1px"
  128. src="../../../public/img/fujian.png"
  129. @click="fujian()"
  130. alt=""
  131. />
  132. <!-- <span v-if="addressUrlArray.length > 0">{{
  133. addressUrlArray.length
  134. }}</span> -->
  135. </span
  136. >
  137. <span v-else>定金: 0 元</span>
  138. </div>
  139. <el-table
  140. class="wenzi"
  141. :data="warehouseList.records"
  142. style="width: 100%; margin-top: 20px"
  143. ref="warehouseList"
  144. border
  145. :summary-method="getSummaries"
  146. show-summary
  147. @row-click="handleRowClick"
  148. @selection-change="handleSelectionChange"
  149. >
  150. <el-table-column
  151. :selectable="selectInit"
  152. type="selection"
  153. width="55"
  154. ></el-table-column>
  155. <el-table-column type="index" label="序号" width="50"></el-table-column>
  156. <el-table-column
  157. class="table_td"
  158. prop="warehouseName"
  159. width="120"
  160. label="仓库"
  161. ></el-table-column>
  162. <el-table-column
  163. class="table_td"
  164. prop="carNo"
  165. width="120"
  166. label="车牌号"
  167. ></el-table-column>
  168. <el-table-column
  169. class="table_td"
  170. prop="warehousingDate"
  171. width="100"
  172. label="入库日期"
  173. ></el-table-column>
  174. <el-table-column
  175. width="100"
  176. class="table_td"
  177. prop="grossWeight"
  178. label="毛重"
  179. ></el-table-column>
  180. <el-table-column
  181. width="100"
  182. class="table_td"
  183. prop="tare"
  184. label="皮重"
  185. ></el-table-column>
  186. <el-table-column
  187. width="100"
  188. class="table_td"
  189. prop="deductionWeight"
  190. label="扣重"
  191. ></el-table-column>
  192. <el-table-column
  193. width="100"
  194. class="table_td"
  195. prop="netWeight"
  196. label="净重"
  197. >
  198. <template slot-scope="scope">
  199. <div @click.stop='fujian1(scope.row)'>{{scope.row.netWeight}}</div>
  200. </template>
  201. </el-table-column>
  202. <el-table-column
  203. width="120"
  204. class="table_td"
  205. prop="settlementWeight"
  206. label="结算重量(吨)"
  207. >
  208. <template slot-scope="scope">
  209. <div class="inputChenge">
  210. <!-- readonly -->
  211. <el-input
  212. v-model="scope.row.settlementWeight"
  213. v-if="scope.row.identification == 'true'"
  214. ></el-input>
  215. <div v-if="scope.row.identification == 'false'" class="inputs">
  216. {{ scope.row.settlementWeight }}
  217. </div>
  218. </div>
  219. <img
  220. width="17"
  221. height="18"
  222. style="vertical-align: text-top; position: relative; top: -1px"
  223. src="../../../public/img/edit.png"
  224. @click="whether(scope.row)"
  225. v-if="scope.row.identification == 'false'"
  226. alt=""
  227. />
  228. <i
  229. class="el-icon-check"
  230. style="line-height: 29px; margin-left: 10px"
  231. v-if="scope.row.identification == 'true'"
  232. @click="varietyClick(scope.row)"
  233. ></i>
  234. <!-- <div>—</div> -->
  235. </template>
  236. </el-table-column>
  237. <el-table-column
  238. width="100"
  239. class="table_td"
  240. label="应付金额(元)"
  241. prop="amountIngPayable"
  242. ></el-table-column>
  243. <el-table-column
  244. width="100"
  245. class="table_td"
  246. label="已付金额(元)"
  247. prop="amountEdPayable"
  248. ></el-table-column>
  249. <el-table-column
  250. width="100"
  251. class="table_td"
  252. label="未付金额(元)"
  253. prop="amountNotPayable"
  254. ></el-table-column>
  255. <el-table-column
  256. class="table_td"
  257. label="付款日期"
  258. prop="paymentDate"
  259. ></el-table-column>
  260. <el-table-column label="状态" prop="status">
  261. <template slot-scope="scope">
  262. <span v-if="scope.row.approveStatus != null">{{
  263. scope.row.approveStatus
  264. }}</span>
  265. <span v-else>{{ scope.row.status }}</span>
  266. </template>
  267. </el-table-column>
  268. </el-table>
  269. <!-- 页数 -->
  270. <el-pagination
  271. @size-change="handleSizeChange"
  272. @current-change="handleCurrentChange"
  273. :current-page="currentPage"
  274. :page-size="pageSize"
  275. layout="total, sizes, prev, pager, next, jumper"
  276. :total="deptBudgetTotal"
  277. ></el-pagination>
  278. <WinseaContentModal
  279. v-model="accessoryTFs"
  280. :title="$t('system.noticeCircular.information')"
  281. @on-cancel="handleClose"
  282. >
  283. <div v-for="(item,index) in addressUrlArray" :key="index">
  284. <img width="100" height="100" :src="item" alt="">
  285. </div>
  286. </WinseaContentModal>
  287. <WinseaContentModal
  288. v-model="accessoryTFs1"
  289. :title="$t('system.noticeCircular.information')"
  290. @on-cancel="handleClose"
  291. >
  292. <img width="100" height="100" :src="appendixIdss1" alt="">
  293. </WinseaContentModal>
  294. </el-scrollbar>
  295. <el-dialog
  296. width="25%"
  297. title="付款"
  298. :visible.sync="dialogFormVisible1"
  299. :append-to-body="true"
  300. >
  301. <el-form :model="form">
  302. <el-form-item label="未付金额(元)" :label-width="formLabelWidth">
  303. <template>
  304. <span>{{ amountNotPayable }}</span>
  305. </template>
  306. </el-form-item>
  307. <el-form-item label="本次付款金额" :label-width="formLabelWidth">
  308. <el-input
  309. v-model="money"
  310. autocomplete="off"
  311. placeholder="请输入本次付款金额"
  312. class="deal"
  313. ></el-input>
  314. </el-form-item>
  315. <el-form-item
  316. label="付款日期"
  317. prop="paymentDate"
  318. :label-width="formLabelWidth"
  319. class="deal"
  320. >
  321. <ws-date-picker
  322. v-model="paymentDate"
  323. type="date"
  324. placeholder="请选择付款日期"
  325. value-format="yyyy-MM-dd"
  326. class="deal"
  327. />
  328. </el-form-item>
  329. <el-form-item label="上传付款截图" :label-width="formLabelWidth">
  330. <el-upload
  331. action="https://www.zthymaoyi.com/upload/admin"
  332. list-type="picture-card"
  333. :on-success="handlePictureCardPreview"
  334. :on-remove="handleRemove"
  335. class="photo2"
  336. >
  337. <i class="el-icon-plus"></i>
  338. </el-upload>
  339. </el-form-item>
  340. </el-form>
  341. <div slot="footer" class="dialog-footer">
  342. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  343. <el-button type="primary" @click="submitMoney()">提 交</el-button>
  344. </div>
  345. </el-dialog>
  346. <!--备注-->
  347. <el-dialog
  348. width="25%"
  349. title="备注"
  350. :visible.sync="dialogFormVisible11"
  351. :append-to-body="true"
  352. >
  353. <el-form :model="form">
  354. <div class="beizhu">
  355. <el-input
  356. v-model="remark"
  357. autocomplete="off"
  358. placeholder="备注信息,不超过1000字"
  359. class="deal"
  360. ></el-input>
  361. </div>
  362. </el-form>
  363. <div slot="footer" class="dialog-footer">
  364. <span v-if="roleFlag == 1 ">
  365. <el-button @click="dialogFormVisible11 = false">取 消</el-button>
  366. <el-button type="primary" v-hasPermission="`report.goodsProcurementInReport.edit`" @click="remarksSubmit()">保存</el-button>
  367. </span>
  368. <span v-else><el-button @click="dialogFormVisible11 = false">关 闭</el-button></span>
  369. </div>
  370. </el-dialog>
  371. <!--定金-->
  372. <el-dialog
  373. width="30%"
  374. title="定金"
  375. :visible.sync="dialogFormVisible5"
  376. :append-to-body="true"
  377. >
  378. <el-form>
  379. <el-form-item label="已付定金" :label-width="formLabelWidth">
  380. <el-input
  381. v-model="orderList.deposit"
  382. autocomplete="off"
  383. class="deal"
  384. placeholder="输入定金金额"
  385. ></el-input>
  386. </el-form-item>
  387. <el-form-item label="上传定金截图" :label-width="formLabelWidth">
  388. <el-upload
  389. action="https://www.zthymaoyi.com/upload/admin"
  390. list-type="picture-card"
  391. :on-success="handlePictureCardPreviewDis"
  392. :on-remove="handleRemoveDis"
  393. class="photo2"
  394. >
  395. <i class="el-icon-plus"></i>
  396. </el-upload>
  397. </el-form-item>
  398. </el-form>
  399. <div slot="footer" class="dialog-footer">
  400. <el-button @click="dialogFormVisible5 = false">取 消</el-button>
  401. <el-button type="primary" @click="amendconfirm">提 交</el-button>
  402. </div>
  403. </el-dialog>
  404. </div>
  405. <!-- </div> -->
  406. </template>
  407. <script>
  408. import {
  409. getStockPurchaseReceiptList,
  410. getStockPurchaseContractNoList,
  411. editSettlementWeight,
  412. addDisOrRemarks,
  413. stockPurchasePayMoney,
  414. } from '@/model/statisticalReport/index'
  415. import { downloadFile } from '@/utils/batchDown'
  416. import { posthandle } from '@/model/purchasingManagement/index'
  417. import Pagination from '@/components/Pagination'
  418. import WsUpload from '@/components/WsUpload'
  419. import { EventBus } from 'base-core-lib'
  420. export default {
  421. name: 'viewSpareMoney',
  422. components: {
  423. WsUpload,
  424. Pagination,
  425. },
  426. watch: {
  427. // vesselId(val) {
  428. // this.getList()
  429. // },
  430. isShow(val) {
  431. this.showType = val
  432. },
  433. },
  434. data() {
  435. return {
  436. checked: true,
  437. needReapply: true,
  438. dialogFormVisible1: false,
  439. dialogFormVisible5: false,
  440. dialogFormVisible11: false,
  441. dialogVisible: false,
  442. form: {
  443. transactionPrice: '',
  444. transactionsNumber: '',
  445. basis: '',
  446. },
  447. currect: true,
  448. formLabelWidth: '120px',
  449. barWidth: 0,
  450. barHeight: 0,
  451. retioX: 1,
  452. ratioY: 1,
  453. isTaped: false,
  454. isHover: false,
  455. isShow: !this.autohide,
  456. //弹出框
  457. dialogViewSpareMoney: false,
  458. contractNoList: [],
  459. // 是否显示
  460. showType: true,
  461. // 年
  462. year: '',
  463. option: [],
  464. pickerOptions: {},
  465. value2: '',
  466. deptBudgetTotal: 0,
  467. currentPage: 1,
  468. pageSize: 10,
  469. searchType: '1',
  470. searchTypeText: '未完成',
  471. searchKeyWord: '',
  472. contractType: 2,
  473. enter: {
  474. closePositionList: [],
  475. },
  476. // 提交类型
  477. submitType: true,
  478. size: 10,
  479. spanArr: [],
  480. contractNo: '',
  481. inOutTaskNo: '',
  482. compId: sessionStorage.getItem('ws-pf_compId'),
  483. roleId: sessionStorage.getItem('ws-pf_roleId'),
  484. deptCircularPage: {},
  485. warehouseList: [],
  486. orderList: {},
  487. deptBudgetList: {},
  488. id: '',
  489. pcFlag: 1,
  490. deposit: '0',
  491. stockPurchaseInfo: {
  492. id: '',
  493. settlementWeight: '',
  494. },
  495. payingMoney:'',
  496. payedMoney:'',
  497. payNotMoney:'',
  498. settlementWeight: '',
  499. settlementWeight1: '',
  500. modification: [],
  501. contractManagementInfoList: {},
  502. contractManagementInfo: {
  503. contractManagementInfoList: [],
  504. deposit: '',
  505. depositUrl: '',
  506. remark: '',
  507. id: '',
  508. },
  509. remark:'',
  510. // depositUrls: [],
  511. roleFlag: 1,
  512. money: '',
  513. paymentDate: '',
  514. stockPurchaseReceiptReportList: [],
  515. stockPurchaseReceiptReport: {
  516. stockPurchaseReceiptReportList: [],
  517. money: '',
  518. amountNotPayable: 0,
  519. amountEdPayable: 0,
  520. paymentDate: '',
  521. paymentScreenshot: '',
  522. id: '',
  523. },
  524. addressUrlArray:[],
  525. amountNotPayable: 0,
  526. amountEdPayable: 0,
  527. paymentScreenshotUrls: [],
  528. carryovercontractnolist: [],
  529. pickerBeginDateBefore: {
  530. disabledDate: (time) => {
  531. return time.getTime() > Date.now()
  532. },
  533. },
  534. accessoryTFs: false,
  535. accessoryTFs1: false,
  536. appendixIdss: [],
  537. appendixIdss1:'',
  538. }
  539. },
  540. activated() {
  541. this.getContractList()
  542. this.showType = this.isShow
  543. },
  544. methods: {
  545. //修改结算重量
  546. varietyClick(row) {
  547. if (
  548. row.settlementWeight < 0 ||
  549. row.settlementWeight > 200 ||
  550. (String(row.settlementWeight).indexOf('.') != -1 &&
  551. String(row.settlementWeight).length -
  552. (String(row.settlementWeight).indexOf('.') + 1) >
  553. 3)
  554. ) {
  555. this.$message({
  556. message: '结算重量输入错误',
  557. type: 'warning',
  558. })
  559. return
  560. }
  561. if (row.settlementWeight) {
  562. if (isNaN(row.settlementWeight)) {
  563. this.$message({
  564. message: '结算重量非数字!',
  565. type: 'warning',
  566. })
  567. return
  568. }
  569. }
  570. if (!row.settlementWeight) {
  571. this.$message({
  572. message: '结算重量不能为空!',
  573. type: 'warning',
  574. })
  575. return
  576. }
  577. this.$confirm(`确定要修改结算重量?`, {
  578. confirmButtonText: '确定',
  579. cancelButtonText: '取消',
  580. type: 'warning',
  581. })
  582. .then(() => {
  583. this.stockPurchaseInfo.id = row.id
  584. this.stockPurchaseInfo.settlementWeight = row.settlementWeight
  585. editSettlementWeight(this.stockPurchaseInfo)
  586. .toPromise()
  587. .then((response) => {
  588. this.$notify.success({
  589. title: '成功',
  590. message: '修改成功',
  591. })
  592. this.getList()
  593. })
  594. .catch((response) => {})
  595. })
  596. .catch(() => {
  597. return false
  598. })
  599. },
  600. whether(row) {
  601. row.identification = 'true'
  602. },
  603. handleRowClick(row) {
  604. if (row.approveStatus == null) {
  605. this.$refs.warehouseList.toggleRowSelection(row)
  606. return true
  607. } else if (row.approveStatus != null) {
  608. if (row.taskId == null) {
  609. return false
  610. } else {
  611. this.$refs.warehouseList.toggleRowSelection(row)
  612. return true
  613. }
  614. }
  615. },
  616. selectInit(row) {
  617. //在这里一定要记得类型匹配的上。
  618. if (row.approveStatus == null) {
  619. return true
  620. } else if (row.approveStatus != null) {
  621. if (row.taskId == null) {
  622. return false
  623. } else {
  624. return true
  625. }
  626. }
  627. },
  628. //添加定金信息
  629. dis() {
  630. this.dialogFormVisible5 = true
  631. },
  632. //定金
  633. amendconfirm() {
  634. this.$confirm(`确定提交定金信息?`, {
  635. cancelButtonText: '取消',
  636. confirmButtonText: '确定',
  637. type: 'warning',
  638. }).then(() => {
  639. for (var i = 0; i < this.contractNoList.length; i++) {
  640. if (this.contractNoList[i].contractNo == this.contractNo) {
  641. this.contractManagementInfoList.id = this.contractNoList[i].id
  642. }
  643. }
  644. this.contractManagementInfoList.deposit = this.orderList.deposit
  645. this.contractManagementInfoList.depositUrl = this.depositUrl
  646. addDisOrRemarks(this.contractManagementInfoList)
  647. .toPromise()
  648. .then((response) => {
  649. this.$message.success('修改成功')
  650. this.dialogFormVisible5 = false
  651. this.getList()
  652. })
  653. })
  654. },
  655. //定金附件
  656. fujian() {
  657. if (this.orderList.depositUrl === null || this.orderList.depositUrl === '') {
  658. EventBus.$emit(
  659. 'warning',
  660. this.$t('system.noticeCircular.NoInformation')
  661. )
  662. }
  663. this.appendixIdss = this.orderList.depositUrl
  664. this.accessoryTFs = true
  665. },
  666. //定金附件
  667. fujian1(item) {
  668. if (this.orderList.poundImg === null || this.orderList.poundImg === '') {
  669. EventBus.$emit(
  670. 'warning',
  671. this.$t('system.noticeCircular.NoInformation')
  672. )
  673. }
  674. this.appendixIdss1 = item.poundImg
  675. this.accessoryTFs1 = true
  676. },
  677. //备注
  678. addRemarks() {
  679. this.dialogFormVisible11 = true
  680. },
  681. remarksSubmit() {
  682. this.contractManagementInfo.remark = this.remark
  683. this.$confirm(`确定要保存备注信息?`, {
  684. confirmButtonText: '确定',
  685. cancelButtonText: '取消',
  686. type: 'warning',
  687. }).then(() => {
  688. for (var i = 0; i < this.contractNoList.length; i++) {
  689. if (this.contractNoList[i].contractNo == this.contractNo) {
  690. this.contractManagementInfoList.id = this.contractNoList[i].id
  691. }
  692. }
  693. this.contractManagementInfoList.remark = this.remark
  694. addDisOrRemarks(this.contractManagementInfoList)
  695. .toPromise()
  696. .then(() => {
  697. this.dialogFormVisible11 = false
  698. this.$message.success('添加备注信息成功')
  699. this.paymentManagementList = {}
  700. this.getList()
  701. })
  702. .catch(() => {
  703. return false
  704. })
  705. })
  706. },
  707. //付款
  708. handlepayment() {
  709. this.amountNotPayable = 0
  710. this.money = this.money
  711. this.stockPurchaseReceiptReportList =
  712. this.warehouseList.records[0].stockPurchaseReceiptReportList
  713. this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
  714. this.paymentDate = this.paymentDate
  715. if (this.modification.length == 0) {
  716. this.$message.warning('请选择一条要付款的条目')
  717. } else {
  718. for (var i = 0; i < this.modification.length; i++) {
  719. if (
  720. this.modification[i].status != '已通过' &&
  721. this.modification[i].status != '部分付款'
  722. ) {
  723. this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
  724. return
  725. }
  726. this.amountNotPayable += this.modification[i].amountNotPayable
  727. }
  728. this.dialogFormVisible1 = true
  729. }
  730. },
  731. submitMoney() {
  732. this.stockPurchaseReceiptReport.money = this.money
  733. this.stockPurchaseReceiptReport.paymentDate = this.paymentDate
  734. if (this.modification.length == 0) {
  735. this.$message.warning('请选择一条要付款的条目')
  736. } else {
  737. if (
  738. this.money < 0 ||
  739. (String(this.money).indexOf('.') != -1 &&
  740. String(this.money).length - (String(this.money).indexOf('.') + 1) >
  741. 2)
  742. ) {
  743. this.$message({
  744. message: '付款金额输入错误',
  745. type: 'warning',
  746. })
  747. return
  748. }
  749. if (this.money) {
  750. if (isNaN(this.money)) {
  751. this.$message({
  752. message: '付款金额非数字!',
  753. type: 'warning',
  754. })
  755. return
  756. }
  757. }
  758. if (!this.money) {
  759. this.$message({
  760. message: '付款金额不能为空!',
  761. type: 'warning',
  762. })
  763. return
  764. }
  765. if (this.money > this.modification[0].amountNotPayable) {
  766. this.$message({
  767. message: '付款金额不能大于未付金额!',
  768. type: 'warning',
  769. })
  770. return
  771. }
  772. this.$confirm(`确定提交付款信息?`, {
  773. cancelButtonText: '取消',
  774. confirmButtonText: '确定',
  775. type: 'warning',
  776. }).then(() => {
  777. stockPurchasePayMoney({
  778. stockPurchaseReceiptReportList: this.modification,
  779. amountEdPayable: this.modification[0].amountEdPayable,
  780. amountNotPayable: this.modification[0].amountNotPayable,
  781. money: this.money,
  782. paymentDate: this.paymentDate,
  783. paymentScreenshot: this.paymentScreenshot,
  784. })
  785. .toPromise()
  786. .then((response) => {
  787. this.$notify.success({
  788. title: '成功',
  789. message: '付款成功',
  790. })
  791. this.stockPurchaseReceiptReportList = {}
  792. this.money = ''
  793. // this.paymentScreenshot = ''
  794. this.paymentDate = ''
  795. this.dialogFormVisible1 = false
  796. this.getList()
  797. })
  798. .catch((response) => {
  799. console.log(response)
  800. EventBus.$emit('error', response.message)
  801. })
  802. })
  803. }
  804. },
  805. //审核
  806. handleAudit() {
  807. var that = this
  808. if (this.modification.length == 0) {
  809. this.$message.warning('请选择一条要审核的条目')
  810. } else {
  811. this.$confirm(`审核通过后,任务将发送给下一级,是否确定通过?`, {
  812. cancelButtonText: '取消',
  813. confirmButtonText: '确定',
  814. type: 'warning',
  815. }).then(() => {
  816. that.audit(this.modification[0], 0, true)
  817. })
  818. }
  819. },
  820. audit(item, index, status, status2, reason) {
  821. if (index < this.modification.length) {
  822. posthandle({
  823. taskId: item.taskId,
  824. approved: status,
  825. auditMind: reason != undefined ? '已驳回' : '无',
  826. needReapply: status2 != undefined ? true : false,
  827. })
  828. .toPromise()
  829. .then((response) => {
  830. this.audit(
  831. this.modification[index + 1],
  832. index + 1,
  833. status,
  834. status2,
  835. reason
  836. )
  837. })
  838. .catch((req) => {
  839. this.$message.warning(req.message)
  840. })
  841. } else {
  842. if (status == true) {
  843. this.$message.success('通过成功')
  844. this.getList()
  845. } else if (status == false) {
  846. this.$message.success('驳回成功')
  847. this.getList()
  848. }
  849. }
  850. },
  851. handlereject(status) {
  852. var that = this
  853. if (this.modification.length == 0) {
  854. this.$message.warning('请选择要驳回的条目')
  855. } else {
  856. this.$confirm(`是否确定驳回?`, {
  857. cancelButtonText: '取消',
  858. confirmButtonText: '确定',
  859. type: 'warning',
  860. }).then(() => {
  861. that.audit(this.modification[0], 0, false, true, '已驳回')
  862. })
  863. }
  864. },
  865. dataFilter(val) {
  866. // console.log(val,"名")
  867. this.contractNo = val
  868. // if (val) {
  869. // //val存在
  870. // this.options = this.contractNoList.filter((item) => {
  871. // if (
  872. // !!~item.contractNo.indexOf(val) ||
  873. // !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  874. // ) {
  875. // return true
  876. // }
  877. // })
  878. // } else {
  879. // //val为空时,还原数组
  880. // this.options = this.contractNoList
  881. // }
  882. },
  883. handleSelectionChange(val) {
  884. this.modification = val
  885. },
  886. handlestatus(status) {
  887. this.searchType = status
  888. this.getList()
  889. },
  890. contractchange(e) {
  891. for (var i = 0; i < this.contractNoList.length; i++) {
  892. if (this.contractNoList[i].contractNo == e) {
  893. this.orderList= this.contractNoList[i]
  894. if (this.contractNoList[i].depositUrl ) {
  895. this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
  896. } else {
  897. this.addressUrlArray = []
  898. }
  899. }
  900. }
  901. this.contractNo = e
  902. this.getList()
  903. },
  904. updated() {
  905. this.$nextTick(() => {
  906. this.$refs.warehouseList.doLayout()
  907. })
  908. },
  909. //合计
  910. getSummaries(param) {
  911. const { columns, data } = param
  912. const sums = []
  913. columns.forEach((column, index) => {
  914. if (index === 0) {
  915. sums[index] = '合计'
  916. } else if (
  917. index === 12 ||
  918. index === 11 ||
  919. index === 10 ||
  920. index === 9
  921. ) {
  922. const values = data.map((item) => Number(item[column.property]))
  923. if (!values.every((value) => isNaN(value))) {
  924. sums[index] = values.reduce((prev, curr) => {
  925. const value = Number(curr)
  926. if (!isNaN(value)) {
  927. return prev + curr
  928. } else {
  929. return prev
  930. }
  931. }, 0)
  932. } else {
  933. sums[index] = '元'
  934. }
  935. } else {
  936. sums[index] = '--'
  937. }
  938. })
  939. return sums
  940. },
  941. getList() {
  942. // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
  943. // this.roleFlag=1
  944. // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
  945. // this.roleFlag=2
  946. // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
  947. // this.roleFlag=3
  948. // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
  949. // this.roleFlag=4
  950. // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
  951. // this.roleFlag=''
  952. // }
  953. getStockPurchaseReceiptList({
  954. compId: sessionStorage.getItem('ws-pf_compId'),
  955. currentPage: this.currentPage,
  956. pageSize: this.pageSize,
  957. searchType: this.searchType,
  958. contractNo: this.contractNo,
  959. // roleFlag: this.roleFlag,
  960. })
  961. .toPromise()
  962. .then((response) => {
  963. this.payingMoney = 0
  964. this.payedMoney = 0
  965. this.payNotMoney = 0
  966. this.settlementWeight1 = 0
  967. for (var i = 0; i < response.records.length; i++) {
  968. response.records[i].identification = 'false'
  969. this.payingMoney += response.records[i].amountIngPayable
  970. this.payedMoney += response.records[i].amountEdPayable
  971. this.payNotMoney += response.records[i].amountNotPayable
  972. this.settlementWeight1 += response.records[i].settlementWeight
  973. }
  974. this.deptBudgetTotal = response.total
  975. this.warehouseList = response
  976. })
  977. },
  978. getContractList(){
  979. getStockPurchaseContractNoList({
  980. compId: sessionStorage.getItem('ws-pf_compId'),
  981. currentPage: this.currentPage,
  982. pageSize: this.pageSize,
  983. roleFlag: this.roleFlag,
  984. contractNo: this.contractNo,
  985. })
  986. .toPromise()
  987. .then((response) => {
  988. this.contractNoList = response
  989. this.option = this.contractNoList
  990. this.contractNo = this.option[0].contractNo
  991. this.contractchange(this.contractNo)
  992. this.getList()
  993. })
  994. },
  995. handleRemove(file) {
  996. console.log(file)
  997. },
  998. handlePictureCardPreview(file) {
  999. this.paymentScreenshot = file.url
  1000. this.dialogVisible = true
  1001. },
  1002. // handleDownload(file) {
  1003. // console.log(file)
  1004. // },
  1005. handlePictureCardPreviewDis(file) {
  1006. this.depositUrl = file.url
  1007. this.dialogVisible = true
  1008. },
  1009. handleRemoveDis(file) {
  1010. console.log(file)
  1011. },
  1012. getSpanArr(data) {
  1013. let that = this
  1014. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  1015. that.spanArr = []
  1016. that.pos = 0
  1017. // //遍历数据
  1018. data.forEach((item, index) => {
  1019. //判断是否是第一项
  1020. if (index === 0) {
  1021. this.spanArr.push(1)
  1022. this.pos = 0
  1023. } else {
  1024. //不是第一项时,就根据标识去存储
  1025. if (data[index].warehouseNumViewList.length > 1) {
  1026. 查找到符合条件的数据时每次要把之前存储的数据 + 1
  1027. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  1028. this.spanArr.push(0)
  1029. } else {
  1030. // 没有符合的数据时,要记住当前的index
  1031. this.spanArr.push(1)
  1032. this.pos = index
  1033. }
  1034. }
  1035. })
  1036. },
  1037. dateFormat(fmt, date) {
  1038. let ret
  1039. const opt = {
  1040. 'Y+': date.getFullYear().toString(), // 年
  1041. 'm+': (date.getMonth() + 1).toString(), // 月
  1042. 'd+': date.getDate().toString(), // 日
  1043. 'H+': date.getHours().toString(), // 时
  1044. // "M+": date.getMinutes().toString(), // 分
  1045. // "S+": date.getSeconds().toString() // 秒
  1046. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  1047. }
  1048. for (let k in opt) {
  1049. ret = new RegExp('(' + k + ')').exec(fmt)
  1050. if (ret) {
  1051. fmt = fmt.replace(
  1052. ret[1],
  1053. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  1054. )
  1055. }
  1056. }
  1057. return fmt
  1058. },
  1059. handleClose() {
  1060. this.accessoryTFs = false
  1061. },
  1062. handleSizeChange(val) {
  1063. console.log(`每页 ${val} 条`)
  1064. this.pageSize = val
  1065. this.getList()
  1066. },
  1067. handleCurrentChange(val) {
  1068. this.currentPage = val
  1069. console.log(`当前页: ${val}`)
  1070. this.getList()
  1071. },
  1072. // handleExamine(row) {
  1073. // this.$router.push({
  1074. // name: 'salesContractExamine',
  1075. // query: { id: row.id },
  1076. // })
  1077. // },
  1078. // 关闭 dialog时 处理文件url 初始化upload组件
  1079. handleCloe() {
  1080. this.dialogViewSpareMoney = false
  1081. },
  1082. //查找
  1083. find() {
  1084. this.currentPage = 1
  1085. this.getList()
  1086. },
  1087. async exportlist() {
  1088. const { data } = await export1(
  1089. {
  1090. compId: sessionStorage.getItem('ws-pf_compId'),
  1091. contractType: this.contractType,
  1092. currentPage: this.currentPage,
  1093. pageSize: this.pageSize,
  1094. searchType: this.searchType,
  1095. searchKeyWord: this.searchKeyWord,
  1096. startDate: this.startDate,
  1097. endDate: this.endDate,
  1098. },
  1099. {},
  1100. { responseType: 'blob' }
  1101. ).toPromise()
  1102. downloadFile({
  1103. res: data,
  1104. fileName: `${
  1105. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  1106. }_采购合同`,
  1107. type: 'xls',
  1108. })
  1109. },
  1110. total() {},
  1111. },
  1112. }
  1113. </script>
  1114. <style lang="scss" scoped>
  1115. .connert {
  1116. width: 90%;
  1117. margin: 0 auto;
  1118. }
  1119. .vertical-text-left {
  1120. width: 62px;
  1121. text-align: right;
  1122. }
  1123. //分页
  1124. .el-pagination {
  1125. padding: 10px 15px;
  1126. margin-bottom: 0;
  1127. text-align: center;
  1128. }
  1129. /deep/.el-pager li.active {
  1130. color: #5878e8;
  1131. cursor: default;
  1132. }
  1133. /deep/.el-pager li:hover {
  1134. color: #5878e8;
  1135. cursor: default;
  1136. }
  1137. .el-button--default {
  1138. color: #8890b1;
  1139. border-color: #e8eaf1;
  1140. }
  1141. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  1142. width: 30px;
  1143. margin-left: 0;
  1144. border-top-left-radius: 0px;
  1145. border-bottom-left-radius: 0px;
  1146. }
  1147. /deep/.findValue .el-input__inner {
  1148. border-top-right-radius: 0px;
  1149. border-bottom-right-radius: 0px;
  1150. width: 385px;
  1151. }
  1152. .completed.el-button--default {
  1153. border-color: #5878e8;
  1154. background-color: #f6f7fc;
  1155. color: #5878e8;
  1156. }
  1157. .putstorage.el-button--default,
  1158. .deliverystorage.el-button--default {
  1159. border-color: #8890b1;
  1160. background-color: #fff;
  1161. color: #8890b1;
  1162. }
  1163. /deep/.el-table td,
  1164. /deep/.el-table th.is-leaf {
  1165. border-right: 1px solid #e9ecf7;
  1166. text-align: center;
  1167. }
  1168. /deep/.el-table tr td:first-child,
  1169. /deep/.el-table tr th.is-leaf:first-child {
  1170. border-left: 1px solid #e9ecf7;
  1171. }
  1172. .record,
  1173. .adjustment {
  1174. display: inline-block;
  1175. color: #5878e8;
  1176. padding: 0 4px !important;
  1177. position: relative;
  1178. }
  1179. .record:after {
  1180. position: absolute;
  1181. content: '';
  1182. display: block;
  1183. top: 5px;
  1184. right: -2px;
  1185. width: 1px;
  1186. height: 12px;
  1187. background: #e9ecf7;
  1188. }
  1189. // .el-row{
  1190. // height: 150px;
  1191. // }
  1192. .base_header_layout .grid-content {
  1193. margin-top: 80px;
  1194. }
  1195. .el-input--small .el-input__inner {
  1196. margin-left: 20px;
  1197. }
  1198. .el-range-editor--small.el-input__inner {
  1199. height: 32px;
  1200. margin-left: -20%;
  1201. }
  1202. //执行样式
  1203. .executory,
  1204. .inExecution,
  1205. .done {
  1206. width: 6px;
  1207. height: 6px;
  1208. display: inline-block;
  1209. border-radius: 50%;
  1210. position: relative;
  1211. top: -1px;
  1212. font-size: 14px;
  1213. }
  1214. .executory {
  1215. background: #ff9f24;
  1216. }
  1217. .inExecution {
  1218. background: #5878e8;
  1219. }
  1220. .done {
  1221. background: #50cad4;
  1222. }
  1223. .record,
  1224. .adjustment {
  1225. display: inline-block;
  1226. color: #5878e8;
  1227. padding: 0 4px !important;
  1228. position: relative;
  1229. font-size: 14px;
  1230. }
  1231. .container {
  1232. overflow: scroll;
  1233. height: 93vh;
  1234. }
  1235. .button-container {
  1236. display: flex;
  1237. flex-wrap: nowrap;
  1238. justify-content: space-between;
  1239. align-items: center;
  1240. background-color: #fff;
  1241. width: 100%;
  1242. height: 50px;
  1243. padding: 0 10px;
  1244. & > div {
  1245. margin-left: 10px;
  1246. display: flex;
  1247. flex-wrap: nowrap;
  1248. flex-direction: row;
  1249. & > span {
  1250. line-height: 50px;
  1251. }
  1252. }
  1253. /deep/.auditFlow-box {
  1254. position: unset;
  1255. margin-left: 10px;
  1256. &/deep/.auditFlow-icon {
  1257. width: auto;
  1258. padding-right: 30px;
  1259. }
  1260. &/deep/.auditFlow-main {
  1261. position: absolute;
  1262. }
  1263. }
  1264. }
  1265. .bg-left {
  1266. padding-left: 30px;
  1267. }
  1268. .title {
  1269. position: relative;
  1270. }
  1271. .title::before {
  1272. content: '';
  1273. display: inline-block;
  1274. width: 5px;
  1275. height: 30px;
  1276. background: #5473e8;
  1277. position: absolute;
  1278. left: 0;
  1279. }
  1280. .el-button--primary {
  1281. background-color: #5878e8;
  1282. border-color: #5878e8;
  1283. // margin-left: 85%;
  1284. margin-top: 13px;
  1285. }
  1286. //导航条样式
  1287. .el-col-12 {
  1288. width: 50%;
  1289. height: 60px;
  1290. background: #f6f7fc;
  1291. border-radius: 4px 4px 1px 1px;
  1292. }
  1293. .el-input--small .el-input__inner {
  1294. height: 32px;
  1295. line-height: 32px;
  1296. width: 385px;
  1297. margin-top: 10px;
  1298. }
  1299. .bg-bottom {
  1300. margin-left: 85%;
  1301. }
  1302. .but {
  1303. margin-left: 30%;
  1304. /* margin-top: -32px; */
  1305. overflow: auto;
  1306. /* float: left; */
  1307. /* margin-left: 1px; */
  1308. margin-left: -10px;
  1309. }
  1310. .el-input--small {
  1311. font-size: 13px;
  1312. width: 390px;
  1313. margin-left: 38%;
  1314. }
  1315. /deep/.el-table .el-table__header .cell,
  1316. .el-table .el-table__body .cell {
  1317. text-align: center;
  1318. }
  1319. .el-scrollbar__wrap {
  1320. overflow-y: hidden;
  1321. }
  1322. /deep/.deal {
  1323. margin-left: 0%;
  1324. width: 64%;
  1325. }
  1326. .photo {
  1327. padding: 0% 34%;
  1328. }
  1329. .photo1 {
  1330. padding: 0 10%;
  1331. }
  1332. .photo2 {
  1333. padding: 0 12%;
  1334. }
  1335. /deep/.el-form-item--small .el-form-item__label,
  1336. .el-form-item--small .el-form-item__content {
  1337. text-align: center;
  1338. }
  1339. hr {
  1340. width: 91%;
  1341. }
  1342. /deep/.deaal {
  1343. width: 66%;
  1344. margin-left: 9%;
  1345. }
  1346. .el-date-editor.el-input,
  1347. .el-date-editor.el-input__inner,
  1348. .el-input-number--small {
  1349. width: 123% !important;
  1350. }
  1351. /deep/.el-table td,
  1352. .el-table th.is-leaf {
  1353. border-right: 1px solid #e9ecf7;
  1354. text-align: center;
  1355. height: 40px;
  1356. }
  1357. .inputChenge {
  1358. width: 100%;
  1359. display: inline-flex;
  1360. margin-left: -28%;
  1361. }
  1362. .inputs {
  1363. margin: 0 auto;
  1364. }
  1365. /deep/.beizhu .el-input--small .el-input__inner {
  1366. height: 220px;
  1367. line-height: 28px;
  1368. width: 430px;
  1369. margin-left: 15px;
  1370. }
  1371. </style>