outWarehouseCheck.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
  7. <template slot="left">
  8. <el-input v-model="listQuery.keyword" placeholder="关键字搜索..." clearable
  9. style="margin-left: 20px;width: 500px;float: left;">
  10. </el-input>
  11. <el-select style="margin-left: 20px;width: 170px;float: left;" v-model="listQuery.production" clearable placeholder="业务类型">
  12. <el-option value="MAJOR_BUSINESS" label="大中型业务">大中型业务</el-option>
  13. <!-- <el-option value="REPORT" label="个贷业务">个贷业务</el-option>
  14. <el-option value="LETTER" label="资产业务">资产业务</el-option> -->
  15. </el-select>
  16. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList" round>搜索
  17. </el-button>
  18. <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
  19. </el-button>
  20. </template>
  21. <parentTable :data="pageData.records" slot="table" style="width: 100%;">
  22. <el-table-column label="业务类型" align="center" width='120'>
  23. <template slot-scope="{row}">
  24. <span>{{ businessTypeAlias(row.businessType) }}</span>
  25. </template>
  26. </el-table-column>
  27. <el-table-column label="报告号" align="center" width='300' >
  28. <template slot-scope="{row}">
  29. <span>{{ row.reportNo }}</span>
  30. </template>
  31. </el-table-column>
  32. <el-table-column label="当前实收款(¥)" align="center" width='150'>
  33. <template slot-scope="{row}">
  34. <span>{{ row.xrealAmount }}</span>
  35. </template>
  36. </el-table-column>
  37. <el-table-column label="收费标准(¥)" align="center" width='120'>
  38. <template slot-scope="{row}">
  39. <span>{{ row.standardAmount }}</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="申请原因" align="center" width='300' show-overflow-tooltip>
  43. <template slot-scope="{row}">
  44. <span>{{ row.remark==null?'-':row.remark}}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="申请人" align="center">
  48. <template slot-scope="{row}">
  49. <span>{{ row.applyName}}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="部门审核状态" align="center" >
  53. <template slot-scope="{row}">
  54. <span>{{ row.departmentCheckState}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="部门审核人" align="center" >
  58. <template slot-scope="{row}">
  59. <span>{{ row.departmentChecker}}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column label="部门审核时间" align="center" width="160">
  63. <template slot-scope="{row}">
  64. <span>{{ row.departmentCheckTime}}</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="部门审核意见" align="center" width='150' show-overflow-tooltip>
  68. <template slot-scope="{row}">
  69. <span>{{ row.departmentReply==null?'-':row.departmentReply}}</span>
  70. </template>
  71. </el-table-column>
  72. <!-- <el-table-column label="财务审核状态" align="center" width='150'>
  73. <template slot-scope="{row}">
  74. <span>{{ row.financeCheckState}}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="财务审核人" align="center" width='150'>
  78. <template slot-scope="{row}">
  79. <span>{{ row.financeChecker}}</span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="财务审核时间" align="center" width="160">
  83. <template slot-scope="{row}">
  84. <span>{{ row.financeCheckTime}}</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="财务审核意见" align="center" width='150' show-overflow-tooltip>
  88. <template slot-scope="{row}">
  89. <span>{{ row.financeReply==null?'-':row.departmentReply}}</span>
  90. </template>
  91. </el-table-column> -->
  92. <el-table-column v-if="taskId"
  93. align = "center" fixed="right" width='120'
  94. label="操作">
  95. <template slot-scope="{row}">
  96. <PermissionButton menu-code="_views_do_out_warehouse_check" class-name="filter-item" type="success"
  97. :page-jump="false" round size="mini" @click="doCheck(row.id)" :disabled="row.departmentCheckState" />
  98. </template>
  99. </el-table-column>
  100. </parentTable>
  101. </y-page-list-layout>
  102. <el-dialog :visible.sync="checkDialog" width="35%" center top="35vh" custom-class="doWarehouseClass">
  103. <el-form ref="checkDTO" :model="checkDTO" style="margin-left:40px">
  104. <el-row>
  105. <el-col :xs="24" :sm="12" :lg="24" :span="12">
  106. <el-form-item label="审核结果:" prop="state" label-width="160px" class="postInfo-container-item"
  107. :rules="{required: true, message: '审核结果不能为空', trigger: 'blur'}">
  108. <el-select v-model="checkDTO.state" placeholder="请选择" style="width:300px">
  109. <el-option label="审核通过" value="审核通过" />
  110. <el-option label="审核拒绝" value="审核拒绝" />
  111. </el-select>
  112. </el-form-item >
  113. </el-col>
  114. </el-row>
  115. <el-row>
  116. <el-col :xs="24" :sm="12" :lg="24" :span="12">
  117. <el-form-item label="审核意见:" prop="reply" label-width="160px" class="postInfo-container-item">
  118. <el-input style="width:300px" type="textarea" v-model="checkDTO.reply"></el-input>
  119. </el-form-item>
  120. </el-col>
  121. </el-row>
  122. </el-form>
  123. <span slot="footer" class="dialog-footer">
  124. <el-button @click="checkDialog = false">取 消</el-button>
  125. <el-button type="primary" @click="saveCheck()">确 定</el-button>
  126. </span>
  127. </el-dialog>
  128. </div>
  129. </template>
  130. <script>
  131. import YPageListLayout from '@/components/YPageListLayout'
  132. import Breadcrumb from '@/components/Breadcrumb'
  133. export default {
  134. name: 'outWarehouseCheck',
  135. components: {
  136. Breadcrumb,
  137. YPageListLayout,
  138. },
  139. filters: {
  140. },
  141. data() {
  142. return {
  143. pageData: { records: [] },
  144. listQuery: {
  145. page: 1,
  146. size: 10,
  147. descs: 'id',
  148. keyword:null,
  149. },
  150. checkDialog:false,
  151. checkDTO:{
  152. id:null,
  153. state:null,
  154. reply:null,
  155. checkType:0
  156. },
  157. todoBusinessId:null,
  158. taskId:null,
  159. nodeCode:null
  160. }
  161. },
  162. created() {
  163. this.todoBusinessId = this.$route.query.todoBusinessId;
  164. this.statementNo = this.$route.query.sNo;
  165. this.reportNo = this.$route.query.rNo;
  166. this.taskId = this.$route.query.tId;
  167. this.currentNodeId = this.$route.query.cId;
  168. this.nodeCode = this.$route.query.nCode;
  169. this.businessType = this.$route.query.businessType;
  170. this.getList();
  171. },
  172. methods: {
  173. resetSearch() {
  174. this.$router.push({ query: {} });
  175. this.listQuery = {
  176. current: 1,
  177. size: 10,
  178. descs: 'id',
  179. }
  180. this.getList()
  181. },
  182. searchList() {
  183. // 重置分页
  184. this.listQuery.page = 1
  185. this.listQuery.size = 10
  186. this.getList()
  187. },
  188. getList() {
  189. this.listQuery.keyword = this.$route.query.sNo;
  190. if (this.$route.query.businessType === 'ASSET_BUSINESS') {
  191. this.listQuery.keyword = this.$route.query.rNo;
  192. }
  193. this.$api.productionOutWarehouse.list(Object.assign({businessType:this.businessType}, this.listQuery)).then(res=>{
  194. if (res.code ===200){
  195. this.pageData = res.data;
  196. }
  197. })
  198. },
  199. businessTypeAlias(code){
  200. if (code === 'MAJOR_BUSINESS'){
  201. return '大中型业务'
  202. }
  203. if (code === 'PERSONAL_BUSINESS'){
  204. return '个贷业务'
  205. }
  206. if (code === 'ASSET_BUSINESS') {
  207. return '资产业务'
  208. }
  209. },
  210. doCheck(id){
  211. this.checkDialog = true;
  212. this.checkDTO.id= id;
  213. },
  214. saveCheck(){
  215. if (this.checkDTO.id){
  216. this.$refs.checkDTO.validate(valid=>{
  217. if (valid){
  218. let taskRecordDTO = new Object();
  219. if (!this.taskId){
  220. this.$notify({
  221. title: '警告',
  222. message: '节点任务未找到,暂时无法审核。请查看“我的待办”列表。',
  223. type: 'warning',
  224. duration: 3000
  225. });
  226. return ;
  227. }
  228. if (this.nodeCode.indexOf("FINANCE")!=-1){
  229. this.checkDTO.checkType = 1;
  230. }
  231. taskRecordDTO.recordId = this.taskId;
  232. taskRecordDTO.taskData = this.checkDTO;
  233. this.$api.productionOutWarehouse.edit(taskRecordDTO).then(res=>{
  234. if (res.code === 200 && res.data){
  235. this.$notify({
  236. title: '成功',
  237. message: '申请处理成功',
  238. type: 'success',
  239. duration: 2000
  240. });
  241. this.commitNode();
  242. this.getList();
  243. this.checkDialog = false;
  244. }else {
  245. this.$notify({
  246. title: '失败',
  247. message: '申请处理失败',
  248. type: 'error',
  249. duration: 2000
  250. });
  251. }
  252. })
  253. }
  254. })
  255. }
  256. },
  257. commitNode(){
  258. let commit = new Object;
  259. commit.instanceNodeId = this.currentNodeId;
  260. if (this.checkDTO.state==='审核通过'){
  261. commit.state = 'PASS';
  262. }
  263. else{
  264. commit.state = 'REVERSE';
  265. }
  266. commit.comments = this.checkDTO.reply;
  267. commit.businessMinId = this.reportNo;
  268. commit.businessSubId = this.statementNo;
  269. this.$api.workflow.commit(commit).then(res=>{
  270. if (res.code === 200 && res.data){
  271. this.$notify({
  272. title: '成功',
  273. message: '工作流节点提交成功。',
  274. type: 'success',
  275. duration: 2000
  276. });
  277. }else{
  278. this.$notify({
  279. title: '失败',
  280. message: '工作流节点提交失败,请联系管理员。',
  281. type: 'error',
  282. duration: 2000
  283. });
  284. }
  285. })
  286. }
  287. },
  288. }
  289. </script>
  290. <style lang="scss" scoped>
  291. /deep/.doWarehouseClass {
  292. border-radius: 10px;
  293. }
  294. </style>