Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:6090/Win.Sfs.SmartSettlementSystem.PG

# Conflicts:
#	src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211119.txt
branch_ccpg_220107
44673626 3 years ago
parent
commit
3e401807ab
  1. 162
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleFisDiffDetailDapperRepository.cs
  2. 131
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs
  3. 42
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleFisDiffExportService.cs
  4. 75
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs
  5. 5
      src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs
  6. BIN
      src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
  7. BIN
      src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache
  8. 50
      vue/src/views/pg-fis/basedate/assemblyCfg/index.vue
  9. 137
      vue/src/views/pg-fis/basedate/m100BIll/index.vue
  10. 26
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  11. 89
      vue/src/views/pg-fis/basedate/productLine/index.vue
  12. 26
      vue/src/views/pg-fis/basedate/r100Online/index.vue

162
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleFisDiffDetailDapperRepository.cs

@ -0,0 +1,162 @@
using Dapper;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
public class SettleFisDiffDetail
{
[ExporterHeader(DisplayName = "年")]
public string Year { set; get; }
[ExporterHeader(DisplayName = "KENN号" )]
public string KENNCode { set; get; }
[ExporterHeader(DisplayName = "底盘号")]
public string ChassisNumber { set; get; }
[ExporterHeader(DisplayName = "车型" )]
public string Model { set; get; }
[ExporterHeader(DisplayName = "CP5A日期" )]
public string CP5A { set; get; }
[ExporterHeader(DisplayName = "CP7日期" )]
public string CP7 { set; get; }
[ExporterHeader(DisplayName = "零件号" )]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "结算数量" )]
public string SettleQty { set; get; }
[ExporterHeader(DisplayName = "M100状态" )]
public string WMSBillNum { set; get; }
[ExporterHeader(DisplayName = "M100数量" )]
public string Qty { set; get; }
[ExporterHeader(DisplayName = "差异")]
public string DiffQty { set; get; }
[ExporterHeader(DisplayName = "开票单价" )]
public string Price{ set; get; }
[ExporterHeader(DisplayName = "差异金额")]
public string DiffPrice{ set; get; }
[ExporterHeader(DisplayName = "SAP编码")]
public string SapCode { set; get; }
}
public class SettleFisDiffSum
{
// 物料组车型 SAP编码 零件号 结算数量 M100数量 差异总数 开票单价 差异金额
[ExporterHeader(DisplayName = "物料组车型")]
public string MaterialCodeGroup { set; get; }
[ExporterHeader(DisplayName = "SAP编码")]
public string KENNCode { set; get; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "结算数量")]
public string SettleQty { set; get; }
[ExporterHeader(DisplayName = "M100状态")]
public string WMSBillNum { set; get; }
[ExporterHeader(DisplayName = "M100数量")]
public string Qty { set; get; }
[ExporterHeader(DisplayName = "差异数量")]
public string DiffQty { set; get; }
[ExporterHeader(DisplayName = "开票单价")]
public string Price { set; get; }
[ExporterHeader(DisplayName = "差异金额")]
public string DiffPrice { set; get; }
}
public class SettleFisDiffDetailDapperRepository : DapperRepository<SettleAccountDbContext>, ITransientDependency
{
public SettleFisDiffDetailDapperRepository(IDbContextProvider<SettleAccountDbContext> dbContextProvider) : base(dbContextProvider)
{
}
//public virtual List<SettleFisDiffSum> GetSumList(string state, string version, string year, string begintime, string endtime)
//{
// GetReportList(state, version, year, begintime, endtime);
//}
public virtual List<SettleFisDiffDetail> GetReportList(string version, string year, string begintime, string endtime)
{
//年份 KENN号 底盘号 车型 CP5A日期 CP7日期 零件号 结算数量 M100状态 M100数量 差异 开票单价 差异金额
string _sql =
"SELECT\n" +
" a.*,\n" +
" ISnull( b.qty, 0 ) Qty,\n" +
" b.WMSBillNum,\n" +
" b.WMSState,\n" +
" Price,\n" +
" a.SettleQty - isnull( b.Qty, 0 ) DiffQty,(\n" +
" a.SettleQty - isnull( b.Qty, 0 ))* Price DiffPrice,\n" +
" d.CustomerPartCode SapCode \n" +
"FROM\n" +
" ( SELECT YEAR, KENNCode, ChassisNumber, Model, CP5A, CP7, MaterialCode, Qty SettleQty FROM Set_Settle WHERE version = '{0}' ) a\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" sum( qty ) Qty,\n" +
" KENNCode,\n" +
" ChassisNumber,\n" +
" ChassisNumber2,\n" +
" ItemCode,\n" +
" WMSBillNum,\n" +
" WMSState \n" +
" FROM\n" +
" Set_fis \n" +
" GROUP BY\n" +
" KENNCode,\n" +
" ChassisNumber,\n" +
" ChassisNumber2,\n" +
" ItemCode,\n" +
" WMSBillNum,\n" +
" WMSState \n" +
" ) b ON a.ChassisNumber = b.ChassisNumber2 \n" +
" AND a.KENNCode = b.KENNCode \n" +
" AND a.MaterialCode = b.ItemCode\n" +
" LEFT JOIN ( SELECT SUM( Amt )/ sum( Qty ) Price, MaterialCode FROM Set_Invoice WHERE version = '{0}' GROUP BY MaterialCode ) c ON a.MaterialCode = c.MaterialCode\n" +
" LEFT JOIN Set_material d ON a.MaterialCode = d.CustomerPartCode";
_sql = string.Format(_sql, version);
var _query = DbConnection.Query<SettleFisDiffDetail>(_sql, null, null, true, 1200, null);
return _query.ToList();
}
}
}

