修复bug
This commit is contained in:
parent
541c8d8fbe
commit
30c64a4c0c
@ -1359,8 +1359,41 @@ export default {
|
|||||||
}
|
}
|
||||||
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
||||||
|
|
||||||
bcList.forEach(async (billcode) => {
|
// bcList.forEach(async (billcode) => {
|
||||||
billcode = billcode.trim();
|
// 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){
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
||||||
let billRes = await listEmisWaybill({billCode:billcode});
|
let billRes = await listEmisWaybill({billCode:billcode});
|
||||||
if(!billRes || billRes.code != 200){
|
if(!billRes || billRes.code != 200){
|
||||||
@ -1391,7 +1424,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
this.titleBatch="";
|
this.titleBatch="";
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
this.formBatchBillList = "";
|
this.formBatchBillList = "";
|
||||||
|
|||||||
@ -1305,8 +1305,9 @@ export default {
|
|||||||
}
|
}
|
||||||
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[];
|
||||||
|
|
||||||
bcList.forEach(async (billcode) => {
|
// bcList.forEach(async (billcode) => {
|
||||||
billcode = billcode.trim();
|
for(let i = 0; i < bcList.length; i++){
|
||||||
|
let billcode = bcList[i].trim();
|
||||||
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){
|
||||||
let billRes = await listEmisWaybill({billCode:billcode});
|
let billRes = await listEmisWaybill({billCode:billcode});
|
||||||
if(!billRes || billRes.code != 200){
|
if(!billRes || billRes.code != 200){
|
||||||
@ -1337,7 +1338,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
this.titleBatch="";
|
this.titleBatch="";
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
this.formBatchBillList = "";
|
this.formBatchBillList = "";
|
||||||
|
|||||||
@ -563,6 +563,7 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = [];
|
this.ids = [];
|
||||||
|
debugger;
|
||||||
for(let i = 0; i< selection.length; i++){
|
for(let i = 0; i< selection.length; i++){
|
||||||
if(selection[i].blReversion != "1"){
|
if(selection[i].blReversion != "1"){
|
||||||
this.ids.push(selection[i].id)
|
this.ids.push(selection[i].id)
|
||||||
|
|||||||
@ -134,7 +134,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<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="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="notifySiteName" min-width="170" />
|
||||||
<el-table-column :label="$t('登记网点')" align="center" prop="scanSite" 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">
|
<el-table-column :label="$t('登记日期')" align="center" prop="scanDate" min-width="170">
|
||||||
@ -155,8 +160,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('数据来源')" align="center" prop="dataFrom" min-width="100" />
|
<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="registerManName" min-width="170" />
|
||||||
<el-table-column :label="$t('业务员编号')" align="center" prop="marketManCode" min-width="100" />
|
<el-table-column :label="$t('业务员编号')" align="center" prop="registerManCode" min-width="100" />
|
||||||
</xd-table>
|
</xd-table>
|
||||||
<!-- 添加或修改问题件对话框 -->
|
<!-- 添加或修改问题件对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
||||||
@ -196,7 +201,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
||||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
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";
|
||||||
|
|
||||||
// import { getWaybillDetail } from "@/api/emis/emisWaybill";
|
// import { getWaybillDetail } from "@/api/emis/emisWaybill";
|
||||||
@ -207,7 +212,7 @@ import { parseTime } from "@/utils/custom";
|
|||||||
export default {
|
export default {
|
||||||
name: "ProblemEntry",
|
name: "ProblemEntry",
|
||||||
components: { EmisSiteSimplePicker, ProblemTypePicker },
|
components: { EmisSiteSimplePicker, ProblemTypePicker },
|
||||||
dicts: ['emis_question_type'],
|
dicts: ['emis_question_type', 'emis_waybill_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -651,7 +656,7 @@ export default {
|
|||||||
this.emisWaybillList = newList;
|
this.emisWaybillList = newList;
|
||||||
this.open = false;
|
this.open = false;
|
||||||
},
|
},
|
||||||
async submitFormBatch(){
|
submitFormBatch(){
|
||||||
if(this.formBatch.billCode==null || this.formBatch.billCode==''){
|
if(this.formBatch.billCode==null || this.formBatch.billCode==''){
|
||||||
this.$message.error("输入单号后回车");
|
this.$message.error("输入单号后回车");
|
||||||
return;
|
return;
|
||||||
@ -674,29 +679,31 @@ export default {
|
|||||||
this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在");
|
this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在");
|
||||||
continue;
|
continue;
|
||||||
}else{
|
}else{
|
||||||
await this.addToList(bcList[bc].trim());
|
this.addToList(bcList[bc].trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
},
|
},
|
||||||
async addToList(billCode){
|
async addToList(billCode){
|
||||||
let response = await listEmisWaybill({billCode:billCode})
|
debugger;
|
||||||
if(!response || response.code != 200){
|
if(!billCode){
|
||||||
this.$message.error(response && response.msg || '未知错误');
|
|
||||||
}
|
|
||||||
let scanDate = new Date();
|
|
||||||
if(response.code != 200){
|
|
||||||
this.$message.error(response.msg);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let rows = response.rows;
|
let response = await getWaybillDetail(billCode);
|
||||||
if(!rows || rows.length == 0){
|
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);
|
this.$message.error("未查到单号: " + billCode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (let index = 0; index < rows.length; index++) {
|
// for (let index = 0; index < rows.length; index++) {
|
||||||
let rsItem = rows[index];
|
let rsItem = data;//rows[index];
|
||||||
console.log(rsItem);
|
console.log(rsItem);
|
||||||
let record =Object.assign({}, rsItem)
|
let record =Object.assign({}, rsItem)
|
||||||
// record.notifySiteCode = record.sendSiteCode;
|
// record.notifySiteCode = record.sendSiteCode;
|
||||||
@ -723,7 +730,7 @@ export default {
|
|||||||
record.dataFrom="PC";
|
record.dataFrom="PC";
|
||||||
this.emisWaybillList.push(record);
|
this.emisWaybillList.push(record);
|
||||||
this.dataMap[this.form.billCode]=record;
|
this.dataMap[this.form.billCode]=record;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user