stockSaleOutReportList.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665
  1. //现货销售出库报表
  2. <template>
  3. <div class="container">
  4. <div style="height: 100%" class="">
  5. <el-row class="content1">
  6. <el-col style="padding-left: 15px; width:40%" :span="16">
  7. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.carry`" @click="adopt()">备注
  8. </ws-button>
  9. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.draw`" @click="depositbutton()">定金
  10. </ws-button>
  11. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.payment`" @click="handlecollect()">收款
  12. </ws-button>
  13. <ws-button type="primary" @click="handleinvoice()">开发票
  14. </ws-button>
  15. </el-col>
  16. <el-col style="text-align: right; line-height: 60px; width:400px" :span="8">
  17. <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange' :clearable="false"
  18. type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
  19. end-placeholder="截止时间">
  20. </el-date-picker>
  21. </el-col>
  22. <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
  23. <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
  24. maxlength="500" type="input" class="findValue">
  25. <el-option v-for="item in options" v-if="item.reportStatus" :key="item.constKey"
  26. :label="item.contractNo + '(' + item.reportStatus + ')'" :value="item.contractNo" />
  27. <el-option v-for="item in options" v-if="!item.reportStatus" :key="item.constKey" :label="item.contractNo"
  28. :value="item.contractNo" />
  29. </el-select>
  30. </el-col>
  31. </el-row>
  32. <el-row v-if='orderList.deliverType==1' class="content2">
  33. <el-tabs v-model="activeName" @tab-click="handleClick" class="content2-tab">
  34. <el-tab-pane v-for='(item,index) in tranProcessInfo' class="content2-pane" :key='index' :label="item.label"
  35. :name="item.name"></el-tab-pane>
  36. <el-tab-pane class="content2-pane" label="退库" name="退库"></el-tab-pane>
  37. </el-tabs>
  38. <div class="content2-item">
  39. <div v-if="contractNo != ''">
  40. <div class="buyer" v-if="orderList.buyer">买方: {{ orderList.buyer}} </div>
  41. <div v-else>买方: </div>
  42. </div>
  43. <div v-if="contractNo != ''" class="row2">
  44. <span v-if="orderList.goodsName">货名: {{ orderList.goodsName}} </span>
  45. <span v-else>货名: </span>
  46. <span v-if="orderList.weight">合同重量: {{ orderList.weight.toFixed(3) }} 吨</span>
  47. <span v-else>合同重量: 0 吨</span>
  48. <span v-if="outboundVolume">出库量: {{ outboundVolume.toFixed(3)}} 吨</span>
  49. <span v-else>出库量: 0 吨</span>
  50. <span v-if="orderList.unitContractPrice&&this.tranType!='随行就市'">合同单价:
  51. {{ orderList.unitContractPrice.toFixed(3) }} 元/吨</span>
  52. <span v-else>合同单价: 0 元/吨</span>
  53. <span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(3)}} 元</span>
  54. <span v-else>应收: 0 元</span>
  55. <span v-if="amountReceived">已收: {{ amountReceived.toFixed(3) }} 元
  56. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  57. src="../../../public/img/fujian.png" @click="fujian1()" alt="" />
  58. </span>
  59. <span v-else>已收: 0 元</span>
  60. <span v-if="uncollectedAmount">未收: {{ uncollectedAmount.toFixed(3)}} 元</span>
  61. <span v-else>未收: 0 元</span>
  62. <span v-if="orderList.deposit">定金: {{ orderList.deposit.toFixed(3)}} 元
  63. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  64. src="../../../public/img/fujian.png" @click="fujian()" alt="" />
  65. </span>
  66. <span v-else>定金: 0 元</span>
  67. </div>
  68. </div>
  69. </el-row>
  70. <!-- 自运 -->
  71. <el-table class="wenzi" :data="saleList.records" :row-class-name="tableRowClassName"
  72. style="width: 100%; padding-top: 20px" ref="saleList" border :summary-method="getSummaries" show-summary
  73. @selection-change="handleSelectionChange" @row-click="handleRowClick" v-if="orderList.deliverType==1">
  74. <el-table-column key="1" type="selection" width="55"></el-table-column>
  75. <el-table-column key="2" type="index" label="序号" width="50"></el-table-column>
  76. <el-table-column key="3" v-if="this.tranType!='退库'" class="table_td" prop="processNo" label="运输任务阶段编号">
  77. </el-table-column>
  78. <el-table-column key="4" class="table_td" prop="warehouseName" label="仓库" v-if="this.tranType=='退库'"></el-table-column>
  79. <el-table-column key="5" class="table_td" prop="carNo" label="车牌号" v-if="this.tranType=='汽运'||this.tranType=='退库'">
  80. <template slot-scope="scope">
  81. <span>{{scope.row.carNo }}({{scope.row.tranCarNo}})</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column key="6" class="table_td" prop="binNumber" label="仓位号" v-if="this.tranType=='散船'"></el-table-column>
  85. <el-table-column key="7" class="table_td" prop="boxNo" label="车厢号" v-if="this.tranType=='火运'"></el-table-column>
  86. <el-table-column key="8" class="table_td" prop="caseNo" label="箱号"
  87. v-if="this.tranType=='汽运'||this.tranType=='箱船'||this.tranType=='退库'"></el-table-column>
  88. <el-table-column key="9" class="table_td" prop="titleNo" label="封号"
  89. v-if="this.tranType=='汽运'||this.tranType=='箱船'||this.tranType=='退库'"></el-table-column>
  90. <el-table-column key="10" class="table_td" prop="createDate" label="卸车反馈日期"
  91. v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
  92. <el-table-column key="11" class="table_td" prop="createDate" label="卸船反馈日期"
  93. v-if="this.tranType=='散船'||this.tranType=='箱船'"></el-table-column>
  94. <el-table-column key="12" class="table_td" prop="returnDate" label="退库日期" v-if="this.tranType=='退库'"></el-table-column>
  95. <el-table-column key="13" class="table_td" prop="feedbackPerson" label="卸车反馈人"
  96. v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
  97. <el-table-column key="14" class="table_td" prop="feedbackPerson" label="卸船反馈人"
  98. v-if="this.tranType=='散船'||this.tranType=='箱船'"></el-table-column>
  99. <el-table-column key="15" class="table_td" prop="grossWeight" label="毛重(吨)" v-if="this.tranType=='退库'"></el-table-column>
  100. <el-table-column key="16" class="table_td" prop="tare" label="皮重(吨)" v-if="this.tranType=='退库'"></el-table-column>
  101. <el-table-column key="17" class="table_td" prop="netWeight" label="净重(吨)" v-if="tranType=='退库'">
  102. <template slot-scope="scope">
  103. <span>-{{scope.row.netWeight }}</span>
  104. </template>
  105. </el-table-column>
  106. <el-table-column key="18" width='120' class="table_td" prop="unloadingWeight" label="卸车净重(吨)"
  107. v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
  108. <el-table-column key="19" v-else-if="this.tranType=='散船'||this.tranType=='箱船'" class="table_td" prop="unloadingWeight"
  109. label="卸船净重(吨)"></el-table-column>
  110. <!-- <el-table-column key="20" width='120' class="table_td" prop="feedbackWeight" label="反馈重量(吨)">
  111. <template slot-scope="scope">
  112. <div class="inputChenge">
  113. <el-input v-model="scope.row.feedbackWeight" v-if="scope.row.identification2 == 'true'">
  114. </el-input>
  115. <div v-if="scope.row.identification2 == 'false'" class="inputs">
  116. <span>{{scope.row.feedbackWeight}}</span>
  117. </div>
  118. </div>
  119. <div style='display:inline-block;' v-if="scope.row.identification2 == 'false'">
  120. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  121. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  122. @click="weightedit(scope.row)" alt="" />
  123. </div>
  124. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  125. v-if="scope.row.identification2 == 'true'" @click="weightsave(scope.row,4)"></i>
  126. </template>
  127. </el-table-column> -->
  128. <el-table-column key="21" width='120' class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
  129. <el-table-column key="22" class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
  130. <template slot-scope="scope">
  131. <div class="inputChenge">
  132. <el-input v-model="scope.row.settlementPrice" v-if="scope.row.identification1 == 'true'">
  133. </el-input>
  134. <div v-if="scope.row.identification1 == 'false'" class="inputs">
  135. <span>{{scope.row.settlementPrice}}</span>
  136. </div>
  137. </div>
  138. <div style='display:inline-block;' v-if="scope.row.identification1 == 'false'">
  139. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  140. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  141. @click="whether(scope.row,2)" alt="" />
  142. </div>
  143. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  144. v-if="scope.row.identification1 == 'true'" @click="weightClick(scope.row,2)"></i>
  145. </template>
  146. </el-table-column>
  147. <el-table-column key="23" width='130' class="table_td" prop="amountIngReceivable" label="应收金额(元)">
  148. <template slot-scope="scope">
  149. <div class="inputChenge">
  150. <el-input v-model="scope.row.amountIngReceivable" v-if="scope.row.identification3 == 'true'">
  151. </el-input>
  152. <div v-if="scope.row.identification3 == 'false'" class="inputs">
  153. <span>{{scope.row.amountIngReceivable}}</span>
  154. </div>
  155. </div>
  156. <div style='display:inline-block;' v-if="scope.row.identification3 == 'false'">
  157. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  158. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  159. @click="whether(scope.row,5)" alt="" />
  160. </div>
  161. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  162. v-if="scope.row.identification3 == 'true'" @click="weightClick(scope.row,5)"></i>
  163. </template>
  164. </el-table-column>
  165. <el-table-column key="24" width='120' class="table_td" prop="amountEdReceivable" label="已收金额(元)">
  166. </el-table-column>
  167. <el-table-column key="25" width='120' class="table_td" prop="amountNotReceivable" label="未收金额(元)">
  168. </el-table-column>
  169. <el-table-column key="26" width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
  170. <template slot-scope="scope">
  171. <div class="inputChenge">
  172. <div class="inputs">
  173. <span>{{scope.row.alreadyInvoice}}</span>
  174. </div>
  175. </div>
  176. <div style='display:inline-block;'>
  177. <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
  178. src="../../../public/img/edit.png" @click="invoiceedit(scope.row)" alt="" />
  179. </div>
  180. </template>
  181. </el-table-column>
  182. <el-table-column key="27" class="table_td" prop="collectionDate" label="收款日期">
  183. </el-table-column>
  184. <!-- <el-table-column class="table_td" prop="status" label="状态">
  185. </el-table-column> -->
  186. </el-table>
  187. <!-- 他运 -->
  188. <el-table v-if='orderList.deliverType!=1' class="wenzi" :data="saleList.records"
  189. :row-class-name="tableRowClassName" style="width: 100%; padding-top: 20px" ref="saleList1" border
  190. :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange">
  191. <el-table-column type="selection" width="55"></el-table-column>
  192. <el-table-column type="index" label="序号" width="50"></el-table-column>
  193. <el-table-column class="table_td" prop="warehouseName" label="仓库"></el-table-column>
  194. <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
  195. <el-table-column class="table_td" prop="deliveryDate" label="出库日期">
  196. <template slot-scope="scope">
  197. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.returnDate}}</span>
  198. <span v-if="scope.row.returnFlag == null">{{scope.row.deliveryDate }}</span>
  199. </template>
  200. </el-table-column>
  201. <el-table-column class="table_td" prop="grossWeight" label="毛重(吨)"></el-table-column>
  202. <el-table-column class="table_td" prop="tare" label="皮重(吨)"></el-table-column>
  203. <el-table-column class="table_td" prop="netWeight" label="净重(吨)">
  204. <template slot-scope="scope">
  205. <span style="color: #ce4545;" @click='fujian2(scope.row)'
  206. v-if="scope.row.returnFlag == 1">{{scope.row.netWeight}}(退)</span>
  207. <span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
  211. <template slot-scope="scope">
  212. <div class="inputChenge">
  213. <el-input v-model="scope.row.settlementWeight" v-if="scope.row.identification == 'true'">
  214. </el-input>
  215. <div v-if="scope.row.identification == 'false'" class="inputs">
  216. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.settlementWeight}}</span>
  217. <span v-if="scope.row.returnFlag == null">{{scope.row.settlementWeight }}</span>
  218. </div>
  219. </div>
  220. <div style='display:inline-block;' v-if="scope.row.identification == 'false'">
  221. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  222. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  223. @click="whether(scope.row,1)" alt="" />
  224. </div>
  225. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  226. v-if="scope.row.identification == 'true'" @click="weightClick(scope.row,1)"></i>
  227. </template>
  228. </el-table-column>
  229. <el-table-column width='120' class="table_td" prop="feedbackWeight" label="反馈重量(吨)">
  230. <template slot-scope="scope">
  231. <div class="inputChenge">
  232. <el-input v-model="scope.row.feedbackWeight" v-if="scope.row.identification2 == 'true'">
  233. </el-input>
  234. <div v-if="scope.row.identification2 == 'false'" class="inputs">
  235. <span>{{scope.row.feedbackWeight}}</span>
  236. </div>
  237. </div>
  238. <div style='display:inline-block;' v-if="scope.row.identification2 == 'false'">
  239. <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
  240. src="../../../public/img/edit.png" @click="weightedit(scope.row)" alt="" />
  241. </div>
  242. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  243. v-if="scope.row.identification2 == 'true'" @click="weightsave(scope.row,4)"></i>
  244. </template>
  245. </el-table-column>
  246. <el-table-column class="table_td" prop="settlementPrice" width='130' label="结算单价(元/吨)">
  247. <template slot-scope="scope">
  248. <div class="inputChenge">
  249. <el-input v-model="scope.row.settlementPrice" v-if="scope.row.identification1 == 'true'">
  250. </el-input>
  251. <div v-if="scope.row.identification1 == 'false'" class="inputs">
  252. <span>{{scope.row.settlementPrice}}</span>
  253. </div>
  254. </div>
  255. <div style='display:inline-block;' v-if="scope.row.identification1 == 'false'">
  256. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  257. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  258. @click="whether(scope.row,2)" alt="" />
  259. </div>
  260. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  261. v-if="scope.row.identification1 == 'true'" @click="weightClick(scope.row,2)"></i>
  262. </template>
  263. </el-table-column>
  264. <el-table-column class="table_td" prop="amountIngReceivable" width='130' label="应收金额(元)">
  265. <template slot-scope="scope">
  266. <div class="inputChenge">
  267. <el-input v-model="scope.row.amountIngReceivable" v-if="scope.row.identification3 == 'true'">
  268. </el-input>
  269. <div v-if="scope.row.identification3 == 'false'" class="inputs">
  270. <span>{{scope.row.amountIngReceivable}}</span>
  271. </div>
  272. </div>
  273. <div style='display:inline-block;' v-if="scope.row.identification3 == 'false'">
  274. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  275. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  276. @click="whether(scope.row,5)" alt="" />
  277. </div>
  278. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  279. v-if="scope.row.identification3 == 'true'" @click="weightClick(scope.row,5)"></i>
  280. </template>
  281. </el-table-column>
  282. <el-table-column class="table_td" prop="amountEdReceivable" label="已收金额(元)">
  283. <template slot-scope="scope">
  284. <span v-if="scope.row.returnFlag == null">{{scope.row.amountEdReceivable.toFixed(2) }}</span>
  285. </template>
  286. </el-table-column>
  287. <el-table-column class="table_td" prop="amountNotReceivable" label="未收金额(元)">
  288. <template slot-scope="scope">
  289. <span v-if="scope.row.returnFlag == null">{{scope.row.amountNotReceivable.toFixed(2) }}</span>
  290. </template>
  291. </el-table-column>
  292. <el-table-column width='120' class="table_td" prop="alreadyInvoice" label=" 已开发票(元)">
  293. <template slot-scope="scope">
  294. <div class="inputChenge">
  295. <div class="inputs">
  296. <span>{{scope.row.alreadyInvoice}}</span>
  297. </div>
  298. </div>
  299. <div style='display:inline-block;'>
  300. <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
  301. src="../../../public/img/edit.png" @click="invoiceedit(scope.row)" alt="" />
  302. </div>
  303. </template>
  304. </el-table-column>
  305. <el-table-column class="table_td" prop="collectionDate" label="收款日期">
  306. </el-table-column>
  307. <!-- <el-table-column class="table_td" prop="status" label="状态">
  308. </el-table-column> -->
  309. </el-table>
  310. <!-- 页数 -->
  311. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  312. :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" layout="total, sizes, prev, pager, next, jumper"
  313. :total="deptBudgetTotal"></el-pagination>
  314. </div>
  315. <!-- 定金弹窗 -->
  316. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  317. @on-cancel="handleClose">
  318. <div v-for="(item,index) in addressUrlArray" :key="index">
  319. <img width="100" height="100" :src="item" alt="">
  320. </div>
  321. </WinseaContentModal>
  322. <!-- 已收弹窗 -->
  323. <WinseaContentModal v-model="accessoryTFs1" :title="$t('system.noticeCircular.information')"
  324. @on-cancel="handleClose1">
  325. <div style="display: flex;">
  326. <div v-for="(item,index) in addressUrlArray1" :key="index" style="display:flex;">
  327. <img width="100" height="100" :src="item" alt="">
  328. <!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/f43f512136a544d3bbcef0fa4259d274.png" alt=""> -->
  329. </div>
  330. </div>
  331. </WinseaContentModal>
  332. <!-- 已收弹窗 -->
  333. <el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
  334. <el-form :model="form">
  335. <el-form-item label="未收金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
  336. <span>{{ uncollectedAmount1 }}</span>
  337. </el-form-item>
  338. <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
  339. <el-input type='number' step="0.01" v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal">
  340. </el-input>
  341. </el-form-item>
  342. <el-form-item label="收款日期" prop="collectionDate" :label-width="formLabelWidth" class="deal">
  343. <ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"
  344. class="deal" />
  345. </el-form-item>
  346. <el-form-item label="上传收款截图" :label-width="formLabelWidth">
  347. <el-upload ref='upload' :action="global.uploadPath" list-type="picture-card"
  348. :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
  349. <i class="el-icon-plus"></i>
  350. </el-upload>
  351. </el-form-item>
  352. </el-form>
  353. <div slot="footer" class="dialog-footer">
  354. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  355. <el-button v-hasPermission="`report.goodsSaleOutReport.payment`" type="primary" @click="collectment()">提 交
  356. </el-button>
  357. </div>
  358. </el-dialog>
  359. <WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
  360. @on-cancel="handleClose">
  361. <img width="100" height="100" :src="appendixIdss2" alt="">
  362. </WinseaContentModal>
  363. <WinseaContentModal v-model="show" title="批量开发票" @on-cancel="handleClose">
  364. <div>本次合计发票金额{{invoicemoney}}元</div>
  365. <div slot="footer" class="dialog-footer">
  366. <el-button @click="show = false">取 消</el-button>
  367. <el-button type="primary" @click="invoicesave()">提 交
  368. </el-button>
  369. </div>
  370. </WinseaContentModal>
  371. <!-- 收款 -->
  372. <el-dialog width="25%" title="开发票" :visible.sync="dialogFormVisible3" :append-to-body="true">
  373. <el-form :model="form">
  374. <el-form-item label="可开发票金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
  375. <span>{{ activeinvoice }}</span>
  376. </el-form-item>
  377. <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
  378. <el-input type='number' v-model="invoice" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
  379. </el-form-item>
  380. </el-form>
  381. <div slot="footer" class="dialog-footer">
  382. <el-button @click="dialogFormVisible3 = false">取 消</el-button>
  383. <el-button type="primary" @click="Invoicing()">提 交
  384. </el-button>
  385. </div>
  386. </el-dialog>
  387. <!-- 定金 -->
  388. <el-dialog width="25%" title="定金" :visible.sync="dialogFormVisible2" :append-to-body="true">
  389. <el-form :model="form">
  390. <el-form-item label="已收定金(元)" :label-width="formLabelWidth">
  391. <el-input v-model="deposit" autocomplete="off" placeholder="输入定金金额" class="deal"></el-input>
  392. </el-form-item>
  393. <el-form-item label="上传定金截图" :label-width="formLabelWidth">
  394. <el-upload ref="upload" :action="global.uploadPath" :limit='1' list-type="picture-card"
  395. :on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
  396. <i class="el-icon-plus"></i>
  397. </el-upload>
  398. </el-form-item>
  399. </el-form>
  400. <div slot="footer" class="dialog-footer">
  401. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  402. <el-button type="primary" @click="depositSubmit()">提 交</el-button>
  403. </div>
  404. </el-dialog>
  405. <!--备注-->
  406. <el-dialog width="25%" title="备注" :visible.sync="collectForm1" :append-to-body="true">
  407. <el-form :model="form">
  408. <div class="beizhu">
  409. <el-input v-model="orderList.remark" autocomplete="off" placeholder="备注信息,不超过1000字" class="deal"></el-input>
  410. </div>
  411. </el-form>
  412. <div slot="footer" class="dialog-footer">
  413. <el-button @click="collectForm1 = false">关闭</el-button>
  414. <el-button v-hasPermission="`report.goodsSaleOutReport.carry`" type="primary" @click="adoptRemarks()">保存
  415. </el-button>
  416. </div>
  417. </el-dialog>
  418. </div>
  419. <!-- </div> -->
  420. </template>
  421. <script>
  422. import {
  423. getStockSaleReceiptList,
  424. getStockSaleContractNoList,
  425. stockSaleCollectMoney,
  426. disOrRemarks,
  427. saleEditSettlementWeight,
  428. editSettlementWeightStock,
  429. editinvoice
  430. } from '@/model/statisticalReport/index'
  431. import Pagination from '@/components/Pagination'
  432. import WsUpload from '@/components/WsUpload'
  433. import {
  434. EventBus
  435. } from 'base-core-lib'
  436. export default {
  437. name: 'viewSpareMoney',
  438. components: {
  439. WsUpload,
  440. Pagination,
  441. },
  442. watch: {
  443. vesselId(val) {
  444. this.getList()
  445. },
  446. isShow(val) {
  447. this.showType = val
  448. },
  449. },
  450. data() {
  451. return {
  452. tranType: '',
  453. clickType: '',
  454. activeName: '',
  455. dialogFormVisible1: false,
  456. dialogFormVisible2: false,
  457. amountEdReceivable: 0,
  458. amountNotReceivable: 0,
  459. deposit:'',
  460. deptBudgetList: {},
  461. //分页
  462. currentPage: 1,
  463. invoice: '',
  464. pageSize: 10,
  465. invoicemoney: 0,
  466. show: false,
  467. allmoney1: 0,
  468. dialogFormVisible3: false,
  469. deptCircularPage: {},
  470. identification2: false,
  471. deptBudgetTotal: 0,
  472. uncollectedAmount1: 0,
  473. stockSaleReceiptReportList: [],
  474. stockSaleReceiptReport: {
  475. stockSaleReceiptReportList: [],
  476. money: '',
  477. amountEdReceivable: 0,
  478. amountNotReceivable: 0,
  479. collectionDate: '',
  480. id: '',
  481. invoiceType: '',
  482. },
  483. value2: [],
  484. startDate: '',
  485. endDate: '',
  486. orderList: {
  487. deposit:''
  488. },
  489. options: [],
  490. contractNoList: [],
  491. contractNo: '',
  492. dialogVisible: false,
  493. form: {},
  494. id: 0,
  495. compId: localStorage.getItem('ws-pf_compId'),
  496. collectForm: false,
  497. collectForm1: false,
  498. managementType: 3,
  499. money: 0,
  500. // id:'',
  501. collectmoney: 0,
  502. remark: '',
  503. remarkInformationList: {},
  504. remarkInformation: {
  505. remarkInformationList: [],
  506. id: '',
  507. remark: '',
  508. deposit: '0',
  509. depositUrl: '',
  510. },
  511. deposit: '0',
  512. depositUrl: [],
  513. saleList: [],
  514. amountReceivable: 0,
  515. amountReceived: 0,
  516. uncollectedAmount: 0,
  517. outboundVolume: 0,
  518. collectionDate: '',
  519. collectionScreenshot: '',
  520. amountEdCollectionable: '',
  521. actualCollectionment: '',
  522. tranProcessInfo: [],
  523. // collectDate: '',
  524. calculationCollectable: '',
  525. searchType: '',
  526. searchTypeText: '',
  527. formLabelWidth: '120px',
  528. searchKeyWord: '',
  529. value1: '', //收款日期
  530. modification: [],
  531. accessoryTFs: false,
  532. appendixIdss: [],
  533. activeinvoice: 0,
  534. accessoryTFs1: false,
  535. appendixIdss1: [],
  536. appendixIdss2: '',
  537. accessoryTFs2: false,
  538. addressUrlArray: [],
  539. addressUrlArray1: [],
  540. money: "",
  541. weight: ""
  542. }
  543. },
  544. activated() {
  545. var now = new Date();
  546. var year = now.getFullYear(); //得到年份
  547. var month = now.getMonth(); //得到月份
  548. var date = now.getDate(); //得到日期
  549. month = month + 1;
  550. month = month.toString().padStart(2, '0');
  551. date = date.toString().padStart(2, '0');
  552. this.collectionDate = `${year}-${month}-${date}`;
  553. this.getPassYearFormatDate()
  554. this.getList()
  555. this.showType = this.isShow
  556. },
  557. methods: {
  558. invoicesave() {
  559. editinvoice({
  560. stockSaleReceiptReportList: this.modification
  561. }).toPromise()
  562. .then((response) => {
  563. this.$message({
  564. message: '提交成功',
  565. type: 'success',
  566. })
  567. this.show = false
  568. this.getList(this.orderList.deliverType)
  569. }).catch((response) => {
  570. this.$message({
  571. message: '提交失败',
  572. type: 'warning',
  573. })
  574. })
  575. },
  576. datechange() {
  577. if (this.value2) {
  578. this.startDate = this.value2[0]
  579. this.endDate = this.value2[1]
  580. } else {
  581. this.startDate = ''
  582. this.endDate = ''
  583. }
  584. this.getList()
  585. },
  586. handleinvoice() {
  587. if (this.modification.length == 0) {
  588. this.$message({
  589. message: '请选择要开发票的条目',
  590. type: 'warning',
  591. })
  592. } else {
  593. var num = 0
  594. for (let i = 0; i < this.modification.length; i++) {
  595. // if (this.modification[i].status != '全部收款' && this.modification[i].status != '部分收款') {
  596. // this.$message({
  597. // message: '请选择已付款的条目',
  598. // type: 'warning',
  599. // })
  600. // return
  601. // }
  602. num = (Number(this.modification[i].amountEdReceivable) - Number(this.modification[i].alreadyInvoice)) +
  603. Number(num)
  604. }
  605. this.invoicemoney = num
  606. this.show = true
  607. }
  608. },
  609. invoiceedit(item) {
  610. this.activeinvoice = item.amountEdReceivable - item.alreadyInvoice
  611. this.id = item.id
  612. this.dialogFormVisible3 = true
  613. },
  614. Invoicing() {
  615. editSettlementWeightStock({
  616. flag: 3,
  617. alreadyInvoice: this.invoice,
  618. id: this.id
  619. }).toPromise()
  620. .then((response) => {
  621. this.$message({
  622. message: '提交成功',
  623. type: 'success',
  624. })
  625. this.dialogFormVisible3 = false
  626. this.getList(this.orderList.deliverType)
  627. }).catch((response) => {
  628. this.$message({
  629. message: '提交失败',
  630. type: 'warning',
  631. })
  632. })
  633. },
  634. weightedit(item) {
  635. item.identification2 = 'true'
  636. },
  637. weightsave(item, flag) {
  638. editSettlementWeightStock({
  639. flag: flag,
  640. feedbackWeight: item.feedbackWeight,
  641. id: item.id
  642. }).toPromise()
  643. .then((response) => {
  644. this.$notify.success({
  645. title: '成功',
  646. message: '修改重量修改成功',
  647. })
  648. item.identification2 = false
  649. this.getList(this.orderList.deliverType)
  650. })
  651. },
  652. tableRowClassName({
  653. row,
  654. rowIndex
  655. }) {
  656. // console.log(row)
  657. if (row.returnFlag == 1) {
  658. return 'warning-row';
  659. } else {
  660. return '';
  661. }
  662. },
  663. handleRowClick() {},
  664. handleClick(tab, event) {
  665. this.activeName = tab.name
  666. if (this.activeName == '退库') {
  667. this.tranType = '退库'
  668. } else {
  669. for (let i = 0; i < this.tranProcessInfo.length; i++) {
  670. if (this.tranProcessInfo[i].name == this.activeName) {
  671. this.tranType = this.tranProcessInfo[i].tranType
  672. }
  673. }
  674. }
  675. // console.log(this.tranType)
  676. // this.
  677. this.getList(this.orderList.deliverType)
  678. },
  679. //表头
  680. contractchange(e) {
  681. this.currentPage = 1
  682. this.pageSize = 10
  683. this.tranProcessInfo = []
  684. this.activeName = ""
  685. console.log('type', this.activeName)
  686. for (var i = 0; i < this.contractNoList.length; i++) {
  687. if (this.contractNoList[i].contractNo == e) {
  688. this.orderList = this.contractNoList[i]
  689. if (this.orderList.tranTaskInfoList) {
  690. for (let i = 0; i < this.orderList.tranTaskInfoList.length; i++) {
  691. if (this.orderList.tranTaskInfoList[i].tranProcessInfo) {
  692. this.tranProcessInfo.push({
  693. label: this.orderList.tranTaskInfoList[i].taskNo + '(' + this.orderList.tranTaskInfoList[i]
  694. .tranProcessInfo.tranType + ')',
  695. name: this.orderList.tranTaskInfoList[i].tranProcessInfo.processNo,
  696. tranType: this.orderList.tranTaskInfoList[i].tranProcessInfo.tranType
  697. })
  698. }
  699. }
  700. if (this.tranProcessInfo.length > 0) {
  701. this.activeName = this.tranProcessInfo[0].name
  702. this.tranType = this.tranProcessInfo[0].tranType
  703. }
  704. }
  705. if (this.contractNoList[i].depositUrl) {
  706. this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
  707. } else {
  708. this.addressUrlArray = []
  709. }
  710. }
  711. }
  712. this.contractNo = e
  713. // this.$refs.saleList.doLayout();
  714. this.getList(this.orderList.deliverType)
  715. },
  716. //选择合同
  717. dataFilter(val) {
  718. this.contractNo = val
  719. if (val) {
  720. //val存在
  721. this.options = this.contractNoList.filter(item => {
  722. if (
  723. !!~item.contractNo.indexOf(val) ||
  724. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  725. ) {
  726. return true
  727. }
  728. })
  729. } else {
  730. //val为空时,还原数组
  731. this.options = this.contractNoList
  732. }
  733. },
  734. //修改结算重量
  735. whether(row, flag) {
  736. if (flag == 1) {
  737. row.identification = 'true'
  738. } else if(flag==5){
  739. row.identification3 = 'true'
  740. }else {
  741. row.identification1 = 'true'
  742. }
  743. },
  744. weightClick(row, flag) {
  745. if (
  746. row.settlementWeight > 200&&flag==1 ||
  747. row.settlementWeight < 1&&flag==1 ||
  748. (String(row.settlementWeight).indexOf(
  749. '.'
  750. ) != -1 &&
  751. String(row.settlementWeight).length -
  752. (String(row.settlementWeight).indexOf(
  753. '.'
  754. ) +
  755. 1) >
  756. 3)
  757. ) {
  758. this.$message({
  759. message: '结算重量输入错误',
  760. type: 'warning',
  761. })
  762. return
  763. }
  764. var title = ''
  765. var data = {}
  766. if (flag == 1) {
  767. title = '确定要修改结算重量?'
  768. data = {
  769. settlementWeight: row.settlementWeight,
  770. id: row.id,
  771. flag: flag
  772. }
  773. }else if (flag == 5) {
  774. title = '确定要修改应收金额?'
  775. data = {
  776. amountIngReceivable: row.amountIngReceivable,
  777. id: row.id,
  778. flag: flag
  779. }
  780. } else {
  781. title = '确定要修改结算单价?'
  782. data = {
  783. settlementPrice: row.settlementPrice,
  784. id: row.id,
  785. flag: flag
  786. }
  787. }
  788. this.$confirm(title, {
  789. confirmButtonText: '确定',
  790. cancelButtonText: '取消',
  791. type: 'warning',
  792. })
  793. .then(() => {
  794. saleEditSettlementWeight(data)
  795. .toPromise()
  796. .then((response) => {
  797. if (flag == 1) {
  798. this.$notify.success({
  799. title: '成功',
  800. message: '结算重量修改成功',
  801. })
  802. }if (flag == 5) {
  803. this.$notify.success({
  804. title: '成功',
  805. message: '应收金额修改成功',
  806. })
  807. } else {
  808. this.$notify.success({
  809. title: '成功',
  810. message: '结算单价修改成功',
  811. })
  812. }
  813. this.getList(this.orderList.deliverType)
  814. })
  815. .catch(() => {
  816. return false
  817. })
  818. })
  819. },
  820. //备注信息
  821. adopt() {
  822. this.collectForm1 = true
  823. },
  824. adoptRemarks() {
  825. // this.remarkInformation.remark = this.orderList.remark
  826. this.$confirm(`确定要保存备注信息?`, {
  827. confirmButtonText: '确定',
  828. cancelButtonText: '取消',
  829. type: 'warning',
  830. })
  831. .then(() => {
  832. for (var i = 0; i < this.contractNoList.length; i++) {
  833. if (this.contractNoList[i].contractNo == this.contractNo) {
  834. this.remarkInformationList.id = this.contractNoList[i].id
  835. }
  836. }
  837. this.remarkInformationList.remark = this.orderList.remark
  838. disOrRemarks(this.remarkInformationList)
  839. .toPromise()
  840. .then(() => {
  841. this.collectForm1 = false
  842. this.$message.success('添加备注信息成功')
  843. this.remarkInformationList = {}
  844. this.getList()
  845. })
  846. .catch(() => {
  847. return false
  848. })
  849. })
  850. },
  851. selectInit(row) {
  852. //在这里一定要记得类型匹配的上。
  853. // if (row.approveStatus == null) {
  854. // return true
  855. // } else if (row.approveStatus != null) {
  856. // if (row.taskId == null) {
  857. // return false
  858. // } else {
  859. // return true
  860. // }
  861. // }
  862. },
  863. handleSelectionChange(val) {
  864. this.modification = val
  865. },
  866. //合计
  867. getSummaries(param) {
  868. const {
  869. columns,
  870. data
  871. } = param
  872. const sums = []
  873. columns.forEach((column, index) => {
  874. if (this.orderList.deliverType != 1) {
  875. if (index === 0) {
  876. sums[index] = '合计'
  877. } else if (
  878. index === 7 ||
  879. index === 8 ||
  880. index === 9 ||
  881. index === 10 ||
  882. index === 8 ||
  883. index === 11 ||
  884. index === 13 ||
  885. index === 12
  886. ) {
  887. const values = data.map((item) => Number(item[column.property]))
  888. if (!values.every((value) => isNaN(value))) {
  889. sums[index] = values.reduce((prev, curr) => {
  890. const value = Number(curr).toFixed(2)
  891. if (!isNaN(value)) {
  892. return prev + curr
  893. } else {
  894. return prev
  895. }
  896. }, 0)
  897. // if (index == 11) {
  898. // this.money = sums[index]
  899. // }
  900. if (index == 8) {
  901. this.weight = sums[index]
  902. }
  903. } else {
  904. sums[index] = '元'
  905. }
  906. }
  907. // else if (index === 10) {
  908. // const values = data.map((item) => Number(item[column.property]))
  909. // if (!values.every((value) => isNaN(value))) {
  910. // if (this.money == 0 || this.weight == 0) {
  911. // sums[index] = 0
  912. // } else {
  913. // sums[index] = Number(this.money / this.weight).toFixed(2)
  914. // }
  915. // }
  916. // }
  917. else {
  918. sums[index] = '--'
  919. }
  920. } else {
  921. if (this.tranType == '火运' || this.tranType == '散船') {
  922. if (index === 0) {
  923. sums[index] = '合计'
  924. } else if (
  925. index === 11 ||
  926. index === 9 ||
  927. index === 10 ||
  928. index === 8
  929. ) {
  930. const values = data.map((item) => Number(item[column.property]))
  931. if (!values.every((value) => isNaN(value))) {
  932. sums[index] = values.reduce((prev, curr) => {
  933. const value = Number(curr).toFixed(2)
  934. if (!isNaN(value)) {
  935. return prev + curr
  936. } else {
  937. return prev
  938. }
  939. }, 0)
  940. // if (index == 8) {
  941. // this.weight = sums[index]
  942. // }
  943. // if (index == 10) {
  944. // this.money = sums[index]
  945. // }
  946. } else {
  947. sums[index] = '元'
  948. }
  949. }
  950. // else if (index === 9) {
  951. // const values = data.map((item) => Number(item[column.property]))
  952. // if (!values.every((value) => isNaN(value))) {
  953. // if (this.money == 0 || this.weight == 0) {
  954. // sums[index] = 0
  955. // } else {
  956. // sums[index] = Number(this.money / this.weight).toFixed(2)
  957. // }
  958. // }
  959. // }
  960. else {
  961. sums[index] = '--'
  962. }
  963. } else if (this.tranType == '汽运') {
  964. if (index === 0) {
  965. sums[index] = '合计'
  966. } else if (
  967. index === 11 ||
  968. index === 7 ||
  969. index === 8 ||
  970. index === 10 ||
  971. index === 13 ||
  972. index === 12
  973. ) {
  974. const values = data.map((item) => Number(item[column.property]))
  975. if (!values.every((value) => isNaN(value))) {
  976. sums[index] = values.reduce((prev, curr) => {
  977. const value = Number(curr).toFixed(2)
  978. if (!isNaN(value)) {
  979. return prev + curr
  980. } else {
  981. return prev
  982. }
  983. }, 0)
  984. // if (index == 8) {
  985. // this.weight = sums[index]
  986. // }
  987. // if (index == 11) {
  988. // this.money = sums[index]
  989. // }
  990. } else {
  991. sums[index] = '元'
  992. }
  993. }
  994. // else if (index === 10) {
  995. // const values = data.map((item) => Number(item[column.property]))
  996. // if (!values.every((value) => isNaN(value))) {
  997. // if (this.money == 0 || this.weight == 0) {
  998. // sums[index] = 0
  999. // } else {
  1000. // sums[index] = Number(this.money / this.weight).toFixed(2)
  1001. // }
  1002. // }
  1003. // }
  1004. else {
  1005. sums[index] = '--'
  1006. }
  1007. } else if (this.tranType == '箱船') {
  1008. if (index === 0) {
  1009. sums[index] = '合计'
  1010. } else if (
  1011. index === 11 ||
  1012. index === 12 ||
  1013. index === 10 ||
  1014. index === 9
  1015. ) {
  1016. const values = data.map((item) => Number(item[column.property]))
  1017. if (!values.every((value) => isNaN(value))) {
  1018. sums[index] = values.reduce((prev, curr) => {
  1019. const value = Number(curr).toFixed(2)
  1020. if (!isNaN(value)) {
  1021. return prev + curr
  1022. } else {
  1023. return prev
  1024. }
  1025. }, 0)
  1026. // if (index == 9) {
  1027. // this.weight = sums[index]
  1028. // }
  1029. // if (index = 11) {
  1030. // this.money = sums[index]
  1031. // }
  1032. } else {
  1033. sums[index] = '元'
  1034. }
  1035. }
  1036. // else if (index == 10) {
  1037. // const values = data.map((item) => Number(item[column.property]))
  1038. // if (!values.every((value) => isNaN(value))) {
  1039. // if (this.money == 0 || this.weight == 0) {
  1040. // sums[index] = 0
  1041. // } else {
  1042. // sums[index] = Number(this.money / this.weight).toFixed(2)
  1043. // }
  1044. // }
  1045. // }
  1046. else {
  1047. sums[index] = '--'
  1048. }
  1049. }
  1050. }
  1051. })
  1052. for (let i = 0; i < sums.length; i++) {
  1053. // console.log(typeof sums[i])
  1054. if (typeof sums[i] == 'number') {
  1055. sums[i] = sums[i].toFixed(2)
  1056. }
  1057. }
  1058. // console.log(sums)
  1059. // sums[sums.length - 1] = sums[sums.length - 1].toFixed(2)
  1060. // sums[sums.length - 2] = sums[sums.length - 2].toFixed(2)
  1061. return sums
  1062. },
  1063. //定金
  1064. depositbutton() {
  1065. this.dialogFormVisible2 = true
  1066. },
  1067. depositSubmit() {
  1068. this.remarkInformation.deposit = this.deposit
  1069. this.remarkInformation.depositUrl = this.depositUrl
  1070. this.$confirm(`确定提交定金信息?`, {
  1071. cancelButtonText: '取消',
  1072. confirmButtonText: '确定',
  1073. type: 'warning',
  1074. }).then(() => {
  1075. for (var i = 0; i < this.contractNoList.length; i++) {
  1076. if (this.contractNoList[i].contractNo == this.contractNo) {
  1077. this.remarkInformationList.id = this.contractNoList[i].id
  1078. }
  1079. }
  1080. this.remarkInformationList.deposit = this.orderList.deposit
  1081. this.remarkInformationList.depositUrl = this.depositUrl.toString()
  1082. disOrRemarks(this.remarkInformationList)
  1083. .toPromise()
  1084. .then((response) => {
  1085. this.$notify.success({
  1086. title: '成功',
  1087. message: '定金成功',
  1088. })
  1089. this.remarkInformationList = {}
  1090. this.$refs.upload.clearFiles();
  1091. this.dialogFormVisible2 = false
  1092. this.getList()
  1093. })
  1094. .catch((response) => {
  1095. console.log(response)
  1096. EventBus.$emit('error', response.message)
  1097. })
  1098. })
  1099. },
  1100. //定金附件
  1101. fujian() {
  1102. if (this.orderList.depositUrl === null || this.orderList.depositUrl === '') {
  1103. EventBus.$emit(
  1104. 'warning',
  1105. this.$t('system.noticeCircular.NoInformation')
  1106. )
  1107. }
  1108. this.appendixIdss = this.orderList.depositUrl
  1109. this.accessoryTFs = true
  1110. },
  1111. fujian2(item) {
  1112. if (item.poundImg === null || item.poundImg === '') {
  1113. EventBus.$emit(
  1114. 'warning',
  1115. this.$t('system.noticeCircular.NoInformation')
  1116. )
  1117. }
  1118. this.appendixIdss2 = item.poundImg
  1119. this.accessoryTFs2 = true
  1120. },
  1121. handleClose() {
  1122. this.accessoryTFs = false
  1123. },
  1124. //已收附件
  1125. fujian1() {
  1126. if (this.addressUrlArray1.length == 0) {
  1127. EventBus.$emit(
  1128. 'warning',
  1129. this.$t('system.noticeCircular.NoInformation')
  1130. )
  1131. } else {
  1132. this.appendixIdss1 = this.collectionScreenshot
  1133. this.accessoryTFs1 = true
  1134. }
  1135. },
  1136. handleClose1() {
  1137. this.accessoryTFs1 = false
  1138. },
  1139. //收款
  1140. handlecollect() {
  1141. if (this.modification.length > 0) {
  1142. this.uncollectedAmount1 = 0
  1143. this.money=0
  1144. for (let i = 0; i < this.modification.length; i++) {
  1145. this.uncollectedAmount1 += Number(this.modification[i].amountNotReceivable)
  1146. this.money+=Number(this.modification[i].amountIngReceivable)
  1147. }
  1148. this.uncollectedAmount1 = this.uncollectedAmount1.toFixed(2)
  1149. this.amountEdReceivable = this.saleList.records[0].amountEdReceivable
  1150. this.amountNotReceivable = this.saleList.records[0].amountNotReceivable
  1151. this.stockSaleReceiptReportList = this.modification
  1152. this.dialogFormVisible1 = true
  1153. } else {
  1154. this.$message({
  1155. message: '请至少选择一个条目',
  1156. type: 'warning',
  1157. })
  1158. }
  1159. },
  1160. collectment() {
  1161. this.stockSaleReceiptReport.money = this.money
  1162. this.stockSaleReceiptReport.collectionDate = this.collectionDate
  1163. if (
  1164. this.money == 0 ||
  1165. (String(this.money).indexOf('.') != -1 &&
  1166. String(this.money).length - (String(this.money).indexOf('.') + 1) >
  1167. 2)
  1168. ) {
  1169. this.$message({
  1170. message: '收款金额输入错误',
  1171. type: 'warning',
  1172. })
  1173. return
  1174. }
  1175. if (this.money) {
  1176. if (isNaN(this.money)) {
  1177. this.$message({
  1178. message: '收款金额非数字!',
  1179. type: 'warning',
  1180. })
  1181. return
  1182. }
  1183. }
  1184. if (!this.money) {
  1185. this.$message({
  1186. message: '收款金额不能为空!',
  1187. type: 'warning',
  1188. })
  1189. return
  1190. }
  1191. if (this.money >= 0 && this.money > this.uncollectedAmount) {
  1192. this.$message({
  1193. message: '收款金额不能大于未收金额!',
  1194. type: 'warning',
  1195. })
  1196. return
  1197. }
  1198. this.$confirm(`确定提交收款信息?`, {
  1199. cancelButtonText: '取消',
  1200. confirmButtonText: '确定',
  1201. type: 'warning',
  1202. }).then(() => {
  1203. stockSaleCollectMoney({
  1204. stockSaleReceiptReportList: this.stockSaleReceiptReportList,
  1205. amountEdReceivable: this.amountEdReceivable,
  1206. amountNotReceivable: this.amountNotReceivable,
  1207. money: this.money,
  1208. collectionDate: this.collectionDate,
  1209. collectionScreenshot: this.collectionScreenshot,
  1210. })
  1211. .toPromise()
  1212. .then((response) => {
  1213. this.$notify.success({
  1214. title: '成功',
  1215. message: '收款成功',
  1216. })
  1217. this.stockSaleReceiptReportList = {}
  1218. this.money = ''
  1219. this.collectionDate = ''
  1220. this.collectionScreenshot = ''
  1221. this.$refs.upload.clearFiles()
  1222. this.dialogFormVisible1 = false
  1223. this.getList()
  1224. })
  1225. .catch((response) => {
  1226. console.log(response)
  1227. EventBus.$emit('error', response.message)
  1228. })
  1229. })
  1230. },
  1231. //列表
  1232. getList(type) {
  1233. // 1自运2他运
  1234. let _data = {
  1235. compId: localStorage.getItem('ws-pf_compId'),
  1236. currentPage: this.currentPage,
  1237. pageSize: this.pageSize,
  1238. searchType: this.searchType,
  1239. startDate: this.startDate,
  1240. endDate: this.endDate,
  1241. contractNo: this.contractNo,
  1242. }
  1243. if (type == 1) {
  1244. _data.processNo = this.activeName
  1245. }
  1246. getStockSaleReceiptList(_data)
  1247. .toPromise()
  1248. .then((response) => {
  1249. this.amountReceivable = 0
  1250. this.amountReceived = 0
  1251. this.uncollectedAmount = 0
  1252. this.outboundVolume = 0
  1253. let num = []
  1254. for (var i = 0; i < response.records.length; i++) {
  1255. response.records[i].identification = 'false'
  1256. response.records[i].identification1 = 'false'
  1257. response.records[i].identification2 = 'false'
  1258. response.records[i].identification3 = 'false'
  1259. if (response.records[i].amountIngReceivable) {
  1260. this.amountReceivable += Number(response.records[i].amountIngReceivable.toFixed(2))
  1261. response.records[i].amountIngReceivable=response.records[i].amountIngReceivable.toFixed(2)
  1262. }
  1263. if (response.records[i].amountEdReceivable) {
  1264. this.amountReceived += Number(response.records[i].amountEdReceivable.toFixed(2))
  1265. }
  1266. if (response.records[i].amountNotReceivable) {
  1267. this.uncollectedAmount += Number(response.records[i].amountNotReceivable.toFixed(2))
  1268. }
  1269. if (response.records[i].settlementWeight) {
  1270. this.outboundVolume += Number(response.records[i].settlementWeight.toFixed(2))
  1271. }
  1272. // this.addressUrlArray1.push(response.records[i].collectionScreenshot.split('$'))
  1273. if (response.records[i].collectionScreenshot != null) {
  1274. num = response.records[i].collectionScreenshot.split('$')
  1275. for (let j = 0; j < num.length; j++) {
  1276. if (num[j] != '') {
  1277. if (this.addressUrlArray1.indexOf(num[j]) == -1) {
  1278. this.addressUrlArray1.push(num[j])
  1279. }
  1280. }
  1281. }
  1282. }
  1283. }
  1284. this.deptBudgetTotal = response.total
  1285. this.saleList = response
  1286. })
  1287. getStockSaleContractNoList({
  1288. compId: localStorage.getItem('ws-pf_compId'),
  1289. startDate: this.startDate,
  1290. endDate: this.endDate,
  1291. })
  1292. .toPromise()
  1293. .then((response) => {
  1294. this.contractNoList = response
  1295. // this.contractNoList.unshift({})
  1296. this.options = this.contractNoList
  1297. })
  1298. },
  1299. getPassYearFormatDate() {
  1300. if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
  1301. var nowDate = new Date()
  1302. var _date = new Date()
  1303. nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
  1304. var year = nowDate.getFullYear()
  1305. var year1 = _date.getFullYear()
  1306. var month = nowDate.getMonth() + 1
  1307. var month1 = _date.getMonth() + 1
  1308. var strDate = nowDate.getDate()
  1309. var strDate1 = _date.getDate()
  1310. if (month >= 1 && month <= 9) {
  1311. month = '0' + month
  1312. }
  1313. if (month1 >= 1 && month1 <= 9) {
  1314. month1 = '0' + month1
  1315. }
  1316. if (strDate >= 0 && strDate <= 9) {
  1317. strDate = '0' + strDate
  1318. }
  1319. if (strDate1 >= 0 && strDate1 <= 9) {
  1320. strDate1 = '0' + strDate1
  1321. }
  1322. this.startDate = year + '-' + month + '-' + strDate
  1323. this.endDate = year1 + '-' + month1 + '-' + strDate1
  1324. } else {
  1325. this.startDate = localStorage.getItem('startDate')
  1326. this.endDate = localStorage.getItem('endDate')
  1327. }
  1328. this.value2 = [this.startDate, this.endDate]
  1329. },
  1330. //收款截图
  1331. handleRemove(file) {
  1332. console.log(file)
  1333. },
  1334. handlePictureCardPreview(file) {
  1335. this.collectionScreenshot = file.data.url
  1336. },
  1337. handlePictureCardPreview1(file) {
  1338. this.depositUrl = file.data.url
  1339. },
  1340. handleDownload(file) {
  1341. console.log(file)
  1342. },
  1343. handleSizeChange(val) {
  1344. console.log(`每页 ${val} 条`)
  1345. this.pageSize = val
  1346. this.getList()
  1347. },
  1348. handleCurrentChange(val) {
  1349. this.currentPage = val
  1350. console.log(`当前页: ${val}`)
  1351. this.getList()
  1352. },
  1353. },
  1354. }
  1355. </script>
  1356. <style lang="scss" scoped>
  1357. //分页
  1358. .el-pagination {
  1359. padding: 10px 15px;
  1360. margin-bottom: 0;
  1361. text-align: center;
  1362. }
  1363. /deep/.el-pager li.active {
  1364. color: #5878e8;
  1365. cursor: default;
  1366. }
  1367. /deep/.el-pager li:hover {
  1368. color: #5878e8;
  1369. cursor: default;
  1370. }
  1371. .el-button--default {
  1372. color: #8890b1;
  1373. border-color: #e8eaf1;
  1374. }
  1375. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  1376. width: 30px;
  1377. margin-left: 0;
  1378. border-top-left-radius: 0px;
  1379. border-bottom-left-radius: 0px;
  1380. }
  1381. /deep/.findValue .el-input__inner {
  1382. border-top-right-radius: 0px;
  1383. border-bottom-right-radius: 0px;
  1384. width: 385px;
  1385. }
  1386. .completed.el-button--default {
  1387. border-color: #5878e8;
  1388. background-color: #f6f7fc;
  1389. color: #5878e8;
  1390. }
  1391. .putstorage.el-button--default,
  1392. .deliverystorage.el-button--default {
  1393. border-color: #8890b1;
  1394. background-color: #fff;
  1395. color: #8890b1;
  1396. }
  1397. /deep/.el-table td,
  1398. /deep/.el-table th.is-leaf {
  1399. border-right: 1px solid #e9ecf7;
  1400. text-align: center;
  1401. }
  1402. /deep/.el-table tr td:first-child,
  1403. /deep/.el-table tr th.is-leaf:first-child {
  1404. border-left: 1px solid #e9ecf7;
  1405. }
  1406. // .el-row{
  1407. // height: 150px;
  1408. // }
  1409. .base_header_layout .grid-content {
  1410. margin-top: 80px;
  1411. }
  1412. .el-input--small .el-input__inner {
  1413. margin-left: 20px;
  1414. }
  1415. .el-range-editor--small.el-input__inner {
  1416. height: 32px;
  1417. margin-left: -20%;
  1418. }
  1419. .container {
  1420. overflow: scroll;
  1421. height: 93vh;
  1422. }
  1423. .button-container {
  1424. display: flex;
  1425. flex-wrap: nowrap;
  1426. justify-content: space-between;
  1427. align-items: center;
  1428. background-color: #fff;
  1429. width: 100%;
  1430. height: 50px;
  1431. padding: 0 10px;
  1432. &>div {
  1433. margin-left: 10px;
  1434. display: flex;
  1435. flex-wrap: nowrap;
  1436. flex-direction: row;
  1437. &>span {
  1438. line-height: 50px;
  1439. }
  1440. }
  1441. /deep/.auditFlow-box {
  1442. position: unset;
  1443. margin-left: 10px;
  1444. &/deep/.auditFlow-icon {
  1445. width: auto;
  1446. padding-right: 30px;
  1447. }
  1448. &/deep/.auditFlow-main {
  1449. position: absolute;
  1450. }
  1451. }
  1452. }
  1453. .el-button--primary {
  1454. background-color: #5878e8;
  1455. border-color: #5878e8;
  1456. // margin-left: 85%;
  1457. margin-top: 13px;
  1458. }
  1459. //导航条样式
  1460. .el-col-12 {
  1461. width: 50%;
  1462. height: 60px;
  1463. background: #f6f7fc;
  1464. border-radius: 4px 4px 1px 1px;
  1465. }
  1466. .el-input--small .el-input__inner {
  1467. height: 32px;
  1468. line-height: 32px;
  1469. width: 385px;
  1470. margin-top: 10px;
  1471. }
  1472. .el-input--small {
  1473. font-size: 13px;
  1474. width: 390px;
  1475. margin-left: 74%;
  1476. }
  1477. /deep/.el-table .el-table__header .cell,
  1478. .el-table .el-table__body .cell {
  1479. text-align: center;
  1480. }
  1481. .el-scrollbar__wrap {
  1482. overflow-y: hidden;
  1483. }
  1484. /deep/.deal {
  1485. margin-left: 0%;
  1486. width: 64%;
  1487. }
  1488. .photo {
  1489. padding: 0% 34%;
  1490. }
  1491. .photo1 {
  1492. padding: 0 10%;
  1493. }
  1494. .photo2 {
  1495. padding: 0 12%;
  1496. }
  1497. .el-date-editor.el-input,
  1498. .el-date-editor.el-input__inner,
  1499. .el-input-number--small {}
  1500. /deep/.el-table td,
  1501. .el-table th.is-leaf {
  1502. border-right: 1px solid #e9ecf7;
  1503. text-align: center;
  1504. height: 40px;
  1505. }
  1506. /deep/.beizhu .el-input--small .el-input__inner {
  1507. height: 220px;
  1508. line-height: 28px;
  1509. width: 146%;
  1510. margin-left: 15px;
  1511. }
  1512. .inputs {
  1513. margin: 0 auto;
  1514. margin-right: 15%;
  1515. }
  1516. .inputChenge {
  1517. width: 150%;
  1518. display: inline-flex;
  1519. margin-left: -80%;
  1520. }
  1521. /deep/.el-tabs__active-bar {
  1522. background: transparent;
  1523. }
  1524. /deep/.el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),
  1525. /deep/.el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
  1526. /deep/.el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
  1527. /deep/.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  1528. padding-left: 20px;
  1529. }
  1530. /deep/.el-tabs--bottom .el-tabs__item.is-bottom:last-child,
  1531. /deep/.el-tabs--bottom .el-tabs__item.is-top:last-child,
  1532. /deep/.el-tabs--top .el-tabs__item.is-bottom:last-child,
  1533. /deep/.el-tabs--top .el-tabs__item.is-top:last-child {
  1534. padding-right: 20px;
  1535. }
  1536. /deep/.el-tabs {
  1537. // border-top:1px solid #ccc;
  1538. }
  1539. /deep/.el-table .warning-row {
  1540. background: #FFEDEF;
  1541. // border:1px solid #E05D6B !important;
  1542. }
  1543. /deep/.el-table .warning-row td {
  1544. border-bottom: 1px solid #E05D6B !important;
  1545. }
  1546. /deep/.el-tabs__nav-scroll {
  1547. background-color: white;
  1548. }
  1549. /deep/.el-tabs__nav-wrap::after {
  1550. background: transparent;
  1551. }
  1552. /deep/.el-tabs__active-bar {
  1553. background: #5878E8;
  1554. }
  1555. .buyer {
  1556. font-size: 16px;
  1557. font-weight: 600;
  1558. color: #323233;
  1559. line-height: 24px;
  1560. }
  1561. .content {
  1562. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  1563. // background: #E8ECF6;
  1564. }
  1565. .content1 {
  1566. background-color: white;
  1567. border-radius: 5px;
  1568. }
  1569. .content2 {
  1570. margin-top: 10px;
  1571. border-radius: 5px;
  1572. background: #F0F3FE;
  1573. }
  1574. .content2-item {
  1575. padding: 10px;
  1576. }
  1577. .row2>span {
  1578. margin-right: 20px;
  1579. }
  1580. // /deep/.el-tabs__active-bar{
  1581. // width: 270px!important;
  1582. // transform: translateX(0px)!important;
  1583. // }
  1584. // /deep/.el-tabs__item{
  1585. // padding: 0 55px!important;
  1586. // }
  1587. </style>