Ver código fonte

客户新增 根据类型树 带入树

qinbai 3 anos atrás
pai
commit
d74607423f

+ 17 - 16
src/views/basicData/basicFeesDesc/configuration/mainList.json

@@ -42,6 +42,23 @@
       ]
     },
     {
+      "label": "费用类别",
+      "prop": "feesTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },
+    {
       "label": "币别",
       "prop": "fcyno",
       "search": true,
@@ -90,22 +107,6 @@
       ]
     },
     {
-      "label": "费用类别",
-      "prop": "feesTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },{
       "label": "备注",
       "prop": "remarks",
       "index": 6,

+ 7 - 1
src/views/basicData/basicFeesDesc/index.vue

@@ -152,7 +152,13 @@ export default {
     },
     //新增子项和新增触发查询所有
     beforeOpen(done, type) {
-      console.log('1111')
+      if (["add"].includes(type)) {
+        this.option.column.forEach(e=>{
+          if(e.prop=='feesTypeId'){
+            this.$set(this.option.column,2,{...e,value:this.treeDeptId})
+          }
+        })
+      }
       if (["add", "edit"].includes(type)) {
         this.initData();
       }

+ 7 - 0
src/views/basicData/commodityType/index.vue

@@ -534,6 +534,13 @@ export default {
     },
     //新增编辑查看触发
     async beforeOpen(done, type) {
+      if (["add"].includes(type)) {
+        this.option.column.forEach(e=>{
+          if(e.prop=='goodsTypeId'){
+            this.$set(this.option.column,2,{...e,value:this.treeDeptId})
+          }
+        })
+      }
       if (["edit", "view"].includes(type)) {
         await getUser(this.form.id).then(res => {
           this.form = res.data.data;

+ 3 - 0
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -492,6 +492,9 @@ export default {
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
       });
+    }else{
+      //新增时根据左侧选中树结构给客户类别赋值
+      this.$set(this.form,"corpsTypeId", this.$route.query.treeDeptId)
     }
   },
   watch: {

+ 2 - 1
src/views/basicData/customerInformation/index.vue

@@ -93,6 +93,7 @@ export default {
     return {
       reportQuery:{},
       switchDialog: false,
+      treeDeptId:"",
       form: {},
       option: option,
       parentId: 0,
@@ -213,7 +214,7 @@ export default {
     beforeOpen(row, index) {
       this.$router.push({
         path: "/detailsPageEdit",
-        query: { id: JSON.stringify(row.id) }
+        query: { id: JSON.stringify(row.id),treeDeptId:this.treeDeptId }
       });
     },
     editOpen(row, index) {

+ 1 - 0
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -84,6 +84,7 @@
     {
       "label": "任务部门",
       "prop": "deptId",
+      "slot": true,
       "index": 11,
       "width": 100,
       "cell": true

+ 12 - 1
src/views/workManagement/main-items/detailsPage.vue

@@ -5,6 +5,9 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
+        <el-button class="el-button--small-yh add-customer-btn" type="primary"
+        >保存
+        </el-button>
       </div>
     </div>
     <div style="margin-top: 60px">
@@ -157,6 +160,9 @@
                        @selection-change="serviceSelectionChange"
                        @search-change="serviceSearchChange"
                        @on-load="serviceOnLoad">
+              <template slot-scope="" slot="deptId" >
+
+              </template>
             </avue-crud>
           </basic-container>
         </el-col>
@@ -298,7 +304,7 @@
               type:'select',
               dataType: "number",
               width: 120,
-              dicUrl: "/api/blade-system/dict/dictionary?code=payment_term",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
               props: {
                 label: "dictValue",
                 value: "dictKey"
@@ -581,4 +587,9 @@
     overflow: hidden;
     max-height: 660px;
   }
+  .add-customer-btn {
+    position: fixed;
+    right: 36px;
+    top: 115px;
+  }
 </style>

+ 1 - 1
src/views/workManagement/service-items/configuration/projectOption.json

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 12,
   "tree": true,
   "selection": true,
   "viewBtn": false,

+ 3 - 4
src/views/workManagement/service-items/project.vue

@@ -64,6 +64,7 @@ export default {
       search:{},
       treeDeptId:"",
       treeDeptName:'',
+      height: window.innerHeight - 350,
       page: {
         currentPage: 1,
         total: 0,
@@ -103,8 +104,6 @@ export default {
     getDeptTree().then(res => {
       this.findObject(this.tableOption.column, "goodsTypeId").dicData = res.data.data;
     });
-    // getDicData("payment_term").then(res =>{
-    // })
   },
   methods: {
     getList(page, params = {}) {
@@ -128,7 +127,6 @@ export default {
             this.$set(this.tableOption.column,2,{...e,value:this.treeDeptId})
           }
         })
-
       }
       if (["edit"].includes(type)) {
         detail(this.form.id).then(res => {
@@ -220,4 +218,5 @@ export default {
 };
 </script>
 
-<style></style>
+<style scoped lang="scss">
+</style>