cost.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <div class="bg" id="index">
  3. <div class="row1">
  4. <div class="left">
  5. <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
  6. start-placeholder="开始日期" end-placeholder="结束日期">
  7. </el-date-picker>
  8. </div>
  9. <div class="right">
  10. <el-input :placeholder="'可按费用名称、备注内容查找'" clearable v-model="searchKeyWord" class="search_css"></el-input>
  11. <el-button type="primary" size="small" @click="lookup" class="search">查找</el-button>
  12. </div>
  13. </div>
  14. <div class="row2">
  15. <div class="left">
  16. <el-button type="primary" size="small">全部</el-button>
  17. <el-button type="primary" size="small">收入</el-button>
  18. <el-button type="primary" size="small">支出</el-button>
  19. <div>
  20. <div class="text">合计:收入{{ 22 }} - 支出{{ 22 }}=利润{{ 0 }}</div>
  21. </div>
  22. </div>
  23. <div class="right">
  24. <el-button type="primary" size="small" @click="add()">添加</el-button>
  25. </div>
  26. </div>
  27. <el-table ref="singleTable" :data="tableData" highlight-current-row style="width: 100%" class="table">
  28. <el-table-column type="index" width="50">
  29. </el-table-column>
  30. <el-table-column property="date" label="类型" width="120">
  31. </el-table-column>
  32. <el-table-column property="name" label="费用名称" width="120">
  33. </el-table-column>
  34. <el-table-column property="address" label="金额(元)">
  35. </el-table-column>
  36. <el-table-column property="address" label="备注">
  37. </el-table-column>
  38. <el-table-column prop="address" label="附件" show-overflow-tooltip>
  39. <template slot-scope="scope">
  40. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  41. src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
  42. <span v-if="scope.row.addressUrlArray != null">
  43. {{
  44. scope.row.addressUrlArray.length == 0
  45. ? ''
  46. : scope.row.addressUrlArray.length
  47. }}
  48. </span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="address" label="操作" show-overflow-tooltip>
  52. <template scope="scope">
  53. <span style="color: #409EFF;margin-right:5px" @click="edit(scope.row)">编辑</span>
  54. <span style="color: red;" @click="del(scope.row)">删除</span>
  55. </template>
  56. </el-table-column>
  57. </el-table>
  58. <div style="text-align: center; padding: 10px">
  59. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  60. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  61. </el-pagination>
  62. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  63. @on-cancel="handleClose">
  64. <div v-if="applstatus">
  65. <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
  66. accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar"
  67. v-hasPermission="`contractManagement.buyContract.buyContractInfo.appl`" />
  68. </div>
  69. <ws-upload v-else ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
  70. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  71. </WinseaContentModal>
  72. <WinseaContentModal v-model="show" title="费用" @on-cancel="handleClose3">
  73. <el-form>
  74. <el-form-item label-width='100px' label="收款方" span="1" prop="payee">
  75. <el-input class='input50 input_css' placeholder="输入收款方"></el-input>
  76. </el-form-item>
  77. <ws-upload style="margin-left:30px" ref="upload" table-name="maintain_work_order" oss-key="mainPlan"
  78. :comp-id="compId" :appendix-ids="appendixIdsAdd" :vesselId="deptBudgetList.addressUrl" :size-limit="size"
  79. @uploadSuccess="uploadSuccess" @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  80. </el-form>
  81. <div slot="footer" class="dialog-footer">
  82. <el-button @click="handleClose3">取 消</el-button>
  83. <el-button @click="submitdata">提交</el-button>
  84. </div>
  85. </WinseaContentModal>
  86. </div>
  87. </div>
  88. </template>
  89. <script>
  90. import WsUpload from '@/components/WsUpload'
  91. export default {
  92. components: {
  93. WsUpload
  94. },
  95. data() {
  96. return {
  97. fileNum: '',
  98. size: 10,
  99. appendixIdsAdd: '',
  100. show: false,
  101. deptBudgetList: {},
  102. compId: localStorage.getItem('ws-pf_compId'),
  103. appendixIdss: [],
  104. applstatus: false,
  105. accessoryTFs: false,
  106. deptCircularPage: {},
  107. deptBudgetTotal: 0,
  108. currentPage: 1,
  109. pageSize: 10,
  110. id: '',
  111. tableData: [{
  112. date: '2016-05-02',
  113. name: '王小虎',
  114. address: '上海市普陀区金沙江路 1518 弄'
  115. }, {
  116. date: '2016-05-04',
  117. name: '王小虎',
  118. address: '上海市普陀区金沙江路 1517 弄'
  119. }, {
  120. date: '2016-05-01',
  121. name: '王小虎',
  122. address: '上海市普陀区金沙江路 1519 弄'
  123. }, {
  124. date: '2016-05-03',
  125. name: '王小虎',
  126. address: '上海市普陀区金沙江路 1516 弄'
  127. }],
  128. value2: '',
  129. searchKeyWord: ''
  130. };
  131. },
  132. filters: {
  133. numsFilter(msg) {
  134. return msg || 0;
  135. },
  136. },
  137. created() {
  138. },
  139. mounted() {
  140. },
  141. beforeDestroy() {
  142. },
  143. methods: {
  144. submitdata() { },
  145. onChange(files) {
  146. this.fileNum = files
  147. this.$refs.upload.handleSaveBill().then((res) => {
  148. console.log(files)
  149. })
  150. },
  151. uploadSuccess(data, files, url) {
  152. console.log(data, files, url)
  153. // this.deptBudgetList.
  154. // this.formData.append('files', files)
  155. // this.feedbackObj.uploadNameAttachment = data.appendixName
  156. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  157. // // this.newAppendixs = files
  158. // this.onChangeFlag = true
  159. },
  160. handleClose3() {
  161. this.show = false
  162. },
  163. handleClose() {
  164. // this.dialogViewSpareMoney = false
  165. },
  166. fujian(row) {
  167. this.id = row.id
  168. this.accessoryTFs = true
  169. this.appendixIdss = row.addressUrl
  170. console.log(this.appendixIdss)
  171. },
  172. handleSizeChange(val) {
  173. console.log(`每页 ${val} 条`)
  174. this.pageSize = val
  175. this.getList()
  176. },
  177. handleCurrentChange(val) {
  178. this.currentPage = val
  179. console.log(`当前页: ${val}`)
  180. this.getList()
  181. },
  182. edit() { },
  183. del(val) {
  184. this.$confirm('确定删除费用信息?', '提示', {
  185. confirmButtonText: '确定',
  186. cancelButtonText: '取消',
  187. type: 'warning'
  188. }).then(() => {
  189. }).catch(() => {
  190. return false
  191. });
  192. },
  193. lookup() { },
  194. add() {
  195. this.show = true
  196. },
  197. },
  198. };
  199. </script>
  200. <style lang="scss" scoped>
  201. .bg {
  202. width: 100%;
  203. height: 100%;
  204. padding: 16px 16px 10px 16px;
  205. box-sizing: border-box;
  206. // background-image: url("../../assets/images/pageBg.png");
  207. background-size: cover;
  208. background-position: center center;
  209. }
  210. .row1 {
  211. display: flex;
  212. justify-content: space-between;
  213. .right {
  214. display: flex;
  215. }
  216. }
  217. .search {
  218. margin-left: 10px;
  219. }
  220. .row2 {
  221. margin-top: 20px;
  222. display: flex;
  223. justify-content: space-between;
  224. .left {
  225. display: flex;
  226. align-items: center;
  227. .text {
  228. margin: 0 10px;
  229. }
  230. }
  231. }
  232. .table {
  233. margin-top: 20px;
  234. }
  235. </style>