stockSaleOutReportList.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  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 type="primary" v-hasPermission="`report.goodsSaleOutReport.view`" @click="adopt()">备注
  8. </ws-button>
  9. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.view`" @click="depositbutton()">定金
  10. </ws-button>
  11. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.payment`" @click="handlecollect()">收款
  12. </ws-button>
  13. </el-col>
  14. <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
  15. <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable
  16. @change="contractchange" maxlength="500" type="input" class="findValue">
  17. <el-option v-if="item.reportStatus" v-for="item in options" :key="item.constKey"
  18. :label="item.contractNo + '(' + item.reportStatus + ')'" :value="item.contractNo" />
  19. <!-- <el-option v-if="!item.reportStatus" v-for="item in options" :key="item.constKey"
  20. :label="item.contractNo" :value="item.contractNo" /> -->
  21. </el-select>
  22. </el-col>
  23. </el-row>
  24. <div v-if="contractNo != ''">
  25. <span v-if="orderList.buyer">买方: {{ orderList.buyer }} </span>
  26. <span v-else>买方: </span>
  27. </div>
  28. <div v-if="contractNo != ''">
  29. <span v-if="orderList.goodsName">货名: {{ orderList.goodsName }} </span>
  30. <span v-else>货名: </span>
  31. <span v-if="orderList.weight">合同重量: {{ orderList.weight }} 吨</span>
  32. <span v-else>合同重量: 0 吨</span>
  33. <span v-if="outboundVolume">出库量: {{ outboundVolume }} 吨</span>
  34. <span v-else>出库量: 0 吨</span>
  35. <span v-if="orderList.unitContractPrice">合同单价: {{ orderList.unitContractPrice }} 元/吨</span>
  36. <span v-else>合同单价: 0 元/吨</span>
  37. <span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(2) }} 元</span>
  38. <span v-else>应收: 0 元</span>
  39. <span v-if="amountReceived">已收: {{ amountReceived.toFixed(2) }} 元
  40. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  41. src="../../../public/img/fujian.png" @click="fujian1()" alt="" />
  42. </span>
  43. <span v-else>已收: 0 元</span>
  44. <span v-if="uncollectedAmount">未收: {{ uncollectedAmount.toFixed(2) }} 元</span>
  45. <span v-else>未收: 0 元</span>
  46. <span v-if="orderList.deposit">定金: {{ orderList.deposit }} 元
  47. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  48. src="../../../public/img/fujian.png" @click="fujian()" alt="" />
  49. </span>
  50. <span v-else>定金: 0 元</span>
  51. </div>
  52. <el-table class="wenzi" :data="saleList.records" style="width: 100%; margin-top: 20px" ref="saleList" border
  53. :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange">
  54. <el-table-column type="index" label="序号" width="50"></el-table-column>
  55. <el-table-column class="table_td" prop="warehouseName" label="仓库"></el-table-column>
  56. <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
  57. <el-table-column class="table_td" prop="deliveryDate" label="出库日期">
  58. <template slot-scope="scope">
  59. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.returnDate}}</span>
  60. <span v-if="scope.row.returnFlag == null">{{scope.row.deliveryDate }}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column class="table_td" prop="grossWeight" label="毛重(吨)"></el-table-column>
  64. <el-table-column class="table_td" prop="tare" label="皮重(吨)"></el-table-column>
  65. <el-table-column class="table_td" prop="netWeight" label="净重(吨)">
  66. <template slot-scope="scope">
  67. <span style="color: #ce4545;" @click='fujian2(scope.row)'
  68. v-if="scope.row.returnFlag == 1">{{scope.row.netWeight}}(退)</span>
  69. <span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
  73. <template slot-scope="scope">
  74. <div class="inputChenge">
  75. <el-input v-model="scope.row.settlementWeight" v-if="scope.row.identification == 'true'">
  76. </el-input>
  77. <div v-if="scope.row.identification == 'false'" class="inputs">
  78. <span style="color: #ce4545;"
  79. v-if="scope.row.returnFlag == 1">{{scope.row.settlementWeight}}</span>
  80. <span v-if="scope.row.returnFlag == null">{{scope.row.settlementWeight }}</span>
  81. </div>
  82. </div>
  83. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
  84. src="../../../public/img/edit.png" @click="whether(scope.row)"
  85. v-if="scope.row.identification == 'false'" alt="" />
  86. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  87. v-if="scope.row.identification == 'true'" @click="weightClick(scope.row)"></i>
  88. </template>
  89. </el-table-column>
  90. <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
  91. <template slot-scope="scope">
  92. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. <!-- 页数 -->
  97. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  98. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  99. :total="deptBudgetTotal"></el-pagination>
  100. </el-scrollbar>
  101. <!-- 定金弹窗 -->
  102. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  103. @on-cancel="handleClose">
  104. <div v-for="(item,index) in addressUrlArray" :key="index">
  105. <img width="100" height="100" :src="item" alt="">
  106. </div>
  107. </WinseaContentModal>
  108. <!-- 已收弹窗 -->
  109. <WinseaContentModal v-model="accessoryTFs1" :title="$t('system.noticeCircular.information')"
  110. @on-cancel="handleClose1">
  111. <div style="display: flex;">
  112. <div v-for="(item,index) in addressUrlArray1" :key="index" style="display:flex;">
  113. <img width="100" height="100" :src="item" alt="">
  114. <!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/f43f512136a544d3bbcef0fa4259d274.png" alt=""> -->
  115. </div>
  116. </div>
  117. </WinseaContentModal>
  118. <WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
  119. @on-cancel="handleClose">
  120. <img width="100" height="100" :src="appendixIdss2" alt="">
  121. </WinseaContentModal>
  122. <!-- 收款 -->
  123. <el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
  124. <el-form :model="form">
  125. <el-form-item label="未收金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
  126. <span>{{ uncollectedAmount }}</span>
  127. </el-form-item>
  128. <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
  129. <el-input v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
  130. </el-form-item>
  131. <el-form-item label="收款日期" prop="collectionDate" :label-width="formLabelWidth" class="deal">
  132. <ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"
  133. class="deal" />
  134. </el-form-item>
  135. <el-form-item label="上传收款截图" :label-width="formLabelWidth">
  136. <el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
  137. :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
  138. <i class="el-icon-plus"></i>
  139. </el-upload>
  140. </el-form-item>
  141. </el-form>
  142. <div slot="footer" class="dialog-footer">
  143. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  144. <el-button v-hasPermission="`report.goodsSaleOutReport.payment`" type="primary" @click="collectment()">提 交</el-button>
  145. </div>
  146. </el-dialog>
  147. <!-- 定金 -->
  148. <el-dialog width="25%" title="定金" :visible.sync="dialogFormVisible2" :append-to-body="true">
  149. <el-form :model="form">
  150. <el-form-item label="已收定金(元)" :label-width="formLabelWidth">
  151. <el-input v-model="orderList.deposit" autocomplete="off" placeholder="输入定金金额" class="deal"></el-input>
  152. </el-form-item>
  153. <el-form-item label="上传定金截图" :label-width="formLabelWidth">
  154. <el-upload action="https://www.zthymaoyi.com/upload/admin" :limit='1' list-type="picture-card"
  155. :on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
  156. <i class="el-icon-plus"></i>
  157. </el-upload>
  158. </el-form-item>
  159. </el-form>
  160. <div slot="footer" class="dialog-footer">
  161. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  162. <el-button type="primary" @click="depositSubmit()">提 交</el-button>
  163. </div>
  164. </el-dialog>
  165. <!--备注-->
  166. <el-dialog width="25%" title="备注" :visible.sync="collectForm1" :append-to-body="true">
  167. <el-form :model="form">
  168. <div class="beizhu">
  169. <el-input v-model="orderList.remark" autocomplete="off" placeholder="备注信息,不超过1000字" class="deal"></el-input>
  170. </div>
  171. </el-form>
  172. <div slot="footer" class="dialog-footer">
  173. <el-button @click="collectForm1 = false">关闭</el-button>
  174. <el-button v-hasPermission="`report.goodsSaleOutReport.carry`" type="primary" @click="adoptRemarks()">保存</el-button>
  175. </div>
  176. </el-dialog>
  177. </div>
  178. <!-- </div> -->
  179. </template>
  180. <script>
  181. import {
  182. getStockSaleReceiptList,
  183. getStockSaleContractNoList,
  184. stockSaleCollectMoney,
  185. disOrRemarks,
  186. saleEditSettlementWeight,
  187. } from '@/model/statisticalReport/index'
  188. import Pagination from '@/components/Pagination'
  189. import WsUpload from '@/components/WsUpload'
  190. import {
  191. EventBus
  192. } from 'base-core-lib'
  193. export default {
  194. name: 'viewSpareMoney',
  195. components: {
  196. WsUpload,
  197. Pagination,
  198. },
  199. watch: {
  200. vesselId(val) {
  201. this.getList()
  202. },
  203. isShow(val) {
  204. this.showType = val
  205. },
  206. },
  207. data() {
  208. return {
  209. dialogFormVisible1: false,
  210. dialogFormVisible2: false,
  211. amountEdReceivable: 0,
  212. amountNotReceivable: 0,
  213. deptBudgetList: {},
  214. //分页
  215. currentPage: 1,
  216. pageSize: 10,
  217. allmoney1: 0,
  218. deptCircularPage: {},
  219. deptBudgetTotal: 0,
  220. stockSaleReceiptReportList: [],
  221. stockSaleReceiptReport: {
  222. stockSaleReceiptReportList: [],
  223. money: '',
  224. amountEdReceivable: 0,
  225. amountNotReceivable: 0,
  226. collectionDate: '',
  227. id: '',
  228. invoiceType: '',
  229. },
  230. orderList: {},
  231. options: [],
  232. contractNoList: [],
  233. contractNo: '',
  234. dialogVisible: false,
  235. form: {},
  236. compId: sessionStorage.getItem('ws-pf_compId'),
  237. collectForm: false,
  238. collectForm1: false,
  239. managementType: 3,
  240. money: 0,
  241. // id:'',
  242. collectmoney: 0,
  243. remark: '',
  244. remarkInformationList: {},
  245. remarkInformation: {
  246. remarkInformationList: [],
  247. id: '',
  248. remark: '',
  249. deposit: '0',
  250. depositUrl: '',
  251. },
  252. deposit: '0',
  253. depositUrl: [],
  254. saleList: [],
  255. amountReceivable: '',
  256. amountReceived: '',
  257. uncollectedAmount: '',
  258. outboundVolume: '',
  259. collectionDate: '',
  260. collectionScreenshot: '',
  261. amountEdCollectionable: '',
  262. actualCollectionment: '',
  263. // collectDate: '',
  264. calculationCollectable: '',
  265. searchType: '',
  266. searchTypeText: '',
  267. formLabelWidth: '120px',
  268. searchKeyWord: '',
  269. value1: '', //收款日期
  270. modification: [],
  271. accessoryTFs: false,
  272. appendixIdss: [],
  273. accessoryTFs1: false,
  274. appendixIdss1: [],
  275. appendixIdss2:'',
  276. accessoryTFs2: false,
  277. addressUrlArray: [],
  278. addressUrlArray1: [],
  279. }
  280. },
  281. activated() {
  282. var now = new Date();
  283. var year = now.getFullYear(); //得到年份
  284. var month = now.getMonth(); //得到月份
  285. var date = now.getDate(); //得到日期
  286. month = month + 1;
  287. month = month.toString().padStart(2, "0");
  288. date = date.toString().padStart(2, "0");
  289. this.collectionDate = `${year}-${month}-${date}`;
  290. this.getList()
  291. this.showType = this.isShow
  292. },
  293. methods: {
  294. //表头
  295. contractchange(e) {
  296. for (var i = 0; i < this.contractNoList.length; i++) {
  297. if (this.contractNoList[i].contractNo == e) {
  298. this.orderList = this.contractNoList[i]
  299. if (this.contractNoList[i].depositUrl) {
  300. this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
  301. } else {
  302. this.addressUrlArray = []
  303. }
  304. }
  305. }
  306. this.contractNo = e
  307. this.getList()
  308. },
  309. //选择合同
  310. dataFilter(val) {
  311. this.contractNo = val
  312. if (val) {
  313. //val存在
  314. this.options = this.contractNoList.filter(item => {
  315. if (
  316. !!~item.contractNo.indexOf(val) ||
  317. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  318. ) {
  319. return true
  320. }
  321. })
  322. } else {
  323. //val为空时,还原数组
  324. this.options = this.contractNoList
  325. }
  326. },
  327. //修改结算重量
  328. whether(row) {
  329. row.identification = 'true'
  330. },
  331. weightClick(row) {
  332. if (
  333. row.settlementWeight > 200 ||
  334. row.settlementWeight < 1 ||
  335. (String(row.settlementWeight).indexOf(
  336. '.'
  337. ) != -1 &&
  338. String(row.settlementWeight).length -
  339. (String(row.settlementWeight).indexOf(
  340. '.'
  341. ) +
  342. 1) >
  343. 3)
  344. ) {
  345. this.$message({
  346. message: '结算重量输入错误',
  347. type: 'warning',
  348. })
  349. return
  350. }
  351. this.$confirm(`确定要修改结算重量?`, {
  352. confirmButtonText: '确定',
  353. cancelButtonText: '取消',
  354. type: 'warning',
  355. })
  356. .then(() => {
  357. saleEditSettlementWeight({
  358. settlementWeight: row.settlementWeight,
  359. id: row.id,
  360. })
  361. .toPromise()
  362. .then((response) => {
  363. this.$notify.success({
  364. title: '成功',
  365. message: '结算重量修改成功',
  366. })
  367. this.getList()
  368. })
  369. .catch(() => {
  370. return false
  371. })
  372. })
  373. },
  374. //备注信息
  375. adopt() {
  376. this.collectForm1 = true
  377. },
  378. adoptRemarks() {
  379. // this.remarkInformation.remark = this.orderList.remark
  380. this.$confirm(`确定要保存备注信息?`, {
  381. confirmButtonText: '确定',
  382. cancelButtonText: '取消',
  383. type: 'warning',
  384. })
  385. .then(() => {
  386. for (var i = 0; i < this.contractNoList.length; i++) {
  387. if (this.contractNoList[i].contractNo == this.contractNo) {
  388. this.remarkInformationList.id = this.contractNoList[i].id
  389. }
  390. }
  391. this.remarkInformationList.remark = this.orderList.remark
  392. disOrRemarks(this.remarkInformationList)
  393. .toPromise()
  394. .then(() => {
  395. this.collectForm1 = false
  396. this.$message.success('添加备注信息成功')
  397. this.remarkInformationList = {}
  398. this.getList()
  399. })
  400. .catch(() => {
  401. return false
  402. })
  403. })
  404. },
  405. selectInit(row) {
  406. //在这里一定要记得类型匹配的上。
  407. if (row.approveStatus == null) {
  408. return true
  409. } else if (row.approveStatus != null) {
  410. if (row.taskId == null) {
  411. return false
  412. } else {
  413. return true
  414. }
  415. }
  416. },
  417. handleSelectionChange(val) {
  418. this.modification = val
  419. },
  420. //合计
  421. getSummaries(param) {
  422. const {
  423. columns,
  424. data
  425. } = param
  426. const sums = []
  427. columns.forEach((column, index) => {
  428. if (index === 0) {
  429. sums[index] = '合计'
  430. } else if (
  431. index === 7 ||
  432. index === 8
  433. ) {
  434. const values = data.map((item) => Number(item[column.property]))
  435. if (!values.every((value) => isNaN(value))) {
  436. sums[index] = values.reduce((prev, curr) => {
  437. const value = Number(curr)
  438. if (!isNaN(value)) {
  439. return prev + curr
  440. } else {
  441. return prev
  442. }
  443. }, 0)
  444. } else {
  445. sums[index] = '元'
  446. }
  447. } else {
  448. sums[index] = '--'
  449. }
  450. })
  451. sums[sums.length-1]=sums[sums.length-1].toFixed(2)
  452. sums[sums.length-2]=sums[sums.length-2].toFixed(2)
  453. return sums
  454. },
  455. //定金
  456. depositbutton() {
  457. this.dialogFormVisible2 = true
  458. },
  459. depositSubmit() {
  460. this.remarkInformation.deposit = this.orderList.deposit
  461. this.remarkInformation.depositUrl = this.depositUrl
  462. this.$confirm(`确定提交定金信息?`, {
  463. cancelButtonText: '取消',
  464. confirmButtonText: '确定',
  465. type: 'warning',
  466. }).then(() => {
  467. for (var i = 0; i < this.contractNoList.length; i++) {
  468. if (this.contractNoList[i].contractNo == this.contractNo) {
  469. this.remarkInformationList.id = this.contractNoList[i].id
  470. }
  471. }
  472. this.remarkInformationList.deposit = this.orderList.deposit
  473. this.remarkInformationList.depositUrl = this.depositUrl.toString()
  474. disOrRemarks(this.remarkInformationList)
  475. .toPromise()
  476. .then((response) => {
  477. this.$notify.success({
  478. title: '成功',
  479. message: '定金成功',
  480. })
  481. this.remarkInformationList = {}
  482. this.dialogFormVisible2 = false
  483. this.getList()
  484. })
  485. .catch((response) => {
  486. console.log(response)
  487. EventBus.$emit('error', response.message)
  488. })
  489. })
  490. },
  491. //定金附件
  492. fujian() {
  493. if (this.orderList.depositUrl === null || this.orderList.depositUrl === '') {
  494. EventBus.$emit(
  495. 'warning',
  496. this.$t('system.noticeCircular.NoInformation')
  497. )
  498. }
  499. this.appendixIdss = this.orderList.depositUrl
  500. this.accessoryTFs = true
  501. },
  502. fujian2(item) {
  503. if (item.poundImg === null || item.poundImg === '') {
  504. EventBus.$emit(
  505. 'warning',
  506. this.$t('system.noticeCircular.NoInformation')
  507. )
  508. }
  509. this.appendixIdss2 = item.poundImg
  510. this.accessoryTFs2 = true
  511. },
  512. handleClose() {
  513. this.accessoryTFs = false
  514. },
  515. //已收附件
  516. fujian1() {
  517. if (this.addressUrlArray1.length == 0) {
  518. EventBus.$emit(
  519. 'warning',
  520. this.$t('system.noticeCircular.NoInformation')
  521. )
  522. } else {
  523. this.appendixIdss1 = this.collectionScreenshot
  524. this.accessoryTFs1 = true
  525. }
  526. },
  527. handleClose1() {
  528. this.accessoryTFs1 = false
  529. },
  530. //收款
  531. handlecollect() {
  532. this.amountEdReceivable = this.saleList.records[0].amountEdReceivable
  533. this.amountNotReceivable = this.saleList.records[0].amountNotReceivable
  534. this.stockSaleReceiptReportList = this.saleList.records
  535. this.dialogFormVisible1 = true
  536. },
  537. collectment() {
  538. this.stockSaleReceiptReport.money = this.money
  539. this.stockSaleReceiptReport.collectionDate = this.collectionDate
  540. if (
  541. this.money < 0 ||
  542. (String(this.money).indexOf('.') != -1 &&
  543. String(this.money).length - (String(this.money).indexOf('.') + 1) >
  544. 2)
  545. ) {
  546. this.$message({
  547. message: '收款金额输入错误',
  548. type: 'warning',
  549. })
  550. return
  551. }
  552. if (this.money) {
  553. if (isNaN(this.money)) {
  554. this.$message({
  555. message: '收款金额非数字!',
  556. type: 'warning',
  557. })
  558. return
  559. }
  560. }
  561. if (!this.money) {
  562. this.$message({
  563. message: '收款金额不能为空!',
  564. type: 'warning',
  565. })
  566. return
  567. }
  568. if (this.money > this.uncollectedAmount) {
  569. this.$message({
  570. message: '收款金额不能大于未收金额!',
  571. type: 'warning',
  572. })
  573. return
  574. }
  575. this.$confirm(`确定提交收款信息?`, {
  576. cancelButtonText: '取消',
  577. confirmButtonText: '确定',
  578. type: 'warning',
  579. }).then(() => {
  580. stockSaleCollectMoney({
  581. stockSaleReceiptReportList: this.stockSaleReceiptReportList,
  582. amountEdReceivable: this.amountEdReceivable,
  583. amountNotReceivable: this.amountNotReceivable,
  584. money: this.money,
  585. collectionDate: this.collectionDate,
  586. collectionScreenshot: this.collectionScreenshot,
  587. })
  588. .toPromise()
  589. .then((response) => {
  590. this.$notify.success({
  591. title: '成功',
  592. message: '收款成功',
  593. })
  594. this.stockSaleReceiptReportList = {}
  595. this.money = ''
  596. this.collectionDate = ''
  597. this.collectionScreenshot = ''
  598. this.$refs.upload.clearFiles()
  599. this.dialogFormVisible1 = false
  600. this.getList()
  601. })
  602. .catch((response) => {
  603. console.log(response)
  604. EventBus.$emit('error', response.message)
  605. })
  606. })
  607. },
  608. //列表
  609. getList() {
  610. getStockSaleReceiptList({
  611. compId: sessionStorage.getItem('ws-pf_compId'),
  612. currentPage: this.currentPage,
  613. pageSize: this.pageSize,
  614. searchType: this.searchType,
  615. contractNo: this.contractNo,
  616. })
  617. .toPromise()
  618. .then((response) => {
  619. this.amountReceivable = 0
  620. this.amountReceived = 0
  621. this.uncollectedAmount = 0
  622. this.outboundVolume = 0
  623. let num = []
  624. for (var i = 0; i < response.records.length; i++) {
  625. response.records[i].identification = 'false'
  626. this.amountReceivable += response.records[i].amountIngReceivable
  627. this.amountReceived += response.records[i].amountEdReceivable
  628. this.uncollectedAmount += response.records[i].amountNotReceivable
  629. this.outboundVolume += response.records[i].settlementWeight
  630. // this.addressUrlArray1.push(response.records[i].collectionScreenshot.split('$'))
  631. if(response.records[i].collectionScreenshot!=null){
  632. num = response.records[i].collectionScreenshot.split('$')
  633. for (let j = 0; j < num.length; j++) {
  634. if (num[j] != '') {
  635. if (this.addressUrlArray1.indexOf(num[j]) == -1) {
  636. this.addressUrlArray1.push(num[j])
  637. }
  638. }
  639. }
  640. }
  641. }
  642. this.deptBudgetTotal = response.total
  643. this.saleList = response
  644. })
  645. getStockSaleContractNoList({
  646. compId: sessionStorage.getItem('ws-pf_compId'),
  647. currentPage: this.currentPage,
  648. pageSize: this.pageSize,
  649. roleFlag: this.roleFlag,
  650. })
  651. .toPromise()
  652. .then((response) => {
  653. this.contractNoList = response
  654. // this.contractNoList.unshift({})
  655. this.options = this.contractNoList
  656. })
  657. },
  658. //收款截图
  659. handleRemove(file) {
  660. console.log(file)
  661. },
  662. handlePictureCardPreview(file) {
  663. this.collectionScreenshot = file.url
  664. },
  665. handlePictureCardPreview1(file) {
  666. this.depositUrl = file.url
  667. },
  668. handleDownload(file) {
  669. console.log(file)
  670. },
  671. handleSizeChange(val) {
  672. console.log(`每页 ${val} 条`)
  673. this.pageSize = val
  674. this.getList()
  675. },
  676. handleCurrentChange(val) {
  677. this.currentPage = val
  678. console.log(`当前页: ${val}`)
  679. this.getList()
  680. },
  681. },
  682. }
  683. </script>
  684. <style lang="scss" scoped>
  685. .connert {
  686. width: 90%;
  687. margin: 0 auto;
  688. }
  689. .vertical-text-left {
  690. width: 62px;
  691. text-align: right;
  692. }
  693. //分页
  694. .el-pagination {
  695. padding: 10px 15px;
  696. margin-bottom: 0;
  697. text-align: center;
  698. }
  699. /deep/.el-pager li.active {
  700. color: #5878e8;
  701. cursor: default;
  702. }
  703. /deep/.el-pager li:hover {
  704. color: #5878e8;
  705. cursor: default;
  706. }
  707. .el-button--default {
  708. color: #8890b1;
  709. border-color: #e8eaf1;
  710. }
  711. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  712. width: 30px;
  713. margin-left: 0;
  714. border-top-left-radius: 0px;
  715. border-bottom-left-radius: 0px;
  716. }
  717. /deep/.findValue .el-input__inner {
  718. border-top-right-radius: 0px;
  719. border-bottom-right-radius: 0px;
  720. width: 385px;
  721. }
  722. .completed.el-button--default {
  723. border-color: #5878e8;
  724. background-color: #f6f7fc;
  725. color: #5878e8;
  726. }
  727. .putstorage.el-button--default,
  728. .deliverystorage.el-button--default {
  729. border-color: #8890b1;
  730. background-color: #fff;
  731. color: #8890b1;
  732. }
  733. /deep/.el-table td,
  734. /deep/.el-table th.is-leaf {
  735. border-right: 1px solid #e9ecf7;
  736. text-align: center;
  737. }
  738. /deep/.el-table tr td:first-child,
  739. /deep/.el-table tr th.is-leaf:first-child {
  740. border-left: 1px solid #e9ecf7;
  741. }
  742. .record,
  743. .adjustment {
  744. display: inline-block;
  745. color: #5878e8;
  746. padding: 0 4px !important;
  747. position: relative;
  748. }
  749. .record:after {
  750. position: absolute;
  751. content: '';
  752. display: block;
  753. top: 5px;
  754. right: -2px;
  755. width: 1px;
  756. height: 12px;
  757. background: #e9ecf7;
  758. }
  759. // .el-row{
  760. // height: 150px;
  761. // }
  762. .base_header_layout .grid-content {
  763. margin-top: 80px;
  764. }
  765. .el-input--small .el-input__inner {
  766. margin-left: 20px;
  767. }
  768. .el-range-editor--small.el-input__inner {
  769. height: 32px;
  770. margin-left: -20%;
  771. }
  772. //执行样式
  773. .executory,
  774. .inExecution,
  775. .done {
  776. width: 6px;
  777. height: 6px;
  778. display: inline-block;
  779. border-radius: 50%;
  780. position: relative;
  781. top: -1px;
  782. font-size: 14px;
  783. }
  784. .executory {
  785. background: #ff9f24;
  786. }
  787. .inExecution {
  788. background: #5878e8;
  789. }
  790. .done {
  791. background: #50cad4;
  792. }
  793. .record,
  794. .adjustment {
  795. display: inline-block;
  796. color: #5878e8;
  797. padding: 0 4px !important;
  798. position: relative;
  799. font-size: 14px;
  800. }
  801. .container {
  802. overflow: scroll;
  803. height: 93vh;
  804. }
  805. .button-container {
  806. display: flex;
  807. flex-wrap: nowrap;
  808. justify-content: space-between;
  809. align-items: center;
  810. background-color: #fff;
  811. width: 100%;
  812. height: 50px;
  813. padding: 0 10px;
  814. &>div {
  815. margin-left: 10px;
  816. display: flex;
  817. flex-wrap: nowrap;
  818. flex-direction: row;
  819. &>span {
  820. line-height: 50px;
  821. }
  822. }
  823. /deep/.auditFlow-box {
  824. position: unset;
  825. margin-left: 10px;
  826. &/deep/.auditFlow-icon {
  827. width: auto;
  828. padding-right: 30px;
  829. }
  830. &/deep/.auditFlow-main {
  831. position: absolute;
  832. }
  833. }
  834. }
  835. .bg-left {
  836. padding-left: 30px;
  837. }
  838. .title {
  839. position: relative;
  840. }
  841. .title::before {
  842. content: '';
  843. display: inline-block;
  844. width: 5px;
  845. height: 30px;
  846. background: #5473e8;
  847. position: absolute;
  848. left: 0;
  849. }
  850. .el-button--primary {
  851. background-color: #5878e8;
  852. border-color: #5878e8;
  853. // margin-left: 85%;
  854. margin-top: 13px;
  855. }
  856. //导航条样式
  857. .el-col-12 {
  858. width: 50%;
  859. height: 60px;
  860. background: #f6f7fc;
  861. border-radius: 4px 4px 1px 1px;
  862. }
  863. .el-input--small .el-input__inner {
  864. height: 32px;
  865. line-height: 32px;
  866. width: 385px;
  867. margin-top: 10px;
  868. }
  869. .bg-bottom {
  870. margin-left: 85%;
  871. }
  872. .but {
  873. margin-left: 30%;
  874. /* margin-top: -32px; */
  875. overflow: auto;
  876. /* float: left; */
  877. /* margin-left: 1px; */
  878. margin-left: -10px;
  879. }
  880. .el-input--small {
  881. font-size: 13px;
  882. width: 390px;
  883. margin-left: 74%;
  884. }
  885. /deep/.el-table .el-table__header .cell,
  886. .el-table .el-table__body .cell {
  887. text-align: center;
  888. }
  889. .el-scrollbar__wrap {
  890. overflow-y: hidden;
  891. }
  892. /deep/.deal {
  893. margin-left: 0%;
  894. width: 64%;
  895. }
  896. .photo {
  897. padding: 0% 34%;
  898. }
  899. .photo1 {
  900. padding: 0 10%;
  901. }
  902. .photo2 {
  903. padding: 0 12%;
  904. }
  905. /deep/.el-form-item--small .el-form-item__label,
  906. .el-form-item--small .el-form-item__content {
  907. text-align: center;
  908. }
  909. hr {
  910. width: 91%;
  911. }
  912. /deep/.deaal {
  913. width: 66%;
  914. margin-left: 9%;
  915. }
  916. .el-date-editor.el-input,
  917. .el-date-editor.el-input__inner,
  918. .el-input-number--small {
  919. }
  920. /deep/.el-table td,
  921. .el-table th.is-leaf {
  922. border-right: 1px solid #e9ecf7;
  923. text-align: center;
  924. height: 40px;
  925. }
  926. /deep/.beizhu .el-input--small .el-input__inner {
  927. height: 220px;
  928. line-height: 28px;
  929. width: 146%;
  930. margin-left: 15px;
  931. }
  932. .inputs {
  933. margin: 0 auto;
  934. margin-right: 15%;
  935. }
  936. .inputChenge {
  937. width: 150%;
  938. display: inline-flex;
  939. margin-left: -80%;
  940. }
  941. </style>