index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
  5. <div class="search">
  6. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  7. <el-button type="primary" @click="dialogCheck(3)" size="medium">添加</el-button>
  8. </div>
  9. <div class="tabbox">
  10. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  11. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  12. <el-table-column prop="coopName" label="合作主体名称">
  13. </el-table-column>
  14. <el-table-column label="合同时间">
  15. <template slot-scope="scope">
  16. {{scope.row.signTime}}
  17. </template>
  18. </el-table-column>
  19. <el-table-column prop="opName" label="操作人">
  20. </el-table-column>
  21. <el-table-column prop="updateTime" label="最后一次修改时间">
  22. </el-table-column>
  23. <!-- <el-table-column prop="docTypeName" label="状态">
  24. </el-table-column> -->
  25. <el-table-column label="操作" width="220px" align="center">
  26. <template slot-scope="scope">
  27. <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
  28. <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">修改</el-button>
  29. <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button>
  30. </template>
  31. </el-table-column>
  32. </el-table>
  33. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  34. :total="total">
  35. </el-pagination>
  36. </div>
  37. </div>
  38. <el-dialog :title="titname" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
  39. :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia" :fullscreen="true">
  40. <div v-loading="loadinged">
  41. <el-form :model="infolist" ref="infolist" :rules="rules"
  42. style="height: calc(100vh - 180px);overflow-y: scroll;">
  43. <div class="info-line">
  44. <el-form-item prop="coopName">
  45. <span>合作主体名称</span>
  46. <el-input v-model="infolist.coopName" placeholder="合作主体名称" :disabled="disableStatus">
  47. </el-input>
  48. </el-form-item>
  49. <el-form-item>
  50. <span>合同编号</span>
  51. <el-input v-model="infolist.contractNo" placeholder="合同编号"
  52. :disabled="disableStatus">
  53. </el-input>
  54. </el-form-item>
  55. <el-form-item>
  56. <span>合同时间</span>
  57. <el-date-picker v-model="infolist.signTime" type="date" placeholder="合同时间"
  58. :disabled="disableStatus">
  59. </el-date-picker>
  60. </el-form-item>
  61. <el-form-item>
  62. <span>资费证明</span>
  63. <el-input v-model="infolist.proofMaterials" placeholder="资费证明材料"
  64. :disabled="disableStatus">
  65. </el-input>
  66. </el-form-item>
  67. </div>
  68. <el-form-item class="info-line online">
  69. <span>合作内容</span>
  70. <el-input v-model="infolist.coopContent" placeholder="合作内容" type="textarea" :rows="4"
  71. :disabled="disableStatus">
  72. </el-input>
  73. </el-form-item>
  74. <el-form-item class="info-line online">
  75. <span>支撑费标准</span>
  76. <el-input v-model="infolist.expenseStandard" placeholder="支撑费标准" type="textarea" :rows="4"
  77. :disabled="disableStatus">
  78. </el-input>
  79. </el-form-item>
  80. <div style="margin: 5px 0 20px 0;padding: 0 20px;">
  81. <el-table class="com-table" ref="multipleTable" :data="infodata" tooltip-effect="dark"
  82. size="small" border style="width: 100%">
  83. <el-table-column label="时间" width="250px">
  84. <template slot-scope="scope">
  85. <el-date-picker v-model="scope.row.proTime" type="date" :disabled="disableStatus">
  86. </el-date-picker>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="考核管理(业务量等维度评估)">
  90. <template slot-scope="scope">
  91. <el-input v-model="scope.row.checkManage" :disabled="disableStatus"></el-input>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="异常监控(投诉违规事项监管)">
  95. <template slot-scope="scope">
  96. <el-input v-model="scope.row.excepMonitor" :disabled="disableStatus"></el-input>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="评估考核(评分考评)">
  100. <template slot-scope="scope">
  101. <el-input v-model="scope.row.reviewScore" :disabled="disableStatus"></el-input>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="结算管理">
  105. <template slot-scope="scope">
  106. <el-input v-model="scope.row.closeAcc" :disabled="disableStatus"></el-input>
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="退出机制">
  110. <template slot-scope="scope">
  111. <el-input v-model="scope.row.pushMade" :disabled="disableStatus"></el-input>
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="操作" width="120px" align="center" v-if="titname != '查看'">
  115. <template slot-scope="scope">
  116. <el-button size="mini" type="primary" @click="choline(1,scope)">添加</el-button>
  117. <el-button size="mini" type="danger" @click="choline(2,scope)">删除</el-button>
  118. </template>
  119. </el-table-column>
  120. </el-table>
  121. </div>
  122. <div style="margin: 5px 0 20px 0;padding: 0 20px;">
  123. <el-table class="com-table" ref="multipleTable" :data="infodatat" tooltip-effect="dark"
  124. size="small" border style="width: 100%">
  125. <el-table-column label="合作伙伴名称">
  126. <template slot-scope="scope">
  127. <el-input v-model="scope.row.partnerName" :disabled="disableStatus"></el-input>
  128. </template>
  129. </el-table-column>
  130. <el-table-column label="归档类型管理" width="250px">
  131. <template slot-scope="scope">
  132. <el-select :popper-append-to-body="false" v-model="scope.row.docTypeName" :disabled="disableStatus">
  133. <el-option v-for="item in optType" :key="item.name" :label="item.name"
  134. :value="item.name">
  135. </el-option>
  136. </el-select>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="时间" width="250px">
  140. <template slot-scope="scope">
  141. <el-date-picker v-model="scope.row.docTime" type="date" :disabled="disableStatus">
  142. </el-date-picker>
  143. </template>
  144. </el-table-column>
  145. <el-table-column label="事项">
  146. <template slot-scope="scope">
  147. <el-input v-model="scope.row.docRemark" :disabled="disableStatus"></el-input>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="操作" width="120px" align="center" v-if="titname != '查看'">
  151. <template slot-scope="scope">
  152. <el-button size="mini" type="primary" @click="cholinet(1,scope)">添加</el-button>
  153. <el-button size="mini" type="danger" @click="cholinet(2,scope)">删除</el-button>
  154. </template>
  155. </el-table-column>
  156. </el-table>
  157. </div>
  158. <div v-if="disableStatus">
  159. <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
  160. </div>
  161. <div v-if="!disableStatus">
  162. <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
  163. </myUpload>
  164. </div>
  165. </el-form>
  166. <div slot="footer" style="float: right;margin-top: 20px;">
  167. <el-button type="primary" @click="dialogCliadd(2)">确 定</el-button>
  168. <el-button @click="dialogCliadd(1)">取 消</el-button>
  169. </div>
  170. </div>
  171. </el-dialog>
  172. <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
  173. v-if="centerDialogVisible"></myMessage>
  174. </fullscreen>
  175. </template>
  176. <script>
  177. import mySearch from "../../../components/search.vue";
  178. import myMessage from "../../../components/myMessage.vue"
  179. import toolList from '../../../components/toolList'
  180. import myUpload from '../../../components/upload'
  181. import uploadDown from '../../../components/uploadDown.vue'
  182. import deptTreeOnly from "../../../components/deptTreeOnly.vue"
  183. export default {
  184. components: {
  185. mySearch,
  186. myMessage,
  187. toolList,
  188. myUpload,
  189. uploadDown,
  190. deptTreeOnly
  191. },
  192. data() {
  193. const coopName = (rule, value, callback) => {
  194. if (!this.infolist.coopName) {
  195. callback(new Error('不能为空'))
  196. } else {
  197. callback()
  198. }
  199. }
  200. return {
  201. rules: {
  202. coopName: [{
  203. required: true,
  204. trigger: 'blur',
  205. validator: coopName
  206. }],
  207. },
  208. searchList: [{
  209. type: 'input',
  210. tit: '合作主体名称',
  211. value: '',
  212. width: '49%'
  213. },
  214. {
  215. type: 'date',
  216. tit: '合同时间',
  217. value: '',
  218. width: '49%',
  219. },
  220. ],
  221. tooltit: '个人数据业务合作伙伴',
  222. fullscreen: false,
  223. total: 0,
  224. pageSize: 1,
  225. tableData: [{}],
  226. dialogStatus: false,
  227. disableStatus: false,
  228. titname: '',
  229. infolist: {
  230. signTime:'',
  231. },
  232. userInfo: {},
  233. params: {},
  234. centerDialogVisible: false,
  235. messTit: '',
  236. delid: '',
  237. loading: false,
  238. loadinged: false,
  239. docType:[],
  240. contentType:[],
  241. infodata:[{}],
  242. infodatat:[{}],
  243. optType:[
  244. {
  245. name:'重大事件归档'
  246. },{
  247. name:'年度归档'
  248. },{
  249. name:'退出归档'
  250. },
  251. ],
  252. datalist: {
  253. url: "/market/waf/downFileByMinio",
  254. type: 1
  255. },
  256. uploadstatus: false,
  257. attList: [],
  258. fileInfo: {
  259. limit: 5,
  260. url: '/market/cmkAttachInfo/uploadByMinio',
  261. fileList: [],
  262. uploadType:'newlyCoop'
  263. },
  264. }
  265. },
  266. methods: {
  267. uploadBack(v) {
  268. this.attList = v;
  269. },
  270. //搜索数据
  271. searchInfo(v) {
  272. this.params = {};
  273. v[0] ? this.params.coopName = v[0] : '';
  274. v[1] ? this.params.signTime = this.$formatDate(v[1], "YYYY-MM-DD") : '';
  275. this.getList(this.params, this.pageSize);
  276. },
  277. choline(v, n) {
  278. if (v == 1) {
  279. this.infodata.push({})
  280. } else {
  281. this.infodata.splice(n.$index, 1)
  282. }
  283. },
  284. cholinet(v, n) {
  285. if (v == 1) {
  286. this.infodatat.push({})
  287. } else {
  288. this.infodatat.splice(n.$index, 1)
  289. }
  290. },
  291. closedia() {
  292. this.infolist = {
  293. signTime:'',
  294. };
  295. this.infodata = [{}];
  296. this.infodatat = [{}];
  297. this.attList = [];
  298. this.fileInfo.fileList = [];
  299. this.dialogStatus = false;
  300. },
  301. //获取列表
  302. getList(v, n) {
  303. this.pageSize = n;
  304. let _this = this;
  305. this.loading = true;
  306. this.$http({
  307. url: "/market/cNewlyCoop/queryPage",
  308. method: "post",
  309. headers: {
  310. "Content-Type": "application/json",
  311. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  312. },
  313. data: v,
  314. }).then((res) => {
  315. this.tableData = res.data.data;
  316. this.total = res.data.totalRecord;
  317. this.loading = false;
  318. });
  319. },
  320. // 分页
  321. currchange(v) {
  322. this.pageSize = v;
  323. this.getList(this.params, this.pageSize);
  324. },
  325. //申请
  326. dialogCheck(v, n) {
  327. this.dialogStatus = true;
  328. let infolist = Object.assign({}, n);
  329. if (v === 1) {
  330. this.titname = '查看';
  331. this.disableStatus = true;
  332. } else if (v === 2) {
  333. this.titname = '修改';
  334. this.disableStatus = false;
  335. } else if (v === 3) {
  336. this.titname = '添加';
  337. this.disableStatus = false;
  338. return
  339. }
  340. this.infolist = infolist;
  341. this.$http({
  342. url: "/market/cNewlyCoop/query",
  343. method: "post",
  344. headers: {
  345. "Content-Type": "application/json",
  346. },
  347. data: {
  348. id: n.id
  349. },
  350. }).then((res) => {
  351. this.infodatat = res.data.docList;
  352. this.infodata = res.data.proList;
  353. res.data.attList.forEach(item => {
  354. this.fileInfo.fileList.push({
  355. name: item.fileName,
  356. url: '',
  357. id: item.id,
  358. fileCode: item.fileCode,
  359. fileName: item.fileName
  360. });
  361. this.attList.push({
  362. name: item.fileName,
  363. url: '',
  364. id: item.id,
  365. fileCode: item.fileCode,
  366. fileName: item.fileName
  367. });
  368. })
  369. this.datalist.attList = [];
  370. this.datalist.attList = res.data.attList;
  371. this.infolist.attList = [];
  372. this.infolist.attList = res.data.attList;
  373. this.uploadstatus = !this.uploadstatus;
  374. });
  375. },
  376. //添加
  377. dialogCliadd(v) {
  378. if (v == 1 || this.titname == '查看') {
  379. this.infolist = {
  380. signTime:'',
  381. };
  382. this.infodata = [{}];
  383. this.infodatat = [{}];
  384. this.attList = [];
  385. this.fileInfo.fileList = [];
  386. this.dialogStatus = false;
  387. return
  388. }
  389. let _this = this;
  390. let info = this.infolist;
  391. info.opTime = _this.$formatDate(new Date(), "YYYY-MM-DD");
  392. info.opNo = this.userInfo.loginNo;
  393. info.opName = this.userInfo.loginName;
  394. info.signTime = info.signTime ? _this.$formatDate(info.signTime, "YYYY-MM-DD") : '';
  395. info.docList = this.infodatat;
  396. info.proList = this.infodata;
  397. if(info.docList.length == 0){
  398. this.infodatat.push({})
  399. }
  400. if(info.proList.length == 0){
  401. this.infodata.push({})
  402. }
  403. let attList = [];
  404. for (let i = 0; i < this.attList.length; i++) {
  405. attList.push({
  406. id: this.attList[i].id,
  407. fileCode: this.attList[i].fileCode,
  408. fileName: this.attList[i].fileName,
  409. });
  410. }
  411. info.attList = attList;
  412. if (this.titname == '修改') {
  413. this.submitInfo("/market/cNewlyCoop/update", info);
  414. } else {
  415. this.submitInfo("/market/cNewlyCoop/add", info);
  416. }
  417. },
  418. submitInfo(u, v) {
  419. let _this = this;
  420. this.$refs.infolist.validate(valid => {
  421. if (valid) {
  422. this.$http({
  423. url: u,
  424. method: "post",
  425. headers: {
  426. "Content-Type": "application/json",
  427. },
  428. data: v,
  429. }).then((res) => {
  430. if (res.data.result === 1) {
  431. _this.$message({
  432. message: res.data.desc,
  433. type: 'error'
  434. });
  435. } else {
  436. _this.$message({
  437. message: '成功',
  438. type: 'success'
  439. });
  440. _this.closedia();
  441. _this.infolist = {
  442. signTime:'',
  443. };
  444. _this.infodata = [{}];
  445. _this.infodatat = [{}];
  446. _this.getList(this.params, this.pageSize);
  447. }
  448. });
  449. }
  450. })
  451. },
  452. closeMessage(v) {
  453. this.centerDialogVisible = false;
  454. let _this = this;
  455. if (v === 1) {
  456. _this.$http({
  457. url: "/market/cNewlyCoop/del",
  458. method: "post",
  459. headers: {
  460. "Content-Type": "application/json",
  461. },
  462. data: {
  463. id: this.delid
  464. },
  465. }).then((res) => {
  466. if (res.data.result === 1) {
  467. _this.$message({
  468. message: res.data.desc,
  469. type: 'error'
  470. });
  471. } else {
  472. _this.$message({
  473. message: '删除成功',
  474. type: 'success'
  475. });
  476. _this.getList(this.params, this.pageSize);
  477. }
  478. });
  479. }
  480. },
  481. //删除
  482. delLine(v) {
  483. this.centerDialogVisible = true;
  484. this.messTit = '即将删除此条数据, 是否删除?';
  485. this.delid = v.id;
  486. },
  487. //功能栏
  488. iconCli(v) {
  489. if (v === 1) {
  490. this.getList(this.params, this.pageSize);
  491. }
  492. if (v === 2) {
  493. this.fullscreen = !this.fullscreen
  494. }
  495. },
  496. getUser() {
  497. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  498. },
  499. },
  500. mounted() {
  501. this.getList({}, 1);
  502. this.getUser();
  503. },
  504. created() {
  505. }
  506. }
  507. </script>
  508. <style scoped lang="scss">
  509. .onetab {
  510. margin-bottom: 20px;
  511. padding: 0 20px;
  512. }
  513. .titbox {
  514. div {
  515. float: right;
  516. i {
  517. font-size: 22px;
  518. margin-left: 20px;
  519. cursor: pointer;
  520. }
  521. }
  522. }
  523. .tabbox {
  524. margin-top: 15px;
  525. }
  526. .pageBox {
  527. text-align: right;
  528. margin-top: 10px;
  529. }
  530. .info-line {
  531. width: 100%;
  532. display: block;
  533. padding-left: 20px;
  534. div {
  535. width: 50%;
  536. display: inline-block;
  537. }
  538. span {
  539. width: 100px;
  540. display: inline-block;
  541. text-align: left;
  542. i {
  543. color: red;
  544. display: inline-block;
  545. padding-right: 5px;
  546. }
  547. }
  548. .el-select,
  549. .el-input {
  550. width: calc(100% - 120px);
  551. }
  552. }
  553. .online {
  554. width: 100%;
  555. .el-select {
  556. width: calc(100% - 100px);
  557. }
  558. span {
  559. vertical-align: top;
  560. }
  561. .el-textarea {
  562. width: calc(100% - 120px);
  563. }
  564. .tree {
  565. width: calc(50% - 60px);
  566. display: inline-block;
  567. margin-right: 20px;
  568. height: 300px;
  569. overflow-y: scroll;
  570. .el-icon-error {
  571. float: right;
  572. font-size: 20px;
  573. margin-top: 9px;
  574. cursor: pointer;
  575. }
  576. }
  577. .treeUser {
  578. margin: 0;
  579. border: 1px solid #ddd;
  580. p {
  581. background: #f4f4f4;
  582. padding: 0 20px;
  583. margin-bottom: 5px;
  584. }
  585. }
  586. .treeUserb {
  587. width: calc(100% - 100px);
  588. border: 1px solid #ddd;
  589. background: #f4f4f4;
  590. border-radius: 3px;
  591. height: auto;
  592. overflow: hidden;
  593. p {
  594. display: inline-block;
  595. padding: 0 20px;
  596. margin-bottom: 5px;
  597. }
  598. }
  599. }
  600. .adv-type {
  601. margin-top: 20px;
  602. display: flex;
  603. justify-content: space-between;
  604. flex-wrap: wrap;
  605. // border: 1px solid #ddd;
  606. border-radius: 5px;
  607. padding: 20px;
  608. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  609. div {
  610. width: 33%;
  611. text-align: center;
  612. height: 80px;
  613. overflow: hidden;
  614. min-width: 100px;
  615. cursor: pointer;
  616. padding-top: 10px;
  617. margin: 10px 0;
  618. }
  619. div:hover {
  620. background: #CFE8FC;
  621. border-radius: 5px;
  622. }
  623. span {
  624. width: 100%;
  625. display: inline-block;
  626. height: 40px;
  627. // line-height: 40px;
  628. i {
  629. color: #0074D9;
  630. font-size: 36px;
  631. }
  632. }
  633. }
  634. </style>