跑通流程
This commit is contained in:
parent
6e9d9ac508
commit
3a55c93d2f
@ -52,3 +52,12 @@ export function confirmBack(id){
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 采购入库
|
||||||
|
export function inWare(data){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/inWare",
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {getStaffList} from "@/api/company/staff";
|
import {getStaffList} from "@/api/company/staff";
|
||||||
|
import {getUserProfile} from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StaffChoose",
|
name: "StaffChoose",
|
||||||
@ -19,6 +20,9 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
roleCode:{
|
||||||
|
type: String,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -47,14 +51,23 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.listStaff()
|
this.listStaff()
|
||||||
|
this.getNow()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async listStaff() {
|
async listStaff() {
|
||||||
this.selectLoading = true
|
this.selectLoading = true
|
||||||
try {
|
try {
|
||||||
if (!this.isGet) return;
|
if (!this.isGet) return;
|
||||||
const res = await getStaffList(this.query)
|
if (this.roleCode){
|
||||||
this.staffList = res.data
|
// todo 暂时先把流程跑通了来
|
||||||
|
}else {
|
||||||
|
const res = await getStaffList(this.query)
|
||||||
|
this.staffList = res.data
|
||||||
|
if (this.query){
|
||||||
|
this.staffSelected = this.staffList.filter(item => item.tel === this.query)[0].id
|
||||||
|
this.query = null
|
||||||
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.selectLoading = false
|
this.selectLoading = false
|
||||||
}
|
}
|
||||||
@ -62,6 +75,11 @@ export default {
|
|||||||
changeQuery(val) {
|
changeQuery(val) {
|
||||||
this.query = val
|
this.query = val
|
||||||
this.listStaff()
|
this.listStaff()
|
||||||
|
},
|
||||||
|
async getNow(){
|
||||||
|
// 获取当前登录用户
|
||||||
|
const res = await getUserProfile()
|
||||||
|
this.changeQuery(res.data.mobile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,33 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<SoShow :so-by-type="soByType" :is-back="isBack" ref="soShow" />
|
<SoShow :so-by-type="soByType" :is-back="isBack" ref="soShow" />
|
||||||
|
|
||||||
|
<el-dialog title="入库" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||||
|
<el-table v-loading="inLoading" :data="inItems" :stripe="true" :show-overflow-tooltip="true"
|
||||||
|
@selection-change="selectRow"
|
||||||
|
@cell-mouse-enter="handleCellEnter"
|
||||||
|
@cell-mouse-leave="handleCellLeave"
|
||||||
|
@cell-click="handleCellClick"
|
||||||
|
:key="tableKey"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
|
<el-table-column label="商品名称" align="center" prop="repairWares.name" />
|
||||||
|
<el-table-column label="商品编码" align="center" prop="repairWares.code" width="180" />
|
||||||
|
<el-table-column label="条形码" align="center" prop="repairWares.barCode" width="180" />
|
||||||
|
<el-table-column label="规格" align="center" prop="repairWares.model" width="180" />
|
||||||
|
<el-table-column label="采购数量" align="center" prop="goodsCount" width="150" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="inCount" width="150">
|
||||||
|
<div class="item" slot-scope="scope">
|
||||||
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.inCount"/>
|
||||||
|
<span class="item__txt">{{ scope.row.inCount }}</span>
|
||||||
|
</div>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" :disabled="selectRows.length === 0" @click="doInWares">确定</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -132,8 +159,10 @@ import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
|||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||||
import {DICT_TYPE} from "@/utils/dict";
|
import {DICT_TYPE} from "@/utils/dict";
|
||||||
import {getRepairSoPage, voidSo, getRepairSoById} from "@/api/repair/stockOperate/stockOperate";
|
import {getRepairSoPage, voidSo, getRepairSoById, inWare} from "@/api/repair/stockOperate/stockOperate";
|
||||||
import SoShow from "@/views/repair/stockOperate/Components/SoSow.vue";
|
import SoShow from "@/views/repair/stockOperate/Components/SoSow.vue";
|
||||||
|
import {getRepairSoiByIds} from "@/api/repair/stockOperate/stockOperateItem";
|
||||||
|
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoIndex",
|
name: "SoIndex",
|
||||||
@ -203,7 +232,19 @@ export default {
|
|||||||
showSearch: true,
|
showSearch: true,
|
||||||
list: [],
|
list: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
total: 0
|
total: 0,
|
||||||
|
dialogVisible: false,
|
||||||
|
inItems: [],
|
||||||
|
inLoading: false,
|
||||||
|
selectRows: [],
|
||||||
|
inWaresFormData:{
|
||||||
|
id: null,
|
||||||
|
soiList: [],
|
||||||
|
soNo: null
|
||||||
|
},
|
||||||
|
editProp: ['inCount'],
|
||||||
|
clickCellMap: {},
|
||||||
|
tableKey: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -285,13 +326,134 @@ export default {
|
|||||||
await this.$refs.soShow.open(res.data)
|
await this.$refs.soShow.open(res.data)
|
||||||
},
|
},
|
||||||
// 入库操作
|
// 入库操作
|
||||||
handleInWares(row){
|
async handleInWares(row){
|
||||||
|
this.inWaresFormData = {
|
||||||
}
|
id: null,
|
||||||
|
soiList: []
|
||||||
|
}
|
||||||
|
this.inWaresFormData['id'] = row.id
|
||||||
|
try {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.inLoading = true
|
||||||
|
const resRow = await getRepairSoById(row.id)
|
||||||
|
const ids = resRow.data.goodsList.map(item => item.id)
|
||||||
|
const res = await getRepairSoiByIds(ids)
|
||||||
|
this.inItems = res.data
|
||||||
|
this.inItems = this.inItems.filter(item => item.inCount !== item.goodsCount)
|
||||||
|
this.inItems = [...this.inItems.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
goodsCount: item.goodsCount - item?.inCount | 0,
|
||||||
|
inCount: item.goodsCount - item?.inCount | 0
|
||||||
|
}
|
||||||
|
})]
|
||||||
|
}finally {
|
||||||
|
this.inLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectRow(val){
|
||||||
|
this.selectRows = val
|
||||||
|
},
|
||||||
|
async doInWares(){
|
||||||
|
try {
|
||||||
|
this.inWaresFormData.soiList = this.selectRows
|
||||||
|
this.inWaresFormData.soNo = createUniqueCodeByHead("RC")
|
||||||
|
this.inLoading = true
|
||||||
|
await inWare(this.inWaresFormData)
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$modal.msgSuccess("入库成功")
|
||||||
|
await this.pageSo()
|
||||||
|
}catch{}
|
||||||
|
},
|
||||||
|
/** 鼠标移入cell */
|
||||||
|
handleCellEnter(row, column, cell, event) {
|
||||||
|
const property = column.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 (row.id && this.editProp.includes(property)) {
|
||||||
|
cell.querySelector('.item__txt').classList.remove('item__txt--hover')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 点击cell */
|
||||||
|
handleCellClick(row, column, cell, event) {
|
||||||
|
const property = column.property
|
||||||
|
if (this.editProp.includes(property)) {
|
||||||
|
if (!row.id || property !== 'goods') {
|
||||||
|
// 保存cell
|
||||||
|
this.saveCellClick(row, cell)
|
||||||
|
cell.querySelector('.item__txt').style.display = 'none'
|
||||||
|
cell.querySelector('.item__input').style.display = 'inline'
|
||||||
|
cell.querySelector('input').focus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 取消编辑状态 */
|
||||||
|
cancelEditable(cell) {
|
||||||
|
cell.querySelector('.item__txt').style.display = 'inline'
|
||||||
|
cell.querySelector('.item__input').style.display = 'none'
|
||||||
|
},
|
||||||
|
/** 保存进入编辑的cell */
|
||||||
|
saveCellClick(row, cell) {
|
||||||
|
const id = row.id
|
||||||
|
if (this.clickCellMap[id] !== undefined) {
|
||||||
|
if (!this.clickCellMap[id].includes(cell)) {
|
||||||
|
this.clickCellMap[id].push(cell)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.clickCellMap[id] = [cell]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 保存数据 */
|
||||||
|
save(row) {
|
||||||
|
const id = row.id
|
||||||
|
// 取消本行所有cell的编辑状态
|
||||||
|
this.clickCellMap[id].forEach(cell => {
|
||||||
|
this.cancelEditable(cell)
|
||||||
|
})
|
||||||
|
this.clickCellMap[id] = []
|
||||||
|
this.tableKey++
|
||||||
|
this.selectRows = []
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.item {
|
||||||
|
.item__input {
|
||||||
|
display: none;
|
||||||
|
width: 100px;
|
||||||
|
/* 调整elementUI中样式 如果不需要调整请忽略 */
|
||||||
|
.el-input__inner {
|
||||||
|
height: 24px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 调整elementUI中样式 如果不需要调整请忽略 */
|
||||||
|
.el-input__suffix {
|
||||||
|
i {
|
||||||
|
font-size: 12px !important;
|
||||||
|
line-height: 26px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item__txt {
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
width: 100px;
|
||||||
|
line-height: 24px;
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item__txt--hover {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -388,7 +388,9 @@ export default {
|
|||||||
/** 保存数据 */
|
/** 保存数据 */
|
||||||
save(row) {
|
save(row) {
|
||||||
// 更新表格的数据
|
// 更新表格的数据
|
||||||
row.isStock = this.type ? row.waresCount <= row.wares.stock : row.waresCount <= row.waresAlreadyCount
|
if (row.wares) {
|
||||||
|
row.isStock = this.type ? row.waresCount <= row.wares.stock : row.waresCount <= row.waresAlreadyCount
|
||||||
|
}
|
||||||
if (!this.type && !row.isStock) {
|
if (!this.type && !row.isStock) {
|
||||||
this.$modal.msgWarning("退料数量不能超过领取数量")
|
this.$modal.msgWarning("退料数量不能超过领取数量")
|
||||||
row.waresCount = row.waresAlreadyCount
|
row.waresCount = row.waresAlreadyCount
|
||||||
|
@ -14,16 +14,17 @@
|
|||||||
end-placeholder="结束日期">
|
end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="TicketType === 'tp'" label="服务顾问" prop="userId">
|
<el-form-item v-if="TicketType === 'tp'" label="服务顾问" prop="userId">
|
||||||
<StaffChoose />
|
<StaffChoose/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="TicketType === 'tu'" label="维修类别" prop="repairType">
|
<el-form-item v-if="TicketType === 'tu'" label="维修类别" prop="repairType">
|
||||||
<el-select v-model="queryParams.repairType" size="small">
|
<el-select v-model="queryParams.repairType" size="small">
|
||||||
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_TYPE)" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_TYPE)" :key="item.value" :label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="TicketType === 'tp'" label="类型" prop="repairType">
|
<el-form-item v-if="TicketType === 'tp'" label="类型" prop="repairType">
|
||||||
<RepairTypeChoose @selected="getRepairType" />
|
<RepairTypeChoose @selected="getRepairType"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="门店" prop="corpId">
|
<el-form-item label="门店" prop="corpId">
|
||||||
<CorpChoose v-model="queryParams.corp"/>
|
<CorpChoose v-model="queryParams.corp"/>
|
||||||
@ -41,8 +42,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<TicketTable :ticket-type="TicketType" :list="list" @setVoid="getPage" :is-w-x-c-w="isWXCW"/>
|
<TicketTable :ticket-type="TicketType" :list="list" @setVoid="getPage" :is-w-x-c-w="isCW"/>
|
||||||
<pagination @pagination="getPage" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
<pagination @pagination="getPage" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -63,8 +65,8 @@ export default {
|
|||||||
RepairTypeChoose,
|
RepairTypeChoose,
|
||||||
CorpChoose
|
CorpChoose
|
||||||
},
|
},
|
||||||
props:{
|
props: {
|
||||||
TicketType:{
|
TicketType: {
|
||||||
type: String,
|
type: String,
|
||||||
defaultValue: 'tp',
|
defaultValue: 'tp',
|
||||||
required: true
|
required: true
|
||||||
@ -72,7 +74,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryParams:{
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
ticketsStatus: null,
|
ticketsStatus: null,
|
||||||
@ -85,25 +87,30 @@ export default {
|
|||||||
showSearch: true,
|
showSearch: true,
|
||||||
total: 0,
|
total: 0,
|
||||||
list: [],
|
list: [],
|
||||||
isWXCW: false
|
isCW: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getPage()
|
this.getPage()
|
||||||
this.getIsWXCW()
|
this.getIsCW()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 是否是财务
|
// 是否是财务
|
||||||
async getIsWXCW(){
|
async getIsCW() {
|
||||||
const res = await checkRole("wxcw")
|
const kjRes = await checkRole("kj")
|
||||||
this.isWXCW = res.data
|
if (kjRes.data) {
|
||||||
|
this.isCW = kjRes.data
|
||||||
|
} else {
|
||||||
|
const cnRes = await checkRole("cn")
|
||||||
|
this.isCW = cnRes.data
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 类型选择
|
// 类型选择
|
||||||
getRepairType(data){
|
getRepairType(data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
},
|
},
|
||||||
async getPage(){
|
async getPage() {
|
||||||
switch (this.TicketType){
|
switch (this.TicketType) {
|
||||||
case "tu":
|
case "tu":
|
||||||
this.queryParams.ticketsStatus = "01"
|
this.queryParams.ticketsStatus = "01"
|
||||||
break
|
break
|
||||||
@ -121,11 +128,11 @@ export default {
|
|||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
this.total = res.data.total
|
this.total = res.data.total
|
||||||
},
|
},
|
||||||
handleQuery(){
|
handleQuery() {
|
||||||
this.queryParams.pageNo = 1
|
this.queryParams.pageNo = 1
|
||||||
this.getPage()
|
this.getPage()
|
||||||
},
|
},
|
||||||
handleReset(){
|
handleReset() {
|
||||||
this.resetForm("queryForm")
|
this.resetForm("queryForm")
|
||||||
this.queryParams.corp = null
|
this.queryParams.corp = null
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="TicketType === 'tu' && isWXCW && !scope.row.payType" size="mini" type="text" icon="el-icon-finished"
|
<el-button v-if="TicketType === 'tu' && isWXCW && scope.row.isFinish === '1'" size="mini" type="text" icon="el-icon-finished"
|
||||||
@click="handlePaid(scope.row)"
|
@click="handlePaid(scope.row)"
|
||||||
>结算
|
>结算
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-dialog title="客户信息" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
<el-dialog title="客户信息" ref="dialogRef" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body v-loading="dialogLoading">
|
||||||
<el-form size="small" ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading"
|
<el-form size="small" ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading"
|
||||||
label-width="100px">
|
label-width="100px">
|
||||||
<el-collapse v-model="activeNames">
|
<el-collapse v-model="activeNames">
|
||||||
@ -68,16 +68,16 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="2">
|
<!-- <el-row :gutter="2">-->
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="选择会员" prop="userInfo.memberLevelId">
|
<!-- <el-form-item label="选择会员" prop="userInfo.memberLevelId">-->
|
||||||
<el-select v-model="formData.userInfo.memberLevelId" placeholder="请选择会员">
|
<!-- <el-select v-model="formData.userInfo.memberLevelId" placeholder="请选择会员">-->
|
||||||
<el-option v-for="(item,index) in levelList" :key="item.id"
|
<!-- <el-option v-for="(item,index) in levelList" :key="item.id"-->
|
||||||
:label="item.name" :value="item.id"/>
|
<!-- :label="item.name" :value="item.id"/>-->
|
||||||
</el-select>
|
<!-- </el-select>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="联系地址" prop="userInfo.address">
|
<el-form-item label="联系地址" prop="userInfo.address">
|
||||||
@ -318,26 +318,34 @@ export default {
|
|||||||
sexDictDatas: getDictDatas(DICT_TYPE.DICT_SYS_USER_SEX),
|
sexDictDatas: getDictDatas(DICT_TYPE.DICT_SYS_USER_SEX),
|
||||||
cusBusiTypeDictDatas: getDictDatas(DICT_TYPE.DICT_CUS_BUSI_TYPE),
|
cusBusiTypeDictDatas: getDictDatas(DICT_TYPE.DICT_CUS_BUSI_TYPE),
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
|
dialogLoading: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async open(data) {
|
async open(data) {
|
||||||
this.reset()
|
|
||||||
if (data?.userInfo?.id){
|
|
||||||
this.formData.userInfo = {
|
|
||||||
...this.formData.userInfo,
|
|
||||||
...data.userInfo
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (data?.carInfo?.id){
|
|
||||||
this.formData.carInfo = {
|
|
||||||
...this.formData.carInfo,
|
|
||||||
...data.carInfo,
|
|
||||||
brandAndModel: [data.carInfo?.carBrand, data.carInfo?.carModel]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await this.listLevel()
|
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
|
try {
|
||||||
|
this.reset()
|
||||||
|
// this.dialogLoading = this.$loading({
|
||||||
|
// target: this.$refs.dialogRef.$el
|
||||||
|
// })
|
||||||
|
if (data?.userInfo?.id){
|
||||||
|
this.formData.userInfo = {
|
||||||
|
...this.formData.userInfo,
|
||||||
|
...data.userInfo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data?.carInfo?.id){
|
||||||
|
this.formData.carInfo = {
|
||||||
|
...this.formData.carInfo,
|
||||||
|
...data.carInfo,
|
||||||
|
brandAndModel: [data.carInfo?.carBrand, data.carInfo?.carModel]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// await this.listLevel()
|
||||||
|
}finally {
|
||||||
|
// this.dialogLoading.close()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async compute(){
|
async compute(){
|
||||||
this.buttonLoading = true
|
this.buttonLoading = true
|
||||||
|
Loading…
Reference in New Issue
Block a user