Merge branch 'repair'

This commit is contained in:
Vinjor 2024-12-06 10:27:39 +08:00
commit 42ab3c72d6
53 changed files with 1632 additions and 158 deletions

View File

@ -96,4 +96,34 @@ export function getByLicenseNumber(data){
})
}
// 导出数据 年检临期
export function exportInspection(params){
return request({
url: '/base/carMain/export-inspection',
method: 'get',
params,
responseType: 'blob'
})
}
// 导出数据 保养临期
export function exportMaintenance(params){
return request({
url: '/base/carMain/export-maintenance',
method: 'get',
params,
responseType: 'blob'
})
}
// 导出数据 保险临期
export function exportInsurance(params){
return request({
url: '/base/carMain/export-insurance',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -76,3 +76,13 @@ export function getByNameAndMobile(data){
data
})
}
// 导出数据
export function exportData(params){
return request({
url: '/base/custom/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -87,3 +87,13 @@ export function exportActiveMainExcel(params) {
responseType: 'blob'
})
}
// 导出数据
export function exportData(params){
return request({
url: '/member/active-main/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -60,3 +60,12 @@ export function exportCouponExcel(params) {
responseType: 'blob'
})
}
// 导出数据
export function exportData(params){
return request({
url: '/member/coupon/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -59,3 +59,13 @@ export function getLevelAll(params) {
params,
})
}
// 导出数据
export function exportData(params){
return request({
url: '/member/level/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -69,3 +69,13 @@ export function getOrderCensus(){
method: "get"
})
}
// 导出数据
export function exportData(params){
return request({
url: "/repair/order-info/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -34,3 +34,13 @@ export function getOtherByName(name){
method: "get"
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: "get",
params,
responseType: 'blob'
})
}

View File

@ -43,9 +43,9 @@ export function getRepairProjectPage(params) {
})
}
// 导出维修项目 Excel
export function exportRepairProjectExcel(params) {
export function exportData(params) {
return request({
url: '/repair/project/export-excel',
url: '/repair/project/export',
method: 'get',
params,
responseType: 'blob'

View File

@ -83,3 +83,13 @@ export function getIfLeader(){
method: "get"
})
}
// 导出数据
export function exportData(params){
return request({
url: '/repair/worker/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -61,3 +61,13 @@ export function inWare(data){
data
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -34,3 +34,22 @@ export function getMapBySoIdAndQuery(id, query){
method: 'get'
})
}
// 根据供应商查询该供应商采购过的配件 分页
export function getSoBySupplier(params){
return request({
url: preUrl + "/getSoBySupplier",
method: 'get',
params
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -36,3 +36,13 @@ export function getSt(id){
method: "get"
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -18,3 +18,13 @@ export function getStIsWares(ids){
method: "get"
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -59,3 +59,13 @@ export function getBaseSupplierList(){
method: 'get'
})
}
// 导出数据
export function exportData(params){
return request({
url: '/supplier/baseSupplier/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -88,3 +88,13 @@ export function getByIds(ids){
method: 'get'
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -200,3 +200,23 @@ export function getCusAndCarById(id){
method: 'get'
})
}
// 导出数据
export function exportData(params){
return request({
url: preUrl + "/export",
method: 'get',
params,
responseType: 'blob'
})
}
// 导出数据 根据工单状态
export function exportByStatus(params){
return request({
url: preUrl + "/exportByStatus",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -50,3 +50,13 @@ export function getWaresByName(name){
})
}
// 导出数据
export function exportData(params){
return request({
url: "/repair/wares/export",
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -21,6 +21,10 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-s-comment" size="mini">一键提醒</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -133,6 +137,21 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return CarMainApi.exportInspection(params)
}).then(response => {
this.$download.excel(response, '年检临期提醒数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
};
</script>

View File

@ -143,6 +143,21 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return CarMainApi.exportInsurance(params);
}).then(response => {
this.$download.excel(response, '保险临期提醒数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
};
</script>

View File

@ -21,6 +21,10 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-s-comment" size="mini">一键提醒</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -138,6 +142,21 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return CarMainApi.exportMaintenance(params);
}).then(response => {
this.$download.excel(response, '保养临期提醒数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
};
</script>

View File

@ -25,6 +25,10 @@
v-hasPermi="['base:customer-main:create']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -249,15 +253,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有客户管理数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await CustomerMainApi.exportCustomerMainExcel(this.queryParams);
this.$download.excel(data, '客户管理.xls');
} catch {
} finally {
return CustomerMainApi.exportData(params);
}).then(response => {
this.$download.excel(response, '客户数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
}
};

View File

@ -0,0 +1,121 @@
<template>
<el-dialog :title="upload.title" :visible.sync="dialogVisible" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport"/>
是否更新已经存在的数据
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<el-link v-if="isDownload" type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
@click="importTemplate">下载模板
</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm" :disabled="!isUpload"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import request, {getBaseHeader} from "@/utils/request";
export default {
name: "ImportCommon",
data() {
return {
//
upload: {
//
title: "",
//
headers: getBaseHeader(),
//
isUploading: false,
//
updateSupport: 0,
//
url: "/import-data",
//
getUrl: "/get-import-template",
},
dialogVisible: false,
baseUrl: process.env.VUE_APP_BASE_API + '/admin-api',
isUpload: false,
isDownload: false,
}
},
methods: {
open(data) {
if (data.url) {
this.isUpload = true
}
if (data.getUrl) {
this.isDownload = true
}
this.upload = Object.assign(this.upload, data)
if (this.isUpload) {
this.upload.url = this.baseUrl + data.url
}
if (this.isDownload) {
this.upload.getUrl = this.baseUrl + data.getUrl
}
this.dialogVisible = true
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.dialogVisible = false
if (response.code !== 0) {
this.$modal.msgError(response.msg)
return;
}
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
//
let data = response.data;
let text = '导入成功数量:' + data.createNames.length;
for (const name of data.createNames) {
text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + name;
}
text += '<br />更新成功数量:' + data.updateNames.length;
for (const name of data.updateNames) {
text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + name;
}
text += '<br />更新失败数量:' + Object.keys(data.failureNames).length;
for (const name in data.failureNames) {
text += '<br />&nbsp;&nbsp;&nbsp;&nbsp;' + name + '' + data.failureNames[name];
}
this.$alert(text, "导入结果", {dangerouslyUseHTMLString: true});
this.$emit('success')
},
/** 下载模板操作 */
importTemplate() {
request({
url: this.upload.getUrl,
method: 'get',
responseType: 'blob'
}).then(res => {
this.$download.excel(res, `${this.upload.title}模板.xls`);
})
},
//
submitFileForm() {
this.$refs.upload.submit();
},
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -24,6 +24,10 @@
v-hasPermi="['member:active-main:create']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -175,15 +179,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有营销活动数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await ActiveMainApi.exportActiveMainExcel(this.queryParams);
this.$download.excel(data, '营销活动.xls');
} catch {
} finally {
return ActiveMainApi.exportData(params);
}).then(response => {
this.$download.excel(response, '营销活动数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
}
};

View File

@ -31,6 +31,10 @@
v-hasPermi="['member:coupon:create']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -184,15 +188,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有基础卡券数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await CouponApi.exportCouponExcel(this.queryParams);
this.$download.excel(data, '基础卡券.xls');
} catch {
} finally {
return CouponApi.exportData(params);
}).then(response => {
this.$download.excel(response, '基础卡券数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
}
};

View File

@ -17,7 +17,10 @@
v-hasPermi="['member:level:create']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -135,15 +138,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有会员等级数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await LevelApi.exportLevelExcel(this.queryParams);
this.$download.excel(data, '会员等级.xls');
} catch {
} finally {
return LevelApi.exportData(params);
}).then(response => {
this.$download.excel(response, '会员等级数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
}
};

View File

@ -37,6 +37,10 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"/>
</el-row>
<div class="census">
@ -237,15 +241,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有维修模块 订单数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await OrderInfoApi.exportOrderInfoExcel(this.queryParams);
this.$download.excel(data, '维修模块 订单.xls');
} catch {
} finally {
return OrderInfoApi.exportData(params);
}).then(response => {
this.$download.excel(response, '订单数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
async getCensus() {
const res = await getOrderCensus()

View File

@ -17,6 +17,10 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -46,7 +50,7 @@
<script>
import OtherForm from "@/views/repair/other/OtherForm.vue";
import {getOtherPage, deleteOther} from "@/api/repair/other";
import {getOtherPage, deleteOther, exportData} from "@/api/repair/other";
export default {
name: "RepairOther",
@ -60,7 +64,9 @@ export default {
showSearch: true,
total: 0,
list: [],
loading: false
loading: false,
//
exportLoading: false,
}
},
created() {
@ -92,7 +98,22 @@ export default {
this.$modal.msgSuccess("删除成功");
await this.getList()
}catch{}
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '附加数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -153,15 +153,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有维修项目数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await RepairProjectApi.exportRepairProjectExcel(this.queryParams);
this.$download.excel(data, '维修项目.xls');
} catch {
} finally {
return RepairProjectApi.exportData(params)
}).then(response => {
this.$download.excel(response, '维修项目数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
}
};

View File

@ -25,6 +25,10 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="sendMesg()">测试发消息
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -151,15 +155,18 @@ export default {
},
/** 导出按钮操作 */
async handleExport() {
await this.$modal.confirm('是否确认导出所有维修工人数据项?');
try {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
const data = await WorkerApi.exportWorkerExcel(this.queryParams);
this.$download.excel(data, '维修工人.xls');
} catch {
} finally {
return WorkerApi.exportData(params);
}).then(response => {
this.$download.excel(response, '维修工人数据.xls');
}).finally(() => {
this.exportLoading = false;
}
});
},
}
};

View File

@ -42,11 +42,10 @@
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button type="primary" plain icon="el-icon-download" size="mini"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<!-- 急件 -->
@ -110,6 +109,9 @@
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShowIn(scope.row)"
>查看入库单
</el-button>
<el-button @click="handleInWares(scope.row)" v-if="scope.row.soStatus === '02'" size="mini" type="text"
icon="el-icon-edit-outline"
>入库
@ -231,6 +233,40 @@
<el-button @click="dialogVisible = false">取消</el-button>
</div>
</el-dialog>
<el-dialog title="入库单" :visible.sync="inDialog" width="80%" v-dialogDrag append-to-body>
<el-table :data="inData" v-loading="inLoading2" :row-key="getRowKey" :expand-row-keys="expands" @expand-change="handleExpand" :stripe="true" :show-overflow-tooltip="true">
<el-table-column type="expand">
<template slot-scope="scope">
<el-table :data="inSoiList" v-loading="inLoading3" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center" width="55">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="repairWares.name" />
<el-table-column label="单价" align="center" prop="goodsPrice" />
<el-table-column label="入库数量" align="center" prop="goodsCount" />
</el-table>
</template>
</el-table-column>
<el-table-column label="序号" align="center" width="55">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="单号" align="center" prop="soNo" />
<el-table-column label="入库时间" align="center" prop="createTime">
<template slot-scope="scope">
{{parseTime(scope.row.createTime)}}
</template>
</el-table-column>
<el-table-column label="入库人" align="center" prop="userName" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="inDialog = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
@ -240,12 +276,14 @@ import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import {DICT_TYPE} from "@/utils/dict";
import {getRepairSoPage, voidSo, getRepairSoById, inWare} from "@/api/repair/stockOperate/stockOperate";
import {getRepairSoPage, voidSo, getRepairSoById, inWare, exportData} from "@/api/repair/stockOperate/stockOperate";
import SoShow from "@/views/repair/stockOperate/Components/SoSow.vue";
import {getRepairSoiByIds, getMapBySoIdAndQuery} from "@/api/repair/stockOperate/stockOperateItem";
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue";
import {getBaseTypeList} from "@/api/base/type";
import {getUserProfile} from "@/api/system/user";
import {parseTime} from "../../../../utils/ruoyi";
export default {
name: "SoIndex",
@ -341,12 +379,63 @@ export default {
selectRowIds: [],
allSelectRows: [],
isRefresh: false,
//
exportLoading: false,
inQueryParams:{
pageNo: 1,
pageSize: 10,
userId: null,
mainId: null,
},
inDialog: false,
inData: [],
inTotal: 0,
inLoading2: false,
expands: [],
getRowKey:(row) => {
return row.id
},
inSoiList: [],
inLoading3: false
}
},
mounted() {
this.pageSo();
},
methods: {
parseTime,
async handleExpand(row, expandedRows){
let that = this
if (expandedRows.length){
that.expands = []
if (row){
that.expands.push(row.id)
try {
that.inLoading3 = true
const resSo = await getRepairSoById(row.id)
const ids = resSo.data.goodsList.map(item => item.id)
const resSoi = await getRepairSoiByIds(ids)
this.inSoiList = resSoi.data
that.inLoading3 = false
}catch{}
}
}else {
that.expands = []
}
},
async handleShowIn(row){
try {
this.inDialog = true
this.inLoading2 = true
this.inQueryParams.mainId = row.id
const user = await getUserProfile();
this.inQueryParams.userId = user.data.id
const res = await getRepairSoPage(this.inQueryParams)
this.inData = res.data.records
this.inTotal = res.data.total
this.inLoading2 = false
}catch{}
},
setSelectedRows() {
this.$nextTick(() => {
Object.keys(this.$refs).forEach(key => {
@ -631,6 +720,21 @@ export default {
// this.tableKey++
// this.selectRows = []
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '单据数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -0,0 +1,317 @@
<template>
<div>
<!-- 搜索 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="退货时间" prop="searchTimeArray">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="queryParams.searchTimeArray"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="供应商" prop="supplierId">
<SupplierChoose v-model="supplier"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">
新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<!-- 表格 -->
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center" width="55">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="单号" align="center" prop="soNo" width="200"/>
<el-table-column label="数量" align="center" prop="itemCount" width="150"/>
<el-table-column label="金额" align="center" prop="totalPrice" width="150"/>
<el-table-column label="供应商" align="center" prop="supplierName"/>
<el-table-column label="退货时间" align="center" prop="soTime"
width="150"/>
<el-table-column label="退货人" align="center" prop="userName" />
<el-table-column label="操作" fixed="right" width="180" align="center">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button size="mini" type="text" icon="el-icon-close" @click="handleVoidSo(scope.row)"
>作废
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination @pagination="getReturnList" style="margin-bottom: 3rem" v-show="total > 0" :total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
/>
<SoReturnForm ref="soReturnRef" @success="getReturnList"/>
<el-dialog title="单据详情" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
<el-card class="box-card">
<!-- 卡片头 -->
<div slot="header" class="clearfix">
<i class="el-icon-plus"/>
<span>单据信息</span>
</div>
<!-- 卡片内容 -->
<div>
<el-descriptions class="margin-top" :column="4" :size="'medium'" border style="margin-bottom: 1rem">
<el-descriptions-item>
<template slot="label">
单号
</template>
{{info.soNo}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
数量
</template>
{{info.itemCount}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
金额
</template>
{{info.totalPrice}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
退货人
</template>
{{info.userName}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
供应商
</template>
{{info.supplierName}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
退货时间
</template>
{{parseTime(info.createTime, '{y}-{m}-{d}')}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
门店
</template>
{{info.corpName}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
备注
</template>
{{info.remark}}
</el-descriptions-item>
</el-descriptions>
</div>
</el-card>
<el-card class="box-card">
<!-- 卡片头 -->
<div slot="header" class="clearfix">
<i class="el-icon-plus"/>
<span>商品信息</span>
</div>
<!-- 卡片内容 -->
<div>
<el-table v-loading="loading" :data="info.goodsList" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" prop="repairWares.name" width="180" />
<el-table-column label="商品编码" align="center" prop="repairWares.code" width="180" />
<el-table-column label="规格" align="center" prop="repairWares.model" width="180" />
<el-table-column label="数量" align="center" prop="goodsCount" width="150" />
<el-table-column label="价格" align="center" prop="goodsPrice" width="150">
<template scope="scope">
{{scope.row.goodsPrice}}
</template>
</el-table-column>
<el-table-column label="合计" align="center" prop="total" width="150">
<template scope="scope">
{{scope.row.goodsCount * scope.row.goodsPrice}}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" prop="supplierName" width="180">
<template slot-scope="scope">
{{info.supplierName}}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" prop="wareName" width="150">
<template slot-scope="scope">
{{getWareHoseName(scope.row.wareId)}}
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import SoReturnForm from "@/views/repair/stockOperate/form/SoReturnForm.vue";
import {getRepairSoById, getRepairSoPage, voidSo, exportData} from "@/api/repair/stockOperate/stockOperate";
import {getRepairSoiByIds} from "@/api/repair/stockOperate/stockOperateItem";
import {getBaseWarehouseList} from "@/api/base/warehouse";
export default {
name: "SoReturn",
components: {SoReturnForm, CorpChoose, StaffChoose, SupplierChoose},
data() {
return {
queryParams: {
pageNo: 1,
pageSize: 10,
searchTimeArray: [],
supplierId: null,
soType: "06"
},
showSearch: true,
list: [],
total: 0,
loading: false,
supplier: null,
formData: {
id: null,
remark: null
},
dialogVisible: false,
info: {},
warehouseList: [],
//
exportLoading: false,
}
},
watch:{
'supplier'(val){
if (val){
this.queryParams.supplierId = val.id
}else {
this.resetQuery()
}
}
},
mounted() {
this.getReturnList()
},
methods: {
getWareHoseName(value){
return this.warehouseList?.find(item => item.id === value)?.name
},
async handleShow(row){
try {
const res1 = await getRepairSoById(row.id)
this.dialogVisible = true
this.info = res1.data
const ids = res1.data.goodsList.map(item => item.id)
const res = await getRepairSoiByIds(ids)
this.info.goodsList = res.data
const response = await getBaseWarehouseList()
this.warehouseList = response.data
}catch{}
},
//
handleVoidSo(row) {
this.$prompt('作废备注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({value}) => {
this.formData.id = row.id
this.formData.remark = value
this.doVoidSo()
}).catch(() => {
})
},
async doVoidSo() {
try {
await voidSo(this.formData)
this.$modal.msgSuccess("作废成功")
await this.getReturnList()
} catch {
}
},
async getReturnList() {
try {
this.loading = true
const res = await getRepairSoPage(this.queryParams)
this.list = res.data.records
this.total = res.data.total
}finally {
this.loading = false
}
},
handleQuery() {
this.queryParams.pageNo = 1
this.getReturnList()
},
resetQuery() {
this.queryParams = {
pageNo: 1,
pageSize: 10,
searchTimeArray: [],
supplierId: null,
soType: "06"
}
this.supplier = null
this.handleQuery()
},
handleAdd(){
this.$refs.soReturnRef.open()
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '退货单数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>
<style scoped lang="scss">
.box-card {
margin-bottom: 10px;
}
</style>

View File

@ -31,6 +31,10 @@
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -78,7 +82,7 @@
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import {getRepairSoPage, getRepairSoById} from "@/api/repair/stockOperate/stockOperate";
import {getRepairSoPage, getRepairSoById, exportData} from "@/api/repair/stockOperate/stockOperate";
import SoShow from "@/views/repair/stockOperate/Components/SoSow.vue";
export default {
@ -128,6 +132,8 @@ export default {
loading: false,
list: [],
total: 0,
//
exportLoading: false,
}
},
mounted() {
@ -175,7 +181,22 @@ export default {
async handleShow(row){
const res = await getRepairSoById(row.id)
await this.$refs.soShow.open(res.data)
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '作废单据数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -28,11 +28,10 @@
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button type="primary" plain icon="el-icon-download" size="mini"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<!-- 表格 -->
@ -78,7 +77,7 @@
<script>
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue";
import {getSoiPage, getRepairSoiByIds} from "@/api/repair/stockOperate/stockOperateItem";
import {getSoiPage, getRepairSoiByIds, exportData} from "@/api/repair/stockOperate/stockOperateItem";
import {getBaseWarehouseList} from "@/api/base/warehouse";
export default {
@ -118,6 +117,8 @@ export default {
loading: false,
list: [],
total: 0,
//
exportLoading: false,
}
},
mounted() {
@ -168,7 +169,22 @@ export default {
getWareHoseName(value){
if (!(this.warehouseList && this.warehouseList.length > 0)) return ''
return this.warehouseList.find(item => item.id === value)?.name
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '单据明细数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -12,6 +12,12 @@
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -61,6 +67,14 @@
<el-button icon="el-icon-refresh" @click=resetByQuery>重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" v-if="type" plain icon="el-icon-plus" size="mini" @click="handleAddWares"
>添加配件</el-button>
</el-col>
</el-row>
<el-table
@cell-mouse-enter="handleCellEnter"
@cell-mouse-leave="handleCellLeave"
@ -75,7 +89,7 @@
>
<el-table-column type="selection" width="80" align="center"/>
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="规格" align="center" prop="wares.model" width="180"/>-->
<el-table-column label="配件添加人" align="center" prop="addUserName" width="180"/>
<el-table-column label="领料数量" v-if="type" align="center" prop="waresCount" width="180">
<div class="item" slot-scope="scope">
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
@ -109,6 +123,11 @@
</el-dialog>
<el-dialog title="采购单" :visible.sync="inStockDialog" width="80%" v-dialogDrag append-to-body>
<el-form :inline="true">
<el-form-item label="供应商">
<SupplierChoose v-model="chooseSupplier"/>
</el-form-item>
</el-form>
<el-descriptions class="margin-top" title="车辆信息" :column="3" border>
<el-descriptions-item>
<template slot="label">
@ -249,7 +268,7 @@
<el-form :inline="true" label-width="15rem">
<el-form-item :label="type ? '领料人' : '退料人'">
<el-select v-model="chooseStaff" multiple clearable filterable>
<el-option v-for="staff in staffs" :key="staff.id" :value="staff.userId" :label="staff.userName" />
<el-option v-for="staff in staffs" :key="staff.id" :value="staff.userId" :label="staff.userName"/>
</el-select>
</el-form-item>
<el-form-item label="图片上传">
@ -263,11 +282,13 @@
</el-dialog>
<TicketWaresShow ref="ticketWaresShow" :user-role="'repair_warehouse'" @success="getList" :type="false"/>
<TWIAdd ref="twiAdd" @success="handleSuccess" :if-house-add="true"/>
</div>
</template>
<script>
import {getPage, pass, passBackTicketWares, getByIds} from "@/api/repair/tickets/TicketWares";
import {getPage, pass, passBackTicketWares, getByIds, exportData} from "@/api/repair/tickets/TicketWares";
import {listTwItem} from "@/api/repair/tickets/TWItem";
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
import {parseTime} from "@/utils/ruoyi";
@ -281,10 +302,13 @@ import {getCarBrand} from "@/api/base/carbrand";
import {listGoods} from "@/views/partner/api/workOrder";
import {getBaseTypeList} from "@/api/base/type";
import {listByTicketId} from "@/api/repair/repairworker";
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
import TWIAdd from "@/views/repair/tickets/Components/TWIAdd.vue";
export default {
name: "WaresItem",
components: {TicketWaresShow, WarehouseChoose, SoTable},
components: {TWIAdd, SupplierChoose, StaffChoose, TicketWaresShow, WarehouseChoose, SoTable},
props: {
type: Boolean,
},
@ -332,12 +356,21 @@ export default {
images: null,
chooseStaff: [],
staffs: [],
chooseSupplier: null,
//
exportLoading: false,
}
},
mounted() {
this.getList()
},
methods: {
handleAddWares(){
this.$refs.twiAdd.open({id: this.twId})
},
handleSuccess(data){
this.getTwitemList({twId: this.twId})
},
getTypeById(id) {
return this.typeMap.get(id)
},
@ -407,7 +440,7 @@ export default {
this.images = null
this.inPhoto = true
},
async getTicketStaff(){
async getTicketStaff() {
const res = await listByTicketId(this.ticketId)
this.staffs = res.data
this.chooseStaff.push(this.formData.repairId)
@ -419,7 +452,7 @@ export default {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
if ((!this.chooseStaff || this.chooseStaff.length === 0)){
if ((!this.chooseStaff || this.chooseStaff.length === 0)) {
this.$modal.msgError(`请选择${this.type ? '领' : '退'}料人!`)
return
}
@ -441,6 +474,7 @@ export default {
goodsCount: item.waresCount,
}
})]
this.formData.ids = this.allSelectRows.map(item => item.id)
if (this.type) {
this.formData.items = [...this.allSelectRows.map(item => {
return {
@ -475,6 +509,7 @@ export default {
i.totalPrice = i.waresCount * i.wares.price
})
})
this.chooseSupplier = null
this.inStockDialog = true
this.dialogVisible = false
} catch {
@ -702,6 +737,10 @@ export default {
soStatus: "02",
remark: this.remark,
}
if (this.chooseSupplier) {
this.formData.supplierId = this.chooseSupplier.id
this.formData.supplierName = this.chooseSupplier.name
}
this.formData.goodsList = [...values.map(item => {
return {
soiType: '01',
@ -753,7 +792,22 @@ export default {
},
handleView(row) {
this.$refs.ticketWaresShow.open(row)
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, this.type ? '领配件数据.xls' : "退配件数据.xls");
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -4,6 +4,9 @@
<el-tab-pane label="采购单据" name="purchase">
<SoIndex :so-by-type="soByType"/>
</el-tab-pane>
<el-tab-pane label="退货单据" name="returnOrder">
<SoReturn />
</el-tab-pane>
<el-tab-pane label="急件单据" name="urgentPurchase">
<SoIndex :so-by-type="soByType" :goods-yes="true"/>
</el-tab-pane>
@ -26,10 +29,12 @@ import SoInfo from "@/views/repair/stockOperate/Components/SoInfo.vue";
import SoIndex from "@/views/repair/stockOperate/Components/SoIndex.vue";
import SoVoid from "@/views/repair/stockOperate/Components/SoVoid.vue";
import SoiTable from "@/views/repair/stockOperate/Components/SoiTable.vue";
import SoReturn from "@/views/repair/stockOperate/Components/SoReturn.vue";
export default {
name: "InStock",
components: {
SoReturn,
SoiTable,
SoVoid,
SoIndex,

View File

@ -0,0 +1,260 @@
<template>
<div>
<el-dialog title="新增退货单" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
<el-form :inline="true">
<el-form-item label="供应商">
<SupplierChoose v-model="chooseSupplier" />
</el-form-item>
<el-form-item label="关键字">
<el-input v-model="queryParams.query" placeholder="名称、编码、规格"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @selection-change="selectRow" ref="showTable">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="商品名称" prop="wares.name" align="center" />
<el-table-column label="商品编码" prop="wares.code" align="center" />
<el-table-column label="规格型号" prop="wares.model" align="center" />
<el-table-column label="库存数量" prop="wares.stock" align="center" />
<el-table-column label="计量单位" prop="wares.unit" align="center">
<template slot-scope="scope">
<dict-tag :value="scope.row.wares.unit" :type="DICT_TYPE.REPAIR_UNIT" />
</template>
</el-table-column>
<el-table-column label="所属仓库" prop="wares.warehouse" align="center">
<template slot-scope="scope">
{{getWarehouseName(scope.row.wares.warehouse)}}
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination @pagination="getListBySupplier" style="margin-bottom: 3rem" v-show="total > 0" :total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBefore" :disabled="!selectRows || selectRows.length === 0">确定</el-button>
<el-button type="primary" @click="dialogVisible = false">取消</el-button>
</div>
</el-dialog>
<el-dialog title="设置数量" :visible.sync="settingDialog" width="60%" v-dialogDrag append-to-body>
<el-form :inline="true">
<el-form-item label="备注">
<el-input v-model="remark" />
</el-form-item>
</el-form>
<el-table :data="chooseRows" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center" width="55">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="名称" prop="wares.name" align="center" />
<el-table-column label="库存数量" prop="wares.stock" align="center" />
<el-table-column label="退货数量" prop="wares.returnCount" align="center">
<template slot-scope="scope">
<el-input-number style="width: 15rem" v-model="scope.row.wares.returnCount" :max="scope.row.wares.stock" :min="0" />
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit-delete" @click="removeRow(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submit" :disabled="!chooseRows || chooseRows.length === 0">确定</el-button>
<el-button type="primary" @click="settingDialog = false">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
import {getSoBySupplier} from "@/api/repair/stockOperate/stockOperateItem";
import {getBaseWarehouseList} from "@/api/base/warehouse";
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
import {createRepairSo} from "@/api/repair/stockOperate/stockOperate";
export default {
name: "SoReturnForm",
components: {SupplierChoose},
data(){
return{
dialogVisible: false,
formData:{
supplierId: null,
supplierName: null,
},
list:[],
loading: false,
queryParams:{
pageNo: 1,
pageSize: 10,
supplierId: null,
query: null
},
total: 0,
warehouseList: [],
chooseSupplier: null,
selectRows: [],
isRefresh: false,
settingDialog: false,
chooseRows: [],
remark: null
}
},
watch:{
'chooseSupplier'(val){
if (val){
this.queryParams.supplierId = val.id
this.formData.supplierId = val.id
this.formData.supplierName = val.name
this.getListBySupplier()
}else {
this.resetQueryParams()
}
}
},
methods:{
removeRow(row){
const index = this.chooseRows.findIndex(item => item.id === row.id)
this.chooseRows.splice(index, 1)
},
selectRow(row){
//
const oldIds = this.selectRows.map(item => item.id)
const newData = row.filter(item => !oldIds.includes(item.id))
this.selectRows = [...this.selectRows, ...newData]
//
if (!this.isRefresh){
const selectIds = row.map(item => item.id)
const allIds = this.$refs.showTable.data.map(item => item.id)
const delIds = allIds.filter(item => !selectIds.includes(item))
if (delIds && delIds.length > 0){
this.selectRows = this.selectRows.filter(item => !delIds.includes(item.id))
}
}else {
this.isRefresh = false
}
},
handleQuery(){
this.isRefresh = true
this.queryParams.pageNo = 1
this.getListBySupplier()
},
resetQuery(){
this.resetQueryParams()
},
getWarehouseName(id){
if (!this.warehouseList || this.warehouseList.length === 0){
this.getWarehouseList()
}
if (id){
const index = this.warehouseList.findIndex(item => item.id === id)
return this.warehouseList[index].name
}
return ""
},
async getWarehouseList(){
const response = await getBaseWarehouseList()
this.warehouseList = response.data
},
async getListBySupplier(){
if (this.queryParams.supplierId){
try {
this.loading = true
const res = await getSoBySupplier(this.queryParams)
this.list = res.data.records
this.total = res.data.total
this.$nextTick(() => {
this.$refs.showTable.clearSelection();
this.selectRows.forEach(row => {
const matchingRow = this.list.find(item => item.id === row.id);
if (matchingRow) {
this.$refs.showTable.toggleRowSelection(matchingRow, true);
}
});
})
}finally {
this.loading = false
}
}else {
this.resetQueryParams()
this.$modal.msgWarning("请先选择供应商")
}
},
async open(){
this.resetFormData()
await this.getWarehouseList()
this.dialogVisible = true
},
resetFormData(){
this.chooseSupplier = null
this.formData = {}
this.resetForm("formRef")
},
submitBefore(){
this.chooseRows = this.selectRows.map(item => {
const newItem = JSON.parse(JSON.stringify(item));
newItem.wares.returnCount = 0;
return newItem;
});
this.settingDialog = true
this.remark = null
},
async submit(){
try {
const flag = this.chooseRows.filter(item => item.wares.returnCount === 0)
if (flag && flag.length > 0){
this.$modal.msgError(`${flag[0].wares.name}的退货数量为0`)
return
}
this.formData.remark = this.remark
this.formData.soType = "06"
this.formData.soNo = createUniqueCodeByHead("TH")
this.formData.itemCount = this.chooseRows.length
this.formData.totalPrice = this.chooseRows.map(item => item.wares.purPrice || 0).reduce((x, y) => x + y, 0)
this.formData.goodsList = this.chooseRows.map(item => {
return {
soiType: "06",
goodsId: item.wares.id,
wareId: item.wares.warehouse,
goodsCount: item.wares.returnCount,
goodsPrice: item.wares.purPrice,
}
})
await createRepairSo(this.formData)
this.dialogVisible = false
this.settingDialog = false
this.$modal.msgSuccess("新增成功")
this.$emit('success')
}catch{}
},
resetQueryParams(){
this.formData.supplierId = null
this.formData.supplierName = null
this.queryParams = {
pageNo: 1,
pageSize: 10,
supplierId: null,
query: null
}
this.list = []
this.total = 0
this.chooseSupplier = null
this.selectRows = []
this.isRefresh = false
}
}
}
</script>
<style scoped lang="scss">
</style>

View File

@ -32,6 +32,10 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -98,7 +102,7 @@
<script>
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import {getStPage, voidSt} from "@/api/repair/stockTransfer/stockTransfer";
import {getStPage, voidSt, exportData} from "@/api/repair/stockTransfer/stockTransfer";
import {getCompanyList} from "@/api/base/company";
import StShow from "@/views/repair/stockTransfer/Components/StShow.vue";
@ -139,7 +143,9 @@ export default {
list: [],
total: 0,
formData:{},
companyList: []
companyList: [],
//
exportLoading: false,
}
},
mounted() {
@ -197,6 +203,21 @@ export default {
}
this.$refs.stShow.open(row)
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '调拨数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -26,6 +26,10 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -75,7 +79,7 @@
<script>
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import {getStPage} from "@/api/repair/stockTransfer/stockTransfer";
import {getStPage, exportData} from "@/api/repair/stockTransfer/stockTransfer";
import {getCompanyList} from "@/api/base/company";
import StShow from "@/views/repair/stockTransfer/Components/StShow.vue";
@ -99,7 +103,9 @@ export default {
loading: false,
list: [],
total: 0,
corpList: []
corpList: [],
//
exportLoading: false,
}
},
mounted() {
@ -144,7 +150,22 @@ export default {
this.queryParams.inCorpId = this.queryParams?.inCorp?.id
this.queryParams.outCorpId = this.queryParams?.outCorp?.id
this.getPage()
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '作废数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -27,9 +27,8 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-download" size="mini"
>导出
</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
@ -79,7 +78,7 @@
</template>
<script>
import {getStiPage, getStIsWares} from "@/api/repair/stockTransfer/stockTransferItem";
import {getStiPage, getStIsWares, exportData} from "@/api/repair/stockTransfer/stockTransferItem";
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import {getCompanyList} from "@/api/base/company";
@ -117,7 +116,9 @@ export default {
loading: false,
list: [],
total: 0,
corpList: []
corpList: [],
//
exportLoading: false,
}
},
mounted() {
@ -159,7 +160,22 @@ export default {
this.queryParams.outCorp = null
this.queryParams.inCorp = null
this.handleQuery()
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '调拨详细数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -18,6 +18,10 @@
v-hasPermi="['supplier:base-supplier:create']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -144,7 +148,21 @@ export default {
} catch {
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return BaseSupplierApi.exportData(params);
}).then(response => {
this.$download.excel(response, '供应商数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
};
</script>

View File

@ -129,6 +129,13 @@ import {addTwi} from "@/api/repair/tickets/TWItem";
export default {
name: "TWIAdd",
components: {TreeSelect},
props:{
ifHouseAdd: {
type: Boolean,
default: false,
required: false
}
},
data(){
return{
dialogVisible: false,
@ -199,6 +206,7 @@ export default {
name: item.name
}
})]
this.formData.ifHouseAdd = this.ifHouseAdd
},
async open(row){
this.reset()

View File

@ -230,11 +230,11 @@ export default {
getLabelName() {
switch (this.itemType) {
case "project":
return "维修项目";
return "名称";
case "part":
return "维修配件";
return "名称";
case "other":
return "附加费用";
return "名称";
default:
return '';
}

View File

@ -148,11 +148,11 @@ export default {
getLabelName() {
switch (this.listType) {
case "project":
return "维修项目";
return "名称";
case "ware":
return "维修配件";
return "名称";
case "other":
return "附加费用";
return "名称";
default:
return '';
}

View File

@ -21,6 +21,10 @@
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" v-if="isType === 'all' || (isType === 'waiting' && userRole === 'repair_warehouse')" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
@ -39,6 +43,8 @@
<el-table-column label="车牌号" align="center" prop="carNo" width="180"/>
<el-table-column label="车系" align="center" prop="carBrandName" width="180"/>
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
<el-table-column label="经办人姓名" align="center" prop="handleName" width="180" />
<el-table-column label="经办人电话" align="center" prop="handleMobile" width="180" />
<el-table-column label="操作" fixed="right" align="center" width="200" v-if="userRole !== 'repair_warehouse'">
<template slot-scope="scope">
<!-- 都有 -->
@ -47,20 +53,20 @@
</el-button>
<!-- 维修工才有 -->
<el-button
v-if="(scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff') && nowUser.id === scope.row.nowRepairId"
v-if="scope.row.isFinish !== '1' && (scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff') && nowUser.id === scope.row.nowRepairId"
size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)">
接单
</el-button>
<!-- 服务顾问才有 -->
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini"
<el-button v-if=" scope.row.isFinish !== '1' && userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini"
type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
通知施工
</el-button>
<!-- 服务顾问总检班组长才有 -->
<el-button v-if="(userRole !== 'repair_staff' && scope.row.ticketsWorkStatus !== '01') || (userRole === 'repair_staff' && leader && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '04')" @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
<el-button v-if="scope.row.isFinish !== '1' && (userRole !== 'repair_staff' && scope.row.ticketsWorkStatus !== '01') || (userRole === 'repair_staff' && leader && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '04')" @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
>{{ userRole === 'general_inspection' ? "内返派工" : "修改派工" }}
</el-button>
<el-dropdown
<el-dropdown v-if="scope.row.isFinish !== '1'"
@command="(command) => handleCommand(command, scope.$index, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
@ -109,7 +115,7 @@
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看
</el-button>
<el-button v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">
<el-button v-if="scope.row.isFinish !== '1'" v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">
编辑工单
</el-button>
</template>
@ -186,7 +192,7 @@
</template>
<script>
import {getPageType, updateTake, getTicketsById, removeTicketById, setTicketsVoid} from "@/api/repair/tickets/Tickets";
import {getPageType, updateTake, getTicketsById, removeTicketById, setTicketsVoid, exportData} from "@/api/repair/tickets/Tickets";
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
import TWOperate from "@/views/repair/tickets/form/TWOperate.vue";
@ -242,6 +248,8 @@ export default {
id: null,
image: null,
},
//
exportLoading: false,
}
},
mounted() {
@ -508,7 +516,22 @@ export default {
},
handleProgress(row){
this.$refs.ticketProgress.open(row.id)
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '工单数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -35,11 +35,11 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="!(TicketType === 'tv')">
<el-button type="primary" plain icon="el-icon-download" size="mini"
>导出
</el-button>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
<TicketTable :ticket-type="TicketType" :list="list" @setVoid="getPage" :is-w-x-c-w="isCW" @success="getPage"/>
@ -53,7 +53,7 @@
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import TicketTable from "@/views/repair/tickets/Components/TicketTable.vue";
import RepairTypeChoose from "@/views/repair/Components/RepairTypeChoose.vue";
import {getTicketsPage} from "@/api/repair/tickets/Tickets";
import {getTicketsPage, exportByStatus} from "@/api/repair/tickets/Tickets";
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import {checkRole} from "@/api/system/permission";
@ -87,7 +87,9 @@ export default {
showSearch: true,
total: 0,
list: [],
isCW: false
isCW: false,
//
exportLoading: false,
}
},
mounted() {
@ -136,7 +138,34 @@ export default {
this.resetForm("queryForm")
this.queryParams.corp = null
this.handleQuery()
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportByStatus(params);
}).then(response => {
let name = ""
switch (this.TicketType){
case "tu":
name = "待结算工单数据.xls"
break
case "tp":
name = "已结算工单数据.xls"
break
case "tv":
name = "已作废工单数据.xls"
break
}
this.$download.excel(response, name);
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -64,17 +64,19 @@
<dict-tag :type="DICT_TYPE.REPAIR_TYPE" v-model="scope.row.repairType"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="ticketsWorkStatus" width="80">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.REPAIR_TICKETS_WORK_STATUS" v-model="scope.row.ticketsWorkStatus"/>
</template>
</el-table-column>
<!-- <el-table-column label="状态" align="center" prop="ticketsWorkStatus" width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :type="DICT_TYPE.REPAIR_TICKETS_WORK_STATUS" v-model="scope.row.ticketsWorkStatus"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="客户信息" align="center">
<el-table-column label="客户名称" align="center" prop="userName" width="100"/>
<el-table-column label="车牌号" align="center" prop="carNo" width="100"/>
<el-table-column label="车系" align="center" prop="carBrandName" width="100"/>
<el-table-column label="手机号" align="center" prop="userMobile" width="110"/>
</el-table-column>
<el-table-column label="经办人姓名" align="center" prop="handleName" width="180"/>
<el-table-column label="经办人电话" align="center" prop="handleMobile" width="180"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
@ -121,9 +123,9 @@
@click="handlePrint(scope.row)"
>下载打印
</el-button>
<el-button size="mini" v-hasPermi="['repair:tk:edit']" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">
编辑工单
</el-button>
<!-- <el-button size="mini" v-hasPermi="['repair:tk:edit']" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">-->
<!-- 编辑工单-->
<!-- </el-button>-->
<el-button size="mini" v-hasPermi="['repair:tk:remove']" type="text" icon="el-icon-remove" @click="handleRemove(scope.row)">
删除
</el-button>

View File

@ -27,6 +27,10 @@
</el-form>
<!-- 操作 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
</el-row>
@ -104,7 +108,7 @@
</template>
<script>
import {getPage, repairPassTicketWares} from "@/api/repair/tickets/TicketWares";
import {getPage, repairPassTicketWares, exportData} from "@/api/repair/tickets/TicketWares";
import TicketWaresShow from "@/views/repair/tickets/Components/TicketWaresShow.vue";
import {listTwItem} from "@/api/repair/tickets/TWItem";
@ -135,7 +139,9 @@ export default {
selections: [],
formData: {},
dialogTitle: "",
newType: false
newType: false,
//
exportLoading: false,
}
},
mounted() {
@ -218,7 +224,22 @@ export default {
await this.getList()
} catch {
}
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return exportData(params);
}).then(response => {
this.$download.excel(response, '配件申请单数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
}
</script>

View File

@ -52,6 +52,18 @@
</template>
{{ info.userMobile }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
经办人姓名
</template>
{{ info.handleName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
经办人电话
</template>
{{ info.handleMobile }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
创建时间
@ -114,34 +126,46 @@
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
参考成本
最近保养日期
</template>
{{ info.cost }}
{{ parseTime(info.maintenanceDate, '{y}-{m}-{d}') }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
参考毛利
最近保养里程
</template>
{{ info.profit }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
领料状态
</template>
<dict-tag :type="DICT_TYPE.REPAIR_PART_STATUS" v-model="info.partStatus"/>
{{ info.maintenanceMileage }}
</el-descriptions-item>
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 参考成本-->
<!-- </template>-->
<!-- {{ info.cost }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 参考毛利-->
<!-- </template>-->
<!-- {{ info.profit }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 领料状态-->
<!-- </template>-->
<!-- <dict-tag :type="DICT_TYPE.REPAIR_PART_STATUS" v-model="info.partStatus"/>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item>
<template slot="label">
服务顾问
</template>
{{ info.adviserName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
所属门店
</template>
{{ info.corpId }}
</el-descriptions-item>
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 所属门店-->
<!-- </template>-->
<!-- {{ info.corpId }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item>
<template slot="label">
工单状态

View File

@ -124,6 +124,34 @@
</template>
<el-input v-model="formData.confirmFaultMoney" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
经办人姓名
</template>
<el-input v-model="formData.handleName" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
经办人电话
</template>
<el-input v-model="formData.handleMobile" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
最近保养日期
</template>
<el-date-picker
v-model="formData.maintenanceDate"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
最近保养里程
</template>
<el-input v-model="formData.maintenanceMileage" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
预约订单选择
@ -133,7 +161,7 @@
:label="item.bookingTime"/>
</el-select>
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :span="3">
<template slot="label">
服务顾问
</template>
@ -225,10 +253,10 @@
<el-button size="small" v-if="formData.ticketType === '02'" @click="formData.ticketType = '01'">B单</el-button>
</el-col>
</el-row>
<span style="font-size: 16px">维修项目</span>
<span style="font-size: 16px">维修工时项目</span>
<TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable"
:coupon-list="couponList" @changeCoupon="changeCoupon"/>
<span style="font-size: 16px; margin:1rem 0" v-if="createTicketType">维修配件</span>
<span style="font-size: 16px; margin:1rem 0" v-if="createTicketType">更换配件清单</span>
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData"
:coupon-list="couponList" @changeCoupon="changeCoupon"
ref="partTable"/>
@ -337,6 +365,8 @@ export default {
watch: {
selectUser(val) {
if (val) {
this.formData.handleName = val.cusName
this.formData.handleMobile = val.phoneNumber
if (!val.isRes) {
this.selectCar = {}
this.bookingList = []
@ -349,6 +379,8 @@ export default {
}
}
} else {
this.formData.handleName = null
this.formData.handleMobile = null
this.selectCar = {}
this.bookingList = []
this.couponList = []
@ -407,7 +439,11 @@ export default {
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
image: null
image: null,
handleName: null,
handleMobile: null,
maintenanceDate: null,
maintenanceMileage: null
},
selectUser: {},
selectCar: {},
@ -556,7 +592,11 @@ export default {
rescueMoney: 0,
threePackMoney: 0,
confirmFaultMoney: 0,
image: null
image: null,
handleName: null,
handleMobile: null,
maintenanceDate: null,
maintenanceMileage: null
}
this.selectUser = {}
this.selectCar = {}

View File

@ -10,7 +10,7 @@
<el-tab-pane label="待处理工单" name="unInspection" v-if="userRole !== 'repair_staff'">
<TicketFinishManager :user-role="userRole" />
</el-tab-pane>
<el-tab-pane label="配件申请单" name="getApply" v-if="userRole !== 'repair_staff'">
<el-tab-pane label="配件申请单" name="getApply">
<TicketWares :type="true" :user-role="userRole"/>
</el-tab-pane>
<el-tab-pane name="finishGetWares" label="领料确认" v-if="userRole === 'repair_staff'">

View File

@ -27,6 +27,15 @@
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
>导入
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -77,16 +86,19 @@
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<WaresForm ref="formRef" @success="getList"/>
<ImportCommon ref="importRef" @success="getList"/>
</div>
</template>
<script>
import * as WaresApi from '@/api/repair/wares';
import WaresForm from './WaresForm.vue';
import ImportCommon from "@/views/components/import/ImportCommon.vue";
export default {
name: "Wares",
components: {
ImportCommon,
WaresForm,
},
data() {
@ -128,12 +140,22 @@ export default {
remark: null,
createTime: [],
},
//
exportLoading: false,
};
},
created() {
this.getList();
},
methods: {
handleImport(){
const data = {
title: "配件导入",
url: '/repair/wares/import-data',
getUrl: '/repair/wares/get-import-template'
}
this.$refs.importRef.open(data)
},
/** 查询列表 */
async getList() {
try {
@ -170,6 +192,21 @@ export default {
} catch {
}
},
/** 导出按钮操作 */
handleExport() {
this.$modal.confirm('是否确认导出当前查询条件所有数据项?').then(() => {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.exportLoading = true;
return WaresApi.exportData(params);
}).then(response => {
this.$download.excel(response, '维修配件数据.xls');
}).finally(() => {
this.exportLoading = false;
});
},
}
};
</script>

View File

@ -146,18 +146,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="岗位">
<el-select v-model="form.postIds" multiple placeholder="请选择">
<el-option
v-for="item in postOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="岗位">-->
<!-- <el-select v-model="form.postIds" multiple placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in postOptions"-->
<!-- :key="item.id"-->
<!-- :label="item.name"-->
<!-- :value="item.id"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :span="24">

View File

@ -27,10 +27,10 @@
<svg-icon icon-class="tree" />所属部门
<div class="pull-right" v-if="user.dept">{{ user.dept.name }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree" />所属岗位
<div class="pull-right" v-if="user.posts">{{ user.posts.map(post => post.name).join(',') }}</div>
</li>
<!-- <li class="list-group-item">-->
<!-- <svg-icon icon-class="tree" />所属岗位-->
<!-- <div class="pull-right" v-if="user.posts">{{ user.posts.map(post => post.name).join(',') }}</div>-->
<!-- </li>-->
<li class="list-group-item">
<svg-icon icon-class="peoples" />所属角色
<div class="pull-right" v-if="user.roles">{{ user.roles.map(role => role.name).join(',') }}</div>