完成批量登记,缺少所属业务员和编号字段等接口、下载&导入模版待提供
This commit is contained in:
parent
fd86b92333
commit
854d1189a4
@ -37,7 +37,7 @@
|
||||
dicts: [],
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
type: [String,Number],
|
||||
required: false
|
||||
},
|
||||
placeholder: {
|
||||
@ -48,10 +48,6 @@
|
||||
type: [String,Number],
|
||||
required: false
|
||||
},
|
||||
// siteType:{
|
||||
// type: [String,Number],
|
||||
// required: false
|
||||
// },
|
||||
isInitiated:{
|
||||
type: [Boolean,String],
|
||||
required: false,
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
<el-button type="primary" @click="submitFormBatch">确 定</el-button>
|
||||
<el-button @click="cancelBatch">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
:data="emisWaybillList"
|
||||
:showSearch.sync="showSearch"
|
||||
:total="total"
|
||||
:queryParams="queryParams"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<div slot="toolbar">
|
||||
@ -105,8 +106,7 @@
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleUpload"
|
||||
v-hasPermi="['emis:emisTmsScanRecord:add']"
|
||||
@click="handleBatchRegister"
|
||||
>批量登记</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -160,11 +160,30 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
||||
<el-form ref="formBatch" :model="formBatch" size="mini" label-width="60px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('运单号')" prop="billCode">
|
||||
<el-input v-model="formBatch.billCode" type="textarea" :rows="8" placeholder="运单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="padding-left: 60px;font-size: 12px;"> T0123219321 有问题</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="text-align:center">
|
||||
<el-button type="primary" @click="submitFormBatch">确 定</el-button>
|
||||
<el-button @click="cancelBatch">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo, delEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
||||
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
||||
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
||||
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
||||
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||
@ -192,10 +211,12 @@ export default {
|
||||
total: 0,
|
||||
// 问题件表格数据
|
||||
emisWaybillList: [],
|
||||
// 弹出层标题
|
||||
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
titleBatch:"",
|
||||
openBatch:false,
|
||||
|
||||
problemId:null,
|
||||
problemType:null,
|
||||
openForm: false,
|
||||
@ -220,7 +241,9 @@ export default {
|
||||
daterangeUpdateTime: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
formBatch:{},
|
||||
dataMap:[],
|
||||
queryParams:{}
|
||||
// 表单校验
|
||||
// rules: {
|
||||
// id: [
|
||||
@ -246,6 +269,10 @@ export default {
|
||||
this.modifyNotifySite=null;
|
||||
this.modifyNotifySiteName=null;
|
||||
},
|
||||
cancelBatch() {
|
||||
this.openBatch = false;
|
||||
this.formBatch={};
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
@ -253,21 +280,52 @@ export default {
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
onScanSiteSelect(item){
|
||||
if(!item){
|
||||
this.form.modifyNotifySite = null;
|
||||
this.form.modifyNotifySiteName = null;
|
||||
return;
|
||||
}
|
||||
this.form.notifySite=item && item.siteCode;
|
||||
this.form.notifySiteName=item && item.siteName;
|
||||
},
|
||||
onproblemTypeSelect(item){
|
||||
// debugger;
|
||||
if(!item){
|
||||
this.form.problemType = null;
|
||||
this.form.problemId = null;
|
||||
return;
|
||||
}
|
||||
this.form.problemType = item.typeName;
|
||||
this.form.problemId=item.id;
|
||||
},
|
||||
handleInput(item){
|
||||
this.form.picUrl = item;
|
||||
},
|
||||
onModifyScanSiteSelect(item){
|
||||
onModifyScanSiteSelect(item){
|
||||
if(!item){
|
||||
this.form.modifyNotifySite = null;
|
||||
this.form.modifyNotifySiteName = null;
|
||||
return;
|
||||
}
|
||||
this.form.modifyNotifySite=item && item.siteCode;
|
||||
this.form.modifyNotifySiteName=item && item.siteName;
|
||||
},
|
||||
handleBatchRegister(){
|
||||
if(this.form.notifySite==null || this.form.notifySite==''){
|
||||
this.$message.error("请选择通知网点");
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.form.problemType==null || this.form.problemType==''){
|
||||
this.$message.error("请选择问题类型");
|
||||
return;
|
||||
}
|
||||
this.formBatch = {
|
||||
billCode: null,
|
||||
}
|
||||
this.titleBatch="批量登记";
|
||||
this.openBatch=true;
|
||||
},
|
||||
handleBatchModify(){
|
||||
if(this.ids !=null && this.ids.length>0){
|
||||
this.open=true;
|
||||
@ -281,7 +339,6 @@ export default {
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.form.notifySite==null || this.form.notifySite==''){
|
||||
this.$message.error("请选择通知网点");
|
||||
return;
|
||||
@ -293,14 +350,15 @@ export default {
|
||||
}
|
||||
|
||||
if(this.dataMap[this.form.billCode]){
|
||||
this.$message.error("重复扫描");
|
||||
this.$message.error("重复登记");
|
||||
this.playNoticeTone(1);
|
||||
return;
|
||||
}
|
||||
this.getWaybill(this.form.billCode)
|
||||
},
|
||||
getWaybill(billCode){
|
||||
this.loading = true;
|
||||
|
||||
listEmisWaybill({billCode:this.form.billCode}).then(response => {
|
||||
// this.emisWaybillList = [];
|
||||
listEmisWaybill({billCode:billCode}).then(response => {
|
||||
this.loading = false;
|
||||
let scanDate = new Date();
|
||||
if(response.code != 200){
|
||||
@ -331,7 +389,6 @@ export default {
|
||||
this.dataMap[this.form.billCode]=record;
|
||||
}
|
||||
this.form.billCode=null;
|
||||
|
||||
})
|
||||
},
|
||||
handleUpload(){
|
||||
@ -411,6 +468,7 @@ export default {
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
let newList = [];
|
||||
debugger
|
||||
for(let i = 0; i< this.emisWaybillList.length;i++){
|
||||
let waybill = {...this.emisWaybillList[i]};
|
||||
if(this.ids.indexOf(waybill.id) > -1){
|
||||
@ -420,10 +478,26 @@ export default {
|
||||
}else{
|
||||
newList.push(waybill);
|
||||
}
|
||||
this.emisWaybillList = newList;
|
||||
}
|
||||
this.emisWaybillList = newList;
|
||||
this.open = false;
|
||||
},
|
||||
submitFormBatch(){
|
||||
if(this.formBatch.billCode==null || this.formBatch.billCode==''){
|
||||
this.$message.error("输入单号后回车");
|
||||
return;
|
||||
}
|
||||
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
||||
bcList.forEach(code => {
|
||||
if(this.dataMap[code]){
|
||||
this.$message.error("重复登记:"+code);
|
||||
this.playNoticeTone(1);
|
||||
return;
|
||||
}
|
||||
this.getWaybill(code)
|
||||
});
|
||||
this.openBatch=false;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
let ids = [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user