Compare commits
	
		
			4 Commits
		
	
	
		
			530c652fd4
			...
			916bb23ff2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 916bb23ff2 | ||
|   | 8cc46e3a28 | ||
|   | b1e6a559b9 | ||
|   | e26e530757 | 
| @ -38,17 +38,17 @@ export function getRepairSoById(id){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 员工确认领料
 | // 员工确认领料
 | ||||||
| export function confirmGet(id){ | export function confirmGet(id, image){ | ||||||
|   return request({ |   return request({ | ||||||
|     url: preUrl + "/confirmGet?id=" + id, |     url: preUrl + "/confirmGet?id=" + id + "&image=" + image, | ||||||
|     method: 'get' |     method: 'get' | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 员工确认退料
 | // 员工确认退料
 | ||||||
| export function confirmBack(id){ | export function confirmBack(id, image){ | ||||||
|   return request({ |   return request({ | ||||||
|     url: preUrl + "/confirmBack?id=" + id, |     url: preUrl + "/confirmBack?id=" + id + "&image=" + image, | ||||||
|     method: 'get' |     method: 'get' | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
|  | |||||||
| @ -82,9 +82,9 @@ export function getUserRole(){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 接单
 | // 接单
 | ||||||
| export function updateTake(id){ | export function updateTake(id, image){ | ||||||
|   return request({ |   return request({ | ||||||
|     url: preUrl + "/take?id=" + id, |     url: preUrl + "/take?id=" + id + "&image=" + image, | ||||||
|     method: "get", |     method: "get", | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
|  | |||||||
| @ -44,13 +44,20 @@ | |||||||
|           <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-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)"> |           <el-button v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting" | ||||||
|  |                      @click="handleEditTicket(scope.row)"> | ||||||
|             编辑工单 |             编辑工单 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button v-hasPermi="['repair:tkm:remove']" size="mini" type="text" icon="el-icon-remove" @click="handleRemove(scope.row)"> |           <el-button v-hasPermi="['repair:tkm:remove']" size="mini" type="text" icon="el-icon-remove" | ||||||
|  |                      @click="handleRemove(scope.row)"> | ||||||
|             删除 |             删除 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button v-if="userRole === 'service_advisor' && isFinish" size="mini" type="text" icon="el-icon-refresh" @click="handleEditRecord(scope.row)"> |           <el-button v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete" | ||||||
|  |                      @click="handleVoid(scope.row)"> | ||||||
|  |             作废 | ||||||
|  |           </el-button> | ||||||
|  |           <el-button v-if="userRole === 'service_advisor' && isFinish" size="mini" type="text" icon="el-icon-refresh" | ||||||
|  |                      @click="handleEditRecord(scope.row)"> | ||||||
|             维修记录设置 |             维修记录设置 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button |           <el-button | ||||||
| @ -58,7 +65,8 @@ | |||||||
|             size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)"> |             size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)"> | ||||||
|             接单 |             接单 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" type="text" icon="el-icon-check" @click="handleNotify(scope.row)"> |           <el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini" | ||||||
|  |                      type="text" icon="el-icon-check" @click="handleNotify(scope.row)"> | ||||||
|             通知施工 |             通知施工 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button size="mini" |           <el-button size="mini" | ||||||
| @ -76,14 +84,16 @@ | |||||||
|                      type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')"> |                      type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')"> | ||||||
|             施工完成 |             施工完成 | ||||||
|           </el-button> |           </el-button> | ||||||
| <!--          <el-button @click="handleRecord(scope.row, 'zj')" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'general_inspection' && scope.row.ticketsWorkStatus === '05'">--> |           <!--          <el-button @click="handleRecord(scope.row, 'zj')" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'general_inspection' && scope.row.ticketsWorkStatus === '05'">--> | ||||||
| <!--            终检--> |           <!--            终检--> | ||||||
| <!--          </el-button>--> |           <!--          </el-button>--> | ||||||
|           <el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh" |           <el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh" | ||||||
|                      v-if="(userRole === 'repair_staff' ? (leader ? !isFinish : false) : false) && !(scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish)"> |                      v-if="(userRole === 'repair_staff' ? (leader ? !isFinish : false) : false) && !(scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish)"> | ||||||
|             重新指派 |             重新指派 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button v-if="userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus === '01' && !(nowUser.id === scope.row.nowRepairId)" @click="handleGet(scope.row)" size="mini" type="text" icon="el-icon-document-add"> |           <el-button | ||||||
|  |             v-if="userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus === '01' && !(nowUser.id === scope.row.nowRepairId)" | ||||||
|  |             @click="handleGet(scope.row)" size="mini" type="text" icon="el-icon-document-add"> | ||||||
|             申请配件 |             申请配件 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-dropdown |           <el-dropdown | ||||||
| @ -91,12 +101,13 @@ | |||||||
|             @command="(command) => handleCommand(command, scope.$index, scope.row)"> |             @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 !== '01' && 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 !== '01' && 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>--> | ||||||
|               <!-- 还要判断是不是员工 --> |               <!-- 还要判断是不是员工 --> | ||||||
|               <el-dropdown-item |               <el-dropdown-item | ||||||
|                 v-if="userRole !== 'repair_staff'  && !isFinish && scope.row.ticketsWorkStatus !== '01'" |                 v-if="userRole !== 'repair_staff'  && !isFinish && scope.row.ticketsWorkStatus !== '01'" | ||||||
| @ -120,7 +131,7 @@ | |||||||
|     <TicketsShow ref="ticketsShow" :user-role="userRole"/> |     <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"/> | ||||||
| 
 | 
 | ||||||
|     <el-dialog title="退料申请" :visible.sync="backVisible" width="60%" v-dialogDrag append-to-body> |     <el-dialog title="退料申请" :visible.sync="backVisible" width="60%" v-dialogDrag append-to-body> | ||||||
|       <el-table v-loading="backLoading" :data="partList" :stripe="true" :show-overflow-tooltip="true" |       <el-table v-loading="backLoading" :data="partList" :stripe="true" :show-overflow-tooltip="true" | ||||||
| @ -129,7 +140,7 @@ | |||||||
|                 @cell-click="handleCellClick" |                 @cell-click="handleCellClick" | ||||||
|                 @selection-change="rowSelect" |                 @selection-change="rowSelect" | ||||||
|       > |       > | ||||||
|         <el-table-column type="selection" align="center" /> |         <el-table-column type="selection" align="center"/> | ||||||
|         <el-table-column label="商品名称" prop="itemName" align="center"/> |         <el-table-column label="商品名称" prop="itemName" align="center"/> | ||||||
|         <el-table-column label="规格" prop="ware.model" align="center"/> |         <el-table-column label="规格" prop="ware.model" align="center"/> | ||||||
|         <el-table-column label="数量" prop="itemCount" align="center"> |         <el-table-column label="数量" prop="itemCount" align="center"> | ||||||
| @ -147,7 +158,7 @@ | |||||||
|       </el-table> |       </el-table> | ||||||
|       <el-row :gutter="1" style="margin-top: 1rem"> |       <el-row :gutter="1" style="margin-top: 1rem"> | ||||||
|         <el-col :span="24"> |         <el-col :span="24"> | ||||||
|           <el-input v-model="remark" placeholder="备注" /> |           <el-input v-model="remark" placeholder="备注"/> | ||||||
|         </el-col> |         </el-col> | ||||||
|       </el-row> |       </el-row> | ||||||
|       <div slot="footer" class="dialog-footer"> |       <div slot="footer" class="dialog-footer"> | ||||||
| @ -156,13 +167,33 @@ | |||||||
|       </div> |       </div> | ||||||
|     </el-dialog> |     </el-dialog> | ||||||
| 
 | 
 | ||||||
|     <RecordSetting ref="recordSet" /> |     <RecordSetting ref="recordSet"/> | ||||||
|     <EditTickets ref="editTickets" @success="listTickets"/> |     <EditTickets ref="editTickets" @success="listTickets"/> | ||||||
|  | 
 | ||||||
|  |     <el-dialog title="诊断维修单和车辆维修前照片" :visible.sync="beginDialog" width="60%" v-dialogDrag append-to-body> | ||||||
|  |       <el-form v-model="beginData" :inline="true" label-width="15rem"> | ||||||
|  |         <el-row :gutter="1"> | ||||||
|  |           <el-col :span="24"> | ||||||
|  |             <el-form-item label="附件" prop="image"> | ||||||
|  |               <ImageUpload v-model="beginData.image"/> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |       <div slot="footer" class="dialog-footer"> | ||||||
|  |         <el-button type="primary" @click="doTake"> | ||||||
|  |           确定 | ||||||
|  |         </el-button> | ||||||
|  |         <el-button @click="beginDialog = false"> | ||||||
|  |           取消 | ||||||
|  |         </el-button> | ||||||
|  |       </div> | ||||||
|  |     </el-dialog> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import {getPageType, updateTake, getTicketsById, removeTicketById} from "@/api/repair/tickets/Tickets"; | import {getPageType, updateTake, getTicketsById, removeTicketById, setTicketsVoid} 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 TWOperate from "@/views/repair/tickets/form/TWOperate.vue"; | import TWOperate from "@/views/repair/tickets/form/TWOperate.vue"; | ||||||
| @ -186,7 +217,7 @@ export default { | |||||||
|       default: '', |       default: '', | ||||||
|       required: true |       required: true | ||||||
|     }, |     }, | ||||||
|     isType:{ |     isType: { | ||||||
|       type: String, |       type: String, | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
| @ -215,6 +246,11 @@ export default { | |||||||
|       remark: null, |       remark: null, | ||||||
|       leader: false, |       leader: false, | ||||||
|       nowUser: null, |       nowUser: null, | ||||||
|  |       beginDialog: false, | ||||||
|  |       beginData: { | ||||||
|  |         id: null, | ||||||
|  |         image: null, | ||||||
|  |       }, | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
| @ -223,13 +259,13 @@ export default { | |||||||
|     this.getNowUser() |     this.getNowUser() | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     async getNowUser(){ |     async getNowUser() { | ||||||
|       const res = await getUserProfile() |       const res = await getUserProfile() | ||||||
|       this.nowUser = res.data |       this.nowUser = res.data | ||||||
|     }, |     }, | ||||||
|     async isLeader(){ |     async isLeader() { | ||||||
|         const res = await getIfLeader() |       const res = await getIfLeader() | ||||||
|         this.leader = res.data |       this.leader = res.data | ||||||
|     }, |     }, | ||||||
|     async listTickets() { |     async listTickets() { | ||||||
|       try { |       try { | ||||||
| @ -267,18 +303,36 @@ export default { | |||||||
|     }, |     }, | ||||||
|     // 接单 |     // 接单 | ||||||
|     async handleTake(row) { |     async handleTake(row) { | ||||||
|  |       this.beginData.id = row.id | ||||||
|  |       this.beginDialog = true | ||||||
|  |     }, | ||||||
|  |     async doTake(){ | ||||||
|       try { |       try { | ||||||
|  |         if (!this.beginData.image){ | ||||||
|  |           this.$modal.msgError("附件不能为空") | ||||||
|  |           return | ||||||
|  |         } | ||||||
|         this.loading = true |         this.loading = true | ||||||
|         await this.$modal.confirm("确认接单吗?") |         if (this.beginData.image){ | ||||||
|         await updateTake(row.id) |           const data = this.beginData.image.split(",") | ||||||
|  |           this.beginData.image = data.map(item => { | ||||||
|  |             return item.replace(process.env.VUE_APP_FILE_API, "") | ||||||
|  |           }).join(",") | ||||||
|  |         } | ||||||
|  |         await updateTake(this.beginData.id, this.beginData.image) | ||||||
|  |         this.beginDialog = false | ||||||
|         this.$modal.msgSuccess("接单成功") |         this.$modal.msgSuccess("接单成功") | ||||||
|  |         this.beginData = { | ||||||
|  |           id: null, | ||||||
|  |           image: null | ||||||
|  |         } | ||||||
|         await this.listTickets() |         await this.listTickets() | ||||||
|       }finally { |       } finally { | ||||||
|         this.loading = false |         this.loading = false | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     // 退料 |     // 退料 | ||||||
|     async handleBack(row){ |     async handleBack(row) { | ||||||
|       this.formData = {} |       this.formData = {} | ||||||
|       this.formData = row |       this.formData = row | ||||||
|       this.remark = null |       this.remark = null | ||||||
| @ -287,12 +341,12 @@ export default { | |||||||
|         this.backLoading = true |         this.backLoading = true | ||||||
|         const res = await getTicketsById(row.id) |         const res = await getTicketsById(row.id) | ||||||
|         this.partList = res.data.wares |         this.partList = res.data.wares | ||||||
|       }finally { |       } finally { | ||||||
|         this.backLoading = false |         this.backLoading = false | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     // 重新指派 |     // 重新指派 | ||||||
|     handleReTake(row){ |     handleReTake(row) { | ||||||
|       row = { |       row = { | ||||||
|         ...row, |         ...row, | ||||||
|         // 还要判断是不是班组长 |         // 还要判断是不是班组长 | ||||||
| @ -301,12 +355,12 @@ export default { | |||||||
|       this.$refs.updateRepair.open(row) |       this.$refs.updateRepair.open(row) | ||||||
|     }, |     }, | ||||||
|     // 指派员工,通知施工 |     // 指派员工,通知施工 | ||||||
|     handleNotify(row){ |     handleNotify(row) { | ||||||
|       this.$refs.updateRepair.open(row) |       this.$refs.updateRepair.open(row) | ||||||
|     }, |     }, | ||||||
|     // 更多操作 |     // 更多操作 | ||||||
|     handleCommand(command, index, row){ |     handleCommand(command, index, row) { | ||||||
|       switch (command){ |       switch (command) { | ||||||
|         case 'handleReTake': |         case 'handleReTake': | ||||||
|           this.handleReTake(row) |           this.handleReTake(row) | ||||||
|           break |           break | ||||||
| @ -375,10 +429,10 @@ export default { | |||||||
|       }) |       }) | ||||||
|       this.clickCellMap[id] = [] |       this.clickCellMap[id] = [] | ||||||
|     }, |     }, | ||||||
|     rowSelect(val){ |     rowSelect(val) { | ||||||
|       this.selections = val |       this.selections = val | ||||||
|     }, |     }, | ||||||
|     async doBack(flag){ |     async doBack(flag) { | ||||||
|       const data = { |       const data = { | ||||||
|         no: createUniqueCodeByHead("TLSQ"), |         no: createUniqueCodeByHead("TLSQ"), | ||||||
|         ticketId: this.formData.id, |         ticketId: this.formData.id, | ||||||
| @ -388,9 +442,9 @@ export default { | |||||||
|         adviserId: this.formData.adviserId, |         adviserId: this.formData.adviserId, | ||||||
|         adviserName: this.formData.adviserName |         adviserName: this.formData.adviserName | ||||||
|       } |       } | ||||||
|       if (flag){ |       if (flag) { | ||||||
|         data.items = this.partList |         data.items = this.partList | ||||||
|       }else { |       } else { | ||||||
|         data.items = this.selections |         data.items = this.selections | ||||||
|       } |       } | ||||||
|       await updateTicketWares(data) |       await updateTicketWares(data) | ||||||
| @ -398,7 +452,7 @@ export default { | |||||||
|       this.$modal.msgSuccess("申请成功"); |       this.$modal.msgSuccess("申请成功"); | ||||||
|       await this.listTickets() |       await this.listTickets() | ||||||
|     }, |     }, | ||||||
|     handleRecord(row, type){ |     handleRecord(row, type) { | ||||||
|       row = { |       row = { | ||||||
|         ...row, |         ...row, | ||||||
|         clickType: type |         clickType: type | ||||||
| @ -406,23 +460,46 @@ export default { | |||||||
|       this.$refs.updateRecord.open(row) |       this.$refs.updateRecord.open(row) | ||||||
|     }, |     }, | ||||||
|     // 设置维修图片可不可见 |     // 设置维修图片可不可见 | ||||||
|     handleEditRecord(row){ |     handleEditRecord(row) { | ||||||
|       this.$refs.recordSet.open(row.id) |       this.$refs.recordSet.open(row.id) | ||||||
|     }, |     }, | ||||||
|     handleEditTicket(row){ |     handleEditTicket(row) { | ||||||
|       this.$refs.editTickets.open(row) |       this.$refs.editTickets.open(row) | ||||||
|     }, |     }, | ||||||
|     async handleRemove(row){ |     async handleRemove(row) { | ||||||
|       try { |       try { | ||||||
|         const id = row.id |         const id = row.id | ||||||
|         if (id){ |         if (id) { | ||||||
|           await this.$modal.confirm("确认删除工单" + row.ticketNo + "吗?") |           await this.$modal.confirm("确认删除工单" + row.ticketNo + "吗?") | ||||||
|           await removeTicketById(id) |           await removeTicketById(id) | ||||||
|           await this.listTickets() |           await this.listTickets() | ||||||
|           this.$modal.msgSuccess("删除成功") |           this.$modal.msgSuccess("删除成功") | ||||||
|         } |         } | ||||||
|       }catch{} |       } catch { | ||||||
|     } |       } | ||||||
|  |     }, | ||||||
|  |     async handleVoid(row) { | ||||||
|  |       this.$prompt('作废备注', '提示', { | ||||||
|  |         confirmButtonText: '确定', | ||||||
|  |         cancelButtonText: '取消', | ||||||
|  |       }).then(({value}) => { | ||||||
|  |         const data = { | ||||||
|  |           id: row.id, | ||||||
|  |           remark: value, | ||||||
|  |           ticketsStatus: "03" | ||||||
|  |         } | ||||||
|  |         this.doVoid(data) | ||||||
|  |       }).catch(() => { | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     async doVoid(data) { | ||||||
|  |       try { | ||||||
|  |         await setTicketsVoid(data) | ||||||
|  |         this.$modal.msgSuccess("作废成功") | ||||||
|  |         await this.listTickets() | ||||||
|  |       } catch { | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|   } |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|  | |||||||
| @ -112,7 +112,7 @@ | |||||||
|           <!--          >返结--> |           <!--          >返结--> | ||||||
|           <!--          </el-button>--> |           <!--          </el-button>--> | ||||||
|           <el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete" |           <el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete" | ||||||
|                      @click="handleVoid(scope.row)" |                      @click="handleVoid(scope.row)" v-hasPermi="['repair:tk:void']" | ||||||
|           >作废 |           >作废 | ||||||
|           </el-button> |           </el-button> | ||||||
|           <el-button size="mini" type="text" icon="el-icon-printer" |           <el-button size="mini" type="text" icon="el-icon-printer" | ||||||
|  | |||||||
| @ -139,6 +139,12 @@ | |||||||
|               </template> |               </template> | ||||||
|               <StaffChoose v-model="selectStaff" :is-get="'true'"/> |               <StaffChoose v-model="selectStaff" :is-get="'true'"/> | ||||||
|             </el-descriptions-item> |             </el-descriptions-item> | ||||||
|  |             <el-descriptions-item> | ||||||
|  |               <template slot="label"> | ||||||
|  |                 接车图片 | ||||||
|  |               </template> | ||||||
|  |               <ImageUpload v-model="formData.image" /> | ||||||
|  |             </el-descriptions-item> | ||||||
|           </el-descriptions> |           </el-descriptions> | ||||||
|         </el-card> |         </el-card> | ||||||
|       </el-col> |       </el-col> | ||||||
| @ -397,6 +403,7 @@ export default { | |||||||
|         rescueMoney: 0, |         rescueMoney: 0, | ||||||
|         threePackMoney: 0, |         threePackMoney: 0, | ||||||
|         confirmFaultMoney: 0, |         confirmFaultMoney: 0, | ||||||
|  |         image: null | ||||||
|       }, |       }, | ||||||
|       selectUser: {}, |       selectUser: {}, | ||||||
|       selectCar: {}, |       selectCar: {}, | ||||||
| @ -485,6 +492,15 @@ export default { | |||||||
|         if (count > 0){ |         if (count > 0){ | ||||||
|           return |           return | ||||||
|         } |         } | ||||||
|  |         if (!this.formData.image){ | ||||||
|  |           this.$modal.msgError("接车图片不能为空") | ||||||
|  |           return | ||||||
|  |         }else{ | ||||||
|  |           const data = this.formData.image.split(",") | ||||||
|  |           this.formData.image = data.map(item => { | ||||||
|  |             return item.replace(process.env.VUE_APP_FILE_API, "") | ||||||
|  |           }).join(",") | ||||||
|  |         } | ||||||
|         await createTickets(this.formData) |         await createTickets(this.formData) | ||||||
|         this.$modal.msgSuccess("新增成功") |         this.$modal.msgSuccess("新增成功") | ||||||
|         this.init() |         this.init() | ||||||
| @ -539,6 +555,7 @@ export default { | |||||||
|         rescueMoney: 0, |         rescueMoney: 0, | ||||||
|         threePackMoney: 0, |         threePackMoney: 0, | ||||||
|         confirmFaultMoney: 0, |         confirmFaultMoney: 0, | ||||||
|  |         image: null | ||||||
|       } |       } | ||||||
|       this.selectUser = {} |       this.selectUser = {} | ||||||
|       this.selectCar = {} |       this.selectCar = {} | ||||||
|  | |||||||
| @ -49,6 +49,15 @@ | |||||||
|         <el-table-column label="规格" align="center" prop="repairWares.model" /> |         <el-table-column label="规格" align="center" prop="repairWares.model" /> | ||||||
|         <el-table-column label="数量" align="center" prop="goodsCount" /> |         <el-table-column label="数量" align="center" prop="goodsCount" /> | ||||||
|       </el-table> |       </el-table> | ||||||
|  |       <el-form style="margin-top: 1rem" :inline="true"> | ||||||
|  |         <el-row :gutter="1"> | ||||||
|  |           <el-col :span="24"> | ||||||
|  |             <el-form-item label="图片" prop="image"> | ||||||
|  |               <ImageUpload v-model="image" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|       <div slot="footer" class="dialog-footer"> |       <div slot="footer" class="dialog-footer"> | ||||||
|         <el-button type="primary" size="small" @click="handleConfirm"> |         <el-button type="primary" size="small" @click="handleConfirm"> | ||||||
|           确认 |           确认 | ||||||
| @ -88,7 +97,8 @@ export default { | |||||||
|       dialogVisible: false, |       dialogVisible: false, | ||||||
|       items: [], |       items: [], | ||||||
|       dialogLoading: false, |       dialogLoading: false, | ||||||
|       formData:{} |       formData:{}, | ||||||
|  |       image: null | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
| @ -131,15 +141,21 @@ export default { | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     async handleConfirm(){ |     async handleConfirm(){ | ||||||
|  |       if (this.image){ | ||||||
|  |         const data = this.image.split(",") | ||||||
|  |         this.image = data.map(item => { | ||||||
|  |           return item.replace(process.env.VUE_APP_FILE_API, "") | ||||||
|  |         }).join(",") | ||||||
|  |       } | ||||||
|       if (this.type){ |       if (this.type){ | ||||||
|         try { |         try { | ||||||
|           await confirmGet(this.formData.id) |           await confirmGet(this.formData.id, this.image) | ||||||
|           this.dialogVisible = false |           this.dialogVisible = false | ||||||
|           this.$modal.msgSuccess("操作成功") |           this.$modal.msgSuccess("操作成功") | ||||||
|           await this.getList() |           await this.getList() | ||||||
|         }catch{} |         }catch{} | ||||||
|       }else { |       }else { | ||||||
|         await confirmBack(this.formData.id) |         await confirmBack(this.formData.id, this.image) | ||||||
|         this.dialogVisible = false |         this.dialogVisible = false | ||||||
|         this.$modal.msgSuccess("操作成功") |         this.$modal.msgSuccess("操作成功") | ||||||
|         await this.getList() |         await this.getList() | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user