修复bug

This commit is contained in:
liuyp 2024-07-31 19:53:44 +08:00
parent 541c8d8fbe
commit 30c64a4c0c
4 changed files with 67 additions and 25 deletions

View File

@ -1359,8 +1359,41 @@ export default {
}
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
bcList.forEach(async (billcode) => {
billcode = billcode.trim();
// bcList.forEach(async (billcode) => {
// billcode = billcode.trim();
// if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
// let billRes = await listEmisWaybill({billCode:billcode});
// if(!billRes || billRes.code != 200){
// this.$modal.msgError(billRes && billRes.msg)
// return;
// }else if(!billRes.rows || billRes.rows.length < 1){
// this.$modal.msgError(('无此运单数据') + ": " + billcode)
// return;
// }
// let item = billRes.rows[0];
// this.emisCoPackDetail.push(item);
// if(this.coPackType=="edit"){
// let packDetail = {
// batchNo: this.coData.batchNo,
// billCode: item.billCode,
// scanDate: item.scanDate,
// scanStatus: item.scanStatus,
// groupStatus: "1",//已组批次
// scanMan: item.scanMan,
// scanSite: item.scanSite,
// createBy: this.$store.getters.empCode,
// createTime: parseTime(new Date())
// };
// let response = await addEmisTmsSiteBatchDtl(packDetail);
// if(!response || response.code != 200){
// this.$modal.msgError(response && response.msg || '组批次明细新增失败')
// return;
// }
// }
// }
// })
for(let i = 0; i < bcList.length; i++){
let billcode = bcList[i].trim();
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
let billRes = await listEmisWaybill({billCode:billcode});
if(!billRes || billRes.code != 200){
@ -1391,7 +1424,7 @@ export default {
}
}
}
})
}
this.titleBatch="";
this.openBatch=false;
this.formBatchBillList = "";

View File

@ -1305,8 +1305,9 @@ export default {
}
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
bcList.forEach(async (billcode) => {
billcode = billcode.trim();
// bcList.forEach(async (billcode) => {
for(let i = 0; i < bcList.length; i++){
let billcode = bcList[i].trim();
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
let billRes = await listEmisWaybill({billCode:billcode});
if(!billRes || billRes.code != 200){
@ -1337,7 +1338,7 @@ export default {
}
}
}
})
}
this.titleBatch="";
this.openBatch=false;
this.formBatchBillList = "";

View File

@ -563,6 +563,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = [];
debugger;
for(let i = 0; i< selection.length; i++){
if(selection[i].blReversion != "1"){
this.ids.push(selection[i].id)

View File

@ -134,7 +134,12 @@
</div>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
<el-table-column :label="$t('状态')" align="center" prop="currentStatus" min-width="100" />
<!-- <el-table-column :label="$t('状态')" align="center" prop="currentStatus" min-width="100" /> -->
<el-table-column :label="$t('状态')" align="center" prop="waybillStatus" width="100" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_waybill_status" :value="scope.row.waybillStatus"/>
</template>
</el-table-column>
<el-table-column :label="$t('通知网点')" align="center" prop="notifySiteName" min-width="170" />
<el-table-column :label="$t('登记网点')" align="center" prop="scanSite" min-width="170" />
<el-table-column :label="$t('登记日期')" align="center" prop="scanDate" min-width="170">
@ -155,8 +160,8 @@
</template>
</el-table-column>
<el-table-column :label="$t('数据来源')" align="center" prop="dataFrom" min-width="100" />
<el-table-column :label="$t('所属业务员')" align="center" prop="marketMan" min-width="170" />
<el-table-column :label="$t('业务员编号')" align="center" prop="marketManCode" min-width="100" />
<el-table-column :label="$t('所属业务员')" align="center" prop="registerManName" min-width="170" />
<el-table-column :label="$t('业务员编号')" align="center" prop="registerManCode" min-width="100" />
</xd-table>
<!-- 添加或修改问题件对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag :close-on-click-modal="false" append-to-body>
@ -196,7 +201,7 @@
<script>
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
import { doScan } from "@/api/emis/emisTmsScanRecord";
import { listEmisWaybill } from "@/api/emis/emisWaybill";
// import { listEmisWaybill } from "@/api/emis/emisWaybill";
import { getWaybillDetail} from "@/api/emis/emisWaybill";
// import { getWaybillDetail } from "@/api/emis/emisWaybill";
@ -207,7 +212,7 @@ import { parseTime } from "@/utils/custom";
export default {
name: "ProblemEntry",
components: { EmisSiteSimplePicker, ProblemTypePicker },
dicts: ['emis_question_type'],
dicts: ['emis_question_type', 'emis_waybill_status'],
data() {
return {
// 遮罩层
@ -651,7 +656,7 @@ export default {
this.emisWaybillList = newList;
this.open = false;
},
async submitFormBatch(){
submitFormBatch(){
if(this.formBatch.billCode==null || this.formBatch.billCode==''){
this.$message.error("输入单号后回车");
return;
@ -674,29 +679,31 @@ export default {
this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在");
continue;
}else{
await this.addToList(bcList[bc].trim());
this.addToList(bcList[bc].trim());
}
}
this.loading = false;
this.openBatch=false;
},
async addToList(billCode){
let response = await listEmisWaybill({billCode:billCode})
if(!response || response.code != 200){
this.$message.error(response && response.msg || '未知错误');
}
let scanDate = new Date();
if(response.code != 200){
this.$message.error(response.msg);
debugger;
if(!billCode){
return;
}
let rows = response.rows;
if(!rows || rows.length == 0){
let response = await getWaybillDetail(billCode);
if(!response || response.code != 200){
this.$message.error((response && response.msg || '未知错误') + ": " + billCode);
return;
}
let scanDate = new Date();
let data = response.data;
if(!data || data.billCode == ""){
this.$message.error("未查到单号: " + billCode);
return;
}
for (let index = 0; index < rows.length; index++) {
let rsItem = rows[index];
// for (let index = 0; index < rows.length; index++) {
let rsItem = data;//rows[index];
console.log(rsItem);
let record =Object.assign({}, rsItem)
// record.notifySiteCode = record.sendSiteCode;
@ -723,7 +730,7 @@ export default {
record.dataFrom="PC";
this.emisWaybillList.push(record);
this.dataMap[this.form.billCode]=record;
}
// }
},
/** 删除按钮操作 */
handleDelete(row) {