huoyunList.vue 54 KB

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