saveFileTodoList.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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.name" placeholder="项目名称" clearable
  9. style="margin-left: 20px;width: 270px;float: left;">
  10. </el-input>
  11. <el-input v-model="listQuery.orderId" placeholder="项目编号" clearable
  12. style="margin-left: 20px;width: 200px;float: left;">
  13. </el-input>
  14. <el-input v-model="listQuery.clientManager" placeholder="客户经理" clearable
  15. style="margin-left: 20px;width: 100px;float: left;">
  16. </el-input>
  17. <el-input v-model="listQuery.principal" placeholder="项目负责人" clearable
  18. style="margin-left: 20px;width: 150px;float: left;">
  19. </el-input>
  20. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList" round>搜索
  21. </el-button>
  22. <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
  23. </el-button>
  24. <el-tooltip class="item" effect="light" content="请先勾选需归档的报告" placement="top-start">
  25. <PermissionButton menu-code="_views_major_batch_save_file" class-name="filter-item" type="danger" icon="el-icon-paperclip"
  26. :page-jump="false" round style="float: left" @click="saveFileDialog = true" :disabled="(!saveFileProduction.length>0)" />
  27. </el-tooltip>
  28. </template>
  29. <parentTable v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;" :selectionChange="selectionProductionChange">
  30. <el-table-column
  31. align="center"
  32. type="selection"
  33. saveFileProduction
  34. width="100" border="true">
  35. </el-table-column>
  36. <el-table-column label="订单名称" align="center" width="200" show-overflow-tooltip >
  37. <template slot-scope="{row}">
  38. <span>{{ row.orderName }}</span>
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="订单号" align="center" width="200" >
  42. <template slot-scope="{row}">
  43. <span>{{ row.orderId }}</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="项目名称" align="center" width="200" show-overflow-tooltip>
  47. <template slot-scope="{row}">
  48. <span>{{ row.name }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="报告号" align="center" width="200">
  52. <template slot-scope="{row}">
  53. <span>{{ row.businessSubId }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="产品类型" align="center">
  57. <template slot-scope="{row}">
  58. <span>{{ aliasProductionType(row.production)}}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="库存状态" align="center">
  62. <template slot-scope="{row}">
  63. <span>{{ row.repertoryState===null?'未入库':(row.repertoryState?'已出库':'已入库') }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="是否归档" align="center">
  67. <template slot-scope="{row}">
  68. <span>{{ row.ifSaveFile?'是':'否' }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="实收款(¥)" align="center" width=100>
  72. <template slot-scope="{row}">
  73. <span>{{ row.realAmount}}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="客户经理" align="center">
  77. <template slot-scope="{row}">
  78. <span>{{ row.clientManager }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="负责人" align="center">
  82. <template slot-scope="{row}">
  83. <span>{{ row.principal }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="接单部门" align="center" >
  87. <template slot-scope="{row}">
  88. <span>{{ row.departmentName }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="下单日期" align="center" width=150>
  92. <template slot-scope="{row}">
  93. {{ row.created }}
  94. </template>
  95. </el-table-column>
  96. </parentTable>
  97. </y-page-list-layout>
  98. <el-dialog :visible.sync="saveFileDialog" width="55%" center custom-class="doWarehouseClass">
  99. <el-result icon="warning" subTitle="请确认将以下报告进行归档操作?"></el-result>
  100. <div style="width:100%;text-align:center;">
  101. <el-tag v-for="(p,productionId) in saveFileProduction" style="font-size:18px;" type="success" effect="plain" :key="p.businessSubId">
  102. {{p.businessSubId}}</el-tag>
  103. </div>
  104. <div style="width:100%;text-align:center;margin-top:20px">
  105. <el-button type="success" @click="batchSaveFile()">确认归档</el-button>
  106. </div>
  107. </el-dialog>
  108. </div>
  109. </template>
  110. <script>
  111. import YPageListLayout from '@/components/YPageListLayout'
  112. import Breadcrumb from '@/components/Breadcrumb'
  113. import PermissionButton from '@/components/PermissionButton/PermissionButton'
  114. export default {
  115. name: 'MajorList',
  116. components: {
  117. Breadcrumb,
  118. YPageListLayout,
  119. PermissionButton,
  120. },
  121. filters: {
  122. },
  123. data() {
  124. return {
  125. pageData: { records: [] },
  126. listLoading: false,
  127. listQuery: {
  128. page: 1,
  129. size: 10,
  130. descs: 'id',
  131. },
  132. saveFileProduction:[],
  133. saveFileDialog:false
  134. }
  135. },
  136. created() {
  137. this.getList();
  138. },
  139. methods: {
  140. resetSearch() {
  141. this.$router.push({ query: {} });
  142. this.listQuery = {
  143. current: 1,
  144. size: 10,
  145. descs: 'id',
  146. }
  147. this.getList()
  148. },
  149. searchList() {
  150. // 重置分页
  151. this.listQuery.page = 1
  152. this.listQuery.size = 10
  153. this.getList()
  154. },
  155. getList() {
  156. this.$api.majorProduction.saveFileTodo(this.listQuery).then(res=>{
  157. if (res.code ===200){
  158. this.pageData = res.data;
  159. }
  160. })
  161. },
  162. aliasProductionType(code){
  163. if (code === 'STATEMENT'){
  164. return '价值意见书';
  165. }
  166. if (code === 'LETTER'){
  167. return '复评函';
  168. }
  169. return '报告';
  170. },
  171. selectionProductionChange(val){
  172. let pickeds = [];
  173. for (let i in val){
  174. let picked = new Object();
  175. picked.taskId = val[i].taskId;
  176. picked.currentNodeId = val[i].currentNodeId;
  177. picked.businessId = val[i].businessId;
  178. picked.businessSubId = val[i].businessSubId;
  179. picked.state = "PASS";
  180. picked.productionId = val[i].productionId;
  181. picked.orderId = val[i].orderId;
  182. picked.name = val[i].name;
  183. picked.taskCreated = val[i].taskCreated;
  184. pickeds.push(picked);
  185. }
  186. this.saveFileProduction = pickeds;
  187. },
  188. batchSaveFile(){
  189. if (this.saveFileProduction.length>0){
  190. this.$api.majorProduction.batchSaveFile(this.saveFileProduction).then(res=>{
  191. if (res.code ===200 && res.data){
  192. this.$notify({
  193. title: '成功',
  194. message: '归档成功',
  195. type: 'success',
  196. duration: 2000
  197. });
  198. this.saveFileDialog = false;
  199. this.getList();
  200. }else {
  201. this.$notify({
  202. title: '失败',
  203. message: '归档失败,请联系系统管理员。',
  204. type: 'error',
  205. duration: 2000
  206. });
  207. }
  208. })
  209. }
  210. }
  211. },
  212. }
  213. </script>
  214. <style lang="scss" scoped>
  215. /deep/.doWarehouseClass {
  216. border-radius: 10px;
  217. }
  218. </style>