autoSettlementList.vue 70 KB

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