This commit is contained in:
linfso 2025-07-01 07:24:17 +08:00
parent 4c4d70abf9
commit 0a075ca04b

View File

@ -119,6 +119,14 @@
@click="handleReCalcProfitByBillCode"
>利润重算</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleBatchReCalc"
>批量重算</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -226,10 +234,27 @@
<el-table-column :label="$t('问题件原因')" align="center" prop="waybillDetail.problemCause" width="150" :show-overflow-tooltip="true" />
</XdTable>
<el-dialog :title="openTraceInfoTitle" :visible.sync="openTraceInfo" width="95%" :close-on-click-modal="false" v-dialogDrag append-to-body>
<TmsCostProfitDetail :key="currentId" :id="currentId" ></TmsCostProfitDetail>
<el-dialog :title="openTraceInfoTitle" :visible.sync="openTraceInfo" width="95%" :close-on-click-modal="false" :destroy-on-close="true" v-dialogDrag append-to-body>
<TmsCostProfitDetail :key="currentId" :id="currentId" ></TmsCostProfitDetail>
</el-dialog>
<el-dialog :loading="isDoing" :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
<el-form ref="formBatch" size="mini" label-width="60px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('运单号')" prop="batchBillList">
<el-input v-model="batchBillList" type="textarea" :rows="8" placeholder="运单号" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- :loading="isDoing" -->
<div slot="footer" class="dialog-footer" style="text-align:center">
<el-button type="primary" :loading="isDoing" @click="doReCalcBatch">确定</el-button>
<el-button @click="openBatch=false">关闭</el-button>
</div>
</el-dialog>
</XdPageContainer>
</template>
@ -290,6 +315,7 @@ export default {
return {
// 遮罩层
loading: true,
isDoing:false,
// 选中数组
ids: [],
// 非单个禁用
@ -311,6 +337,10 @@ export default {
openForm: false,
titleForm: "",
openBatch:false,
titleBatch:null,
batchBillList:null,
openTraceInfoTitle:"",
openTraceInfo:false,
currentTraceBillCode:null,
@ -508,11 +538,11 @@ export default {
this.openTraceInfoTitle="查看【"+row.billCode+"】";
// this.currentTraceBillCode=row.billCode;
// this.currentTraceBillItem=row.waybillDetail;
this.currentId=row.id;
this.currentId=row.id;
this.openTraceInfo=true;
},
async handleReCalcProfitByBillCode(){
if(this.selectBillList&&this.selectBillList.length>0){
if(this.selectBillList&&this.selectBillList.length>0){
this.loading = true;
for(let i=0;i<this.selectBillList.length;i++){
let item=this.selectBillList[i];
@ -524,6 +554,31 @@ export default {
this.$modal.msgError("请先选择数据");
}
},
handleBatchReCalc(){
this.batchBillList="";
this.titleBatch="请输入单号进行批量重算";
this.openBatch=true;
},
async doReCalcBatch(){
if(this.batchBillList==null || this.batchBillList==''){
this.$modal.msgError("请输入单号");
return;
}
let waitDoList=this.batchBillList.trim().split(/[;\;\,\,\n]/)||[];
if(waitDoList&&waitDoList.length>0){
this.loading = true;
this.isDoing=true;
for(let i=0;i<waitDoList.length;i++){
let item=waitDoList[i];
let res=await reCalcSplitCostFeeByBillCode(item);
}
this.loading = false;
this.isDoing=false;
this.$modal.msgSuccess("重算成功");
this.openBatch=true;
}
},
/** 搜索按钮操作 */
handleQuery() {