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