This commit is contained in:
linfso 2024-06-16 15:08:12 +08:00
parent f6b164332d
commit 4a4f89ebcf
2 changed files with 44 additions and 25 deletions

View File

@ -61,6 +61,15 @@ export function addEmisWaybill(data) {
}) })
} }
// 草稿下单
export function draftSubmitOrder(data) {
return request({
url: '/emis/emisWaybill/draftSubmitOrder',
method: 'post',
data: data
})
}
// 实时下单 // 实时下单
export function realSubmitOrder(data) { export function realSubmitOrder(data) {
return request({ return request({

View File

@ -57,7 +57,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('异常信息')" align="left" prop="errorInfo" min-width="120" :show-overflow-tooltip="true" > <el-table-column :label="$t('异常信息')" align="left" prop="errorInfo" min-width="120" :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.uploadStatus==-1" style="color:red">{{ errorInfo }}</span> <span v-if="scope.row.uploadStatus==-1" style="color:red">{{ scope.row.errorInfo }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -142,7 +142,7 @@
</template> </template>
<script> <script>
import { listEmisWaybill, getEmisWaybill, delEmisWaybill, addEmisWaybill, updateEmisWaybill } from "@/api/emis/emisWaybill"; import { listEmisWaybill, draftSubmitOrder } from "@/api/emis/emisWaybill";
import { parseTime } from "@/utils/custom"; import { parseTime } from "@/utils/custom";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils' import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
@ -177,6 +177,7 @@ export default {
// 运单列表表格数据 // 运单列表表格数据
orderList: [], orderList: [],
tmpDataList: [], tmpDataList: [],
selectionList:[],
form:{}, form:{},
rules:{}, rules:{},
@ -514,18 +515,6 @@ export default {
// this.handleQuery(); // this.handleQuery();
}, },
handleRealUploadAll(){ handleRealUploadAll(){
// this.$refs["form"].validate(valid => {
// if (valid) {
// this.form=this.addFormParam(this.form,"extJsonStr",JSON.stringify(this.orderList));
// // batchImpData(this.form).then(response => {
// // this.$modal.msgSuccess("导入成功");
// // this.open = false;
// // this.getList();
// // });
// }
// });
if (this.ids && this.ids.length>0) { if (this.ids && this.ids.length>0) {
this.$confirm("确认下单吗?", "提示", { this.$confirm("确认下单吗?", "提示", {
cancelButtonText: "取消", cancelButtonText: "取消",
@ -535,15 +524,34 @@ export default {
closeOnClickModal: false closeOnClickModal: false
}).then(async () => { }).then(async () => {
// for(let i=0;i<this.ids.length;i++) if(this.selectionList&&this.selectionList.length>0){
// { for(let i=0;i<this.selectionList.length;i++){
// let id=this.ids[i]; let orderItem=this.selectionList[i];
// let postData={id:id}; console.log("===>xxx=>0:",orderItem);
// let res=await sendByApply(postData)
// } let res=await draftSubmitOrder(orderItem)
console.log("===>xxx=>1:",res);
let rstData=res.data;
if(rstData.result=='success'){
orderItem.uploadStatus=1;
orderItem.errorInfo="下单成功";
orderItem.billCode=rstData.billDetail.billCode;
}
else{
orderItem.uploadStatus=-1;
orderItem.errorInfo=rstData.msg;
}
}
this.$modal.msgSuccess("上传成功");
}else{
}
this.$modal.msgSuccess("发放成功");
this.getList();
}); });
@ -576,9 +584,11 @@ export default {
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
if(selection!=null){ // if(selection!=null){
this.billCode=selection[0].billCode; // this.billCode=selection[0].billCode;
} // }
this.selectionList=selection;
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length