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