Selaa lähdekoodia

1.修复订单基本信息渲染问题
2.新增资产-我的订单-编辑 功能
3.资产下单下拉列表渲染问题

GouGengquan 1 vuosi sitten
vanhempi
commit
f9f531f9a3

+ 4 - 0
src/api/modules/assets.js

@@ -3,6 +3,10 @@ import request from '@/utils/request'
 * 资产业务
 */
 export default {
+    // 资产业务订单基础信息详情
+    detail(params) {
+        return request.get(`assets/detail/${params}`)
+    },
     // 资产业务订单基础信息编辑
     update(params) {
         return request.put(`assets/update`, params)

+ 3 - 1
src/router/urlMap.js

@@ -123,6 +123,7 @@ import _views_finance_fund_warning from '@/views/finance/fundWarning'
 import _views_finance_settle_major from '@/views/finance/settleMajor'
 import _views_finance_major_commission_calculate from '@/views/finance/calculateMajor'
 import _views_income_mine from '@/views/income/myIncome'
+import _views_assets_edit_order from '@/views/assets/addAssetsOrder'
 
 export default {
   _views_set_menu,
@@ -234,6 +235,7 @@ export default {
   _views_finance_fund_warning,
   _views_finance_settle_major,
   _views_finance_major_commission_calculate,
-  _views_income_mine
+  _views_income_mine,
+  _views_assets_edit_order
 
 }

+ 151 - 138
src/views/assets/addAssetsOrder.vue

@@ -3,7 +3,7 @@
         <div class="title-container">
             <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
             <div class="form-container">
-                <y-detail-page-layout ref="addAssetsOrder" @save="handleCreate" :editStatus="couldEdit" @doRecall="doRecall"
+                <y-detail-page-layout ref="addAssetsOrder" @save="handleCreate" :editStatus="couldEdit"
                     :couldBack="couldBack">
                     <el-form ref="assetsForm" :model="assetsForm" :rules="assetsFormRules">
                         <div class="createMajor-main-container">
@@ -18,16 +18,15 @@
                                 </div>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="客户经理:" prop="clientManager"
-                                            :rules="assetsFormRules.clientManager" label-width="120px"
+                                        <el-form-item label="客户经理:" prop="clientManager" label-width="120px"
                                             class="postInfo-container-item">
                                             <el-input :value="assetsForm.clientManager" class="filter-item" readonly
                                                 disabled style=" width: 225px" />
                                         </el-form-item>
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="分单类型:" prop="clientManager" :rules="assetsFormRules.allotType"
-                                            label-width="120px" class="postInfo-container-item">
+                                        <el-form-item label="分单类型:" prop="clientManager" label-width="120px"
+                                            class="postInfo-container-item">
                                             <el-select v-model="assetsForm.allotType">
                                                 <el-option label="指派" value="指派"></el-option>
                                                 <el-option label="轮单" value="轮单"></el-option>
@@ -35,8 +34,7 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col v-if="assetsForm.allotType === '指派'" :xs="24" :sm="12" :lg="4" :span="6">
-                                        <el-form-item label="接单部门:" prop="departmentId"
-                                            :rules="assetsFormRules.departmentId" label-width="120px"
+                                        <el-form-item label="接单部门:" prop="departmentId" label-width="120px"
                                             class="postInfo-container-item">
                                             <el-select v-model="assetsForm.departmentId">
                                                 <el-option v-for="(d, id) in allotDepartment" :label="d.name"
@@ -47,16 +45,15 @@
                                 </el-row>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item prop="name" :rules="assetsFormRules.name" label-width="120px"
-                                            class="postInfo-container-item" label="项目名称:">
+                                        <el-form-item prop="name" label-width="120px" class="postInfo-container-item"
+                                            label="项目名称:">
                                             <el-input v-model="assetsForm.name" class="filter-item" />
                                         </el-form-item>
                                     </el-col>
                                 </el-row>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="业务类型:" prop="assetsBusinessGener"
-                                            :rules="assetsFormRules.assetsBusinessGener" label-width="120px"
+                                        <el-form-item label="业务类型:" prop="assetsBusinessGener" label-width="120px"
                                             class="postInfo-container-item">
                                             <el-select v-model="assetsForm.assetsBusinessGener" filterable
                                                 placeholder="业务类型">
@@ -66,8 +63,7 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="客户再次委托:" prop="entrustAgain"
-                                            :rules="assetsFormRules.entrustAgain" label-width="140px"
+                                        <el-form-item label="客户再次委托:" prop="entrustAgain" label-width="140px"
                                             class="postInfo-container-item">
                                             <el-radio v-model="assetsForm.entrustAgain" :label="false" border
                                                 size="medium">否</el-radio>
@@ -78,8 +74,7 @@
                                 </el-row>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="客户类型:" prop="clienteleType"
-                                            :rules="assetsFormRules.clienteleType" label-width="120px"
+                                        <el-form-item label="客户类型:" prop="clienteleType" label-width="120px"
                                             class="postInfo-container-item">
                                             <el-select v-model="assetsForm.clienteleType" placeholder="请选择"
                                                 @change="changeCustomerType(assetsForm.clienteleType)">
@@ -90,8 +85,7 @@
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
                                         <el-form-item label="客户名称:" prop="clienteleId" label-width="120px"
-                                            :rules="assetsFormRules.clienteleId" class="postInfo-container-item"
-                                            v-if="itemHideStatus">
+                                            class="postInfo-container-item" v-if="itemHideStatus">
                                             <el-select v-model="assetsForm.clienteleId" placeholder="请选择(可搜索)"
                                                 @change="findSubClientele(0)" clearable filterable>
                                                 <el-option v-for="(c, id) in customerCompany" :label="c.name"
@@ -101,8 +95,7 @@
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
                                         <el-form-item label="业务来源:" prop="clienteleSubId" label-width="120px"
-                                            :rules="assetsFormRules.clienteleSubId" class="postInfo-container-item"
-                                            v-if="itemHideStatus">
+                                            class="postInfo-container-item" v-if="itemHideStatus">
                                             <el-select v-model="assetsForm.clienteleSubId" placeholder="请选择(可搜索)"
                                                 @change="getCustomerContract" clearable filterable>
                                                 <el-option v-for="(s, id) in subCustomerCompany" :label="s.name"
@@ -113,8 +106,7 @@
                                 </el-row>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="客户联系人:" prop="clienteleContactId"
-                                            :rules="assetsFormRules.clienteleContactId" label-width="120px"
+                                        <el-form-item label="客户联系人:" prop="clienteleContactId" label-width="120px"
                                             class="postInfo-container-item">
                                             <div>
                                                 <el-select v-model="assetsForm.clienteleContactId" placeholder="请选择(可搜索)"
@@ -154,8 +146,8 @@
                                 </el-row>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="是否证券项目:" prop="security" :rules="assetsFormRules.security"
-                                            label-width="140px" class="postInfo-container-item">
+                                        <el-form-item label="是否证券项目:" prop="security" label-width="140px"
+                                            class="postInfo-container-item">
                                             <el-radio v-model="assetsForm.security" :label="false" border
                                                 size="medium">否</el-radio>
                                             <el-radio v-model="assetsForm.security" :label="true" border
@@ -164,8 +156,7 @@
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
                                         <el-form-item label="是否资产重组项目:" prop="significantAssetsReorganization"
-                                            :rules="assetsFormRules.significantAssetsReorganization" label-width="200px"
-                                            class="postInfo-container-item">
+                                            label-width="200px" class="postInfo-container-item">
                                             <el-radio v-model="assetsForm.significantAssetsReorganization" :label="false"
                                                 border size="medium">否</el-radio>
                                             <el-radio v-model="assetsForm.significantAssetsReorganization" :label="true"
@@ -173,8 +164,7 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label=" 是否国资项目:" prop="stateAssets"
-                                            :rules="assetsFormRules.stateAssets" label-width="140px"
+                                        <el-form-item label=" 是否国资项目:" prop="stateAssets" label-width="140px"
                                             class="postInfo-container-item">
                                             <el-radio v-model="assetsForm.stateAssets" :label="false" border
                                                 size="medium">否</el-radio>
@@ -183,8 +173,7 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="是否涉及境外资产:" prop="foreignAssetsInvolved"
-                                            :rules="assetsFormRules.foreignAssetsInvolved" label-width="200px"
+                                        <el-form-item label="是否涉及境外资产:" prop="foreignAssetsInvolved" label-width="200px"
                                             class="postInfo-container-item">
                                             <el-radio v-model="assetsForm.foreignAssetsInvolved" :label="false" border
                                                 size="medium">否</el-radio>
@@ -193,8 +182,7 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="是否分配产值:" prop="dispenseBenefit"
-                                            :rules="assetsFormRules.dispenseBenefit" label-width="140px"
+                                        <el-form-item label="是否分配产值:" prop="dispenseBenefit" label-width="140px"
                                             class="postInfo-container-item">
                                             <el-radio v-model="assetsForm.dispenseBenefit" :label="false" border
                                                 size="medium">否</el-radio>
@@ -235,10 +223,10 @@
                                 </el-row>
                                 <el-row class="row-style">
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="终端客户类型:" prop="terminalClienteleType"
-                                            :rules="assetsFormRules.terminalClienteleType" label-width="140px"
+                                        <el-form-item label="终端客户类型:" prop="terminalClienteleType" label-width="140px"
                                             class="postInfo-container-item">
-                                            <el-select v-model="assetsForm.terminalClienteleType" placeholder="请选择"
+                                            <el-select @change="changeTCustomerType(assetsForm.terminalClienteleType)"
+                                                v-model="assetsForm.terminalClienteleType" placeholder="请选择"
                                                 style="width:205px">
                                                 <el-option label="企业" value="企业"></el-option>
                                                 <el-option label="个人" value="个人"></el-option>
@@ -248,7 +236,7 @@
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6"
                                         v-if="assetsForm.terminalClienteleType === '企业'">
                                         <el-form-item label="终端客户名称:" prop="terminalClienteleId" label-width="140px"
-                                            :rules="assetsFormRules.terminalClienteleId" class="postInfo-container-item">
+                                            class="postInfo-container-item">
                                             <div v-if="couldEdit">
                                                 <el-select v-model="assetsForm.terminalClienteleId" placeholder="请选择(可搜索)"
                                                     @change="findSubClientele(1)" clearable filterable style="width:80%">
@@ -268,11 +256,10 @@
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6"
                                         v-if="assetsForm.terminalClienteleType === '个人'">
                                         <el-form-item label="终端联系人:" prop="terminalClienteleContactId" label-width="120px"
-                                            :rules="assetsFormRules.terminalClienteleContactId"
                                             class="postInfo-container-item">
                                             <div v-if="couldEdit">
                                                 <el-select v-model="assetsForm.terminalClienteleContactId"
-                                                    placeholder="请选择(可搜索)" clearable filterable @change="getTcontactInfo"
+                                                    placeholder="请选择(可搜索)" clearable filterable @change="getTcontactInfo()"
                                                     style="width:80%">
                                                     <el-option v-for="(c, id) in tCustomerContract" :label="c.name"
                                                         :value="c.id"></el-option>
@@ -288,7 +275,7 @@
                                         </el-form-item>
                                     </el-col>
                                     <el-col :xs="24" :sm="12" :lg="6" :span="6">
-                                        <el-form-item label="终端联系电话:" prop="clienteleType" label-width="150px"
+                                        <el-form-item label="终端联系电话:" prop="tmobile" label-width="150px"
                                             class="postInfo-container-item">
                                             <el-input :value="assetsForm.tmobile" class="filter-item" readonly disabled
                                                 style=" width: 215px" />
@@ -678,6 +665,7 @@ export default {
             tCustomerContract: [],
             // 资产业务订单
             assetsForm: {
+                id: null,
                 // 项目名
                 name: null,
                 // 客户经理id
@@ -790,8 +778,8 @@ export default {
             this.pageParams.row = JSON.parse(this.$route.query.row);
         }
         this.getAllotDepartment();
-        this.getCustomerCompany(0);
-        this.getCustomerCompany(1);
+        // this.getCustomerCompany(0);
+        // this.getCustomerCompany(1);
         if (this.pageParams.row !== null) {
             if (this.pageParams.row.assetsId !== null && this.pageParams.row.assetsId !== undefined && this.pageParams.row.assetsId !== '') {
                 this.getAssetsDetailById(this.pageParams.row.assetsId);
@@ -802,40 +790,11 @@ export default {
         handleCreate() {
             this.$refs.assetsForm.validate(valid => {
                 if (valid) {
-                    this.$api.assets.add(this.assetsForm).then(res => {
-                        if (res.code === 200) {
-                            if (res.data && res.data.instanceNodeId && res.data.state) {
-                                this.$api.workflow.commit(res.data).then(result => {
-                                    if (result.code === 200 && result.data) {
-                                        this.$notify({
-                                            title: '成功',
-                                            message: '下单并提交流程成功',
-                                            type: 'success',
-                                            duration: 2000
-                                        });
-                                    }
-                                })
-                            } else {
-                                this.$notify({
-                                    title: '成功',
-                                    message: '下单成功,需要手动提交流程。',
-                                    type: 'warning',
-                                    duration: 2000
-                                });
-                            }
-                            const back = this.$route.query.back;
-                            if (back) {
-                                this.$router.push(back)
-                            }
-                        } else {
-                            this.$notify({
-                                title: '失败',
-                                message: '下单失败,请稍后再试。',
-                                type: 'error',
-                                duration: 2000
-                            });
-                        }
-                    })
+                    if (this.assetsForm.id) {
+                        this.updateOrder();
+                    } else {
+                        this.addOrder();
+                    }
                 }
             })
         },
@@ -847,38 +806,6 @@ export default {
                 }
             })
         },
-        // 撤回订单
-        doRecall() {
-            this.$confirm('请确认是否撤回此个贷订单的业务流程?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning',
-                center: true
-            }).then(() => {
-                if (this.assetsForm.id) {
-                    this.$api.assetsForm.doRecall(this.assetsForm.id).then(res => {
-                        if (res.code === 200 && res.data) {
-                            this.$notify({
-                                title: '成功',
-                                message: '业务流程撤回成功',
-                                type: 'success',
-                                duration: 2000
-                            });
-                            this.$refs.myPersonalOrder.initPageStatus(true, true);
-                            this.couldEdit = true;
-                            //this.$refs.myPersonalOrder.forceUpdate();
-                        } else {
-                            this.$notify({
-                                title: '失败',
-                                message: '业务流程撤回失败',
-                                type: 'error',
-                                duration: 2000
-                            });
-                        }
-                    })
-                }
-            })
-        },
         // 改变客户类型时进行值重置的操作
         changeCustomerType(val) {
             // 清空联系人下拉列表
@@ -893,6 +820,19 @@ export default {
                 this.itemHideStatus = false;
             }
         },
+        // 改变客户类型时进行值重置的操作
+        changeTCustomerType(val) {
+            // 清空联系人下拉列表
+            // this.assetsForm.terminalClienteleContactId = null;
+            // this.assetsForm.terminalClienteleId = null;
+            this.assetsForm.tmobile = null;
+            this.customerContract = [];
+            if (val === "企业") {
+                this.getCustomerCompany(1);
+            } else {
+                this.getTerminalContactInfo(1);
+            }
+        },
         // 获取客户信息
         getCustomerCompany(val) {
             if (val === 0) {
@@ -935,9 +875,9 @@ export default {
                 }
             } else {
                 if (this.assetsForm.terminalClienteleId) {
-                    let simpleAll = new Object();
-                    simpleAll.terminal = val;
-                    simpleAll.ccId = this.assetsForm.terminalClienteleId;
+                    // let simpleAll = new Object();
+                    // simpleAll.terminal = val;
+                    // simpleAll.ccId = this.assetsForm.terminalClienteleId;
                     this.$api.customerCompany.detail(this.assetsForm.terminalClienteleId).then(res => {
                         if (res.code === 200) {
                             this.assetsForm.tmobile = res.data.phone;
@@ -959,9 +899,9 @@ export default {
             this.$api.customerLinkman.simpleAll(simpleAll).then(res => {
                 if (res.code === 200) {
                     this.customerContract = res.data;
-                    if (this.assetsForm.clienteleContactId) {
-                        this.assetsForm.clienteleContactId = null
-                    }
+                    // if (this.assetsForm.clienteleContactId) {
+                    // this.assetsForm.clienteleContactId = null
+                    // }
                 }
             })
             // }
@@ -1019,7 +959,6 @@ export default {
             if (this.assetsForm.clienteleContactId) {
                 this.$api.customerLinkman.detail(this.assetsForm.clienteleContactId).then(res => {
                     if (res.code === 200) {
-                        console.log(res.data)
                         this.linkmanInfo = res.data;
                     }
                 })
@@ -1082,14 +1021,7 @@ export default {
                                 duration: 2000
                             });
                         }
-                        let simpleAll = new Object();
-                        simpleAll.ccId = 1;
-                        simpleAll.terminal = 1;
-                        this.$api.customerLinkman.simpleAll(simpleAll).then(res => {
-                            if (res.code === 200) {
-                                this.tCustomerContract = res.data;
-                            }
-                        })
+                        this.getTerminalContactInfo();
                         setTimeout(() => {
                             this.assetsForm.terminalClienteleContactId = this.tCustomerContract[0].id;
                             this.getTcontactInfo();
@@ -1103,25 +1035,45 @@ export default {
         getAssetsDetailById(id) {
             this.$api.assets.getAssetsDetailById(id).then(res => {
                 if (res.code === 200) {
-                    this.assetsForm.clientManagerId = this.$store.getters.userInfo.id;
-                    this.assetsForm.clientManager = this.$store.getters.userInfo.name;
-                    this.assetsForm.name = res.data.name;
-                    this.assetsForm.departmentId = res.data.departmentId;
-                    this.assetsForm.assetsBusinessGener = res.data.assetsBusinessGener;
-                    this.assetsForm.entrustAgain = res.data.entrustAgain;
-                    this.assetsForm.security = res.data.security;
-                    this.assetsForm.significantAssetsReorganization = res.data.significantAssetsReorganization;
-                    this.assetsForm.stateAssets = res.data.stateAssets;
-                    this.assetsForm.foreignAssetsInvolved = res.data.foreignAssetsInvolved;
-                    this.assetsForm.dispenseBenefit = res.data.dispenseBenefit;
-                    this.assetsForm.remark = res.data.remark;
-                    this.initCustomerSelect(this.assetsForm.clienteleType);
-                    this.getPrincipalByAllotDepartment();
-                    this.getAllUser();
-                    this.getCustomerCompany(1);
+                    this.assetsForm = res.data;
+                    this.assetsForm.clientManagerId=this.$store.getters.userInfo.id;
+                    this.assetsForm.clientManager=this.$store.getters.userInfo.name;
+                    if (this.assetsForm.clienteleType === "企业") {
+                        this.getCustomerCompany(0);
+                        this.itemHideStatus = true;
+                    } else {
+                        this.getCustomerContract(1);
+                        this.itemHideStatus = false;
+                    }
+                    if (this.assetsForm.clienteleId) {
+                        let simpleAll = new Object();
+                        simpleAll.terminal = 0;
+                        simpleAll.parentId = this.assetsForm.clienteleId;
+                        this.$api.customerCompany.simpleAll(simpleAll).then(res => {
+                            if (res.code === 200) {
+                                this.subCustomerCompany = res.data;
+                                this.getCustomerContract();
+                            }
+                        })
+                    }
+                    this.getContactInfo();
+                    this.changeTCustomerType(this.assetsForm.terminalClienteleType);
+                    if (this.assetsForm.terminalClienteleId) {
+                        this.$api.customerCompany.detail(this.assetsForm.terminalClienteleId).then(res => {
+                            if (res.code === 200) {
+                                this.assetsForm.tmobile = res.data.phone;
+                            }
+                        })
+                    }
+                    if (this.assetsForm.terminalClienteleContactId) {
+                        this.$api.customerLinkman.detail(this.assetsForm.terminalClienteleContactId).then(res => {
+                            if (res.code === 200) {
+                                this.assetsForm.tmobile = res.data.mobile;
+                            }
+                        })
+                    }
                 }
             })
-            console.log(this.assetsForm);
         },
         initCustomerSelect(val) {
             if (val === "企业") {
@@ -1151,6 +1103,67 @@ export default {
                     this.allUsers = res.data;
                 }
             })
+        },
+        // 获取终端用户下拉列表
+        getTerminalContactInfo() {
+            let simpleAll = new Object();
+            simpleAll.ccId = 1;
+            simpleAll.terminal = 1;
+            this.$api.customerLinkman.simpleAll(simpleAll).then(res => {
+                if (res.code === 200) {
+                    this.tCustomerContract = res.data;
+                }
+            })
+        },
+        // 新增订单
+        addOrder() {
+            this.$api.assets.add(this.assetsForm).then(res => {
+                if (res.code === 200) {
+                    if (res.data && res.data.instanceNodeId && res.data.state) {
+                        this.$api.workflow.commit(res.data).then(result => {
+                            if (result.code === 200 && result.data) {
+                                this.$notify({
+                                    title: '成功',
+                                    message: '下单并提交流程成功',
+                                    type: 'success',
+                                    duration: 2000
+                                });
+                            }
+                        })
+                    } else {
+                        this.$notify({
+                            title: '成功',
+                            message: '下单成功,需要手动提交流程。',
+                            type: 'warning',
+                            duration: 2000
+                        });
+                    }
+                    const back = this.$route.query.back;
+                    if (back) {
+                        this.$router.push(back)
+                    }
+                } else {
+                    this.$notify({
+                        title: '失败',
+                        message: '下单失败,请稍后再试。',
+                        type: 'error',
+                        duration: 2000
+                    });
+                }
+            })
+        },
+        // 更新订单
+        updateOrder() {
+            this.$api.assets.update(this.assetsForm).then(res => {
+                if (res.code === 200) {
+                    this.$notify({
+                        title: '成功',
+                        message: '订单更新成功',
+                        type: 'success',
+                        duration: 2000
+                    });
+                }
+            })
         }
 
     }

+ 15 - 0
src/views/assets/myOrderList.vue

@@ -153,6 +153,9 @@
                             <el-button type="success" size="mini" @click="orderDetail(row)">
                                 查看
                             </el-button>
+                            <el-button type="danger" size="mini" @click="editOrder(row)">
+                                编辑
+                            </el-button>
                             <el-button type="primary" size="mini" @click="openShouldAmountDialog(row)">
                                 订单应收款
                             </el-button>
@@ -813,6 +816,18 @@ export default {
                     });
                 }
             })
+        },
+        editOrder(row){
+            this.$router.push({
+                path: "/assets/editOrder",
+                query: {
+                    row: JSON.stringify(row),
+                    back: '/assets/myOrderList',
+                    couldEdit: true,
+                    couldBack: true,
+                    disabledStatus: false
+                }
+            })
         }
     }
 }

+ 62 - 20
src/views/assets/orderDetail.vue

@@ -23,9 +23,8 @@
         v-if="currentNode.nodeCode === 'PRODUCT_CHOICE' || currentNode.nodeCode === 'REPORT_CHOICE'" type="danger" round>
         选择产品
       </el-button>
-      <el-button @click="openAssetsAchievementRatioDialog()"
-        v-if="currentNode.nodeCode === 'CHECK_ARCHIVING'" type="danger"
-        round>
+      <el-button @click="openAssetsAchievementRatioDialog()" v-if="currentNode.nodeCode === 'CHECK_ARCHIVING'"
+        type="danger" round>
         <span v-if="currentNode.nodeCode === 'RECHECK_ARCHIVING'">复审部</span>归档审核
       </el-button>
       <el-button v-if="nodeBusinessInfo.currentNodePermission.commit" class="y-save" type="success" round
@@ -132,9 +131,10 @@
                       class="postInfo-container-item">
                       <div>
                         <el-select v-model="assetsForm.clienteleContactId" placeholder="请选择(可搜索)" clearable filterable
-                          @change="" style="width:60%">
-                          <el-option v-for="(c, id) in customerContract" :label="c.name" :value="c.id"
-                            :key="c.id"></el-option>
+                          @change="getContactInfo();" style="width:60%">
+                          <!-- <el-option v-for="(c, id) in customerContract" :label="c.name" :value="c.id"
+                            :key="c.id"></el-option> -->
+                          <el-option :label="linkmanInfo.name" :value="linkmanInfo.id" :key="linkmanInfo.id"></el-option>
                         </el-select>
                         <!-- <el-tooltip class="item" effect="dark" content="没有联系人?点击新增" placement="top-end">
                           <span style="margin-left:5%;color:RGB(64,158,255);cursor:pointer"
@@ -237,19 +237,21 @@
                   <el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="assetsForm.terminalClienteleType === '企业'">
                     <el-form-item label="终端客户名称:" prop="terminalClienteleId" label-width="140px"
                       class="postInfo-container-item">
-                      <div v-if="couldEdit">
+                      <!-- <div v-if="couldEdit"> -->
                         <el-select v-model="assetsForm.terminalClienteleId" placeholder="请选择(可搜索)"
                           @change="findSubClientele(1)" clearable filterable style="width:80%">
-                          <el-option v-for="(c, id) in tCustomerCompany" :label="c.name" :value="c.id"
-                            :key="c.id"></el-option>
+                          <!-- <el-option v-for="(c, id) in tCustomerCompany" :label="c.name" :value="c.id"
+                            :key="c.id"></el-option> -->
+                            <el-option  :label="tCustomerInfo.name" :value="tCustomerInfo.id"
+                            :key="tCustomerInfo.id"></el-option>
                         </el-select>
                         <!-- <el-tooltip class="item" effect="dark" content="没有终端客户?点击新增" placement="top-end">
                           <span style="margin-left:5%;color:RGB(64,158,255);cursor:pointer"
                             @click="createTerminalClient()">新增</span>
                         </el-tooltip> -->
-                      </div>
-                      <el-input :value="assetsForm.tterminalClienteleName" class="filter-item" style=" width: 225px"
-                        v-else />
+                      <!-- </div> -->
+                      <!-- <el-input :value="assetsForm.tterminalClienteleName" class="filter-item" style=" width: 225px"
+                        v-else /> -->
                     </el-form-item>
                   </el-col>
                   <el-col :xs="24" :sm="12" :lg="6" :span="6" v-if="assetsForm.terminalClienteleType === '个人'">
@@ -258,8 +260,10 @@
                       <div v-if="couldEdit">
                         <el-select v-model="assetsForm.terminalClienteleContactId" placeholder="请选择(可搜索)" clearable
                           filterable @change="" style="width:80%">
-                          <el-option v-for="(c, id) in tCustomerContract" :label="c.name" :value="c.id"
-                            :key="c.id"></el-option>
+                          <!-- <el-option v-for="(c, id) in tCustomerContract" :label="c.name" :value="c.id"
+                            :key="c.id"></el-option> -->
+                            <el-option  :label="tLinkmanInfo.name" :value="tLinkmanInfo.id"
+                            :key="tLinkmanInfo.id"></el-option>
                         </el-select>
                         <!-- <el-tooltip class="item" effect="dark" content="没有联系人?点击新增" placement="top-end">
                           <span style="margin-left:5%;color:RGB(64,158,255);cursor:pointer"
@@ -273,8 +277,7 @@
                   <el-col :xs="24" :sm="12" :lg="6" :span="6">
                     <el-form-item label="终端联系电话:" prop="clienteleType" label-width="150px"
                       class="postInfo-container-item">
-                      <el-input :value="assetsForm.tlinkmanMobile" class="filter-item" readonly disabled
-                        style=" width: 215px" />
+                      <el-input :value="assetsForm.tmobile" class="filter-item" readonly disabled style=" width: 215px" />
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -592,7 +595,8 @@
               <el-table-column type="expand">
                 <template slot-scope="props">
                   <el-form label-position="left">
-                    <el-tag style="margin-left: 20px;" effect="plain" size="medium" disable-transitions><span style="font-size:16px">基本信息</span></el-tag>
+                    <el-tag style="margin-left: 20px;" effect="plain" size="medium" disable-transitions><span
+                        style="font-size:16px">基本信息</span></el-tag>
                     <el-row class="row-style">
                       <el-col :xs="24" :sm="6" :lg="3" :span="3" class="postInfo-container-item">
                         <el-form-item label-width="150px" label="委托方名称:">
@@ -668,7 +672,8 @@
                         </el-form-item>
                       </el-col>
                     </el-row>
-                    <el-tag style="margin-left: 20px;" effect="plain" size="medium" disable-transitions><span style="font-size:16px">库存状态</span></el-tag>
+                    <el-tag style="margin-left: 20px;" effect="plain" size="medium" disable-transitions><span
+                        style="font-size:16px">库存状态</span></el-tag>
                     <el-steps :active="props.row.repertoryState == null ? 0 : (props.row.repertoryState ? 2 : 1)"
                       process-status="success" finish-status="success" simple style="margin: 10px 1% 20px 40px">
                       <el-step title="未入库"></el-step>
@@ -1566,6 +1571,14 @@ export default {
       linkmanInfo: {
 
       },
+      // 终端联系人信息
+      tLinkmanInfo: {
+
+      },
+      // 终端客户信息
+      tCustomerInfo: {
+
+      },
       // 
       pageParams: {
         back: null,
@@ -1913,9 +1926,11 @@ export default {
           this.assetsForm.members = JSON.parse(res.data.members);
           this.initCustomerSelect(this.assetsForm.clienteleType);
           this.getPrincipalByAllotDepartment();
+          this.getContactInfo();
           this.getAllUser();
         }
       })
+      console.log(this.assetsForm);
     },
     handleChange() {
 
@@ -2055,10 +2070,10 @@ export default {
     initCustomerSelect(val) {
       if (val === "企业") {
         this.getCustomerCompany(0);
-        this.getCustomerContract();
+        // this.getCustomerContract();
         this.itemHideStatus = true;
       } else {
-        this.getCustomerContract(1);
+        // this.getCustomerContract(1);
         this.itemHideStatus = false;
       }
     },
@@ -3309,6 +3324,33 @@ export default {
           duration: 3000
         });
       }
+    },
+    // 获取联系信息
+    getContactInfo() {
+      if (this.assetsForm.clienteleContactId) {
+        this.$api.customerLinkman.detail(this.assetsForm.clienteleContactId).then(res => {
+          if (res.code === 200) {
+            this.linkmanInfo = res.data;
+          }
+        })
+      }
+      if (this.assetsForm.terminalClienteleContactId) {
+        this.$api.customerLinkman.detail(this.assetsForm.terminalClienteleContactId).then(res => {
+          if (res.code === 200) {
+            this.tLinkmanInfo = res.data;mobile
+            this.assetsForm.tmobile = this.tLinkmanInfo.mobile;
+            console.log(this.tLinkmanInfo);
+          }
+        })
+      }
+      if (this.assetsForm.terminalClienteleId) {
+        this.$api.customerCompany.detail(this.assetsForm.terminalClienteleId).then(res => {
+          if (res.code === 200) {
+            this.tCustomerInfo = res.data;
+            this.assetsForm.tmobile = this.tCustomerInfo.phone;
+          }
+        })
+      }
     }
   }