This commit is contained in:
linfso 2025-02-24 08:29:08 +08:00
parent a645122773
commit 6f9cc6e7b6
3 changed files with 33 additions and 9 deletions

View File

@ -35,6 +35,18 @@ export function reCalcSplitCostFee(costNo) {
}) })
} }
// 重新计算运单利润ByBillCode
export function reCalcSplitCostFeeByBillCode(billCode) {
return request({
url: '/emis/emisTmsCostFee/reCalcSplitCostFeeByBillCode',
method: 'post',
headers:{
'Content-Type': 'application/x-www-form-urlencoded'
},
data: "billCode="+billCode
})
}
// 修改TMS运输成本账单 // 修改TMS运输成本账单
export function updateEmisTmsCostFee(data) { export function updateEmisTmsCostFee(data) {
return request({ return request({

View File

@ -125,7 +125,6 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleReCalcProfit" @click="handleReCalcProfit"
v-hasPermi="['emis:emisTmsCostProfit:edit']"
>利润重算</el-button> >利润重算</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -289,13 +288,15 @@ export default {
}, },
async handleReCalcProfit(){ async handleReCalcProfit(){
if(this.selectList&&this.selectList.length>0){ if(this.selectList&&this.selectList.length>0){
this.loading = true;
for(let i=0;i<this.selectList.length;i++){ for(let i=0;i<this.selectList.length;i++){
let item=this.selectList[i]; let item=this.selectList[i];
let res=await reCalcSplitCostFee(item.costNo); let res=await reCalcSplitCostFee(item.costNo);
} }
this.loading = false;
this.$modal.msgSuccess("重算成功"); this.$modal.msgSuccess("重算成功");
}else{ }else{
this.$modal.msgError("请先选择成本"); this.$modal.msgError("请先选择数据");
} }
}, },

View File

@ -108,8 +108,8 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleReCalcProfit" :disabled="multiple"
v-hasPermi="['emis:emisTmsCostProfit:edit']" @click="handleReCalcProfitByBillCode"
>利润重算</el-button> >利润重算</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -217,6 +217,7 @@
<script> <script>
import { listEmisTmsCostProfit, getEmisTmsCostProfit, delEmisTmsCostProfit, addEmisTmsCostProfit, updateEmisTmsCostProfit } from "@/api/emis/emisTmsCostProfit"; import { listEmisTmsCostProfit, getEmisTmsCostProfit, delEmisTmsCostProfit, addEmisTmsCostProfit, updateEmisTmsCostProfit } from "@/api/emis/emisTmsCostProfit";
import { reCalcSplitCostFeeByBillCode } from "@/api/emis/emisTmsCostFee";
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker'; import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
@ -492,8 +493,19 @@ export default {
this.currentId=row.id; this.currentId=row.id;
this.openTraceInfo=true; this.openTraceInfo=true;
}, },
handleReCalcProfit(){ async handleReCalcProfitByBillCode(){
}, if(this.selectBillList&&this.selectBillList.length>0){
this.loading = true;
for(let i=0;i<this.selectBillList.length;i++){
let item=this.selectBillList[i];
let res=await reCalcSplitCostFeeByBillCode(item.billCode);
}
this.loading = false;
this.$modal.msgSuccess("重算成功");
}else{
this.$modal.msgError("请先选择数据");
}
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -568,9 +580,8 @@ export default {
else{ else{
let qExportParam=this.initQueryParams(); let qExportParam=this.initQueryParams();
qExportParam.pageNum=1; qExportParam.pageNum=1;
qExportParam.pageSize=5000; qExportParam.pageSize=20000;
listEmisTmsCostProfit(qExportParam).then(response => {
listEmisSettleSubBill(qExportParam).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.exportData(response.rows,loadingInstance); this.exportData(response.rows,loadingInstance);
} }