Bladeren bron

修改平安期货 仓库信息

huangbin 4 jaren geleden
bovenliggende
commit
b9be2b8fc4

+ 186 - 135
src/views/information/warehouse-info/compoments/add/index.vue

@@ -1,139 +1,187 @@
 <template>
-    <!-- 新增仓库信息 -->
-    <a-modal
-        class="add-warehouse commonModal"
-        title="新增仓库信息"
-        v-model:visible="visible"
-        centered
-        :maskClosable="false"
-        @cancel="cancel"
-        width="890px"
-    >
-        <template #footer>
-            <a-button key="submit" type="primary" :loading="loading" @click="cancel">取消</a-button>
-            <a-button key="submit" type="primary" :loading="loading" @click="submit">完成</a-button>
-        </template>
-        <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
-            <a-row :gutter="24">
-                <a-col :span="12">
-                    <a-form-item label="仓库类型" name="warehousetype">
-                        <a-select
-                            class="typeSelect"
-                            style="width: 200px"
-                            v-model:value="formState.warehousetype"
-                            placeholder="请选择仓库类型"
-                        >
-                            <a-select-option
-                                v-for="item in warehouseType"
-                                :key="item.enumitemname"
-                                :value="item.enumitemname"
-                            >{{item.enumdicname}}</a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <a-col :span="12">
-                    <a-form-item label="仓库名称" name="warehousename">
-                        <a-input
-                            class="dialogInput"
-                            style="width: 200px"
-                            v-model:value="formState.warehousename"
-                            placeholder="请输入仓库名称"
-                        />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col :span="12">
-                    <a-form-item label="仓库简称" name="warehousecode">
-                        <a-input
-                            class="dialogInput"
-                            style="width: 200px"
-                            v-model:value="formState.warehousecode"
-                            placeholder="请输入仓库简称"
-                        />
-                    </a-form-item>
-                </a-col>
-                <a-col :span="12">
-                    <a-form-item label="联系人" name="contactname">
-                        <a-input
-                            class="dialogInput"
-                            style="width: 200px"
-                            v-model:value="formState.contactname"
-                            placeholder="请输入联系人"
-                        />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col :span="24">
-                    <a-form-item label="联系电话" name="contactnum">
-                        <a-input
-                            class="dialogInput"
-                            style="width: 200px"
-                            v-model:value="formState.contactnum"
-                            placeholder="请输入联系电话"
-                        />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col :span="24">
-                    <a-form-item label="所在地区">
-                        <a-select
-                            class="inlineFormSelect"
-                            style="width: 205px"
-                            v-model:value="formState.provinceid"
-                            @change="getCityList"
-                            placeholder="请选择省"
-                        >
-                            <a-select-option
-                                v-for="item in provinceList"
-                                :key="item.autoid"
-                                :value="item.autoid"
-                            >{{item.divisionname}}</a-select-option>
-                        </a-select>
-                        <a-select
-                            class="inlineFormSelect ml9"
-                            style="width: 205px"
-                            v-model:value="formState.cityid"
-                            @change="getDistrictList"
-                            placeholder="请选择市"
-                        >
-                            <a-select-option
-                                v-for="item in cityList"
-                                :key="item.autoid"
-                                :value="item.autoid"
-                            >{{item.divisionname}}</a-select-option>
-                        </a-select>
-                        <a-select
-                            class="inlineFormSelect ml9"
-                            v-model:value="formState.districtid"
-                            style="width: 205px"
-                            placeholder="请选择县(区)"
-                        >
-                            <a-select-option
-                                v-for="item in districtList"
-                                :key="item.autoid"
-                                :value="item.autoid"
-                            >{{item.divisionname}}</a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col :span="24">
-                    <a-form-item label="详细地址" name="address">
-                        <a-input
-                            class="dialogInput"
-                            v-model:value="formState.address"
-                            style="width: 635px"
-                            placeholder="请输入详细地址"
-                        />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-        </a-form>
-    </a-modal>
+  <!-- 平安 新增仓库信息 -->
+  <a-modal v-if="isOemByEnum(OemType.pingan)"
+           class="add-warehouse commonModal"
+           title="新增仓库信息"
+           v-model:visible="visible"
+           centered
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消</a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="仓库类型"
+                       name="warehousetype">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.warehousetype"
+                      placeholder="请选择仓库类型">
+              <a-select-option v-for="item in warehouseType"
+                               :key="item.enumitemname"
+                               :value="item.enumitemname">{{item.enumdicname}}</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="仓库名称"
+                       name="warehousename">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.warehousename"
+                     placeholder="请输入仓库名称" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="仓库简称"
+                       name="warehousecode">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.warehousecode"
+                     placeholder="请输入仓库简称" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+  <!-- 其他项目 新增仓库信息 -->
+  <a-modal v-else
+           class="add-warehouse commonModal"
+           title="新增仓库信息"
+           v-model:visible="visible"
+           centered
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消</a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="仓库类型"
+                       name="warehousetype">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.warehousetype"
+                      placeholder="请选择仓库类型">
+              <a-select-option v-for="item in warehouseType"
+                               :key="item.enumitemname"
+                               :value="item.enumitemname">{{item.enumdicname}}</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="仓库名称"
+                       name="warehousename">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.warehousename"
+                     placeholder="请输入仓库名称" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="仓库简称"
+                       name="warehousecode">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.warehousecode"
+                     placeholder="请输入仓库简称" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="联系人"
+                       name="contactname">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.contactname"
+                     placeholder="请输入联系人" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="联系电话"
+                       name="contactnum">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.contactnum"
+                     placeholder="请输入联系电话" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="所在地区">
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      v-model:value="formState.provinceid"
+                      @change="getCityList"
+                      placeholder="请选择省">
+              <a-select-option v-for="item in provinceList"
+                               :key="item.autoid"
+                               :value="item.autoid">{{item.divisionname}}</a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect ml9"
+                      style="width: 205px"
+                      v-model:value="formState.cityid"
+                      @change="getDistrictList"
+                      placeholder="请选择市">
+              <a-select-option v-for="item in cityList"
+                               :key="item.autoid"
+                               :value="item.autoid">{{item.divisionname}}</a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect ml9"
+                      v-model:value="formState.districtid"
+                      style="width: 205px"
+                      placeholder="请选择县(区)">
+              <a-select-option v-for="item in districtList"
+                               :key="item.autoid"
+                               :value="item.autoid">{{item.divisionname}}</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="详细地址"
+                       name="address">
+            <a-input class="dialogInput"
+                     v-model:value="formState.address"
+                     style="width: 635px"
+                     placeholder="请输入详细地址" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -149,6 +197,7 @@ import { getWarehouseTypeEnumList } from '@/common/constants/enumsList';
 import { addWarehouseApply } from '@/services/proto/warehouse';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { validateAction } from '@/common/setup/form';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'warehouse_info_btn_add',
