This commit is contained in:
xuyuncong 2025-11-14 17:58:40 +08:00
parent e590e6cc7f
commit bca86a4119
3 changed files with 483 additions and 457 deletions

View File

@ -92,6 +92,7 @@
<!--内返派工--> <!--内返派工-->
内返派工 内返派工
</view> </view>
<!-- v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='01' && roleCanJd" class="btn qc"> -->
<view @click="openFile(order.id)" <view @click="openFile(order.id)"
v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='01' && roleCanJd" class="btn qc"> v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='01' && roleCanJd" class="btn qc">
接单 接单
@ -186,7 +187,8 @@
// //
this.roleCanQc = true this.roleCanQc = true
} }
if (this.userInfo.roleCodes.includes("repair_staff") && this.order.nowRepairId == this.userInfo.id) { if (this.userInfo.roleCodes.includes("repair_staff") && this.order.nowRepairId && this.order.nowRepairId
.split(',').includes(this.userInfo.id.toString())) {
//, //,
this.roleCanJd = true this.roleCanJd = true
} }

View File

@ -12,6 +12,15 @@
<!-- <u-checkbox-group--> <!-- <u-checkbox-group-->
<!-- placement="column"--> <!-- placement="column"-->
<!-- v-model="checked">--> <!-- v-model="checked">-->
<!-- <checkbox-group @change="checkboxChange" v-if="type == 'xs' || !type">
<label v-for="(item, index) in list" :key="item.userId" class="userItem">
<view class="info">
<text class="name">{{ item.userName }}</text>
<text class="trade">{{ item.workTypeText }}</text>
</view>
<checkbox :value="item.userId + ''" />
</label>
</checkbox-group> -->
<radio-group @change="radioChange" v-if="type == 'xs' || !type"> <radio-group @change="radioChange" v-if="type == 'xs' || !type">
<label v-for="(item, index) in list" :key="item.userId" class="userItem"> <label v-for="(item, index) in list" :key="item.userId" class="userItem">
<view class="info"> <view class="info">
@ -19,7 +28,6 @@
<text class="trade">{{ item.workTypeText }}</text> <text class="trade">{{ item.workTypeText }}</text>
</view> </view>
<radio :value="item.userId+''" :checked="index === current" /> <radio :value="item.userId+''" :checked="index === current" />
<!-- <u-checkbox v-model="item.checked" :name="item.userId" iconSize="24" shape="circle" activeColor="#1890ff"></u-checkbox>-->
</label> </label>
</radio-group> </radio-group>
@ -50,7 +58,8 @@
<view class="popup-content"> <view class="popup-content">
<view class="dl-avatar-box"> <view class="dl-avatar-box">
<input type="text" placeholder="请输入内返派工原因" v-model="remark" /> <input type="text" placeholder="请输入内返派工原因" v-model="remark" />
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="请上传图片最多上传9张"></uni-file-picker> <uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
limit="9" title="请上传图片最多上传9张"></uni-file-picker>
</view> </view>
<button type="primary" @click="submit('1')">保存</button> <button type="primary" @click="submit('1')">保存</button>
</view> </view>
@ -65,9 +74,14 @@
<script> <script>
import VNavigationBar from '@/components/VNavigationBar.vue' import VNavigationBar from '@/components/VNavigationBar.vue'
import {bus} from "@/utils/eventBus"; import {
bus
} from "@/utils/eventBus";
import request from '@/utils/request'; import request from '@/utils/request';
import {getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils"; import {
getDictTextByCodeAndValue,
saveTicketsRecords
} from "@/utils/utils";
import config from "@/config"; import config from "@/config";
import upload from "@/utils/upload"; import upload from "@/utils/upload";
@ -93,6 +107,8 @@ export default {
sgNames: [], sgNames: [],
projectId: '', projectId: '',
itemId: "", itemId: "",
checkedUserIds: [],
checkedUserNames: [],
} }
}, },
onLoad(data) { onLoad(data) {
@ -188,17 +204,20 @@ export default {
this.fileList.splice(index, 1); this.fileList.splice(index, 1);
}, },
radioChange: function (evt) { checkboxChange: function(evt) {
this.checkedUserIds = evt.detail.value; //
this.checkedUserNames = [];
// userId userName
for (let i = 0; i < this.list.length; i++) { for (let i = 0; i < this.list.length; i++) {
if (this.list[i].userId == evt.detail.value) { if (this.checkedUserIds.includes(this.list[i].userId + '')) {
this.current = i; this.checkedUserNames.push(this.list[i].userName);
this.checkedUserId = this.list[i].userId
this.checkedUserName = this.list[i].userName
break;
} }
} }
console.log(this.checkedUserName)
console.log(this.checkedUserNames); //
}, },
/** /**
* 获取销售列表 * 获取销售列表
*/ */
@ -253,7 +272,9 @@ export default {
request({ request({
url: '/admin-api/repair/worker/listByTicketId', url: '/admin-api/repair/worker/listByTicketId',
method: 'get', method: 'get',
params: {ticketId: this.ticketId} params: {
ticketId: this.ticketId
}
}).then((res) => { }).then((res) => {
this.list = res.data this.list = res.data
if (this.list.length > 0) { if (this.list.length > 0) {
@ -347,8 +368,8 @@ export default {
} else { } else {
const param = { const param = {
id: this.ticketId, id: this.ticketId,
nowRepairId: this.checkedUserId, nowRepairId: this.checkedUserIds.join(','),
nowRepairName: this.checkedUserName nowRepairName: this.checkedUserNames.join(',')
} }
if (type == '1') { if (type == '1') {
param.remark = this.remark param.remark = this.remark
@ -394,6 +415,7 @@ export default {
height: auto; height: auto;
background-color: #fff; background-color: #fff;
} }
.container { .container {
height: 100%; height: 100%;
background-color: #F3F5F7; background-color: #F3F5F7;

View File

@ -1167,7 +1167,8 @@
code: "edit" code: "edit"
}) })
} }
if (this.ticketInfo.nowRepairId == this.loginUser.id && "05" == this.ticketInfo.ticketsStatus) { if (this.ticketInfo.nowRepairId.split(',').includes(this.loginUser.id.toString()) && "05" == this
.ticketInfo.ticketsStatus) {
// //
this.content.push({ this.content.push({
text: '总检拍照', text: '总检拍照',
@ -1187,7 +1188,8 @@
code: "apply" code: "apply"
}) })
console.log(this.ticketInfo, "this.ticketInfo") console.log(this.ticketInfo, "this.ticketInfo")
if ("05" == this.ticketInfo.ticketsStatus && this.ticketInfo.nowRepairId == this.loginUser.id) { if ("05" == this.ticketInfo.ticketsStatus && this.ticketInfo.nowRepairId.split(',').includes(this
.loginUser.id.toString())) {
// //
if ("02" == this.ticketInfo.ticketsWorkStatus) { if ("02" == this.ticketInfo.ticketsWorkStatus) {
// //