对接上交车接口

This commit is contained in:
xiaofajia 2024-11-16 15:54:41 +08:00
parent cfa1e585bc
commit c2fbaeb2fa
2 changed files with 67 additions and 2 deletions

View File

@ -183,3 +183,12 @@ export function hasPrice(id){
method: 'get' method: 'get'
}) })
} }
// 服务顾问交车
export function overOrder(data){
return request({
url: preUrl + '/overOrder',
method: "post",
data
})
}

View File

@ -69,6 +69,10 @@
<el-dropdown-item command="noticeCus" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'"> <el-dropdown-item command="noticeCus" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
通知客户取车 通知客户取车
</el-dropdown-item> </el-dropdown-item>
<!-- 服务顾问才有 -->
<el-dropdown-item command="carToCus" type="text" icon="el-icon-circle-check" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
交车
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
@ -140,6 +144,31 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="交车" :visible.sync="carToCusDialog" width="60%" v-dialogDrag append-to-body>
<el-form v-model="carToCusForm" :inline="true" label-width="15rem">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="描述" prop="remark">
<el-input style="width: 30rem" type="textarea" v-model="carToCusForm.remark"
:autosize="{ minRows: 4, maxRows: 8}"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="附件" prop="image">
<!-- <FileUpload v-model="formData.image" />-->
<ImageUpload v-model="carToCusForm.image"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCarToCus">确定</el-button>
<el-button @click="carToCusDialog = false">取消</el-button>
</div>
</el-dialog>
<UpdateRepair ref="updateRepair" @success="getList" :user-role="userRole"/> <UpdateRepair ref="updateRepair" @success="getList" :user-role="userRole"/>
<EditTickets ref="editTickets" @success="getList"/> <EditTickets ref="editTickets" @success="getList"/>
<RecordSetting ref="recordSet" /> <RecordSetting ref="recordSet" />
@ -147,7 +176,7 @@
</template> </template>
<script> <script>
import {getPageByRole, inspection, confirm, noticeCus, hasPrice} from "@/api/repair/tickets/Tickets"; import {getPageByRole, inspection, confirm, noticeCus, hasPrice, overOrder} from "@/api/repair/tickets/Tickets";
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue"; import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue"; import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
import {getUserProfile} from "@/api/system/user"; import {getUserProfile} from "@/api/system/user";
@ -191,7 +220,13 @@ export default {
}, },
noticeLoading: false, noticeLoading: false,
noticeDialog: false, noticeDialog: false,
isNoticeChoose: false isNoticeChoose: false,
carToCusDialog: false,
carToCusForm:{
id: null,
remark: null,
image: null
}
} }
}, },
mounted() { mounted() {
@ -337,6 +372,27 @@ export default {
case 'noticeCus': case 'noticeCus':
this.noticeCus(row) this.noticeCus(row)
break break
case 'carToCus':
this.carToCus(row)
break
}
},
carToCus(row){
this.carToCusForm = {
id: null,
remark: null,
image: null
}
this.carToCusForm.id = row.id
this.carToCusDialog = true
},
async doCarToCus(){
try {
await overOrder(this.carToCusForm)
this.carToCusDialog = false
this.$modal.msgSuccess("交车成功")
await this.getList()
}catch{
} }
} }
} }