stockSaleOutReportList.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110
  1. //现货销售出库报表
  2. <template>
  3. <div class="container">
  4. <el-scrollbar style="height: 100%">
  5. <el-row>
  6. <el-col style="padding-left: 15px" :span="16">
  7. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.view`" @click="adopt()">备注
  8. </ws-button>
  9. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.view`" @click="depositbutton()">定金
  10. </ws-button>
  11. <ws-button type="primary" v-hasPermission="`report.goodsSaleOutReport.payment`" @click="handlecollect()">收款
  12. </ws-button>
  13. </el-col>
  14. <el-col style="text-align: right; line-height: 60px; padding-right: 10px" :span="8">
  15. <el-select v-model="contractNo" placeholder="请选择合同" clearable filterable @change="contractchange"
  16. maxlength="500" type="input" class="findValue">
  17. <el-option v-if="item.reportStatus" v-for="item in options" :key="item.constKey"
  18. :label="item.contractNo + '(' + item.reportStatus + ')'" :value="item.contractNo" />
  19. <!-- <el-option v-if="!item.reportStatus" v-for="item in options" :key="item.constKey"
  20. :label="item.contractNo" :value="item.contractNo" /> -->
  21. </el-select>
  22. </el-col>
  23. </el-row>
  24. <el-row class='row2' v-if='orderList.deliverType==1'>
  25. <el-tabs v-model="activeName" @tab-click="handleClick">
  26. <el-tab-pane v-for='(item,index) in orderList.tranTaskInfoList' :key='index'
  27. :label="item.taskNo+'+('+item.tranProcessInfo.tranType +')'" :name="item.tranProcessInfo.processNo"></el-tab-pane>
  28. </el-tabs>
  29. </el-row>
  30. <div v-if="contractNo != ''">
  31. <span v-if="orderList.buyer">买方: {{ orderList.buyer }} </span>
  32. <span v-else>买方: </span>
  33. </div>
  34. <div v-if="contractNo != ''">
  35. <span v-if="orderList.goodsName">货名: {{ orderList.goodsName }} </span>
  36. <span v-else>货名: </span>
  37. <span v-if="orderList.weight">合同重量: {{ orderList.weight }} 吨</span>
  38. <span v-else>合同重量: 0 吨</span>
  39. <span v-if="outboundVolume">出库量: {{ outboundVolume }} 吨</span>
  40. <span v-else>出库量: 0 吨</span>
  41. <span v-if="orderList.unitContractPrice">合同单价: {{ orderList.unitContractPrice }} 元/吨</span>
  42. <span v-else>合同单价: 0 元/吨</span>
  43. <span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(2) }} 元</span>
  44. <span v-else>应收: 0 元</span>
  45. <span v-if="amountReceived">已收: {{ amountReceived.toFixed(2) }} 元
  46. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  47. src="../../../public/img/fujian.png" @click="fujian1()" alt="" />
  48. </span>
  49. <span v-else>已收: 0 元</span>
  50. <span v-if="uncollectedAmount">未收: {{ uncollectedAmount.toFixed(2) }} 元</span>
  51. <span v-else>未收: 0 元</span>
  52. <span v-if="orderList.deposit">定金: {{ orderList.deposit }} 元
  53. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  54. src="../../../public/img/fujian.png" @click="fujian()" alt="" />
  55. </span>
  56. <span v-else>定金: 0 元</span>
  57. </div>
  58. <!-- 自运 -->
  59. {{this.tranType}}
  60. <el-table class="wenzi" :data="saleList.records" style="width: 100%; margin-top: 20px" ref="saleList" border
  61. :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange"
  62. @row-click="handleRowClick" v-if="orderList.deliverType==1">
  63. <el-table-column type="selection" width="55"></el-table-column>
  64. <el-table-column type="index" label="序号" width="50"></el-table-column>
  65. <el-table-column class="table_td" prop="processNo" label="运输任务阶段编号"></el-table-column>
  66. <el-table-column class="table_td" prop="warehouseName" label="仓库" v-if="this.tranType=='退库'"></el-table-column>
  67. <el-table-column class="table_td" prop="carNo" label="车牌号" v-if="this.tranType=='汽运'||this.tranType=='退库'"></el-table-column>
  68. <el-table-column class="table_td" prop="binNumber" label="仓位号" v-if="this.tranType=='散船'"></el-table-column>
  69. <el-table-column class="table_td" prop="boxNo" label="车厢号" v-if="this.tranType=='火运'"></el-table-column>
  70. <el-table-column class="table_td" prop="caseNo" label="箱号" v-if="this.tranType=='汽运'||this.tranType=='箱船'||this.tranType=='退库'"></el-table-column>
  71. <el-table-column class="table_td" prop="titleNo" label="封号" v-if="this.tranType=='汽运'||this.tranType=='箱船'||this.tranType=='退库'"></el-table-column>
  72. <el-table-column class="table_td" prop="createDate" label="卸车反馈日期" v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
  73. <el-table-column class="table_td" prop="createDate" label="卸船反馈日期" v-if="this.tranType=='散船'||this.tranType=='箱船'"></el-table-column>
  74. <el-table-column class="table_td" prop="returnDate" label="退库日期" v-if="this.tranType=='退库'"></el-table-column>
  75. <el-table-column class="table_td" prop="feedbackPerson" label="卸车反馈人" v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
  76. <el-table-column class="table_td" prop="feedbackPerson" label="卸船反馈人" v-if="this.tranType=='散船'||this.tranType=='箱船'"></el-table-column>
  77. <el-table-column class="table_td" prop="grossWeight" label="毛重(吨)" v-if="this.tranType=='退库'"></el-table-column>
  78. <el-table-column class="table_td" prop="tare" label="皮重(吨)" v-if="this.tranType=='退库'"></el-table-column>
  79. <el-table-column class="table_td" prop="netWeight" label="净重(吨)" v-if="this.tranType=='退库'"></el-table-column>
  80. <!-- <el-table-column class="table_td" prop="deliveryDate" label="出库日期">
  81. <template slot-scope="scope">
  82. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.returnDate}}</span>
  83. <span v-if="scope.row.returnFlag == null">{{scope.row.deliveryDate }}</span>
  84. </template>
  85. </el-table-column> -->
  86. <el-table-column class="table_td" prop="unloadingWeight" label="卸车净重(吨)" v-if="this.tranType=='汽运'||this.tranType=='火运'"></el-table-column>
  87. <el-table-column class="table_td" prop="unloadingWeight" label="卸船净重(吨)" v-if="this.tranType=='散船'||this.tranType=='箱船'"></el-table-column>
  88. <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)"></el-table-column>
  89. <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)"></el-table-column>
  90. <el-table-column class="table_td" prop="amountEdReceivable" label="已收金额(元)">
  91. <!-- <template slot-scope="scope">
  92. <span style="color: #ce4545;" @click='fujian2(scope.row)'
  93. v-if="scope.row.returnFlag == 1">{{scope.row.netWeight}}(退)</span>
  94. <span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
  95. </template> -->
  96. </el-table-column>
  97. <el-table-column class="table_td" prop="amountNotReceivable" label="未收金额(元)">
  98. <!-- <template slot-scope="scope">
  99. <div class="inputChenge">
  100. <el-input v-model="scope.row.settlementWeight" v-if="scope.row.identification == 'true'">
  101. </el-input>
  102. <div v-if="scope.row.identification == 'false'" class="inputs">
  103. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.settlementWeight}}</span>
  104. <span v-if="scope.row.returnFlag == null">{{scope.row.settlementWeight }}</span>
  105. </div>
  106. </div>
  107. <img v-hasPermission="`report.goodsSaleOutReport.edit`" width="17" height="18"
  108. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  109. @click="whether(scope.row)" v-if="scope.row.identification == 'false'" alt="" />
  110. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  111. v-if="scope.row.identification == 'true'" @click="weightClick(scope.row)"></i>
  112. </template> -->
  113. </el-table-column>
  114. <el-table-column class="table_td" prop="collectionDate" label="收款日期">
  115. <!-- <template slot-scope="scope">
  116. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  117. </template> -->
  118. </el-table-column>
  119. <el-table-column class="table_td" prop="status" label="状态">
  120. <!-- <template slot-scope="scope">
  121. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  122. </template> -->
  123. </el-table-column>
  124. </el-table>
  125. <!-- 他运 -->
  126. <el-table v-else class="wenzi" :data="saleList.records" style="width: 100%; margin-top: 20px" ref="saleList1"
  127. border :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange">
  128. <el-table-column type="selection" width="55"></el-table-column>
  129. <el-table-column type="index" label="序号" width="50"></el-table-column>
  130. <el-table-column class="table_td" prop="warehouseName" label="仓库"></el-table-column>
  131. <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
  132. <el-table-column class="table_td" prop="deliveryDate" label="出库日期">
  133. <template slot-scope="scope">
  134. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.returnDate}}</span>
  135. <span v-if="scope.row.returnFlag == null">{{scope.row.deliveryDate }}</span>
  136. </template>
  137. </el-table-column>
  138. <el-table-column class="table_td" prop="grossWeight" label="毛重(吨)"></el-table-column>
  139. <el-table-column class="table_td" prop="tare" label="皮重(吨)"></el-table-column>
  140. <el-table-column class="table_td" prop="netWeight" label="净重(吨)">
  141. <template slot-scope="scope">
  142. <span style="color: #ce4545;" @click='fujian2(scope.row)'
  143. v-if="scope.row.returnFlag == 1">{{scope.row.netWeight}}(退)</span>
  144. <span @click='fujian2(scope.row)' v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
  145. </template>
  146. </el-table-column>
  147. <el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
  148. <template slot-scope="scope">
  149. <div class="inputChenge">
  150. <el-input v-model="scope.row.settlementWeight" v-if="scope.row.identification == 'true'">
  151. </el-input>
  152. <div v-if="scope.row.identification == 'false'" class="inputs">
  153. <span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.settlementWeight}}</span>
  154. <span v-if="scope.row.returnFlag == null">{{scope.row.settlementWeight }}</span>
  155. </div>
  156. </div>
  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)" v-if="scope.row.identification == 'false'" alt="" />
  160. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px"
  161. v-if="scope.row.identification == 'true'" @click="weightClick(scope.row)"></i>
  162. </template>
  163. </el-table-column>
  164. <el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
  165. <template slot-scope="scope">
  166. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  167. </template>
  168. </el-table-column>
  169. <el-table-column class="table_td" prop="amountIngReceivable" label="已收金额(元)">
  170. <template slot-scope="scope">
  171. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column class="table_td" prop="amountIngReceivable" label="未收金额(元)">
  175. <template slot-scope="scope">
  176. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  177. </template>
  178. </el-table-column>
  179. <el-table-column class="table_td" prop="amountIngReceivable" label="收款日期">
  180. <template slot-scope="scope">
  181. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  182. </template>
  183. </el-table-column>
  184. <el-table-column class="table_td" prop="amountIngReceivable" label="状态">
  185. <template slot-scope="scope">
  186. <span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
  187. </template>
  188. </el-table-column>
  189. </el-table>
  190. <!-- 页数 -->
  191. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  192. :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"></el-pagination>
  193. </el-scrollbar>
  194. <!-- 定金弹窗 -->
  195. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  196. @on-cancel="handleClose">
  197. <div v-for="(item,index) in addressUrlArray" :key="index">
  198. <img width="100" height="100" :src="item" alt="">
  199. </div>
  200. </WinseaContentModal>
  201. <!-- 已收弹窗 -->
  202. <WinseaContentModal v-model="accessoryTFs1" :title="$t('system.noticeCircular.information')"
  203. @on-cancel="handleClose1">
  204. <div style="display: flex;">
  205. <div v-for="(item,index) in addressUrlArray1" :key="index" style="display:flex;">
  206. <img width="100" height="100" :src="item" alt="">
  207. <!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/f43f512136a544d3bbcef0fa4259d274.png" alt=""> -->
  208. </div>
  209. </div>
  210. </WinseaContentModal>
  211. <WinseaContentModal v-model="accessoryTFs2" :title="$t('system.noticeCircular.information')"
  212. @on-cancel="handleClose">
  213. <img width="100" height="100" :src="appendixIdss2" alt="">
  214. </WinseaContentModal>
  215. <!-- 收款 -->
  216. <el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
  217. <el-form :model="form">
  218. <el-form-item label="未收金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
  219. <span>{{ uncollectedAmount }}</span>
  220. </el-form-item>
  221. <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
  222. <el-input v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
  223. </el-form-item>
  224. <el-form-item label="收款日期" prop="collectionDate" :label-width="formLabelWidth" class="deal">
  225. <ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"
  226. class="deal" />
  227. </el-form-item>
  228. <el-form-item label="上传收款截图" :label-width="formLabelWidth">
  229. <el-upload ref='upload' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
  230. :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
  231. <i class="el-icon-plus"></i>
  232. </el-upload>
  233. </el-form-item>
  234. </el-form>
  235. <div slot="footer" class="dialog-footer">
  236. <el-button @click="dialogFormVisible1 = false">取 消</el-button>
  237. <el-button v-hasPermission="`report.goodsSaleOutReport.payment`" type="primary" @click="collectment()">提 交
  238. </el-button>
  239. </div>
  240. </el-dialog>
  241. <!-- 定金 -->
  242. <el-dialog width="25%" title="定金" :visible.sync="dialogFormVisible2" :append-to-body="true">
  243. <el-form :model="form">
  244. <el-form-item label="已收定金(元)" :label-width="formLabelWidth">
  245. <el-input v-model="orderList.deposit" autocomplete="off" placeholder="输入定金金额" class="deal"></el-input>
  246. </el-form-item>
  247. <el-form-item label="上传定金截图" :label-width="formLabelWidth">
  248. <el-upload action="https://www.zthymaoyi.com/upload/admin" :limit='1' list-type="picture-card"
  249. :on-success="handlePictureCardPreview1" :on-remove="handleRemove" class="photo2">
  250. <i class="el-icon-plus"></i>
  251. </el-upload>
  252. </el-form-item>
  253. </el-form>
  254. <div slot="footer" class="dialog-footer">
  255. <el-button @click="dialogFormVisible2 = false">取 消</el-button>
  256. <el-button type="primary" @click="depositSubmit()">提 交</el-button>
  257. </div>
  258. </el-dialog>
  259. <!--备注-->
  260. <el-dialog width="25%" title="备注" :visible.sync="collectForm1" :append-to-body="true">
  261. <el-form :model="form">
  262. <div class="beizhu">
  263. <el-input v-model="orderList.remark" autocomplete="off" placeholder="备注信息,不超过1000字" class="deal"></el-input>
  264. </div>
  265. </el-form>
  266. <div slot="footer" class="dialog-footer">
  267. <el-button @click="collectForm1 = false">关闭</el-button>
  268. <el-button v-hasPermission="`report.goodsSaleOutReport.carry`" type="primary" @click="adoptRemarks()">保存
  269. </el-button>
  270. </div>
  271. </el-dialog>
  272. </div>
  273. <!-- </div> -->
  274. </template>
  275. <script>
  276. import {
  277. getStockSaleReceiptList,
  278. getStockSaleContractNoList,
  279. stockSaleCollectMoney,
  280. disOrRemarks,
  281. saleEditSettlementWeight,
  282. } from '@/model/statisticalReport/index'
  283. import Pagination from '@/components/Pagination'
  284. import WsUpload from '@/components/WsUpload'
  285. import {
  286. EventBus
  287. } from 'base-core-lib'
  288. export default {
  289. name: 'viewSpareMoney',
  290. components: {
  291. WsUpload,
  292. Pagination,
  293. },
  294. watch: {
  295. vesselId(val) {
  296. this.getList()
  297. },
  298. isShow(val) {
  299. this.showType = val
  300. },
  301. },
  302. data() {
  303. return {
  304. tranType:'',
  305. clickType: '',
  306. activeName: '',
  307. dialogFormVisible1: false,
  308. dialogFormVisible2: false,
  309. amountEdReceivable: 0,
  310. amountNotReceivable: 0,
  311. deptBudgetList: {},
  312. //分页
  313. currentPage: 1,
  314. pageSize: 10,
  315. allmoney1: 0,
  316. deptCircularPage: {},
  317. deptBudgetTotal: 0,
  318. stockSaleReceiptReportList: [],
  319. stockSaleReceiptReport: {
  320. stockSaleReceiptReportList: [],
  321. money: '',
  322. amountEdReceivable: 0,
  323. amountNotReceivable: 0,
  324. collectionDate: '',
  325. id: '',
  326. invoiceType: '',
  327. },
  328. orderList: {},
  329. options: [],
  330. contractNoList: [],
  331. contractNo: '',
  332. dialogVisible: false,
  333. form: {},
  334. compId: sessionStorage.getItem('ws-pf_compId'),
  335. collectForm: false,
  336. collectForm1: false,
  337. managementType: 3,
  338. money: 0,
  339. // id:'',
  340. collectmoney: 0,
  341. remark: '',
  342. remarkInformationList: {},
  343. remarkInformation: {
  344. remarkInformationList: [],
  345. id: '',
  346. remark: '',
  347. deposit: '0',
  348. depositUrl: '',
  349. },
  350. deposit: '0',
  351. depositUrl: [],
  352. saleList: [],
  353. amountReceivable: '',
  354. amountReceived: '',
  355. uncollectedAmount: '',
  356. outboundVolume: '',
  357. collectionDate: '',
  358. collectionScreenshot: '',
  359. amountEdCollectionable: '',
  360. actualCollectionment: '',
  361. // collectDate: '',
  362. calculationCollectable: '',
  363. searchType: '',
  364. searchTypeText: '',
  365. formLabelWidth: '120px',
  366. searchKeyWord: '',
  367. value1: '', //收款日期
  368. modification: [],
  369. accessoryTFs: false,
  370. appendixIdss: [],
  371. accessoryTFs1: false,
  372. appendixIdss1: [],
  373. appendixIdss2: '',
  374. accessoryTFs2: false,
  375. addressUrlArray: [],
  376. addressUrlArray1: [],
  377. }
  378. },
  379. activated() {
  380. var now = new Date();
  381. var year = now.getFullYear(); //得到年份
  382. var month = now.getMonth(); //得到月份
  383. var date = now.getDate(); //得到日期
  384. month = month + 1;
  385. month = month.toString().padStart(2, "0");
  386. date = date.toString().padStart(2, "0");
  387. this.collectionDate = `${year}-${month}-${date}`;
  388. this.getList()
  389. this.showType = this.isShow
  390. },
  391. methods: {
  392. handleRowClick(){},
  393. handleClick(tab, event) {
  394. console.log(tab,event);
  395. },
  396. //表头
  397. contractchange(e) {
  398. console.log('type',this.activeName)
  399. for (var i = 0; i < this.contractNoList.length; i++) {
  400. if (this.contractNoList[i].contractNo == e) {
  401. this.orderList = this.contractNoList[i]
  402. this.activeName = this.orderList.tranTaskInfoList[0].tranProcessInfo.processNo
  403. this.tranType = this.orderList.tranTaskInfoList[0].tranProcessInfo.tranType
  404. if (this.contractNoList[i].depositUrl) {
  405. this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
  406. } else {
  407. this.addressUrlArray = []
  408. }
  409. }
  410. }
  411. this.contractNo = e
  412. // this.$refs.saleList.doLayout();
  413. this.getList(this.orderList.deliverType)
  414. },
  415. //选择合同
  416. dataFilter(val) {
  417. this.contractNo = val
  418. if (val) {
  419. //val存在
  420. this.options = this.contractNoList.filter(item => {
  421. if (
  422. !!~item.contractNo.indexOf(val) ||
  423. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  424. ) {
  425. return true
  426. }
  427. })
  428. } else {
  429. //val为空时,还原数组
  430. this.options = this.contractNoList
  431. }
  432. },
  433. //修改结算重量
  434. whether(row) {
  435. row.identification = 'true'
  436. },
  437. weightClick(row) {
  438. if (
  439. row.settlementWeight > 200 ||
  440. row.settlementWeight < 1 ||
  441. (String(row.settlementWeight).indexOf(
  442. '.'
  443. ) != -1 &&
  444. String(row.settlementWeight).length -
  445. (String(row.settlementWeight).indexOf(
  446. '.'
  447. ) +
  448. 1) >
  449. 3)
  450. ) {
  451. this.$message({
  452. message: '结算重量输入错误',
  453. type: 'warning',
  454. })
  455. return
  456. }
  457. this.$confirm(`确定要修改结算重量?`, {
  458. confirmButtonText: '确定',
  459. cancelButtonText: '取消',
  460. type: 'warning',
  461. })
  462. .then(() => {
  463. saleEditSettlementWeight({
  464. settlementWeight: row.settlementWeight,
  465. id: row.id,
  466. })
  467. .toPromise()
  468. .then((response) => {
  469. this.$notify.success({
  470. title: '成功',
  471. message: '结算重量修改成功',
  472. })
  473. this.getList()
  474. })
  475. .catch(() => {
  476. return false
  477. })
  478. })
  479. },
  480. //备注信息
  481. adopt() {
  482. this.collectForm1 = true
  483. },
  484. adoptRemarks() {
  485. // this.remarkInformation.remark = this.orderList.remark
  486. this.$confirm(`确定要保存备注信息?`, {
  487. confirmButtonText: '确定',
  488. cancelButtonText: '取消',
  489. type: 'warning',
  490. })
  491. .then(() => {
  492. for (var i = 0; i < this.contractNoList.length; i++) {
  493. if (this.contractNoList[i].contractNo == this.contractNo) {
  494. this.remarkInformationList.id = this.contractNoList[i].id
  495. }
  496. }
  497. this.remarkInformationList.remark = this.orderList.remark
  498. disOrRemarks(this.remarkInformationList)
  499. .toPromise()
  500. .then(() => {
  501. this.collectForm1 = false
  502. this.$message.success('添加备注信息成功')
  503. this.remarkInformationList = {}
  504. this.getList()
  505. })
  506. .catch(() => {
  507. return false
  508. })
  509. })
  510. },
  511. selectInit(row) {
  512. //在这里一定要记得类型匹配的上。
  513. // if (row.approveStatus == null) {
  514. // return true
  515. // } else if (row.approveStatus != null) {
  516. // if (row.taskId == null) {
  517. // return false
  518. // } else {
  519. // return true
  520. // }
  521. // }
  522. },
  523. handleSelectionChange(val) {
  524. this.modification = val
  525. },
  526. //合计
  527. getSummaries(param) {
  528. const {
  529. columns,
  530. data
  531. } = param
  532. const sums = []
  533. columns.forEach((column, index) => {
  534. if (index === 0) {
  535. sums[index] = '合计'
  536. } else if (
  537. index === 7 ||
  538. index === 8
  539. ) {
  540. const values = data.map((item) => Number(item[column.property]))
  541. if (!values.every((value) => isNaN(value))) {
  542. sums[index] = values.reduce((prev, curr) => {
  543. const value = Number(curr)
  544. if (!isNaN(value)) {
  545. return prev + curr
  546. } else {
  547. return prev
  548. }
  549. }, 0)
  550. } else {
  551. sums[index] = '元'
  552. }
  553. } else {
  554. sums[index] = '--'
  555. }
  556. })
  557. sums[sums.length - 1] = sums[sums.length - 1].toFixed(2)
  558. sums[sums.length - 2] = sums[sums.length - 2].toFixed(2)
  559. return sums
  560. },
  561. //定金
  562. depositbutton() {
  563. this.dialogFormVisible2 = true
  564. },
  565. depositSubmit() {
  566. this.remarkInformation.deposit = this.orderList.deposit
  567. this.remarkInformation.depositUrl = this.depositUrl
  568. this.$confirm(`确定提交定金信息?`, {
  569. cancelButtonText: '取消',
  570. confirmButtonText: '确定',
  571. type: 'warning',
  572. }).then(() => {
  573. for (var i = 0; i < this.contractNoList.length; i++) {
  574. if (this.contractNoList[i].contractNo == this.contractNo) {
  575. this.remarkInformationList.id = this.contractNoList[i].id
  576. }
  577. }
  578. this.remarkInformationList.deposit = this.orderList.deposit
  579. this.remarkInformationList.depositUrl = this.depositUrl.toString()
  580. disOrRemarks(this.remarkInformationList)
  581. .toPromise()
  582. .then((response) => {
  583. this.$notify.success({
  584. title: '成功',
  585. message: '定金成功',
  586. })
  587. this.remarkInformationList = {}
  588. this.dialogFormVisible2 = false
  589. this.getList()
  590. })
  591. .catch((response) => {
  592. console.log(response)
  593. EventBus.$emit('error', response.message)
  594. })
  595. })
  596. },
  597. //定金附件
  598. fujian() {
  599. if (this.orderList.depositUrl === null || this.orderList.depositUrl === '') {
  600. EventBus.$emit(
  601. 'warning',
  602. this.$t('system.noticeCircular.NoInformation')
  603. )
  604. }
  605. this.appendixIdss = this.orderList.depositUrl
  606. this.accessoryTFs = true
  607. },
  608. fujian2(item) {
  609. if (item.poundImg === null || item.poundImg === '') {
  610. EventBus.$emit(
  611. 'warning',
  612. this.$t('system.noticeCircular.NoInformation')
  613. )
  614. }
  615. this.appendixIdss2 = item.poundImg
  616. this.accessoryTFs2 = true
  617. },
  618. handleClose() {
  619. this.accessoryTFs = false
  620. },
  621. //已收附件
  622. fujian1() {
  623. if (this.addressUrlArray1.length == 0) {
  624. EventBus.$emit(
  625. 'warning',
  626. this.$t('system.noticeCircular.NoInformation')
  627. )
  628. } else {
  629. this.appendixIdss1 = this.collectionScreenshot
  630. this.accessoryTFs1 = true
  631. }
  632. },
  633. handleClose1() {
  634. this.accessoryTFs1 = false
  635. },
  636. //收款
  637. handlecollect() {
  638. this.amountEdReceivable = this.saleList.records[0].amountEdReceivable
  639. this.amountNotReceivable = this.saleList.records[0].amountNotReceivable
  640. this.stockSaleReceiptReportList = this.saleList.records
  641. this.dialogFormVisible1 = true
  642. },
  643. collectment() {
  644. this.stockSaleReceiptReport.money = this.money
  645. this.stockSaleReceiptReport.collectionDate = this.collectionDate
  646. if (
  647. this.money == 0 ||
  648. (String(this.money).indexOf('.') != -1 &&
  649. String(this.money).length - (String(this.money).indexOf('.') + 1) >
  650. 2)
  651. ) {
  652. this.$message({
  653. message: '收款金额输入错误',
  654. type: 'warning',
  655. })
  656. return
  657. }
  658. if (this.money) {
  659. if (isNaN(this.money)) {
  660. this.$message({
  661. message: '收款金额非数字!',
  662. type: 'warning',
  663. })
  664. return
  665. }
  666. }
  667. if (!this.money) {
  668. this.$message({
  669. message: '收款金额不能为空!',
  670. type: 'warning',
  671. })
  672. return
  673. }
  674. if (this.money >= 0 && this.money > this.uncollectedAmount) {
  675. this.$message({
  676. message: '收款金额不能大于未收金额!',
  677. type: 'warning',
  678. })
  679. return
  680. }
  681. this.$confirm(`确定提交收款信息?`, {
  682. cancelButtonText: '取消',
  683. confirmButtonText: '确定',
  684. type: 'warning',
  685. }).then(() => {
  686. stockSaleCollectMoney({
  687. stockSaleReceiptReportList: this.stockSaleReceiptReportList,
  688. amountEdReceivable: this.amountEdReceivable,
  689. amountNotReceivable: this.amountNotReceivable,
  690. money: this.money,
  691. collectionDate: this.collectionDate,
  692. collectionScreenshot: this.collectionScreenshot,
  693. })
  694. .toPromise()
  695. .then((response) => {
  696. this.$notify.success({
  697. title: '成功',
  698. message: '收款成功',
  699. })
  700. this.stockSaleReceiptReportList = {}
  701. this.money = ''
  702. this.collectionDate = ''
  703. this.collectionScreenshot = ''
  704. this.$refs.upload.clearFiles()
  705. this.dialogFormVisible1 = false
  706. this.getList()
  707. })
  708. .catch((response) => {
  709. console.log(response)
  710. EventBus.$emit('error', response.message)
  711. })
  712. })
  713. },
  714. //列表
  715. getList(type) {
  716. // 1自运2他运
  717. let _data = {
  718. compId: sessionStorage.getItem('ws-pf_compId'),
  719. currentPage: this.currentPage,
  720. pageSize: this.pageSize,
  721. searchType: this.searchType,
  722. contractNo: this.contractNo,
  723. }
  724. if(type==1){
  725. _data.processNo = this.activeName
  726. }
  727. getStockSaleReceiptList(_data)
  728. .toPromise()
  729. .then((response) => {
  730. this.amountReceivable = 0
  731. this.amountReceived = 0
  732. this.uncollectedAmount = 0
  733. this.outboundVolume = 0
  734. let num = []
  735. for (var i = 0; i < response.records.length; i++) {
  736. response.records[i].identification = 'false'
  737. this.amountReceivable += response.records[i].amountIngReceivable
  738. this.amountReceived += response.records[i].amountEdReceivable
  739. this.uncollectedAmount += response.records[i].amountNotReceivable
  740. this.outboundVolume += response.records[i].settlementWeight
  741. // this.addressUrlArray1.push(response.records[i].collectionScreenshot.split('$'))
  742. if (response.records[i].collectionScreenshot != null) {
  743. num = response.records[i].collectionScreenshot.split('$')
  744. for (let j = 0; j < num.length; j++) {
  745. if (num[j] != '') {
  746. if (this.addressUrlArray1.indexOf(num[j]) == -1) {
  747. this.addressUrlArray1.push(num[j])
  748. }
  749. }
  750. }
  751. }
  752. }
  753. this.deptBudgetTotal = response.total
  754. this.saleList = response
  755. })
  756. getStockSaleContractNoList({
  757. compId: sessionStorage.getItem('ws-pf_compId'),
  758. currentPage: this.currentPage,
  759. pageSize: this.pageSize,
  760. roleFlag: this.roleFlag,
  761. })
  762. .toPromise()
  763. .then((response) => {
  764. this.contractNoList = response
  765. // this.contractNoList.unshift({})
  766. this.options = this.contractNoList
  767. })
  768. },
  769. //收款截图
  770. handleRemove(file) {
  771. console.log(file)
  772. },
  773. handlePictureCardPreview(file) {
  774. this.collectionScreenshot = file.url
  775. },
  776. handlePictureCardPreview1(file) {
  777. this.depositUrl = file.url
  778. },
  779. handleDownload(file) {
  780. console.log(file)
  781. },
  782. handleSizeChange(val) {
  783. console.log(`每页 ${val} 条`)
  784. this.pageSize = val
  785. this.getList()
  786. },
  787. handleCurrentChange(val) {
  788. this.currentPage = val
  789. console.log(`当前页: ${val}`)
  790. this.getList()
  791. },
  792. },
  793. }
  794. </script>
  795. <style lang="scss" scoped>
  796. .connert {
  797. width: 90%;
  798. margin: 0 auto;
  799. }
  800. .vertical-text-left {
  801. width: 62px;
  802. text-align: right;
  803. }
  804. //分页
  805. .el-pagination {
  806. padding: 10px 15px;
  807. margin-bottom: 0;
  808. text-align: center;
  809. }
  810. /deep/.el-pager li.active {
  811. color: #5878e8;
  812. cursor: default;
  813. }
  814. /deep/.el-pager li:hover {
  815. color: #5878e8;
  816. cursor: default;
  817. }
  818. .el-button--default {
  819. color: #8890b1;
  820. border-color: #e8eaf1;
  821. }
  822. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  823. width: 30px;
  824. margin-left: 0;
  825. border-top-left-radius: 0px;
  826. border-bottom-left-radius: 0px;
  827. }
  828. /deep/.findValue .el-input__inner {
  829. border-top-right-radius: 0px;
  830. border-bottom-right-radius: 0px;
  831. width: 385px;
  832. }
  833. .completed.el-button--default {
  834. border-color: #5878e8;
  835. background-color: #f6f7fc;
  836. color: #5878e8;
  837. }
  838. .putstorage.el-button--default,
  839. .deliverystorage.el-button--default {
  840. border-color: #8890b1;
  841. background-color: #fff;
  842. color: #8890b1;
  843. }
  844. /deep/.el-table td,
  845. /deep/.el-table th.is-leaf {
  846. border-right: 1px solid #e9ecf7;
  847. text-align: center;
  848. }
  849. /deep/.el-table tr td:first-child,
  850. /deep/.el-table tr th.is-leaf:first-child {
  851. border-left: 1px solid #e9ecf7;
  852. }
  853. .record,
  854. .adjustment {
  855. display: inline-block;
  856. color: #5878e8;
  857. padding: 0 4px !important;
  858. position: relative;
  859. }
  860. .record:after {
  861. position: absolute;
  862. content: '';
  863. display: block;
  864. top: 5px;
  865. right: -2px;
  866. width: 1px;
  867. height: 12px;
  868. background: #e9ecf7;
  869. }
  870. // .el-row{
  871. // height: 150px;
  872. // }
  873. .base_header_layout .grid-content {
  874. margin-top: 80px;
  875. }
  876. .el-input--small .el-input__inner {
  877. margin-left: 20px;
  878. }
  879. .el-range-editor--small.el-input__inner {
  880. height: 32px;
  881. margin-left: -20%;
  882. }
  883. //执行样式
  884. .executory,
  885. .inExecution,
  886. .done {
  887. width: 6px;
  888. height: 6px;
  889. display: inline-block;
  890. border-radius: 50%;
  891. position: relative;
  892. top: -1px;
  893. font-size: 14px;
  894. }
  895. .executory {
  896. background: #ff9f24;
  897. }
  898. .inExecution {
  899. background: #5878e8;
  900. }
  901. .done {
  902. background: #50cad4;
  903. }
  904. .record,
  905. .adjustment {
  906. display: inline-block;
  907. color: #5878e8;
  908. padding: 0 4px !important;
  909. position: relative;
  910. font-size: 14px;
  911. }
  912. .container {
  913. overflow: scroll;
  914. height: 93vh;
  915. }
  916. .button-container {
  917. display: flex;
  918. flex-wrap: nowrap;
  919. justify-content: space-between;
  920. align-items: center;
  921. background-color: #fff;
  922. width: 100%;
  923. height: 50px;
  924. padding: 0 10px;
  925. &>div {
  926. margin-left: 10px;
  927. display: flex;
  928. flex-wrap: nowrap;
  929. flex-direction: row;
  930. &>span {
  931. line-height: 50px;
  932. }
  933. }
  934. /deep/.auditFlow-box {
  935. position: unset;
  936. margin-left: 10px;
  937. &/deep/.auditFlow-icon {
  938. width: auto;
  939. padding-right: 30px;
  940. }
  941. &/deep/.auditFlow-main {
  942. position: absolute;
  943. }
  944. }
  945. }
  946. .bg-left {
  947. padding-left: 30px;
  948. }
  949. .title {
  950. position: relative;
  951. }
  952. .title::before {
  953. content: '';
  954. display: inline-block;
  955. width: 5px;
  956. height: 30px;
  957. background: #5473e8;
  958. position: absolute;
  959. left: 0;
  960. }
  961. .el-button--primary {
  962. background-color: #5878e8;
  963. border-color: #5878e8;
  964. // margin-left: 85%;
  965. margin-top: 13px;
  966. }
  967. //导航条样式
  968. .el-col-12 {
  969. width: 50%;
  970. height: 60px;
  971. background: #f6f7fc;
  972. border-radius: 4px 4px 1px 1px;
  973. }
  974. .el-input--small .el-input__inner {
  975. height: 32px;
  976. line-height: 32px;
  977. width: 385px;
  978. margin-top: 10px;
  979. }
  980. .bg-bottom {
  981. margin-left: 85%;
  982. }
  983. .but {
  984. margin-left: 30%;
  985. /* margin-top: -32px; */
  986. overflow: auto;
  987. /* float: left; */
  988. /* margin-left: 1px; */
  989. margin-left: -10px;
  990. }
  991. .el-input--small {
  992. font-size: 13px;
  993. width: 390px;
  994. margin-left: 74%;
  995. }
  996. /deep/.el-table .el-table__header .cell,
  997. .el-table .el-table__body .cell {
  998. text-align: center;
  999. }
  1000. .el-scrollbar__wrap {
  1001. overflow-y: hidden;
  1002. }
  1003. /deep/.deal {
  1004. margin-left: 0%;
  1005. width: 64%;
  1006. }
  1007. .photo {
  1008. padding: 0% 34%;
  1009. }
  1010. .photo1 {
  1011. padding: 0 10%;
  1012. }
  1013. .photo2 {
  1014. padding: 0 12%;
  1015. }
  1016. /deep/.el-form-item--small .el-form-item__label,
  1017. .el-form-item--small .el-form-item__content {
  1018. text-align: center;
  1019. }
  1020. hr {
  1021. width: 91%;
  1022. }
  1023. /deep/.deaal {
  1024. width: 66%;
  1025. margin-left: 9%;
  1026. }
  1027. .el-date-editor.el-input,
  1028. .el-date-editor.el-input__inner,
  1029. .el-input-number--small {}
  1030. /deep/.el-table td,
  1031. .el-table th.is-leaf {
  1032. border-right: 1px solid #e9ecf7;
  1033. text-align: center;
  1034. height: 40px;
  1035. }
  1036. /deep/.beizhu .el-input--small .el-input__inner {
  1037. height: 220px;
  1038. line-height: 28px;
  1039. width: 146%;
  1040. margin-left: 15px;
  1041. }
  1042. .inputs {
  1043. margin: 0 auto;
  1044. margin-right: 15%;
  1045. }
  1046. .inputChenge {
  1047. width: 150%;
  1048. display: inline-flex;
  1049. margin-left: -80%;
  1050. }
  1051. </style>