shippingList.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741
  1. //船运结算报表
  2. <template>
  3. <div class="container">
  4. <el-scrollbar style="height: 100%">
  5. <el-row>
  6. <el-col style="padding-left: 15px" :span="6">
  7. <!-- <ws-button :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(1)">待审核</ws-button>
  8. <ws-button :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(2)">待结算</ws-button>
  9. <ws-button :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(3)">已结算</ws-button>
  10. <ws-button :type="searchType == '' ? 'primary' : ''" @click="handlestatus('')">全部</ws-button>
  11. <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlepass()"
  12. v-if="processNo">通过</ws-button>
  13. <ws-button type="primary" v-hasPermission="`report.transportationReport.view`" @click="handlereject()"
  14. v-if="processNo">驳回</ws-button>
  15. <ws-button type="primary" v-hasPermission="`report.transportationReport.payment`" @click="handlepayment"
  16. v-if="processNo">付款</ws-button> -->
  17. <!-- <ws-button
  18. type="primary"
  19. v-hasPermission="`report.transportationReport.draw`"
  20. @click="handleninvoice"
  21. >开发票</ws-button
  22. > -->
  23. &nbsp;
  24. </el-col>
  25. <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="18">
  26. <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
  27. maxlength="500" type="input" class="findValue">
  28. <el-option v-for="item in options" :key="item.constKey" :label="item.contractNo" :value="item.contractNo" />
  29. </el-select>
  30. <el-select v-model="taskNo" placeholder="请选择运输任务编号" clearable filterable @change="taskNochange"
  31. maxlength="500" type="input" class="findValue">
  32. <el-option v-for="item in taskNoList" :key="'task'+item.taskNoKey" :label="item.taskNoValue"
  33. :value="item.taskNoValue" />
  34. </el-select>
  35. <!-- <el-select v-model="processNo" placeholder="请选择运输阶段编号" clearable filterable @change="processNochange"
  36. maxlength="500" type="input" class="findValue">
  37. <el-option v-for="item in processNoList" :key="item.processNoKey" :label="item.processNoValue"
  38. :value="item.processNoValue" />
  39. </el-select> -->
  40. <!-- <el-input v-model="startAddress" placeholder="可按照发货地进行查找" clearable maxlength="500" type="input"
  41. class="findValue" @keyup.enter.native="find()"></el-input>
  42. <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
  43. vertical-align: text-top;
  44. position: relative;
  45. top: 0px;
  46. left: -8px;
  47. " src="../../../public/img/sousuo.png" alt="" /></ws-button> -->
  48. </el-col>
  49. </el-row>
  50. <el-row>
  51. <el-col style="padding-left: 15px" :span="6">
  52. </el-col>
  53. <el-col :span="18">
  54. <div v-if="contractNo!='全部合同'">
  55. <span style="display:inline-block;margin-right:10px;">船名:{{shipName}}</span>
  56. <span style="display:inline-block;margin-right:10px;">航次:{{shipNo}}</span>
  57. <div style="display:inline-block;margin-right:10px;"> 水单装船重量(吨):<span v-if="shippedWeight>0">{{shippedWeight}}<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  58. src="../../../public/img/fujian.png" @click="fujian1()" alt="" /></span><ws-button v-if="!shippedWeight" type="primary" @click="handlefeedback()">反馈</ws-button></div>
  59. <div style="display:inline-block;margin-right:10px;"> 水单卸船重量(吨):<span v-if="unloadingWeight>0">{{unloadingWeight}}<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  60. src="../../../public/img/fujian.png" @click="fujian2()" alt="" /></span><ws-button v-if="!unloadingWeight" type="primary" @click="handledownfeedback()">反馈</ws-button></div>
  61. </div>
  62. </el-col>
  63. </el-row>
  64. <div class="freightSet" v-if="processNo">
  65. <div style="display: flex; width: 200px; line-height: 30px">
  66. 预计运费(元):{{ tranPriceIng }}元
  67. </div>
  68. <span style="display: flex; line-height: 30px">实际运费(元):
  69. <el-input type="text" maxlength="70" size="small" v-model="actualFreight" v-show="textShow" /><span
  70. v-show="!textShow">{{
  71. actualFreight ? actualFreight : tranPriceIng
  72. }}</span>元
  73. </span>
  74. <i @click="actualFreightchange" class="iconfont icon-dui" v-show="textShow" style="margin-top: 10px"></i>
  75. <img width="17" height="18" style="vertical-align: text-top; position: relative; top: 6px"
  76. src="../../../public/img/edit.png" @click="textShow = true" alt="" v-show="!textShow" />
  77. <span class="span_text">已付:{{ amountEdPayable }}元
  78. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  79. src="../../../public/img/fujian.png" @click="fujian()" alt="" />{{
  80. paymentScreenshotList.length == 0
  81. ? '暂无附件'
  82. : paymentScreenshotList.length
  83. }}</span>
  84. <span class="span_text">未付:{{ alreadyInvoice }}元</span>
  85. <span class="span_text">{{ priceStatus }}</span>
  86. </div>
  87. <el-table show-summary :summary-method="getSummaries" class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px"
  88. ref="warehouseList.records" @row-click="handleRowClick" @selection-change="handleSelectionChange">
  89. <!-- <el-table-column
  90. :selectable="selectInit"
  91. type="selection"
  92. width="55"
  93. ></el-table-column> -->
  94. <el-table-column type="index" label="序号" width="50"></el-table-column>
  95. <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
  96. <el-table-column class="table_td" prop="taskNo" label="运输任务"></el-table-column>
  97. <el-table-column class="table_td" prop="shipType" label="类型"></el-table-column>
  98. <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
  99. <el-table-column class="boxNo" prop="boxNo" label="箱号-1"></el-table-column>
  100. <el-table-column class="boxNo" prop="boxNoOther" label="箱号-2"></el-table-column>
  101. <el-table-column class="boxNo" prop="titleNo" label="封号-1"></el-table-column>
  102. <el-table-column class="boxNo" prop="titleNoOther" label="封号-2"></el-table-column>
  103. <el-table-column class="table_td" prop="loadingWeight" label="装车净重(吨)"></el-table-column>
  104. <el-table-column class="table_td" prop="unloadingWeight" label="卸车净重(吨)">
  105. </el-table-column>
  106. <el-table-column class="table_td" prop="lossWeight" label="损耗(吨)">
  107. </el-table-column>
  108. </el-table>
  109. <!-- 页数 -->
  110. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  111. :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
  112. </el-scrollbar>
  113. <!-- 付款 -->
  114. <el-dialog width="25%" title="付款" :visible.sync="dialogFormVisible1" :append-to-body="true">
  115. <el-form :model="form">
  116. <el-form-item label="未付金额(元)" :label-width="formLabelWidth">
  117. <template>
  118. <span>{{ alreadyInvoice }}</span>
  119. </template>
  120. </el-form-item>
  121. <el-form-item label="本次付款金额" :label-width="formLabelWidth">
  122. <el-input type='number' v-model="money" autocomplete="off" placeholder="请输入本次付款金额" class="deal"></el-input>
  123. </el-form-item>
  124. <el-form-item label="付款日期" prop="paymentDate" :label-width="formLabelWidth" class="deal">
  125. <ws-date-picker v-model="paymentDate" type="date" placeholder="请选择付款日期" value-format="yyyy-MM-dd"
  126. class="deal" />
  127. </el-form-item>
  128. <el-form-item label="上传付款截图" :label-width="formLabelWidth">
  129. <el-upload :action="global.uploadPath" list-type="picture-card"
  130. :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
  131. <i class="el-icon-plus"></i>
  132. </el-upload>
  133. </el-form-item>
  134. </el-form>
  135. <div slot="footer" class="dialog-footer">
  136. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  137. <el-button type="primary" @click="submitMoney()">提 交</el-button>
  138. </div>
  139. </el-dialog>
  140. <!-- 批量开发票 -->
  141. <el-dialog width="30%" title="批量开发票" :visible.sync="dialogFormVisible2" :append-to-body="true">
  142. <el-form :model="form">
  143. <el-form-item label="发票金额(元)" :label-width="formLabelWidth">
  144. <span> {{ amountEdPayable }}</span>
  145. </el-form-item>
  146. </el-form>
  147. <div slot="footer" class="dialog-footer">
  148. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  149. <el-button type="primary" @click="submitBatchInvoice()">提 交</el-button>
  150. </div>
  151. </el-dialog>
  152. <!-- 开发票 -->
  153. <el-dialog width="30%" title="开发票" :visible.sync="dialogFormVisible3" :append-to-body="true">
  154. <el-form :model="form">
  155. <el-form-item label="可开发票金额(元)" :label-width="formLabelWidth1">
  156. {{ amountEdPayable }}
  157. </el-form-item>
  158. <el-form-item label="实际发票金额(元)" :label-width="formLabelWidth1">
  159. <el-input type='number' v-model="alreadyInvoice" autocomplete="off" class="deal"></el-input>
  160. </el-form-item>
  161. </el-form>
  162. <div slot="footer" class="dialog-footer">
  163. <el-button @click="dialogFormVisible3 = false">取 消</el-button>
  164. <el-button type="primary" @click="submitInvoice()">提 交</el-button>
  165. </div>
  166. </el-dialog>
  167. <!--账户-->
  168. <el-dialog width="30%" title="账户信息" :visible.sync="dialogFormVisible8" :append-to-body="true">
  169. <h3 style="margin-left: 30px">{{ driverPayeeList.payeeName }}的账户</h3>
  170. <div v-for="(item, index) in driverPayeeList" :key="'zh'+index">
  171. <h4 style="margin-left: 30px">账户-{{ index + 1 }}</h4>
  172. <div class="anniu">
  173. <el-radio-group @change="bankCard(item, id)" v-model="item.radio">
  174. <el-radio label="1">本次收款账户</el-radio>
  175. </el-radio-group>
  176. </div>
  177. <el-form class="customer" :model="form">
  178. <el-form-item label="账户类型" :label-width="formLabelWidth">
  179. {{ item.accountType }}
  180. </el-form-item>
  181. <el-form-item label="银行卡号" :label-width="formLabelWidth">
  182. {{ item.bankCard }}
  183. </el-form-item>
  184. <el-form-item label="开户行" :label-width="formLabelWidth">
  185. {{ item.bankDeposit }}
  186. </el-form-item>
  187. <el-form-item label="开户支行" :label-width="formLabelWidth">
  188. {{ item.bankDepositBranch }}
  189. </el-form-item>
  190. <el-form-item label="收款人姓名" :label-width="formLabelWidth" v-if="item.accountTypeFlag == 1">
  191. {{ item.payeeName }}
  192. </el-form-item>
  193. <el-form-item label="收款人身份证号" :label-width="formLabelWidth" v-if="item.accountTypeFlag == 1">
  194. {{ item.payeeNumberCard }}
  195. </el-form-item>
  196. <el-form-item v-if="item.accountTypeFlag == 2" label="企业名称" :label-width="formLabelWidth">
  197. {{ item.compName }}
  198. </el-form-item>
  199. </el-form>
  200. </div>
  201. <div slot="footer" class="dialog-footer">
  202. <el-button @click="dialogFormVisible8 = false">取 消</el-button>
  203. </div>
  204. </el-dialog>
  205. <!--磅单 -->
  206. <!-- <WinseaContentModal
  207. v-model="accessoryTFs"
  208. title="磅单信息"
  209. @on-cancel="handleClose"
  210. >
  211. <p>查看装车磅单</p>
  212. <img width="100" height="100" :src="loadingImg1" alt="" />
  213. </WinseaContentModal> -->
  214. <WinseaContentModal v-model="accesscard" title="磅单信息" @on-cancel="handleClose1">
  215. <p>查看卸车磅单</p>
  216. <img width="100" height="100" :src="unloadingImg1" alt="" />
  217. </WinseaContentModal>
  218. <!--付款截图 -->
  219. <WinseaContentModal v-model="paymentImg" title="付款截图信息" @on-cancel="handleClose2">
  220. <p>查看付款截图</p>
  221. <div v-for="item in paymentScreenshot1">
  222. <img style="width: 100px; height: 100px" :src="item" alt="" />
  223. </div>
  224. </WinseaContentModal>
  225. <WinseaContentModal v-model="editshow" title="装船反馈"
  226. @on-cancel="editshow = false">
  227. <el-form :model="taskform">
  228. <el-form-item label="重量(吨)" >
  229. <el-input type='number' v-model="taskform.shippedWeight" autocomplete="off" placeholder="输入水单装船重量"></el-input>
  230. </el-form-item>
  231. <el-form-item label="水单截图" >
  232. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="taskform.unEnclosure"
  233. @onChange="onChange"
  234. accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
  235. </el-form-item>
  236. </el-form>
  237. <div slot="footer" class="dialog-footer">
  238. <el-button @click="editshow = false">取 消</el-button>
  239. <el-button @click="taskconfirm">确定</el-button>
  240. </div>
  241. </WinseaContentModal>
  242. <WinseaContentModal v-model="editshow1" title="卸船反馈"
  243. @on-cancel="editshow = false">
  244. <el-form :model="taskform">
  245. <el-form-item label="重量(吨)" >
  246. <el-input type='number' v-model="taskform.unloadingWeight" autocomplete="off" placeholder="输入水单卸船重量"></el-input>
  247. </el-form-item>
  248. <el-form-item label="水单截图" >
  249. <ws-upload ref="upload1" :comp-id="compId" :appendix-ids="taskform.enclosure"
  250. @onChange="onChange1"
  251. accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
  252. </el-form-item>
  253. </el-form>
  254. <div slot="footer" class="dialog-footer">
  255. <el-button @click="editshow1 = false">取 消</el-button>
  256. <el-button @click="taskconfirm1">确定</el-button>
  257. </div>
  258. </WinseaContentModal>
  259. <WinseaContentModal v-model="accessoryTFs1" :title="$t('system.noticeCircular.information')"
  260. @on-cancel="accessoryTFs1 = false">
  261. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="enclosure" :editable="false"
  262. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  263. </WinseaContentModal>
  264. <WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
  265. @on-cancel="accessoryTFs2 = false">
  266. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="unEnclosure" :editable="false"
  267. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  268. </WinseaContentModal>
  269. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  270. @on-cancel="accessoryTFs = false">
  271. <div v-for="(item, index) in paymentScreenshotList" :key="'fj'+index">
  272. <!-- <ws-upload ref="upload" :comp-id="compId" :appendix-ids="item" :editable="false"
  273. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" /> -->
  274. <img :src="item" alt="附件" class="img_css" />
  275. </div>
  276. </WinseaContentModal>
  277. </div>
  278. <!-- </div> -->
  279. </template>
  280. <script>
  281. import {
  282. autoList,
  283. editauto,
  284. autocontract,
  285. autopaymoney,
  286. openinvoicelist,
  287. getYunShuXiaLa,
  288. getYunShuNumber,
  289. SetYunShuPrice,
  290. edittrantask
  291. } from '@/model/statisticalReport/index'
  292. import {
  293. posthandle
  294. } from '@/model/purchasingManagement/index'
  295. import {
  296. workflowcontent
  297. } from '@/model/houseSelfCollect/index'
  298. import {
  299. downloadFile
  300. } from '@/utils/batchDown'
  301. import Pagination from '@/components/Pagination'
  302. import WsUpload from '@/components/WsUpload'
  303. import {
  304. EventBus
  305. } from 'base-core-lib'
  306. export default {
  307. name: 'viewSpareMoney',
  308. components: {
  309. WsUpload,
  310. Pagination,
  311. },
  312. watch: {
  313. vesselId(val) {
  314. this.getList()
  315. },
  316. isShow(val) {
  317. this.showType = val
  318. },
  319. },
  320. data() {
  321. return {
  322. checked: true,
  323. alreadyInvoice: '',
  324. needReapply: true,
  325. taskform:{
  326. enclosure:'',
  327. shippedWeight:'',
  328. unEnclosure:'',
  329. unloadingWeight:''
  330. },
  331. accessoryTFs1:false,
  332. editshow1:false,
  333. accessoryTFs2:false,
  334. unEnclosure:'',
  335. unloadingWeight:0,
  336. dialogFormVisible1: false,
  337. dialogFormVisible2: false,
  338. dialogFormVisible3: false,
  339. dialogFormVisible4: false,
  340. dialogFormVisible5: false,
  341. dialogFormVisible6: false,
  342. dialogFormVisible7: false,
  343. dialogFormVisible8: false,
  344. dialogFormVisible11: false,
  345. dialogVisible: false,
  346. shippedWeight:0,
  347. form: {
  348. transactionPrice: '',
  349. transactionsNumber: '',
  350. basis: '',
  351. },
  352. currect: true,
  353. formLabelWidth: '120px',
  354. formLabelWidth1: '140px',
  355. barWidth: 0,
  356. barHeight: 0,
  357. retioX: 1,
  358. ratioY: 1,
  359. isTaped: false,
  360. isHover: false,
  361. settlementWeightchange: false,
  362. deductionAmountchange: false,
  363. isShow: !this.autohide,
  364. //弹出框
  365. dialogViewSpareMoney: false,
  366. contractNoList: [],
  367. // 是否显示
  368. showType: true,
  369. // 年
  370. year: '',
  371. options: [],
  372. id: '',
  373. pickerOptions: {},
  374. value2: '',
  375. deptBudgetTotal: 0,
  376. currentPage: 1,
  377. pageSize: 10,
  378. searchType: '',
  379. manualFlag: '',
  380. searchTypeText: '未完成',
  381. searchKeyWord: '',
  382. startAddress:'',
  383. driverPayeeList: {
  384. radio: '1',
  385. },
  386. contractType: 2,
  387. accessoryTFs: false,
  388. accesscard: false,
  389. paymentImg: false,
  390. enter: {
  391. closePositionList: [],
  392. },
  393. taskNoList: [],
  394. processNoList: [],
  395. taskNo: '',
  396. processNo: '',
  397. textShow: false,
  398. actualFreight: '',
  399. processNoId: '',
  400. tranPriceIng: '',
  401. // 提交类型
  402. submitType: true,
  403. size: 10,
  404. spanArr: [],
  405. contractNo: '全部合同',
  406. inOutTaskNo: '',
  407. compId: localStorage.getItem('ws-pf_compId'),
  408. roleId: localStorage.getItem('ws-pf_roleId'),
  409. deptCircularPage: {},
  410. warehouseList: [],
  411. orderList: {},
  412. deptBudgetList: {},
  413. id: '',
  414. currecttask:{},
  415. pcFlag: 1,
  416. carryoverlist: {},
  417. modification: [],
  418. loadingImg1: [],
  419. unloadingImg1: [],
  420. paymentScreenshot1: [],
  421. amendlist: {},
  422. roleFlag: 1,
  423. alreadyInvoice1: 0,
  424. money: '',
  425. paymentDate: '',
  426. tranSettlementReportList: [],
  427. autoSettlementReport: {
  428. tranSettlementReportList: [],
  429. money: '',
  430. amountNotPayable: 0,
  431. amountEdPayable: 0,
  432. paymentDate: '',
  433. paymentScreenshot: '',
  434. id: '',
  435. },
  436. shipName:'',
  437. shipNo:'',
  438. enclosure:'',
  439. editshow:false,
  440. amountNotPayable: 0,
  441. amountEdPayable: 0,
  442. paymentScreenshotUrls: [],
  443. carryovercontractnolist: [],
  444. historyList: [],
  445. taskNoList1:[],
  446. pickerBeginDateBefore: {
  447. disabledDate: (time) => {
  448. return time.getTime() > Date.now()
  449. },
  450. },
  451. amountEdPayable: '', //已付金额
  452. alreadyInvoice: '', //未付金额
  453. priceStatus: '', //状态
  454. paymentScreenshotList: [], //付款截图
  455. }
  456. },
  457. activated() {
  458. this.contractNoList = []
  459. getYunShuXiaLa({
  460. flag: 1,
  461. })
  462. .toPromise()
  463. .then((response) => {
  464. for (let i = 0; i < response.length; i++) {
  465. this.contractNoList.push({
  466. constKey: i,
  467. contractNo: response[i],
  468. })
  469. }
  470. this.contractNoList.unshift({
  471. contractNo: '全部合同'
  472. })
  473. this.options = this.contractNoList
  474. })
  475. this.getList()
  476. this.showType = this.isShow
  477. },
  478. methods: {
  479. getSummaries(param) {
  480. const { columns, data } = param;
  481. const sums = [];
  482. columns.forEach((column, index) => {
  483. if (index === 0) {
  484. sums[index] = '合计';
  485. return;
  486. }
  487. const values = data.map(item => Number(item[column.property]));
  488. if (!values.every(value => isNaN(value))) {
  489. if(index==9||index==10){
  490. sums[index] = values.reduce((prev, curr) => {
  491. const value = Number(curr);
  492. if (!isNaN(value)) {
  493. return prev + curr;
  494. } else {
  495. return prev;
  496. }
  497. }, 0).toFixed(2)
  498. }
  499. } else {
  500. sums[index] = '';
  501. }
  502. });
  503. return sums;
  504. },
  505. onChange() {
  506. this.$refs.upload
  507. .handleSaveBill()
  508. .then(async response => {
  509. this.taskform.enclosure = response
  510. })
  511. .catch(res => {
  512. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  513. this.$refs.upload.clearFiles()
  514. })
  515. },
  516. onChange1() {
  517. this.$refs.upload1
  518. .handleSaveBill()
  519. .then(async response => {
  520. this.taskform.unEnclosure = response
  521. })
  522. .catch(res => {
  523. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  524. this.$refs.upload1.clearFiles()
  525. })
  526. },
  527. handlefeedback(){
  528. this.taskform.enclosure=this.enclosure
  529. this.taskform.shippedWeight=this.shippedWeight
  530. this.editshow=true
  531. },
  532. handledownfeedback(){
  533. this.taskform.unEnclosure=this.unEnclosure
  534. this.taskform.unloadingWeight=this.unloadingWeight
  535. this.editshow1=true
  536. },
  537. taskconfirm(){
  538. if(!this.taskform.shippedWeight){
  539. this.$message.warning('水单装船重量不能为空')
  540. return
  541. }
  542. if(!this.taskform.enclosure){
  543. this.$message.warning('至少上传一个水单截图')
  544. return
  545. }
  546. this.$confirm(`水单信息提交后不可修改,确认提交?`, {
  547. cancelButtonText: '取消',
  548. confirmButtonText: '确定',
  549. type: 'warning',
  550. }).then(() => {
  551. edittrantask({id:this.currecttask.id,shippedWeight:this.taskform.shippedWeight,enclosure:this.taskform.enclosure,tranProcessInfoList:[]}).toPromise().then((response) => {
  552. this.editshow=false
  553. this.taskform={}
  554. this.$refs.upload.clearFiles()
  555. this.$message.success('提交成功')
  556. this.$nextTick(()=>{
  557. this.$router.go(0)
  558. })
  559. })
  560. .catch((response) => {
  561. EventBus.$emit('error', response.message)
  562. })
  563. })
  564. },
  565. taskconfirm1(){
  566. if(!this.taskform.unloadingWeight){
  567. this.$message.warning('水单卸船重量不能为空')
  568. return
  569. }
  570. if(!this.taskform.unEnclosure){
  571. this.$message.warning('至少上传一个水单截图')
  572. return
  573. }
  574. this.$confirm(`水单信息提交后不可修改,确认提交?`, {
  575. cancelButtonText: '取消',
  576. confirmButtonText: '确定',
  577. type: 'warning',
  578. }).then(() => {
  579. edittrantask({id:this.currecttask.id,unloadingWeight:this.taskform.unloadingWeight,unEnclosure:this.taskform.unEnclosure,tranProcessInfoList:[]}).toPromise().then((response) => {
  580. this.editshow=false
  581. this.taskform={}
  582. this.$refs.upload1.clearFiles()
  583. this.$message.success('提交成功')
  584. this.$nextTick(()=>{
  585. this.$router.go(0)
  586. })
  587. })
  588. .catch((response) => {
  589. EventBus.$emit('error', response.message)
  590. })
  591. })
  592. },
  593. find(){
  594. this.getList()
  595. },
  596. fujian() {
  597. if (this.paymentScreenshotList.length == 0) {
  598. EventBus.$emit(
  599. 'warning',
  600. this.$t('system.noticeCircular.NoInformation')
  601. )
  602. } else {
  603. this.accessoryTFs = true
  604. }
  605. // this.appendixIdss = row.addressUrl
  606. },
  607. fujian1() {
  608. console.log(this.enclosure)
  609. this.accessoryTFs1 = true
  610. },
  611. fujian2() {
  612. console.log(this.enclosure)
  613. this.accessoryTFs2 = true
  614. },
  615. cur(status) {
  616. if (status == 0) {
  617. this.currect = true
  618. } else {
  619. var that = this
  620. this.currect = false
  621. getselectctcontractno({
  622. customerName: this.modification[0].customerName,
  623. contractNo: this.modification[0].contractNo,
  624. })
  625. .toPromise()
  626. .then((response) => {
  627. that.carryovercontractnolist = response
  628. for (var i = 0; i < that.carryovercontractnolist.length; i++) {
  629. if (that.carryovercontractnolist[i].amountNotPayable > 0) {
  630. that.carryovercontractnolist[i].closeaccountstatus = '待结算'
  631. } else {
  632. that.carryovercontractnolist[i].closeaccountstatus = '已结算'
  633. }
  634. }
  635. })
  636. .catch((response) => {
  637. console.log(response)
  638. EventBus.$emit('error', response.message)
  639. })
  640. }
  641. },
  642. handleRowClick(row) {
  643. if (row.approveStatus == null) {
  644. this.$refs.warehouseList.toggleRowSelection(row)
  645. return true
  646. } else if (row.approveStatus != null) {
  647. if (row.taskId == null) {
  648. return false
  649. } else {
  650. this.$refs.warehouseList.toggleRowSelection(row)
  651. return true
  652. }
  653. }
  654. },
  655. selectInit(row) {
  656. //在这里一定要记得类型匹配的上。
  657. if (row.approveStatus == null) {
  658. return true
  659. } else if (row.approveStatus != null) {
  660. if (row.taskId == null) {
  661. return false
  662. } else {
  663. return true
  664. }
  665. }
  666. },
  667. handleClose() {
  668. this.accessoryTFs = false
  669. },
  670. handleClose1() {
  671. this.accesscard = false
  672. },
  673. handleClose2() {
  674. this.paymentImg = false
  675. },
  676. //账户
  677. look(item) {
  678. this.dialogFormVisible8 = true
  679. if (item.driverPayeeInfoList) {
  680. this.driverPayeeList = item.driverPayeeInfoList
  681. this.driverPayeeList.payeeName = item.driverPayeeInfoList[0].payeeName
  682. for (var i = 0; i < item.driverPayeeInfoList.length; i++) {
  683. if (item.driverPayeeInfoList[i].bankCard == item.cardNo) {
  684. this.driverPayeeList[i].radio = '1'
  685. } else {
  686. this.driverPayeeList[i].radio = '2'
  687. }
  688. }
  689. this.id = item.id
  690. }
  691. },
  692. //付款
  693. handlepayment() {
  694. this.amountNotPayable =
  695. this.warehouseList.records[0].tranSettlementReportList //未付金额
  696. // this.money = this.money
  697. this.tranSettlementReportList =
  698. this.warehouseList.records[0].tranSettlementReportList
  699. this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
  700. // this.paymentDate = this.paymentDate
  701. if (this.warehouseList.records.length == 0) {
  702. this.$message.warning('付款的条目为空')
  703. } else {
  704. for (var i = 0; i < this.warehouseList.records.length; i++) {
  705. if (
  706. this.warehouseList.records[i].status != '已通过' &&
  707. this.warehouseList.records[i].status != '部分付款'
  708. ) {
  709. this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
  710. return
  711. }
  712. this.amountNotPayable += Number(this.modification[i].amountNotPayable)
  713. }
  714. this.dialogFormVisible1 = true
  715. }
  716. },
  717. submitMoney() {
  718. this.autoSettlementReport.money = this.money
  719. this.autoSettlementReport.paymentDate = this.paymentDate
  720. if (this.warehouseList.records.length == 0) {
  721. this.$message.warning('请选择一条要付款的条目')
  722. } else {
  723. if (
  724. this.money < 0 ||
  725. (String(this.money).indexOf('.') != -1 &&
  726. String(this.money).length - (String(this.money).indexOf('.') + 1) >
  727. 2)
  728. ) {
  729. this.$message({
  730. message: '付款金额输入错误',
  731. type: 'warning',
  732. })
  733. return
  734. }
  735. if (this.money) {
  736. if (isNaN(this.money)) {
  737. this.$message({
  738. message: '付款金额非数字!',
  739. type: 'warning',
  740. })
  741. return
  742. }
  743. }
  744. if (!this.money) {
  745. this.$message({
  746. message: '付款金额不能为空!',
  747. type: 'warning',
  748. })
  749. return
  750. }
  751. if (Number(this.money) > Number(this.alreadyInvoice)) {
  752. this.$message({
  753. message: '付款金额不能大于未付金额!',
  754. type: 'warning',
  755. })
  756. return
  757. }
  758. this.$confirm(`确定提交付款信息?`, {
  759. cancelButtonText: '取消',
  760. confirmButtonText: '确定',
  761. type: 'warning',
  762. }).then(() => {
  763. autopaymoney({
  764. tranSettlementReportList: this.warehouseList.records,
  765. // amountEdPayable: this.modification[0].amountEdPayable,
  766. // amountNotPayable: this.modification[0].amountNotPayable,
  767. tranTypeKey: 3,
  768. money: this.money,
  769. paymentDate: this.paymentDate,
  770. paymentScreenshot: this.paymentScreenshot,
  771. })
  772. .toPromise()
  773. .then((response) => {
  774. this.$notify.success({
  775. title: '成功',
  776. message: '付款成功',
  777. })
  778. this.tranSettlementReportList = {}
  779. this.money = ''
  780. this.paymentDate = ''
  781. this.dialogFormVisible1 = false
  782. this.getList()
  783. })
  784. .catch((response) => {
  785. EventBus.$emit('error', response.message)
  786. })
  787. })
  788. }
  789. },
  790. //开发票
  791. editClickInvoice(row) {
  792. this.id = row.id
  793. this.alreadyInvoice1 = row.alreadyInvoice
  794. this.amountEdPayable = row.amountEdPayable
  795. this.amountNotPayable = row.amountNotPayable
  796. this.dialogFormVisible3 = 'true'
  797. },
  798. submitInvoice() {
  799. if (this.amountEdPayable < 0) {
  800. this.$message.warning('请选择一条已付款的条目')
  801. } else {
  802. if (
  803. this.alreadyInvoice < 0 ||
  804. this.alreadyInvoice > this.amountEdPayable - this.alreadyInvoice1 ||
  805. (String(this.alreadyInvoice).indexOf('.') != -1 &&
  806. String(this.alreadyInvoice).length -
  807. (String(this.alreadyInvoice).indexOf('.') + 1) >
  808. 2)
  809. ) {
  810. this.$message({
  811. message: '金额输入错误',
  812. type: 'warning',
  813. })
  814. return
  815. }
  816. if (this.alreadyInvoice) {
  817. if (isNaN(this.alreadyInvoice)) {
  818. this.$message({
  819. message: '金额非数字!',
  820. type: 'warning',
  821. })
  822. return
  823. }
  824. }
  825. if (!this.alreadyInvoice) {
  826. this.$message({
  827. message: '金额不能为空!',
  828. type: 'warning',
  829. })
  830. return
  831. }
  832. this.$confirm(`确定提交发票信息?`, {
  833. cancelButtonText: '取消',
  834. confirmButtonText: '确定',
  835. type: 'warning',
  836. }).then(() => {
  837. editauto({
  838. id: this.id,
  839. flag: 2,
  840. alreadyInvoice: this.alreadyInvoice,
  841. amountEdPayable: this.amountEdPayable,
  842. amountNotPayable: this.amountNotPayable,
  843. })
  844. .toPromise()
  845. .then((response) => {
  846. this.$notify.success({
  847. title: '成功',
  848. message: '提交成功',
  849. })
  850. this.dialogFormVisible3 = false
  851. this.getList()
  852. })
  853. .catch((response) => {
  854. console.log(response)
  855. EventBus.$emit('error', response.message)
  856. })
  857. })
  858. }
  859. },
  860. //批量开发票
  861. handleninvoice() {
  862. this.amountEdPayable = 0
  863. this.tranSettlementReportList =
  864. this.warehouseList.records[0].tranSettlementReportList
  865. for (var i = 0; i < this.modification.length; i++) {
  866. this.amountEdPayable += this.modification[i].amountEdPayable
  867. }
  868. this.dialogFormVisible2 = true
  869. },
  870. submitBatchInvoice() {
  871. if (this.modification.length == 0) {
  872. this.$message.warning('请选择一条要开发票的条目')
  873. } else if (this.modification[0].amountEdPayable < 0) {
  874. this.$message.warning('请选择一条已付款的条目')
  875. } else {
  876. this.$confirm(`确定提交发票信息?`, {
  877. cancelButtonText: '取消',
  878. confirmButtonText: '确定',
  879. type: 'warning',
  880. }).then(() => {
  881. openinvoicelist({
  882. tranSettlementReportList: this.modification,
  883. })
  884. .toPromise()
  885. .then((response) => {
  886. this.$notify.success({
  887. title: '成功',
  888. message: '提交成功',
  889. })
  890. this.dialogFormVisible2 = false
  891. this.getList()
  892. })
  893. .catch((response) => {
  894. console.log(response)
  895. EventBus.$emit('error', response.message)
  896. })
  897. })
  898. }
  899. },
  900. //修改结算重量
  901. changesettlementWeight(item) {
  902. if (!this.settlementWeight) {
  903. this.$message({
  904. message: '结算重量不能为空!',
  905. type: 'warning',
  906. })
  907. return
  908. }
  909. if (
  910. (this.settlementWeight &&
  911. String(this.settlementWeight).indexOf('.') != -1 &&
  912. String(this.settlementWeight).length -
  913. (String(this.settlementWeight).indexOf('.') + 1) >
  914. 2) ||
  915. (this.settlementWeight && this.settlementWeight > 100) ||
  916. (this.settlementWeight && this.settlementWeight < 1)
  917. ) {
  918. this.$message({
  919. message: '结算重量输入错误',
  920. type: 'warning',
  921. })
  922. return
  923. }
  924. editauto({
  925. settlementWeight: Math.abs(this.settlementWeight),
  926. id: item.id,
  927. flag: 0,
  928. })
  929. .toPromise()
  930. .then((response) => {
  931. this.$message.success('修改结算重量成功')
  932. this.getList()
  933. })
  934. .catch((req) => {
  935. this.$message.warning('修改结算重量失败')
  936. })
  937. },
  938. //设置本次账户
  939. bankCard(item, id) {
  940. editauto({
  941. cardNo: item.bankCard,
  942. id: id,
  943. flag: 3,
  944. })
  945. .toPromise()
  946. .then((response) => {
  947. this.$message.success('成功')
  948. this.dialogFormVisible8 = false
  949. this.getList()
  950. })
  951. .catch((req) => {
  952. this.$message.warning('失败')
  953. })
  954. },
  955. editsettlementWeight(item) {
  956. this.settlementWeight = item.settlementWeight
  957. item.settlementWeightchange = true
  958. },
  959. //修改扣款
  960. changedeductionAmount(item) {
  961. if (!this.deductionAmount) {
  962. this.$message({
  963. message: '扣款金额不能为空!',
  964. type: 'warning',
  965. })
  966. return
  967. }
  968. if (
  969. (this.deductionAmount &&
  970. String(this.deductionAmount).indexOf('.') != -1 &&
  971. String(this.deductionAmount).length -
  972. (String(this.deductionAmount).indexOf('.') + 1) >
  973. 2) ||
  974. (this.deductionAmount && this.deductionAmount > 100000) ||
  975. (this.deductionAmount && this.deductionAmount < 1)
  976. ) {
  977. this.$message({
  978. message: '扣款金额输入错误',
  979. type: 'warning',
  980. })
  981. return
  982. }
  983. editauto({
  984. deductionAmount: Math.abs(this.deductionAmount),
  985. id: item.id,
  986. flag: 1,
  987. })
  988. .toPromise()
  989. .then((response) => {
  990. this.$message.success('修改扣款成功')
  991. this.getList()
  992. })
  993. .catch((req) => {
  994. this.$message.warning('修改扣款失败')
  995. })
  996. },
  997. editdeductionAmount(item) {
  998. this.deductionAmount = item.deductionAmount
  999. item.deductionAmountchange = true
  1000. },
  1001. //装车磅单
  1002. lookloadingImg(row) {
  1003. if (row.loadingImg == null || row.loadingImg == '') {
  1004. EventBus.$emit(this.$message.warning('暂无磅单信息'))
  1005. } else {
  1006. this.accessoryTFs = true
  1007. }
  1008. this.loadingImg1 = row.loadingImg
  1009. },
  1010. //卸车磅单
  1011. lookunloadingImg(row) {
  1012. if (row.unloadingImg === null || row.unloadingImg === '') {
  1013. EventBus.$emit(this.$message.warning('暂无磅单信息'))
  1014. } else {
  1015. this.accesscard = true
  1016. }
  1017. this.unloadingImg1 = row.unloadingImg
  1018. },
  1019. //付款截图
  1020. lookpaymentScreenshot(row) {
  1021. if (row.paymentScreenshot == null || row.paymentScreenshot == '') {
  1022. EventBus.$emit(this.$message.warning('暂无付款截图信息'))
  1023. } else {
  1024. this.paymentImg = true
  1025. }
  1026. this.paymentScreenshot1 = row.paymentScreenshot.split('$')
  1027. },
  1028. //审核
  1029. audit(item, index, status, status2, reason) {
  1030. if (index < this.warehouseList.records.length) {
  1031. posthandle({
  1032. taskId: item.taskId,
  1033. approved: status,
  1034. auditMind: reason != undefined ? '已驳回' : '34',
  1035. needReapply: status2 != undefined ? true : false,
  1036. })
  1037. .toPromise()
  1038. .then((response) => {
  1039. if (index == 0) {
  1040. workflowcontent({
  1041. workflowId: item.workflowId,
  1042. businessKey: item.id,
  1043. type: '船运结算报表'
  1044. }).toPromise()
  1045. .then((response1) => {
  1046. })
  1047. }
  1048. this.audit(this.warehouseList.records[index + 1], index + 1, status)
  1049. })
  1050. .catch((req) => {
  1051. this.$message.warning(req.message)
  1052. })
  1053. } else {
  1054. if (status == true) {
  1055. this.$message.success('通过成功')
  1056. this.getList()
  1057. } else if (status == false) {
  1058. this.$message.success('驳回成功')
  1059. this.getList()
  1060. }
  1061. }
  1062. },
  1063. handlereject(status) {
  1064. var that = this
  1065. if (this.warehouseList.records.length == 0) {
  1066. this.$message.warning('请选择要驳回的条目')
  1067. } else {
  1068. this.$confirm(`是否确定驳回?`, {
  1069. cancelButtonText: '取消',
  1070. confirmButtonText: '确定',
  1071. type: 'warning',
  1072. }).then(() => {
  1073. that.audit(this.warehouseList.records[0], 0, false, true, '已驳回')
  1074. })
  1075. }
  1076. },
  1077. dataFilter(val) {
  1078. // console.log(val,"名")
  1079. this.contractNo = val
  1080. if (val) {
  1081. //val存在
  1082. this.options = this.contractNoList.filter((item) => {
  1083. if (
  1084. !!~item.contractNo.indexOf(val) ||
  1085. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  1086. ) {
  1087. return true
  1088. }
  1089. })
  1090. } else {
  1091. //val为空时,还原数组
  1092. this.options = this.contractNoList
  1093. }
  1094. },
  1095. handlepass() {
  1096. var that = this
  1097. if (this.warehouseList.records.length == 0) {
  1098. this.$message.warning('没有要审核的!')
  1099. } else {
  1100. this.$confirm(`是否确定通过?`, {
  1101. cancelButtonText: '取消',
  1102. confirmButtonText: '确定',
  1103. type: 'warning',
  1104. }).then(() => {
  1105. that.audit(this.warehouseList.records[0], 0, true, 2)
  1106. })
  1107. }
  1108. },
  1109. handleSelectionChange(val) {
  1110. this.modification = val
  1111. },
  1112. handlestatus(status) {
  1113. this.searchType = status
  1114. this.getList()
  1115. },
  1116. contractchange(e) {
  1117. this.contractNo = e
  1118. this.taskNoList = []
  1119. this.taskNo = ''
  1120. this.processNoList = []
  1121. this.processNo = ''
  1122. getYunShuNumber({
  1123. contractNo: this.contractNo,
  1124. flag: 1,
  1125. })
  1126. .toPromise()
  1127. .then((response) => {
  1128. this.taskNoList1=response
  1129. for (let i = 0; i < response.length; i++) {
  1130. this.taskNoList.push({
  1131. taskNoKey: i,
  1132. taskNoValue: response[i].taskNo,
  1133. processNo: response[i].tranProcessInfoList,
  1134. })
  1135. this.taskNo=response[0].taskNo
  1136. this.shipName=response[0].shipName
  1137. this.shipNo=response[0].shipNo
  1138. this.shippedWeight=response[0].shippedWeight
  1139. this.enclosure=response[0].enclosure
  1140. this.unloadingWeight=response[0].unloadingWeight
  1141. this.unEnclosure=response[0].unEnclosure
  1142. this.currecttask=response[0]
  1143. this.getList()
  1144. }
  1145. })
  1146. },
  1147. taskNochange(e) {
  1148. this.taskNo = e
  1149. this.getList()
  1150. // this.processNoList = []
  1151. // this.processNo = ''
  1152. for (let i = 0; i < this.taskNoList1.length; i++) {
  1153. if (e == this.taskNoList1[i].taskNo) {
  1154. this.shipName=this.taskNoList1[i].shipName
  1155. this.shipNo=this.taskNoList1[i].shipNo
  1156. this.enclosure=this.taskNoList1[i].enclosure
  1157. this.shippedWeight=this.taskNoList1[i].shippedWeight
  1158. this.unEnclosure=this.taskNoList1[i].unEnclosure
  1159. this.unloadingWeight=this.taskNoList1[i].unloadingWeight
  1160. this.currecttask=this.taskNoList1[i]
  1161. // for (let j = 0; j < this.taskNoList.length; j++) {
  1162. // this.processNoList.push({
  1163. // processNoKey: i,
  1164. // processNoValue: this.taskNoList[i].processNo[j].processNo,
  1165. // actualFreight: this.taskNoList[i].processNo[j].actualFreight,
  1166. // id: this.taskNoList[i].processNo[j].id,
  1167. // tranPriceIng: this.taskNoList[i].processNo[j].tranPrice,
  1168. // priceStatus: this.taskNoList[i].processNo[j].priceStatus,
  1169. // })
  1170. // }
  1171. }
  1172. }
  1173. },
  1174. processNochange(e) {
  1175. this.processNo = e
  1176. for (let i = 0; i < this.processNoList.length; i++) {
  1177. if (this.processNoList[i].processNoValue == e) {
  1178. this.actualFreight = this.processNoList[i].actualFreight
  1179. this.processNoId = this.processNoList[i].id
  1180. this.tranPriceIng = this.processNoList[i].tranPriceIng
  1181. this.priceStatus = this.processNoList[i].priceStatus
  1182. }
  1183. }
  1184. this.getList()
  1185. },
  1186. actualFreightchange() {
  1187. // this.actualFreight
  1188. this.$confirm(`是否提交实际总价?`, {
  1189. cancelButtonText: '取消',
  1190. confirmButtonText: '确定',
  1191. type: 'warning',
  1192. }).then(() => {
  1193. SetYunShuPrice({
  1194. actualFreight: this.actualFreight,
  1195. id: this.processNoId,
  1196. flag: 3,
  1197. })
  1198. .toPromise()
  1199. .then((response) => {
  1200. this.$notify.success({
  1201. title: '成功',
  1202. message: '实际运费总价设置成功',
  1203. })
  1204. this.textShow = false
  1205. })
  1206. })
  1207. },
  1208. updated() {
  1209. this.$nextTick(() => {
  1210. this.$refs.warehouseList.doLayout()
  1211. })
  1212. },
  1213. //合计
  1214. // getSummaries(param) {
  1215. // const { columns, data } = param
  1216. // const sums = []
  1217. // columns.forEach((column, index) => {
  1218. // if (index === 0) {
  1219. // sums[index] = '合计'
  1220. // } else if (
  1221. // index === 13 ||
  1222. // index === 14 ||
  1223. // index === 15 ||
  1224. // index === 16
  1225. // ) {
  1226. // const values = data.map((item) => Number(item[column.property]))
  1227. // if (!values.every((value) => isNaN(value))) {
  1228. // sums[index] = values.reduce((prev, curr) => {
  1229. // const value = Number(curr)
  1230. // if (!isNaN(value)) {
  1231. // return prev + curr
  1232. // } else {
  1233. // return prev
  1234. // }
  1235. // }, 0)
  1236. // } else {
  1237. // sums[index] = '元'
  1238. // }
  1239. // } else {
  1240. // sums[index] = '--'
  1241. // }
  1242. // })
  1243. // return sums
  1244. // },
  1245. //列表
  1246. getList() {
  1247. autoList({
  1248. compId: localStorage.getItem('ws-pf_compId'),
  1249. tranTypeKey: 3,
  1250. currentPage: this.currentPage,
  1251. pageSize: this.pageSize,
  1252. searchType: this.searchType,
  1253. contractNo: this.contractNo,
  1254. manualFlag: this.manualFlag,
  1255. taskNo: this.taskNo,
  1256. startAddress:this.startAddress,
  1257. processNo: this.processNo,
  1258. })
  1259. .toPromise()
  1260. .then((response) => {
  1261. for (var i = 0; i < response.records.length; i++) {
  1262. response.records[i].settlementWeightchange = false
  1263. response.records[i].deductionAmountchange = false
  1264. response.records[i].amountNotPayable =
  1265. response.records[i].amountIngPayable -
  1266. response.records[i].amountEdPayable
  1267. if (this.processNo) {
  1268. if (response.records[0].paymentScreenshot) {
  1269. this.paymentScreenshotList =
  1270. response.records[0].paymentScreenshot.split(',') //附件地址取运输阶段第一条
  1271. this.paymentScreenshot = response.records[0].paymentScreenshot
  1272. }
  1273. }
  1274. }
  1275. if (response.records.length > 0) {
  1276. this.amountEdPayable = response.records[0].amountEdPayable // 已付
  1277. this.alreadyInvoice = response.records[0].amountNotPayable //未付
  1278. }
  1279. this.deptBudgetTotal = response.total
  1280. this.warehouseList = response
  1281. })
  1282. },
  1283. handleRemove(file) {
  1284. console.log(file)
  1285. },
  1286. handlePictureCardPreview(file) {
  1287. if (this.paymentScreenshot) {
  1288. this.paymentScreenshot += ',' + file.data.url
  1289. } else {
  1290. this.paymentScreenshot = file.data.url
  1291. }
  1292. this.dialogVisible = true
  1293. },
  1294. handleDownload(file) {
  1295. console.log(file)
  1296. },
  1297. getSpanArr(data) {
  1298. let that = this
  1299. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  1300. that.spanArr = []
  1301. that.pos = 0
  1302. // //遍历数据
  1303. data.forEach((item, index) => {
  1304. //判断是否是第一项
  1305. if (index === 0) {
  1306. this.spanArr.push(1)
  1307. this.pos = 0
  1308. } else {
  1309. //不是第一项时,就根据标识去存储
  1310. if (data[index].warehouseNumViewList.length > 1) {
  1311. 查找到符合条件的数据时每次要把之前存储的数据 + 1
  1312. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  1313. this.spanArr.push(0)
  1314. } else {
  1315. // 没有符合的数据时,要记住当前的index
  1316. this.spanArr.push(1)
  1317. this.pos = index
  1318. }
  1319. }
  1320. })
  1321. },
  1322. dateFormat(fmt, date) {
  1323. let ret
  1324. const opt = {
  1325. 'Y+': date.getFullYear().toString(), // 年
  1326. 'm+': (date.getMonth() + 1).toString(), // 月
  1327. 'd+': date.getDate().toString(), // 日
  1328. 'H+': date.getHours().toString(), // 时
  1329. // "M+": date.getMinutes().toString(), // 分
  1330. // "S+": date.getSeconds().toString() // 秒
  1331. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  1332. }
  1333. for (let k in opt) {
  1334. ret = new RegExp('(' + k + ')').exec(fmt)
  1335. if (ret) {
  1336. fmt = fmt.replace(
  1337. ret[1],
  1338. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  1339. )
  1340. }
  1341. }
  1342. return fmt
  1343. },
  1344. handleSizeChange(val) {
  1345. console.log(`每页 ${val} 条`)
  1346. this.pageSize = val
  1347. this.getList()
  1348. },
  1349. handleCurrentChange(val) {
  1350. this.currentPage = val
  1351. console.log(`当前页: ${val}`)
  1352. this.getList()
  1353. },
  1354. // 关闭 dialog时 处理文件url 初始化upload组件
  1355. handleCloe() {
  1356. this.dialogViewSpareMoney = false
  1357. },
  1358. history(row) {
  1359. billoperatehis({
  1360. id: row.id
  1361. })
  1362. .toPromise()
  1363. .then((response) => {
  1364. this.historyList = response
  1365. })
  1366. },
  1367. total() {},
  1368. },
  1369. }
  1370. </script>
  1371. <style lang="scss" scoped>
  1372. .connert {
  1373. width: 90%;
  1374. margin: 0 auto;
  1375. }
  1376. .vertical-text-left {
  1377. width: 62px;
  1378. text-align: right;
  1379. }
  1380. //分页
  1381. .el-pagination {
  1382. padding: 10px 15px;
  1383. margin-bottom: 0;
  1384. text-align: center;
  1385. }
  1386. /deep/.el-pager li.active {
  1387. color: #5878e8;
  1388. cursor: default;
  1389. }
  1390. /deep/.el-pager li:hover {
  1391. color: #5878e8;
  1392. cursor: default;
  1393. }
  1394. .el-button--default {
  1395. color: #8890b1;
  1396. border-color: #e8eaf1;
  1397. }
  1398. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  1399. width: 30px;
  1400. margin-left: 0;
  1401. border-top-left-radius: 0px;
  1402. border-bottom-left-radius: 0px;
  1403. }
  1404. .completed.el-button--default {
  1405. border-color: #5878e8;
  1406. background-color: #f6f7fc;
  1407. color: #5878e8;
  1408. }
  1409. .putstorage.el-button--default,
  1410. .deliverystorage.el-button--default {
  1411. border-color: #8890b1;
  1412. background-color: #fff;
  1413. color: #8890b1;
  1414. }
  1415. /deep/.el-table td,
  1416. /deep/.el-table th.is-leaf {
  1417. border-right: 1px solid #e9ecf7;
  1418. text-align: center;
  1419. }
  1420. /deep/.el-table tr td:first-child,
  1421. /deep/.el-table tr th.is-leaf:first-child {
  1422. border-left: 1px solid #e9ecf7;
  1423. }
  1424. .record,
  1425. .adjustment {
  1426. display: inline-block;
  1427. color: #5878e8;
  1428. padding: 0 4px !important;
  1429. position: relative;
  1430. }
  1431. .record:after {
  1432. position: absolute;
  1433. content: '';
  1434. display: block;
  1435. top: 5px;
  1436. right: -2px;
  1437. width: 1px;
  1438. height: 12px;
  1439. background: #e9ecf7;
  1440. }
  1441. .anniu {
  1442. margin-left: 40%;
  1443. margin-top: -7%;
  1444. margin-bottom: 6%;
  1445. }
  1446. // .el-row{
  1447. // height: 150px;
  1448. // }
  1449. .base_header_layout .grid-content {
  1450. margin-top: 80px;
  1451. }
  1452. .el-input--small .el-input__inner {
  1453. margin-left: 20px;
  1454. }
  1455. .el-range-editor--small.el-input__inner {
  1456. height: 32px;
  1457. margin-left: -20%;
  1458. }
  1459. //执行样式
  1460. .executory,
  1461. .inExecution,
  1462. .done {
  1463. width: 6px;
  1464. height: 6px;
  1465. display: inline-block;
  1466. border-radius: 50%;
  1467. position: relative;
  1468. top: -1px;
  1469. font-size: 14px;
  1470. }
  1471. .executory {
  1472. background: #ff9f24;
  1473. }
  1474. .inExecution {
  1475. background: #5878e8;
  1476. }
  1477. .done {
  1478. background: #50cad4;
  1479. }
  1480. .record,
  1481. .adjustment {
  1482. display: inline-block;
  1483. color: #5878e8;
  1484. padding: 0 4px !important;
  1485. position: relative;
  1486. font-size: 14px;
  1487. }
  1488. .container {
  1489. overflow: scroll;
  1490. height: 93vh;
  1491. }
  1492. .button-container {
  1493. display: flex;
  1494. flex-wrap: nowrap;
  1495. justify-content: space-between;
  1496. align-items: center;
  1497. background-color: #fff;
  1498. width: 100%;
  1499. height: 50px;
  1500. padding: 0 10px;
  1501. &>div {
  1502. margin-left: 10px;
  1503. display: flex;
  1504. flex-wrap: nowrap;
  1505. flex-direction: row;
  1506. &>span {
  1507. line-height: 50px;
  1508. }
  1509. }
  1510. /deep/.auditFlow-box {
  1511. position: unset;
  1512. margin-left: 10px;
  1513. &/deep/.auditFlow-icon {
  1514. width: auto;
  1515. padding-right: 30px;
  1516. }
  1517. &/deep/.auditFlow-main {
  1518. position: absolute;
  1519. }
  1520. }
  1521. }
  1522. .bg-left {
  1523. padding-left: 30px;
  1524. }
  1525. .title {
  1526. position: relative;
  1527. }
  1528. .title::before {
  1529. content: '';
  1530. display: inline-block;
  1531. width: 5px;
  1532. height: 30px;
  1533. background: #5473e8;
  1534. position: absolute;
  1535. left: 0;
  1536. }
  1537. .el-button--primary {
  1538. background-color: #5878e8;
  1539. border-color: #5878e8;
  1540. // margin-left: 85%;
  1541. margin-top: 13px;
  1542. }
  1543. //导航条样式
  1544. .el-col-12 {
  1545. width: 50%;
  1546. height: 60px;
  1547. background: #f6f7fc;
  1548. border-radius: 4px 4px 1px 1px;
  1549. }
  1550. .el-input--small .el-input__inner {
  1551. height: 32px;
  1552. line-height: 32px;
  1553. width: 385px;
  1554. margin-top: 10px;
  1555. }
  1556. .bg-bottom {
  1557. margin-left: 85%;
  1558. }
  1559. .but {
  1560. margin-left: 30%;
  1561. /* margin-top: -32px; */
  1562. overflow: auto;
  1563. /* float: left; */
  1564. /* margin-left: 1px; */
  1565. margin-left: -10px;
  1566. }
  1567. .look .el-form-item {
  1568. border-bottom: 1px solid #ccc;
  1569. }
  1570. // .el-input--small {
  1571. // font-size: 13px;
  1572. // width: 390px;
  1573. // margin-left: 74%;
  1574. // }
  1575. /deep/.el-table .el-table__header .cell,
  1576. .el-table .el-table__body .cell {
  1577. text-align: center;
  1578. }
  1579. .el-scrollbar__wrap {
  1580. overflow-y: hidden;
  1581. }
  1582. /deep/.deal {
  1583. margin-left: 0%;
  1584. width: 64%;
  1585. }
  1586. .photo {
  1587. padding: 0% 34%;
  1588. }
  1589. .photo1 {
  1590. padding: 0 10%;
  1591. }
  1592. .photo2 {
  1593. padding: 0 12%;
  1594. }
  1595. /deep/.el-form-item--small .el-form-item__label,
  1596. .el-form-item--small .el-form-item__content {
  1597. text-align: center;
  1598. }
  1599. hr {
  1600. width: 91%;
  1601. }
  1602. /deep/.deaal {
  1603. width: 66%;
  1604. margin-left: 9%;
  1605. }
  1606. .el-date-editor.el-input,
  1607. .el-date-editor.el-input__inner,
  1608. .el-input-number--small {
  1609. width: 123% !important;
  1610. }
  1611. /deep/.el-table td,
  1612. .el-table th.is-leaf {
  1613. border-right: 1px solid #e9ecf7;
  1614. text-align: center;
  1615. height: 40px;
  1616. }
  1617. /deep/.freightSet .el-input__inner {
  1618. width: 100px;
  1619. }
  1620. .freightSet {
  1621. margin: 10px 0 0 20px;
  1622. display: flex;
  1623. width: 800px;
  1624. .span_text {
  1625. margin-left: 20px;
  1626. line-height: 30px;
  1627. }
  1628. }
  1629. /deep/.freightSet .el-input {
  1630. width: 44%;
  1631. }
  1632. .findValue {
  1633. width: 290px;
  1634. margin-left: 5px;
  1635. }
  1636. /deep/.freightSet .el-input {
  1637. width: 44%;
  1638. }
  1639. .img_css {
  1640. width: 200px;
  1641. height: 200px;
  1642. }
  1643. /deep/.find.el-button--primary {
  1644. width: 30px;
  1645. margin-left: -10px;
  1646. border-top-left-radius: 0px;
  1647. margin-top:0;
  1648. border-bottom-left-radius: 0px;
  1649. }
  1650. .el-button--primary {
  1651. background-color: #5878e8;
  1652. border-color: #5878e8;
  1653. }
  1654. .el-button--default {
  1655. border: 1px solid #5473e8;
  1656. color: #5473e8;
  1657. }
  1658. /deep/.findValue .el-input__inner {
  1659. border-top-right-radius: 0px;
  1660. border-bottom-right-radius: 0px;
  1661. }
  1662. </style>