Merge pull request '运单批量录入特区提醒、特区标签批量导入汇总提醒' (#200) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-frontend/pulls/200
This commit is contained in:
commit
4b33dc6f21
@ -249,9 +249,6 @@ export default {
|
|||||||
},
|
},
|
||||||
handleBatchImport() {
|
handleBatchImport() {
|
||||||
this.openUploadForm = true;
|
this.openUploadForm = true;
|
||||||
},
|
|
||||||
batchImpDataForm() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.openUploadForm = false;
|
this.openUploadForm = false;
|
||||||
@ -326,22 +323,32 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let len = this.tmpDataList.length;
|
let len = this.tmpDataList.length;
|
||||||
|
//loader
|
||||||
|
let errMsgs = []
|
||||||
|
this.loading = true;
|
||||||
for (let i = 0; i < len; i++) {
|
for (let i = 0; i < len; i++) {
|
||||||
let itemData = this.tmpDataList[i];
|
let itemData = this.tmpDataList[i];
|
||||||
try {
|
try {
|
||||||
let res = await importEmisSpecialZone(itemData)
|
let res = await importEmisSpecialZone(itemData)
|
||||||
|
if(res.data.result == 'fail'){
|
||||||
|
errMsgs.push(res.data.msg)
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e)
|
console.warn(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(errMsgs.length > 0){
|
||||||
|
this.$confirm(`${errMsgs.join('\n')}`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
showCancelButton: false,
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {})
|
||||||
|
}else{
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
this.tmpDataList = [];
|
this.tmpDataList = [];
|
||||||
|
|
||||||
this.openUploadForm = false;
|
this.openUploadForm = false;
|
||||||
|
|
||||||
},
|
},
|
||||||
handleSuccess() {
|
handleSuccess() {
|
||||||
this.openForm = false;
|
this.openForm = false;
|
||||||
|
|||||||
@ -55,6 +55,7 @@
|
|||||||
<el-tag v-if="scope.row.uploadStatus==1" type="success">下单成功</el-tag>
|
<el-tag v-if="scope.row.uploadStatus==1" type="success">下单成功</el-tag>
|
||||||
<el-tag v-if="scope.row.uploadStatus==0" type="info">待下单</el-tag>
|
<el-tag v-if="scope.row.uploadStatus==0" type="info">待下单</el-tag>
|
||||||
<el-tag v-if="scope.row.uploadStatus==-1" type="danger">下单异常</el-tag>
|
<el-tag v-if="scope.row.uploadStatus==-1" type="danger">下单异常</el-tag>
|
||||||
|
<el-tag v-if="scope.row.uploadStatus==-2" type="warning">特区提醒</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('异常信息')" align="center" prop="errorInfo" min-width="300" :show-overflow-tooltip="true" >
|
<el-table-column :label="$t('异常信息')" align="center" prop="errorInfo" min-width="300" :show-overflow-tooltip="true" >
|
||||||
@ -62,6 +63,7 @@
|
|||||||
<span v-if="scope.row.uploadStatus==-1" style="color:red">{{ scope.row.errorInfo }}</span>
|
<span v-if="scope.row.uploadStatus==-1" style="color:red">{{ scope.row.errorInfo }}</span>
|
||||||
<span v-if="scope.row.uploadStatus==1">下单成功</span>
|
<span v-if="scope.row.uploadStatus==1">下单成功</span>
|
||||||
<span v-if="scope.row.uploadStatus==0">待下单</span>
|
<span v-if="scope.row.uploadStatus==0">待下单</span>
|
||||||
|
<span v-if="scope.row.uploadStatus==-2">{{ scope.row.errorInfo }}</span>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -159,6 +161,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listEmisWaybill, draftSubmitOrder } from "@/api/emis/emisWaybill";
|
import { listEmisWaybill, draftSubmitOrder } from "@/api/emis/emisWaybill";
|
||||||
|
import { matchByAddress } from "@/api/emis/emisSpecialZone";
|
||||||
|
|
||||||
import { parseTime } from "@/utils/custom";
|
import { parseTime } from "@/utils/custom";
|
||||||
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
|
||||||
@ -398,6 +401,8 @@ export default {
|
|||||||
return 'success-row';
|
return 'success-row';
|
||||||
}
|
}
|
||||||
else if (row.uploadStatus=='-1') {
|
else if (row.uploadStatus=='-1') {
|
||||||
|
return 'error-row';
|
||||||
|
} else if (row.row.uploadStatus=='-2') {
|
||||||
return 'warning-row';
|
return 'warning-row';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
@ -460,11 +465,7 @@ export default {
|
|||||||
let loadingInstance = this.$loading({
|
let loadingInstance = this.$loading({
|
||||||
text: '正在解析 ' + _index + ' 数据...'
|
text: '正在解析 ' + _index + ' 数据...'
|
||||||
})
|
})
|
||||||
|
|
||||||
this.orderList = [];
|
this.orderList = [];
|
||||||
|
|
||||||
let lastOrderSn = '';
|
|
||||||
let orderIndex = 0;
|
|
||||||
// 组装提交的数据
|
// 组装提交的数据
|
||||||
for (let index = 0; index < results.length; index++) {
|
for (let index = 0; index < results.length; index++) {
|
||||||
const element = results[index]
|
const element = results[index]
|
||||||
@ -548,6 +549,14 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
// 收件地址 匹配收件省份
|
||||||
|
if(['柬埔寨','孟加拉'].includes(orderData.receiveCountry)){
|
||||||
|
const res = await matchByAddress({address:orderData.receiveAddress})
|
||||||
|
if(res.data && res.data.provinceName !== orderData.receiveProvince){
|
||||||
|
orderData.errorInfo = `收件地址在"${res.data.provinceName}",请仔细核对后确认是否将其设为收件省份`;
|
||||||
|
orderData.uploadStatus = -2; // 提醒
|
||||||
|
}
|
||||||
|
}
|
||||||
this.tmpDataList.push(orderData);
|
this.tmpDataList.push(orderData);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -699,9 +708,12 @@ export default {
|
|||||||
color: rgb(21, 174, 31) !important;
|
color: rgb(21, 174, 31) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep .el-table .warning-row {
|
:deep .el-table .error-row {
|
||||||
color: #f51f1f !important;
|
color: #f51f1f !important;
|
||||||
}
|
}
|
||||||
|
:deep .el-table .warning-row {
|
||||||
|
color: #ffba00 !important;
|
||||||
|
}
|
||||||
|
|
||||||
:deep .el-form-item__label {
|
:deep .el-form-item__label {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user