131
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs

@ -0,0 +1,131 @@
using Dapper;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Reports;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
public class UnSettleDiff: ReportDetailBase
{
[ExporterHeader(DisplayName = "结算平台未结数量")]
public decimal Qty { set; get; }
[ExporterHeader(DisplayName = "大众R3未结数量")]
public decimal UNSettleQty { set; get; }
[ExporterHeader(DisplayName = "定价")]
public decimal Price { set; get; }
[ExporterHeader(DisplayName = "金额")]
public decimal Amt { set; get; }
[ExporterHeader(DisplayName = "差异")]
public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "差异金额")]
public decimal DiffAmt { set; get; }
//交货单号 实际发货日期 KENN号 底盘号 底盘格式整理 M100交货状态 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 结算平台未结数量 定价 金额 大众R3未结数量 差异 差异金额
}
public class UnSettleDiffDapperRepository : DapperRepository<SettleAccountDbContext>, ITransientDependency
{
public UnSettleDiffDapperRepository(IDbContextProvider<SettleAccountDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public virtual List<UnSettleDiff> GetDiffReport(int type,string year, string begin, string end, string materialCode, string sapCode)
{
string str1 = "where 1=1 ";
string sql1 = "SELECT\n" +
" a.MaterialCode,\n" +
" a.KENNCode,\n" +
" a.ChassisNumber,\n" +
" a.qty unsettleQty,\n" +
" b.qty \n" +
" a.Cp5Time \n"+
"FROM\n" +
" Set_unsettle a\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" ItemCode,\n" +
" KENNCode,\n" +
" ChassisNumber2,\n" +
" sum( qty ) qty \n" +
" FROM\n" +
" Set_fis \n" +
" WHERE\n" +
" state = 0 \n" +
" OR state = 4 \n" +
" GROUP BY\n" +
" ItemCode,\n" +
" KENNCode,\n" +
" ChassisNumber2 \n" +
" ) b ON a.ChassisNumber = b.ChassisNumber2 \n" +
" AND a.MaterialCode = b.ItemCode \n" +
" AND a.KENNCode = b.KENNCode {0}";
string sql2 =
"SELECT\n" +
" a.*,\n" +
" b.Qty unsettleQty \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" WMSState,\n" +
" WMSBillNum,\n" +
" ItemCode,\n" +
" KENNCode,\n" +
" ChassisNumber2,\n" +
" sum( qty ) qty,\n" +
" ErpMaterialCode,\n" +
" ChassisNumber \n" +
" FROM\n" +
" Set_fis \n" +
" WHERE\n" +
" state = 0 \n" +
" GROUP BY\n" +
" ItemCode,\n" +
" KENNCode,\n" +
" ChassisNumber2,\n" +
" WMSState,\n" +
" WMSBillNum,\n" +
" ErpMaterialCode,\n" +
" ChassisNumber \n" +
" Cp5Time \n" +
" ) a\n" +
" LEFT JOIN Set_unsettle b ON a.ChassisNumber2 = b.ChassisNumber \n" +
" AND b.MaterialCode = a.ItemCode \n" +
" AND a.KENNCode = b.KENNCode {0}";
string _sql = string.Empty;
if (type == 1 )
{
_sql = string.Format(sql2, str1);
}
else
{
_sql = string.Format(sql1, str1);
}
var _query = DbConnection.Query<UnSettleDiff>(_sql);
return _query.ToList();
}
}
}

