更新代码
This commit is contained in:
parent
b46a55cbfd
commit
d4b1884849
29
src/api/repair/other/index.js
Normal file
29
src/api/repair/other/index.js
Normal file
@ -0,0 +1,29 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
const preUrl = "/repair/other"
|
||||
|
||||
// 分页
|
||||
export function getOtherPage(params){
|
||||
return request({
|
||||
url: preUrl + "/page",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 新增、修改
|
||||
export function updateOther(data){
|
||||
return request({
|
||||
url: preUrl + "/update",
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteOther(id){
|
||||
return request({
|
||||
url: preUrl + "/delete?id=" + id,
|
||||
method: "delete"
|
||||
})
|
||||
}
|
@ -19,3 +19,11 @@ export function getTicketsPage(params){
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查看单个工单
|
||||
export function getTicketsById(id){
|
||||
return request({
|
||||
url: preUrl + "/get?id=" + id,
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
@ -204,6 +204,8 @@ export const DICT_TYPE = {
|
||||
REPAIR_WARES_DATA_FORM: 'wares_data_form',
|
||||
//维修工单状态
|
||||
REPAIR_TICKETS_STATUS: 'repair_tickets_status',
|
||||
//维修工单配件状态
|
||||
REPAIR_PART_STATUS: 'repair_part_status',
|
||||
|
||||
// ---------会员相关---------member_coupon_type,member_coupon_out_rule,member_car,member_active
|
||||
//卡券类型
|
||||
|
@ -22,15 +22,17 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
carSelected(val) {
|
||||
const car = this.carList.find(item => item.id === val);
|
||||
this.$emit('input', car);
|
||||
if (val) {
|
||||
const car = this.carList.find(item => item.id === val);
|
||||
this.$emit('input', car);
|
||||
}
|
||||
},
|
||||
value(val) {
|
||||
this.carSelected = val ? val.id : null;
|
||||
},
|
||||
cusName(val, old) {
|
||||
if (val !== old){
|
||||
this.carSelected = null
|
||||
if (val !== old) {
|
||||
// this.carSelected = null
|
||||
this.getCarList()
|
||||
}
|
||||
}
|
||||
|
62
src/views/repair/Components/OtherChoose.vue
Normal file
62
src/views/repair/Components/OtherChoose.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select ref="otherSelected" v-model="otherSelected" clearable @blur="$emit('input-blur', $event)">
|
||||
<el-option v-for="other in otherList" :key="other.id" :label="other.name" :value="other.id" v-show="false"/>
|
||||
<el-table v-loading="loading" :data="otherList" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="name" :show-overflow-tooltip="true" width="180" />
|
||||
<el-table-column label="价格" prop="price" :show-overflow-tooltip="true" width="180"/>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getOtherPage} from "@/api/repair/other";
|
||||
|
||||
export default {
|
||||
name: "OtherChoose",
|
||||
data() {
|
||||
return {
|
||||
otherSelected: null,
|
||||
otherList: [],
|
||||
total: 0,
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPage()
|
||||
},
|
||||
methods: {
|
||||
async getPage(){
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getOtherPage(this.queryParams)
|
||||
this.otherList = res.data.records
|
||||
this.total = res.data.total
|
||||
}finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
rowClick(row){
|
||||
this.$emit("selected", row)
|
||||
this.$refs.otherSelected.blur()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-select v-model="partSelected" ref="selectTable" clearable :style="'width: ' + selectWidth" @blur="$emit('input-blur', $event)">
|
||||
<el-option style="display: none" v-for="part in partList" :key="part.id" :label="part.name" :value="part.id"/>
|
||||
<el-table :data="partList" style="width: 100%" @row-click="handleSelectionChange">
|
||||
<el-table :data="partList" style="width: 100%" v-loading="loading" @row-click="handleSelectionChange">
|
||||
<el-table-column label="序号" align="center" width="80">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
@ -12,7 +12,6 @@
|
||||
<el-table-column label="商品编码" prop="code" width="120"/>
|
||||
<el-table-column label="可用库存" prop="stock" width="80"/>
|
||||
<el-table-column label="成本" prop="price" width="80"/>
|
||||
<el-table-column label="仓库" prop="warehouse" width="80"/>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
@ -20,6 +19,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getWaresPage} from "@/api/repair/wares";
|
||||
|
||||
export default {
|
||||
name: "PartChoose",
|
||||
props: {
|
||||
@ -79,7 +81,8 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
total: 2
|
||||
total: 2,
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -88,7 +91,14 @@ export default {
|
||||
methods: {
|
||||
// TODO 获取商品信息
|
||||
async listPart() {
|
||||
|
||||
try{
|
||||
this.loading = true
|
||||
const res = await getWaresPage(this.queryParams)
|
||||
this.partList = res.data.records
|
||||
this.total = res.data.total
|
||||
}finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
handleSelectionChange(data) {
|
||||
this.$emit("input", data)
|
||||
|
63
src/views/repair/Components/ProjectChoose.vue
Normal file
63
src/views/repair/Components/ProjectChoose.vue
Normal file
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select ref="projectSelect" v-model="projectSelected" clearable @blur="$emit('input-blur', $event)">
|
||||
<el-option v-for="project in projectList" :key="project.id" :label="project.name" :value="project.id" v-show="false"/>
|
||||
<el-table v-loading="loading" :data="projectList" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="name" :show-overflow-tooltip="true" width="180" />
|
||||
<el-table-column label="规格" prop="spec" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="商品编码" prop="code" :show-overflow-tooltip="true" width="180"/>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getRepairProjectPage} from "@/api/repair/project";
|
||||
|
||||
export default {
|
||||
name: "ProjectChoose",
|
||||
data() {
|
||||
return {
|
||||
projectSelected: null,
|
||||
projectList: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listPage()
|
||||
},
|
||||
methods: {
|
||||
async listPage(){
|
||||
try {
|
||||
this.loading = true
|
||||
const res = await getRepairProjectPage(this.queryParams)
|
||||
this.projectList = res.data.records
|
||||
this.total = res.data.total
|
||||
}finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
rowClick(row){
|
||||
this.$emit("selected", row)
|
||||
this.$refs.projectSelect.blur()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -54,7 +54,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async listServer(){
|
||||
// const res = await getBaseWarehouseList()
|
||||
const res = await getBaseTypeList({type: "03"})
|
||||
this.serverList = this.handleTree(res.data, 'id', 'parentId',"children","0")
|
||||
},
|
||||
|
@ -28,8 +28,10 @@ export default {
|
||||
},
|
||||
watch:{
|
||||
userSelected(val){
|
||||
const user = this.userList.find(item => item.id === val)
|
||||
this.$emit("input", user)
|
||||
if (val){
|
||||
const user = this.userList.find(item => item.id === val)
|
||||
this.$emit("input", user)
|
||||
}
|
||||
},
|
||||
value(val){
|
||||
this.userSelected = val ? val.id : null
|
||||
|
75
src/views/repair/other/OtherForm.vue
Normal file
75
src/views/repair/other/OtherForm.vue
Normal file
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="80">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input type="text" v-model="formData.name" placeholder="请输入名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input type="number" v-model="formData.price" placeholder="请输入价格"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {updateOther} from "@/api/repair/other";
|
||||
|
||||
export default {
|
||||
name: "OtherForm",
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
name: null,
|
||||
price: null
|
||||
},
|
||||
dialogTitle: null,
|
||||
dialogVisible: false,
|
||||
formRules: {
|
||||
name: [{required: true, message: '名称不能为空', trigger: 'blur'}],
|
||||
price: [{required: true, message: '价格不能为空', trigger: 'blur'}]
|
||||
},
|
||||
formLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async submitForm() {
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formLoading = true;
|
||||
try {
|
||||
await updateOther(this.formData)
|
||||
this.$modal.msgSuccess(this.formData.id ? "修改成功" : "新增成功")
|
||||
this.$emit("success")
|
||||
} finally {
|
||||
this.dialogVisible = false
|
||||
this.formLoading = false
|
||||
}
|
||||
},
|
||||
async open(row) {
|
||||
this.reset()
|
||||
this.dialogTitle = row?.id ? "修改" : "新增"
|
||||
if (row){
|
||||
this.formData = row
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
reset() {
|
||||
this.formData = {
|
||||
name: null,
|
||||
price: null
|
||||
}
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
102
src/views/repair/other/index.vue
Normal file
102
src/views/repair/other/index.vue
Normal file
@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)">新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></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="名称" prop="name" align="center"/>
|
||||
<el-table-column label="价格" prop="price" align="center"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row)">修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(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"/>
|
||||
<OtherForm ref="otherForm" @success="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OtherForm from "@/views/repair/other/OtherForm.vue";
|
||||
import {getOtherPage, deleteOther} from "@/api/repair/other";
|
||||
|
||||
export default {
|
||||
name: "RepairOther",
|
||||
components: {OtherForm},
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
list: [],
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const res = await getOtherPage(this.queryParams)
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
openForm(row) {
|
||||
this.$refs.otherForm.open(row)
|
||||
},
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
const name = row.name
|
||||
try {
|
||||
await this.$modal.confirm('是否确认删除"' + name + '"的数据项?')
|
||||
await deleteOther(id)
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
await this.getList()
|
||||
}catch{}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
71
src/views/repair/tickets/Components/TicketChoose.vue
Normal file
71
src/views/repair/tickets/Components/TicketChoose.vue
Normal file
@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select ref="ticketSelect" v-model="ticketSelected" clearable>
|
||||
<el-option v-for="ticket in ticketList" :key="ticket.id" :label="ticket.ticketNo" :value="ticket.id" v-show="false"/>
|
||||
<el-table v-loading="loading" :data="ticketList" :stripe="true" :show-overflow-tooltip="true" @row-click="rowClick">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单号" align="center" width="200" prop="ticketNo" />
|
||||
<el-table-column label="姓名" align="center" width="180" prop="userName" />
|
||||
<el-table-column label="车牌" align="center" width="180" prop="carNo" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getTicketsPage} from "@/api/repair/tickets/Tickets";
|
||||
|
||||
export default {
|
||||
name: "TicketChoose",
|
||||
props:{
|
||||
value:{
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ticketSelected: null,
|
||||
ticketList: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
ticketsStatus: "01"
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value(val){
|
||||
// console.log(val)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listTicket()
|
||||
},
|
||||
methods: {
|
||||
// 未结算工单
|
||||
async listTicket(){
|
||||
const res = await getTicketsPage(this.queryParams)
|
||||
this.ticketList = res.data.records
|
||||
this.total = res.data.total
|
||||
},
|
||||
rowClick(row){
|
||||
this.ticketSelected = row.id
|
||||
this.$emit("selected", row.id)
|
||||
this.$refs.ticketSelect.blur()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -12,7 +12,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" :label="getLabelName" width="200" prop="goods">
|
||||
<div class="item" slot-scope="scope">
|
||||
<PartChoose @input-blur="save(scope.row)" class="item__input" @selected="getPart" :select-width="'15rem'"/>
|
||||
<ProjectChoose v-if="itemType === 'project'" @input-blur="save(scope.row)" class="item__input"
|
||||
@selected="getPart" :select-width="'15rem'"/>
|
||||
<PartChoose v-if="itemType === 'part'" @input-blur="save(scope.row)" class="item__input" @selected="getPart"
|
||||
:select-width="'15rem'"/>
|
||||
<OtherChoose v-if="itemType === 'other'" @input-blur="save(scope.row)" class="item__input" @selected="getPart"
|
||||
:select-width="'15rem'"/>
|
||||
<span class="item__txt">{{ scope.row.name ? scope.row.name : scope.row.goods }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
@ -24,7 +29,11 @@
|
||||
<span class="item__txt">{{ scope.row.count }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单位" width="180" prop="unit"/>
|
||||
<el-table-column align="center" label="单位" width="180" prop="unit">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_UNIT" v-model="scope.row.unit"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价" width="180" prop="price">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.price"/>
|
||||
@ -66,7 +75,8 @@
|
||||
<el-table-column align="center" label="账类" width="180" prop="accountType">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<el-select v-model="scope.row.accountType" class="item__input" @blur="save(scope.row)">
|
||||
<el-option v-for="item in getDict(DICT_TYPE.REPAIR_PAY_TYPE)" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option v-for="item in getDict(DICT_TYPE.REPAIR_PAY_TYPE)" :key="item.value" :label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_PAY_TYPE" v-model="scope.row.accountType"/>
|
||||
</div>
|
||||
@ -84,7 +94,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-plus"
|
||||
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleCreateItem"
|
||||
>新增
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteItem(scope.$index)"
|
||||
@ -93,6 +103,10 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<WaresForm ref="partFormRef" class="noPadding" @success="returnPart"/>
|
||||
<RepairProjectForm class="noPadding" ref="projectFormRef" @success="returnProject"/>
|
||||
<OtherForm ref="otherFormRef" class="noPadding" @success="returnOther"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -101,15 +115,28 @@ import PartChoose from "@/views/repair/Components/PartChoose.vue";
|
||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||
import ServerChoose from "@/views/repair/Components/ServerChoose.vue";
|
||||
import {DICT_TYPE} from "@/utils/dict";
|
||||
import WaresForm from "@/views/repair/wares/WaresForm.vue";
|
||||
import RepairProjectForm from "@/views/repair/project/form/RepairProjectForm.vue";
|
||||
import ProjectChoose from "@/views/repair/Components/ProjectChoose.vue";
|
||||
import OtherChoose from "@/views/repair/Components/OtherChoose.vue";
|
||||
import OtherForm from "@/views/repair/other/OtherForm.vue";
|
||||
|
||||
export default {
|
||||
name: "TicketItem",
|
||||
components: {ServerChoose, StaffChoose, PartChoose},
|
||||
components: {
|
||||
OtherForm,
|
||||
OtherChoose, ProjectChoose, RepairProjectForm, WaresForm, ServerChoose, StaffChoose, PartChoose
|
||||
},
|
||||
props: {
|
||||
itemType: {
|
||||
type: String,
|
||||
default: 'project',
|
||||
required: true
|
||||
},
|
||||
inListData:{
|
||||
type:Array,
|
||||
default: () => {return []},
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -128,12 +155,23 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
list:{
|
||||
handler(val){
|
||||
watch: {
|
||||
list: {
|
||||
handler(val) {
|
||||
this.$emit("tableData", val)
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
inListData(val){
|
||||
if (val && val.length > 0){
|
||||
// console.log(val)
|
||||
// this.list = val.map(item => {
|
||||
// return {
|
||||
// ...item,
|
||||
// count: item?.itemCount,
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -154,11 +192,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDict(val){
|
||||
getDict(val) {
|
||||
return this.getDictDatas(val)
|
||||
},
|
||||
// 清空数据
|
||||
resetTable(){
|
||||
resetTable() {
|
||||
this.list = [{}]
|
||||
},
|
||||
/** 鼠标移入cell */
|
||||
@ -207,8 +245,8 @@ export default {
|
||||
/** 保存数据 */
|
||||
save(row) {
|
||||
// TODO 有BUG 更新表格
|
||||
if (row.id){
|
||||
row.itemStatus = row.repair ? "02" : "01"
|
||||
if (row.id) {
|
||||
row.itemStatus = (row.repair && this.itemType === 'project') ? "02" : "01"
|
||||
row.totalPrice = row.count * row.price * (row.discount / 10)
|
||||
}
|
||||
const id = row.id
|
||||
@ -218,7 +256,15 @@ export default {
|
||||
})
|
||||
this.clickCellMap[id] = []
|
||||
},
|
||||
getPart(data) {
|
||||
async getPart(data) {
|
||||
const flag = this.list.find(item => item.id === data.id)
|
||||
if (flag) {
|
||||
try {
|
||||
await this.$modal.confirm(`${data.name}已存在,确定要重复添加?`)
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
}
|
||||
data = {
|
||||
...data,
|
||||
count: 1,
|
||||
@ -228,12 +274,52 @@ export default {
|
||||
totalPrice: data.price,
|
||||
accountType: "01"
|
||||
}
|
||||
switch (this.itemType) {
|
||||
case 'project':
|
||||
data.itemStatus = "01"
|
||||
data.model = data.spec
|
||||
break
|
||||
case "part":
|
||||
data.itemStatus = "08"
|
||||
break
|
||||
case "other":
|
||||
data.itemStatus = "06"
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
data.type = null
|
||||
this.list.splice(this.list.length - 1, 0, data)
|
||||
},
|
||||
handleDeleteItem(index) {
|
||||
if (this.list[index].id) {
|
||||
this.list.splice(index, 1)
|
||||
}
|
||||
},
|
||||
// TODO 新增
|
||||
handleCreateItem() {
|
||||
switch (this.itemType) {
|
||||
case "project":
|
||||
this.$refs.projectFormRef.open(undefined)
|
||||
break
|
||||
case "part":
|
||||
this.$refs.partFormRef.open(undefined)
|
||||
break
|
||||
case "other":
|
||||
this.$refs.otherFormRef.open(undefined)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
returnProject() {
|
||||
// console.log("新增项目回调")
|
||||
},
|
||||
returnPart() {
|
||||
// console.log("新增配件回调")
|
||||
},
|
||||
returnOther() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -272,4 +358,8 @@ export default {
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .noPadding {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,11 +1,12 @@
|
||||
<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 v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
||||
<el-form-item label="关键字" prop="ticketNo">
|
||||
<el-input v-model="queryParams.ticketNo" style="width: 30rem" placeholder="单号,车牌,客户名称,手机号码,备注"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="searchTimeArray">
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="queryParams.searchTimeArray"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
@ -24,12 +25,12 @@
|
||||
<el-form-item v-if="TicketType === 'tp'" label="类型" prop="repairType">
|
||||
<RepairTypeChoose @selected="getRepairType" />
|
||||
</el-form-item>
|
||||
<el-form-item label="门店" prop="userId">
|
||||
<SupplierChoose />
|
||||
<el-form-item label="门店" prop="corpId">
|
||||
<CorpChoose v-model="queryParams.corp"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" >搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" >重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -48,18 +49,18 @@
|
||||
|
||||
<script>
|
||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||
import TicketTable from "@/views/repair/tickets/Components/TicketTable.vue";
|
||||
import RepairTypeChoose from "@/views/repair/Components/RepairTypeChoose.vue";
|
||||
import {getTicketsPage} from "@/api/repair/tickets/Tickets";
|
||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||
|
||||
export default {
|
||||
name: "TicketSearch",
|
||||
components: {
|
||||
TicketTable,
|
||||
StaffChoose,
|
||||
SupplierChoose,
|
||||
RepairTypeChoose
|
||||
RepairTypeChoose,
|
||||
CorpChoose
|
||||
},
|
||||
props:{
|
||||
TicketType:{
|
||||
@ -73,7 +74,12 @@ export default {
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
ticketStatus: null,
|
||||
ticketsStatus: null,
|
||||
ticketNo: null,
|
||||
searchTimeArray: [],
|
||||
repairType: null,
|
||||
corpId: null,
|
||||
corp: null
|
||||
},
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
@ -91,21 +97,31 @@ export default {
|
||||
async getPage(){
|
||||
switch (this.TicketType){
|
||||
case "tu":
|
||||
this.queryParams.ticketStatus = "01"
|
||||
this.queryParams.ticketsStatus = "01"
|
||||
break
|
||||
case "tp":
|
||||
this.queryParams.ticketStatus = "02"
|
||||
this.queryParams.ticketsStatus = "02"
|
||||
break
|
||||
case "tv":
|
||||
this.queryParams.ticketStatus = "03"
|
||||
this.queryParams.ticketsStatus = "03"
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
this.queryParams.corpId = this.queryParams?.corp?.id
|
||||
const res = await getTicketsPage(this.queryParams)
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
},
|
||||
handleQuery(){
|
||||
this.queryParams.pageNo = 1
|
||||
this.getPage()
|
||||
},
|
||||
handleReset(){
|
||||
this.resetForm("queryForm")
|
||||
this.queryParams.corp = null
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,43 +1,108 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table v-if="TicketType === 'tp'" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<!-- 已结 -->
|
||||
<!-- <el-table v-if="TicketType === 'tp'" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">-->
|
||||
<!-- <el-table-column label="序号" align="center">-->
|
||||
<!-- <template scope="scope">-->
|
||||
<!-- <span>{{ scope.$index + 1 }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="服务顾问" align="center" prop="adviserName" width="180" />-->
|
||||
<!-- <el-table-column label="单号" align="center" prop="ticketNo" width="200" />-->
|
||||
<!-- <el-table-column label="车牌号" align="center" prop="carNo" width="180" />-->
|
||||
<!-- <el-table-column label="姓名" align="center" prop="userName" width="180" />-->
|
||||
<!-- <el-table-column label="车系" align="center" prop="carBrandName" width="180" />-->
|
||||
<!-- <el-table-column label="手机号" align="center" prop="userMobile" width="180" />-->
|
||||
<!-- <el-table-column label="消费项目" align="center" prop="repairType" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :type="DICT_TYPE.REPAIR_TYPE" v-model="scope.row.repairType" />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="规格" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="类型" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="数量" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="金额" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="合计" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="成本" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="毛利" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="支付金额" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="优惠" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="本次里程" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="销售人员" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="施工人员" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="备注" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="结算时间" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="创建时间" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="业务来源" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="门店" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="结算人" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="操作" fixed="right" align="center" width="180">-->
|
||||
<!-- <template v-slot="scope">-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-delete"-->
|
||||
<!-- >查看-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-delete"-->
|
||||
<!-- >返结-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-delete"-->
|
||||
<!-- >作废-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- TODO 未结(先共用) -->
|
||||
<!-- <el-table v-if="TicketType === 'tu'" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">-->
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="服务顾问" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="车牌号" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="姓名" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="车系" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="手机号" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="消费项目" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="编码" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="规格" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="类型" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="数量" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="金额" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="合计" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="成本" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="毛利" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="支付金额" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="优惠" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="本次里程" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="销售人员" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="施工人员" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="备注" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="结算时间" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="创建时间" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="业务来源" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="门店" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="结算人" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<el-table-column label="订单编号" align="center" prop="ticketNo" width="200"/>
|
||||
<el-table-column label="维修类别" align="center" prop="repairType" width="180">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_TYPE" v-model="scope.row.repairType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="ticketsWorkStatus" width="180">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_TICKETS_STATUS" v-model="scope.row.ticketsWorkStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center" prop="userName" width="180"/>
|
||||
<el-table-column label="车牌号" align="center" prop="carNo" width="180"/>
|
||||
<el-table-column label="车系" align="center" prop="carBrandName" width="180"/>
|
||||
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预计完工" align="center" prop="outTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ parseTime(scope.row.outTime, '{y}-{m}-{d}') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计金额" align="center" prop="totalPrice" width="180"/>
|
||||
<el-table-column label="参考成本" align="center" prop="cost" width="180"/>
|
||||
<el-table-column label="参考毛利" align="center" prop="profit" width="180"/>
|
||||
<el-table-column label="领料状态" align="center" prop="partStatus" width="180">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_PART_STATUS" v-model="scope.row.partStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="服务顾问" align="center" prop="adviserName" width="180"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" width="180"/>
|
||||
<el-table-column label="所属门店" align="center" prop="corpId" width="180"/>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180" v-if="TicketType !== 'tv'">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
<el-button v-if="TicketType === 'tu'" size="mini" type="text" icon="el-icon-finished"
|
||||
>结算
|
||||
</el-button>
|
||||
<el-button v-if="TicketType === 'tp'" size="mini" type="text" icon="el-icon-refresh-right"
|
||||
>返结
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@ -46,77 +111,44 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-if="TicketType === 'tu'" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单编号" align="center" prop="ticketNo" width="200" />
|
||||
<el-table-column label="维修类别" align="center" prop="repairType" width="180">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_TYPE" v-model="scope.row.repairType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="客户名称" align="center" prop="userName" width="180" />
|
||||
<el-table-column label="车牌号" align="center" prop="carNo" width="180" />
|
||||
<el-table-column label="车系" align="center" prop="carBrandName" width="180" />
|
||||
<el-table-column label="手机号" align="center" prop="userMobile" width="180" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="预计完工" align="center" prop="outTime" width="180" />
|
||||
<el-table-column label="合计金额" align="center" prop="totalPrice" width="180" />
|
||||
<el-table-column label="参考成本" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="参考毛利" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="领料状态" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="服务顾问" align="center" prop="adviserName" width="180" />
|
||||
<el-table-column label="备注" align="center" prop="remark" width="180" />
|
||||
<el-table-column label="所属门店" align="center" prop="corpName" width="180" />
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
>结算
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-if="TicketType === 'tv'" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="车牌" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="客户" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="数量" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="应收" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="现金" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="刷银行卡" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="挂账金额" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="优惠" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="折扣" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="实收" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="作废时间" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="作废人" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="作废备注" align="center" prop="soNo" width="180" />
|
||||
</el-table>
|
||||
<!-- 作废 -->
|
||||
<!-- <el-table v-if="TicketType === 'tv'" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">-->
|
||||
<!-- <el-table-column label="序号" align="center">-->
|
||||
<!-- <template scope="scope">-->
|
||||
<!-- <span>{{ scope.$index + 1 }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="单号" align="center" prop="ticketNo" width="200" />-->
|
||||
<!-- <el-table-column label="车牌" align="center" prop="carNo" width="180" />-->
|
||||
<!-- <el-table-column label="客户" align="center" prop="userName" width="180" />-->
|
||||
<!-- <el-table-column label="数量" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="应收" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="现金" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="刷银行卡" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="挂账金额" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="优惠" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="折扣" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="实收" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="作废时间" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="作废人" align="center" prop="soNo" width="180" />-->
|
||||
<!-- <el-table-column label="作废备注" align="center" prop="remark" width="180" />-->
|
||||
<!-- </el-table>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getDictsByType} from "@/api/system/dict/data";
|
||||
|
||||
export default {
|
||||
name: "TicketTable",
|
||||
props:{
|
||||
props: {
|
||||
TicketType: {
|
||||
type: String,
|
||||
defaultValue: 'tp',
|
||||
required: true
|
||||
},
|
||||
list:{
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
@ -126,7 +158,10 @@ export default {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
handleShow(row) {
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-descriptions class="margin-top" :column="4" :size="'medium'" border style="margin-bottom: 1rem">
|
||||
<template slot="extra">
|
||||
<el-button v-if="createTicketType" type="success" size="small">新增客户信息</el-button>
|
||||
<el-button v-if="createTicketType" type="primary" size="small" :disabled="!selectUser.id">完善更多客户信息</el-button>
|
||||
<el-button type="primary" size="small">选择业务</el-button>
|
||||
</template>
|
||||
<!-- <template slot="extra">-->
|
||||
<!-- <el-button v-if="createTicketType" type="success" size="small">新增客户信息</el-button>-->
|
||||
<!-- <el-button v-if="createTicketType" type="primary" size="small" :disabled="!selectUser.id">完善更多客户信息</el-button>-->
|
||||
<!-- <el-button type="primary" size="small">选择业务</el-button>-->
|
||||
<!-- </template>-->
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
用户选择
|
||||
@ -30,12 +30,12 @@
|
||||
</template>
|
||||
<el-input disabled v-model="selectCar.vin"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
车牌
|
||||
</template>
|
||||
<el-input disabled v-model="selectCar.licenseNumber"/>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 车牌-->
|
||||
<!-- </template>-->
|
||||
<!-- <el-input disabled v-model="selectCar.licenseNumber"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
品牌车系
|
||||
@ -113,8 +113,8 @@
|
||||
<el-button size="small" @click="$refs['qualityExplain'].open()">质保说明</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4.8">
|
||||
<el-button size="small" v-if="formData.endCheck" @click="formData.endCheck = 0">终检</el-button>
|
||||
<el-button size="small" v-if="!formData.endCheck" @click="formData.endCheck = 1">不终检</el-button>
|
||||
<el-button size="small" v-if="formData.endCheck.toString() === '1'" @click="formData.endCheck = 0">终检</el-button>
|
||||
<el-button size="small" v-if="formData.endCheck.toString() === '0'" @click="formData.endCheck = 1">不终检</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4.8">
|
||||
<el-select v-model="formData.partDisposal" size="small">
|
||||
@ -129,20 +129,19 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TicketItem item-type="project" @tableData="projectData" ref="projectTable"/>
|
||||
<TicketItem v-if="createTicketType" item-type="part" @tableData="partData" ref="partTable"/>
|
||||
<TicketItem v-if="createTicketType" item-type="other" @tableData="otherData" ref="otherTable"/>
|
||||
<TicketItem item-type="project" :in-list-data="projectList" @tableData="projectData" ref="projectTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="partList" item-type="part" @tableData="partData" ref="partTable"/>
|
||||
<TicketItem v-if="createTicketType" :in-list-data="otherList" item-type="other" @tableData="otherData" ref="otherTable"/>
|
||||
<el-row :gutter="createTicketType ? 2 : 3" style="margin-top: 1rem">
|
||||
<el-col :span="createTicketType ? 12 : 16">
|
||||
<el-descriptions class="margin-top" :column="createTicketType ? 2 : 3" border :size="'medium'"
|
||||
style="margin-bottom: 1rem">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
工单号
|
||||
</template>
|
||||
<el-select v-model="formData.ticketNo" size="small">
|
||||
</el-select>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item>-->
|
||||
<!-- <template slot="label">-->
|
||||
<!-- 工单号-->
|
||||
<!-- </template>-->
|
||||
<!-- <TicketChoose @selected="getTickets"/>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
时间
|
||||
@ -188,12 +187,11 @@
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
<el-col :span="12" style="margin-top:1rem;display: flex;justify-content: right">
|
||||
<el-button type="success" @click="handleSave">登记保存</el-button>
|
||||
<el-button type="success" @click="handleSave">完成</el-button>
|
||||
<el-button type="danger">结算</el-button>
|
||||
<el-button type="success">完成</el-button>
|
||||
<el-button type="primary">通知施工</el-button>
|
||||
<el-button type="primary">领料</el-button>
|
||||
<el-button type="primary">退料</el-button>
|
||||
<!-- <el-button type="primary">通知施工</el-button>-->
|
||||
<!-- <el-button type="primary">领料</el-button>-->
|
||||
<!-- <el-button type="primary">退料</el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@ -208,13 +206,14 @@ import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||
import TicketItem from "@/views/repair/tickets/Components/TicketItem.vue";
|
||||
import CarChoose from "@/views/repair/Components/CarChoose.vue";
|
||||
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
||||
import {createTickets} from "@/api/repair/tickets/Tickets";
|
||||
import {createTickets, getTicketsById} from "@/api/repair/tickets/Tickets";
|
||||
import RepairAdvice from "@/views/repair/tickets/form/RepairAdvice.vue";
|
||||
import QualityExplain from "@/views/repair/tickets/form/QualityExplain.vue";
|
||||
import TicketChoose from "@/views/repair/tickets/Components/TicketChoose.vue";
|
||||
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
components: {QualityExplain, RepairAdvice, CarChoose, TicketItem, StaffChoose, UserChoose},
|
||||
components: {TicketChoose, QualityExplain, RepairAdvice, CarChoose, TicketItem, StaffChoose, UserChoose},
|
||||
props: {
|
||||
createTicketType: {
|
||||
type: Boolean,
|
||||
@ -270,6 +269,7 @@ export default {
|
||||
qualityDay: null,
|
||||
ticketType: null,
|
||||
itemList: [],
|
||||
ticketStatus: "01"
|
||||
},
|
||||
selectUser: {},
|
||||
selectCar: {},
|
||||
@ -384,6 +384,7 @@ export default {
|
||||
qualityDay: null,
|
||||
ticketType: null,
|
||||
itemList: [],
|
||||
ticketStatus: "01"
|
||||
}
|
||||
this.selectUser ={}
|
||||
this.selectCar = {}
|
||||
@ -401,12 +402,12 @@ export default {
|
||||
// 新增基础信息init
|
||||
createInit() {
|
||||
// 生成工单号
|
||||
this.formData.ticketNo = createUniqueCodeByHead("GD")
|
||||
this.formData.ticketNo = this.formData.ticketNo || createUniqueCodeByHead("GD")
|
||||
// 质保说明
|
||||
this.formData.qualityMileage = this.formData.quality.qualityMileage
|
||||
this.formData.qualityDay = this.formData.quality.qualityDay
|
||||
// 选择的用户
|
||||
this.formData.userId = this.selectUser?.userId
|
||||
this.formData.userId = this.selectUser?.id
|
||||
this.formData.userName = this.selectUser?.cusName
|
||||
this.formData.userMobile = this.selectUser?.phoneNumber
|
||||
|
||||
@ -440,7 +441,7 @@ export default {
|
||||
const temp = {
|
||||
...item,
|
||||
itemName: item.name,
|
||||
itemCount: item.count,
|
||||
itemCount: item?.count,
|
||||
itemUnit: item.unit,
|
||||
itemPrice: item.price,
|
||||
itemDiscount: item.discount,
|
||||
@ -471,6 +472,23 @@ export default {
|
||||
return temp;
|
||||
})
|
||||
},
|
||||
// 查看工单
|
||||
async getTickets(id){
|
||||
try {
|
||||
const res = await getTicketsById(id)
|
||||
const data= res.data
|
||||
this.formData = {
|
||||
...data,
|
||||
quality: {qualityMileage: data.qualityMileage, qualityDay: data.qualityDay}
|
||||
}
|
||||
const itemList = this.formData.itemList
|
||||
this.selectUser = {id: data.userId}
|
||||
this.selectCar = {id: data.carId}
|
||||
this.projectList = [itemList.find(item => item.itemType === '01')]
|
||||
this.partList = [itemList.find(item => item.itemType === '02')]
|
||||
this.otherList = [itemList.find(item => item.itemType === '03')]
|
||||
}catch{}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user