index.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <div id="mechanism">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. />
  10. <table-list
  11. rowKey="id"
  12. ref="tableList"
  13. :tableSets="tableSet"
  14. :tableData="tableData"
  15. :navText="navText"
  16. :loading="loading"
  17. @addClick="addClick"
  18. >
  19. <template slot="status" slot-scope="props">
  20. <el-popover placement="right" width="650" trigger="click">
  21. <el-table border :data="props.scope.row.accountList">
  22. <el-table-column
  23. type="index"
  24. label="序号"
  25. width="70"
  26. align="center"
  27. header-align="center"
  28. >
  29. </el-table-column>
  30. <el-table-column
  31. width="120"
  32. property="openingBank"
  33. label="开户银行"
  34. align="center"
  35. ></el-table-column>
  36. <el-table-column
  37. width="180"
  38. property="openingName"
  39. label="开户名称"
  40. align="center"
  41. ></el-table-column>
  42. <el-table-column
  43. property="proceedsAccount"
  44. label="收款账号"
  45. align="center"
  46. ></el-table-column>
  47. </el-table>
  48. <el-button
  49. slot="reference"
  50. type="text"
  51. :disabled="
  52. !props.scope.row.accountList ||
  53. props.scope.row.accountList.length === 0
  54. "
  55. >查看</el-button
  56. >
  57. </el-popover>
  58. </template>
  59. <template slot="domainName" slot-scope="props">
  60. <p>移动端:{{ props.scope.row.hostH5 }}</p>
  61. <p>电脑端:{{ props.scope.row.hostPc }}</p>
  62. </template>
  63. <template slot="accountPeriodSetting" slot-scope="props">
  64. <p>
  65. {{ getBillType(props.scope.row.billType) }},次月{{
  66. props.scope.row.billDay || " "
  67. }}日
  68. </p>
  69. </template>
  70. <template slot="invoiceInformation" slot-scope="props">
  71. <p>
  72. 发票类型:<span v-if="props.scope.row.invoiceBo !== null">
  73. {{
  74. props.scope.row.invoiceBo["invoiceType"] === 1
  75. ? "普票"
  76. : props.scope.row.invoiceBo["invoiceType"] === 2
  77. ? "专票"
  78. : ""
  79. }}</span
  80. >
  81. </p>
  82. <p>
  83. 发票抬头:<span v-if="props.scope.row.invoiceBo !== null">{{
  84. props.scope.row.invoiceBo["invoice"]
  85. }}</span>
  86. </p>
  87. <p>企业名称:{{ props.scope.row.tenantName }}</p>
  88. <p>
  89. 纳税人:<span v-if="props.scope.row.invoiceBo !== null">{{
  90. props.scope.row.invoiceBo["taxpayer"]
  91. }}</span>
  92. </p>
  93. </template>
  94. <template slot="btn" slot-scope="props">
  95. <el-button type="text" @click="addClick(props.scope.row)"
  96. >修改</el-button
  97. >
  98. </template>
  99. </table-list>
  100. <pagination
  101. :total="total"
  102. :pageSize.sync="formData.pageSize"
  103. :currentPage.sync="formData.pageNum"
  104. @search="search"
  105. />
  106. <dislog
  107. :dialogVisible.sync="dialogVisible"
  108. @search="search"
  109. :activeData="activeData"
  110. ></dislog>
  111. </div>
  112. </template>
  113. <script>
  114. import dislog from "./dislog.vue";
  115. import searchBoxNew from "@/components/searchBoxNew";
  116. import tableList from "@/components/tableList";
  117. import pagination from "@/components/pagination";
  118. export default {
  119. name: "Mechanism",
  120. components: { searchBoxNew, tableList, pagination, dislog },
  121. data() {
  122. return {
  123. loading: false,
  124. navText: {
  125. title: "机构列表",
  126. index: 0,
  127. ch: "条",
  128. num: true,
  129. choice: false,
  130. addHide: false,
  131. custom: false,
  132. },
  133. formList: [
  134. {
  135. prop: "tenantid",
  136. placeholder: "请选择机构名称",
  137. scope: "systemtenantlist",
  138. },
  139. ],
  140. formData: {},
  141. tableSet: [
  142. {
  143. label: "机构名称",
  144. prop: "tenantName",
  145. hidden: true,
  146. },
  147. {
  148. label: "网站域名",
  149. prop: "address",
  150. hidden: true,
  151. scope: "solt",
  152. soltName: "domainName",
  153. },
  154. {
  155. label: "账期设置",
  156. prop: "address",
  157. hidden: true,
  158. scope: "solt",
  159. soltName: "accountPeriodSetting",
  160. },
  161. {
  162. label: "分成模式",
  163. prop: "divideModel",
  164. hidden: true,
  165. scope: "isOptions",
  166. options: [
  167. {
  168. label: "机构分成",
  169. value: 1,
  170. },
  171. {
  172. label: "业务员分成",
  173. value: 2,
  174. },
  175. ],
  176. },
  177. {
  178. label: "是否有商户号",
  179. prop: "commercialTenant",
  180. hidden: true,
  181. scope: "isOptions",
  182. options: [
  183. {
  184. label: "是",
  185. value: 1,
  186. },
  187. {
  188. label: "否",
  189. value: 0,
  190. },
  191. ],
  192. },
  193. {
  194. label: "银行账号信息",
  195. prop: "accountList",
  196. hidden: true,
  197. scope: "solt",
  198. soltName: "status",
  199. },
  200. {
  201. label: "发票信息",
  202. prop: "address",
  203. hidden: true,
  204. scope: "solt",
  205. soltName: "invoiceInformation",
  206. },
  207. ],
  208. tableData: [],
  209. total: 0,
  210. dialogVisible: false,
  211. activeData: {},
  212. };
  213. },
  214. created() {
  215. this.search(2);
  216. },
  217. methods: {
  218. getBillType(e) {
  219. var a = "";
  220. switch (e) {
  221. case 1:
  222. a = "月份";
  223. break;
  224. case 2:
  225. a = "季度";
  226. break;
  227. case 3:
  228. a = "半年";
  229. break;
  230. case 4:
  231. a = "年度";
  232. break;
  233. default:
  234. break;
  235. }
  236. return a;
  237. },
  238. addClick(data) {
  239. this.activeData = data || {};
  240. this.dialogVisible = true;
  241. },
  242. search(v) {
  243. this.loading = true;
  244. if (v === 2) {
  245. this.formData = {
  246. pageSize: 10,
  247. pageNum: 1,
  248. };
  249. }
  250. this.$api
  251. .systemtenantlist(this.formData)
  252. .then((res) => {
  253. this.tableData = res.rows;
  254. this.total = res.total;
  255. this.navText.index = res.total;
  256. })
  257. .finally(() => {
  258. this.loading = false;
  259. });
  260. },
  261. init() {
  262. this.search(2);
  263. },
  264. del(v) {
  265. this.$alert(
  266. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  267. "提示",
  268. {
  269. dangerouslyUseHTMLString: true,
  270. }
  271. )
  272. .then(() => {})
  273. .catch(() => {
  274. this.$message({
  275. type: "info",
  276. message: "已取消删除",
  277. });
  278. });
  279. },
  280. },
  281. };
  282. </script>
  283. <style lang="scss" scoped></style>