warehouseReceiptRegulation.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. //贸易服务管理
  2. <template>
  3. <div class="container">
  4. <map-drag :class="{active:isActive}"></map-drag>
  5. <div class="bottom" :class="{active:isActive}">
  6. <div class="bottom-content">
  7. <div class="bottom-item" @click="startHacking">查看申请记录</div>
  8. <div class="bottom-item"><i class="el-icon-d-arrow-right icon"></i></div>
  9. <el-radio class="bottom-item" v-model="radio" label="1" @change="selectShowType">默认地图</el-radio>
  10. </div>
  11. </div>
  12. <div class="top">
  13. <div class="top-content">
  14. <div class="top-item" @click="startHacking1">查看地图</div>
  15. <div class="top-item"><i class="el-icon-d-arrow-left icon"></i></div>
  16. <el-radio class="top-item" v-model="radio" label="2" @change="selectShowType">默认列表</el-radio>
  17. </div>
  18. </div>
  19. <div class="content2">
  20. <div class="header">
  21. <el-button type="" :type="searchType == 0 ? 'primary' : ''" @click="handlestatus(1)">全部</el-button>
  22. <el-button type="" :type="searchType == 1 ? 'primary' : ''" @click="handlestatus(2)">待审核</el-button>
  23. <el-button type="" :type="searchType == 2 ? 'primary' : ''" @click="handlestatus(3)">待审批</el-button>
  24. <el-button type="" :type="searchType == 3 ? 'primary' : ''" @click="handlestatus(4)">待还</el-button>
  25. <el-button type="" :type="searchType == 4 ? 'primary' : ''" @click="handlestatus(5)">已还</el-button>
  26. <el-input placeholder="可按业务编号、合同编号、仓库名查找" class="search-input" v-model="searchKeyWord"></el-input>
  27. <el-button type="primary" @click='findList'>查找</el-button>
  28. <el-button type="primary" class="add" @click="add">添加</el-button>
  29. </div>
  30. <el-table :data="tradeServicesList" style="width: 100%; margin-top: 20px" ref="tradeServicesList" border
  31. height="calc(100% - 90px)">
  32. <el-table-column type="index" label="序号">
  33. <template scope="scope">
  34. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  35. <span v-else>{{ scope.$index + 1 }}</span>
  36. </template>
  37. </el-table-column>
  38. <el-table-column prop="billNo" label="业务编号"></el-table-column>
  39. <el-table-column prop="contractNo" label="合同编号"></el-table-column>
  40. <el-table-column prop="warehouseName" label="仓库名"></el-table-column>
  41. <el-table-column prop="warehouseNo" label="仓位号">
  42. <!-- <template slot-scope="scope">
  43. <div>{{scope.row.bankDeposit}}-{{scope.row.bankDepositBranch}}</div>
  44. </template> -->
  45. </el-table-column>
  46. <el-table-column prop="goodsName" label="货名"></el-table-column>
  47. <el-table-column prop="weight" label="重量(吨)"></el-table-column>
  48. <el-table-column prop="unitPrice" label="单价(元/吨)"></el-table-column>
  49. <el-table-column prop="totalValue" label="总价值(元)"></el-table-column>
  50. <el-table-column prop="paymentAmount" label="发放金额(元)"></el-table-column>
  51. <el-table-column prop="amountDue" label="应还金额(元)"></el-table-column>
  52. <el-table-column prop="amountRepaid" label="已还金额(元)"></el-table-column>
  53. <el-table-column prop="amountToRepaid" label="待还金额(元)"></el-table-column>
  54. <el-table-column prop="status" label="状态">
  55. <!-- <template slot-scope="scope">
  56. <div>{{scope.row.bankDeposit}}-{{scope.row.bankDepositBranch}}</div>
  57. </template> -->
  58. </el-table-column>
  59. <el-table-column prop="address" label="操作" width="430">
  60. <template slot-scope="scope">
  61. <el-button size="mini" @click="lookBtnClick(scope.row, 2)" v-show="scope.row.authenticationStatus!='已删除'">
  62. 查看</el-button>
  63. <el-button size="mini" @click="toExamineBtnClick(scope.row, 2)"
  64. v-show="scope.row.authenticationStatus!='已删除'">
  65. 审核</el-button>
  66. <el-button size="mini" @click="approveBtnClick(scope.row, 2)"
  67. v-show="scope.row.authenticationStatus!='已删除'">
  68. 审批</el-button>
  69. <el-button size="mini" @click="repaymentBtnClick(scope.row, 2)"
  70. v-show="scope.row.authenticationStatus!='已删除'">
  71. 还款</el-button>
  72. <el-button size="mini" @click="rowEditBtnClick(scope.row, 3)"
  73. v-show="scope.row.authenticationStatus!='已删除'">修改</el-button>
  74. <el-button size="mini" type="danger" @click="rowDeleteBtnClick(scope.row, '')">删除</el-button>
  75. </template>
  76. </el-table-column>
  77. </el-table>
  78. <div class="paging">
  79. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  80. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
  81. :total="deptBudgetTotal"></el-pagination>
  82. </div>
  83. </div>
  84. </div>
  85. </template>
  86. <script>
  87. import mapDrag from '@/components/mapdrag/warehouseReceiptMap'
  88. import {
  89. getList,
  90. getMapInfo
  91. } from '@/model/tradeServicesManagement/index'
  92. import {
  93. selectWarehouseSelf,
  94. } from '@/model/houseSelfCollect/index'
  95. export default {
  96. components: {
  97. mapDrag
  98. },
  99. data() {
  100. return {
  101. searchVal: '',
  102. searchKeyWord: '',
  103. isActive: false,
  104. radio: '1',
  105. tradeServicesList: [],
  106. mapInfo: [],
  107. currentPage: 1,
  108. pageSize: 10,
  109. deptBudgetTotal: 0,
  110. deptCircularPage: {},
  111. searchType: '0',
  112. warehouseList: [],
  113. compId: '',
  114. }
  115. },
  116. activated() {},
  117. beforeCreate() {
  118. document.querySelector('body').setAttribute('style', 'overflow:hidden;')
  119. },
  120. mounted() {
  121. let height = document.body.offsetHeight - 57
  122. document.querySelector('.container').setAttribute('style', 'height:' + height + 'px;')
  123. let _showPage = sessionStorage.getItem('warehouseReceiptRegulation_selectShowType')
  124. if (_showPage == "1") {
  125. this.radio = '1'
  126. this.isActive = false
  127. } else if (_showPage == "2") {
  128. this.radio = '2'
  129. this.isActive = true
  130. } else {
  131. this.radio = '1'
  132. this.isActive = false
  133. }
  134. this.compId = sessionStorage.getItem('ws-pf_compId')
  135. this.getList()
  136. this.getMapInfo()
  137. // this.getWarehouseList()
  138. this.tradeServicesList = []
  139. },
  140. methods: {
  141. getMapInfo() {
  142. getMapInfo().toPromise().then((response) => {
  143. console.log('地图数据', response)
  144. // this.mapInfo = response.data.records
  145. })
  146. },
  147. findList() {
  148. this.currentPage = 1
  149. this.pageSize = 10
  150. this.getList()
  151. },
  152. handlestatus(status) {
  153. this.searchType = status
  154. // this.currentPage:=1
  155. // this.pageSize=10
  156. // this.getList()
  157. },
  158. lookBtnClick(val1, val2) {
  159. this.$router.push({
  160. name: 'warehouseReceiptLook'
  161. })
  162. },
  163. toExamineBtnClick(val1, val2) {
  164. this.$router.push({
  165. name: 'reviewWarehouseReceipt'
  166. })
  167. },
  168. approveBtnClick(val1, val2) {
  169. this.$router.push({
  170. name: 'approveWarehouseReceipt'
  171. })
  172. },
  173. repaymentBtnClick(val1, val2) {
  174. this.$router.push({
  175. name: 'repayment'
  176. })
  177. },
  178. rowEditBtnClick(val1, val2) {
  179. this.$router.push({
  180. name: 'warehouseReceiptEdit'
  181. })
  182. },
  183. rowDeleteBtnClick(val1, val2) {},
  184. handleSizeChange(val) {
  185. console.log(`每页 ${val} 条`)
  186. this.pageSize = val
  187. this.getWarehouseList()
  188. this.getList()
  189. },
  190. handleCurrentChange(val) {
  191. this.currentPage = val
  192. console.log(`当前页: ${val}`)
  193. this.getList()
  194. },
  195. startHacking() {
  196. this.isActive = true
  197. },
  198. startHacking1() {
  199. this.isActive = false
  200. },
  201. getWarehouseList() {
  202. selectWarehouseSelf({
  203. compId: this.compId
  204. })
  205. .toPromise()
  206. .then(response => {
  207. this.warehouseList = response
  208. })
  209. },
  210. getList(e, type) {
  211. if (type == 1) {
  212. this.isActive = true
  213. }
  214. getList({
  215. compId: this.compId,
  216. currentPage: this.currentPage,
  217. pageSize: this.pageSize,
  218. searchType: this.searchType,
  219. searchKeyWord: this.searchKeyWord,
  220. })
  221. .toPromise()
  222. .then((response) => {
  223. console.log('列表数据', response)
  224. this.tradeServicesList = response.records
  225. })
  226. },
  227. selectShowType(e) {
  228. this.activated = !this.activated;
  229. sessionStorage.setItem('warehouseReceiptRegulation_selectShowType', e)
  230. },
  231. add() {
  232. this.$router.push({
  233. name: 'warehouseReceiptAdd'
  234. })
  235. }
  236. }
  237. }
  238. </script>
  239. <style lang="scss" scoped>
  240. .container {}
  241. .icon {
  242. transform: rotate(90deg);
  243. margin: 0 10px;
  244. }
  245. .active {
  246. height: 0 !important;
  247. overflow: hidden;
  248. }
  249. .bottom,
  250. .top {
  251. display: flex;
  252. justify-items: flex-end;
  253. height: 5%;
  254. align-content: center;
  255. .bottom-content,
  256. .top-content {
  257. display: flex;
  258. justify-content: flex-end;
  259. width: 100%;
  260. padding-right: 25px;
  261. }
  262. .bottom-item,
  263. .top-item {
  264. display: flex;
  265. align-items: center;
  266. }
  267. }
  268. .content2 {
  269. // background: pink;
  270. padding: 20px;
  271. height: calc(100% - 44px);
  272. .header {
  273. position: relative;
  274. .add {
  275. position: absolute;
  276. right: 0;
  277. }
  278. }
  279. .search-input {
  280. width: 300px;
  281. margin-left: 10px;
  282. }
  283. }
  284. .paging {
  285. margin-top: 10px;
  286. text-align: center;
  287. }
  288. </style>