应用层PC端前端服务

paymentdetailsDialog.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <template>
  2. <div>
  3. <el-dialog :title="title" :visible="openDialog" width="1000px" @close="cancel" :destroy-on-close="true">
  4. <el-descriptions title="案件信息" border style="margin-bottom: 30px">
  5. <el-descriptions-item label="案件编号">{{
  6. form.caseNum
  7. }}</el-descriptions-item>
  8. <el-descriptions-item label="案件标的">{{
  9. form.caseSubjectAmount
  10. }}</el-descriptions-item>
  11. <el-descriptions-item label="借款开始日期">{{
  12. form.loanStartDate
  13. }}</el-descriptions-item>
  14. <el-descriptions-item label="借款结束日期">{{
  15. form.loanEndDate
  16. }}</el-descriptions-item>
  17. <el-descriptions-item label="合同编号">{{
  18. form.contractNumber
  19. }}</el-descriptions-item>
  20. <el-descriptions-item label="申请人主张欠本金">{{
  21. form.claimPrinciOwed
  22. }}</el-descriptions-item>
  23. <el-descriptions-item label="申请人主张欠利息">{{
  24. form.claimInterestOwed
  25. }}</el-descriptions-item>
  26. <el-descriptions-item label="申请人主张违约金">{{
  27. form.claimLiquidDamag
  28. }}</el-descriptions-item>
  29. <el-descriptions-item label="申请人案件证据资料">
  30. <p @click="toFile(index, 2)" v-for="(item, index) in applicantFileArr" :key="index">
  31. <a href="#">{{ item }}</a>
  32. </p>
  33. </el-descriptions-item>
  34. <el-descriptions-item label="被申请人案件证据资料">
  35. <p v-for="(item, index) in respondentFileArr" :key="index" @click="toFile(index, 6)">
  36. <a href="#">{{ item }}</a>
  37. </p>
  38. </el-descriptions-item>
  39. <el-descriptions-item label="裁决书附件">
  40. <p v-for="(item, index) in awardFileArr" :key="index" @click="toFile(index, 3)">
  41. <a href="#">{{ item }}</a>
  42. </p>
  43. </el-descriptions-item>
  44. <el-descriptions-item label="庭审笔录附件">
  45. <p v-for="(item, index) in bookFileArr" :key="index" @click="toFile(index, 7)">
  46. <a href="#">{{ item }}</a>
  47. </p>
  48. </el-descriptions-item>
  49. </el-descriptions>
  50. <el-form ref="form" :model="arbitrateRecord" label-width="300px" label-position="left" :rules="rules"
  51. :disabled="flag == 3">
  52. <!-- <el-form-item label="经庭审质证,对各方提供的证据认定如下" prop="evidenDetermi">
  53. <el-input type="textarea" autosize :disabled="flag == 2" placeholder="请输入内容"
  54. v-model="arbitrateRecord.evidenDetermi" />
  55. </el-form-item>
  56. <el-form-item label="仲裁庭经审理查明(写明仲裁庭认定的事实)" prop="factDetermi">
  57. <el-input type="textarea" autosize :disabled="flag == 2" placeholder="请输入内容"
  58. v-model="arbitrateRecord.factDetermi" />
  59. </el-form-item>
  60. <el-form-item label="综上所述" prop="caseSketch">
  61. <el-input type="textarea" autosize :disabled="flag == 2" placeholder="请输入内容"
  62. v-model="arbitrateRecord.caseSketch" />
  63. </el-form-item>
  64. <el-form-item label="本庭认为" prop="arbitrateThink">
  65. <el-input type="textarea" autosize :disabled="flag == 2" placeholder="请输入内容"
  66. v-model="arbitrateRecord.arbitrateThink" />
  67. </el-form-item>
  68. <el-form-item label="裁决如下" prop="rulingFollows">
  69. <el-input type="textarea" autosize :disabled="flag == 2" placeholder="请输入内容"
  70. v-model="arbitrateRecord.rulingFollows" />
  71. </el-form-item>
  72. <el-form-item label="核验裁决书意见:" prop="verificaOpinion">
  73. <el-input type="textarea" autosize :disabled="flag == 2" placeholder="请输入内容"
  74. v-model="arbitrateRecord.verificaOpinion" />
  75. </el-form-item> -->
  76. <el-form-item label="笔录内容:" prop="responCrossOpin">
  77. <!-- <el-input type="textarea" :autosize="{ minRows: 6 }" v-model="arbitrateRecord.responCrossOpin" placeholder="请输入" /> -->
  78. <el-input type="textarea" :autosize="{ minRows: 6 }" v-model="arbitrateRecordt.responCrossOpin" placeholder="请输入" />
  79. </el-form-item>
  80. <el-form-item label="审核意见:" prop="checkOpinion" v-if="flag == 2">
  81. <el-input type="textarea" autosize placeholder="请输入内容" v-model="arbitrateRecord.checkOpinion" />
  82. </el-form-item>
  83. </el-form>
  84. <!-- 画布 -->
  85. <h4 v-if="flag == 3">签名区域</h4>
  86. <div class="esign" v-if="flag == 3">
  87. <vue-esign ref="esign" :width="900" :height="300" bgColor="#ffffff" />
  88. </div>
  89. <!-- 清除画布 -->
  90. <el-button v-if="flag == 3" type="info" @click="handleReset">清除画布</el-button>
  91. <div slot="footer" class="dialog-footer">
  92. <el-button type="danger" @click="submitForm(4)" v-if="flag == 1">重新生成裁决书</el-button>
  93. <el-button type="primary" @click="submitForm(0)" v-if="flag == 1">提 交</el-button>
  94. <el-button type="primary" @click="submitForm(1)" v-if="flag == 2">同 意</el-button>
  95. <el-button type="danger" @click="submitForm(2)" v-if="flag == 2">驳 回</el-button>
  96. <el-button type="primary" @click="submitForm(3)" v-if="flag == 3">提 交</el-button>
  97. <el-button @click="cancel">取 消</el-button>
  98. </div>
  99. </el-dialog>
  100. </div>
  101. </template>
  102. <script>
  103. import {
  104. verificationArbitrateRecord,
  105. checkArbitrateRecord,
  106. adjudicationSignature,
  107. regenerationDocument
  108. } from "@/api/awardManagement/awardManagement";
  109. export default {
  110. props: ["openDialog", "title", "flag", "detailform"],
  111. data() {
  112. return {
  113. // key: value
  114. arbitrateRecordt: {},
  115. form: {},
  116. arbitrateRecord: {
  117. // checkOpinion:"同意"
  118. checkOpinion:""
  119. },
  120. // 表单校验
  121. rules: {
  122. evidenDetermi: [
  123. {
  124. required: true,
  125. message: "不能为空",
  126. trigger: "blur",
  127. },
  128. ],
  129. factDetermi: [
  130. {
  131. required: true,
  132. message: "不能为空",
  133. trigger: "blur",
  134. },
  135. ],
  136. caseSketch: [
  137. {
  138. required: true,
  139. message: "不能为空",
  140. trigger: "blur",
  141. },
  142. ],
  143. arbitrateThink: [
  144. {
  145. required: true,
  146. message: "不能为空",
  147. trigger: "blur",
  148. },
  149. ],
  150. rulingFollows: [
  151. {
  152. required: true,
  153. message: "不能为空",
  154. trigger: "blur",
  155. },
  156. ],
  157. verificaOpinion: [
  158. {
  159. required: true,
  160. message: "意见不能为空",
  161. trigger: "blur",
  162. },
  163. ],
  164. checkOpinion: [
  165. {
  166. required: true,
  167. message: "意见不能为空",
  168. trigger: "blur",
  169. },
  170. ],
  171. },
  172. applicantFileArr: [], //申请人
  173. applicantPathArr: [], //申请人
  174. respondentFileArr: [], //被申请人
  175. respondenPathArr: [], //被申请人
  176. awardFileArr: [], //庭审笔录文件
  177. awardPathArr: [], //庭审笔录路径
  178. bookFileArr: [], //裁决书文件
  179. bookPathArr: [], //庭审笔录路径
  180. };
  181. },
  182. watch: {
  183. detailform: {
  184. handler(val) {
  185. if (val) {
  186. (this.applicantFileArr = []), //申请人
  187. (this.applicantPathArr = []), //申请人
  188. (this.respondentFileArr = []), //被申请人
  189. (this.respondenPathArr = []), //被申请人
  190. (this.awardFileArr = []), //裁决书
  191. (this.awardPathArr = []), //裁决书
  192. // setTimeout(() => {
  193. this.form = this.detailform;
  194. // if(this.form.arbitrateRecord && this.form.arbitrateRecord.checkOpinion == null ){
  195. // this.form.arbitrateRecord.checkOpinion = '同意';
  196. this.arbitrateRecord.checkOpinion = '';
  197. // }
  198. // this.arbitrateRecord = this.form.arbitrateRecord;
  199. this.evidenceFile(this.form);
  200. // }, 1000);
  201. }
  202. },
  203. },
  204. },
  205. methods: {
  206. // 申请人裁决书
  207. evidenceFile(val) {
  208. if (val) {
  209. this.applicantFileArr = [];
  210. this.applicantPathArr = [];
  211. this.respondentFileArr = [];
  212. this.respondenPathArr = [];
  213. this.awardFileArr = [];
  214. this.awardPathArr = [];
  215. this.bookFileArr = [];
  216. this.bookPathArr = [];
  217. val.caseAttachList.forEach((item) => {
  218. if (item.annexType == 2) {
  219. this.applicantFileArr.push(item.annexName);
  220. this.applicantPathArr.push(item.annexPath);
  221. } else if (item.annexType == 6) {
  222. this.respondentFileArr.push(item.annexName);
  223. this.respondenPathArr.push(item.annexPath);
  224. } else if (item.annexType == 3) {
  225. this.awardFileArr.push(item.annexName);
  226. this.awardPathArr.push(item.annexPath);
  227. } else if (item.annexType == 7) {
  228. this.bookFileArr.push(item.annexName);
  229. this.bookPathArr.push(item.annexPath);
  230. }
  231. });
  232. }
  233. },
  234. // 预览文件
  235. toFile(index, val) {
  236. let headPath = window.location.origin + "/API";
  237. if (val == 2) {
  238. window.open(headPath + this.applicantPathArr[index], "_blank");
  239. } else if (val == 6) {
  240. window.open(headPath + this.respondenPathArr[index], "_blank");
  241. } else if (val == 3) {
  242. window.open(headPath + this.awardPathArr[index], "_blank");
  243. } else if (val == 7) {
  244. window.open(headPath + this.bookPathArr[index], "_blank");
  245. }
  246. },
  247. // 校验裁决书
  248. verificationArbitrateRecordFn(parms) {
  249. verificationArbitrateRecord(parms).then((res) => {
  250. this.cancel();
  251. this.$emit("updataList");
  252. this.$message("成功");
  253. });
  254. },
  255. //审核裁决书
  256. checkArbitrateRecordFn(parms) {
  257. checkArbitrateRecord(parms).then((res) => {
  258. this.cancel();
  259. this.$emit("updataList");
  260. this.$message("成功");
  261. });
  262. },
  263. // 签名
  264. adjudicationSignatureFn(parms) {
  265. adjudicationSignature(parms).then((res) => {
  266. this.cancel();
  267. this.$emit("updataList");
  268. this.$message("成功");
  269. })
  270. },
  271. // 重新生成裁决书
  272. getRegenerationDocument(params) {
  273. regenerationDocument(params).then(res => {
  274. console.log(res.data, "重新生成裁决书");
  275. this.awardFileArr = [];
  276. this.awardPathArr = [];
  277. this.awardFileArr[0] = res.data.annexName;
  278. this.awardPathArr[0] = res.data.annexPath;
  279. })
  280. },
  281. submitForm(parms) {
  282. this.$refs["form"].validate((valid) => {
  283. if (valid) {
  284. if (parms == 0) {
  285. this.verificationArbitrateRecordFn({
  286. id: this.form.id,
  287. arbitrateRecord: this.arbitrateRecord,
  288. });
  289. } else if (parms == 1) {
  290. this.checkArbitrateRecordFn({
  291. id: this.form.id,
  292. agreeOrNotCheck: 1,
  293. arbitrateRecord: this.arbitrateRecord,
  294. });
  295. } else if (parms == 2) {
  296. this.checkArbitrateRecordFn({
  297. id: this.form.id,
  298. agreeOrNotCheck: 2,
  299. arbitrateRecord: this.arbitrateRecord,
  300. });
  301. } else if (parms == 3) {
  302. this.adjudicationSignatureFn({
  303. id: this.form.id,
  304. });
  305. } else if (parms == 4) {
  306. let paramsData = {};
  307. paramsData.arbitrateRecord = this.arbitrateRecord;
  308. paramsData.id = this.form.id
  309. this.getRegenerationDocument(paramsData)
  310. }
  311. }
  312. });
  313. },
  314. cancel() {
  315. this.$emit("cancelpaymentdetails");
  316. },
  317. // 清除画布
  318. handleReset() {
  319. this.$refs["esign"].reset(); //清空画布
  320. },
  321. },
  322. };
  323. </script>
  324. <style lang="scss" scoped>
  325. ::v-deep .el-dialog {
  326. border-radius: 30px;
  327. }
  328. .esign {
  329. border: 1px solid;
  330. }
  331. a {
  332. color: blue;
  333. }
  334. </style>