Explorar o código

管理部门下拉等菜单,及部分bug

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing %!s(int64=6) %!d(string=hai) anos
pai
achega
6be2cf23e3

+ 1 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1406,6 +1406,7 @@ func (this *OilSupplierController) GetDictListByStatus() {
 	orgsvc := organize.GetOrganizeService(utils.DBE)
 	svc := supplier.GetOilSupplierService(utils.DBE)
 	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	dictList["ManagementUnit"] = dictSvc.GetKeyValueItems("ManagementUnit")
 	dictList["UnitRelation"] = dictSvc.GetKeyValueItems("UnitRelation")
 	dictList["CompanyType"] = dictSvc.GetKeyValueItems("CompanyType")
 	dictList["InOptions"] = dictSvc.GetKeyValueItems("InOptions")

+ 24 - 5
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue

@@ -37,7 +37,7 @@
 
         <el-col :span="8">
           <el-form-item label="单位关系">
-            <el-select ref="SpecType" v-model="formData.SpecTypeCode" :disabled="!canUpdateSupplier"
+            <el-select ref="SpecType" v-model="formData.SpecTypeCode" @change="currentSel" :disabled="!canUpdateSupplier"
                        placeholder="请选择" style="width: 100%">
               <el-option v-for="item in UnitRelationOptions" :key="item.Id" :label="item.Key"
                          :value="item.Value">
@@ -65,9 +65,9 @@
 
         <el-col :span="8">
           <el-form-item label="准入方式">
-            <el-select ref="SpecType" v-model="formData.InStyle" :disabled="!canUpdateSupplier"
+            <el-select  ref="inStyle" v-model="formData.InStyle" :disabled="!canUpdateSupplier"
                        placeholder="请选择" style="width: 100%">
-              <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key"
+              <el-option  v-for="item in InOptions" :key="item.Id" :label="item.Key"
                          :value="item.Value">
               </el-option>
             </el-select>
@@ -76,8 +76,11 @@
 
          <el-col :span="8">
           <el-form-item label="管理单位" >
-            <el-input v-model="formData.ManagementUnit" maxlength="255" :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%">
-            </el-input>
+            <el-select filterable v-model="formData.MgrUnit" maxlength="255" :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%">
+            <el-option  v-for="item in ManagementUnitOptions" :key="item.Id" :label="item.Key"
+                         :value="item.Value">
+              </el-option>
+            </el-select>
           </el-form-item>
         </el-col>
 
@@ -556,6 +559,7 @@
         }],
         companyReadonly: false,
         companynames: [],
+        ManagementUnitOptions:[],
         UnitRelationOptions: [],
         InOptions: [],
         CompanyTypeOptions: [],
@@ -710,6 +714,20 @@
       }
     },
     methods: {
+      currentSel(event){
+        if (event==2){
+          this.formData.InStyle='5'
+          // for(let item of this.$refs.inStyle.options) {
+          //   if(item.value=='5'){
+          //       console.log(item.style)
+          //   }else{
+          //      //隐藏
+          //   }
+          // }
+          }else{
+            this.formData.InStyle='1'
+            }
+      },
 
       showorhid(val){
           console.log(val)
@@ -780,6 +798,7 @@
 
       getDictOptions () {
         if (this.dictData) {
+          this.ManagementUnitOptions=this.dictData['ManagementUnit']
           this.UnitRelationOptions = this.dictData['UnitRelation']
           this.InOptions = this.dictData['InOptions']
           this.CompanyTypeOptions = this.dictData['CompanyType']