autoSettlementList.vue 50 KB

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