ywj_dev
anthonywj 2 years ago
parent a4c6541780
commit 6ff5b2a359

@ -4,9 +4,9 @@
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="单据类型:"> <el-form-item class="query-form-item" label="单据类型:">
<el-input <el-input
v-model="filterQuery.name" v-model="filterQuery.name"
placeholder="请输入单据类型" placeholder="请输入单据类型"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="出入库类型:"> <el-form-item class="query-form-item" label="出入库类型:">
@ -32,13 +32,13 @@
> >
<el-button type="primary" icon="el-icon-download" @click="exportJsonFile"></el-button> <el-button type="primary" icon="el-icon-download" @click="exportJsonFile"></el-button>
<el-upload <el-upload
:action="uploadFileUrl" :action="uploadFileUrl"
multiple multiple
:limit="3" :limit="3"
:headers="headers" :headers="headers"
:show-file-list="false" :show-file-list="false"
:on-success="handleChange" :on-success="handleChange"
:file-list="fileList" :file-list="fileList"
> >
<el-button icon="el-icon-upload2" type="primary">导入单据类型</el-button> <el-button icon="el-icon-upload2" type="primary">导入单据类型</el-button>
</el-upload> </el-upload>
@ -79,15 +79,15 @@
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click.native.stop="handleModifyClick(scope.row)" @click.native.stop="handleModifyClick(scope.row)"
>编辑 >编辑
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
:disabled="!configParams.typeScan" :disabled="!configParams.typeScan"
@click.native.stop="deleteDialog(scope.row)" @click.native.stop="deleteDialog(scope.row)"
>删除 >删除
</el-button </el-button
> >
@ -97,14 +97,14 @@
</el-table> </el-table>
<el-dialog <el-dialog
title="新增扫码单据类型" title="新增扫码单据类型"
:visible.sync="addDialogVisible" :visible.sync="addDialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="addDialogVisible" v-if="addDialogVisible"
class="dialog-two" class="dialog-two"
width="60%" width="60%"
top="5vh" top="5vh"
> >
<modifyDialog :inputQuery="inputQuery"></modifyDialog> <modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -122,13 +122,13 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="编辑单据类型" title="编辑单据类型"
:visible.sync="modifyDialogVisible" :visible.sync="modifyDialogVisible"
width="70%" width="70%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="modifyDialogVisible" v-if="modifyDialogVisible"
:before-close="cancelDialog" :before-close="cancelDialog"
> >
<modifyDialog :inputQuery="inputQuery" :modifySubmit="onModifySubmit"></modifyDialog> <modifyDialog :inputQuery="inputQuery" :modifySubmit="onModifySubmit"></modifyDialog>
<div style="text-align: center;margin-top: 12px"> <div style="text-align: center;margin-top: 12px">
@ -145,11 +145,11 @@
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
@pagination="getList" @pagination="getList"
></pagination> ></pagination>
</el-card> </el-card>
</div> </div>
@ -243,10 +243,10 @@ export default {
thrCheckChange: null, thrCheckChange: null,
thrCheckBalance: null, thrCheckBalance: null,
thrCheckCopy: null, thrCheckCopy: null,
advancePreIn:false, advancePreIn: false,
checkVailDate: 0, // checkVailDate: 0, //
checkExpire: true, // checkExpire: 0, //
checkCertExpire: false, // checkCertExpire: 0, //
}, },
enableMap: { enableMap: {
@ -294,20 +294,20 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
getBusTypeList(this.filterQuery) getBusTypeList(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val; this.filterQuery.page = val;
@ -340,12 +340,12 @@ export default {
return; return;
} }
if(this.inputQuery.preInBack==1){ if (this.inputQuery.preInBack == 1) {
if(isBlank(this.inputQuery.backPreinType)){ if (isBlank(this.inputQuery.backPreinType)) {
this.$message.error("请选择预验收剩余库存退库方式!"); this.$message.error("请选择预验收剩余库存退库方式!");
return; return;
} }
if(isBlank(this.inputQuery.preInBackAction)){ if (isBlank(this.inputQuery.preInBackAction)) {
this.$message.error("请选择预验收退库单据类型!"); this.$message.error("请选择预验收退库单据类型!");
return; return;
} }
@ -356,18 +356,18 @@ export default {
// return; // return;
// } // }
insertBusType(this.inputQuery) insertBusType(this.inputQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false; this.loading = false;
}); this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
}, },
onModifySubmit() { onModifySubmit() {
@ -398,26 +398,26 @@ export default {
// } // }
updateBusType(this.inputQuery) updateBusType(this.inputQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false; this.loading = false;
this.cancelDialog(); this.cancelDialog();
}); this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
}, },
exportJsonFile() { exportJsonFile() {
exportFile().then((response) => { exportFile().then((response) => {
const binaryData = []; const binaryData = [];
binaryData.push(response); binaryData.push(response);
let url = window.URL.createObjectURL( let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/json"}) new Blob(binaryData, {type: "application/json"})
); );
this.loading = false; this.loading = false;
const eleLink = document.createElement('a'); const eleLink = document.createElement('a');
@ -501,11 +501,11 @@ export default {
thrCheckChange: null, thrCheckChange: null,
thrCheckBalance: null, thrCheckBalance: null,
thrCheckCopy: null, thrCheckCopy: null,
advancePreIn:false, advancePreIn: false,
checkVailDate: 0, // checkVailDate: 0, //
checkExpire: true, // checkExpire: true, //
checkCertExpire: false, // checkCertExpire: false, //
backPreinType:1, backPreinType: 1,
} }
this.addDialogVisible = true; this.addDialogVisible = true;
}, },
@ -521,11 +521,11 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.deleteOrders(rowId); this.deleteOrders(rowId);
}) })
.catch(() => { .catch(() => {
}); });
}, },
deleteOrders(data) { deleteOrders(data) {
@ -534,20 +534,20 @@ export default {
id: data.id + "", id: data.id + "",
}; };
deleteBusType(tquery) deleteBusType(tquery)
.then((response) => { .then((response) => {
this.getList(); this.getList();
if (response.code == 20000) { if (response.code == 20000) {
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
}); });
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
if (response.code != 20000) { if (response.code != 20000) {
@ -566,13 +566,13 @@ export default {
}, },
getSyncConfig() { getSyncConfig() {
findConfig() findConfig()
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.configParams = response.data; this.configParams = response.data;
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
}, },
components: { components: {

@ -164,8 +164,9 @@
<el-form-item label="是否检查过期" prop="prefix"> <el-form-item label="是否检查过期" prop="prefix">
<el-select v-model="inputQuery.checkExpire" <el-select v-model="inputQuery.checkExpire"
style="width: 90%" placeholder="" clearable> style="width: 90%" placeholder="" clearable>
<el-option label="是" :value="true"></el-option> <el-option label="不处理" :value=0></el-option>
<el-option label="否" :value="false"></el-option> <el-option label="弹框提醒" :value=1></el-option>
<el-option label="禁止录入" :value=2></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -176,8 +177,9 @@
<el-form-item label="是否检查资质过期" prop="prefix"> <el-form-item label="是否检查资质过期" prop="prefix">
<el-select v-model="inputQuery.checkCertExpire" <el-select v-model="inputQuery.checkCertExpire"
style="width: 90%" placeholder="" clearable> style="width: 90%" placeholder="" clearable>
<el-option label="是" :value="true"></el-option> <el-option label="不处理" :value=0></el-option>
<el-option label="否" :value="false"></el-option> <el-option label="弹框提醒" :value=1></el-option>
<el-option label="禁止录入" :value=2></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -419,7 +421,7 @@
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-col span="5"> <el-col span="5">
<el-select v-model="inputQuery.preInBack" <el-select v-model="inputQuery.preInBack"
:disabled="inputQuery.scanPreIn ==false " @change="getPreInBack" :disabled="inputQuery.scanPreIn ==false " @change="getPreInBack"
style="width: 65%" style="width: 65%"
placeholder="是否退回" clearable placeholder="是否退回" clearable
> >
@ -439,7 +441,7 @@
</el-col> </el-col>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-col span="5"> <el-col span="5">
<el-select v-model="inputQuery.backPreinType" style="width: 65%" clearable> <el-select v-model="inputQuery.backPreinType" style="width: 65%" clearable>
<el-option label="按单使用和退库" :value="1"></el-option> <el-option label="按单使用和退库" :value="1"></el-option>
<el-option label="按货位(仓库)使用和退库" :value="2"></el-option> <el-option label="按货位(仓库)使用和退库" :value="2"></el-option>
</el-select> </el-select>
@ -457,7 +459,7 @@
</el-col> </el-col>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-col span="5"> <el-col span="5">
<el-select v-model="inputQuery.preInBackAction" style="width: 65%" clearable> <el-select v-model="inputQuery.preInBackAction" style="width: 65%" clearable>
<el-option <el-option
v-for="item in preInBackList" v-for="item in preInBackList"
:key="item.name" :key="item.name"
@ -1128,7 +1130,7 @@
import {candidateBusType} from '@/api/basic/busType' import {candidateBusType} from '@/api/basic/busType'
import busTypeAdvancedSettings from '@/views/basic/busType/busTypeAdvancedSettings.vue' import busTypeAdvancedSettings from '@/views/basic/busType/busTypeAdvancedSettings.vue'
import {isBlank} from '@/utils/strUtil' import {isBlank} from '@/utils/strUtil'
import {getOriginBusType,selectList} from '@/api/basic/busOriginType' import {getOriginBusType, selectList} from '@/api/basic/busOriginType'
import {getBasicUnitMaintains2} from '@/api/basic/basicUnitMaintain' import {getBasicUnitMaintains2} from '@/api/basic/basicUnitMaintain'
export default { export default {
@ -1263,17 +1265,17 @@ export default {
}, },
selectBussinessList(){ selectBussinessList() {
selectList().then((res) => { selectList().then((res) => {
this.preInBackList=res.data; this.preInBackList = res.data;
}) })
}, },
getPreInBack(){ getPreInBack() {
if(this.inputQuery.preInBack==false){ if (this.inputQuery.preInBack == false) {
this.inputQuery.preInBackAction=null; this.inputQuery.preInBackAction = null;
this.inputQuery.backPreinType=''; this.inputQuery.backPreinType = '';
}else{ } else {
this.inputQuery.backPreinType=1; this.inputQuery.backPreinType = 1;
} }
}, },
// //
@ -1359,9 +1361,9 @@ export default {
this.selectBussinessList() this.selectBussinessList()
this.oldData = Object.assign({}, this.inputQuery) this.oldData = Object.assign({}, this.inputQuery)
debugger debugger
if(this.inputQuery.id==null || this.inputQuery.id==''){ if (this.inputQuery.id == null || this.inputQuery.id == '') {
this.inputQuery.codeFillCheck=false; this.inputQuery.codeFillCheck = false;
this.inputQuery.preInBack=false; this.inputQuery.preInBack = false;
} }
} }

Loading…
Cancel
Save