配件是否可见

This commit is contained in:
xiaofajia 2024-10-18 22:02:51 +08:00
parent 45df31c413
commit e9fb87dec7
5 changed files with 44 additions and 19 deletions

View File

@ -106,3 +106,11 @@ export function updateStatus(data){
data data
}) })
} }
// 配件客户是否可见
export function updateShow(id, show){
return request({
url: preUrl + "/show?id=" + id + "&show=" + show,
method: "get"
})
}

View File

@ -62,10 +62,10 @@
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"> <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button> <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus === '02' && userRole === 'repair_staff'" command="handleGet" size="mini" type="text" icon="el-icon-document-add" <el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleGet" size="mini" type="text" icon="el-icon-document-add"
>申请领料 >申请领料
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item v-if="scope.row.ticketsWorkStatus === '02' && userRole === 'repair_staff'" command="handleBack" size="mini" type="text" icon="el-icon-document-delete" <el-dropdown-item v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleBack" size="mini" type="text" icon="el-icon-document-delete"
>申请退料 >申请退料
</el-dropdown-item> </el-dropdown-item>
<!-- 还要判断是不是员工 --> <!-- 还要判断是不是员工 -->
@ -83,7 +83,7 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="listTickets" @pagination="listTickets"
/> />
<TicketsShow ref="ticketsShow"/> <TicketsShow ref="ticketsShow" :user-role="userRole"/>
<UpdateRepair ref="updateRepair" @success="listTickets"/> <UpdateRepair ref="updateRepair" @success="listTickets"/>
<TWOperate ref="twOperate" @success="listTickets"/> <TWOperate ref="twOperate" @success="listTickets"/>
<UpdateRecord ref="updateRecord" @success="listTickets" /> <UpdateRecord ref="updateRecord" @success="listTickets" />

View File

@ -151,19 +151,19 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="客户可见" prop="isShow" v-if="userRole === 'service_advisor' && type" width="180"> <!-- <el-table-column align="center" label="客户可见" prop="isShow" v-if="userRole === 'service_advisor' && type" width="180">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-switch <!-- <el-switch-->
v-model="scope.row.isShow" <!-- v-model="scope.row.isShow"-->
active-text="是" <!-- active-text="是"-->
inactive-text="否" <!-- inactive-text="否"-->
active-value="1" <!-- active-value="1"-->
inactive-value="0" <!-- inactive-value="0"-->
@change="changeIsShow(scope.row)" <!-- @change="changeIsShow(scope.row)"-->
> <!-- >-->
</el-switch> <!-- </el-switch>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<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="数量" align="center" prop="waresCount" width="180"/> <el-table-column label="数量" align="center" prop="waresCount" width="180"/>

View File

@ -131,6 +131,15 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<i class="el-icon-plus"/> <i class="el-icon-plus"/>
<span>材料信息</span> <span>材料信息</span>
<el-switch v-if="userRole === 'service_advisor'" style="float: right; padding: 3px 0"
v-model="info.partShow"
active-text="客户可见"
inactive-text="客户不可见"
active-value="1"
inactive-value="0"
@change="changeShow"
>
</el-switch>
</div> </div>
<!-- 卡片内容 --> <!-- 卡片内容 -->
<div> <div>
@ -157,10 +166,13 @@
<script> <script>
import TicketItemShow from "@/views/repair/tickets/Components/TicketItemShow.vue"; import TicketItemShow from "@/views/repair/tickets/Components/TicketItemShow.vue";
import {getTicketsById} from "@/api/repair/tickets/Tickets"; import {getTicketsById, updateShow} from "@/api/repair/tickets/Tickets";
export default { export default {
name: "TicketsShow", name: "TicketsShow",
props:{
userRole: String
},
components: {TicketItemShow}, components: {TicketItemShow},
data() { data() {
return { return {
@ -180,6 +192,11 @@ export default {
this.others = data.filter(item => item.other) this.others = data.filter(item => item.other)
this.info = row this.info = row
this.dialogVisible = true this.dialogVisible = true
},
async changeShow(){
try {
await updateShow(this.info.id, this.info.partShow)
}catch {}
} }
} }
} }

View File

@ -21,7 +21,8 @@
<el-row :gutter="1"> <el-row :gutter="1">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="附件" prop="image"> <el-form-item label="附件" prop="image">
<FileUpload v-model="formData.image" /> <!-- <FileUpload v-model="formData.image" />-->
<ImageUpload v-model="formData.image" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -94,7 +95,6 @@ export default {
this.formLoading = true this.formLoading = true
const res = await getProjectList(ticketId) const res = await getProjectList(ticketId)
this.projectList = res.data this.projectList = res.data
console.log(this.formData.recordType)
if (this.formData.recordType === 'kssg') { if (this.formData.recordType === 'kssg') {
this.formData.ticketsWorkStatus = "02" this.formData.ticketsWorkStatus = "02"
this.formData.item.itemStatus = "02" this.formData.item.itemStatus = "02"