应用层PC端前端服务

paymentdetailsDialog.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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-form-item>
  79. <el-form-item label="审核意见:" prop="checkOpinion" v-if="flag == 2">
  80. <el-input type="textarea" autosize placeholder="请输入内容" v-model="arbitrateRecord.checkOpinion" />
  81. </el-form-item>
  82. </el-form>
  83. <!-- 画布 -->
  84. <h4 v-if="flag == 3">签名区域</h4>
  85. <div class="esign" v-if="flag == 3">
  86. <vue-esign ref="esign" :width="900" :height="300" bgColor="#ffffff" />
  87. </div>
  88. <!-- 清除画布 -->
  89. <el-button v-if="flag == 3" type="info" @click="handleReset">清除画布</el-button>
  90. <div slot="footer" class="dialog-footer">
  91. <el-button type="danger" @click="submitForm(4)" v-if="flag == 1">重新生成裁决书</el-button>
  92. <el-button type="primary" @click="submitForm(0)" v-if="flag == 1">提 交</el-button>
  93. <el-button type="primary" @click="submitForm(1)" v-if="flag == 2">同 意</el-button>
  94. <el-button type="danger" @click="submitForm(2)" v-if="flag == 2">驳 回</el-button>
  95. <el-button type="primary" @click="submitForm(3)" v-if="flag == 3">提 交</el-button>
  96. <el-button @click="cancel">取 消</el-button>
  97. </div>
  98. </el-dialog>
  99. </div>
  100. </template>
  101. <script>
  102. import {
  103. verificationArbitrateRecord,
  104. checkArbitrateRecord,
  105. adjudicationSignature,
  106. regenerationDocument
  107. } from "@/api/awardManagement/awardManagement";
  108. export default {
  109. props: ["openDialog", "title", "flag", "detailform"],
  110. data() {
  111. return {
  112. // key: value
  113. form: {},
  114. arbitrateRecord: {
  115. checkOpinion:"同意"
  116. },
  117. // 表单校验
  118. rules: {
  119. evidenDetermi: [
  120. {
  121. required: true,
  122. message: "不能为空",
  123. trigger: "blur",
  124. },
  125. ],
  126. factDetermi: [
  127. {
  128. required: true,
  129. message: "不能为空",
  130. trigger: "blur",
  131. },
  132. ],
  133. caseSketch: [
  134. {
  135. required: true,
  136. message: "不能为空",
  137. trigger: "blur",
  138. },
  139. ],
  140. arbitrateThink: [
  141. {
  142. required: true,
  143. message: "不能为空",
  144. trigger: "blur",
  145. },
  146. ],
  147. rulingFollows: [
  148. {
  149. required: true,
  150. message: "不能为空",
  151. trigger: "blur",
  152. },
  153. ],
  154. verificaOpinion: [
  155. {
  156. required: true,
  157. message: "意见不能为空",
  158. trigger: "blur",
  159. },
  160. ],
  161. checkOpinion: [
  162. {
  163. required: true,
  164. message: "意见不能为空",
  165. trigger: "blur",
  166. },
  167. ],
  168. },
  169. applicantFileArr: [], //申请人
  170. applicantPathArr: [], //申请人
  171. respondentFileArr: [], //被申请人
  172. respondenPathArr: [], //被申请人
  173. awardFileArr: [], //庭审笔录文件
  174. awardPathArr: [], //庭审笔录路径
  175. bookFileArr: [], //裁决书文件
  176. bookPathArr: [], //庭审笔录路径
  177. };
  178. },
  179. watch: {
  180. detailform: {
  181. handler(val) {
  182. if (val) {
  183. (this.applicantFileArr = []), //申请人
  184. (this.applicantPathArr = []), //申请人
  185. (this.respondentFileArr = []), //被申请人
  186. (this.respondenPathArr = []), //被申请人
  187. (this.awardFileArr = []), //裁决书
  188. (this.awardPathArr = []), //裁决书
  189. setTimeout(() => {
  190. this.form = this.detailform;
  191. console.log(this.detailform)
  192. if(this.form.arbitrateRecord.checkOpinion == null ){
  193. this.form.arbitrateRecord.checkOpinion = '同意'
  194. }
  195. this.arbitrateRecord = this.form.arbitrateRecord;
  196. this.evidenceFile(this.form);
  197. }, 1000);
  198. }
  199. },
  200. },
  201. },
  202. methods: {
  203. // 申请人裁决书
  204. evidenceFile(val) {
  205. if (val) {
  206. this.bookFileArr = [];
  207. this.bookPathArr = [];
  208. val.caseAttachList.forEach((item) => {
  209. if (item.annexType == 2) {
  210. this.applicantFileArr.push(item.annexName);
  211. this.applicantPathArr.push(item.annexPath);
  212. } else if (item.annexType == 6) {
  213. this.respondentFileArr.push(item.annexName);
  214. this.respondenPathArr.push(item.annexPath);
  215. } else if (item.annexType == 3) {
  216. this.awardFileArr = [];
  217. this.awardPathArr = [];
  218. this.awardFileArr.push(item.annexName);
  219. this.awardPathArr.push(item.annexPath);
  220. } else if (item.annexType == 7) {
  221. this.bookFileArr.push(item.annexName);
  222. this.bookPathArr.push(item.annexPath);
  223. }
  224. });
  225. }
  226. },
  227. // 预览文件
  228. toFile(index, val) {
  229. let headPath = window.location.origin + "/API";
  230. if (val == 2) {
  231. window.open(headPath + this.applicantPathArr[index], "_blank");
  232. } else if (val == 6) {
  233. window.open(headPath + this.respondenPathArr[index], "_blank");
  234. } else if (val == 3) {
  235. window.open(headPath + this.awardPathArr[index], "_blank");
  236. } else if (val == 7) {
  237. window.open(headPath + this.bookPathArr[index], "_blank");
  238. }
  239. },
  240. // 校验裁决书
  241. verificationArbitrateRecordFn(parms) {
  242. verificationArbitrateRecord(parms).then((res) => {
  243. this.cancel();
  244. this.$emit("updataList");
  245. this.$message("成功");
  246. });
  247. },
  248. //审核裁决书
  249. checkArbitrateRecordFn(parms) {
  250. checkArbitrateRecord(parms).then((res) => {
  251. this.cancel();
  252. this.$emit("updataList");
  253. this.$message("成功");
  254. });
  255. },
  256. // 签名
  257. adjudicationSignatureFn(parms) {
  258. adjudicationSignature(parms).then((res) => {
  259. this.cancel();
  260. this.$emit("updataList");
  261. this.$message("成功");
  262. })
  263. },
  264. // 重新生成裁决书
  265. getRegenerationDocument(params) {
  266. regenerationDocument(params).then(res => {
  267. console.log(res.data, "重新生成裁决书");
  268. this.awardFileArr = [];
  269. this.awardPathArr = [];
  270. this.awardFileArr[0] = res.data.annexName;
  271. this.awardPathArr[0] = res.data.annexPath;
  272. })
  273. },
  274. submitForm(parms) {
  275. this.$refs["form"].validate((valid) => {
  276. if (valid) {
  277. if (parms == 0) {
  278. this.verificationArbitrateRecordFn({
  279. id: this.form.id,
  280. arbitrateRecord: this.arbitrateRecord,
  281. });
  282. } else if (parms == 1) {
  283. this.checkArbitrateRecordFn({
  284. id: this.form.id,
  285. agreeOrNotCheck: 1,
  286. arbitrateRecord: this.arbitrateRecord,
  287. });
  288. } else if (parms == 2) {
  289. this.checkArbitrateRecordFn({
  290. id: this.form.id,
  291. agreeOrNotCheck: 2,
  292. arbitrateRecord: this.arbitrateRecord,
  293. });
  294. } else if (parms == 3) {
  295. this.adjudicationSignatureFn({
  296. id: this.form.id,
  297. });
  298. } else if (parms == 4) {
  299. let paramsData = {};
  300. paramsData.arbitrateRecord = this.arbitrateRecord;
  301. paramsData.id = this.form.id
  302. this.getRegenerationDocument(paramsData)
  303. }
  304. }
  305. });
  306. },
  307. cancel() {
  308. this.$emit("cancelpaymentdetails");
  309. },
  310. // 清除画布
  311. handleReset() {
  312. this.$refs["esign"].reset(); //清空画布
  313. },
  314. },
  315. };
  316. </script>
  317. <style lang="scss" scoped>
  318. ::v-deep .el-dialog {
  319. border-radius: 30px;
  320. }
  321. .esign {
  322. border: 1px solid;
  323. }
  324. a {
  325. color: blue;
  326. }
  327. </style>