@@ -201,6 +250,8 @@ export default defineComponent({
             formState,
             rules,
             warehouseType,
+            isOemByEnum,
+            OemType,
         };
     },
 });

+ 31 - 24
src/views/information/warehouse-info/compoments/detail/index.vue

@@ -35,35 +35,39 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="状态">
             <span class="white">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</span>
           </a-form-item>
         </a-col>
+
       </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="所在地区">
-            <span class="white">{{ getProvinceName(selectedRow.provinceid) + getCityName(selectedRow.cityid) + getDistrictName(selectedRow.districtid) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="详细地址">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
+      <template v-if="!isOemByEnum(OemType.pingan)">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="联系电话">
+              <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人">
+              <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="所在地区">
+              <span
+                    class="white">{{ getProvinceName(selectedRow.provinceid) + getCityName(selectedRow.cityid) + getDistrictName(selectedRow.districtid) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="详细地址">
+              <span class="white">{{ formatValue(selectedRow.address) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </template>
     </a-form>
   </a-modal>
 </template>
@@ -76,6 +80,7 @@ import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface
 import { gerWareHouseStatusName, getAddressInfo, getWareHouseTypeName } from '@/views/information/warehouse-info/setup';
 import { formatValue } from '@/common/methods';
 import { getAddress } from '@/services/go/adress';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'warehouse_info_btn-detail',
@@ -107,6 +112,8 @@ export default defineComponent({
             getProvinceName,
             getCityName,
             getDistrictName,
+            isOemByEnum,
+            OemType,
         };
     },
 });

+ 32 - 25
src/views/information/warehouse-info/compoments/disable/index.vue

@@ -29,7 +29,7 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="仓库名称">
-            <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+            <span class="white">{{ formatValue(selectedRow.warehousename)}}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -40,35 +40,39 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="状态">
             <span class="white">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</span>
           </a-form-item>
         </a-col>
+
       </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="所在地区">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="详细地址">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
+      <template v-if="!isOemByEnum(OemType.pingan)">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="联系电话">
+              <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人">
+              <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="所在地区">
+              <span
+                    class="white">{{ getProvinceName(selectedRow.provinceid) + getCityName(selectedRow.cityid) + getDistrictName(selectedRow.districtid) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="详细地址">
+              <span class="white">{{ formatValue(selectedRow.address) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </template>
     </a-form>
   </a-modal>
 </template>
@@ -84,6 +88,7 @@ import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo
 import { getSelectedAccountId } from '@/services/bus/account';
 import { WarehouseStateChangeReq } from '@/services/proto/warehouse/interface';
 import { warehouseStateChangeReq } from '@/services/proto/warehouse';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'warehouse_info_btn_disable',
@@ -130,6 +135,8 @@ export default defineComponent({
             gerWareHouseStatusName,
             getWareHouseTypeName,
             formatValue,
+            isOemByEnum,
+            OemType,
         };
     },
 });

+ 32 - 25
src/views/information/warehouse-info/compoments/recover/index.vue

@@ -29,7 +29,7 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="仓库名称">
-            <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+            <span class="white">{{ formatValue(selectedRow.warehousename)}}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -40,35 +40,39 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="状态">
             <span class="white">{{ gerWareHouseStatusName(selectedRow.warehousestatus) }}</span>
           </a-form-item>
         </a-col>
+
       </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="所在地区">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="详细地址">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
+      <template v-if="!isOemByEnum(OemType.pingan)">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="联系电话">
+              <span class="white">{{ formatValue(selectedRow.contactnum) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人">
+              <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="所在地区">
+              <span
+                    class="white">{{ getProvinceName(selectedRow.provinceid) + getCityName(selectedRow.cityid) + getDistrictName(selectedRow.districtid) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="详细地址">
+              <span class="white">{{ formatValue(selectedRow.address) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </template>
     </a-form>
   </a-modal>
 </template>
@@ -84,6 +88,7 @@ import { getSelectedAccountId } from '@/services/bus/account';
 import { WarehouseStateChangeReq } from '@/services/proto/warehouse/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { warehouseStateChangeReq } from '@/services/proto/warehouse';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'warehouse_info_btn_recover',
@@ -130,6 +135,8 @@ export default defineComponent({
             gerWareHouseStatusName,
             getWareHouseTypeName,
             formatValue,
+            isOemByEnum,
+            OemType,
         };
     },
 });