feat: Add import in '设配报销'
This commit is contained in:
parent
b874f3a316
commit
48a5dcf551
|
@ -27,6 +27,8 @@ const salesAPI = {
|
|||
case 'xqgl':
|
||||
url ="/apis/mdh/xqgl/importExcel";
|
||||
break;
|
||||
case 'repair':
|
||||
url ="/apis/repairEvent/importExcel";
|
||||
default:''
|
||||
}
|
||||
return axios.post(`${base.url}${url}`, param, {
|
||||
|
|
|
@ -141,7 +141,6 @@ export default {
|
|||
|
||||
handleSuccess(response, file, fileList) {
|
||||
this.uploading = false;
|
||||
this.$message.success('文件上传成功');
|
||||
const _self = this;
|
||||
setTimeout(() => {
|
||||
_self.$emit('success', response, file, fileList);
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<el-button type="primary" @click="search()">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="dialogVisible = true">导入</el-button>
|
||||
<el-button type="primary" v-has="'nhfx:index:import'" @click="dialogVisible = true">导入</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<div class="sys-operate">
|
||||
<el-button type="primary" v-has="'repair:repair:add'" @click="add()">新增</el-button>
|
||||
<el-button type="primary" v-has="'repair:repair:remove'" @click="remove()" :disabled="btnDelDisabled">删除</el-button>
|
||||
<el-button type="primary" v-has="'repair:repair:import'" @click="showUserImportDialog = true">导入</el-button>
|
||||
<!-- <el-button type="primary" @click="add()">增加</el-button>
|
||||
<el-button type="primary" @click="remove()" :disabled="btnDelDisabled">删除</el-button>-->
|
||||
<!-- <el-button type="primary" @click="send()" :disabled="btnOtherDisabled">维修转派</el-button>-->
|
||||
|
@ -97,19 +98,32 @@
|
|||
></el-pagination>
|
||||
</div>
|
||||
<DialogChooseSingleUser :visible.sync="chooseUserVisible" @change="getUser"></DialogChooseSingleUser>
|
||||
<dialog-import-file
|
||||
v-if="showUserImportDialog"
|
||||
:visible.sync="showUserImportDialog"
|
||||
title="设备保修批量导入"
|
||||
source="repair"
|
||||
:upload-data="{ type: 'user' }"
|
||||
@success="handleUserImportSuccess"
|
||||
@close="showUserImportDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatDateTime } from "@/utils/tools.js";
|
||||
import DialogChooseSingleUser from "../../components/System/dialogChooseSingleUser";
|
||||
import DialogImportFile from '@/components/Dialog/dialogImportFile.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
DialogChooseSingleUser
|
||||
DialogChooseSingleUser,
|
||||
DialogImportFile,
|
||||
},
|
||||
name: "repair_index_unhandle",
|
||||
data() {
|
||||
return {
|
||||
showUserImportDialog:false,
|
||||
depOptions: [],
|
||||
selectDeptId:[],
|
||||
total: 0, //总条数
|
||||
|
@ -171,6 +185,9 @@ export default {
|
|||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
handleUserImportSuccess(response, file, fileList) {
|
||||
this.getList()
|
||||
},
|
||||
sortChange({ column, prop, order }){
|
||||
let j={ column, prop, order };
|
||||
let order_=j.order=="ascending"?'asc':'desc'
|
||||
|
|
Loading…
Reference in New Issue