Compare commits
No commits in common. "8c1c1f6e609277799842d3fefb3e86a7d876618b" and "12916957f618ebb99027ee6cb72b052209405c81" have entirely different histories.
8c1c1f6e60
...
12916957f6
@ -63,28 +63,3 @@ export function passBackTicketWares(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改是否传给保险公司
|
|
||||||
export function updateSafe(data){
|
|
||||||
return request({
|
|
||||||
url: preUrl + "/updateSafe",
|
|
||||||
method: "post",
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查单个配件申请单的信息
|
|
||||||
export function getById(id){
|
|
||||||
return request({
|
|
||||||
url: preUrl + "/getById?id=" + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据选择的配件生成采购单需要的数据
|
|
||||||
export function getByIds(ids){
|
|
||||||
return request({
|
|
||||||
url: preUrl + "/getByIds?ids=" + ids,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -192,11 +192,3 @@ export function overOrder(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据工单ID查客户和车辆信息
|
|
||||||
export function getCusAndCarById(id){
|
|
||||||
return request({
|
|
||||||
url: preUrl + "/getCusAndCarById?id=" + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<el-table-column label="申请人" align="center" prop="repairName" width="180"/>
|
<el-table-column label="申请人" align="center" prop="repairName" width="180"/>
|
||||||
<el-table-column label="岗位" align="center" prop="repairWork" width="180">
|
<el-table-column label="岗位" align="center" prop="repairWork" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :type="DICT_TYPE.REPAIR_WORK_TYPE" :value="scope.row.repairWork"/>
|
<dict-tag :type="DICT_TYPE.REPAIR_WORK_TYPE" :value="scope.row.repairWork" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="服务顾问" align="center" prop="adviserName" width="180"/>
|
<el-table-column label="服务顾问" align="center" prop="adviserName" width="180"/>
|
||||||
@ -46,21 +46,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination style="margin-bottom: 2rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo"
|
<pagination style="margin-bottom: 2rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-dialog title="单据处理" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
<el-dialog title="单据处理" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||||
<el-form :inline="true">
|
|
||||||
<el-form-item label="名称" prop="query">
|
|
||||||
<el-input v-model="query"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="searchByQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" @click=resetByQuery>重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-table
|
<el-table
|
||||||
@cell-mouse-enter="handleCellEnter"
|
@cell-mouse-enter="handleCellEnter"
|
||||||
@cell-mouse-leave="handleCellLeave"
|
@cell-mouse-leave="handleCellLeave"
|
||||||
@ -71,11 +61,10 @@
|
|||||||
:row-class-name="getRowClass"
|
:row-class-name="getRowClass"
|
||||||
@selection-change="handleSelect"
|
@selection-change="handleSelect"
|
||||||
:key="tableKey"
|
:key="tableKey"
|
||||||
ref="tableRef"
|
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="80" align="center"/>
|
<el-table-column type="selection" width="80" align="center"/>
|
||||||
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
||||||
<!-- <el-table-column label="规格" align="center" prop="wares.model" width="180"/>-->
|
<!-- <el-table-column label="规格" align="center" prop="wares.model" width="180"/>-->
|
||||||
<el-table-column label="领料数量" v-if="type" align="center" prop="waresCount" width="180">
|
<el-table-column label="领料数量" v-if="type" align="center" prop="waresCount" width="180">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
|
||||||
@ -109,30 +98,8 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="采购单" :visible.sync="inStockDialog" width="80%" v-dialogDrag append-to-body>
|
<el-dialog title="采购单" :visible.sync="inStockDialog" width="80%" v-dialogDrag append-to-body>
|
||||||
<el-descriptions class="margin-top" title="车辆信息" :column="3" border>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">
|
|
||||||
车牌号
|
|
||||||
</template>
|
|
||||||
{{carInfo.licenseNumber}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">
|
|
||||||
品牌
|
|
||||||
</template>
|
|
||||||
{{carInfo.carBrand}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">
|
|
||||||
型号
|
|
||||||
</template>
|
|
||||||
{{carInfo.carModel}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<el-collapse>
|
|
||||||
<el-collapse-item v-for="[key, value] in partList" :title="key">
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="value"
|
:data="partList"
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
show-summary
|
show-summary
|
||||||
@ -146,53 +113,52 @@
|
|||||||
<span>{{ scope.$index + 1 }}</span>
|
<span>{{ scope.$index + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品名称" align="center" prop="waresName" width="200"/>
|
<el-table-column label="商品名称" align="center" prop="name" width="200"/>
|
||||||
<el-table-column label="规格" align="center" width="180" prop="wares.model">
|
<el-table-column label="规格" align="center" width="180" prop="model">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.wares.model"
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.model"
|
||||||
placeholder="请输入规格"></el-input>
|
placeholder="请输入规格"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.wares.model }}</span>
|
<span class="item__txt">{{ scope.row.model }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品编码" align="center" width="180" prop="wares.code">
|
<el-table-column label="商品编码" align="center" width="180" prop="code">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.wares.code"
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.code"
|
||||||
placeholder="请输入内容"></el-input>
|
placeholder="请输入内容"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.wares.code }}</span>
|
<span class="item__txt">{{ scope.row.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库" align="center" width="150" prop="wares.warehouse">
|
<el-table-column label="仓库" align="center" width="150" prop="warehouse">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<WarehouseChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.wares.ware"
|
<WarehouseChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.ware"
|
||||||
@change="changeWare(scope.row)"/>
|
@change="changeWare(scope.row)"/>
|
||||||
<span class="item__txt">{{ scope.row.wares.warehouseName }}</span>
|
<span class="item__txt">{{ scope.row.warehouseName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存" align="center" width="150" prop="wares.stock"/>
|
<el-table-column label="库存" align="center" width="150" prop="stock"/>
|
||||||
<el-table-column label="单位" align="center" width="150" prop="wares.unit">
|
<el-table-column label="单位" align="center" width="150" prop="unit">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-select class="item__input" v-model="scope.row.wares.unit" @blur="save(scope.row)">
|
<el-select class="item__input" v-model="scope.row.unit" @blur="save(scope.row)">
|
||||||
<el-option v-for="dict in getDictDatasToType(DICT_TYPE.REPAIR_UNIT)" :key="dict.value" :label="dict.label"
|
<el-option v-for="dict in getDictDatasToType(DICT_TYPE.REPAIR_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
:value="dict.value"/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<span class="item__txt">
|
<span class="item__txt">
|
||||||
<dict-tag :type="DICT_TYPE.REPAIR_UNIT" v-model="scope.row.wares.unit"/>
|
<dict-tag :type="DICT_TYPE.REPAIR_UNIT" v-model="scope.row.unit"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" width="150" prop="waresCount">
|
<el-table-column label="数量" align="center" width="150" prop="count">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count"
|
||||||
placeholder="请输入内容"></el-input>
|
placeholder="请输入内容"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.waresCount }}</span>
|
<span class="item__txt">{{ scope.row.count }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上次进价" align="center" width="150" prop="wares.purPrice"/>
|
<el-table-column label="上次进价" align="center" width="150" prop="purPrice"/>
|
||||||
<el-table-column label="采购单价" align="center" width="150" prop="wares.newPrice">
|
<el-table-column label="采购单价" align="center" width="150" prop="newPrice">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.wares.newPrice"
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.newPrice"
|
||||||
placeholder="请输入内容"></el-input>
|
placeholder="请输入内容"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.wares.newPrice }}</span>
|
<span class="item__txt">{{ scope.row.newPrice }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购金额" align="center" width="150" prop="totalPrice"/>
|
<el-table-column label="采购金额" align="center" width="150" prop="totalPrice"/>
|
||||||
@ -211,8 +177,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-collapse-item>
|
<el-row :gutter="1" style="margin-top: 1rem">
|
||||||
</el-collapse>
|
<el-col :span="24">
|
||||||
|
<el-input v-model="remark" placeholder="备注"/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleSubmit">确定</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<TicketWaresShow ref="ticketWaresShow" :user-role="'repair_warehouse'" @success="getList" :type="false"/>
|
<TicketWaresShow ref="ticketWaresShow" :user-role="'repair_warehouse'" @success="getList" :type="false"/>
|
||||||
@ -220,7 +192,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getPage, pass, passBackTicketWares, getByIds} from "@/api/repair/tickets/TicketWares";
|
import {getPage, pass, passBackTicketWares} from "@/api/repair/tickets/TicketWares";
|
||||||
import {listTwItem} from "@/api/repair/tickets/TWItem";
|
import {listTwItem} from "@/api/repair/tickets/TWItem";
|
||||||
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
||||||
import {parseTime} from "@/utils/ruoyi";
|
import {parseTime} from "@/utils/ruoyi";
|
||||||
@ -229,8 +201,6 @@ import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue";
|
|||||||
import {createRepairSo} from "@/api/repair/stockOperate/stockOperate";
|
import {createRepairSo} from "@/api/repair/stockOperate/stockOperate";
|
||||||
import {getUserProfile} from "@/api/system/user";
|
import {getUserProfile} from "@/api/system/user";
|
||||||
import TicketWaresShow from "@/views/repair/tickets/Components/TicketWaresShow.vue";
|
import TicketWaresShow from "@/views/repair/tickets/Components/TicketWaresShow.vue";
|
||||||
import {getCusAndCarById} from "@/api/repair/tickets/Tickets";
|
|
||||||
import {getCarBrand} from "@/api/base/carbrand";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "WaresItem",
|
name: "WaresItem",
|
||||||
@ -254,7 +224,6 @@ export default {
|
|||||||
items: [],
|
items: [],
|
||||||
dialogLoading: false,
|
dialogLoading: false,
|
||||||
selections: [],
|
selections: [],
|
||||||
selectionIds: [],
|
|
||||||
formData: {},
|
formData: {},
|
||||||
inStockDialog: false,
|
inStockDialog: false,
|
||||||
partList: [],
|
partList: [],
|
||||||
@ -262,43 +231,16 @@ export default {
|
|||||||
// 保存进入编辑的cell
|
// 保存进入编辑的cell
|
||||||
clickCellMap: {},
|
clickCellMap: {},
|
||||||
// 需要编辑的属性
|
// 需要编辑的属性
|
||||||
editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount', 'wares.model', 'unit'],
|
editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount', 'model', 'unit'],
|
||||||
remark: null,
|
remark: null,
|
||||||
tableKey: 0,
|
tableKey: 0,
|
||||||
query: null,
|
|
||||||
twId: null,
|
|
||||||
carInfo: {},
|
|
||||||
ticketId: null,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchByQuery(){
|
getDictDatasToType(type){
|
||||||
const data = {
|
|
||||||
twId: this.twId,
|
|
||||||
query: this.query
|
|
||||||
}
|
|
||||||
this.getTwitemList(data).then(() => {
|
|
||||||
this.setSelectedRows();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
setSelectedRows() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.tableRef.clearSelection(); // 清除所有选择
|
|
||||||
this.items.forEach(row => {
|
|
||||||
if (this.selectionIds.includes(row.id)) {
|
|
||||||
this.$refs.tableRef.toggleRowSelection(row, true); // 选中行
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
resetByQuery() {
|
|
||||||
this.query = null
|
|
||||||
this.searchByQuery()
|
|
||||||
},
|
|
||||||
getDictDatasToType(type) {
|
|
||||||
return this.getDictDatas(type)
|
return this.getDictDatas(type)
|
||||||
},
|
},
|
||||||
// 通过 true是全部、false是选择
|
// 通过 true是全部、false是选择
|
||||||
@ -337,19 +279,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 生成采购 true是全部、false是选择
|
// 生成采购 true是全部、false是选择
|
||||||
async handleCreate() {
|
async handleCreate() {
|
||||||
try {
|
|
||||||
const carRes = await getCusAndCarById(this.ticketId)
|
|
||||||
this.carInfo = carRes.data.carInfo
|
|
||||||
if (this.carInfo.carBrand){
|
|
||||||
const brandRes = await getCarBrand(this.carInfo.carBrand)
|
|
||||||
this.carInfo.carBrand = brandRes.data.brandName
|
|
||||||
}
|
|
||||||
const ids = this.selections.map(item => item.id)
|
|
||||||
const res = await getByIds(ids)
|
|
||||||
this.partList = Object.entries(res.data)
|
|
||||||
this.inStockDialog = true
|
this.inStockDialog = true
|
||||||
|
this.partList = [...this.selections.map(item => {
|
||||||
|
return {
|
||||||
|
...item.wares,
|
||||||
|
count: item.waresCount,
|
||||||
|
newPrice: item.wares.purPrice,
|
||||||
|
totalPrice: item.waresCount * item.wares.purPrice
|
||||||
|
}
|
||||||
|
})]
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
}catch{}
|
|
||||||
},
|
},
|
||||||
async getList() {
|
async getList() {
|
||||||
try {
|
try {
|
||||||
@ -371,19 +310,15 @@ export default {
|
|||||||
this.resetForm('queryForm')
|
this.resetForm('queryForm')
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
handleDispose(row) {
|
async handleDispose(row) {
|
||||||
this.formData = {}
|
this.formData = {}
|
||||||
this.formData = {
|
this.formData = {
|
||||||
...row
|
...row
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
const data = {twId: row.id}
|
|
||||||
this.twId = row.id
|
|
||||||
this.ticketId = row.ticketId
|
|
||||||
this.getTwitemList(data)
|
|
||||||
},
|
|
||||||
async getTwitemList(data) {
|
|
||||||
try {
|
try {
|
||||||
|
this.dialogLoading = true
|
||||||
|
const data = {twId: row.id}
|
||||||
const res = await listTwItem(data)
|
const res = await listTwItem(data)
|
||||||
this.items = res.data
|
this.items = res.data
|
||||||
this.items = this.items.filter(item => item.waresStatus === '1')
|
this.items = this.items.filter(item => item.waresStatus === '1')
|
||||||
@ -393,7 +328,8 @@ export default {
|
|||||||
item.isStock = this.type ? count <= item.wares.stock : true
|
item.isStock = this.type ? count <= item.wares.stock : true
|
||||||
})
|
})
|
||||||
this.items = this.items.filter(item => this.type ? item.waresCount > 0 : item.waresAlreadyCount > 0)
|
this.items = this.items.filter(item => this.type ? item.waresCount > 0 : item.waresAlreadyCount > 0)
|
||||||
} catch {
|
} finally {
|
||||||
|
this.dialogLoading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRowClass(row) {
|
getRowClass(row) {
|
||||||
@ -404,9 +340,6 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSelect(row) {
|
handleSelect(row) {
|
||||||
this.selections = row
|
this.selections = row
|
||||||
if (row && row.length > 0){
|
|
||||||
this.selectionIds = row.map(item => item.id);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 设置不统计的字段
|
// 设置不统计的字段
|
||||||
getSummaries(param) {
|
getSummaries(param) {
|
||||||
@ -510,7 +443,7 @@ export default {
|
|||||||
const isNull = this.validateNull();
|
const isNull = this.validateNull();
|
||||||
if (!isNull) return;
|
if (!isNull) return;
|
||||||
const names = this.validateZero()
|
const names = this.validateZero()
|
||||||
if (names) {
|
if (names){
|
||||||
await this.$modal.confirm("确认配件:" + names + "的采购价格为0吗?")
|
await this.$modal.confirm("确认配件:" + names + "的采购价格为0吗?")
|
||||||
}
|
}
|
||||||
await this.createInit()
|
await this.createInit()
|
||||||
@ -551,36 +484,36 @@ export default {
|
|||||||
}
|
}
|
||||||
})]
|
})]
|
||||||
},
|
},
|
||||||
validateNull() {
|
validateNull(){
|
||||||
const flag = this.partList.map(item => {
|
const flag = this.partList.map(item => {
|
||||||
const price = item.newPrice
|
const price = item.newPrice
|
||||||
if (price === null || price === "") {
|
if (price === null || price === ""){
|
||||||
this.$modal.msgError("配件:" + item.name + "采购价格为空")
|
this.$modal.msgError("配件:" + item.name + "采购价格为空")
|
||||||
return false
|
return false
|
||||||
} else {
|
}else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let count = 0
|
let count = 0
|
||||||
flag.forEach(item => {
|
flag.forEach(item => {
|
||||||
if (!item) {
|
if (!item){
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return count === 0
|
return count === 0
|
||||||
},
|
},
|
||||||
validateZero() {
|
validateZero(){
|
||||||
const flag = this.partList.map(item => {
|
const flag = this.partList.map(item => {
|
||||||
const price = parseFloat(item.newPrice)
|
const price = parseFloat(item.newPrice)
|
||||||
if (price === 0) {
|
if (price === 0){
|
||||||
return item.name
|
return item.name
|
||||||
} else {
|
}else {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return flag.filter(item => item !== "").join(",")
|
return flag.filter(item => item !== "").join(",")
|
||||||
},
|
},
|
||||||
handleView(row) {
|
handleView(row){
|
||||||
this.$refs.ticketWaresShow.open(row)
|
this.$refs.ticketWaresShow.open(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,9 +95,6 @@
|
|||||||
<el-button size="small" type="primary" @click="handleAddWares">
|
<el-button size="small" type="primary" @click="handleAddWares">
|
||||||
添加配件
|
添加配件
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" type="primary" @click="handleSetting">
|
|
||||||
设置可见
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 卡片内容 -->
|
<!-- 卡片内容 -->
|
||||||
@ -169,56 +166,12 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<TWIAdd ref="twiAdd" @success="handleSuccess" />
|
<TWIAdd ref="twiAdd" @success="handleSuccess" />
|
||||||
|
|
||||||
<el-dialog title="设置" width="40%" :visible.sync="settingDialog" v-dialogDrag append-to-body>
|
|
||||||
<el-form v-model="settingForm" :inline="true" label-width="20rem">
|
|
||||||
<el-row :gutter="1">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="是否传给保险公司" prop="toSafe">
|
|
||||||
<el-switch
|
|
||||||
v-model="settingForm.toSafe"
|
|
||||||
active-text="是"
|
|
||||||
active-value="1"
|
|
||||||
inactive-text="否"
|
|
||||||
inactive-value="0"
|
|
||||||
>
|
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="1">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="保险公司名称" prop="safeName">
|
|
||||||
<el-input :disabled="settingForm.toSafe !== '1'" v-model="settingForm.safeName" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="1">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="联系人" prop="safeContact">
|
|
||||||
<el-input :disabled="settingForm.toSafe !== '1'" v-model="settingForm.safeContact" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="1">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="联系电话" prop="safeMobile">
|
|
||||||
<el-input :disabled="settingForm.toSafe !== '1'" v-model="settingForm.safeMobile" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="doSetting">确认</el-button>
|
|
||||||
<el-button @click="settingDialog = false" >取消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getTicketsById} from "@/api/repair/tickets/Tickets";
|
import {getTicketsById} from "@/api/repair/tickets/Tickets";
|
||||||
import {auditTicketWares, updateSafe, getById} from "@/api/repair/tickets/TicketWares";
|
import {auditTicketWares} from "@/api/repair/tickets/TicketWares";
|
||||||
import {listTwItem, updateIsShow} from "@/api/repair/tickets/TWItem";
|
import {listTwItem, updateIsShow} from "@/api/repair/tickets/TWItem";
|
||||||
import DiscountInput from "@/views/repair/tickets/Components/DiscountInput.vue";
|
import DiscountInput from "@/views/repair/tickets/Components/DiscountInput.vue";
|
||||||
import item from "@/layout/components/Sidebar/Item.vue";
|
import item from "@/layout/components/Sidebar/Item.vue";
|
||||||
@ -250,37 +203,10 @@ export default {
|
|||||||
editProp: ['wares.price'],
|
editProp: ['wares.price'],
|
||||||
dialogLoading: null,
|
dialogLoading: null,
|
||||||
selectRow:[],
|
selectRow:[],
|
||||||
imageUrls: [],
|
imageUrls: []
|
||||||
settingDialog: false,
|
|
||||||
settingForm: {
|
|
||||||
safeName: null,
|
|
||||||
safeContact: null,
|
|
||||||
safeMobile: null,
|
|
||||||
toSafe: null,
|
|
||||||
id: null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async doSetting(){
|
|
||||||
try {
|
|
||||||
await updateSafe(this.settingForm)
|
|
||||||
this.settingDialog = false
|
|
||||||
this.$modal.msgSuccess("设置成功")
|
|
||||||
await this.open(this.formData)
|
|
||||||
}catch{}
|
|
||||||
},
|
|
||||||
async handleSetting(){
|
|
||||||
try {
|
|
||||||
const res = await getById(this.formData.id)
|
|
||||||
this.settingForm.id = this.formData.id
|
|
||||||
this.settingForm.toSafe = res.data.toSafe
|
|
||||||
this.settingForm.safeName = res.data.safeName
|
|
||||||
this.settingForm.safeContact = res.data.safeContact
|
|
||||||
this.settingForm.safeMobile = res.data.safeMobile
|
|
||||||
this.settingDialog = true
|
|
||||||
}catch{}
|
|
||||||
},
|
|
||||||
handleSuccess(){
|
handleSuccess(){
|
||||||
this.open(this.formData)
|
this.open(this.formData)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user