代理记账中共新前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. <el-dropdown trigger="click" placement="bottom-start">
  5. <div class="select_address el-dropdown-link">
  6. <span class="sanjiao-right"></span>
  7. <p>{{cityName}}</p>
  8. </div>
  9. <el-dropdown-menu slot="dropdown" style="width: 8vw;text-align: center;">
  10. <el-dropdown-item v-for="(item,index) in deptOptions">
  11. <div class="selected" @click="chooseCity(item.orgCode)">
  12. <p>{{item.deptName}}</p>
  13. </div>
  14. </el-dropdown-item>
  15. </el-dropdown-menu>
  16. </el-dropdown>
  17. <el-dropdown trigger="click" placement="bottom-start">
  18. <div class="el-dropdown-link select_main">
  19. <div class="select_address">
  20. <span class="sanjiao-right"></span>
  21. <p>{{townName}}</p>
  22. </div>
  23. <div class="select_address">
  24. <p class="select_time">2023.03.05</p>
  25. </div>
  26. </div>
  27. <el-dropdown-menu slot="dropdown" style="width: 16vw;text-align: center;">
  28. <el-dropdown-item v-for="(item,index) in townList">
  29. <div class="selected" @click="chooseTown(item.orgCode)">
  30. <p>{{item.deptName}}</p>
  31. <p>2023.03.05</p>
  32. </div>
  33. </el-dropdown-item>
  34. </el-dropdown-menu>
  35. </el-dropdown>
  36. <p class="todo_num">待处理合作社:<span>{{total}}</span>个</p>
  37. </div>
  38. <div class="main">
  39. <div class="left_main">
  40. <el-table :data="list" style="width: 100%;">
  41. <el-table-column prop="orgName" label="村" />
  42. <el-table-column prop="bookName" label="组织名称" show-overflow-tooltip />
  43. <el-table-column prop="voucherCount" label="记账笔数" >
  44. <template slot-scope="scope">
  45. {{scope.row.voucherCount}} <span class="num">7</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="contracCount" label="合同数量" />
  49. <el-table-column prop="otherCount" label="其他" />
  50. <el-table-column prop="allCount" label="任务总数" />
  51. <el-table-column prop="distriDate" :formatter="dateFormatter" label="下发日期" sortable />
  52. <el-table-column prop="endAt" label="截止日期" sortable />
  53. <el-table-column label="操作">
  54. <template slot-scope="scope">
  55. <el-button type="primary" size="mini" icon="el-icon-edit"></el-button>
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. </div>
  60. <RightYearMonthSelector class="right_main" :year.sync="parms.orderYear" :month.sync="parms.orderMonth" @dateChanged="chooseMonth"/>
  61. </div>
  62. </div>
  63. </template>
  64. <script>
  65. import {cityTree} from "@/api/misc/misc_dept";
  66. import {ENV} from "@/utils/env";
  67. import {accountingTodoTaskList} from "@/api/agentcenter/accounting_task";
  68. import {date, date_format} from "@/utils/date";
  69. import RightYearMonthSelector from "@/components/framework/RightYearMonthSelector.vue";
  70. export default {
  71. name: "todo",
  72. components: {RightYearMonthSelector},
  73. data() {
  74. return {
  75. deptOptions: [],
  76. list: [],
  77. total: 0,
  78. parms: {
  79. countyCode: null,
  80. townCode: null,
  81. orderYear: date_format('%Y'),
  82. orderMonth: date_format('%m'),
  83. },
  84. }
  85. },
  86. created() {
  87. this.getDeptTree();
  88. },
  89. methods:{
  90. getDeptTree() {
  91. cityTree({rootId: ENV.UserDeptId()}).then((resp) => {
  92. this.deptOptions = resp.data;
  93. if(this.deptOptions.length)
  94. this.parms.countyCode = this.deptOptions[0].orgCode;
  95. });
  96. },
  97. chooseCity(cmd) {
  98. this.parms.countyCode = cmd;
  99. this.parms.townCode = null;
  100. },
  101. chooseTown(cmd) {
  102. this.parms.townCode = cmd;
  103. this.getTaskList();
  104. },
  105. getTaskList() {
  106. if(!this.parms.townCode || !this.parms.orderYear || !this.parms.orderMonth)
  107. return;
  108. accountingTodoTaskList(this.parms).then((resp) => {
  109. this.list = resp.rows;
  110. this.total = resp.total;
  111. })
  112. },
  113. chooseMonth(year, month) {
  114. this.getTaskList();
  115. },
  116. dateFormatter(row, column, cellValue, index) {
  117. return cellValue ? date(cellValue, 'yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd') : '';
  118. },
  119. },
  120. mounted(){
  121. },
  122. computed: {
  123. cityName() {
  124. if(!this.deptOptions.length)
  125. return '';
  126. let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode);
  127. return dept ? dept.deptName : '';
  128. },
  129. townList() {
  130. if(!this.deptOptions.length)
  131. return [];
  132. let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode);
  133. return dept ? dept.children || [] : [];
  134. },
  135. townName() {
  136. if(!this.townList.length)
  137. return '';
  138. let dept = this.townList.find((x) => x.orgCode === this.parms.townCode);
  139. return dept ? dept.deptName : '';
  140. },
  141. },
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. p{margin: 0;line-height: 1;}
  146. .app-container{
  147. background-color: #f5f6f8;
  148. width: 100%;
  149. height: 91vh;
  150. }
  151. .el-dropdown-link {
  152. cursor: pointer;
  153. }
  154. .title{
  155. display: flex;
  156. align-items: center;
  157. i{
  158. display: inline-block;
  159. width: 5px;
  160. height: 20px;
  161. background: #4d7cfe;
  162. border-radius: 5px;
  163. margin-right: 10px;
  164. }
  165. p{
  166. font-size: 16px;
  167. }
  168. }
  169. .num{
  170. color: #3976ff;
  171. display: inline-block;
  172. background-color: #e2ebff;
  173. width: 1.8vw;
  174. border-radius: 5px;
  175. margin-left: 5px;
  176. }
  177. ::v-deep .el-table .cell{
  178. text-align: center;
  179. }
  180. ::v-deep .el-table .el-table__cell{
  181. border: none!important;
  182. }
  183. ::v-deep .el-table::before{
  184. display: none;
  185. }
  186. ::v-deep .el-table .el-table__header-wrapper th{
  187. background-color: transparent;
  188. }
  189. ::v-deep .el-table tr{
  190. background-color: transparent;
  191. }
  192. .selected{
  193. display: flex;
  194. height: 4vh;
  195. p{
  196. width: 8vw;
  197. line-height: 4vh;
  198. text-align: center;
  199. }
  200. }
  201. .header_main{
  202. display: flex;
  203. align-items: center;
  204. position: relative;
  205. .select_main{
  206. display: flex;
  207. align-items: center;
  208. & .select_address:nth-child(1){
  209. margin-right: 0vw;
  210. border-top-right-radius: initial;
  211. border-bottom-right-radius: initial;
  212. }
  213. & .select_address:nth-child(2){
  214. margin-right: 0vw;
  215. border-top-left-radius: initial;
  216. border-bottom-left-radius: initial;
  217. }
  218. }
  219. .select_address{
  220. display: flex;
  221. align-items: center;
  222. justify-content: center;
  223. margin-right: 2vw;
  224. background-color: #ffffff;
  225. padding: 0px 0px;
  226. border-radius: 8px;
  227. box-shadow: 0 0 10px #dedfe1;
  228. width: 8vw;
  229. height: 4vh;
  230. overflow: hidden;
  231. .sanjiao-right {
  232. display: inline-block;
  233. border-left: 8px solid #000;
  234. border-left-color: initial;
  235. border-top: 5px solid transparent;
  236. border-bottom: 5px solid transparent;
  237. margin-right: 5px;
  238. }
  239. .select_time{
  240. text-align: center;
  241. width: 100%;
  242. height: 4vh;
  243. line-height: 4vh;
  244. background-color: #3976ff;
  245. color: #ffffff;
  246. }
  247. }
  248. .todo_num{
  249. margin-left: auto;
  250. span{
  251. font-size: 24px;
  252. color: #3976ff;
  253. }
  254. }
  255. }
  256. .main{
  257. display: flex;
  258. .left_main{
  259. width: 92%;
  260. margin-right: 0.57%;
  261. margin-top: 15px;
  262. border-radius: 8px;
  263. box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.13);
  264. background: #fff;
  265. padding: 15px 20px;
  266. height: calc(91vh - 91px);
  267. }
  268. .right_main{
  269. width: 7.43%;
  270. margin-top: 15px;
  271. border-radius: 8px;
  272. box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.13);
  273. background: #fff;
  274. padding: 15px 20px;
  275. height: calc(91vh - 91px);
  276. }
  277. }
  278. </style>