initBudget.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <template>
  2. <div class="container">
  3. <fullscreen :fullscreen.sync="fullscreen" class="container-box">
  4. <div class="titbox">
  5. <h2 class="font-ui">部门预算管理</h2>
  6. <div>
  7. <i class="el-icon-refresh" @click="iconCli(1)"></i>
  8. <i class="el-icon-full-screen" @click="iconCli(2)"></i>
  9. <!-- <i class="el-icon-folder-opened"></i>-->
  10. <!-- <i class="el-icon-view"></i>-->
  11. <!-- <i class="el-icon-more"></i>-->
  12. </div>
  13. </div>
  14. <div class="search">
  15. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  16. </div>
  17. <div class="tabbox">
  18. <el-table
  19. v-loading="loading"
  20. height="calc(100% - 40px)"
  21. class="com-table"
  22. ref="multipleTable"
  23. :data="tableData"
  24. tooltip-effect="dark"
  25. size="small"
  26. border
  27. style="width: 100%"
  28. >
  29. <el-table-column
  30. align="center"
  31. prop="preTempName"
  32. label="预算名称"
  33. show-overflow-tooltip
  34. >
  35. </el-table-column>
  36. <el-table-column
  37. align="center"
  38. prop="sendTime"
  39. show-overflow-tooltip
  40. label="配置时间"
  41. >
  42. </el-table-column>
  43. <el-table-column
  44. align="center"
  45. prop="sendNo"
  46. show-overflow-tooltip
  47. label="配置工号"
  48. >
  49. </el-table-column>
  50. <el-table-column
  51. align="center"
  52. prop="sendName"
  53. show-overflow-tooltip
  54. label="配置姓名"
  55. >
  56. </el-table-column>
  57. <el-table-column
  58. align="center"
  59. prop="stsDesc"
  60. show-overflow-tooltip
  61. label="预算状态"
  62. >
  63. </el-table-column>
  64. <el-table-column
  65. width="300"
  66. align="center"
  67. prop="hotline"
  68. label="操作"
  69. >
  70. <template slot-scope="scope">
  71. <el-button
  72. v-if="scope.row.stsDesc == '待办'"
  73. size="mini"
  74. type="danger"
  75. plain
  76. @click="recall(scope.row)"
  77. >召回</el-button
  78. >
  79. <el-button
  80. v-if="scope.row.stsDesc == '待办'"
  81. size="mini"
  82. type="primary"
  83. plain
  84. @click="close(scope.row)"
  85. >归档</el-button
  86. ><el-button
  87. size="mini"
  88. type="success"
  89. plain
  90. @click="seeExcel(scope.row)"
  91. >查看模板</el-button
  92. >
  93. <el-button
  94. v-if="scope.row.stsDesc !== '召回'"
  95. size="mini"
  96. type="warning"
  97. plain
  98. @click="seeLog(scope.row)"
  99. >查看回复</el-button
  100. >
  101. <!-- <el-button
  102. v-if="scope.row.stsDesc !== '召回'"
  103. size="mini"
  104. type="success"
  105. plain
  106. @click="detailes(scope.row)"
  107. >查看预算</el-button
  108. > -->
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <el-pagination
  113. class="pageBox"
  114. @current-change="currchange"
  115. layout="prev, pager, next"
  116. background
  117. :total="total"
  118. >
  119. </el-pagination>
  120. </div>
  121. </fullscreen>
  122. </div>
  123. </template>
  124. <script>
  125. import mySearch from "../../../components/search";
  126. export default {
  127. components: {
  128. mySearch,
  129. },
  130. data() {
  131. return {
  132. fullscreen: false,
  133. total: 0,
  134. pageSize: 1,
  135. tableData: [
  136. {
  137. name: "黑龙江公司移动成本预算简表",
  138. cNo: "admin",
  139. cName: "admin",
  140. time: "2021-03-10",
  141. status: "待办",
  142. },
  143. {
  144. name: "黑龙江公司移动成本预算简表",
  145. cNo: "admin",
  146. cName: "admin",
  147. time: "2021-03-10",
  148. status: "归档",
  149. },
  150. {
  151. name: "黑龙江公司移动成本预算简表",
  152. cNo: "admin",
  153. cName: "admin",
  154. time: "2021-03-10",
  155. status: "召回",
  156. },
  157. ],
  158. searchList: [
  159. {
  160. type: "input",
  161. tit: "预算名称",
  162. value: "",
  163. width: "100%",
  164. options: [],
  165. },
  166. {
  167. type: "sel",
  168. tit: "状态",
  169. value: "",
  170. width: "100%",
  171. options: [
  172. { dataCode: "0", dataName: "待办" },
  173. { dataCode: "1", dataName: "已归档" },
  174. { dataCode: "2", dataName: "召回" },
  175. ],
  176. },
  177. ],
  178. params: {
  179. preTempName: "",
  180. sts: "",
  181. },
  182. loading: false,
  183. };
  184. },
  185. methods: {
  186. detailes(val) {
  187. this.$router.push("/initExcelrecall?status=see&id=" + val.taskId + "");
  188. },
  189. seeExcel(val) {
  190. this.$router.push("/initExcelsee?status=see&id=" + val.preTempId + "");
  191. // this.defaultMenu("/initExcelsee?status=see", "部门预算excel");
  192. },
  193. close(val) {
  194. this.$confirm("预算归档, 是否确定?", "提示", {
  195. confirmButtonText: "确定",
  196. cancelButtonText: "取消",
  197. type: "warning",
  198. })
  199. .then(() => {
  200. this.$http({
  201. url: "/market/preWo/placeWo",
  202. method: "post",
  203. headers: {
  204. "Content-Type": "application/json",
  205. },
  206. data: { woNo: val.woNo },
  207. }).then((res) => {
  208. this.$message({
  209. type: "success",
  210. message: "归档成功",
  211. });
  212. this.getList(this.params, this.pageSize);
  213. });
  214. })
  215. .catch(() => {});
  216. },
  217. defaultMenu(path, name) {
  218. let defaults = this.$store.state.tabList.filter((item) => {
  219. if (item.rountPath == path) {
  220. return item;
  221. }
  222. });
  223. if (defaults.length == 1) {
  224. return;
  225. }
  226. let params = {
  227. children: "",
  228. name: name,
  229. rountPath: path,
  230. target: "_self",
  231. };
  232. let set = new Set([...this.$store.state.tabList, params]);
  233. this.$store.commit("setDefaultActive", path);
  234. this.$store.commit("setTabList", Array.from(set));
  235. },
  236. recall(val) {
  237. this.$confirm("即将召回下发的部门预算, 是否确定?", "提示", {
  238. confirmButtonText: "确定",
  239. cancelButtonText: "取消",
  240. type: "warning",
  241. })
  242. .then(() => {
  243. this.$http({
  244. url: "/market/preWo/recall ",
  245. method: "post",
  246. headers: {
  247. "Content-Type": "application/json",
  248. },
  249. data: { woNo: val.woNo },
  250. }).then((res) => {
  251. this.$message({
  252. type: "success",
  253. message: "召回成功",
  254. });
  255. this.getList(this.params, this.pageSize);
  256. });
  257. })
  258. .catch(() => {});
  259. },
  260. defaultMenu(path, name) {
  261. let defaults = this.$store.state.tabList.filter((item) => {
  262. if (item.rountPath == path) {
  263. return item;
  264. }
  265. });
  266. if (defaults.length == 1) {
  267. return;
  268. }
  269. let params = {
  270. children: "",
  271. name: name,
  272. rountPath: path,
  273. target: "_self",
  274. };
  275. let set = new Set([...this.$store.state.tabList, params]);
  276. this.$store.commit("setDefaultActive", path);
  277. this.$store.commit("setTabList", Array.from(set));
  278. },
  279. seeLog(val) {
  280. this.$router.push({
  281. path: "/recallAdmin",
  282. query: {
  283. id: val.woNo,
  284. },
  285. });
  286. },
  287. //搜索数据
  288. searchInfo(v) {
  289. this.params = {};
  290. v[0] ? (this.params.preTempName = v[0]) : "";
  291. v[1] ? (this.params.sendTime = v[1]) : "";
  292. v[2] ? (this.params.sts = v[2]) : "";
  293. this.getList(this.params, this.pageSize);
  294. },
  295. //获取列表
  296. getList(v, n) {
  297. this.loading = true;
  298. this.pageSize = n;
  299. this.$http({
  300. url: "/market/preWo/queryPage",
  301. method: "post",
  302. headers: {
  303. "Content-Type": "application/json",
  304. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  305. },
  306. data: v,
  307. }).then((res) => {
  308. this.loading = false;
  309. this.tableData = res.data.data;
  310. this.total = res.data.totalRecord;
  311. });
  312. },
  313. //功能栏
  314. iconCli(v) {
  315. if (v === 1) {
  316. this.getList(this.params, this.pageSize);
  317. }
  318. if (v === 2) {
  319. this.fullscreen = !this.fullscreen;
  320. }
  321. },
  322. // 分页
  323. currchange(v) {
  324. this.pageSize = v;
  325. this.getList(this.params, this.pageSize);
  326. },
  327. },
  328. mounted() {
  329. this.getList(this.params, this.pageSize);
  330. },
  331. };
  332. </script>
  333. <style scoped>
  334. .el-upload-list {
  335. float: right;
  336. }
  337. .el-input__suffix {
  338. cursor: pointer;
  339. }
  340. .container .el-upload {
  341. width: auto !important;
  342. }
  343. </style>
  344. <style scoped lang="scss">
  345. .btn-default {
  346. display: inline;
  347. margin-left: 10px;
  348. }
  349. .titbox {
  350. div {
  351. float: right;
  352. i {
  353. font-size: 22px;
  354. margin-left: 20px;
  355. cursor: pointer;
  356. }
  357. }
  358. }
  359. .tabbox {
  360. margin-top: 15px;
  361. }
  362. .pageBox {
  363. text-align: right;
  364. margin-top: 10px;
  365. }
  366. </style>