更新代码
This commit is contained in:
parent
ff3c246049
commit
4a40655ca2
@ -2,6 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
const preUrl = '/repair/tickets'
|
||||
|
||||
// 新增
|
||||
export function createTickets(data){
|
||||
return request({
|
||||
url: preUrl + "/create",
|
||||
@ -9,3 +10,12 @@ export function createTickets(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页
|
||||
export function getTicketsPage(params){
|
||||
return request({
|
||||
url: preUrl + "/page",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
@ -202,6 +202,8 @@ export const DICT_TYPE = {
|
||||
REPAIR_WARES_ATTRIBUTE: 'wares_attribute',
|
||||
//配件来源
|
||||
REPAIR_WARES_DATA_FORM: 'wares_data_form',
|
||||
//维修工单状态
|
||||
REPAIR_TICKETS_STATUS: 'repair_tickets_status',
|
||||
|
||||
// ---------会员相关---------member_coupon_type,member_coupon_out_rule,member_car,member_active
|
||||
//卡券类型
|
||||
|
@ -133,7 +133,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tenantCode:"lanan",
|
||||
// tenantCode:"lanan",
|
||||
tenantCode:"lighting",
|
||||
codeUrl: "",
|
||||
//是否开启图形验证码
|
||||
captchaEnable: false,
|
||||
|
82
src/views/repair/Components/ServerChoose.vue
Normal file
82
src/views/repair/Components/ServerChoose.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-select class="main-select-tree" clearable ref="selectTree" v-model="serverSelected" @blur="$emit('input-blur', $event)">
|
||||
<el-option v-for="server in optionData(serverList)"
|
||||
:key="server.value"
|
||||
:label="server.label"
|
||||
:value="server.value" style="display: none"/>
|
||||
<el-tree class="main-select-el-tree" ref="selectedTree"
|
||||
:data="serverList"
|
||||
:props="treeProps"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
:expand-on-click-node="expandOnClickNode"
|
||||
default-expand-all />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getBaseTypeList} from "@/api/base/type";
|
||||
|
||||
export default {
|
||||
name: "ServerChoose",
|
||||
props:{
|
||||
value:{
|
||||
type: String,
|
||||
default: "",
|
||||
required:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
serverSelected: undefined,
|
||||
expandOnClickNode: true,
|
||||
serverList: [],
|
||||
treeProps:{
|
||||
label: "name",
|
||||
children: "children"
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value(val){
|
||||
if (val){
|
||||
this.serverSelected = val
|
||||
}else {
|
||||
this.serverSelected = null
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.listServer()
|
||||
},
|
||||
methods: {
|
||||
async listServer(){
|
||||
// const res = await getBaseWarehouseList()
|
||||
const res = await getBaseTypeList({type: "03"})
|
||||
this.serverList = this.handleTree(res.data, 'id', 'parentId',"children","0")
|
||||
},
|
||||
optionData(array, result=[]){
|
||||
array.forEach(item => {
|
||||
result.push({label: item.name, value: item.id})
|
||||
if (item.children && item.children.length !== 0){
|
||||
this.optionData(item.children, result)
|
||||
}
|
||||
})
|
||||
return JSON.parse(JSON.stringify(result))
|
||||
},
|
||||
handleNodeClick(node){
|
||||
this.$emit("input", node.name)
|
||||
this.$emit("change")
|
||||
this.warehouseSelected = node.name
|
||||
this.$refs.selectTree.blur()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -10,7 +10,7 @@ import {getStaffList} from "@/api/company/staff";
|
||||
|
||||
export default {
|
||||
name: "StaffChoose",
|
||||
props:{
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
}
|
||||
@ -19,20 +19,21 @@ export default {
|
||||
return {
|
||||
staffList: [],
|
||||
staffSelected: undefined,
|
||||
hasRequest: false
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
watch: {
|
||||
staffSelected(val) {
|
||||
const staff = this.staffList.find(item => item.id === val);
|
||||
this.$emit("input", staff);
|
||||
},
|
||||
value(newVal){
|
||||
if (newVal){
|
||||
value(newVal) {
|
||||
if (newVal) {
|
||||
this.staffSelected = newVal.id
|
||||
}else {
|
||||
} else {
|
||||
this.staffSelected = null
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.listStaff()
|
||||
@ -40,8 +41,10 @@ export default {
|
||||
methods: {
|
||||
async listStaff() {
|
||||
try {
|
||||
if (this.hasRequest) return;
|
||||
const res = await getStaffList()
|
||||
this.staffList = res.data
|
||||
this.hasRequest = true
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ export default {
|
||||
await this.pageSo()
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -19,63 +19,65 @@
|
||||
<el-table-column align="center" label="规格" width="180" prop="model"/>
|
||||
<el-table-column align="center" label="编码" width="180" prop="code"/>
|
||||
<el-table-column align="center" label="数量" width="180" prop="count">
|
||||
<div class="item" slot-scope="scope">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count"/>
|
||||
<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="price">
|
||||
<div class="item" slot-scope="scope">
|
||||
<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"/>
|
||||
<span class="item__txt">{{ scope.row.price }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="折扣" width="180" prop="discount">
|
||||
<div class="item" slot-scope="scope">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.discount"/>
|
||||
<span class="item__txt">{{ scope.row.discount }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="金额" width="180" prop="totalPrice">
|
||||
<div class="item" slot-scope="scope">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.totalPrice"/>
|
||||
<span class="item__txt">{{ scope.row.totalPrice }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="施工人员" width="180" prop="repair">
|
||||
<div class="item" slot-scope="scope">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<StaffChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.repair"
|
||||
:select-width="'15rem'"/>
|
||||
<span class="item__txt">{{ scope.row.repair ? scope.row.repair.name : scope.row.repair }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="销售人员" width="180" prop="sale">
|
||||
<div class="item" slot-scope="scope">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<StaffChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.sale"
|
||||
:select-width="'15rem'"/>
|
||||
<span class="item__txt">{{ scope.row.sale ? scope.row.sale.name : scope.row.sale }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="类型" width="180" prop="type">
|
||||
<div class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.type"/>
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<ServerChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.type"/>
|
||||
<span class="item__txt">{{ scope.row.type }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="账类" width="180" prop="accountType">
|
||||
<div class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.accountType"/>
|
||||
<span class="item__txt">{{ scope.row.accountType }}</span>
|
||||
<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-select>
|
||||
<dict-tag class="item__txt" :type="DICT_TYPE.REPAIR_PAY_TYPE" v-model="scope.row.accountType"/>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态" width="180" prop="itemStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag v-if="scope.row.itemStatus" :type="DICT_TYPE.REPAIR_ITEM_STATUS" v-model="scope.row.itemStatus"/>
|
||||
<dict-tag :type="DICT_TYPE.REPAIR_ITEM_STATUS" v-model="scope.row.itemStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" width="180" prop="remark">
|
||||
<div class="item" slot-scope="scope">
|
||||
<div v-if="scope.row.id" class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark"/>
|
||||
<span class="item__txt">{{ scope.row.remark }}</span>
|
||||
</div>
|
||||
@ -97,10 +99,12 @@
|
||||
<script>
|
||||
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";
|
||||
|
||||
export default {
|
||||
name: "TicketItem",
|
||||
components: {StaffChoose, PartChoose},
|
||||
components: {ServerChoose, StaffChoose, PartChoose},
|
||||
props: {
|
||||
itemType: {
|
||||
type: String,
|
||||
@ -133,6 +137,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// DICT_TYPE() {
|
||||
// return DICT_TYPE
|
||||
// },
|
||||
getLabelName() {
|
||||
switch (this.itemType) {
|
||||
case "project":
|
||||
@ -147,17 +154,24 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDict(val){
|
||||
return this.getDictDatas(val)
|
||||
},
|
||||
// 清空数据
|
||||
resetTable(){
|
||||
this.list = [{}]
|
||||
},
|
||||
/** 鼠标移入cell */
|
||||
handleCellEnter(row, column, cell, event) {
|
||||
const property = column.property
|
||||
if (this.editProp.includes(property)) {
|
||||
if (row.id && this.editProp.includes(property)) {
|
||||
cell.querySelector('.item__txt').classList.add('item__txt--hover')
|
||||
}
|
||||
},
|
||||
/** 鼠标移出cell */
|
||||
handleCellLeave(row, column, cell, event) {
|
||||
const property = column.property
|
||||
if (this.editProp.includes(property)) {
|
||||
if (row.id && this.editProp.includes(property)) {
|
||||
cell.querySelector('.item__txt').classList.remove('item__txt--hover')
|
||||
}
|
||||
},
|
||||
@ -211,7 +225,8 @@ export default {
|
||||
discount: 10,
|
||||
remark: null,
|
||||
itemStatus: '01',
|
||||
totalPrice: data.price
|
||||
totalPrice: data.price,
|
||||
accountType: "01"
|
||||
}
|
||||
this.list.splice(this.list.length - 1, 0, data)
|
||||
},
|
||||
|
@ -40,7 +40,7 @@
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
||||
</el-row>
|
||||
<TicketTable :ticket-type="TicketType"/>
|
||||
<TicketTable :ticket-type="TicketType" :list="list"/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
</div>
|
||||
@ -51,6 +51,7 @@ 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";
|
||||
|
||||
export default {
|
||||
name: "TicketSearch",
|
||||
@ -69,16 +70,42 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams:{},
|
||||
queryParams:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
ticketStatus: null,
|
||||
},
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPage()
|
||||
},
|
||||
methods: {
|
||||
// 类型选择
|
||||
getRepairType(data){
|
||||
console.log(data)
|
||||
}
|
||||
},
|
||||
async getPage(){
|
||||
switch (this.TicketType){
|
||||
case "tu":
|
||||
this.queryParams.ticketStatus = "01"
|
||||
break
|
||||
case "tp":
|
||||
this.queryParams.ticketStatus = "02"
|
||||
break
|
||||
case "tv":
|
||||
this.queryParams.ticketStatus = "03"
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
const res = await getTicketsPage(this.queryParams)
|
||||
this.list = res.data.records
|
||||
this.total = res.data.total
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -52,22 +52,26 @@
|
||||
<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="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="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="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="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"
|
||||
@ -111,12 +115,15 @@ export default {
|
||||
type: String,
|
||||
defaultValue: 'tp',
|
||||
required: true
|
||||
},
|
||||
list:{
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<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">完善更多客户信息</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>
|
||||
@ -102,15 +102,15 @@
|
||||
<template slot="label">
|
||||
服务顾问
|
||||
</template>
|
||||
<StaffChoose v-model="selectStaff"/>
|
||||
<StaffChoose v-model="selectStaff" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-row v-if="createTicketType" :gutter="5" style="margin-bottom: 1rem">
|
||||
<el-col :span="4.8">
|
||||
<el-button size="small">维修建议</el-button>
|
||||
<el-button size="small" @click="$refs['repairAdvice'].open()">维修建议</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4.8">
|
||||
<el-button size="small">质保说明</el-button>
|
||||
<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>
|
||||
@ -129,9 +129,9 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TicketItem item-type="project" @tableData="projectData"/>
|
||||
<TicketItem v-if="createTicketType" item-type="part" @tableData="partData"/>
|
||||
<TicketItem v-if="createTicketType" item-type="other" @tableData="otherData"/>
|
||||
<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"/>
|
||||
<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'"
|
||||
@ -196,6 +196,9 @@
|
||||
<el-button type="primary">退料</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<RepairAdvice ref="repairAdvice" v-model="formData.repairAdvice"/>
|
||||
<QualityExplain ref="qualityExplain" v-model="formData.quality" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -206,10 +209,12 @@ 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 RepairAdvice from "@/views/repair/tickets/form/RepairAdvice.vue";
|
||||
import QualityExplain from "@/views/repair/tickets/form/QualityExplain.vue";
|
||||
|
||||
export default {
|
||||
name: "UserInfo",
|
||||
components: {CarChoose, TicketItem, StaffChoose, UserChoose},
|
||||
components: {QualityExplain, RepairAdvice, CarChoose, TicketItem, StaffChoose, UserChoose},
|
||||
props: {
|
||||
createTicketType: {
|
||||
type: Boolean,
|
||||
@ -257,7 +262,12 @@ export default {
|
||||
adviserName: null,
|
||||
payType: null,
|
||||
repairAdvice: null,
|
||||
qualityExplain: null,
|
||||
quality: {
|
||||
qualityMileage: 3000,
|
||||
qualityDay: 30
|
||||
},
|
||||
qualityMileage: null,
|
||||
qualityDay: null,
|
||||
ticketType: null,
|
||||
itemList: [],
|
||||
},
|
||||
@ -330,10 +340,12 @@ export default {
|
||||
this.createInit()
|
||||
this.createItemInit()
|
||||
try {
|
||||
// await createTickets(this.formData)
|
||||
await createTickets(this.formData)
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.init()
|
||||
}catch{}
|
||||
}catch{}finally {
|
||||
this.formData.ticketNo = null
|
||||
}
|
||||
},
|
||||
// 初始化
|
||||
init(){
|
||||
@ -364,7 +376,12 @@ export default {
|
||||
adviserName: null,
|
||||
payType: null,
|
||||
repairAdvice: null,
|
||||
qualityExplain: null,
|
||||
quality: {
|
||||
qualityMileage: 3000,
|
||||
qualityDay: 30
|
||||
},
|
||||
qualityMileage: null,
|
||||
qualityDay: null,
|
||||
ticketType: null,
|
||||
itemList: [],
|
||||
}
|
||||
@ -374,11 +391,20 @@ export default {
|
||||
this.projectList = []
|
||||
this.partList = []
|
||||
this.otherList = []
|
||||
this.resetTable()
|
||||
},
|
||||
resetTable(){
|
||||
this.$refs['projectTable'].resetTable()
|
||||
this.$refs['partTable'].resetTable()
|
||||
this.$refs['otherTable'].resetTable()
|
||||
},
|
||||
// 新增基础信息init
|
||||
createInit() {
|
||||
// 生成工单号
|
||||
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.userName = this.selectUser?.cusName
|
||||
@ -426,6 +452,7 @@ export default {
|
||||
itemTypeId: item?.type?.id,
|
||||
remark: item.remark,
|
||||
itemStatus: item.itemStatus,
|
||||
id: null
|
||||
}
|
||||
switch (type) {
|
||||
case 'project':
|
||||
@ -443,7 +470,7 @@ export default {
|
||||
temp[type + 'Id'] = item.id
|
||||
return temp;
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
66
src/views/repair/tickets/form/QualityExplain.vue
Normal file
66
src/views/repair/tickets/form/QualityExplain.vue
Normal file
@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="质保说明" :visible.sync="dialogVisible" width="40%" v-dialogDrag append-to-body>
|
||||
<el-descriptions class="margin-top" :column="1" :size="'medium'" border style="margin-bottom: 1rem">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
质量保证期为车辆行驶多少公里
|
||||
</template>
|
||||
<el-input v-model="data.qualityMileage"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
或者多少天
|
||||
</template>
|
||||
<el-input v-model="data.qualityDay"/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleOK">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UserChoose from "@/views/repair/Components/UserChoose.vue";
|
||||
|
||||
export default {
|
||||
name: "QualityExplain",
|
||||
components: {UserChoose},
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.data = val
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
data: {
|
||||
qualityMileage: 3000,
|
||||
qualityDay: 30
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleOK() {
|
||||
this.$emit("input", this.data)
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
47
src/views/repair/tickets/form/RepairAdvice.vue
Normal file
47
src/views/repair/tickets/form/RepairAdvice.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="维修建议" :visible.sync="dialogVisible" width="40%" v-dialogDrag append-to-body>
|
||||
<el-input type="textarea" v-model="repairAdvice" :autosize="{ minRows: 5, maxRows: 10}"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleOK">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "RepairAdvice",
|
||||
props:{
|
||||
value:{
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value(val){
|
||||
this.repairAdvice = val
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
repairAdvice: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(){
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleOK(){
|
||||
this.$emit("input", this.repairAdvice)
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user