123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- <template>
- <div class="borderless" v-loading="pageLoading">
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
- @click="backToList">返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
- class="el-button--small-yh " @click.stop="openEdit">编辑
- </el-button>
- <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 1"
- size="small">保存数据
- </el-button>
- <el-dropdown style="padding: 0 6px;line-height: 0">
- <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
- 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审核数据</el-dropdown-item>
- <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
- </el-dropdown-item>
- <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- <div class="customer-main" v-loading="subLoading">
- <trade-card title="基础信息">
- <avue-form ref="form" class="trading-form" v-model="form" :option="option">
- <template slot="corpId">
- <crop-select v-model="form.corpId" corpType="KH" :refresh="false" @getCorpData="getKHData"
- :disabled="detailData.status == 1"></crop-select>
- </template>
- </avue-form>
- </trade-card>
- <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
- <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
- </check-schedule>
- </el-dialog>
- <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
- <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
- </check>
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import { getDetail, submit, checkFinancing } from "@/api/basicData/financing";
- import feeInfo from "@/components/fee-info/main";
- import checkSchedule from "../../../components/check/checkSchedule";
- import uploadFile from "@/components/upload-file/main";
- import check from "@/components/check/check";
- export default {
- name: "detailsPageEdit",
- data() {
- return {
- checkData: {},
- checkDialog: false,
- form: {},
- checkScheduleDialog: false,
- option: {
- disabled: false,
- menuBtn: false,
- labelWidth: 100,
- column: [
- {
- label: "系统编号",
- prop: "sysNo",
- disabled: true,
- span: 6
- },
- {
- label: "客户",
- prop: "corpId",
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 6
- },
- {
- label: "融资日期",
- prop: "financingDate",
- type: "date",
- format: 'yyyy-MM-dd',
- valueFormat: 'yyyy-MM-dd',
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 6
- },
- {
- label: "融资类别",
- prop: "financingType",
- type: "select",
- dataType: 'number',
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dicData: [],
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 6
- },
- {
- label: "融资金额",
- prop: "financingAmount",
- rules: [
- {
- required: true,
- message: "",
- trigger: "blur"
- }
- ],
- span: 6
- },
- {
- label: "状态",
- prop: "status",
- type: "select",
- dataType: 'number',
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dicData: [],
- disabled: true,
- span: 6
- },
- {
- label: "备注",
- prop: "remarks",
- type: "textarea",
- minRows: 2,
- width: 120,
- span: 12,
- },
- ]
- },
- itemsVOList: [],
- orderFilesList: [],
- subLoading: false,
- pageLoading: false,
- batchNo: '',
- storagetreeList: []
- };
- },
- props: {
- detailData: {
- type: Object
- }
- },
- components: {
- feeInfo,
- checkSchedule,
- uploadFile,
- check
- },
- async created() {
- if (this.detailData.status == 1) {
- this.option.disabled = true;
- }
- if (this.detailData.id) {
- this.getDetail(this.detailData.id);
- }
- this.getWorkDicts("approval_status").then(res => {
- this.findObject(this.option.column, "status").dicData =
- res.data.data;
- });
- this.getWorkDicts("financing_type").then(res => {
- this.findObject(this.option.column, "financingType").dicData =
- res.data.data;
- });
- },
- methods: {
- check() {
- this.checkData = this.$route.query.check
- this.checkDialog = true
- },
- //关闭审核
- choceCheckFun() {
- this.checkDialog = false;
- },
- cellStyle() {
- return "padding:0;height:40px;";
- },
- getKHData(row) {
- this.form.corpName = row.cname
- },
- getDetail(id) {
- this.pageLoading = true;
- getDetail(id)
- .then(res => {
- this.form = res.data.data;
- })
- .finally(() => {
- this.pageLoading = false;
- });
- },
- //修改提交触发
- editCustomer(status) {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- this.subLoading = true;
- let data = {
- ...this.form
- };
- submit(data).then(res => {
- console.log(res)
- this.form = res.data.data.data;
- this.$message({
- type: "success",
- message: "保存成功!"
- });
- })
- .finally(() => {
- this.subLoading = false;
- });
- } else {
- return false;
- }
- });
- },
- //请核
- auditCheck() {
- this.$confirm("确定审核此订单?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.subLoading = true
- const data = {
- id: this.form.id,
- checkType: 'rzgl',
- url: '/financing/financingManagement/index',
- pageStatus: "this.$store.getters.entranceXsStatus",
- pageLabel: "融资管理",
- checkFlag: 1,
- }
- checkFinancing(data).then(res => {
- if (res.data.success) {
- this.$message.success("操作成功!")
- this.option.disabled = true;
- }
- }).finally(() => {
- this.subLoading = false
- })
- })
- },
- //返回列表
- backToList() {
- this.$emit("goBack");
- },
- openEdit() {
- this.detailData.status = 2;
- this.option.disabled = false;
- this.$refs.crud.refreshTable();
- }
- },
- watch: {
- }
- };
- </script>
- <style lang="scss" scoped>
- .trading-form ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-form-item__error {
- display: none !important;
- }
- ::v-deep .select-component {
- display: flex !important;
- }
- </style>
|