whj 1 rok pred
rodič
commit
c7e21b2035

+ 2 - 0
src/utils/dict.js

@@ -126,6 +126,8 @@ DictCache.TYPE = {
   SB_CHECK_FORM_STATUS: 'SB_CHECK_FORM_STATUS', // 验收状态
   OUT_STORE_FORM_TYPE: 'OUT_STORE_FORM_TYPE', // 出库类型
   OUT_STORE_FORM_DEPT_CODE: 'OUT_STORE_FORM_DEPT_CODE', // 用友对应的部门code
+  SBB: 'SBB', // 用友设备部下面对应的部门code
+
   FEE_FORM_TYPE: 'FEE_FORM_TYPE', // 成本归属
   OUT_STORE_FORM_STATUS: 'OUT_STORE_FORM_STATUS', // 出库状态
   SPARE_PICK_FORM_TYPE: 'SPARE_PICK_FORM_TYPE', // 领用类型,

+ 19 - 4
src/views/store/outstoreform/modules/BaseFormYY.vue

@@ -57,14 +57,22 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select @change="typeChange" v-decorator="['applyDept', {initValue: 1, rules: [{required: true, message: '申请部门不能为空'}]}]" placeholder="请选择">
+            <a-tree-select
+              style="width: 100%"
+              :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+              :treeData="deptYYMap"
+              v-decorator="['applyDept', {initValue: '09', rules: [{required: true, message: '申请部门不能为空'}]}]"
+              placeholder="请选择"
+            >
+            </a-tree-select>
+            <!-- <a-select @change="typeChange" v-decorator="['applyDept', {initValue: 1, rules: [{required: true, message: '申请部门不能为空'}]}]" placeholder="请选择">
               <a-select-option
-                v-for="(label,value) in deptYYMap"
+                v-for="({label,value}) in deptYYMap"
                 :key="value"
                 :label="label"
                 :value="value">{{ label }}
               </a-select-option>
-            </a-select>
+            </a-select> -->
           </a-form-item>
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
@@ -369,7 +377,14 @@ export default {
     // 下拉框map
     this.getSbPositions()
     this.feeFromMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FEE_FORM_TYPE)
-    this.deptYYMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE)
+    this.deptYYMap = this.DictCache.getChildrenList(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE).map(item => {
+      if (item.code === 'SBB') {
+        item.children = this.DictCache.getChildrenList(this.DictCache.TYPE.SBB)
+      }
+      return item
+    })
+
+    console.log(1, this.deptYYMap, 1)
     // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
   },
   methods: {