iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
@@ -29,7 +29,7 @@ <a-form-item label="物料类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-select style="width: 100%" placeholder="请选择物料类型" v-decorator="['materialType']"> <a-select-option v-for="(item, index) in materialTypeData" :key="index" :value="item.materialTypeCode">{{ <a-select-option v-for="(item, index) in materialTypeData" :key="index" :value="item.id">{{ item.materialTypeName }}</a-select-option> </a-select> </a-form-item> @@ -61,7 +61,7 @@ <!-- <a-input placeholder="请输入库存单位" v-decorator="['materialUnit']" /> --> <a-select style="width: 100%" placeholder="请选择库存单位" v-decorator="['materialUnit']"> <a-select-option v-for="(item, index) in selectTypeData1" :key="index" :value="item.unitCode">{{ <a-select-option v-for="(item, index) in selectTypeData1" :key="index" :value="item.unitName">{{ item.unitName }}</a-select-option> </a-select> @@ -71,7 +71,7 @@ <!-- <a-input placeholder="请输入采购单位" v-decorator="['pOUnit']" /> --> <a-select style="width: 100%" placeholder="请选择采购单位" v-decorator="['pOUnit']"> <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="item.unitCode">{{ <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="item.unitName">{{ item.unitName }}</a-select-option> </a-select> iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsMaterial/Dto/WmsMaterialInput.cs
@@ -456,6 +456,12 @@ /// 往来关系 /// </summary> public List<BaseCustomerInput> BaseCustomerList { get; set; } /// <summary> /// 客户档案ID列表 /// </summary> public List<long> BaseCustomerList { get; set; } } iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsMaterial/WmsMaterialService.cs
@@ -191,16 +191,26 @@ .ProjectToType<WmsControlRuleDetailOutput>() .ToListAsync(); //物料客户关联 var wmsMaterialCustomerList = await _wmsMaterialCustomerRep.DetachedEntities .Where(u => u.MaterialId == wmsMaterialInfo.Id) .Where(u => u.IsDeleted == false) .OrderBy(o => o.CreatedTime) .ProjectToType<WmsMaterialCustomerOutput>() .ToListAsync(); List<long> custIds = wmsMaterialCustomerList.Select(s => s.CustId).ToList(); //根据物料客户关联表获取往来信息 var baseCustomers = await _baseCustomerRep.DetachedEntities.Join(_wmsMaterialCustomerRep.DetachedEntities, bc => bc.Id, mc => mc.CustId, (bc, mc) => new { bc, mc }) .Where(p =>p.mc.MaterialId== wmsMaterialInfo.Id) .OrderBy(o => o.mc.CreatedTime) var baseCustomers = await _baseCustomerRep.DetachedEntities .Where(p => custIds.Contains(p.Id)) .OrderBy(o => o.CreatedTime) .ProjectToType<BaseCustomerOutput>() .ToListAsync(); resultInfo.MaterialInfo = wmsMaterialInfo; resultInfo.SubstituteGoodList = wmsSubstituteGoods; resultInfo.ControlRuleDetailList = wmsControlRuleDetails; resultInfo.BaseCustomerList = baseCustomers; return resultInfo; } iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsMaterialCustomer/Dto/WmsMaterialCustomerOutput.cs
@@ -26,7 +26,7 @@ /// <summary> /// 客户ID /// </summary> public long? CustId { get; set; } public long CustId { get; set; } /// <summary> /// 客户编号