salesClosingCashierList.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  1. <!--销售平仓报表-->
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col style='padding-left:15px;' :span="16">
  6. <ws-button :type="searchType==1?'primary':''" @click="handlestatus(1)">待审核</ws-button>
  7. <ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
  8. <ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
  9. <ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
  10. <ws-button type="primary" v-hasPermission="
  11. `report.saleCloseReport.view`
  12. " @click="handleAudit(1)">驳回</ws-button>
  13. <ws-button type="primary" v-hasPermission="
  14. `report.saleCloseReport.view`
  15. " @click="handleAudit(0)">通过</ws-button>
  16. <ws-button type="primary" v-hasPermission="
  17. `report.saleCloseReport.payment`
  18. " @click="payment()">付款</ws-button>
  19. <ws-button type="primary" v-hasPermission="
  20. `report.saleCloseReport.recive`
  21. " @click="collection()">收款</ws-button>
  22. </el-col>
  23. <el-col style='text-align:right;line-height:60px;padding-right:10px;' :span="8">
  24. <ws-select
  25. v-model="contractNo"
  26. placeholder="请选择合同"
  27. clearable
  28. @change='contractchange'
  29. maxlength="500"
  30. type="input"
  31. class="findValue"
  32. >
  33. <ws-option
  34. key=""
  35. label="全部合同"
  36. value=""
  37. />
  38. <ws-option
  39. v-if='item.reportStatus'
  40. v-for="item in contractNoList"
  41. :key="item.constKey"
  42. :label="item.contractNo + '(' + item.reportStatus + ')'"
  43. :value="item.contractNo"
  44. />
  45. <ws-option
  46. v-if='!item.reportStatus'
  47. v-for="item in contractNoList"
  48. :key="item.constKey"
  49. :label="item.contractNo"
  50. :value="item.contractNo"
  51. />
  52. </ws-select>
  53. </el-col>
  54. </el-row>
  55. <el-table
  56. class="wenzi"
  57. :data="saleList.records"
  58. style="width: 100%; margin-top: 20px"
  59. @selection-change="handleSelectionChange"
  60. ref="warehouseList"
  61. border
  62. :summary-method="getSummaries"
  63. show-summary
  64. >
  65. <el-table-column type="selection" :selectable='selectInit' width="55"></el-table-column>
  66. <el-table-column type="index" label="序号" width="50"></el-table-column>
  67. <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
  68. <el-table-column class="table_td" prop="closePositionDate" label="平仓日期"></el-table-column>
  69. <el-table-column class="table_td" prop="closingQuantity" width='100' label="平仓数量(吨)"></el-table-column>
  70. <el-table-column class="table_td" prop="transactionPrice" width="120" label="成交价格(元/吨)"></el-table-column>
  71. <el-table-column class="table_td" prop="closeRate" width="120" label="平仓价格(元/吨)"></el-table-column>
  72. <el-table-column class="table_td" prop="basisPrice" width='90' label="基差(元/吨)"></el-table-column>
  73. <el-table-column class="table_td" prop="amountIngPayable" width='100' label="应付金额(元)">
  74. <template scope="scope">
  75. <span v-if="scope.row.amountIngPayable!=null">{{ scope.row.amountIngPayable }}</span>
  76. <span v-else>-</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column class="table_td" prop="amountEdPayable" width='100' label="已付金额(元)">
  80. <template scope="scope">
  81. <span @click='amountEdPayableimage(scope.row)' v-if="scope.row.amountEdPayable!=null">{{ scope.row.amountEdPayable }}</span>
  82. <span v-else>-</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column class="table_td" prop="amountNotPayable" width='100' label="未付金额(元)">
  86. <template scope="scope">
  87. <span v-if="scope.row.amountNotPayable!=null">{{ scope.row.amountNotPayable }}</span>
  88. <span v-else>-</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column class="table_td" prop="paymentDate" label="付款日期"></el-table-column>
  92. <el-table-column class="table_td" prop="collectionIngPayable" width='100' label="应收金额(元)">
  93. <template scope="scope">
  94. <span v-if="scope.row.collectionIngPayable!=null">{{ scope.row.collectionIngPayable }}</span>
  95. <span v-else>-</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column class="table_td" prop="collectionEdPayable" width='100' label="已收金额(元)">
  99. <template scope="scope">
  100. <span @click='collectionScreenshotimage(scope.row)' v-if="scope.row.collectionEdPayable!=null">{{ scope.row.collectionEdPayable }}</span>
  101. <span v-else>-</span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column class="table_td" prop="collectionNotPayable" width='100' label="未收金额(元)">
  105. <template scope="scope">
  106. <span v-if="scope.row.collectionNotPayable!=null">{{ scope.row.collectionNotPayable }}</span>
  107. <span v-else>-</span>
  108. </template>
  109. </el-table-column>
  110. <el-table-column class="table_td" prop="collectionDate" label="收款日期"></el-table-column>
  111. <el-table-column class="table_td" prop="customerName" width='60' label="客户"></el-table-column>
  112. <el-table-column class="table_td" prop="warehouseName" width='60' label="库点"></el-table-column>
  113. <el-table-column prop="status" label="状态">
  114. <template slot-scope="scope">
  115. <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
  116. <span v-else>{{ scope.row.status }}</span>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. <!-- 页数 -->
  121. <el-pagination
  122. @size-change="handleSizeChange"
  123. @current-change="handleCurrentChange"
  124. :current-page="currentPage"
  125. :page-size="pageSize"
  126. layout="total, sizes, prev, pager, next, jumper"
  127. :total="deptBudgetTotal"
  128. ></el-pagination>
  129. <el-dialog
  130. width="25%"
  131. title="付款"
  132. :visible.sync="dialogFormVisible1"
  133. :append-to-body="true"
  134. >
  135. <el-form :model="form">
  136. <el-form-item label="未付金额(元)" :label-width="formLabelWidth">
  137. {{paymentlist.amountNotPayable}}
  138. </el-form-item>
  139. <el-form-item label="本次付款金额(元)" :label-width="formLabelWidth">
  140. <el-input
  141. v-model="paymentlist.money"
  142. autocomplete="off"
  143. placeholder="请输入本次付款金额"
  144. class="deal"
  145. ></el-input>
  146. </el-form-item>
  147. <el-form-item
  148. label="付款日期"
  149. prop="submissionDate"
  150. :label-width="formLabelWidth"
  151. class="deal"
  152. >
  153. <ws-date-picker
  154. v-model="paymentlist.paymentDate"
  155. type="date"
  156. placeholder="请选择付款日期"
  157. value-format="yyyy-MM-dd"
  158. class="deal"
  159. />
  160. </el-form-item>
  161. <el-form-item label="上传付款截图" :label-width="formLabelWidth">
  162. <el-upload
  163. v-if='paymentlist.paymentScreenshot==""'
  164. action="https://www.zthymaoyi.com/upload/admin"
  165. list-type="picture-card"
  166. :on-success="
  167. (res, file) => {
  168. handlepaymentScreenshot( res, file)
  169. }
  170. "
  171. :on-remove="handleRemove"
  172. class="photo2"
  173. >
  174. <i class="el-icon-plus"></i>
  175. </el-upload>
  176. <img v-if='paymentlist.paymentScreenshot!=""' style='width:100px;height:100px;border:1px solid #ccc;' :src="paymentlist.paymentScreenshot" alt="">
  177. </el-form-item>
  178. </el-form>
  179. <div slot="footer" class="dialog-footer">
  180. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  181. <el-button type="primary" @click="paymoneyconfirm">提 交</el-button>
  182. </div>
  183. </el-dialog>
  184. <el-dialog
  185. width="25%"
  186. title="付款图片"
  187. :visible.sync="dialogFormVisible3"
  188. :append-to-body="true"
  189. >
  190. <div v-for='item in addressurl'>
  191. <img style='width:100px;height:100px;' :src="item" alt="">
  192. </div>
  193. </el-dialog>
  194. <el-dialog
  195. width="25%"
  196. title="收款图片"
  197. :visible.sync="dialogFormVisible4"
  198. :append-to-body="true"
  199. >
  200. <div v-for='item in addressurl1'>
  201. <img style='width:100px;height:100px;' :src="item" alt="">
  202. </div>
  203. </el-dialog>
  204. </div>
  205. <!-- </div> -->
  206. </template>
  207. <script>
  208. import {
  209. postsaleaudit,
  210. getsalelist,
  211. postsalepaymoney,
  212. postsalecollectmoney,
  213. getsaleclosingcontractno
  214. } from '@/model/statisticalReport/index'
  215. import { downloadFile } from '@/utils/batchDown'
  216. import Pagination from '@/components/Pagination'
  217. import WsUpload from '@/components/WsUpload'
  218. import { dayjs, fmoney, EventBus } from 'base-core-lib'
  219. export default {
  220. name: 'viewSpareMoney',
  221. components: {
  222. WsUpload,
  223. Pagination
  224. },
  225. watch: {
  226. vesselId(val) {
  227. this.getList()
  228. },
  229. isShow(val) {
  230. this.showType = val
  231. }
  232. },
  233. data() {
  234. return {
  235. checked: true,
  236. dialogFormVisible1: false,
  237. dialogFormVisible2: false,
  238. dialogFormVisible3:false,
  239. dialogFormVisible4:false,
  240. dialogVisible: false,
  241. form: {
  242. transactionPrice: '',
  243. transactionsNumber: '',
  244. basis: '',
  245. submissionDate: ''
  246. // delivery: false,
  247. // type: [],
  248. // resource: '',
  249. // desc: ''
  250. },
  251. formLabelWidth: '140px',
  252. isShow: !this.autohide,
  253. //弹出框
  254. dialogViewSpareMoney: false,
  255. dialogApproveFormVisible: false,
  256. // 船舶类型
  257. monetaryKey: null,
  258. // 表格显示数据
  259. tableDate: [],
  260. // 是否显示
  261. showType: true,
  262. // 年
  263. year: '',
  264. value2: '',
  265. deptBudgetTotal: 0,
  266. currentPage: 1,
  267. pageSize: 10,
  268. searchType:'' ,
  269. searchKeyWord: '',
  270. contractType: 2,
  271. contractNoList:[],
  272. enter: {
  273. closePositionList: []
  274. },
  275. // taskTypeList:[
  276. // {value:'待审核',type:1},
  277. // {value:'已完成',type:2},
  278. // {value:'已通过',type:3},
  279. // {value:'已成交',type:4},
  280. // ],
  281. // 提交类型
  282. submitType: true,
  283. multipleSelection:[],
  284. size: 10,
  285. spanArr: [],
  286. contractNo: '',
  287. roleFlag:'1',
  288. inOutTaskNo: '',
  289. compId: sessionStorage.getItem('ws-pf_compId'),
  290. roleId: sessionStorage.getItem('ws-pf_roleId'),
  291. saleList: [],
  292. deptBudgetList: {},
  293. pcFlag: 1,
  294. historyList: [],
  295. addressurl:[],
  296. addressurl1:[],
  297. paymentlist:{paymentScreenshot:''},
  298. collectionlist:{collectionScreenshot:''},
  299. accessoryTFs: false
  300. }
  301. },
  302. activated() {
  303. // this.loaddata()
  304. this.getList()
  305. this.showType = this.isShow
  306. },
  307. methods: {
  308. selectInit(row){
  309. //在这里一定要记得类型匹配的上。
  310. if(row.approveStatus==null){
  311. return true
  312. }else if(row.approveStatus!=null){
  313. if(row.taskId==null){
  314. return false
  315. }else{
  316. return true
  317. }
  318. }
  319. },
  320. audit(item,index,status){
  321. if(index<this.modification.length){
  322. posthandle({ taskId: item.taskId,
  323. approved: status,
  324. auditMind: '34',
  325. needReapply: false,})
  326. .toPromise()
  327. .then((response) => {
  328. this.audit(this.modification[index+1],index+1,status)
  329. }).catch((req) => {
  330. this.$message.warning(req.message)
  331. })
  332. }else{
  333. if(status){
  334. this.$message.success('通过成功')
  335. this.getList()
  336. }else if(!status){
  337. postsaleaudit({
  338. flag: 2,
  339. purchaseReceiptReportList: this.modification,
  340. })
  341. .toPromise()
  342. .then((response) => {
  343. this.$message.success('驳回成功')
  344. this.getList()
  345. })
  346. .catch((req) => {
  347. this.$message.success('驳回失败')
  348. })
  349. }
  350. }
  351. },
  352. contractchange(e) {
  353. this.contractNo = e
  354. this.getList()
  355. },
  356. amountEdPayableimage(item){
  357. this.dialogFormVisible3=true
  358. this.addressurl=item.paymentScreenshot.split('$')
  359. },
  360. collectionScreenshotimage(item){
  361. this.dialogFormVisible4=true
  362. this.addressurl1=item.collectionScreenshot.split('$')
  363. },
  364. handlestatus(status){
  365. this.searchType=status
  366. this.getList()
  367. },
  368. collectionconfirm(){
  369. if(!this.collectionlist.money){
  370. this.$message.warning('收款金额不能为空')
  371. return
  372. }
  373. if(this.collectionlist.money>this.collectionlist.collectionNotPayable){
  374. this.$message.warning('收款金额不能超过未收金额')
  375. return
  376. }
  377. if(this.collectionlist.money.indexOf('.')!=-1){
  378. if(this.collectionlist.money.split('.')[1].length>2){
  379. this.$message.warning('收款金额输入错误')
  380. return
  381. }
  382. }
  383. if(!this.collectionlist.collectionScreenshot){
  384. this.$message.warning('请上传收款截图')
  385. return
  386. }
  387. this.$confirm(`确定提交收款信息?`, {
  388. cancelButtonText: '取消',
  389. confirmButtonText: '确定',
  390. type: 'warning'
  391. }).then(() => {
  392. postsalecollectmoney(this.collectionlist).toPromise()
  393. .then(response => {
  394. this.$message.success('提交成功')
  395. this.collectionlist={collectionScreenshot:''}
  396. this.dialogFormVisible2= false
  397. this.getList()
  398. }) .catch(() => {
  399. this.$message.warning('提交失败')
  400. })
  401. })
  402. },
  403. paymoneyconfirm(){
  404. if(!this.paymentlist.money){
  405. this.$message.warning('付款金额不能为空')
  406. return
  407. }
  408. if(this.paymentlist.money>this.paymentlist.amountNotPayable){
  409. this.$message.warning('付款金额不能超过未付金额')
  410. return
  411. }
  412. if(this.paymentlist.money.indexOf('.')!=-1){
  413. if(this.paymentlist.money.split('.')[1].length>2){
  414. this.$message.warning('付款金额输入错误')
  415. return
  416. }
  417. }
  418. if(!this.paymentlist.paymentScreenshot){
  419. this.$message.warning('请上传付款截图')
  420. return
  421. }
  422. this.$confirm(`确定提交付款信息?`, {
  423. cancelButtonText: '取消',
  424. confirmButtonText: '确定',
  425. type: 'warning'
  426. }).then(() => {
  427. postsalepaymoney(this.paymentlist).toPromise()
  428. .then(response => {
  429. this.$message.success('提交成功')
  430. this.paymentlist={paymentScreenshot:''}
  431. this.dialogFormVisible1= false
  432. this.getList()
  433. }) .catch(() => {
  434. this.$message.warning('提交失败')
  435. })
  436. })
  437. },
  438. handlepaymentScreenshot(res,fire){
  439. this.paymentlist.paymentScreenshot=res.url
  440. },
  441. handlecollectionScreenshot(res,fire){
  442. this.collectionlist.collectionScreenshot=res.url
  443. },
  444. payment(){
  445. if(this.multipleSelection.length>0){
  446. var amountNotPayable=0
  447. for (let i = 0; i < this.multipleSelection.length; i++) {
  448. amountNotPayable+=this.multipleSelection[i].amountNotPayable
  449. if(this.multipleSelection[i].collectionIngPayable>0){
  450. this.$message.warning('请选择应付款的条目')
  451. return
  452. }
  453. if(this.modification[i].status!='已通过'){
  454. this.$message.warning('审核尚未通过,不可进行付款操作')
  455. }
  456. }
  457. this.dialogFormVisible1=true
  458. this.paymentlist.amountNotPayable=amountNotPayable
  459. this.paymentlist.salesClosingReportList=this.multipleSelection
  460. }else{
  461. this.$message.warning('请选择要审核的条目')
  462. }
  463. },
  464. collection(){
  465. if(this.multipleSelection.length>0){
  466. var collectionNotPayable=0
  467. for (let i = 0; i < this.multipleSelection.length; i++) {
  468. collectionNotPayable+=this.multipleSelection[i].collectionNotPayable
  469. if(this.multipleSelection[i].amountNotPayable>0){
  470. this.$message.warning('请选择应收款的条目')
  471. return
  472. }
  473. if(this.modification[i].status!='已通过'){
  474. this.$message.warning('审核尚未通过,不可进行收款操作')
  475. }
  476. }
  477. this.dialogFormVisible2=true
  478. this.collectionlist.collectionNotPayable=collectionNotPayable
  479. this.collectionlist.salesClosingReportList=this.multipleSelection
  480. }else{
  481. this.$message.warning('请选择要审核的条目')
  482. }
  483. },
  484. handleAudit(status,flag){
  485. var that=this
  486. if(status==1){
  487. if(this.multipleSelection.length>0){
  488. this.$confirm(`是否确定通过?`, {
  489. cancelButtonText: '取消',
  490. confirmButtonText: '确定',
  491. type: 'warning'
  492. }).then(() => {
  493. // postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:1,flag:1}).toPromise()
  494. // .then(response => {
  495. // this.$message.success('通过成功')
  496. // this.getList()
  497. // }) .catch(() => {
  498. // this.$message.warning('通过失败')
  499. // })
  500. that.audit(this.modification[0],0,true)
  501. })
  502. }else{
  503. this.$message.warning('请选择要审核的条目')
  504. }
  505. }else if(status==0){
  506. if(this.multipleSelection.length>0){
  507. this.$confirm(`是否确定驳回?`, {
  508. cancelButtonText: '取消',
  509. confirmButtonText: '确定',
  510. type: 'warning'
  511. }).then(() => {
  512. that.audit(this.modification[0],0,false)
  513. })
  514. }else{
  515. this.$message.warning('请选择要驳回的条目')
  516. }
  517. }
  518. },
  519. updated() {
  520. this.$nextTick(() => {
  521. this.$refs.warehouseList.doLayout()
  522. })
  523. },
  524. //合计
  525. getSummaries(param) {
  526. const { columns, data } = param
  527. const sums = []
  528. columns.forEach((column, index) => {
  529. if (index === 0) {
  530. sums[index] = '合计'
  531. } else if (index === 4 || index === 10 || index === 8 || index === 9|| index === 12 || index === 13 || index === 14 ) {
  532. const values = data.map(item => Number(item[column.property]))
  533. if (!values.every(value => isNaN(value))) {
  534. sums[index] = values.reduce((prev, curr) => {
  535. const value = Number(curr)
  536. if (!isNaN(value)) {
  537. return prev + curr
  538. } else {
  539. return prev
  540. }
  541. }, 0)
  542. } else {
  543. sums[index] = '元'
  544. }
  545. } else {
  546. sums[index] = '--'
  547. }
  548. })
  549. return sums
  550. },
  551. //成交
  552. submit() {
  553. if (!this.warehouseList.transactionPrice) {
  554. this.$message({
  555. message: '成交价不能为空',
  556. type: 'warning'
  557. })
  558. return
  559. }
  560. this.$confirm(`确定提交成交信息`, {
  561. cancelButtonText: '取消',
  562. confirmButtonText: '确定',
  563. type: 'warning'
  564. }).then(() => {
  565. console.log(23456678790)
  566. chengList(this.warehouseList)
  567. .toPromise()
  568. .then(response => {
  569. this.$message.success('添加成功')
  570. // this.$router.go(-1)
  571. })
  572. .catch(() => {
  573. console.log(1111111111)
  574. return false
  575. })
  576. })
  577. },
  578. getList() {
  579. // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
  580. // this.roleFlag=1
  581. // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
  582. // this.roleFlag=2
  583. // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
  584. // this.roleFlag=3
  585. // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
  586. // this.roleFlag=4
  587. // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
  588. // this.roleFlag=''
  589. // }
  590. getsalelist({
  591. compId: sessionStorage.getItem('ws-pf_compId'),
  592. currentPage: this.currentPage,
  593. pageSize: this.pageSize,
  594. searchType: this.searchType,
  595. contractNo:this.contractNo,
  596. // roleFlag:this.roleFlag
  597. })
  598. .toPromise()
  599. .then(response => {
  600. this.deptBudgetTotal=response.total
  601. this.saleList = response
  602. })
  603. getsaleclosingcontractno({
  604. compId: sessionStorage.getItem('ws-pf_compId'),
  605. currentPage: this.currentPage,
  606. pageSize: this.pageSize,
  607. roleFlag:this.roleFlag
  608. })
  609. .toPromise()
  610. .then(response => {
  611. this.contractNoList = response
  612. })
  613. },
  614. // loaddata(){
  615. // chengList({
  616. // compId: sessionStorage.getItem('ws-pf_compId'),
  617. // })
  618. // .toPromise()
  619. // .then(response => {
  620. // this.warehouseList = response
  621. // })
  622. // },
  623. handleSelectionChange(val) {
  624. this.multipleSelection = val
  625. },
  626. handleRemove(file) {
  627. console.log(file)
  628. },
  629. handlePictureCardPreview(file) {
  630. this.dialogImageUrl = file.url
  631. this.dialogVisible = true
  632. },
  633. handleDownload(file) {
  634. console.log(file)
  635. },
  636. // statusquery(state) {
  637. // this.searchType = state
  638. // this.getList()
  639. // },
  640. // delivery(item) {
  641. // this.$router.push({
  642. // path: 'warehouseManagementDelivery',
  643. // query: {
  644. // baseId: item.warehouseId,
  645. // positionId: item.binNumberId,
  646. // warehouseName: item.warehouseName,
  647. // binNumber: item.binNumber,
  648. // capacity: item.capacity
  649. // }
  650. // })
  651. // },
  652. //查看
  653. handleLook(row) {
  654. this.$router.push({
  655. path: 'warehouseManagementPutOutLook',
  656. query: {
  657. relevanceId: row.relevanceId
  658. }
  659. })
  660. },
  661. //返回
  662. revert() {
  663. this.$router.push({ path: 'warehouseManagementList' })
  664. },
  665. handleClose() {
  666. this.accessoryTFs = false
  667. },
  668. handleSizeChange(val) {
  669. console.log(`每页 ${val} 条`)
  670. this.pageSize = val
  671. this.getList()
  672. },
  673. handleCurrentChange(val) {
  674. this.currentPage = val
  675. console.log(`当前页: ${val}`)
  676. this.getList()
  677. },
  678. editClick(row) {
  679. var status = ''
  680. if (row.status == '待审核' || row.status == '已完成') {
  681. status = '执行中'
  682. } else if (row.status == '执行中') {
  683. status = '已完成'
  684. }
  685. //cancelButtonClass: "btn-custom-cancel"
  686. this.$confirm(`是否将状态改为${status}`, {
  687. confirmButtonText: '确定',
  688. cancelButtonText: '取消',
  689. type: 'warning'
  690. })
  691. .then(() => {
  692. alsostate({ id: row.id })
  693. .toPromise()
  694. .then(response => {
  695. this.$notify.success({
  696. title: '成功',
  697. message: '状态修改成功'
  698. })
  699. this.getList()
  700. })
  701. .catch(response => {
  702. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  703. })
  704. })
  705. .catch(() => {
  706. return false
  707. })
  708. },
  709. selecttaskType(e) {
  710. for (var i = 0; i < this.taskTypeList.length; i++) {
  711. if (this.taskTypeList[i].value == e) {
  712. this.searchType = this.taskTypeList[i].type
  713. }
  714. }
  715. },
  716. // fujian(row) {
  717. // if (
  718. // row.receiveAttachmentPath === null ||
  719. // row.receiveAttachmentPath === ''
  720. // ) {
  721. // EventBus.$emit(
  722. // 'warning',
  723. // this.$t('system.noticeCircular.NoInformation')
  724. // )
  725. // } else {
  726. // this.accessoryTFs = true
  727. // }
  728. // this.appendixIdss = row.receiveAttachmentPath
  729. // },
  730. handleExamine(row) {
  731. this.$router.push({
  732. name: 'salesContractExamine',
  733. query: { id: row.id }
  734. })
  735. },
  736. // 关闭 dialog时 处理文件url 初始化upload组件
  737. handleCloe() {
  738. this.dialogViewSpareMoney = false
  739. },
  740. history(row) {
  741. billoperatehis({ id: row.id })
  742. .toPromise()
  743. .then(response => {
  744. this.historyList = response
  745. })
  746. },
  747. //查找
  748. find() {
  749. this.currentPage = 1
  750. this.getList()
  751. },
  752. async exportlist() {
  753. const { data } = await export1(
  754. {
  755. compId: sessionStorage.getItem('ws-pf_compId'),
  756. contractType: this.contractType,
  757. currentPage: this.currentPage,
  758. pageSize: this.pageSize,
  759. searchType: this.searchType,
  760. searchKeyWord: this.searchKeyWord,
  761. startDate: this.startDate,
  762. endDate: this.endDate
  763. },
  764. {},
  765. { responseType: 'blob' }
  766. ).toPromise()
  767. downloadFile({
  768. res: data,
  769. fileName: `${this.date.year +
  770. (this.date.month ? `-${this.date.month}` : '')}_采购合同`,
  771. type: 'xls'
  772. })
  773. },
  774. total() {}
  775. }
  776. }
  777. </script>
  778. <style lang="scss" scoped>
  779. .connert {
  780. width: 90%;
  781. margin: 0 auto;
  782. }
  783. .vertical-text-left {
  784. width: 62px;
  785. text-align: right;
  786. }
  787. //分页
  788. .el-pagination {
  789. padding: 10px 15px;
  790. margin-bottom: 0;
  791. text-align: center;
  792. }
  793. /deep/.el-pager li.active {
  794. color: #5878e8;
  795. cursor: default;
  796. }
  797. /deep/.el-pager li:hover {
  798. color: #5878e8;
  799. cursor: default;
  800. }
  801. .el-button--default {
  802. color: #8890b1;
  803. border-color: #e8eaf1;
  804. }
  805. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  806. width: 30px;
  807. margin-left: 0;
  808. border-top-left-radius: 0px;
  809. border-bottom-left-radius: 0px;
  810. }
  811. /deep/.findValue .el-input__inner {
  812. border-top-right-radius: 0px;
  813. border-bottom-right-radius: 0px;
  814. width: 385px;
  815. }
  816. .completed.el-button--default {
  817. border-color: #5878e8;
  818. background-color: #f6f7fc;
  819. color: #5878e8;
  820. }
  821. .putstorage.el-button--default,
  822. .deliverystorage.el-button--default {
  823. border-color: #8890b1;
  824. background-color: #fff;
  825. color: #8890b1;
  826. }
  827. /deep/.el-table td,
  828. /deep/.el-table th.is-leaf {
  829. border-right: 1px solid #e9ecf7;
  830. text-align: center;
  831. }
  832. /deep/.el-table tr td:first-child,
  833. /deep/.el-table tr th.is-leaf:first-child {
  834. border-left: 1px solid #e9ecf7;
  835. }
  836. .record,
  837. .adjustment {
  838. display: inline-block;
  839. color: #5878e8;
  840. padding: 0 4px !important;
  841. position: relative;
  842. }
  843. .record:after {
  844. position: absolute;
  845. content: '';
  846. display: block;
  847. top: 5px;
  848. right: -2px;
  849. width: 1px;
  850. height: 12px;
  851. background: #e9ecf7;
  852. }
  853. // .el-row{
  854. // height: 150px;
  855. // }
  856. .base_header_layout .grid-content {
  857. margin-top: 80px;
  858. }
  859. .el-input--small .el-input__inner {
  860. margin-left: 20px;
  861. }
  862. .el-range-editor--small.el-input__inner {
  863. height: 32px;
  864. margin-left: -20%;
  865. }
  866. //执行样式
  867. .executory,
  868. .inExecution,
  869. .done {
  870. width: 6px;
  871. height: 6px;
  872. display: inline-block;
  873. border-radius: 50%;
  874. position: relative;
  875. top: -1px;
  876. font-size: 14px;
  877. }
  878. .executory {
  879. background: #ff9f24;
  880. }
  881. .inExecution {
  882. background: #5878e8;
  883. }
  884. .done {
  885. background: #50cad4;
  886. }
  887. .record,
  888. .adjustment {
  889. display: inline-block;
  890. color: #5878e8;
  891. padding: 0 4px !important;
  892. position: relative;
  893. font-size: 14px;
  894. }
  895. .container {
  896. overflow: scroll;
  897. height: 93vh;
  898. }
  899. .button-container {
  900. display: flex;
  901. flex-wrap: nowrap;
  902. justify-content: space-between;
  903. align-items: center;
  904. background-color: #fff;
  905. width: 100%;
  906. height: 50px;
  907. padding: 0 10px;
  908. & > div {
  909. margin-left: 10px;
  910. display: flex;
  911. flex-wrap: nowrap;
  912. flex-direction: row;
  913. & > span {
  914. line-height: 50px;
  915. }
  916. }
  917. /deep/.auditFlow-box {
  918. position: unset;
  919. margin-left: 10px;
  920. &/deep/.auditFlow-icon {
  921. width: auto;
  922. padding-right: 30px;
  923. }
  924. &/deep/.auditFlow-main {
  925. position: absolute;
  926. }
  927. }
  928. }
  929. .bg-left {
  930. padding-left: 30px;
  931. }
  932. .title {
  933. position: relative;
  934. }
  935. .title::before {
  936. content: '';
  937. display: inline-block;
  938. width: 5px;
  939. height: 30px;
  940. background: #5473e8;
  941. position: absolute;
  942. left: 0;
  943. }
  944. .el-button--primary {
  945. background-color: #5878e8;
  946. border-color: #5878e8;
  947. // margin-left: 85%;
  948. margin-top: 13px;
  949. }
  950. //导航条样式
  951. .el-col-12 {
  952. width: 50%;
  953. height: 60px;
  954. background: #f6f7fc;
  955. border-radius: 4px 4px 1px 1px;
  956. }
  957. .el-input--small .el-input__inner {
  958. height: 32px;
  959. line-height: 32px;
  960. width: 385px;
  961. margin-top: 10px;
  962. }
  963. .bg-bottom {
  964. margin-left: 85%;
  965. }
  966. .but {
  967. margin-left: 30%;
  968. /* margin-top: -32px; */
  969. overflow: auto;
  970. /* float: left; */
  971. /* margin-left: 1px; */
  972. margin-left: -10px;
  973. }
  974. .el-input--small {
  975. font-size: 13px;
  976. width: 390px;
  977. margin-left: 74%;
  978. }
  979. /deep/.el-table .el-table__header .cell,
  980. .el-table .el-table__body .cell {
  981. text-align: center;
  982. }
  983. .el-scrollbar__wrap {
  984. overflow-y: hidden;
  985. }
  986. /deep/.deal {
  987. margin-left: 0%;
  988. width: 64%;
  989. }
  990. .photo {
  991. padding: 0% 34%;
  992. }
  993. .photo1 {
  994. padding: 0 10%;
  995. }
  996. .photo2 {
  997. padding: 0 17%;
  998. }
  999. /deep/.el-form-item--small .el-form-item__label,
  1000. .el-form-item--small .el-form-item__content {
  1001. text-align: center;
  1002. }
  1003. hr {
  1004. width: 91%;
  1005. }
  1006. /deep/.deaal {
  1007. width: 66%;
  1008. margin-left: 9%;
  1009. }
  1010. .el-date-editor.el-input,
  1011. .el-date-editor.el-input__inner,
  1012. .el-input-number--small {
  1013. width: 123% !important;
  1014. }
  1015. /deep/.el-table td,
  1016. .el-table th.is-leaf {
  1017. border-right: 1px solid #e9ecf7;
  1018. text-align: center;
  1019. height: 40px;
  1020. }
  1021. // .danjia{
  1022. // width: 9px;
  1023. // height: 9px;
  1024. // margin-left: 40px;
  1025. // }
  1026. </style>