outWarehouseCheck.vue 11 KB

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