Merge remote-tracking branch 'origin/dev' into dev
@ -36,3 +36,19 @@ export function getRepairSoById(id){
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
// 员工确认领料
|
||||
export function confirmGet(id){
|
||||
return request({
|
||||
url: preUrl + "/confirmGet?id=" + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 员工确认退料
|
||||
export function confirmBack(id){
|
||||
return request({
|
||||
url: preUrl + "/confirmBack?id=" + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -18,3 +18,11 @@ export function getRepairSoiByIds(ids){
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
||||
// 按主表ID查
|
||||
export function getRepairSoiBySoId(soId){
|
||||
return request({
|
||||
url: preUrl + "/getBySoId?soId=" + soId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.jx_report_state"
|
||||
v-for="dict in this.getDictDatas('jx_report_state')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@ -38,7 +38,7 @@
|
||||
<el-form-item label="是否面签" prop="isSign">
|
||||
<el-select v-model="queryParams.isSign" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sign_status"
|
||||
v-for="dict in this.getDictDatas('sign_status')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@ -49,7 +49,7 @@
|
||||
<el-form-item label="是否退学" prop="isReturn">
|
||||
<el-select v-model="queryParams.isReturn" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.school_return"
|
||||
v-for="dict in this.getDictDatas('school_return')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@ -161,12 +161,12 @@
|
||||
<!-- <el-table-column label="身份证" align="center" prop="identity" />-->
|
||||
<el-table-column label="状态" align="center" prop="state">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.jx_report_state" :value="scope.row.state"/>
|
||||
<dict-tag :options=" this.getDictDatas('jx_report_state')" :value="scope.row.state"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="职业" align="center" prop="prof">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.profession" :value="scope.row.prof"/>
|
||||
<dict-tag :options="this.getDictDatas('profession')" :value="scope.row.prof"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="是否面签" align="center" prop="isSign">-->
|
||||
@ -245,7 +245,7 @@
|
||||
<el-form-item label="职业" prop="prof">
|
||||
<el-radio-group v-model="form.prof">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.profession"
|
||||
v-for="dict in this.getDictDatas('profession')"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
@ -254,7 +254,7 @@
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="form.state">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.jx_report_state"
|
||||
v-for="dict in this.getDictDatas('jx_report_state')"
|
||||
:key="dict.value"
|
||||
:label="parseInt(dict.value)"
|
||||
>{{dict.label}}</el-radio>
|
||||
@ -263,7 +263,7 @@
|
||||
<el-form-item label="是否已面签" prop="isSign">
|
||||
<el-radio-group v-model="form.isSign">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sign_status"
|
||||
v-for="dict in this.getDictDatas('sign_status')"
|
||||
:key="dict.value"
|
||||
:label="parseInt(dict.value)"
|
||||
>{{dict.label}}</el-radio>
|
||||
@ -272,7 +272,7 @@
|
||||
<el-form-item label="是否退学" prop="isReturn">
|
||||
<el-radio-group v-model="form.isReturn">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.school_return"
|
||||
v-for="dict in this.getDictDatas('school_return')"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
@ -377,7 +377,7 @@
|
||||
<script>
|
||||
// import { listPay, getPay, delPay, addPay, updatePay } from "@/api/system/pay";
|
||||
import { listPay, getPay, delPay, addPay, updatePay, findJlListAll, updatePayById } from "./api/DriveSchoolPay";
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {getAccessToken} from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
name: "Pay",
|
||||
@ -396,7 +396,7 @@ export default {
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: {Authorization: "Bearer " + getToken()},
|
||||
headers: {Authorization: "Bearer " + getAccessToken()},
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/system/pay/importData"
|
||||
},
|
||||
@ -455,6 +455,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log(this.queryParams,458)
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
@ -476,7 +477,7 @@ export default {
|
||||
async okJlClick(name, id) {
|
||||
await updatePayById(this.bmId, name, id)
|
||||
this.isJl = false
|
||||
|
||||
console.log(479479)
|
||||
listPay(this.queryParams).then(response => {
|
||||
this.payList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
@ -493,6 +494,7 @@ export default {
|
||||
/** 查询订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
console.log(this.queryParams,496)
|
||||
listPay(this.queryParams).then(response => {
|
||||
this.payList = response.rows;
|
||||
this.total = response.total;
|
||||
|
70
src/views/inspection/screen/api/jcBigScreen.js
Normal file
@ -0,0 +1,70 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 客户来源分析饼图
|
||||
export function chartLineInspectionAmount(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newChartLineInspectionAmount',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 已收款金额
|
||||
export function getServerData1(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newChartInfoAmount',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 数量统计
|
||||
export function chartInfoNum(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newChartInfoNum',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 数量统计
|
||||
export function chartLineInspectionNum(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newChartLineInspectionNum',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 检测合格率
|
||||
export function chartInfoRatio(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newChartInfoRatio',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 五条
|
||||
export function getfive1(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newStaticsTable1',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 五条
|
||||
export function getfive2(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newStaticsTable2',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 五条
|
||||
export function getfive3(params) {
|
||||
return request({
|
||||
url: '/partnerOwn/partner/newStaticsTable3',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
BIN
src/views/inspection/screen/imgs/1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/views/inspection/screen/imgs/2.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/views/inspection/screen/imgs/3.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/views/inspection/screen/imgs/4.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/views/inspection/screen/imgs/5.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/views/inspection/screen/imgs/back.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
src/views/inspection/screen/imgs/c_list.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
src/views/inspection/screen/imgs/c_title.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
src/views/inspection/screen/imgs/numbcak.png
Normal file
After Width: | Height: | Size: 154 B |
BIN
src/views/inspection/screen/imgs/title.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
src/views/inspection/screen/imgs/top.png
Normal file
After Width: | Height: | Size: 100 KiB |
13
src/views/inspection/screen/inspectionBigScreen.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'inspectionBigScreen.vue'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
676
src/views/inspection/screen/jcBigScreen.vue
Normal file
@ -0,0 +1,676 @@
|
||||
<template>
|
||||
<div class="cont">
|
||||
<div class="top_">
|
||||
<div>车辆检测数据大屏</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="content_">
|
||||
<div class="c_left">
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
成交金额(已收款)
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="khly" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
已收款金额(按车型)
|
||||
</div>
|
||||
<div class="dis-t">
|
||||
|
||||
<div class="lan-you">
|
||||
<div class="yi" :class="{'er' : qhindex == index}" v-for="(item,index) in zilist" :key="index" @click="gbindex(index,item.unit)"> {{item.text}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="yskje" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
数量统计(按车型)
|
||||
</div>
|
||||
<div class="dis-t">
|
||||
|
||||
<div class="lan-you">
|
||||
<div class="yi" :class="{'er' : qhindex1 == index}" v-for="(item,index) in zilist" :key="index" @click="gbindex1(index,item.unit)"> {{item.text}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="sltj" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c_cont">
|
||||
<div class="tab_">
|
||||
<!-- <div @click="countOrAmount()" class="tab_buttom tab_acvit">数量</div>-->
|
||||
<!-- <div @click="countOrAmount()" class="tab_buttom">金额</div>-->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab_bt">
|
||||
<div class="yb_">
|
||||
<div class="yb_title">工单总金额(元)</div>
|
||||
<div class="numlist">
|
||||
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
|
||||
<!-- {{index}}-->
|
||||
<!-- </div>-->
|
||||
<div class="num_box">
|
||||
<!-- {{ statistics.totalAmount }}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yb_">
|
||||
<div class="yb_title">今日工单金额(元)</div>
|
||||
<div class="numlist">
|
||||
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
|
||||
<!-- {{index}}-->
|
||||
<!-- </div>-->
|
||||
<div class="num_box">
|
||||
<!-- {{ statistics.todayAmount }}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="five_box">
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/1.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="f_size">{{ statusTickets[3].name }}</div>-->
|
||||
<!-- <div class="f_num">{{ statusTickets[3].value }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/2.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="f_size">{{ statusTickets[4].name }}</div>-->
|
||||
<!-- <div class="f_num">{{ statusTickets[4].value }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/3.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="f_size">{{ statusTickets[0].name }}</div>-->
|
||||
<!-- <div class="f_num">{{ statusTickets[0].value }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/4.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="f_size">{{ statusTickets[1].name }}</div>-->
|
||||
<!-- <div class="f_num">{{ statusTickets[1].value }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/5.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<!-- <div class="f_size">{{ statusTickets[5].name }}</div>-->
|
||||
<!-- <div class="f_num">{{ statusTickets[5].value }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="co_title">
|
||||
今日工单
|
||||
</div>
|
||||
<!-- <div class="list_long">-->
|
||||
<!-- <div class="long_title">-->
|
||||
<!-- <div class="l_one">工单号</div>-->
|
||||
<!-- <div class="l_two">服务客户</div>-->
|
||||
<!-- <div class="l_three">服务顾问</div>-->
|
||||
<!-- <div class="l_four">创建时间</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="ot_vox">-->
|
||||
<!-- <div class="long_box" v-for="(item,index) in todayTickets" :key="index">-->
|
||||
<!-- <div class="l_one">{{ item.ticketNo }}</div>-->
|
||||
<!-- <div class="l_two">{{ item.userName }}</div>-->
|
||||
<!-- <div class="l_three">{{ item.adviserName }}</div>-->
|
||||
<!-- <div class="l_four">{{ parseTime(item.createTime) }}</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="c_right">
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
检测数量
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="jcsl" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
检测合格率
|
||||
</div>
|
||||
<div class="dis-t">
|
||||
|
||||
<div class="lan-you">
|
||||
<div class="yi" :class="{'er' : qhindex2 == index}" v-for="(item,index) in zilist" :key="index" @click="gbindex2(index,item.unit)"> {{item.text}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="jchgl" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
维修工人排行
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import * as jcBigScreen from '@/views/inspection/screen/api/jcBigScreen';
|
||||
import {chartInfoNum, chartLineInspectionAmount} from "@/views/inspection/screen/api/jcBigScreen";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
Amount: [],
|
||||
unit: '',
|
||||
unit1: '',
|
||||
unit2: '',
|
||||
chartData1: {},
|
||||
params : {
|
||||
unit:this.unit,
|
||||
},
|
||||
qhindex:0,
|
||||
qhindex1:0,
|
||||
qhindex2:0,
|
||||
zilist:[
|
||||
{text:'日',unit:'day'},
|
||||
{text:'周',unit:'week'},
|
||||
{text:'月',unit:'month'},
|
||||
{text:'年',unit:'year'},
|
||||
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.customerSource()
|
||||
this.getServerData1()
|
||||
this.chartInfoNum()
|
||||
this.chartLineInspectionNum()
|
||||
this.chartInfoRatio()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
gbindex(index,unit){
|
||||
this.qhindex = index
|
||||
this.unit = unit
|
||||
this.getServerData1()
|
||||
},
|
||||
gbindex1(index,unit){
|
||||
console.log('22',unit);
|
||||
this.qhindex1 = index
|
||||
this.unit1 = unit
|
||||
this.chartInfoNum()
|
||||
},
|
||||
gbindex2(index,unit){
|
||||
console.log('33');
|
||||
this.qhindex2 = index
|
||||
this.unit2 = unit
|
||||
this.chartInfoRatio()
|
||||
},
|
||||
|
||||
/**
|
||||
* 已收款金额
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getServerData1() {
|
||||
const params = {
|
||||
unit:this.unit,
|
||||
}
|
||||
let res = await jcBigScreen.getServerData1(params)
|
||||
console.log('已收款金额',res)
|
||||
res.data.series.forEach(item => {
|
||||
item.type = 'bar'
|
||||
})
|
||||
var chartDom = document.getElementById('yskje');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.categories
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: res.data.series
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
/**
|
||||
* 数量统计
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async chartInfoNum() {
|
||||
const params = {
|
||||
unit:this.unit1,
|
||||
}
|
||||
let res = await jcBigScreen.chartInfoNum(params)
|
||||
console.log('数量统计',res)
|
||||
res.data.series.forEach(item => {
|
||||
item.type = 'bar'
|
||||
})
|
||||
var chartDom = document.getElementById('sltj');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.categories
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: res.data.series
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
/**
|
||||
* 检测合格率
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async chartInfoRatio() {
|
||||
const params = {
|
||||
unit:this.unit2,
|
||||
}
|
||||
let res = await jcBigScreen.chartInfoRatio(params)
|
||||
console.log('检测合格率',res)
|
||||
res.data.series.forEach(item => {
|
||||
item.type = 'bar'
|
||||
})
|
||||
var chartDom = document.getElementById('jchgl');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.categories
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: res.data.series
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
/**
|
||||
* 检测数量
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async chartLineInspectionNum() {
|
||||
const params = {
|
||||
unit:this.unit,
|
||||
}
|
||||
let res = await jcBigScreen.chartLineInspectionNum(params)
|
||||
console.log('检测数量',res)
|
||||
res.data.series.forEach(item => {
|
||||
item.type = 'bar'
|
||||
})
|
||||
const names = res.data.series.map(item => item.name)
|
||||
var chartDom = document.getElementById('jcsl');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
// option = {
|
||||
// xAxis: {
|
||||
// type: 'category',
|
||||
// data: res.data.categories
|
||||
// },
|
||||
// yAxis: {
|
||||
// type: 'value'
|
||||
// },
|
||||
// series: res.data.series
|
||||
// };
|
||||
option = {
|
||||
title: {
|
||||
text: '最近七天'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: names
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: res.data.categories
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: res.data.series
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
|
||||
/**
|
||||
* 客户来源分析饼图
|
||||
*/
|
||||
async customerSource() {
|
||||
const params = {
|
||||
unit:this.unit,
|
||||
}
|
||||
const res = await jcBigScreen.chartLineInspectionAmount(params);
|
||||
res.data.series.forEach(item => {
|
||||
item.type = 'line'
|
||||
})
|
||||
var chartDom = document.getElementById('khly');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.categories
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: res.data.series
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cont {
|
||||
background: #020F32;
|
||||
//background: url("./imgs/back.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.top_ {
|
||||
width: 100%;
|
||||
height: 86px;
|
||||
background: url("./imgs/top.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 50px;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.content_ {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
//align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dis-t{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.lan-you{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c_left {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.c_cont {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tab_ {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
color: #FFFFFF;
|
||||
margin: 15px auto;
|
||||
}
|
||||
|
||||
.yb_title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #FFFFFF;
|
||||
margin: 15px auto;
|
||||
}
|
||||
|
||||
.tab_bt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
border-bottom: 4px solid #0174F6;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.tab_buttom {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
|
||||
border: 1px solid #0174F6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
yb_title {
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.numlist {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.num_box {
|
||||
width: 38px;
|
||||
height: 50px;
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: url("./imgs/numbcak.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #FFFFFF;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
.yb_ {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tab_acvit {
|
||||
background: #0174F6 !important;
|
||||
}
|
||||
|
||||
.five_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.f_size {
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.f_num {
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.img_left {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.f_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.co_title {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
background: url("./imgs/c_title.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.s_title {
|
||||
width: 90%;
|
||||
height: 32px;
|
||||
background: url("./imgs/title.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding-left: 40px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.echaets_box {
|
||||
width: 90%;
|
||||
height: 267px;
|
||||
margin: 0px auto;
|
||||
border-bottom: 1px solid #0174F6;
|
||||
}
|
||||
|
||||
.list_long {
|
||||
width: 100%;
|
||||
height: 563px;
|
||||
|
||||
}
|
||||
|
||||
.l_one {
|
||||
width: 30%;
|
||||
text-align: left;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
.l_two {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.l_three {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.l_four {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-right: 35px;
|
||||
}
|
||||
|
||||
.long_title {
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: rgba(1, 116, 246, 0.1);
|
||||
background: url("./imgs/c_list.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.ot_vox {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.long_box {
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: rgba(1, 116, 246, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.six_box {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.c_right {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
</style>
|
75
src/views/repair/screen/api/repairBigScreen.js
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 客户来源分析饼图
|
||||
export function customerSource() {
|
||||
return request({
|
||||
url: '/repair/statistics/customerSource',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 月工单数量走势
|
||||
export function ticketMainCount() {
|
||||
return request({
|
||||
url: '/repair/statistics/ticketMainCount',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 月工单金额走势
|
||||
export function ticketMainAmount() {
|
||||
return request({
|
||||
url: '/repair/statistics/ticketMainAmount',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 支付渠道统计
|
||||
export function ticketMainPayWay() {
|
||||
return request({
|
||||
url: '/repair/statistics/ticketMainPayWay',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 维修类型相关统计分析饼图
|
||||
export function repairTypeStatistics() {
|
||||
return request({
|
||||
url: '/repair/statistics/repairTypeStatistics',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 工单总数、今日工单、工单总金额、今日工单金额
|
||||
export function ticketStatistics() {
|
||||
return request({
|
||||
url: '/repair/statistics/ticketStatistics',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//工单状态数量统计
|
||||
export function ticketStatusCount() {
|
||||
return request({
|
||||
url: '/repair/statistics/ticketStatusCount',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//今日工单
|
||||
export function listTicketToday() {
|
||||
return request({
|
||||
url: '/repair/statistics/listTicketToday',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//维修工人排行
|
||||
export function listWorks() {
|
||||
return request({
|
||||
url: '/repair/statistics/listWorks',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
BIN
src/views/repair/screen/imgs/1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/views/repair/screen/imgs/2.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
src/views/repair/screen/imgs/3.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/views/repair/screen/imgs/4.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/views/repair/screen/imgs/5.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
src/views/repair/screen/imgs/back.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
src/views/repair/screen/imgs/c_list.png
Normal file
After Width: | Height: | Size: 92 KiB |
BIN
src/views/repair/screen/imgs/c_title.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
src/views/repair/screen/imgs/numbcak.png
Normal file
After Width: | Height: | Size: 154 B |
BIN
src/views/repair/screen/imgs/title.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
src/views/repair/screen/imgs/top.png
Normal file
After Width: | Height: | Size: 100 KiB |
701
src/views/repair/screen/repairBigScreen.vue
Normal file
@ -0,0 +1,701 @@
|
||||
<template>
|
||||
<div class="cont">
|
||||
<div class="top_">
|
||||
<div>车辆维修数据分析</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div class="content_">
|
||||
<div class="c_left">
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
客户来源分析
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="khly" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
月工单数量走势
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="gdslzs" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
支付渠道统计
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="zfqdtj" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c_cont">
|
||||
<div class="tab_">
|
||||
<div @click="countOrAmount()" class="tab_buttom tab_acvit">数量</div>
|
||||
<div @click="countOrAmount()" class="tab_buttom">金额</div>
|
||||
</div>
|
||||
<div v-if="isCount" class="tab_bt">
|
||||
<div class="yb_">
|
||||
<div class="yb_title">工单总数</div>
|
||||
<div class="numlist">
|
||||
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
|
||||
<!-- {{index}}-->
|
||||
<!-- </div>-->
|
||||
<div class="num_box">
|
||||
{{ statistics.totalCount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yb_">
|
||||
<div class="yb_title">今日工单</div>
|
||||
<div class="numlist">
|
||||
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
|
||||
<!-- {{index}}-->
|
||||
<!-- </div>-->
|
||||
<div class="num_box">
|
||||
{{ statistics.todayCount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="tab_bt">
|
||||
<div class="yb_">
|
||||
<div class="yb_title">工单总金额(元)</div>
|
||||
<div class="numlist">
|
||||
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
|
||||
<!-- {{index}}-->
|
||||
<!-- </div>-->
|
||||
<div class="num_box">
|
||||
{{ statistics.totalAmount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yb_">
|
||||
<div class="yb_title">今日工单金额(元)</div>
|
||||
<div class="numlist">
|
||||
<!-- <div class="num_box" v-for="(item,index) in 6" :key="index">-->
|
||||
<!-- {{index}}-->
|
||||
<!-- </div>-->
|
||||
<div class="num_box">
|
||||
{{ statistics.todayAmount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="five_box">
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/1.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="f_size">{{ statusTickets[3].name }}</div>
|
||||
<div class="f_num">{{ statusTickets[3].value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/2.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="f_size">{{ statusTickets[4].name }}</div>
|
||||
<div class="f_num">{{ statusTickets[4].value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/3.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="f_size">{{ statusTickets[0].name }}</div>
|
||||
<div class="f_num">{{ statusTickets[0].value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/4.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="f_size">{{ statusTickets[1].name }}</div>
|
||||
<div class="f_num">{{ statusTickets[1].value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="f_box">
|
||||
<div class="img_left">
|
||||
<img src="./imgs/5.png" style="width: 60px;height: 60px">
|
||||
</div>
|
||||
<div>
|
||||
<div class="f_size">{{ statusTickets[5].name }}</div>
|
||||
<div class="f_num">{{ statusTickets[5].value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="co_title">
|
||||
今日工单
|
||||
</div>
|
||||
<div class="list_long">
|
||||
<div class="long_title">
|
||||
<div class="l_one">工单号</div>
|
||||
<div class="l_two">服务客户</div>
|
||||
<div class="l_three">服务顾问</div>
|
||||
<div class="l_four">创建时间</div>
|
||||
</div>
|
||||
<div class="ot_vox">
|
||||
<div class="long_box" v-for="(item,index) in todayTickets" :key="index">
|
||||
<div class="l_one">{{ item.ticketNo }}</div>
|
||||
<div class="l_two">{{ item.userName }}</div>
|
||||
<div class="l_three">{{ item.adviserName }}</div>
|
||||
<div class="l_four">{{ parseTime(item.createTime) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c_right">
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
维修类型统计
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="wxlxtj" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
月工单金额走势
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div id="gdjezs" style="width: 400px; height: 267px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="six_box">
|
||||
<div class="s_title">
|
||||
维修工人排行
|
||||
</div>
|
||||
<div class="echaets_box">
|
||||
<div class="list_long">
|
||||
<div class="long_title">
|
||||
<div class="l_one">姓名</div>
|
||||
<div class="l_two">服务工单数</div>
|
||||
</div>
|
||||
<div class="ot_vox">
|
||||
<div class="long_box" v-for="(item,index) in workers" :key="index">
|
||||
<div class="l_one">{{ item.name }}</div>
|
||||
<div class="l_two">{{ item.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import * as RepairBigScreenApi from '@/views/repair/screen/api/repairBigScreen';
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
//金额数量统计
|
||||
statistics: {},
|
||||
//工单各状态数量
|
||||
statusTickets: [],
|
||||
//金额数量切换
|
||||
isCount: true,
|
||||
//今日工单
|
||||
todayTickets: [],
|
||||
//维修工人排行
|
||||
workers: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//工单总数、今日工单、工单总金额、今日工单金额
|
||||
this.ticketStatistics()
|
||||
//工单状态数量统计
|
||||
this.ticketStatusCount()
|
||||
//今日工单
|
||||
this.listTicketToday()
|
||||
//维修工人排行
|
||||
this.listWorks()
|
||||
},
|
||||
mounted() {
|
||||
//客户来源分析饼图
|
||||
this.customerSource();
|
||||
//月工单数量走势
|
||||
this.ticketMainCount()
|
||||
//月工单金额走势
|
||||
this.ticketMainAmount()
|
||||
//支付渠道统计
|
||||
this.ticketMainPayWay()
|
||||
//维修类型相关统计分析饼图
|
||||
this.repairTypeStatistics()
|
||||
},
|
||||
methods: {
|
||||
countOrAmount() {
|
||||
this.isCount = !this.isCount
|
||||
},
|
||||
|
||||
/**
|
||||
* 客户来源分析饼图
|
||||
*/
|
||||
async customerSource() {
|
||||
const res = await RepairBigScreenApi.customerSource();
|
||||
var chartDom = document.getElementById('khly');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
toolbox: {
|
||||
show: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '客户来源分析',
|
||||
type: 'pie',
|
||||
radius: [20, 100],
|
||||
center: ['50%', '50%'],
|
||||
roseType: 'area',
|
||||
itemStyle: {
|
||||
borderRadius: 2
|
||||
},
|
||||
data: res.data,
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
|
||||
/**
|
||||
* 月工单数量走势
|
||||
*/
|
||||
async ticketMainCount() {
|
||||
const res = await RepairBigScreenApi.ticketMainCount();
|
||||
var chartDom = document.getElementById('gdslzs');
|
||||
var myChart = echarts.init(chartDom, 'dark');
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.xData
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: res.data.data,
|
||||
type: 'line',
|
||||
smooth: true
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
|
||||
/**
|
||||
* 月工单金额走势
|
||||
*/
|
||||
async ticketMainAmount() {
|
||||
const res = await RepairBigScreenApi.ticketMainAmount();
|
||||
var chartDom = document.getElementById('gdjezs');
|
||||
var myChart = echarts.init(chartDom, 'dark');
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.xData
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: res.data.data,
|
||||
type: 'line',
|
||||
smooth: true
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
/**
|
||||
* 支付渠道统计
|
||||
*/
|
||||
async ticketMainPayWay() {
|
||||
const res = await RepairBigScreenApi.ticketMainPayWay();
|
||||
var chartDom = document.getElementById('zfqdtj');
|
||||
var myChart = echarts.init(chartDom, 'dark');
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: res.data.xData
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: res.data.data,
|
||||
type: 'bar'
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
/**
|
||||
* 维修类型相关统计分析饼图
|
||||
*/
|
||||
async repairTypeStatistics() {
|
||||
const res = await RepairBigScreenApi.repairTypeStatistics();
|
||||
var chartDom = document.getElementById('wxlxtj');
|
||||
var myChart = echarts.init(chartDom, 'dark');
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '维修类型统计',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
padAngle: 5,
|
||||
itemStyle: {
|
||||
borderRadius: 10
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 40,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: res.data
|
||||
}
|
||||
]
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
/**
|
||||
* 单总数、今日工单、工单总金额、今日工单金额
|
||||
*/
|
||||
async ticketStatistics() {
|
||||
const res = await RepairBigScreenApi.ticketStatistics();
|
||||
this.statistics = res.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 工单状态数量统计
|
||||
*/
|
||||
async ticketStatusCount() {
|
||||
const res = await RepairBigScreenApi.ticketStatusCount();
|
||||
this.statusTickets = res.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 今日工单
|
||||
*/
|
||||
async listTicketToday() {
|
||||
const res = await RepairBigScreenApi.listTicketToday();
|
||||
this.todayTickets = res.data
|
||||
},
|
||||
|
||||
/**
|
||||
* 维修工人排行
|
||||
*/
|
||||
async listWorks() {
|
||||
const res = await RepairBigScreenApi.listWorks();
|
||||
this.workers = res.data
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cont {
|
||||
background: #020F32;
|
||||
//background: url("./imgs/back.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.top_ {
|
||||
width: 100%;
|
||||
height: 86px;
|
||||
background: url("./imgs/top.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 50px;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.content_ {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
//align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.c_left {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.c_cont {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tab_ {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
color: #FFFFFF;
|
||||
margin: 15px auto;
|
||||
}
|
||||
|
||||
.yb_title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #FFFFFF;
|
||||
margin: 15px auto;
|
||||
}
|
||||
|
||||
.tab_bt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
border-bottom: 4px solid #0174F6;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.tab_buttom {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
|
||||
border: 1px solid #0174F6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
yb_title {
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.numlist {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.num_box {
|
||||
width: 38px;
|
||||
height: 50px;
|
||||
border-radius: 0px 0px 0px 0px;
|
||||
font-weight: 600;
|
||||
font-size: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: url("./imgs/numbcak.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #FFFFFF;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
.yb_ {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tab_acvit {
|
||||
background: #0174F6 !important;
|
||||
}
|
||||
|
||||
.five_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.f_size {
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.f_num {
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.img_left {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.f_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.co_title {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
background: url("./imgs/c_title.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.s_title {
|
||||
width: 90%;
|
||||
height: 32px;
|
||||
background: url("./imgs/title.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding-left: 40px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.echaets_box {
|
||||
width: 90%;
|
||||
height: 267px;
|
||||
margin: 0px auto;
|
||||
border-bottom: 1px solid #0174F6;
|
||||
}
|
||||
|
||||
.list_long {
|
||||
width: 100%;
|
||||
height: 563px;
|
||||
|
||||
}
|
||||
|
||||
.l_one {
|
||||
width: 30%;
|
||||
text-align: left;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
.l_two {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.l_three {
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.l_four {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding-right: 35px;
|
||||
}
|
||||
|
||||
.long_title {
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: rgba(1, 116, 246, 0.1);
|
||||
background: url("./imgs/c_list.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.ot_vox {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.long_box {
|
||||
width: 100%;
|
||||
height: 58px;
|
||||
background: rgba(1, 116, 246, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.six_box {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.c_right {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
</style>
|
37
src/views/repair/stockOperate/BackStock.vue
Normal file
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="退料单据" name="receive">
|
||||
<SoIndex :so-by-type="soByType" :is-back="isBack"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="作废单据" name="voidReceive">
|
||||
<SoVoid :so-by-type="soByType" :is-back="isBack"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="退料明细" name="detailReceive">
|
||||
<SoiTable :so-by-type="soByType" :is-back="isBack"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SoVoid from "@/views/repair/stockOperate/Components/SoVoid.vue";
|
||||
import SoiTable from "@/views/repair/stockOperate/Components/SoiTable.vue";
|
||||
import SoIndex from "@/views/repair/stockOperate/Components/SoIndex.vue";
|
||||
|
||||
export default {
|
||||
name: "BackStock",
|
||||
components: {SoIndex, SoiTable, SoVoid},
|
||||
data(){
|
||||
return{
|
||||
activeTab: 'receive',
|
||||
soByType: false,
|
||||
isBack: true
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
||||
<el-form-item :label="soByType ? '采购时间' : !isBack ? '领料时间' : '退料时间'" prop="searchTimeArray">
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="queryParams.searchTimeArray"
|
||||
@ -29,10 +29,10 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!soByType" label="领料人" prop="userId">
|
||||
<el-form-item v-if="!soByType" :label="!isBack ? '领料人' : '退料人'" prop="userId">
|
||||
<StaffChoose v-model="queryParams.user" @selected="getStaff"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<el-form-item v-if="!isBack" :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<CorpChoose v-model="queryParams.corp" @selected="getCompany"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -88,15 +88,15 @@
|
||||
<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="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150"/>
|
||||
<el-table-column :label="soByType ? '采购员' : !isBack ? '领料人' : '退料人'" align="center" prop="userName" width="150"/>
|
||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="200"/>
|
||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150"/>
|
||||
<el-table-column :label="soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'" align="center" prop="soTime" width="150"/>
|
||||
<el-table-column label="登记时间" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="门店" align="center" prop="corpName" width="180"/>
|
||||
<el-table-column v-if="!isBack" label="门店" align="center" prop="corpName" width="180"/>
|
||||
<el-table-column v-if="soByType" label="状态" align="center" prop="soStatus" width="150">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_SO_STATUS" :value="scope.row.soStatus"/>
|
||||
@ -122,7 +122,7 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
|
||||
<SoShow :so-by-type="soByType" ref="soShow" />
|
||||
<SoShow :so-by-type="soByType" :is-back="isBack" ref="soShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -159,6 +159,9 @@ export default {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
required: false
|
||||
},
|
||||
isBack:{
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -209,17 +212,22 @@ export default {
|
||||
methods: {
|
||||
// 分页
|
||||
async pageSo() {
|
||||
this.queryParams.soType = null
|
||||
this.queryParams.purchaseType = null
|
||||
if (this.soByType && this.goodsYes){
|
||||
this.queryParams.soType = "03"
|
||||
this.queryParams.purchaseType = "02"
|
||||
}
|
||||
if (this.soByType && !this.goodsYes){
|
||||
this.queryParams.soType = "01"
|
||||
else if (this.soByType && !this.goodsYes){
|
||||
this.queryParams.soType = "01"
|
||||
this.queryParams.purchaseType = "01"
|
||||
}
|
||||
if (!this.soByType){
|
||||
else if (!this.soByType && !this.isBack){
|
||||
this.queryParams.soType = "02"
|
||||
}
|
||||
else if (this.isBack){
|
||||
this.queryParams.soType = '04'
|
||||
}
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getRepairSoPage(this.queryParams)
|
||||
|
@ -30,7 +30,7 @@
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
{{soByType ? '采购员' : '领料人'}}
|
||||
{{soByType ? '采购员' : !isBack ? '领料人':'退料人'}}
|
||||
</template>
|
||||
{{info.userName}}
|
||||
</el-descriptions-item>
|
||||
@ -48,7 +48,7 @@
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
{{soByType ? '入库时间' : '领料时间'}}
|
||||
{{soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'}}
|
||||
</template>
|
||||
{{parseTime(info.soTime, '{y}-{m}-{d}')}}
|
||||
</el-descriptions-item>
|
||||
@ -113,7 +113,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属门店" align="center" prop="corpName" width="180" />
|
||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150">
|
||||
<el-table-column :label="soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'" align="center" prop="soTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{parseTime(info.soTime, '{y}-{m}-{d}')}}
|
||||
</template>
|
||||
@ -142,6 +142,9 @@ export default {
|
||||
soByType:{
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
isBack:{
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -18,10 +18,10 @@
|
||||
<el-form-item label="单据号" prop="soNo">
|
||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!soByType" label="领料人" prop="userId">
|
||||
<el-form-item v-if="!soByType" :label="!isBack ? '领料人' : '退料人'" prop="userId">
|
||||
<StaffChoose v-model="queryParams.user" @selected="getStaff"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<el-form-item v-if="!isBack" :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<CorpChoose v-model="queryParams.corp" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -42,9 +42,9 @@
|
||||
<el-table-column label="单号" align="center" prop="soNo" width="200" />
|
||||
<el-table-column label="数量" align="center" width="150" prop="itemCount" />
|
||||
<el-table-column label="金额" align="center" prop="totalPrice" width="150" />
|
||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150" />
|
||||
<el-table-column :label="soByType ? '采购员' : !isBack ? '领料人' : '退料人'" align="center" prop="userName" width="150" />
|
||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="150" />
|
||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150" />
|
||||
<el-table-column :label="soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'" align="center" prop="soTime" width="150" />
|
||||
<el-table-column label="登记时间" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||
@ -70,7 +70,7 @@
|
||||
<pagination @pagination="pageSo" style="margin-bottom: 3rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
|
||||
<SoShow :so-by-type="soByType" ref="soShow" />
|
||||
<SoShow :so-by-type="soByType" :is-back="isBack" ref="soShow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -90,6 +90,9 @@ export default {
|
||||
defaultValue: true,
|
||||
required: true
|
||||
},
|
||||
isBack:{
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'queryParams.supplier'(val){
|
||||
@ -118,7 +121,7 @@ export default {
|
||||
userId: null,
|
||||
userName: null,
|
||||
soType: this.soByType ? "01" : "02",
|
||||
purchaseType: this.goodsYes ? "02" : "01",
|
||||
purchaseType: null,
|
||||
soStatus: "06"
|
||||
},
|
||||
showSearch: true,
|
||||
@ -133,6 +136,12 @@ export default {
|
||||
methods: {
|
||||
async pageSo(){
|
||||
try {
|
||||
if (this.isBack){
|
||||
this.queryParams.soType = "04"
|
||||
}
|
||||
if (this.soByType){
|
||||
this.queryParams.purchaseType = this.goodsYes ? "02" : "01"
|
||||
}
|
||||
this.loading = true
|
||||
const res = await getRepairSoPage(this.queryParams)
|
||||
this.list = res.data.records
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
||||
<el-form-item :label="soByType ? '采购时间' : !isBack ? '领料时间' : '退料时间'" prop="searchTimeArray">
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="queryParams.searchTimeArray"
|
||||
@ -15,7 +15,7 @@
|
||||
<el-form-item label="关键字" prop="query">
|
||||
<el-input v-model="queryParams.query" style="width: 18rem" placeholder="请输入单号、商品名称、编码或规格"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<el-form-item v-if="!isBack" :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<CorpChoose v-model="queryParams.corp" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="soByType" label="所属库位" prop="wareId">
|
||||
@ -28,11 +28,11 @@
|
||||
</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="primary" plain icon="el-icon-download" size="mini"-->
|
||||
<!-- >导出-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
||||
</el-row>
|
||||
<!-- 表格 -->
|
||||
@ -44,7 +44,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="单号" align="center" prop="so.soNo" width="200" />
|
||||
<el-table-column label="商品名称" align="center" prop="repairWares.name" width="180" />
|
||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="so.userName" width="180" />
|
||||
<el-table-column :label="soByType ? '采购员' : !isBack ? '领料人' : '退料人'" align="center" prop="so.userName" width="180" />
|
||||
<el-table-column label="商品编码" align="center" prop="repairWares.code" width="180" />
|
||||
<el-table-column v-if="soByType" label="条形码" align="center" prop="repairWares.barCode" width="180" />
|
||||
<el-table-column label="规格" align="center" prop="repairWares.model" width="180" />
|
||||
@ -62,7 +62,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属门店" align="center" prop="so.corpId" width="180" />
|
||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="so.createTime" width="150">
|
||||
<el-table-column :label="soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'" align="center" prop="so.createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{parseTime(scope.row.so.createTime, '{y}-{m}-{d}')}}
|
||||
</template>
|
||||
@ -90,6 +90,9 @@ export default {
|
||||
defaultValue: true,
|
||||
required: true
|
||||
},
|
||||
isBack:{
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'queryParams.corp'(val){
|
||||
@ -126,6 +129,9 @@ export default {
|
||||
},
|
||||
// 分页
|
||||
async pageSoi(){
|
||||
if (this.isBack){
|
||||
this.queryParams.soiType = "04"
|
||||
}
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getSoiPage(this.queryParams)
|
||||
|
@ -20,7 +20,8 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据号" align="center" prop="no" />
|
||||
<el-table-column label="单据号" align="center" prop="no" width="200"/>
|
||||
<el-table-column label="客户车牌" align="center" prop="licenseNumber" />
|
||||
<el-table-column label="服务顾问" align="center" prop="adviserName" />
|
||||
<el-table-column label="申请人" align="center" prop="repairName" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
@ -57,20 +58,31 @@
|
||||
<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="waresCount" 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"
|
||||
placeholder="请输入数量"></el-input>
|
||||
<span class="item__txt">{{ scope.row.waresCount }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" v-if="type" align="center" prop="wares.stock" width="180"/>
|
||||
<el-table-column label="已领数量" v-if="!type" align="center" prop="waresAlreadyCount" 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"
|
||||
placeholder="请输入数量"></el-input>
|
||||
<span class="item__txt">{{ scope.row.waresCount }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" prop="wares.stock" width="180"/>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).length !== 0">
|
||||
通知领取
|
||||
<el-button type="primary" v-if="type" @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).length !== 0">
|
||||
通知领料
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleCreate" :disabled="selections.length === 0">
|
||||
<el-button type="primary" v-else @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).length !== 0">
|
||||
通知退料
|
||||
</el-button>
|
||||
<el-button v-if="type" type="primary" @click="handleCreate" :disabled="selections.length === 0">
|
||||
采购
|
||||
</el-button>
|
||||
</div>
|
||||
@ -179,7 +191,8 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
query: null,
|
||||
type: this.type ? "01" : "02"
|
||||
type: "01",
|
||||
isBack: this.type ? null : true
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
@ -207,29 +220,30 @@ export default {
|
||||
methods:{
|
||||
// 通过 true是全部、false是选择
|
||||
async handlePass(){
|
||||
// 生成领料单
|
||||
if (this.type){
|
||||
// 生成领料单、退料单
|
||||
this.formData.repairSo = {
|
||||
soType: "02",
|
||||
soNo: createUniqueCodeByHead("LL"),
|
||||
soType: this.type ? "02" : "04",
|
||||
soNo: createUniqueCodeByHead(this.type ? "LL" : "TL"),
|
||||
userId: this.formData.repairId,
|
||||
userName: this.formData.repairName,
|
||||
soTime: parseTime(Date.now(), '{y}-{m}-{d}'),
|
||||
soStatus: "04",
|
||||
purchaseType: "01"
|
||||
soStatus: this.type ? "04" : "07",
|
||||
// purchaseType: "01"
|
||||
}
|
||||
this.formData.repairSois = [...this.selections.map(item => {
|
||||
return {
|
||||
soiType: '02',
|
||||
soiType: this.type ? '02' : "04",
|
||||
goodsId: item.waresId,
|
||||
goodsCount: item.waresCount,
|
||||
}
|
||||
})]
|
||||
this.formData.items = [...this.selections.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
}
|
||||
})]
|
||||
if (this.type){
|
||||
this.formData.items = [...this.selections.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
}
|
||||
})]
|
||||
}
|
||||
try {
|
||||
await pass(this.formData)
|
||||
this.$modal.msgSuccess("处理成功")
|
||||
@ -237,23 +251,6 @@ export default {
|
||||
}finally {
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}else {
|
||||
// 退料方法
|
||||
this.formData = {}
|
||||
this.formData.items = [...this.selections.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
waresStatus: "05"
|
||||
}
|
||||
})]
|
||||
try {
|
||||
await passBackTicketWares(this.formData)
|
||||
this.$modal.msgSuccess("处理成功")
|
||||
await this.getList()
|
||||
}finally {
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 生成采购 true是全部、false是选择
|
||||
async handleCreate(flag){
|
||||
@ -310,18 +307,14 @@ export default {
|
||||
const data = {twId: row.id}
|
||||
const res = await listTwItem(data)
|
||||
this.items = res.data
|
||||
// 库存判断
|
||||
this.items.forEach(item => {
|
||||
const count = item.waresAlreadyCount ? parseInt(item.waresCount) - parseInt(item.waresAlreadyCount) : item.waresCount
|
||||
item.waresCount = count
|
||||
item.isStock = count <= item.wares.stock
|
||||
})
|
||||
// 只要未领料的
|
||||
if (this.type){
|
||||
this.items = this.items.filter(item => item.waresStatus === '02')
|
||||
}else {
|
||||
// 未领料的不要
|
||||
this.items = this.items.filter(item => item.waresStatus !== '02')
|
||||
const count = item.waresAlreadyCount ? parseInt(item.waresCount) - parseInt(item.waresAlreadyCount) : item.waresCount
|
||||
item.waresCount = this.type ? count : item.waresAlreadyCount
|
||||
item.isStock = this.type ? count <= item.wares.stock : true
|
||||
})
|
||||
this.items = this.items.filter(item => this.type ? item.waresStatus === '02' : item.waresAlreadyCount)
|
||||
if (!this.type){
|
||||
this.items = this.items.filter(item => item.waresAlreadyCount !== item.waresBackCount)
|
||||
}
|
||||
}finally {
|
||||
this.dialogLoading = false
|
||||
@ -404,7 +397,11 @@ export default {
|
||||
/** 保存数据 */
|
||||
save(row) {
|
||||
// 更新表格的数据
|
||||
row.isStock = row.waresCount <= row.wares.stock
|
||||
row.isStock = this.type ? row.waresCount <= row.wares.stock : row.waresCount <= row.waresAlreadyCount
|
||||
if (!this.type && !row.isStock){
|
||||
this.$modal.msgWarning("退料数量不能超过领取数量")
|
||||
row.waresCount = row.waresAlreadyCount
|
||||
}
|
||||
row.totalPrice = row.count * row.newPrice
|
||||
const id = row.id
|
||||
// 取消本行所有cell的编辑状态
|
||||
@ -412,6 +409,7 @@ export default {
|
||||
this.cancelEditable(cell)
|
||||
})
|
||||
this.clickCellMap[id] = []
|
||||
this.selections = []
|
||||
this.tableKey++
|
||||
},
|
||||
changeWare(row) {
|
||||
@ -470,7 +468,7 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .stock td{
|
||||
background-color: #ff0000 !important; /* 红色背景 */
|
||||
color: #ff0000 !important; /* 红色背景 */
|
||||
}
|
||||
.item {
|
||||
.item__input {
|
||||
|
@ -5,11 +5,12 @@
|
||||
<el-form-item label="关键字" prop="query">
|
||||
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.query"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status">
|
||||
<el-option v-for="item in this.getDictDatas(DICT_TYPE.TICKET_WARES_STATUS)" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="状态" prop="status">-->
|
||||
<!-- <el-select v-model="queryParams.status">-->
|
||||
<!-- <el-option v-for="item in this.getDictDatas(DICT_TYPE.TICKET_WARES_STATUS)" :key="item.value"-->
|
||||
<!-- :label="item.label" :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </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>
|
||||
@ -25,30 +26,34 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据号" align="center" prop="no" />
|
||||
<el-table-column label="服务顾问" align="center" prop="adviserName" />
|
||||
<el-table-column label="申请人" align="center" prop="repairName" />
|
||||
<el-table-column label="单据号" align="center" prop="no"/>
|
||||
<el-table-column label="客户车牌" align="center" prop="licenseNumber" />
|
||||
<el-table-column label="服务顾问" align="center" prop="adviserName"/>
|
||||
<el-table-column label="申请人" align="center" prop="repairName"/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.TICKET_WARES_STATUS" v-model="scope.row.status" />
|
||||
<dict-tag :type="DICT_TYPE.TICKET_WARES_STATUS" v-model="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.status !== '01' || userRole !== 'service_advisor'" type="text" size="mini" icon="el-icon-view" @click="handleShow(scope.row)">
|
||||
<el-button v-if="scope.row.status !== '01' || userRole !== 'service_advisor'" type="text" size="mini"
|
||||
icon="el-icon-view" @click="handleShow(scope.row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="(userRole === 'service_advisor' || userRole === 'general_inspection') && scope.row.status === '01'" @click="handleAudit(scope.row)" type="text" size="mini" icon="el-icon-s-check">
|
||||
<el-button
|
||||
v-if="(userRole === 'service_advisor' || userRole === 'general_inspection') && scope.row.status === '01'"
|
||||
@click="handleAudit(scope.row)" type="text" size="mini" icon="el-icon-s-check">
|
||||
审核
|
||||
</el-button>
|
||||
<!-- todo 待完成 -->
|
||||
<el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '01'" type="text" size="mini" icon="el-icon-finished">
|
||||
领料确认
|
||||
</el-button>
|
||||
<el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '02'" type="text" size="mini" icon="el-icon-finished">
|
||||
退料确认
|
||||
</el-button>
|
||||
<!-- <!– todo 待完成 –>-->
|
||||
<!-- <el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '01'" type="text" size="mini" icon="el-icon-finished">-->
|
||||
<!-- 领料确认-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '02'" type="text" size="mini" icon="el-icon-finished">-->
|
||||
<!-- 退料确认-->
|
||||
<!-- </el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -59,18 +64,19 @@
|
||||
<TicketWaresShow ref="ticketWaresShow" :user-role="userRole" @success="getList" :type="type"/>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||
<el-table el-table v-loading="dialogLoading" :data="items" :stripe="true" :show-overflow-tooltip="true" @selection-change="handleSelect">
|
||||
<el-table-column type="selection" width="80" align="center" />
|
||||
<el-table el-table v-loading="dialogLoading" :data="items" :stripe="true" :show-overflow-tooltip="true"
|
||||
@selection-change="handleSelect">
|
||||
<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="waresCount" width="180"/>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleDoGet(false)" :disabled="selections.length === 0">
|
||||
{{this.type ? '领料选择' : '退料选择'}}
|
||||
{{ this.type ? '领料选择' : '退料选择' }}
|
||||
</el-button>
|
||||
<el-button type="primary" :disabled="items.length === 0" @click="handleDoGet(true)">
|
||||
{{this.type ? '领料全部' : '退料全部'}}
|
||||
{{ this.type ? '领料全部' : '退料全部' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -85,18 +91,18 @@ import {listTwItem} from "@/api/repair/tickets/TWItem";
|
||||
export default {
|
||||
name: "TicketWares",
|
||||
components: {TicketWaresShow},
|
||||
props:{
|
||||
props: {
|
||||
type: Boolean,
|
||||
userRole: String,
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
queryParams:{
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
query: null,
|
||||
type: this.type ? "01" : "02",
|
||||
status: null
|
||||
status: "01"
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
@ -106,41 +112,41 @@ export default {
|
||||
dialogLoading: false,
|
||||
items: [],
|
||||
selections: [],
|
||||
formData:{},
|
||||
formData: {},
|
||||
dialogTitle: ""
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
async getList(){
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getPage(this.queryParams)
|
||||
if (res.data){
|
||||
if (res.data) {
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
}finally {
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleQuery(){
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleShow(row){
|
||||
handleShow(row) {
|
||||
this.$refs.ticketWaresShow.open(row)
|
||||
},
|
||||
handleAudit(row){
|
||||
handleAudit(row) {
|
||||
this.handleShow(row)
|
||||
},
|
||||
async handleGet(row){
|
||||
async handleGet(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
}
|
||||
@ -152,29 +158,29 @@ export default {
|
||||
const res = await listTwItem(data)
|
||||
this.items = res.data
|
||||
// 只要可领料的
|
||||
if (this.type){
|
||||
if (this.type) {
|
||||
this.items = this.items.filter(item => item.waresStatus === '04')
|
||||
}else {
|
||||
} else {
|
||||
// 只要可退料的
|
||||
this.items = this.items.filter(item => item.waresStatus === '05')
|
||||
}
|
||||
}finally {
|
||||
} finally {
|
||||
this.dialogLoading = false
|
||||
}
|
||||
},
|
||||
handleSelect(val){
|
||||
handleSelect(val) {
|
||||
this.selections = val
|
||||
},
|
||||
async handleDoGet(flag){
|
||||
async handleDoGet(flag) {
|
||||
this.formData.type = this.type ? "01" : "02"
|
||||
if (flag){
|
||||
if (flag) {
|
||||
this.formData.items = [...this.items.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
waresStatus: this.type ? "01" : "03"
|
||||
}
|
||||
})]
|
||||
}else {
|
||||
} else {
|
||||
this.formData.items = [...this.selections.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
@ -187,7 +193,8 @@ export default {
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess(this.type ? "领料成功" : "退料成功")
|
||||
await this.getList()
|
||||
}catch{}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,6 @@ export default {
|
||||
remark: item.remark
|
||||
}
|
||||
})]
|
||||
console.log(this.formData)
|
||||
await auditTicketWares(this.formData)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("审核成功")
|
||||
|
@ -7,9 +7,15 @@
|
||||
<el-tab-pane label="已完成工单" name="finish">
|
||||
<TicketManagerItem :is-finish="true" :user-role="userRole"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="userRole !== 'repair_staff' ? '配件申请单' : '领退料确认'" name="getApply">
|
||||
<el-tab-pane label="配件申请单" name="getApply" v-if="userRole !== 'repair_staff'">
|
||||
<TicketWares :type="true" :user-role="userRole"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="finishGetWares" label="领料确认" v-if="userRole === 'repair_staff'">
|
||||
<GetAndBackWares :type="true" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="退料确认" name="finishBackWares" v-if="userRole === 'repair_staff'">
|
||||
<GetAndBackWares :type="false" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="退料申请单" name="backApply">-->
|
||||
<!-- <TicketWares :type="false" :user-role="userRole"/>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
@ -21,10 +27,11 @@
|
||||
import TicketManagerItem from "@/views/repair/tickets/Components/TicketManagerItem.vue";
|
||||
import {getUserRole} from "@/api/repair/tickets/Tickets";
|
||||
import TicketWares from "@/views/repair/tickets/Components/TicketWares.vue";
|
||||
import GetAndBackWares from "@/views/repair/tickets/form/GetAndBackWares.vue";
|
||||
|
||||
export default {
|
||||
name: "TicketManager",
|
||||
components: {TicketWares, TicketManagerItem},
|
||||
components: {GetAndBackWares, TicketWares, TicketManagerItem},
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'unFinish',
|
||||
|
165
src/views/repair/tickets/form/GetAndBackWares.vue
Normal file
@ -0,0 +1,165 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form-item label="关键字" prop="soNo">
|
||||
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.soNo"/>
|
||||
</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">
|
||||
<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="80">
|
||||
<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="itemCount"/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini"
|
||||
icon="el-icon-view"
|
||||
@click="showItem(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<el-dialog :title="type ? '领料确认' : '退料确认'" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||
<el-table v-loading="dialogLoading" :data="items" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center" width="80">
|
||||
<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="repairWares.code" />
|
||||
<el-table-column label="规格" align="center" prop="repairWares.model" />
|
||||
<el-table-column label="数量" align="center" prop="goodsCount" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="handleConfirm">
|
||||
确认
|
||||
</el-button>
|
||||
<el-button type="info" size="small" @click="handleVoid">
|
||||
作废
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getRepairSoPage, voidSo, confirmGet, confirmBack} from "@/api/repair/stockOperate/stockOperate";
|
||||
import {getUserProfile} from "@/api/system/user";
|
||||
import {getRepairSoiBySoId} from "@/api/repair/stockOperate/stockOperateItem";
|
||||
|
||||
export default {
|
||||
name: "GetAndBackWares",
|
||||
props: {
|
||||
type: Boolean,
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
soType: this.type ? "02" : "04",
|
||||
soStatus: this.type ? "04" : "07",
|
||||
soNo: null,
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
userId: null,
|
||||
dialogVisible: false,
|
||||
items: [],
|
||||
dialogLoading: false,
|
||||
formData:{}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
async getList(){
|
||||
try {
|
||||
this.loading = true
|
||||
if (!this.userId){
|
||||
const res = await getUserProfile()
|
||||
this.userId = res.data.id
|
||||
}
|
||||
this.queryParams['userId'] = this.userId
|
||||
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.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
async showItem(row){
|
||||
this.formData['id'] = row.id
|
||||
try{
|
||||
this.items = []
|
||||
this.dialogVisible = true
|
||||
this.dialogLoading = true
|
||||
const res = await getRepairSoiBySoId(row.id)
|
||||
this.items = res.data
|
||||
}finally {
|
||||
this.dialogLoading = false
|
||||
}
|
||||
},
|
||||
async handleConfirm(){
|
||||
if (this.type){
|
||||
try {
|
||||
await confirmGet(this.formData.id)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
}catch{}
|
||||
}else {
|
||||
await confirmBack(this.formData.id)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
}
|
||||
},
|
||||
// 作废
|
||||
async handleVoid(){
|
||||
try {
|
||||
await this.$modal.confirm("确认作废该单据?")
|
||||
this.formData['soStatus'] = '06'
|
||||
await voidSo(this.formData)
|
||||
this.dialogVisible = false
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
await this.getList()
|
||||
}catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -295,7 +295,8 @@ export default {
|
||||
items: [],
|
||||
remark: null,
|
||||
adviserId: null,
|
||||
adviserName: null
|
||||
adviserName: null,
|
||||
licenseNumber: null,
|
||||
},
|
||||
addWaresVisible: false,
|
||||
waresFormData:{
|
||||
@ -360,7 +361,8 @@ export default {
|
||||
items: [],
|
||||
remark: this.formData.remark,
|
||||
adviserId: null,
|
||||
adviserName: null
|
||||
adviserName: null,
|
||||
licenseNumber: null,
|
||||
}
|
||||
this.formData.no = createUniqueCodeByHead(this.info.type ? 'LLSQ' : 'TLSQ')
|
||||
this.formData.ticketId = this.info.id
|
||||
@ -368,6 +370,7 @@ export default {
|
||||
this.formData.status = '01'
|
||||
this.formData.adviserId = this.info.adviserId
|
||||
this.formData.adviserName = this.info.adviserName
|
||||
this.formData.licenseNumber = this.info.carNo
|
||||
this.formData.items = [
|
||||
...this.chooseList.map(item => {
|
||||
return {
|
||||
|
@ -1,12 +1,30 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-dialog title="流程记录" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" :loading="formLoading" :inline="true" label-width="15rem">
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<span class="notice">{{
|
||||
projectList.length === 0
|
||||
? (this.formData.recordType === 'kssg'
|
||||
? "没有项目可以施工"
|
||||
: (this.formData.recordType === 'sgz')
|
||||
? "没有项目在施工中"
|
||||
: (this.formData.recordType === 'sgwczj'
|
||||
? "没有项目可以完成"
|
||||
: ''
|
||||
)
|
||||
)
|
||||
: ''
|
||||
}}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" :loading="formLoading" :inline="true"
|
||||
label-width="15rem">
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item v-if="formData.recordType !== 'zj'" label="维修项目" prop="item.id">
|
||||
<el-select style="width: 20rem" v-model="formData.item.id" >
|
||||
<el-option v-for="item in projectList" :key="item.id" :label="item.itemName" :value="item.id" />
|
||||
<el-select style="width: 20rem" v-model="formData.item.id">
|
||||
<el-option v-for="item in projectList" :key="item.id" :label="item.itemName" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -14,30 +32,41 @@
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input style="width: 30rem" type="textarea" v-model="formData.remark" :autosize="{ minRows: 4, maxRows: 8}"/>
|
||||
<el-input style="width: 30rem" type="textarea" v-model="formData.remark"
|
||||
:autosize="{ minRows: 4, maxRows: 8}"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="image">
|
||||
<!-- <FileUpload v-model="formData.image" />-->
|
||||
<ImageUpload v-model="formData.image" />
|
||||
<!-- <FileUpload v-model="formData.image" />-->
|
||||
<ImageUpload v-model="formData.image"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button v-if="formData.recordType !== 'sgwczj'" type="primary" @click="doUpdate">确 定</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj'" type="primary" @click="doUpdate">部分完成</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">
|
||||
{{isNext ? "整体完成并指派下一项目" : (isEndCheck ? "整体完成并移交总检" : "整体完成")}}
|
||||
<el-button v-if="formData.recordType !== 'sgwczj' && projectList.length > 0" type="primary" @click="doUpdate(null)">确
|
||||
定
|
||||
</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doUpdate(null)">
|
||||
部分完成
|
||||
</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doFinish">
|
||||
完成并移交下一班组
|
||||
</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"
|
||||
@click="doFinish">
|
||||
{{ isEndCheck ? "完成并移交总检" : "完成工单" }}
|
||||
</el-button>
|
||||
<!-- <el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">-->
|
||||
<!-- {{isNext ? "整体完成并指派下一项目" : (isEndCheck ? "整体完成并移交总检" : "整体完成")}}-->
|
||||
<!-- </el-button>-->
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<UpdateRepair ref="updateRepair" @success="doUpdate" />
|
||||
<UpdateRepair ref="updateRepair" @success="doUpdate"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -49,16 +78,16 @@ import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
|
||||
export default {
|
||||
name: "UpdateRecord",
|
||||
components: {UpdateRepair},
|
||||
data(){
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formData:{
|
||||
formData: {
|
||||
// 主表信息
|
||||
id: null,
|
||||
ticketsWorkStatus: null,
|
||||
remark: null,
|
||||
// 子表信息
|
||||
item:{
|
||||
item: {
|
||||
id: null,
|
||||
itemStatus: null,
|
||||
},
|
||||
@ -66,8 +95,8 @@ export default {
|
||||
image: null,
|
||||
recordType: null,
|
||||
},
|
||||
formRules:{
|
||||
'item.id':[{required: true, message: "维修项目不能为空", trigger: 'blur'}]
|
||||
formRules: {
|
||||
'item.id': [{required: true, message: "维修项目不能为空", trigger: 'blur'}]
|
||||
},
|
||||
formLoading: false,
|
||||
projectList: [],
|
||||
@ -78,104 +107,127 @@ export default {
|
||||
clickRow: null
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
init(){
|
||||
methods: {
|
||||
init() {
|
||||
this.formData = {
|
||||
// 主表信息
|
||||
id: null,
|
||||
ticketsWorkStatus: null,
|
||||
remark: null,
|
||||
// 子表信息
|
||||
item:{
|
||||
ticketsWorkStatus: null,
|
||||
remark: null,
|
||||
// 子表信息
|
||||
item: {
|
||||
id: null,
|
||||
itemStatus: null,
|
||||
itemStatus: null,
|
||||
},
|
||||
// 记录信息
|
||||
image: null,
|
||||
recordType: null,
|
||||
recordType: null,
|
||||
}
|
||||
this.projectList = []
|
||||
this.clickRow = null
|
||||
},
|
||||
async open(row){
|
||||
async open(row) {
|
||||
this.init()
|
||||
this.clickRow = row
|
||||
// 是否需要总检
|
||||
this.isEndCheck = row.endCheck === '1'
|
||||
this.formData.id = row.id
|
||||
this.formData.recordType = row.clickType
|
||||
await this.listProject(row.id)
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async listProject(ticketId){
|
||||
async listProject(ticketId) {
|
||||
try {
|
||||
this.formLoading = true
|
||||
const res = await getProjectList(ticketId)
|
||||
this.projectList = res.data
|
||||
this.formData.ticketsWorkStatus = "02"
|
||||
this.formData.item.itemStatus = "02"
|
||||
if (this.formData.recordType === 'kssg') {
|
||||
this.projectList = this.projectList.filter(item => item.itemStatus === '01')
|
||||
}else if (this.formData.recordType === 'sgz'){
|
||||
this.projectList = this.projectList.filter(item => item.itemStatus === '02')
|
||||
}else {
|
||||
// 因为自己手里有一个项目,所以是>1
|
||||
this.isNext = this.projectList.filter(item => item.itemStatus !== '03').length > 1
|
||||
// 下面 01:未派工、02:施工中、03:已完成
|
||||
// 开始施工展示所有的项目,方便返工
|
||||
// 施工中的项目只展示施工中的项目,一是没施工就有施工记录不合理,二是防止项目太多员工选错,三已完成的项目需要重新就重新开始施工
|
||||
// 施工完成同施工中
|
||||
if (this.formData.recordType !== 'kssg') {
|
||||
this.projectList = this.projectList.filter(item => item.itemStatus === '02')
|
||||
// 施工完成需要特殊计算一些东西
|
||||
// 项目全完成需要总检、项目全完成不需要总检、项目没有全完成
|
||||
if (this.formData.recordType !== 'sgz') {
|
||||
// 因为自己手里有一个项目,所以是>1
|
||||
this.isNext = this.projectList.filter(item => item.itemStatus !== '03').length > 1
|
||||
}
|
||||
}
|
||||
}finally {
|
||||
} finally {
|
||||
this.formLoading = false
|
||||
}
|
||||
},
|
||||
async doUpdate(){
|
||||
async doUpdate(nextName = null) {
|
||||
try {
|
||||
if (this.formData.recordType === 'zj'){
|
||||
if (nextName){
|
||||
this.formData['nextName'] = nextName
|
||||
}
|
||||
if (this.formData.recordType === 'zj') {
|
||||
this.formData.ticketsWorkStatus = '03'
|
||||
this.formData['isFinish'] = '1'
|
||||
}
|
||||
if (this.formData.recordType !== 'zj'){
|
||||
if (this.formData.recordType !== 'zj') {
|
||||
await this.$refs.formRef.validate()
|
||||
this.formLoading = true
|
||||
await updateStatus(this.formData)
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
if (!nextName) {
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
}
|
||||
this.dialogVisible = false
|
||||
this.$emit("success")
|
||||
}else {
|
||||
} else {
|
||||
this.formLoading = true
|
||||
await updateStatus(this.formData)
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
if (nextName) {
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
}
|
||||
this.dialogVisible = false
|
||||
this.$emit("success")
|
||||
}
|
||||
}catch {
|
||||
} catch {
|
||||
}
|
||||
},
|
||||
async doFinish(){
|
||||
try{
|
||||
async doFinish() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
this.formLoading = true
|
||||
// 不论是什么按钮,这个工单子项是完了的
|
||||
this.formData.item.itemStatus = "03"
|
||||
// 整体完成并指派下一个人
|
||||
if (this.isNext){
|
||||
if (this.isNext) {
|
||||
this.formData['finishType'] = "01"
|
||||
await this.$refs.updateRepair.open(this.clickRow)
|
||||
return
|
||||
}
|
||||
// 整体完成并移交总检
|
||||
if (this.isEndCheck){
|
||||
if (this.isEndCheck) {
|
||||
this.formData['finishType'] = "02"
|
||||
this.formData.ticketsWorkStatus = "05"
|
||||
await this.doUpdate();
|
||||
return
|
||||
}
|
||||
// 整体完成,只有没有项目,不需要总检,这个工单才是完了
|
||||
this.formData.ticketsWorkStatus = "03"
|
||||
this.formData['finishType'] = "03"
|
||||
this.formData['isFinish'] = '1'
|
||||
await this.doUpdate()
|
||||
}catch{}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.notice {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin: 1rem 0;
|
||||
font-size: 18px;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
@ -151,7 +151,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button type="primary" @click="submitForm" :disabled="!this.selectedRows">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -208,7 +208,7 @@ export default {
|
||||
await updateRepair(this.formData)
|
||||
this.$modal.msgSuccess("指派成功")
|
||||
this.dialogVisible = false
|
||||
this.$emit("success")
|
||||
this.$emit("success", this.formData.nowRepairName)
|
||||
} catch {
|
||||
|
||||
}
|
||||
|
@ -107,7 +107,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="配件属性" prop="attribute">
|
||||
<el-select v-model="formData.attribute" placeholder="请选择单位">
|
||||
<el-select v-model="formData.attribute" placeholder="请选择配件属性">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.REPAIR_WARES_ATTRIBUTE)"
|
||||
:key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
|
13
src/views/rescue/screen/rescueBigScreen.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'rescueBigScreen'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -116,9 +116,10 @@
|
||||
<el-input v-model="sendNotifyForm.content" type="textarea" placeholder="请输入模板内容" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="接收人" prop="userId">
|
||||
<el-select v-model="sendNotifyForm.userId" placeholder="请输入接收人" clearable style="width: 100%">
|
||||
<el-option v-for="item in users" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
<el-input v-model="sendNotifyForm.userId" type="text" placeholder="请输入接收人ID" />
|
||||
<!-- <el-select v-model="sendNotifyForm.userId" placeholder="请输入接收人" clearable style="width: 100%">-->
|
||||
<!-- <el-option v-for="item in users" :key="parseInt(item.id)" :label="item.nickname" :value="parseInt(item.id)" />-->
|
||||
<!-- </el-select>-->
|
||||
</el-form-item>
|
||||
<el-form-item v-for="param in sendNotifyForm.params" :key="param" :label="'参数 {' + param + '}'" :prop="'templateParams.' + param">
|
||||
<el-input v-model="sendNotifyForm.templateParams[param]" :placeholder="'请输入 ' + param + ' 参数'" />
|
||||
|