|
|
@@ -323,20 +323,45 @@ export default defineComponent({
|
|
|
const wrapEl = unref(formRef);
|
|
|
wrapEl.validate().then((nameList:any) => {
|
|
|
delete nameList.IsChecked;
|
|
|
- loading.value = true;
|
|
|
- const params: SettlementReq = checkedObj.value.adjustMargin === 1?{
|
|
|
- ReckonRealQty: formState.ReckonRealQty!, // 交收量
|
|
|
- ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
|
|
|
- AddMargin: formState.AddMargin!, // 追加保证金
|
|
|
- ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
|
|
|
- }:{
|
|
|
- ReckonRealQty: formState.ReckonRealQty!, // 交收量
|
|
|
- ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
|
|
|
- DecMargin: formState.DecMargin!, // 减少保证金
|
|
|
- ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
|
|
|
- };
|
|
|
+ const param: SettlementReq = {};
|
|
|
+ const {ReckonRealQty, ReckonOtherAmount, AddMargin, ReckonAdjustAmount, DecMargin, Remark } = formState
|
|
|
+ // 交收量
|
|
|
+ if(ReckonRealQty) {
|
|
|
+ param.ReckonRealQty = ReckonRealQty
|
|
|
+ }
|
|
|
+ // 其它费用
|
|
|
+ if(ReckonOtherAmount) {
|
|
|
+ param.ReckonOtherAmount = ReckonOtherAmount
|
|
|
+ }
|
|
|
+ // 追加保证金
|
|
|
+ if(AddMargin) {
|
|
|
+ param.AddMargin = AddMargin
|
|
|
+ }
|
|
|
+ // 减少保证金
|
|
|
+ if(DecMargin) {
|
|
|
+ param.DecMargin = DecMargin
|
|
|
+ }
|
|
|
+ // 调整金额
|
|
|
+ if(ReckonAdjustAmount) {
|
|
|
+ const temp = checkedObj.value.adjustAmount === 1 ? 1 : -1
|
|
|
+ param.ReckonAdjustAmount = ReckonAdjustAmount * temp
|
|
|
+ }
|
|
|
+ if(Remark) {
|
|
|
+ param.Remark = Remark
|
|
|
+ }
|
|
|
+ // const params: SettlementReq = checkedObj.value.adjustMargin === 1?{
|
|
|
+ // ReckonRealQty: formState.ReckonRealQty!, // 交收量
|
|
|
+ // ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
|
|
|
+ // AddMargin: formState.AddMargin!, // 追加保证金
|
|
|
+ // ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
|
|
|
+ // }:{
|
|
|
+ // ReckonRealQty: formState.ReckonRealQty!, // 交收量
|
|
|
+ // ReckonOtherAmount: formState.ReckonOtherAmount!, // 其它费用
|
|
|
+ // DecMargin: formState.DecMargin!, // 减少保证金
|
|
|
+ // ReckonAdjustAmount: checkedObj.value.adjustAmount === 1 ? formState.ReckonRealQty! : -1*formState.ReckonRealQty!, // 调整金额 +-代表增减
|
|
|
+ // };
|
|
|
// 发出交收请求
|
|
|
- settlementReq(props.selectedRow.spotcontractid, params, loading)
|
|
|
+ settlementReq(props.selectedRow.spotcontractid, param, loading)
|
|
|
.then(() => {
|
|
|
cancel();
|
|
|
context.emit('refresh');
|