42
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleFisDiffExportService.cs

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount.Reports.SettledPartAndErpPartPriceDiffs;
using Win.Sfs.SettleAccount.Repository.Report;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
{
public class SettleFisDiffExportService : ITransientDependency, IExportJob
{
private readonly SettleFisDiffDetailDapperRepository _dapper;
private readonly OutputService _outputService;
public SettleFisDiffExportService(SettleFisDiffDetailDapperRepository dapper, OutputService outputService)
{
_dapper = dapper;
_outputService = outputService;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
{
//var year = p_list.Where(p => p.Name == "Year").FirstOrDefault().Value;
//var state = p_list.Where(p => p.Name == "State").FirstOrDefault().Value;
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = p_list.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var begin = p_list.Where(p => p.Name == "BeginTime").FirstOrDefault().Value;
var end = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value;
var _list= _dapper.GetReportList(version,string.Empty,begin,end);
_outputService.Export<SettleFisDiffDetail>(id,string.Format("3.大众准时化结算数量差异比对表_{0}.xlsx", Guid.NewGuid().ToString()), _list);
return id.ToString();
}
}
}

75
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
{
public class UnSettleDiffExportService : ITransientDependency, IExportJob
{
private readonly UnSettleDiffDapperRepository _dapper;
private readonly OutputService _outputService;
public UnSettleDiffExportService(UnSettleDiffDapperRepository dapper, OutputService outputService)
{
_dapper = dapper;
_outputService = outputService;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
{
var type = p_list.Where(p => p.Name == "Type").FirstOrDefault().Value;
var year = p_list.Where(p => p.Name == "Year").FirstOrDefault().Value;
var materialCode = p_list.Where(p => p.Name == "MaterialCode").FirstOrDefault().Value;
var sapCode = p_list.Where(p => p.Name == "SapMaterialCode").FirstOrDefault().Value;
var beginTime = p_list.Where(p => p.Name == "BegingTime").FirstOrDefault().Value;
var endTime = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value;
var _first = exportName.FirstOrDefault();
var _ls = new List<UnSettleDiff>();
_ls = _dapper.GetDiffReport(int.Parse(type),year,beginTime,endTime, materialCode,sapCode);
var _id = Guid.NewGuid();
List<UnSettleDiff> _lsExport = new List<UnSettleDiff>();
//foreach (var itm in _ls)
//{
// var dto = new FISExportDto()
// {
// ChassisNumber = itm.ChassisNumber,
// ChassisNumber2 = itm.ChassisNumber2,
// CP5Time = itm.CP5Time,
// ItemCode = itm.ItemCode,
// CP7Time = itm.CP7Time,
// KENNCode = itm.KENNCode,
// OrderBillNum = itm.OrderBillNum,
// //Model = itm.Model,
// SequenceNumber = itm.SequenceNumber,
// ErpMaterialCode = itm.ErpMaterialCode,
// SettledQty = itm.SettledQty,
// //State = itm.State,
// Qty = itm.Qty,
// Version = itm.Version,
// };
// _lsExport.Add(dto);
//}
_outputService.Export<UnSettleDiff>(id, _first, _lsExport);
return id.ToString();
}
}
}

5
src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -102,6 +102,11 @@ namespace Win.Sfs.SettleAccount
{
return implementationFactory.GetService<SecMatchBaseExportService>();
}
if (key.Equals(typeof(SettleFisDiffExportService).FullName))
{
return implementationFactory.GetService<SettleFisDiffExportService>();
}
else
{

BIN
src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache

Binary file not shown.

BIN
src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache

Binary file not shown.

50
vue/src/views/pg-fis/basedate/assemblyCfg/index.vue

@ -41,8 +41,11 @@
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
@ -221,7 +224,7 @@
</el-col>
</el-row>
<el-row>
<!-- <el-row>
<el-col :span="4">
<el-form-item label="总成类型:" required />
</el-col>
@ -234,7 +237,7 @@
/>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row>
<el-col :span="4">
@ -242,11 +245,17 @@
</el-col>
<el-col :span="20">
<el-form-item prop="vehicleModel">
<el-input
<el-select
style="width: 200px"
v-model="form.model"
v-model="form.vehicleModel"
:disabled="isEdit"
/>
>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -428,6 +437,9 @@ export default {
erpAssemblyCode: undefined,
erpAssemblyName: undefined,
},
vehicleModelQuery:{
dicTypeName:"派格车型",
},
form:{
details:[]
},
@ -444,7 +456,8 @@ export default {
dialogFormVisible: false,
tableHeight: document.documentElement.clientHeight - 280,
detailTableHeight:250,
details:[] //
details:[], //
vehicleModelList:[],//list
};
},
mounted() {
@ -458,6 +471,7 @@ export default {
});
},
created() {
this.getvehicleModel();
this.getList();
},
computed: {
@ -548,6 +562,7 @@ export default {
this.isEdit = false;
this.form = {};
this.details = [];
//this.getvehicleModel();
this.dialogFormVisible = true;
},
/** 修改 */
@ -555,6 +570,7 @@ export default {
this.formTitle = "修改";
this.isEdit = true;
this.details = [];
//this.getvehicleModel();
if (this.multipleSelection.length != 1) {
this.$message({
message: "编辑必须选择单行",
@ -661,7 +677,9 @@ export default {
this.listQuery.ErpAssemblyName = "";
this.listQuery.ErpAssemblyCode = "";
this.listQuery.vehicleModelCode = "";
this.getvehicleModel();
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
@ -690,7 +708,9 @@ export default {
}
},
/*添加明细空行*/
handleAddDetails() {
this.$forceUpdate();
if (this.form.details === undefined) {
this.form.details = [];
//console.log(679);
@ -815,6 +835,20 @@ export default {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
getvehicleModel()
{
this.$axios
.gets(
"/api/newjit/dic/list",this.vehicleModelQuery
)
.then((response) => {
//console.log(response);
this.vehicleModelList = response.item;
//console.log()
})
.catch(() => {
});
},
},
};
</script>

137
vue/src/views/pg-fis/basedate/m100BIll/index.vue

@ -19,9 +19,11 @@
style="margin-right: 15px"
@change="ptypeselectChange"
>
<el-option label="0" value="0"></el-option>
<el-option label="1" value="1"></el-option>
<el-option label="2" value="2"></el-option>
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="" prop="productLine">
@ -34,10 +36,10 @@
@change="valueselectChange"
>
<el-option
v-for="item in PLList"
:key="item.productLineCode"
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.productLineCode"/>
:value="item.id"/>
</el-select>
</el-form-item>
@ -269,10 +271,10 @@
>
<el-row>
<el-col :span="12">
<el-form-item label="KNR:" prop="erpAssemblyCode" required >
<el-form-item label="KNR:" prop="knr" required >
<el-input
style="width: 350px"
v-model="form.erpAssemblyCode"
v-model="form.knr"
:disabled="isEdit"
placeholder="请选择添加M100信息对应的KNR号"
/>
@ -282,19 +284,25 @@
<el-row>
<el-col :span="12">
<el-form-item label="车型:" prop="vehicleModel" required >
<el-form-item label="车型:" prop="vehicleModelCode" required >
<el-select
style="width: 350px"
v-model="form.model"
v-model="form.vehicleModelCode"
:disabled="isEdit"
/>
>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="底盘号:" prop="erpAssemblyCode" required >
<el-form-item label="底盘号:" prop="vin" required >
<el-input
style="width: 350px"
v-model="form.erpAssemblyCode"
v-model="form.vin"
:disabled="isEdit"
/>
</el-form-item>
@ -303,10 +311,10 @@
<el-row>
<el-col :span="12">
<el-form-item label="大众顺序号:" prop="vehicleModel" required >
<el-form-item label="大众顺序号:" prop="hostSN" required >
<el-input
style="width: 350px"
v-model="form.model"
v-model="form.hostSN"
:disabled="isEdit"
/>
</el-form-item>
@ -341,7 +349,7 @@
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="form.details"
:data="form.leftdetails"
:height="detailTableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
@ -353,15 +361,15 @@
@row-click="handleRowClick"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column prop="partCode" label="ERP总成编号" width="150px" >
<template slot-scope="scope">
<el-input v-model="scope.row.partCode" size="mini" style="width:135px"></el-input>
</template>
<el-table-column prop="erpAssemblyCode" label="ERP总成编号" width="150px" >
<!-- <template slot-scope="scope">
<el-input v-model="scope.row.erpAssemblyCode" size="mini" style="width:135px"></el-input>
</template> -->
</el-table-column>
<el-table-column prop="partName" label="ERP总成名称">
<template slot-scope="scope">
<el-input v-model="scope.row.partName" size="mini"></el-input>
</template>
<el-table-column prop="erpAssemblyName" label="ERP总成名称">
<!-- <template slot-scope="scope">
<el-input v-model="scope.row.erpAssemblyName" size="mini"></el-input>
</template> -->
</el-table-column>
<el-table-column prop="description" width="35px">
<template slot="header">
@ -375,7 +383,7 @@
</el-row>
<el-divider class="divider2" content-position="left">添加ERP总成</el-divider>
<el-row>
<el-form-item label="ERP总成编码:" prop="erpAssemblyCode" required >
<el-form-item label="ERP总成编码:" prop="erpAssemblyCode" >
<el-input
style="width: 315px"
v-model="form.erpAssemblyCode"
@ -385,7 +393,7 @@
</el-form-item>
</el-row>
<el-row>
<el-form-item label="ERP总成名称:" prop="erpAssemblyName" required >
<el-form-item label="ERP总成名称:" prop="erpAssemblyName" >
<el-input
style="width: 315px"
v-model="form.erpAssemblyName"
@ -395,17 +403,23 @@
</el-form-item>
</el-row>
<el-row>
<el-form-item label="车型:" prop="erpAssemblyName" required >
<el-form-item label="车型:" prop="vehicleModel" >
<el-select
style="width: 315px"
v-model="form.erpAssemblyName"
v-model="form.vehicleModel"
:disabled="isEdit"
placeholder="请输入总成名称"
/>
>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
</el-row>
<div style="text-align:center;margin: 0px;margin-bottom: 15px;">
<el-button type="primary">添加总成</el-button>
<el-button type="primary" @click="leftclick">添加总成</el-button>
</div>
</div>
</el-col>
@ -423,7 +437,7 @@
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="form.details"
:data="form.rightdetails"
:height="detailTableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
@ -462,27 +476,27 @@
</el-row>
<el-divider class="divider2" content-position="left">添加ERP结算件</el-divider>
<el-row>
<el-form-item label="客户零件代码:" prop="customerPartCode" required >
<el-form-item label="客户零件代码:" prop="customerPartCode" >
<el-input
style="width: 315px"
v-model="form.erpAssemblyCode"
v-model="form.customerPartCode"
:disabled="isEdit"
placeholder="请输入客户零件代码"
/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="客户零件名称:" prop="customerPartName" required >
<el-form-item label="客户零件名称:" prop="customerPartName" >
<el-input
style="width: 315px"
v-model="form.erpAssemblyName"
v-model="form.customerPartName"
:disabled="isEdit"
placeholder="请输入总成名称"
/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="数量:" prop="partQty" required >
<el-form-item label="数量:" prop="partQty" >
<el-input-number
style="width: 315px"
v-model="form.partQty"
@ -634,11 +648,12 @@ export default {
erpAssemblyName: undefined,
},
listPLQuery:{
BillType: 1,
BillType: 2,
//UserId: "00000000-0000-0000-0000-000000000000",
},
form:{
details:[]
leftdetails:[],
rightdetails:[],
},
page: 1,
//
@ -654,6 +669,12 @@ export default {
detailTableHeight:250,
details:[], //
PLList:[],//线
PLChildList:[],//线
vehicleModelQuery:{
dicTypeName:"派格车型",
},
vehicleModelList:[],//list
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}]
};
},
mounted() {
@ -790,6 +811,7 @@ export default {
this.isEdit = false;
this.form = {};
this.details = [];
this.getvehicleModel();
this.dialogFormVisible = true;
},
/** 修改 */
@ -797,6 +819,7 @@ export default {
this.formTitle = "修改";
this.isEdit = true;
this.details = [];
this.getvehicleModel();
if (this.multipleSelection.length != 1) {
this.$message({
message: "编辑必须选择单行",
@ -987,7 +1010,7 @@ export default {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
this.$axios
.gets("/api/newjit/assembly-cfg-erp/list", this.listQuery)
.gets("/api/newjit/bill-r100/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -1080,6 +1103,7 @@ export default {
.then((response) => {
//console.log(response);
this.PLList = response.item;
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList);
})
.catch(() => {
@ -1088,10 +1112,43 @@ export default {
//线
ptypeselectChange()
{
this.$forceUpdate();
this.listQuery.productLine = "";
//console.log(this.listQuery.productType);
this.PLList = this.PLList.filter(u => u.productType === this.listQuery.productType);
//console.log(this.PLChildList)
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
//console.log(this.listQuery.productType)
//console.log(this.PLChildList)
},
getvehicleModel()
{
this.$axios
.gets(
"/api/newjit/dic/list",this.vehicleModelQuery
)
.then((response) => {
//console.log(response);
this.vehicleModelList = response.item;
//console.log()
})
.catch(() => {
});
},
leftclick()
{
this.$forceUpdate();
let obj = {};
obj.erpAssemblyCode = this.form.erpAssemblyCode;
obj.erpAssemblyName = this.form.erpAssemblyName;
obj.vehicleModel = this.form.vehicleModel;
if (this.form.leftdetails === undefined) {
this.form.leftdetails = [];
}
this.form.leftdetails.push(obj);
},
rightclick(){},
},
};
</script>

26
vue/src/views/pg-fis/basedate/m100Online/index.vue

@ -19,9 +19,11 @@
style="margin-right: 15px"
@change="ptypeselectChange"
>
<el-option label="0" value="0"></el-option>
<el-option label="1" value="1"></el-option>
<el-option label="2" value="2"></el-option>
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="" prop="productLine">
@ -34,10 +36,10 @@
@change="valueselectChange"
>
<el-option
v-for="item in PLList"
:key="item.productLineCode"
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.productLineCode"/>
:value="item.id"/>
</el-select>
</el-form-item>
@ -402,7 +404,7 @@ export default {
erpAssemblyName: undefined,
},
listPLQuery:{
BillType: 1,
BillType: 2,
//UserId: "00000000-0000-0000-0000-000000000000",
},
form:{
@ -422,6 +424,8 @@ export default {
detailTableHeight:250,
details:[], //
PLList:[],//线
PLChildList:[],//线
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}]
};
},
mounted() {
@ -436,6 +440,7 @@ export default {
},
created() {
this.getList();
this.getProductLine();
},
computed: {
getDefaultField() {
@ -643,7 +648,7 @@ export default {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
this.$axios
.gets("/api/newjit/assembly-cfg-erp/list", this.listQuery)
.gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -739,6 +744,7 @@ export default {
.then((response) => {
//console.log(response);
this.PLList = response.item;
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
})
.catch(() => {
@ -747,8 +753,10 @@ export default {
//线
ptypeselectChange()
{
this.$forceUpdate();
//console.log(this.listQuery.productType);
this.PLList = this.PLList.filter(u => u.productType === this.listQuery.productType);
this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
},
},

89
vue/src/views/pg-fis/basedate/productLine/index.vue

@ -20,31 +20,31 @@
></XhJSSelect> -->
<el-form-item label="操作员登录名:" prop="userName">
<el-form-item label="操作员登录名" prop="userName">
<el-input
v-model="listQuery.userName"
clearable
size="small"
placeholder=""
style="width: 200px"
style="width: 180px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
</el-form-item>
<el-form-item label="操作员真实名称:" prop="name">
<el-form-item label="操作员真实名称" prop="name">
<el-input
v-model="listQuery.name"
clearable
size="small"
placeholder=""
style="width: 200px"
style="width: 180px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
</el-form-item>
<el-form-item label="部门:" prop="dep">
<!-- <el-form-item label="部门:" prop="dep">
<el-select
v-model="listQuery.dep"
clearable
@ -56,9 +56,9 @@
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="生产线:" prop="productLineCode">
<el-form-item label="生产线" prop="productLineCode">
<el-select
v-model="listQuery.productLineCode"
clearable
@ -69,7 +69,7 @@
>
<el-option
v-for="item in PLList"
:key="item.productLineCode"
:key="item.id"
:label="item.productLineName"
:value="item.productLineCode"/>
</el-select>
@ -177,6 +177,9 @@
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
<template slot-scope="scope">
{{scope.row[item.prop]}}
</template>
</el-table-column>
</el-table>
</el-col>
@ -233,6 +236,9 @@
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
<template slot-scope="scope">
{{scope.row[item.prop]}}
</template>
</el-table-column>
</el-table>
</el-col>
@ -409,11 +415,11 @@ export default {
userId: "",
},
listPLQuery:{
BillType: 1,
BillType: 0,
//UserId: "00000000-0000-0000-0000-000000000000",
},
saveQuery:{
userId: 1,
userId: "",
productLineIdList:[],
},
showSearch: true,
@ -467,30 +473,25 @@ export default {
prop: "name",
width: 140
});
tempsTabs.push({
label: "部门",
prop: "dep",
width: 120,
});
// tempsTabs.push({
// label: "",
// prop: "dep",
// width: 120,
// });
return tempsTabs;
},
/** 列表字段 */
getChildDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "序号",
prop: "seq",
width: 50,
});
tempsTabs.push({
label: "生产线编码",
prop: "workLineCode",
prop: "productLineCode",
width: 100,
});
tempsTabs.push({
label: "生产线名称",
prop: "workLineName",
prop: "productLineName",
width: 170
});
return tempsTabs;
@ -671,6 +672,7 @@ export default {
//
this.listLoading = false;
}, 500);
this.detaillist = this.list.filter(u => u.id === this.multipleSelection[0].id)[0].productLineList;
})
.catch(() => {
this.listLoading = false;
@ -834,6 +836,7 @@ export default {
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
console.log(row)
this.detaillist = row.productLineList;
//console.log(this.detaillist)
},
@ -891,47 +894,57 @@ export default {
this.form.worklines = [];
var templist = this.PLList;
this.multipleSelection[0].productLineList.forEach(element => {
templist = this.templist.filter(u => u.productLineCode !== element.productLineCode);
templist = templist.filter(u => u.id !== element.id);
});
templist.forEach(element => {
this.form.worklines.push(
parseInt(element.productLineCode));
});
//console.log(this.form.worklines)
this.PLList.forEach(element => {
this.UsePLList.push(
{
key:parseInt(element.productLineCode),
key:this.PLList.indexOf(element), //parseInt(element.productLineCode),
label:element.productLineName,
id:"",
id:element.id,
productLineCode:element.productLineCode,
disabled:false,
}
);
});
templist.forEach(element => {
var key = this.UsePLList.filter(u => u.id === element.id)[0].key;//线key
this.form.worklines.push(key);
});
console.log(this.form.worklines);
this.form.userName = this.multipleSelection[0].userName;
},
//
save()
{
console.log(this.form.worklines);
console.log(this.UsePLList);
var templist = this.UsePLList;
this.form.worklines.forEach(element => {
templist = templist.filter(u => u.key !== element);
});
console.log(918);
console.log(templist);
//console.log(933);
//console.log(templist);
this.saveQuery.userId = [];
this.saveQuery.productLineIdList = [];
//console.log(this.multipleSelection[0]);
this.saveQuery.userId = this.multipleSelection[0].id;
templist.forEach(element => {
this.saveQuery.productLineIdList.push(element.id)
});
//console.log(this.saveQuery);
this.$axios
.gets(
"/api/newjit/product-line-authority/do-authority",this.listPLQuery
.puts(
"/api/newjit/product-line-authority/do-authority",this.saveQuery
)
.then((response) => {
console.log(response);
this.PLList = response.item;
//console.log()
this.dialogFormVisible = false;
this.getList();
console.log(948)
this.detaillist = this.list.filter(u => u.id === this.multipleSelection[0].id)[0].productLineList;
})
.catch(() => {
});

26
vue/src/views/pg-fis/basedate/r100Online/index.vue

@ -19,9 +19,11 @@
style="margin-right: 15px"
@change="ptypeselectChange"
>
<el-option label="0" value="0"></el-option>
<el-option label="1" value="1"></el-option>
<el-option label="2" value="2"></el-option>
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="" prop="productLine">
@ -34,10 +36,10 @@
@change="valueselectChange"
>
<el-option
v-for="item in PLList"
:key="item.productLineCode"
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.productLineCode"/>
:value="item.id"/>
</el-select>
</el-form-item>
@ -385,6 +387,8 @@ export default {
tableHeight: document.documentElement.clientHeight - 335,
detailTableHeight:250,
details:[], //
PLChildList:[],//线
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}]
};
},
mounted() {
@ -399,6 +403,7 @@ export default {
},
created() {
this.getList();
this.getProductLine();
},
computed: {
getDefaultField() {
@ -600,7 +605,7 @@ export default {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
this.$axios
.gets("/api/newjit/assembly-cfg-erp/list", this.listQuery)
.gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -694,7 +699,8 @@ export default {
.then((response) => {
//console.log(response);
this.PLList = response.item;
//console.log(this.PLList);
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
})
.catch(() => {
});
@ -702,8 +708,10 @@ export default {
//线
ptypeselectChange()
{
this.$forceUpdate();
//console.log(this.listQuery.productType);
this.PLList = this.PLList.filter(u => u.productType === this.listQuery.productType);
this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
},
},

Loading…
Cancel
Save