提交所有文件2
This commit is contained in:
+13
-7
@@ -11,10 +11,16 @@ using GThinking.N_MISPRO.Utility;
|
|||||||
|
|
||||||
namespace GThinking.N_XLXSBJ
|
namespace GThinking.N_XLXSBJ
|
||||||
{
|
{
|
||||||
|
[TableMap(DB = "DBERP", DbTableName = "XLXSJGBYZZ1", Umid = 100860017, IsWorkFlow = false, IsAttach = false, UseWhr = false)]
|
||||||
|
|
||||||
|
public class CLQDYZ_XJFY : EntityManager
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public partial class CLQDYZ_XJFYView : SingleGridBase
|
public partial class CLQDYZ_XJFYView : SingleGridBase
|
||||||
{
|
{
|
||||||
CLQDYZ entity = new CLQDYZ();
|
CLQDYZ_XJFY entity = new CLQDYZ_XJFY();
|
||||||
CLQDYZ_M qryEntity = new CLQDYZ_M();
|
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -23,7 +29,6 @@ namespace GThinking.N_XLXSBJ
|
|||||||
this.CurMaster = Master;
|
this.CurMaster = Master;
|
||||||
this.ModuleGV = ContentGrid;
|
this.ModuleGV = ContentGrid;
|
||||||
this.CurEntity = entity;
|
this.CurEntity = entity;
|
||||||
this.CurQueryEntity = qryEntity;
|
|
||||||
this.PageHeight = 500;
|
this.PageHeight = 500;
|
||||||
this.PageWidth = 650;
|
this.PageWidth = 650;
|
||||||
this.Master.EnableNewBtn = false;
|
this.Master.EnableNewBtn = false;
|
||||||
@@ -32,18 +37,18 @@ namespace GThinking.N_XLXSBJ
|
|||||||
this.Master.EnableEditBtn = false;
|
this.Master.EnableEditBtn = false;
|
||||||
this.Master.EnableDeleteBtn = false;
|
this.Master.EnableDeleteBtn = false;
|
||||||
this.Master.EnableAttachBtn = false;
|
this.Master.EnableAttachBtn = false;
|
||||||
|
this.Master.EnableQueryBtn = false;
|
||||||
base.InitPage();
|
base.InitPage();
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
if (IsDefaultExecute)
|
Master_OnStandardQuery(null, null);
|
||||||
Master_OnStandardQuery(null, null);
|
|
||||||
}
|
}
|
||||||
|
this.ModuleGV.OnClientDblClick = "return false;";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
base.InitEntityByCondition();
|
|
||||||
entity.EntityTable.QuerySelSql = "select 1 from XLXSJGBYZZ1 where 1<>1";
|
entity.EntityTable.QuerySelSql = "select 1 from XLXSJGBYZZ1 where 1<>1";
|
||||||
base.Master_OnStandardQuery(sender, e);
|
base.Master_OnStandardQuery(sender, e);
|
||||||
DataSet ds = GetExcelData();
|
DataSet ds = GetExcelData();
|
||||||
@@ -57,10 +62,11 @@ namespace GThinking.N_XLXSBJ
|
|||||||
|
|
||||||
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
||||||
{
|
{
|
||||||
base.InitEntityByCondition();
|
|
||||||
entity.EntityTable.QuerySelSql = "select 1 from XLXSJGBYZZ1 where 1<>1";
|
entity.EntityTable.QuerySelSql = "select 1 from XLXSJGBYZZ1 where 1<>1";
|
||||||
base.moduleGV_PageIndexChanging(sender, e);
|
base.moduleGV_PageIndexChanging(sender, e);
|
||||||
DataSet ds = GetExcelData();
|
DataSet ds = GetExcelData();
|
||||||
|
ContentGrid.SelectedIndex = -1;
|
||||||
if (ds != null)
|
if (ds != null)
|
||||||
{
|
{
|
||||||
entity.GridDataBind(ContentGrid, tSession);
|
entity.GridDataBind(ContentGrid, tSession);
|
||||||
|
|||||||
Binary file not shown.
+2
-6
@@ -10265,7 +10265,7 @@ namespace GThinking.N_XLXSBJ
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dicTJYZList.Add("sTJYSListPFCPWJ", yzxxNew.XLXSTZYZ_YZID.Trim());
|
dicTJYZList.Add("sTJYSListYF", yzxxNew.XLXSTZYZ_YZID.Trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -18725,11 +18725,7 @@ namespace GThinking.N_XLXSBJ
|
|||||||
{
|
{
|
||||||
sYFYZID = sYFYZID.Split('|')[0];
|
sYFYZID = sYFYZID.Split('|')[0];
|
||||||
string sXZQH = string.Empty;
|
string sXZQH = string.Empty;
|
||||||
if (!e.MasterDataSet["cbxKHSZDCOUNTY"].Trim().Equals(""))
|
if (!e.MasterDataSet["cbxKHSZDCITY"].Trim().Equals(""))
|
||||||
{
|
|
||||||
sXZQH = e.MasterDataSet["cbxKHSZDCOUNTY"].Trim();
|
|
||||||
}
|
|
||||||
else if (!e.MasterDataSet["cbxKHSZDCITY"].Trim().Equals(""))
|
|
||||||
{
|
{
|
||||||
sXZQH = e.MasterDataSet["cbxKHSZDCITY"].Trim();
|
sXZQH = e.MasterDataSet["cbxKHSZDCITY"].Trim();
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -2538,9 +2538,9 @@ namespace GThinking.N_XLXSBJ
|
|||||||
|
|
||||||
bool bTCP = false;
|
bool bTCP = false;
|
||||||
bool bLCP = false;
|
bool bLCP = false;
|
||||||
if (!string.IsNullOrEmpty(pzxx.XLXSBJPZ_TDTGSCLID) && CMISproDataBase.ExistsRecord("DBERP", "select 1 from XLXHB where 1=1 XLXHB_XLXHID='" + sXLXHID + "' and " + CMISproDataBase.GetWhereEqual("XLXHB_DTCLID", sTcpList)))
|
if (!string.IsNullOrEmpty(pzxx.XLXSBJPZ_TDTGSCLID) && CMISproDataBase.ExistsRecord("DBERP", "select 1 from XLXHB where 1=1 and XLXHB_XLXHID='" + sXLXHID + "' and " + CMISproDataBase.GetWhereEqual("XLXHB_DTCLID", sTcpList)))
|
||||||
bTCP = true;
|
bTCP = true;
|
||||||
if (!string.IsNullOrEmpty(pzxx.XLXSBJPZ_LDTGSCLID) && CMISproDataBase.ExistsRecord("DBERP", "select 1 from XLXHB where 1=1 XLXHB_XLXHID='" + sXLXHID + "' and " + CMISproDataBase.GetWhereEqual("XLXHB_DTCLID", sLcpList)))
|
if (!string.IsNullOrEmpty(pzxx.XLXSBJPZ_LDTGSCLID) && CMISproDataBase.ExistsRecord("DBERP", "select 1 from XLXHB where 1=1 and XLXHB_XLXHID='" + sXLXHID + "' and " + CMISproDataBase.GetWhereEqual("XLXHB_DTCLID", sLcpList)))
|
||||||
bLCP = true;
|
bLCP = true;
|
||||||
Dictionary<string, double> dicYZZBZPF = new Dictionary<string, double>();
|
Dictionary<string, double> dicYZZBZPF = new Dictionary<string, double>();
|
||||||
dicYZZBZPF.Add(sYFYZID, 0);
|
dicYZZBZPF.Add(sYFYZID, 0);
|
||||||
@@ -8966,6 +8966,9 @@ namespace GThinking.N_XLXSBJ
|
|||||||
|
|
||||||
sJSJGS = sJSJGS.Replace("JZ01", strJJYZZ[0]).Replace("JZ02", strJJYZZ[1]).Replace("JZ03", strJJYZZ[2]).Replace("JZ04", strJJYZZ[3]).Replace("JZ05", strJJYZZ[4]);
|
sJSJGS = sJSJGS.Replace("JZ01", strJJYZZ[0]).Replace("JZ02", strJJYZZ[1]).Replace("JZ03", strJJYZZ[2]).Replace("JZ04", strJJYZZ[3]).Replace("JZ05", strJJYZZ[4]);
|
||||||
sJSJGS = sJSJGS.Replace("JZ06", strJJYZZ[5]).Replace("JZ07", strJJYZZ[6]).Replace("JZ08", strJJYZZ[7]).Replace("JZ09", strJJYZZ[8]).Replace("JZ10", strJJYZZ[9]);
|
sJSJGS = sJSJGS.Replace("JZ06", strJJYZZ[5]).Replace("JZ07", strJJYZZ[6]).Replace("JZ08", strJJYZZ[7]).Replace("JZ09", strJJYZZ[8]).Replace("JZ10", strJJYZZ[9]);
|
||||||
|
sJSJGS = sJSJGS.Replace("JZ11", strJJYZZ[10]).Replace("JZ12", strJJYZZ[11]).Replace("JZ13", strJJYZZ[12]).Replace("JZ14", strJJYZZ[13]).Replace("JZ15", strJJYZZ[14]);
|
||||||
|
sJSJGS = sJSJGS.Replace("JZ16", strJJYZZ[15]).Replace("JZ17", strJJYZZ[16]).Replace("JZ18", strJJYZZ[17]).Replace("JZ19", strJJYZZ[18]).Replace("JZ20", strJJYZZ[19]);
|
||||||
|
|
||||||
double dJSJ = 0;
|
double dJSJ = 0;
|
||||||
gtExpression exp = new gtExpression();
|
gtExpression exp = new gtExpression();
|
||||||
try
|
try
|
||||||
@@ -9695,7 +9698,8 @@ namespace GThinking.N_XLXSBJ
|
|||||||
SQL.Add(" select XLXSBJDMX_BJDID,XLXSBJDMX_XH,V_XSBJJSJGB_BJDHQCLCB as XLXSBJDMX_BJDHQCLCB,V_XSBJJSJGB_CLCB as XLXSBJDMX_CLCB, XLXSBJDMX_JGBJJ, XLXSBJDMX_JGBBJ ");
|
SQL.Add(" select XLXSBJDMX_BJDID,XLXSBJDMX_XH,V_XSBJJSJGB_BJDHQCLCB as XLXSBJDMX_BJDHQCLCB,V_XSBJJSJGB_CLCB as XLXSBJDMX_CLCB, XLXSBJDMX_JGBJJ, XLXSBJDMX_JGBBJ ");
|
||||||
SQL.Add(" ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, ");
|
SQL.Add(" ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, ");
|
||||||
SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10");
|
SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10");
|
||||||
|
SQL.Add(" ,XLXSBJDJJYZ_YZZ11,XLXSBJDJJYZ_YZZ12,XLXSBJDJJYZ_YZZ13,XLXSBJDJJYZ_YZZ14,XLXSBJDJJYZ_YZZ15, ");
|
||||||
|
SQL.Add(" XLXSBJDJJYZ_YZZ16,XLXSBJDJJYZ_YZZ17,XLXSBJDJJYZ_YZZ18,XLXSBJDJJYZ_YZZ19,XLXSBJDJJYZ_YZZ20");
|
||||||
SQL.Add(" from XLXSBJDMX ");
|
SQL.Add(" from XLXSBJDMX ");
|
||||||
SQL.Add(" left join V_XSBJJSJGB on V_XSBJJSJGB_BJDID = XLXSBJDMX_BJDID and V_XSBJJSJGB_BJDXH = XLXSBJDMX_XH ");
|
SQL.Add(" left join V_XSBJJSJGB on V_XSBJJSJGB_BJDID = XLXSBJDMX_BJDID and V_XSBJJSJGB_BJDXH = XLXSBJDMX_XH ");
|
||||||
SQL.Add(" left join XLXSBJDYZZ0 on XLXSBJDYZZ0_BJDID = XLXSBJDMX_BJDID and XLXSBJDYZZ0_XH = XLXSBJDMX_XH ");
|
SQL.Add(" left join XLXSBJDYZZ0 on XLXSBJDYZZ0_BJDID = XLXSBJDMX_BJDID and XLXSBJDYZZ0_XH = XLXSBJDMX_XH ");
|
||||||
|
|||||||
@@ -8889,6 +8889,9 @@ namespace GThinking.N_XLXSBJ
|
|||||||
sXLGGID = ds.Tables[0].Rows[i]["XLWBBJDMX_XLGGID"].ToString().Trim();
|
sXLGGID = ds.Tables[0].Rows[i]["XLWBBJDMX_XLGGID"].ToString().Trim();
|
||||||
sST = ds.Tables[0].Rows[i]["XLWBBJDMX_XLBZID"].ToString().Trim();
|
sST = ds.Tables[0].Rows[i]["XLWBBJDMX_XLBZID"].ToString().Trim();
|
||||||
sDYDJ = ds.Tables[0].Rows[i]["XLWBBJDMX_DYDJID"].ToString().Trim().Replace('K', 'k').Replace('v', 'V');
|
sDYDJ = ds.Tables[0].Rows[i]["XLWBBJDMX_DYDJID"].ToString().Trim().Replace('K', 'k').Replace('v', 'V');
|
||||||
|
if (sBJFLID == "04")
|
||||||
|
sDYDJ = sDYDJ.Replace('k', 'K').Replace('v', 'V');
|
||||||
|
|
||||||
sJLDW = ds.Tables[0].Rows[i]["XLWBBJDMX_JLDW"].ToString().Trim();
|
sJLDW = ds.Tables[0].Rows[i]["XLWBBJDMX_JLDW"].ToString().Trim();
|
||||||
sBJCP = ds.Tables[0].Rows[i]["XLWBBJDMX_BJCP"].ToString().Trim();
|
sBJCP = ds.Tables[0].Rows[i]["XLWBBJDMX_BJCP"].ToString().Trim();
|
||||||
if (sJLDW.Equals(""))
|
if (sJLDW.Equals(""))
|
||||||
@@ -8899,17 +8902,6 @@ namespace GThinking.N_XLXSBJ
|
|||||||
else
|
else
|
||||||
sJLDW = sMRJLDW;
|
sJLDW = sMRJLDW;
|
||||||
}
|
}
|
||||||
//if (sBJCP.Equals("") && sXLXHID.Equals("") && sXLGGID.Equals(""))//报价产品、型号、规格都为空认为是空行
|
|
||||||
//{
|
|
||||||
// continue;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// if (sXLXHID.Equals(""))
|
|
||||||
// sXLXHID = "/";
|
|
||||||
// if (sXLGGID.Equals(""))
|
|
||||||
// sXLGGID = "/";
|
|
||||||
//}
|
|
||||||
if (sXLXHID.Equals(""))
|
if (sXLXHID.Equals(""))
|
||||||
sXLXHID = "/";
|
sXLXHID = "/";
|
||||||
if (sXLGGID.Equals(""))
|
if (sXLGGID.Equals(""))
|
||||||
|
|||||||
+28
-169
@@ -1,4 +1,4 @@
|
|||||||
// 导入 h 函数
|
// 导入 h 函数
|
||||||
const { createApp, ref, reactive, onMounted, onUnmounted,nextTick, watch, h, computed } = Vue;
|
const { createApp, ref, reactive, onMounted, onUnmounted,nextTick, watch, h, computed } = Vue;
|
||||||
const { ElMessage, ElMessageBox, ElTableV2, ElCheckbox,ElLoading } = ElementPlus;
|
const { ElMessage, ElMessageBox, ElTableV2, ElCheckbox,ElLoading } = ElementPlus;
|
||||||
// 获取 URL 参数中的 BJDID
|
// 获取 URL 参数中的 BJDID
|
||||||
@@ -40,10 +40,8 @@ function logMappingDebug(stage, payload) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDefaultPasteFieldOrder() {
|
function getDefaultPasteFieldOrder() {
|
||||||
const defaultOrder = ['包号', '报价产品', '技术规范书ID', '计量单位', '数量',
|
const defaultOrder = ['包号', '报价产品', '技术规范书ID', '计量单位', '数量'];
|
||||||
'原始产品', '备注', '外购', '产品报价限价', '报价金额限价'];
|
const validFields = new Set(['包号', '报价产品', '技术规范书ID', '计量单位', '数量', '不导入']);
|
||||||
const validFields = new Set(['包号', '报价产品', '技术规范书ID', '计量单位', '数量', '不导入',
|
|
||||||
'原始产品', '备注', '外购', '产品报价限价', '报价金额限价']);
|
|
||||||
let rawValue = getControlValue('txtBJU059').trim();
|
let rawValue = getControlValue('txtBJU059').trim();
|
||||||
|
|
||||||
if (!rawValue) return defaultOrder;
|
if (!rawValue) return defaultOrder;
|
||||||
@@ -130,16 +128,11 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
{ value: '报价产品', label: '报价产品' },
|
{ value: '报价产品', label: '报价产品' },
|
||||||
{ value: '技术规范书ID', label: '技术规范书ID' },
|
{ value: '技术规范书ID', label: '技术规范书ID' },
|
||||||
{ value: '计量单位', label: '计量单位' },
|
{ value: '计量单位', label: '计量单位' },
|
||||||
{ value: '数量', label: '数量' },
|
{ value: '数量', label: '数量' }
|
||||||
{ value: '原始产品', label: '原始产品' },
|
|
||||||
{ value: '备注', label: '备注' },
|
|
||||||
{ value: '外购', label: '外购' },
|
|
||||||
{ value: '产品报价限价', label: '产品报价限价' },
|
|
||||||
{ value: '报价金额限价', label: '报价金额限价' }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const batchUpdateUseSelect = computed(() =>
|
const batchUpdateUseSelect = computed(() =>
|
||||||
batchUpdateType.value === 'standard' || batchUpdateType.value === 'voltage' || batchUpdateType.value === 'purchase'
|
batchUpdateType.value === 'standard' || batchUpdateType.value === 'voltage'
|
||||||
);
|
);
|
||||||
|
|
||||||
const visibleColumns = computed(() => {
|
const visibleColumns = computed(() => {
|
||||||
@@ -433,19 +426,14 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
'报价产品': null,
|
'报价产品': null,
|
||||||
'技术规范书ID': null,
|
'技术规范书ID': null,
|
||||||
'计量单位': null, // 新增
|
'计量单位': null, // 新增
|
||||||
'数量': null,
|
'数量': null,
|
||||||
'原始产品': null,
|
|
||||||
'备注': null,
|
|
||||||
'外购': null,
|
|
||||||
'产品报价限价': null,
|
|
||||||
'报价金额限价': null,
|
|
||||||
'型号': null,
|
'型号': null,
|
||||||
'电压等级': null,
|
'电压等级': null,
|
||||||
'标准': null,
|
'标准': null,
|
||||||
'规格': null,
|
'规格': null,
|
||||||
'等效': null,
|
'等效': null,
|
||||||
});
|
});
|
||||||
const tableColumns = ref(['包号','报价产品', '技术规范书ID','计量单位', '数量', '原始产品', '备注', '外购', '产品报价限价', '报价金额限价', '型号', '电压等级', '标准', '规格', '等效']);
|
const tableColumns = ref(['包号','报价产品', '技术规范书ID','计量单位', '数量', '型号', '电压等级', '标准', '规格', '等效']);
|
||||||
const importing = ref(false);
|
const importing = ref(false);
|
||||||
const importProgress = ref(0);
|
const importProgress = ref(0);
|
||||||
const totalRows = ref(0);
|
const totalRows = ref(0);
|
||||||
@@ -828,44 +816,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
title: '数量',
|
title: '数量',
|
||||||
width: 80,
|
width: 80,
|
||||||
align: 'left'
|
align: 'left'
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'originalProduct',
|
|
||||||
dataKey: 'originalProduct',
|
|
||||||
title: '原始产品',
|
|
||||||
width: 120,
|
|
||||||
align: 'left'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'remark',
|
|
||||||
dataKey: 'remark',
|
|
||||||
title: '备注',
|
|
||||||
width: 120,
|
|
||||||
align: 'left'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'purchase',
|
|
||||||
dataKey: 'purchase',
|
|
||||||
title: '外购',
|
|
||||||
width: 60,
|
|
||||||
align: 'center',
|
|
||||||
cellRenderer: ({ rowData }) => {
|
|
||||||
return rowData.purchase === 'Y' ? '√' : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'productPriceLimit',
|
|
||||||
dataKey: 'productPriceLimit',
|
|
||||||
title: '产品报价限价',
|
|
||||||
width: 110,
|
|
||||||
align: 'right'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'quoteAmountLimit',
|
|
||||||
dataKey: 'quoteAmountLimit',
|
|
||||||
title: '报价金额限价',
|
|
||||||
width: 110,
|
|
||||||
align: 'right'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'model',
|
key: 'model',
|
||||||
@@ -1071,11 +1021,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
const techSpecId= row.length > 2 ? row[2].trim() : ''; // 第三列为数量
|
const techSpecId= row.length > 2 ? row[2].trim() : ''; // 第三列为数量
|
||||||
const unit= row.length > 3 ? row[3].trim() : ''; // 第四列为包号
|
const unit= row.length > 3 ? row[3].trim() : ''; // 第四列为包号
|
||||||
const quantity = row.length > 4 ? row[4].trim() : ''; // 第五列为技术规范ID
|
const quantity = row.length > 4 ? row[4].trim() : ''; // 第五列为技术规范ID
|
||||||
const originalProduct = row.length > 5 ? row[5].trim() : '';
|
|
||||||
const remark = row.length > 6 ? row[6].trim() : '';
|
|
||||||
const purchase = row.length > 7 ? row[7].trim() : '';
|
|
||||||
const productPriceLimit = row.length > 8 ? row[8].trim() : '';
|
|
||||||
const quoteAmountLimit = row.length > 9 ? row[9].trim() : '';
|
|
||||||
|
|
||||||
// 创建XLJXMX对象
|
// 创建XLJXMX对象
|
||||||
itemsToInsert.push({
|
itemsToInsert.push({
|
||||||
@@ -1101,12 +1046,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
JLDW: unit, // 计量单位
|
JLDW: unit, // 计量单位
|
||||||
SL: quantity, // 数量
|
SL: quantity, // 数量
|
||||||
FBH: packageNumber, // 包号
|
FBH: packageNumber, // 包号
|
||||||
JSGFID: techSpecId, // 技术规范ID
|
JSGFID: techSpecId // 技术规范ID
|
||||||
YSCP: originalProduct,
|
|
||||||
BZ: remark,
|
|
||||||
WGBZ: purchase,
|
|
||||||
CPBJXJ: productPriceLimit,
|
|
||||||
BJJEXJ: quoteAmountLimit
|
|
||||||
});
|
});
|
||||||
|
|
||||||
parsedData.push({
|
parsedData.push({
|
||||||
@@ -1116,11 +1056,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
quantity: quantity,
|
quantity: quantity,
|
||||||
packageNumber: packageNumber, // 包号
|
packageNumber: packageNumber, // 包号
|
||||||
techSpecId: techSpecId, // 技术规范ID
|
techSpecId: techSpecId, // 技术规范ID
|
||||||
originalProduct: originalProduct,
|
|
||||||
remark: remark,
|
|
||||||
purchase: purchase,
|
|
||||||
productPriceLimit: productPriceLimit,
|
|
||||||
quoteAmountLimit: quoteAmountLimit,
|
|
||||||
model: '',
|
model: '',
|
||||||
voltage: '',
|
voltage: '',
|
||||||
standard: '',
|
standard: '',
|
||||||
@@ -1177,11 +1112,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
const techSpecId = getMappedValue(row, '技术规范书ID');
|
const techSpecId = getMappedValue(row, '技术规范书ID');
|
||||||
const unit = getMappedValue(row, '计量单位');
|
const unit = getMappedValue(row, '计量单位');
|
||||||
const quantity = getMappedValue(row, '数量');
|
const quantity = getMappedValue(row, '数量');
|
||||||
const originalProduct = getMappedValue(row, '原始产品');
|
|
||||||
const remark = getMappedValue(row, '备注');
|
|
||||||
const purchase = getMappedValue(row, '外购');
|
|
||||||
const productPriceLimit = getMappedValue(row, '产品报价限价');
|
|
||||||
const quoteAmountLimit = getMappedValue(row, '报价金额限价');
|
|
||||||
|
|
||||||
itemsToInsert.push({
|
itemsToInsert.push({
|
||||||
XLJXDJ: "XSBJ",
|
XLJXDJ: "XSBJ",
|
||||||
@@ -1206,12 +1136,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
JLDW: unit,
|
JLDW: unit,
|
||||||
SL: quantity,
|
SL: quantity,
|
||||||
FBH: packageNumber,
|
FBH: packageNumber,
|
||||||
JSGFID: techSpecId,
|
JSGFID: techSpecId
|
||||||
YSCP: originalProduct,
|
|
||||||
BZ: remark,
|
|
||||||
WGBZ: purchase,
|
|
||||||
CPBJXJ: productPriceLimit,
|
|
||||||
BJJEXJ: quoteAmountLimit
|
|
||||||
});
|
});
|
||||||
|
|
||||||
parsedData.push({
|
parsedData.push({
|
||||||
@@ -1221,11 +1146,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
quantity: quantity,
|
quantity: quantity,
|
||||||
packageNumber: packageNumber,
|
packageNumber: packageNumber,
|
||||||
techSpecId: techSpecId,
|
techSpecId: techSpecId,
|
||||||
originalProduct: originalProduct,
|
|
||||||
remark: remark,
|
|
||||||
purchase: purchase,
|
|
||||||
productPriceLimit: productPriceLimit,
|
|
||||||
quoteAmountLimit: quoteAmountLimit,
|
|
||||||
model: '',
|
model: '',
|
||||||
voltage: '',
|
voltage: '',
|
||||||
standard: '',
|
standard: '',
|
||||||
@@ -2211,11 +2131,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
importing.value = false;
|
importing.value = false;
|
||||||
canImport.value = false;
|
canImport.value = false;
|
||||||
|
|
||||||
// 重置文件输入框,避免再次选择相同文件时不触发change事件
|
|
||||||
if (fileInput.value) {
|
|
||||||
fileInput.value.value = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 重置映射关系
|
// 重置映射关系
|
||||||
tableColumns.value.forEach(col => {
|
tableColumns.value.forEach(col => {
|
||||||
columnMapping[col] = null;
|
columnMapping[col] = null;
|
||||||
@@ -2247,11 +2162,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
excelFile.value = file;
|
excelFile.value = file;
|
||||||
errorMessage.value = '';
|
errorMessage.value = '';
|
||||||
|
|
||||||
// 读取文件后立即清空 input,避免再次选择相同文件时不触发 change 事件
|
|
||||||
if (fileInput.value) {
|
|
||||||
fileInput.value.value = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 开始解析Excel
|
// 开始解析Excel
|
||||||
readExcelFile(file);
|
readExcelFile(file);
|
||||||
};
|
};
|
||||||
@@ -2385,14 +2295,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
WHSJ: "",
|
WHSJ: "",
|
||||||
DCZT: "N" ,
|
DCZT: "N" ,
|
||||||
JLDW: rowData['计量单位'] || "",
|
JLDW: rowData['计量单位'] || "",
|
||||||
SL: rowData['数量'] || "",
|
SL: rowData['数量'] || ""
|
||||||
YSCP: rowData['原始产品'] || "",
|
|
||||||
BZ: rowData['备注'] || "",
|
|
||||||
WGBZ: rowData['外购'] || "",
|
|
||||||
CPBJXJ: rowData['产品报价限价'] || "",
|
|
||||||
BJJEXJ: rowData['报价金额限价'] || "",
|
|
||||||
FBH: rowData['包号'] || "",
|
|
||||||
JSGFID: rowData['技术规范书id'] || ""
|
|
||||||
});
|
});
|
||||||
|
|
||||||
newTableData.push({
|
newTableData.push({
|
||||||
@@ -2400,17 +2303,10 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
product,
|
product,
|
||||||
unit: rowData['计量单位'] || '',
|
unit: rowData['计量单位'] || '',
|
||||||
quantity: rowData['数量'] || '',
|
quantity: rowData['数量'] || '',
|
||||||
originalProduct: rowData['原始产品'] || '',
|
|
||||||
remark: rowData['备注'] || '',
|
|
||||||
purchase: rowData['外购'] || '',
|
|
||||||
productPriceLimit: rowData['产品报价限价'] || '',
|
|
||||||
quoteAmountLimit: rowData['报价金额限价'] || '',
|
|
||||||
model: rowData['型号'] || '',
|
model: rowData['型号'] || '',
|
||||||
voltage: rowData['电压等级'] || '',
|
voltage: rowData['电压等级'] || '',
|
||||||
standard: rowData['标准'] || '',
|
standard: rowData['标准'] || '',
|
||||||
spec: rowData['规格'] || '',
|
spec: rowData['规格'] || '',
|
||||||
FBH: rowData['包号'] || "",
|
|
||||||
JSGFID: rowData['技术规范书id'] || "",
|
|
||||||
status: 'N',
|
status: 'N',
|
||||||
checked: false
|
checked: false
|
||||||
});
|
});
|
||||||
@@ -2431,10 +2327,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
importing.value = false;
|
importing.value = false;
|
||||||
successMessage.value = `成功导入${itemsToInsert.length}条产品数据`;
|
successMessage.value = `成功导入${itemsToInsert.length}条产品数据`;
|
||||||
ElMessage.success(`成功导入${itemsToInsert.length}条产品数据`);
|
ElMessage.success(`成功导入${itemsToInsert.length}条产品数据`);
|
||||||
await commonParse();
|
|
||||||
|
|
||||||
// 导入成功后关闭对话框
|
|
||||||
closeImportDialog();
|
|
||||||
} else {
|
} else {
|
||||||
importing.value = false;
|
importing.value = false;
|
||||||
errorMessage.value = `导入失败: ${result?.message || '未知错误'}`;
|
errorMessage.value = `导入失败: ${result?.message || '未知错误'}`;
|
||||||
@@ -2606,11 +2498,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
quantity: item.SL || '', // 新增
|
quantity: item.SL || '', // 新增
|
||||||
packageNumber:item.FBH, // 包号
|
packageNumber:item.FBH, // 包号
|
||||||
techSpecId:item.JSGFID, // 技术规范ID
|
techSpecId:item.JSGFID, // 技术规范ID
|
||||||
originalProduct: item.YSCP || '',
|
|
||||||
remark: item.BZ || '',
|
|
||||||
purchase: item.WGBZ || '',
|
|
||||||
productPriceLimit: item.CPBJXJ || '',
|
|
||||||
quoteAmountLimit: item.BJJEXJ || '',
|
|
||||||
|
|
||||||
model: item.JXXLXHID || item.XLXHID,
|
model: item.JXXLXHID || item.XLXHID,
|
||||||
XLXHID: item.XLXHID || '',
|
XLXHID: item.XLXHID || '',
|
||||||
@@ -2684,11 +2571,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
'技术规范ID',
|
'技术规范ID',
|
||||||
'计量单位',
|
'计量单位',
|
||||||
'数量',
|
'数量',
|
||||||
'原始产品',
|
|
||||||
'备注',
|
|
||||||
'外购',
|
|
||||||
'产品报价限价',
|
|
||||||
'报价金额限价',
|
|
||||||
'型号',
|
'型号',
|
||||||
'电压等级',
|
'电压等级',
|
||||||
'标准',
|
'标准',
|
||||||
@@ -2704,11 +2586,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
row.techSpecId ?? '',
|
row.techSpecId ?? '',
|
||||||
row.unit ?? '',
|
row.unit ?? '',
|
||||||
row.quantity ?? '',
|
row.quantity ?? '',
|
||||||
row.originalProduct ?? '',
|
|
||||||
row.remark ?? '',
|
|
||||||
row.purchase ?? '',
|
|
||||||
row.productPriceLimit ?? '',
|
|
||||||
row.quoteAmountLimit ?? '',
|
|
||||||
row.model ?? '',
|
row.model ?? '',
|
||||||
row.voltage ?? '',
|
row.voltage ?? '',
|
||||||
row.standard ?? '',
|
row.standard ?? '',
|
||||||
@@ -2726,11 +2603,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
{ wch: 18 }, // 技术规范ID
|
{ wch: 18 }, // 技术规范ID
|
||||||
{ wch: 10 }, // 计量单位
|
{ wch: 10 }, // 计量单位
|
||||||
{ wch: 10 }, // 数量
|
{ wch: 10 }, // 数量
|
||||||
{ wch: 14 }, // 原始产品
|
|
||||||
{ wch: 14 }, // 备注
|
|
||||||
{ wch: 8 }, // 外购
|
|
||||||
{ wch: 14 }, // 产品报价限价
|
|
||||||
{ wch: 14 }, // 报价金额限价
|
|
||||||
{ wch: 14 }, // 型号
|
{ wch: 14 }, // 型号
|
||||||
{ wch: 14 }, // 电压等级
|
{ wch: 14 }, // 电压等级
|
||||||
{ wch: 14 }, // 标准
|
{ wch: 14 }, // 标准
|
||||||
@@ -2788,18 +2660,19 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
selectedRowsCount.value = selectedRows.length;
|
selectedRowsCount.value = selectedRows.length;
|
||||||
hasSelectedRows.value = selectedRowsCount.value > 0;
|
hasSelectedRows.value = selectedRowsCount.value > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 加载批量调整线缆标准选项
|
// 加载批量调整线缆标准选项
|
||||||
const loadBatchStandardOptions = async (items) => {
|
const loadBatchStandardOptions = async () => {
|
||||||
try {
|
try {
|
||||||
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373012.ashx';
|
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373012.ashx';
|
||||||
const result = await new Promise((resolve, reject) => {
|
const result = await new Promise((resolve, reject) => {
|
||||||
GThinking.Web.AjaxServiceProxy.invoke(
|
GThinking.Web.AjaxServiceProxy.invoke(
|
||||||
'GetBatchXLBZList',
|
'XLBZList',
|
||||||
false,
|
false,
|
||||||
{ items: items || [] },
|
{},
|
||||||
(data) => resolve(data),
|
(data) => resolve(data),
|
||||||
(error) => reject(error),
|
(error) => reject(error),
|
||||||
"GetBatchXLBZList_CallBack",
|
"XLBZList_CallBack",
|
||||||
50000
|
50000
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -2815,26 +2688,27 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
ElMessage.error('加载线缆标准失败');
|
ElMessage.error('加载线缆标准失败');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 加载批量调整电压等级选项
|
// 加载批量调整电压等级选项
|
||||||
const loadBatchVoltageOptions = async (items) => {
|
const loadBatchVoltageOptions = async () => {
|
||||||
try {
|
try {
|
||||||
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373012.ashx';
|
GThinking.Web.AjaxServiceProxy.servicePath = 'S_XLXSBJ/102373012.ashx';
|
||||||
const result = await new Promise((resolve, reject) => {
|
const result = await new Promise((resolve, reject) => {
|
||||||
GThinking.Web.AjaxServiceProxy.invoke(
|
GThinking.Web.AjaxServiceProxy.invoke(
|
||||||
'GetBatchDYDJList',
|
'GetDYDJList',
|
||||||
false,
|
false,
|
||||||
{ items: items || [] },
|
{},
|
||||||
(data) => resolve(data),
|
(data) => resolve(data),
|
||||||
(error) => reject(error),
|
(error) => reject(error),
|
||||||
"GetBatchDYDJList_CallBack",
|
"GetDYDJList_CallBack",
|
||||||
50000
|
50000
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
batchUpdateOptions.value = result.map(item => ({
|
batchUpdateOptions.value = result.map(item => ({
|
||||||
value: (item || '').toString().replace(/\*+$/, '').trim(),
|
value: item,
|
||||||
label: (item || '').toString()
|
label: item
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -2870,6 +2744,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
console.error('加载标准名称映射失败:', error);
|
console.error('加载标准名称映射失败:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 显示批量调整对话框
|
// 显示批量调整对话框
|
||||||
const showBatchUpdateDialog = async (type) => {
|
const showBatchUpdateDialog = async (type) => {
|
||||||
batchUpdateType.value = type;
|
batchUpdateType.value = type;
|
||||||
@@ -2877,25 +2752,17 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
batchUpdateOptions.value = [];
|
batchUpdateOptions.value = [];
|
||||||
batchUpdateFilterQuery.value = '';
|
batchUpdateFilterQuery.value = '';
|
||||||
updateSelectedRows();
|
updateSelectedRows();
|
||||||
const selectedRows = tableData.value.filter(row => row.selected);
|
|
||||||
const items = selectedRows.map(row => buildBatchUpdateItem(row));
|
|
||||||
|
|
||||||
if (type === 'standard') {
|
if (type === 'standard') {
|
||||||
batchUpdateTitle.value = '批量调整线缆标准';
|
batchUpdateTitle.value = '批量调整线缆标准';
|
||||||
await loadBatchStandardOptions(items);
|
await loadBatchStandardOptions();
|
||||||
} else if (type === 'voltage') {
|
} else if (type === 'voltage') {
|
||||||
batchUpdateTitle.value = '批量调整电压等级';
|
batchUpdateTitle.value = '批量调整电压等级';
|
||||||
await loadBatchVoltageOptions(items);
|
await loadBatchVoltageOptions();
|
||||||
} else if (type === 'model') {
|
} else if (type === 'model') {
|
||||||
batchUpdateTitle.value = '批量调整线缆型号';
|
batchUpdateTitle.value = '批量调整线缆型号';
|
||||||
} else if (type === 'spec') {
|
} else if (type === 'spec') {
|
||||||
batchUpdateTitle.value = '批量调整线缆规格';
|
batchUpdateTitle.value = '批量调整线缆规格';
|
||||||
} else if (type === 'purchase') {
|
|
||||||
batchUpdateTitle.value = '批量调整外购';
|
|
||||||
batchUpdateOptions.value = [
|
|
||||||
{ value: 'Y', label: '外购 (Y)' },
|
|
||||||
{ value: 'N', label: '不外购 (N)' }
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
batchUpdateDialogVisible.value = true;
|
batchUpdateDialogVisible.value = true;
|
||||||
@@ -2916,7 +2783,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
|
|
||||||
// 确认批量调整
|
// 确认批量调整
|
||||||
const confirmBatchUpdate = async () => {
|
const confirmBatchUpdate = async () => {
|
||||||
if (!batchUpdateValue.value.trim() && batchUpdateType.value !== 'purchase') {
|
if (!batchUpdateValue.value.trim()) {
|
||||||
ElMessage.warning(batchUpdateUseSelect.value ? '请选择调整值' : '请输入调整值');
|
ElMessage.warning(batchUpdateUseSelect.value ? '请选择调整值' : '请输入调整值');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2930,7 +2797,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
let updateValue = '';
|
let updateValue = '';
|
||||||
if (batchUpdateUseSelect.value) {
|
if (batchUpdateUseSelect.value) {
|
||||||
updateValue = resolveBatchUpdateSelectValue();
|
updateValue = resolveBatchUpdateSelectValue();
|
||||||
if (!updateValue && batchUpdateType.value !== 'purchase') {
|
if (!updateValue) {
|
||||||
ElMessage.warning(
|
ElMessage.warning(
|
||||||
batchUpdateType.value === 'standard'
|
batchUpdateType.value === 'standard'
|
||||||
? '请从下拉列表中选择有效的线缆标准'
|
? '请从下拉列表中选择有效的线缆标准'
|
||||||
@@ -2984,9 +2851,6 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
if (batchUpdateType.value === 'spec') {
|
if (batchUpdateType.value === 'spec') {
|
||||||
return { ...row, spec: updateValue, XLGGID: updateValue };
|
return { ...row, spec: updateValue, XLGGID: updateValue };
|
||||||
}
|
}
|
||||||
if (batchUpdateType.value === 'purchase') {
|
|
||||||
return { ...row, purchase: updateValue };
|
|
||||||
}
|
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3045,12 +2909,7 @@ function forceApplyDefaultColumnMapping(columnFieldMapping, detectedColumnCount)
|
|||||||
JLDW: row.unit || "",
|
JLDW: row.unit || "",
|
||||||
SL: row.quantity || "",
|
SL: row.quantity || "",
|
||||||
FBH: row.packageNumber || "",
|
FBH: row.packageNumber || "",
|
||||||
JSGFID: row.techSpecId || "",
|
JSGFID: row.techSpecId || ""
|
||||||
YSCP: row.originalProduct || "",
|
|
||||||
BZ: row.remark || "",
|
|
||||||
WGBZ: row.purchase || "",
|
|
||||||
CPBJXJ: row.productPriceLimit || "",
|
|
||||||
BJJEXJ: row.quoteAmountLimit || ""
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 设置服务路径(确保正确)
|
// 设置服务路径(确保正确)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user