detailsPage.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList">返回列表
  7. </el-button>
  8. </div>
  9. <div class="add-customer-btn">
  10. <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
  11. class="el-button--small-yh " @click.stop="openEdit">编辑
  12. </el-button>
  13. <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 1"
  14. size="small">保存数据
  15. </el-button>
  16. <el-dropdown style="padding: 0 6px;line-height: 0">
  17. <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
  18. 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
  19. </el-button>
  20. <el-dropdown-menu slot="dropdown">
  21. <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审核数据</el-dropdown-item>
  22. <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
  23. </el-dropdown-item>
  24. <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
  25. </el-dropdown-item>
  26. </el-dropdown-menu>
  27. </el-dropdown>
  28. </div>
  29. </div>
  30. <div class="customer-main" v-loading="subLoading">
  31. <trade-card title="基础信息">
  32. <avue-form ref="form" class="trading-form" v-model="form" :option="option">
  33. <template slot="corpId">
  34. <crop-select v-model="form.corpId" corpType="KH" :refresh="false" @getCorpData="getKHData"
  35. :disabled="detailData.status == 1"></crop-select>
  36. </template>
  37. </avue-form>
  38. </trade-card>
  39. <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
  40. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  41. <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
  42. </check-schedule>
  43. </el-dialog>
  44. <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
  45. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  46. <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
  47. </check>
  48. </el-dialog>
  49. </div>
  50. </div>
  51. </template>
  52. <script>
  53. import { getDetail, submit, checkFinancing } from "@/api/basicData/financing";
  54. import feeInfo from "@/components/fee-info/main";
  55. import checkSchedule from "../../../components/check/checkSchedule";
  56. import uploadFile from "@/components/upload-file/main";
  57. import check from "@/components/check/check";
  58. export default {
  59. name: "detailsPageEdit",
  60. data() {
  61. return {
  62. checkData: {},
  63. checkDialog: false,
  64. form: {},
  65. checkScheduleDialog: false,
  66. option: {
  67. disabled: false,
  68. menuBtn: false,
  69. labelWidth: 100,
  70. column: [
  71. {
  72. label: "系统编号",
  73. prop: "sysNo",
  74. disabled: true,
  75. span: 6
  76. },
  77. {
  78. label: "客户",
  79. prop: "corpId",
  80. rules: [
  81. {
  82. required: true,
  83. message: "",
  84. trigger: "blur"
  85. }
  86. ],
  87. span: 6
  88. },
  89. {
  90. label: "融资日期",
  91. prop: "financingDate",
  92. type: "date",
  93. format: 'yyyy-MM-dd',
  94. valueFormat: 'yyyy-MM-dd',
  95. rules: [
  96. {
  97. required: true,
  98. message: "",
  99. trigger: "blur"
  100. }
  101. ],
  102. span: 6
  103. },
  104. {
  105. label: "融资类别",
  106. prop: "financingType",
  107. type: "select",
  108. dataType: 'number',
  109. props: {
  110. label: "dictValue",
  111. value: "dictKey"
  112. },
  113. dicData: [],
  114. rules: [
  115. {
  116. required: true,
  117. message: "",
  118. trigger: "blur"
  119. }
  120. ],
  121. span: 6
  122. },
  123. {
  124. label: "融资金额",
  125. prop: "financingAmount",
  126. rules: [
  127. {
  128. required: true,
  129. message: "",
  130. trigger: "blur"
  131. }
  132. ],
  133. span: 6
  134. },
  135. {
  136. label: "状态",
  137. prop: "status",
  138. type: "select",
  139. dataType: 'number',
  140. props: {
  141. label: "dictValue",
  142. value: "dictKey"
  143. },
  144. dicData: [],
  145. disabled: true,
  146. span: 6
  147. },
  148. {
  149. label: "备注",
  150. prop: "remarks",
  151. type: "textarea",
  152. minRows: 2,
  153. width: 120,
  154. span: 12,
  155. },
  156. ]
  157. },
  158. itemsVOList: [],
  159. orderFilesList: [],
  160. subLoading: false,
  161. pageLoading: false,
  162. batchNo: '',
  163. storagetreeList: []
  164. };
  165. },
  166. props: {
  167. detailData: {
  168. type: Object
  169. }
  170. },
  171. components: {
  172. feeInfo,
  173. checkSchedule,
  174. uploadFile,
  175. check
  176. },
  177. async created() {
  178. if (this.detailData.status == 1) {
  179. this.option.disabled = true;
  180. }
  181. if (this.detailData.id) {
  182. this.getDetail(this.detailData.id);
  183. }
  184. this.getWorkDicts("approval_status").then(res => {
  185. this.findObject(this.option.column, "status").dicData =
  186. res.data.data;
  187. });
  188. this.getWorkDicts("financing_type").then(res => {
  189. this.findObject(this.option.column, "financingType").dicData =
  190. res.data.data;
  191. });
  192. },
  193. methods: {
  194. check() {
  195. this.checkData = this.$route.query.check
  196. this.checkDialog = true
  197. },
  198. //关闭审核
  199. choceCheckFun() {
  200. this.checkDialog = false;
  201. },
  202. cellStyle() {
  203. return "padding:0;height:40px;";
  204. },
  205. getKHData(row) {
  206. this.form.corpName = row.cname
  207. },
  208. getDetail(id) {
  209. this.pageLoading = true;
  210. getDetail(id)
  211. .then(res => {
  212. this.form = res.data.data;
  213. })
  214. .finally(() => {
  215. this.pageLoading = false;
  216. });
  217. },
  218. //修改提交触发
  219. editCustomer(status) {
  220. this.$refs["form"].validate((valid, done) => {
  221. done();
  222. if (valid) {
  223. this.subLoading = true;
  224. let data = {
  225. ...this.form
  226. };
  227. submit(data).then(res => {
  228. console.log(res)
  229. this.form = res.data.data.data;
  230. this.$message({
  231. type: "success",
  232. message: "保存成功!"
  233. });
  234. })
  235. .finally(() => {
  236. this.subLoading = false;
  237. });
  238. } else {
  239. return false;
  240. }
  241. });
  242. },
  243. //请核
  244. auditCheck() {
  245. this.$confirm("确定审核此订单?", {
  246. confirmButtonText: "确定",
  247. cancelButtonText: "取消",
  248. type: "warning"
  249. }).then(() => {
  250. this.subLoading = true
  251. const data = {
  252. id: this.form.id,
  253. checkType: 'rzgl',
  254. url: '/financing/financingManagement/index',
  255. pageStatus: "this.$store.getters.entranceXsStatus",
  256. pageLabel: "融资管理",
  257. checkFlag: 1,
  258. }
  259. checkFinancing(data).then(res => {
  260. if (res.data.success) {
  261. this.$message.success("操作成功!")
  262. this.option.disabled = true;
  263. }
  264. }).finally(() => {
  265. this.subLoading = false
  266. })
  267. })
  268. },
  269. //返回列表
  270. backToList() {
  271. this.$emit("goBack");
  272. },
  273. openEdit() {
  274. this.detailData.status = 2;
  275. this.option.disabled = false;
  276. this.$refs.crud.refreshTable();
  277. }
  278. },
  279. watch: {
  280. }
  281. };
  282. </script>
  283. <style lang="scss" scoped>
  284. .trading-form ::v-deep .el-form-item {
  285. margin-bottom: 8px !important;
  286. }
  287. ::v-deep .el-form-item__error {
  288. display: none !important;
  289. }
  290. ::v-deep .select-component {
  291. display: flex !important;
  292. }
  293. </style>