autoSettlementList.vue 53 KB

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