temp
dengyu 1 year ago
parent 1277355b62
commit 4a8100579a

@ -205,6 +205,16 @@ let buttons = [{
onClick: function () {
this.pushStatus("10311");
}
}, {
name: "审核通过",
icon: 'md-create',
value: 'AuditTrans',
class: '',
type: 'success',
index: 7,//显示的位置
onClick: function () {
this.saveandpushStatus("1032");
}
}, {
name: "货转驳回提交",
icon: 'md-close',
@ -213,7 +223,7 @@ let buttons = [{
type: 'error',
index: 6,//显示的位置
onClick: function () {
this.pushStatus("10312");
this.pushStatus("10001");
}
}, {
name: "执行货转",
@ -221,9 +231,9 @@ let buttons = [{
value: 'DoTrans',
class: '',
type: 'info',
index: 7,//显示的位置
index: 8,//显示的位置
onClick: function () {
if (this.http.FormShow.isFEST) {
if (this.http.FormShow.isFEST || this.http.FormShow.isJGWL) {
this.pushStatus("1030");
} else {
this.saveandpushStatus("1030");
@ -235,7 +245,7 @@ let buttons = [{
value: 'DoTrans_Fest',
class: '',
type: 'info',
index: 7,//显示的位置
index:8,//显示的位置
onClick: function () {
this.pushStatus("1030");
}
@ -244,7 +254,7 @@ let buttons = [{
icon: 'md-close',
value: 'UnDoTrans',
class: '',
index: 8,//显示的位置
index: 9,//显示的位置
onClick: function () {
this.pushStatus("10301");
}
@ -256,7 +266,7 @@ let buttons = [{
value: 'AuditBack',
class: '',
type: 'error',
index: 5,//显示的位置
index: 7,//显示的位置
onClick: function () {
this.pushStatus("10001");
}
@ -272,12 +282,22 @@ let buttons = [{
onClick: function () {
this.saveandpushStatus("1041");
}
}, {
name: "审核通过",
icon: 'md-create',
value: 'AuditMove',
class: '',
type: 'success',
index: 7,//显示的位置
onClick: function () {
this.saveandpushStatus("1042");
}
}, {
name: "取消提交移库",
icon: 'md-close',
value: 'CallbackMove',
class: '',
index: 7,//显示的位置
index: 8,//显示的位置
onClick: function () {
this.pushStatus("10411");
}
@ -290,7 +310,7 @@ let buttons = [{
type: 'info',
index: 5,//显示的位置
onClick: function () {
if (this.http.FormShow.isFEST) {
if (this.http.FormShow.isFEST || this.http.FormShow.isJGWL) {
this.pushStatus("1040");
} else {
this.saveandpushStatus("1040");

@ -275,7 +275,8 @@ module.exports = {
SelectAcceptDetail: '选择受理明细',
GoodsInfo: '商品信息',
CustAreagoodsNodr:'客户库存与欠费',
CustAreagoodsNodr: '客户库存与欠费',
op_wms_fee: '费用临时模板',
},
feetitle: {
CUSTOMERNAME: '结算对象',

@ -302,7 +302,8 @@ module.exports = {
SelectAcceptDetail: '选择受理明细',
GoodsInfo: '商品信息',
CustAreagoodsNodr:'客户库存与欠费',
CustAreagoodsNodr: '客户库存与欠费',
op_wms_fee: '费用临时模板',
},
feetitle: {
CUSTOMERNAME: '结算对象',

@ -356,6 +356,7 @@ let extension = {
this.$refs.modelBody.$refs.tab_condition.reset();
this.$refs.modelBody.$refs.tab_infofiles.$refs.tab_infofiles.reset();
this.$refs.modelBody.$refs.tab_nodr.reset();
this.$refs.modelBody.$refs.tab_wmsfee.reset();
} else {
//编辑时加载从表1从表2的数据
this.$refs.modelBody.$refs.table1.load();
@ -364,6 +365,7 @@ let extension = {
this.$refs.modelBody.$refs.tab_condition.load();
this.$refs.modelBody.$refs.tab_infofiles.$refs.tab_infofiles.load();
this.$refs.modelBody.$refs.tab_nodr.load();
this.$refs.modelBody.$refs.tab_wmsfee.load();
}
}
},
@ -387,6 +389,7 @@ let extension = {
table1List: this.$refs.modelBody.$refs.table1.rowData,
table3List: this.$refs.modelBody.$refs.tab_truck.rowData,
table4List: this.$refs.modelBody.$refs.tab_infofiles.$refs.tab_infofiles.rowData,
table5List: this.$refs.modelBody.$refs.tab_wmsfee.rowData,
table6List: this.$refs.modelBody.$refs.tab_condition.rowData,
}
formData.extra = JSON.stringify(extra);

@ -153,7 +153,7 @@
</div>
<vol-table
ref="table2" v-show="!isFEST&&!isBatchStock"
ref="table2" v-show="!isFEST && !isBatchStock"
:loadKey="true"
:columns="tableColumns2"
:pagination-hide="false"
@ -199,7 +199,7 @@
<!-- 显示操作按钮 -->
<!--<div class="message">tableColumns2配置,双击可以开启编辑</div>-->
<div class="btn-group">
<Button ref="btn_addcondition" type="info" size="small" ghost icon="md-add-circle" @click="addcondition">{{this.$t('ADDDETAIL')}}</Button>
<Button ref="btn_addcondition" type="info" size="small" ghost icon="md-add-circle" @click="addcondition">{{this.$t('ADDDETAIL')}}</Button>
<Button ref="btn_delcondition" type="info" size="small" ghost icon="md-remove-circle" @click="delcondition">{{this.$t('DELDETAIL')}}</Button>
<Button ref="btn_refresh" type="info" size="small" icon="md-refresh" ghost @click="()=>{$refs.tab_condition.load()}">{{this.$t('refrash')}}</Button>
@ -257,6 +257,29 @@
@loadAfter="loadTableAfter_tab_nodr"
></vol-table>
</TabPane>
<TabPane :label="this.$t('labeltitle.op_wms_fee')" icon="ios-aperture">
<div class="tabs1-header">
<div class="btn-group">
<Button ref="btn_addwmsfee" type="info" size="small" ghost icon="md-add-circle" @click="addwmsfee">{{this.$t('ADDDETAIL')}}</Button>
<Button ref="btn_delwmsfee" type="info" size="small" ghost icon="md-remove-circle" @click="delwmsfee">{{this.$t('DELDETAIL')}}</Button>
<Button type="info" size="small" icon="md-refresh" ghost @click="()=>{$refs.tab_wmsfee.load()}">{{this.$t('refrash')}}</Button>
</div>
</div>
<vol-table
ref="tab_wmsfee"
:loadKey="true"
:columns="tableColumnswmsfee"
:pagination-hide="false"
:max-height="300"
:url="tab_wmsfeeUrl"
:index="true"
@loadBefore="loadTableBefore_wmsfee"
@loadAfter="loadTableAfter_wmsfee"
></vol-table>
</TabPane>
</Tabs>
</div>
</template>
@ -448,7 +471,11 @@ export default {
{field:'SBRQ',title:'申报日期',type: "date",width:140, edit: { type: "date", keep: true },align:'left',sort:true},
{field:'RULEPRICE',title:this.$t('RULEPRICE'),type: "decimal",width:140, edit: { type: "decimal", keep: true },align:'left',sort:true},
{field:'RULEAMOUNT',title:this.$t('RULEAMOUNT'),type: "decimal",width:140, edit: { type: "decimal", keep: true },align:'left',sort:true},
{field:'TRUCKNO',title:this.$t('TRUCKNO')
,bind:{ key:'blankdic',data:[]}
,edit:{ type:'select',keep:true}
,normal:true,type: "text",width:90,align:'left',sort:true},
],
searchField_planlist: {
CUSTOMERNAME: "",
@ -649,6 +676,48 @@ export default {
{field:'NETWEIGHT_TON_REMAIN',title:this.$t('NETWEIGHT_TON_REMAIN'),type: "decimal",width:90,align:'left'},
]
,tab_wmsfeeUrl: "api/OP_WMS_FEE/GetPageData", //GetTruckData
//
tableColumnswmsfee: [
{field:'FEEID',title:'FEEID',type:'string',width:90,align:'left',hidden:true},
{field:'PID',title:'FEEID',type:'string',width:90,align:'left',hidden:true},
{field:'CUSTOMERNAME',title:this.$t('feetitle').CUSTOMERNAME,type:'string',width:150,require:true,align:'left',require:true,sort:true,bind:{ key:'CustName',data:[]},edit:{type:'select',keep:true}},
{field:'FEETYPE',title:this.$t('feetitle.FEETYPE'),type:'string',width:90,require:true,align:'left',require:true,bind:{ key:'feetype',data:[]},edit:{type:'select',keep:true}},
{field:'FEENAME',title:this.$t('feetitle.FEENAME'),type:'string',width:140,require:true,align:'left',require:true,bind:{ key:'feename',data:[]},edit:{type:'select',keep:true}},
{field:'PRICE',title:this.$t('feetitle.TAXUNITPRICE'),type:'decimal',width:90,align:'left'
,edit: { type: "decimal", keep: true }
,onChange: (row,value,tabledata) => {
if(row["PRICE"]==null||row["PRICE"]=="") return;
if(row["QUANTITY"]==null||row["QUANTITY"]=="") return;
let PRICE=parseFloat(row["PRICE"]);
let QUANTITY=parseFloat(row["QUANTITY"]);
row["AMOUNT"]=(PRICE*QUANTITY).toFixed(2);
}
},
{field:'QUANTITY',title:this.$t('QUANTITY'),type:'decimal',width:90,require:true,align:'left',summary:true,require:true,edit: { type: "decimal", keep: true }
,onChange: (row,value,tabledata) => {
if(row["PRICE"]==null||row["PRICE"]=="") return;
if(row["QUANTITY"]==null||row["QUANTITY"]=="") return;
let PRICE=parseFloat(row["PRICE"]);
let QUANTITY=parseFloat(row["QUANTITY"]);
row["AMOUNT"]=(PRICE*QUANTITY).toFixed(2);
}
},
{field:'AMOUNT',title:this.$t('AMOUNT'),type:'decimal',width:90,require:true,align:'left',summary:true},
{field:'CURRENCY',title:this.$t('feetitle.CURRENCY'),type:'string',bind:{ key:'bibie',data:[]},width:90,align:'left',edit: { type: "select", keep: true }},
{field:'REMARK',title:this.$t('REMARK'),type:'string',width:160,align:'left',edit:{type:'text',keep:true}},
{field:'CreateID',title:'CreateID',type:'guid',width:80,hidden:true,align:'left',hidden:true},
{field:'CreateDate',title:this.$t('CreateDate'),type:'datetime',width:150,align:'left',hidden:true,sort:true},
{field:'Creator',title:'Creator',type:'string',width:130,align:'left',hidden:true},
]
,loadKey: true
,isFEST:false
@ -668,7 +737,8 @@ export default {
GoodsModelShow:{},
options:[],
conditionList:[],
IsBatchStock:false
IsBatchStock:false,
trucknoList:[]
};
},
@ -856,6 +926,19 @@ export default {
// }
return true;
},
loadTableBefore_wmsfee(param, callBack) {
let _this=this.$store.getters.data().outplan_parent_head;
if (_this.currentAction == "Add") {
return callBack(false);
}
param.wheres=[];
let headid =this.getheadid()
param.wheres.push({ Name:"PID",Value:headid,displayType:'='});
},
loadTableAfter_wmsfee(data, callBack) {
return true;
},
//
loadTableAfter1(data, callBack) {
this.getphysics(data);
@ -875,6 +958,20 @@ export default {
this.$refs.tab_infofiles.setTruckinfo(trucklist);
}
this.trucknoList=[];
var _this=this;
data.forEach((x)=>{
_this.trucknoList.push({key:x.TRUCKNO,value:x.TRUCKNO});
});
_this.$refs.table1.columns.forEach((x)=>{
if(x.field=='TRUCKNO'){
x.bind.data=_this.trucknoList;
}
});
return true;
},
loadTableBefore_Infofile(param) {
@ -1278,6 +1375,72 @@ export default {
tigger = true;
//
if (_this.currentAction == "Add") {
// this.$refs.table1.reset();
_this.$refs.tab_condition.delRow(rows);
}else{
let url = "api/Op_Wms_Logic/DelDetail";
this.http.post(url, formData, this.$t('MSG.DeleteingData')).then(x => {
if (!x.status) return this.$Message.error(x.message);
tigger = false;
_this.$refs.tab_condition.delRow(rows);
//this.refresh();
});
}
} //, onCancel: () => {}
});
},
addwmsfee(){
let _headform=this.$store.getters.data().outplan_parent_head;
let editFormFields = _headform.geteditformfield();
this.$refs.tab_wmsfee.addRow(
{FEEID:'00000000-0000-0000-0000-000000000000'
,PID :'00000000-0000-0000-0000-000000000000'
,CUSTOMERNAME:editFormFields.CUSTOMERNAME
,FEETYPE:1
,PRICE:0
,QUANTITY:1
,AMOUNT:0
,CURRENCY:'RMB'
});
},
delcondition() {
let _this=this;
if(!this.check())
return;
let rows = this.$refs.tab_condition.getSelected();
if (rows.length == 0) {
return this.$Message.error(this.$t('MSG.PleaseSelectRow'));
}
let delKeys = rows.map(x => {
return x['WMSLOGICID'];
});
let headid = this.getheadid();
let formData = {
mainData: {PID:headid},
detailData: null,
delKeys: delKeys,
workKeys: null,
extra:null
};
let tigger = false;
let delmsg = this.$t('MSG.DeleteAlertConfirm');
this.$Modal.confirm({
title: this.$t('MSG.DeleteAlert'),
content:
'<p style="color: red;font-weight: bold;letter-spacing: 3px;">'+delmsg+'?</p>',
onOk: () => {
if (tigger) return;
tigger = true;
//
if (_this.currentAction == "Add") {
// this.$refs.table1.reset();

@ -302,7 +302,8 @@ module.exports = {
SelectAcceptDetail: '选择受理明细',
GoodsInfo: '商品信息',
CustAreagoodsNodr:'客户库存与欠费',
CustAreagoodsNodr: '客户库存与欠费',
op_wms_fee: '费用临时模板',
},
feetitle: {
CUSTOMERNAME: '结算对象',

@ -40,6 +40,10 @@ namespace VOL.Entity.DomainModels
//public const string 移库_移出_取消 = "移库_移出_取消";
}
//public struct WMSFEEMAKEOpportunity {
// public const string 入库 = "入库";
//}
#region 虎鲸 场站管理 业务和状态维护
public struct OPYARDMNG_WORKTYPE {
public const string = "调度待入场";

@ -339,6 +339,12 @@ namespace VOL.Entity.DomainModels
[Column(TypeName="varchar(50)")]
public string STRFIELD_06 { get; set; }
/// <summary>
///STRFIELD_06
/// </summary>
[Display(Name = "车号")]
[MaxLength(50)]
[Column(TypeName = "varchar(50)")]
public string TRUCKNO { get; set; }
}
}

@ -467,5 +467,14 @@ namespace VOL.Entity.DomainModels
[MaxLength(50)]
[Column(TypeName = "varchar(50)")]
public string BILLTYPE { get; set; }
/// <summary>
///STRFIELD_06
/// </summary>
[Display(Name = "车号")]
[MaxLength(50)]
[Column(TypeName = "varchar(50)")]
public string TRUCKNO { get; set; }
}
}

@ -54,8 +54,6 @@ namespace VOL.WMS.Services
var result = new Ch_fee();
result = AutoMapperHelper.MapTo<OP_WMS_FEE, Ch_fee>(wmsfee);
result.GID = wmsfee.FEEID.ToString();

@ -913,6 +913,13 @@ namespace VOL.WMS.Services
return _r.Error("新应收仓储费对象不能为空");
}
var = OP_WMS_TRANSFERGOODS_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID).ToList();
if ( == null || .Count == 0)
{
return _r.Error("货转明细 不能为空(即不能执行无内容的货权转移)");
}
//var execute = saveModel.WorkKeys[0].ToString();
@ -920,86 +927,141 @@ namespace VOL.WMS.Services
///目前先写死
///
var mesbase = "该业务目前不能执行该动作";
var message = mesbase;
if ((CurrStatus == "1000"|| CurrStatus == "10001") && execution == "1031")
{
//message = "[入库审核]成功";
var currBillStatus = .BILLSTATUS;
if (currBillStatus == null) currBillStatus = "1000";
var = OP_WMS_TRANSFERGOODS_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID).ToList();
Logger.PushStatus_PUB("货权转移", , execution);
if ( == null || .Count == 0)
{
return _r.Error("货转明细 不能为空(即不能执行无内容的货权转移)");
}
message = "提交成功";
.BILLSTATUS = "1031";
}
if (CurrStatus == "1031" && execution == "10311")
//var mesbase = "该业务目前不能执行该动作";
//var message = execution + "成功";
var doexecution = execution;
_r = Sys_Task_Progress_IndexService.Instance.DoExecution(ref currBillStatus, ref execution);
if (!_r.Status) return _r;
var message = _r.Message;
//20230426 增加出库计划审批的流程控制
//status分为 1000 1700 1701 1799
//Execution 1070推进 10701驳回
//if (CurrStatus == false && execution == "1070")
if ( currBillStatus == "1030")
{
//message = "[入库审核]成功";
message = "撤回成功";
.BILLSTATUS = "1000";
//审核完成 做
return MakeWMS();
}
else if (CurrStatus == "1030" && (doexecution == "10301"))
{
.REMARK += "\r\n" + reason;
var result = UnMakeWMS(, execution);
if (CurrStatus == "1031" && execution == "10312")
return result;
}
else
{
message = "驳回成功";
//message = "[入库审核]成功";
.REMARK += "\r\n" + reason;
.BILLSTATUS = "10001";
//仅推进状态或驳回 但未完结 也不是从完结状态驳回
//仅修改状态
_webResponse.OK(message);
.BILLSTATUS = currBillStatus;
}
// return _r.OK(mesbase);
if (!_webResponse.Status) { return _webResponse; }
//从录入或提交状态可以执行
if ((CurrStatus == "1000"|| CurrStatus == "1031") && execution == "1030")
{
//message = "[入库审核]成功";
repository.Update();
return _r.OK(message, );
var = OP_WMS_TRANSFERGOODS_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID).ToList();
//
if ( == null || .Count == 0)
{
return _r.Error("货转明细 不能为空(即不能执行无内容的货权转移)");
}
//货转执行.BILLSTATUS = "1031";
return MakeWMS();
}
//var mesbase = "该业务目前不能执行该动作";
//var message = mesbase;
if (CurrStatus == "1030" && (execution == "10301"|| execution == "10312"))
{
//message = "[入库审核-撤回]成功";
//if ((CurrStatus == "1000"|| CurrStatus == "10001") && execution == "1031")
//{
if(execution == "10312") .REMARK += "\r\n" + reason;
var result= UnMakeWMS(, execution);
// var 货转明细 = OP_WMS_TRANSFERGOODS_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID).ToList();
return result;
}
// if (货转明细 == null || 货转明细.Count == 0)
// {
// return _r.Error("货转明细 不能为空(即不能执行无内容的货权转移)");
// }
// message = "提交成功";
// 货转执行.BILLSTATUS = "1031";
//}
//if (CurrStatus == "1031" && execution == "10311")
//{
// //message = "[入库审核]成功";
// message = "撤回成功";
// 货转执行.BILLSTATUS = "1000";
//}
if (message == mesbase)
{
//SaveResult r = new SaveResult(
// 货转执行, message, false
// );
return _r.Error_Data(, message);
}
repository.Update(, true);
//_r.Data = saveModel.MainData;
//if (CurrStatus == "1031" && execution == "10001")//废除10312 改为统一使用10001
//{
// message = "驳回成功";
// //message = "[入库审核]成功";
// 货转执行.REMARK += "\r\n" + reason;
// 货转执行.BILLSTATUS = "10001";
//}
if (CurrStatus != .BILLSTATUS)
_r.Data = OP_WMS_TRANSFERGOODSRepository.Instance
.FindFirst(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID);
////从录入或提交状态可以执行
//if ((CurrStatus == "1000"|| CurrStatus == "1031") && execution == "1030")
//{
// //message = "[入库审核]成功";
// var 货转明细 = OP_WMS_TRANSFERGOODS_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID).ToList();
// if (货转明细 == null || 货转明细.Count == 0)
// {
// return _r.Error("货转明细 不能为空(即不能执行无内容的货权转移)");
// }
// //货转执行.BILLSTATUS = "1031";
// return MakeWMS(货转执行);
//}
//if (CurrStatus == "1030" && (execution == "10301"|| execution == "10312"))
//{
// //message = "[入库审核-撤回]成功";
// if(execution == "10312") 货转执行.REMARK += "\r\n" + reason;
// var result= UnMakeWMS(货转执行, execution);
// return result;
//}
//if (message == mesbase)
//{
// //SaveResult r = new SaveResult(
// // 货转执行, message, false
// // );
// return _r.Error_Data(货转执行, message);
//}
//repository.Update(货转执行, true);
////_r.Data = saveModel.MainData;
//if (CurrStatus != 货转执行.BILLSTATUS)
// _r.Data = OP_WMS_TRANSFERGOODSRepository.Instance
// .FindFirst(x => x.WMSTRANSFERGOODSID == WMSTRANSFERGOODSID);
return _r.OK(message, _r.Data);
//return _r.OK(message, _r.Data);
}

@ -3701,6 +3701,69 @@ namespace VOL.WMS.Services
//}
//20230630 根据op_wms_fee where pid=wmsplanid
//var 出库执行明细List = VW_OP_WMS_OUT_DO_GOODSRepository.Instance.FindAsIQueryable(x => x.WMSDOID == 出库执行.WMSDOID).ToList();
//var currOUTDOBSNOList = OP_WMS_OUT_DO_BSNORepository.Instance.FindAsIQueryable(x => x.BSNO == 出库执行.WMSDOID).ToList();
////var needinsert = false;
//foreach (var item in 出库执行明细List)
//{
// if (!currOUTDOBSNOList.Exists(x => x.MBLNO == item.MBLNO))
// {
// var newOUTDOBSNO = new OP_WMS_OUT_DO_BSNO();
// newOUTDOBSNO.GID = Guid.NewGuid();
// newOUTDOBSNO.BSNO = 出库执行.WMSDOID;
// newOUTDOBSNO.MBLNO = item.MBLNO;
// OP_WMS_OUT_DO_BSNORepository.Instance.Add(newOUTDOBSNO, true);
// //needinsert = true;
// }
//}
//currOUTDOBSNOList = OP_WMS_OUT_DO_BSNORepository.Instance.FindAsIQueryable(x => x.BSNO == 出库执行.WMSDOID).ToList();
var wmsfeeList = OP_WMS_FEERepository.Instance.FindAsIQueryable(x => x.PID == .WMSPLANID).ToList();
if (wmsfeeList != null && wmsfeeList.Count > 0) {
var codefeelist = Code_feeRepository.Instance.FindAsIQueryable(x => 1 == 1).ToList();
foreach (var wmsfee in wmsfeeList) {
var chfee = new Ch_fee();
chfee = OP_WMS_FEEService.MakeChFee(wmsfee, codefeelist);
chfee.BSNO = .WMSDOID.ToString();
chfee.BXGID = .WMSDOID.ToString();
Ch_feeRepository.Instance.Add(chfee, true);
}
}
return;
}
/// <summary>
/// 根据关联到出库计划的op_wms_fee 生成出库执行的费用
/// </summary>
/// <param name="出库执行"></param>
public static void MakeFee_2(OP_WMS_OUT_DO )
{
try {
var wmsfeeList = OP_WMS_FEERepository.Instance.FindAsIQueryable(x => x.PID == .WMSPLANID).ToList();
if (wmsfeeList != null && wmsfeeList.Count > 0)
{
var codefeelist = Code_feeRepository.Instance.FindAsIQueryable(x => 1 == 1).ToList();
foreach (var wmsfee in wmsfeeList)
{
var chfee = new Ch_fee();
chfee = OP_WMS_FEEService.MakeChFee(wmsfee, codefeelist);
chfee.BSNO = .WMSDOID.ToString();
chfee.BXGID = .WMSDOID.ToString();
Ch_feeRepository.Instance.Add(chfee, true);
}
}
}
catch (Exception e) {
Logger.Error(e.Message);
}
return;
}

@ -258,7 +258,7 @@ namespace VOL.WMS.Services
public List<INFO_FILES> Table4List { get; set; }
//public List<VW_OP_TRUCK_FILE> Table5List { get; set; }
public List<OP_WMS_FEE> Table5List { get; set; }
/// <summary>
/// 出库条件
/// </summary>
@ -386,6 +386,7 @@ namespace VOL.WMS.Services
List<OP_WMS_TRUCK> TRUCKList = new List<OP_WMS_TRUCK>();
TRUCKList = AutoMapperHelper.MapToList<VW_OP_TRUCK_FILE, OP_WMS_TRUCK>(TRUCKInfoList);
if (!PLANDetailList.isNullorEmpty())
{
@ -462,6 +463,18 @@ namespace VOL.WMS.Services
}
List<OP_WMS_FEE> wmsfeeList = tableExtra.Table5List;
if (!wmsfeeList.isNullorEmpty())
{
var dealedconditionlist = new List<List<OP_WMS_FEE>>();
dealedconditionlist = DealBodyList(head.WMSPLANID, wmsfeeList);
OP_WMS_FEERepository.Instance.AddRange(dealedconditionlist[0]);
OP_WMS_FEERepository.Instance.UpdateRange(dealedconditionlist[1]);
OP_WMS_FEERepository.Instance.SaveChanges();
}
List<Op_Wms_Logic> ConditionList = tableExtra.Table6List;
if (!ConditionList.isNullorEmpty())
{
@ -721,6 +734,18 @@ namespace VOL.WMS.Services
}
List<OP_WMS_FEE> wmsfeeList = tableExtra.Table5List;
if (!wmsfeeList.isNullorEmpty())
{
var dealedconditionlist = new List<List<OP_WMS_FEE>>();
dealedconditionlist = DealBodyList(head.WMSPLANID, wmsfeeList);
OP_WMS_FEERepository.Instance.AddRange(dealedconditionlist[0]);
OP_WMS_FEERepository.Instance.UpdateRange(dealedconditionlist[1]);
OP_WMS_FEERepository.Instance.SaveChanges();
}
List<Op_Wms_Logic> ConditionList = tableExtra.Table6List;
if (!ConditionList.isNullorEmpty())
{
@ -1598,7 +1623,6 @@ namespace VOL.WMS.Services
var newadd = false;
var _r = new WebResponseContent();
var keys = base.GetWorkKeysStr(saveModel);
saveModel.MakeSureHaveField("BSNO");
@ -1621,7 +1645,7 @@ namespace VOL.WMS.Services
}
#region 不同仓库库存检测1
var storeHouse = string.Empty;
if (AppSetting.CompanySetting.COMPANYNAME == "YULONG")
if (AppSetting.CompanySetting.COMPANYNAME == "YULONG" || AppSetting.CompanySetting.COMPANYNAME == "JGWL")
{
//裕龙由于前期数据的原因 必须允许不同库的货物同时发出
}
@ -1642,6 +1666,7 @@ namespace VOL.WMS.Services
}
if (string.IsNullOrWhiteSpace(saveModel.getMainDataValueStr("WMSNO")))
{
//新业务未保存直接添加
saveModel.MainData["CUSTOMERNAME"] = customename;
var _temphead = new OP_WMS_OUT_PLAN();
@ -1661,7 +1686,7 @@ namespace VOL.WMS.Services
}
else {
if (AppSetting.CompanySetting.COMPANYNAME == "YULONG")
if (AppSetting.CompanySetting.COMPANYNAME == "YULONG"|| AppSetting.CompanySetting.COMPANYNAME == "JGWL")
{
//裕龙由于前期数据的原因 必须允许不同库的货物同时发出
}
@ -1791,7 +1816,9 @@ namespace VOL.WMS.Services
}
}
if (.Where(x => .Select(s => s.WMSPHYSICSID).Contains(item.WMSPHYSICSID)).Count() > 0) continue;
//防止出库计划中重复引用同一明细
//20230630废弃
//if (现存出库计划明细.Where(x => 现存出库计划明细.Select(s => s.WMSPHYSICSID).Contains(item.WMSPHYSICSID)).Count() > 0) continue;
var = AutoMapperHelper.MapTo<Vw_Op_Wms_Physics, OP_WMS_OUT_PLAN_DETAIL>(_item);
.WMSOUTDETAILID = Guid.NewGuid();
@ -1989,7 +2016,6 @@ namespace VOL.WMS.Services
if (saveModel.WorkKeys != null) {
var trunknoList = saveModel.GetWorkKeysList_Str();
if (trunknoList.Count > 0) {
@ -2031,36 +2057,62 @@ namespace VOL.WMS.Services
var doTruckInfo =AutoMapperHelper.MapTo<OP_WMS_TRUCK, OP_WMS_TRUCK>(trucklist.First(x => x.TRUCKNO == truckno));
doTruckInfo.GID = Guid.NewGuid();
doTruckInfo.WMSPLANID = newoutdo.WMSDOID;
OP_WMS_TRUCKRepository.Instance.Add(doTruckInfo);
OP_WMS_TRUCKRepository.Instance.Add(doTruckInfo);
#endregion
//20210802 根据车辆信息中是否有箱号件数,在执行单中增加箱号明细
var ctninfo = new List<CNTRINFO>();
foreach (var truck in trucklist)
{
//20211124 改为多行相同车号信息生成至同一出库执行下
if (truck.TRUCKNO == truckno)
{
ctninfo.AddRange(truck.getCntrinfo());
}
}
if (trucklist.Count == 1)
{
//20210811 如果车只有一辆,则将出库计划(菲尔斯特的出库受理)中的所有明细 生成到这个出库执行下
if (AppSetting.CompanySetting.COMPANYNAME == "FEST")
{
MakeOutDoDetail(head, newoutdo.WMSDOID);
}
//if (AppSetting.CompanySetting.COMPANYNAME == "FEST")
//{
MakeOutDoDetail(head, newoutdo.WMSDOID);
OP_WMS_OUT_DOService.MakeFee_2(newoutdo);
//}
}
else
if (ctninfo.Count > 0)
{
MakeOutDoDetail(head, ctninfo, newoutdo.WMSDOID);
}
var List = VW_OP_WMS_OUT_PLAN_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList();
if (List.Exists(x => x.TRUCKNO != null && x.TRUCKNO != ""))
{
//只有正常业务才产生出库明细 条件出库不用产生
if (!(bool)head.ISBATCHSTOCK)
{
MakeOutDoDetail(head, List.Where(x => x.TRUCKNO == truckno).ToList(), newoutdo.WMSDOID);
OP_WMS_OUT_DOService.MakeFee_2(newoutdo);
}
}
else
{
//20210802 根据车辆信息中是否有箱号件数,在执行单中增加箱号明细
var ctninfo = new List<CNTRINFO>();
foreach (var truck in trucklist)
{
//20211124 改为多行相同车号信息生成至同一出库执行下
if (truck.TRUCKNO == truckno)
{
ctninfo.AddRange(truck.getCntrinfo());
}
}
if (trucklist.Count > 1)
{
//只有正常业务才产生出库明细 条件出库不用产生
if (!(bool)head.ISBATCHSTOCK)
{
OP_WMS_OUT_DOService.MakeFee_2(newoutdo);
MakeOutDoDetail(head, ctninfo, newoutdo.WMSDOID);
}
}
}
}
}
}
@ -2110,34 +2162,53 @@ namespace VOL.WMS.Services
OP_WMS_OUT_DOService.MakeFee_1(newoutdo);
//20210802 根据车辆信息中是否有箱号件数,在执行单中增加箱号明细
var ctninfo = new List<CNTRINFO>();
foreach (var truck in trucklist)
{
//20211124 改为多行相同车号信息生成至同一出库执行下
if (truck.TRUCKNO == truckno)
{
ctninfo.AddRange(truck.getCntrinfo());
}
}
if (trucklist.Count == 1)
{
//20210811 如果车只有一辆,则将出库计划(菲尔斯特的出库受理)中的所有明细 生成到这个出库执行下
if (AppSetting.CompanySetting.COMPANYNAME == "FEST")
{
MakeOutDoDetail(head, newoutdo.WMSDOID);
}
//if (AppSetting.CompanySetting.COMPANYNAME == "FEST")
//{
MakeOutDoDetail(head, newoutdo.WMSDOID);
//}
}
else
if (ctninfo.Count > 0)
{
//只有正常业务才产生出库明细 条件出库不用产生
if (!(bool)head.ISBATCHSTOCK)
var List = VW_OP_WMS_OUT_PLAN_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList();
if (List.Exists(x => x.TRUCKNO != null && x.TRUCKNO != ""))
{
MakeOutDoDetail(head, ctninfo, newoutdo.WMSDOID);
}
//只有正常业务才产生出库明细 条件出库不用产生
if (!(bool)head.ISBATCHSTOCK)
{
MakeOutDoDetail(head, List.Where(x=>x.TRUCKNO== truckno).ToList(), newoutdo.WMSDOID);
}
}
else
{
//20210802 根据车辆信息中是否有箱号件数,在执行单中增加箱号明细
var ctninfo = new List<CNTRINFO>();
foreach (var truck in trucklist)
{
//20211124 改为多行相同车号信息生成至同一出库执行下
if (truck.TRUCKNO == truckno)
{
ctninfo.AddRange(truck.getCntrinfo());
}
}
if (trucklist.Count > 1)
{
//只有正常业务才产生出库明细 条件出库不用产生
if (!(bool)head.ISBATCHSTOCK)
{
MakeOutDoDetail(head, ctninfo, newoutdo.WMSDOID);
}
}
}
}
}
@ -2228,6 +2299,50 @@ namespace VOL.WMS.Services
}
}
public void MakeOutDoDetail(OP_WMS_OUT_PLAN head, List<VW_OP_WMS_OUT_PLAN_DETAIL> List, Guid WMSDOID)
{
//找寻这个出库计划的明细
//var 出库计划明细List = VW_OP_WMS_OUT_PLAN_DETAILRepository.Instance.FindAsIQueryable(x => x.WMSPLANID == head.WMSPLANID).ToList();
foreach (var in List)
{
//if (!出库计划明细List.Exists(x => x.CNTRNO == ctn.CNTRNO)) continue;
//var 出库计划明细 = 出库计划明细List.First(x => x.CNTRNO == ctn.CNTRNO);
OP_WMS_OUT_DO_GOODS newoutdetail = AutoMapperHelper.MapTo<VW_OP_WMS_OUT_PLAN_DETAIL, OP_WMS_OUT_DO_GOODS>();
//if ((ctn.PKGS == null || ctn.PKGS == 0) && (ctn.STORAGEUNITCOUNT != null && ctn.STORAGEUNITCOUNT > 0))
//{
// wms_getStorageunitcount(ref newoutdetail, 出库计划明细, (decimal)ctn.STORAGEUNITCOUNT);
//}
//else if ((ctn.STORAGEUNITCOUNT == null || ctn.STORAGEUNITCOUNT == 0) && (ctn.PKGS != null && ctn.PKGS > 0))
//{
// wms_getPkgs(ref newoutdetail, 出库计划明细, (decimal)ctn.PKGS);
//}
//else
//{
// decimal? _pkgs1 = ctn.PKGS == null ? 出库计划明细.PKGS : (decimal)ctn.PKGS;
// decimal _pkgs = 0M;
// if (_pkgs1 != null) { _pkgs = (decimal)_pkgs1; }
// wms_getPkgs(ref newoutdetail, 出库计划明细, _pkgs);
// if (ctn.STORAGEUNITCOUNT != null && ctn.STORAGEUNITCOUNT > 0)
// {
// newoutdetail.STORAGEUNITCOUNT = ctn.STORAGEUNITCOUNT;
// }
//}
newoutdetail.WMSDOID = WMSDOID;
newoutdetail.WMSDODETAILID = Guid.NewGuid();
newoutdetail.WMSPLANDETAILID = .WMSOUTDETAILID;
OP_WMS_OUT_DO_GOODSRepository.Instance.Add(newoutdetail);
}
}
}
public partial class KeyValue
{

Loading…
Cancel
Save