|
|
@@ -165,20 +165,17 @@
|
|
|
>{{ idx + 1 }}. {{ item.paramValue }}
|
|
|
{{ item.unitName ? "(" + item.unitName + ")" : "" }}</text
|
|
|
>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="item-row-input" v-if="item.substanceName">
|
|
|
- <text class="input-label">设备</text>
|
|
|
- <view class="item-input"> {{ item.substanceName }}</view>
|
|
|
-
|
|
|
- </view>
|
|
|
+ <view class="item-row-input" v-if="item.substanceName">
|
|
|
+ <text class="input-label">设备</text>
|
|
|
+ <view class="item-input"> {{ item.substanceName }}</view>
|
|
|
+ </view>
|
|
|
<!-- 描述/数量 -->
|
|
|
<view class="item-row-input">
|
|
|
<text class="input-label">{{
|
|
|
pageName == "qualityTestRecords" ? "描述" : "数量"
|
|
|
}}</text>
|
|
|
-
|
|
|
|
|
|
<input
|
|
|
class="item-input"
|
|
|
@@ -194,19 +191,18 @@
|
|
|
>
|
|
|
<text class="input-label">执行人</text>
|
|
|
|
|
|
- <uni-data-select
|
|
|
- :multiple="true"
|
|
|
- mode="multiple"
|
|
|
- v-model="item.executeUsersIds"
|
|
|
- :localdata="
|
|
|
- (form.executeUsers &&
|
|
|
- form.executeUsers.map((val) => {
|
|
|
- return { value: val.userId, text: val.userName };
|
|
|
- })) ||
|
|
|
- []
|
|
|
- "
|
|
|
- @change="executeUsersChange(idx)"
|
|
|
- ></uni-data-select>
|
|
|
+ <view
|
|
|
+ class="info-value" style="padding:6px 10px;flex:1;border-radius: 28rpx;"
|
|
|
+ :class="{ disabled: title == '详情' }"
|
|
|
+ @click="title != '详情' && itemExecuteUsers(idx, item)"
|
|
|
+ >{{
|
|
|
+ (item.checkUsers &&
|
|
|
+ item.checkUsers
|
|
|
+ .map((item) => item.userName)
|
|
|
+ .toString()) ||
|
|
|
+ "请选择"
|
|
|
+ }}</view
|
|
|
+ >
|
|
|
</view>
|
|
|
<view
|
|
|
class="item-actions"
|
|
|
@@ -289,7 +285,24 @@
|
|
|
@confirm="confirmProductLine"
|
|
|
@cancel="showProductLineIdPicker = false"
|
|
|
></u-picker>
|
|
|
-
|
|
|
+ <search-select
|
|
|
+ :multiple="true"
|
|
|
+ ref="selector1"
|
|
|
+ v-model="checkUsersIds"
|
|
|
+ :data-list="
|
|
|
+ (form.executeUsers &&
|
|
|
+ form.executeUsers.map((val) => {
|
|
|
+ return {
|
|
|
+ text: val.userName,
|
|
|
+ value: val.userId,
|
|
|
+ };
|
|
|
+ })) ||
|
|
|
+ []
|
|
|
+ "
|
|
|
+ title="选择"
|
|
|
+ @confirm="executeIdListChange1"
|
|
|
+ >
|
|
|
+ </search-select>
|
|
|
<!-- <u-picker
|
|
|
:show="showCheckUsersIds"
|
|
|
keyName="label"
|
|
|
@@ -382,6 +395,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
+ executeUsersIds: [],
|
|
|
title: "",
|
|
|
loading: false,
|
|
|
butLoading: false,
|
|
|
@@ -578,14 +592,28 @@ export default {
|
|
|
this.$set(this.form.detailList[index], "checkResult", 1);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
- executeUsersChange(index) {
|
|
|
- const checkUsersIds = this.form.dataList[index].checkUsersIds;
|
|
|
+ itemExecuteUsers(index, row) {
|
|
|
+ this.currentIndex = index;
|
|
|
+ this.$refs.selector1.open();
|
|
|
+ },
|
|
|
+ executeIdListChange1() {
|
|
|
+ this.$set(
|
|
|
+ this.form.detailList[this.currentIndex],
|
|
|
+ "checkUsersIds",
|
|
|
+ this.checkUsersIds,
|
|
|
+ );
|
|
|
+ const checkUsersIds = this.checkUsersIds;
|
|
|
+ this.checkUsersIds = [];
|
|
|
const checkUsers = checkUsersIds.map((i) => {
|
|
|
const user = this.form.executeUsers.find((item) => item.userId === i);
|
|
|
return user;
|
|
|
});
|
|
|
- this.$set(this.form.dataList[index], "checkUsers", checkUsers);
|
|
|
+ console.log(checkUsers, "checkUsers");
|
|
|
+ this.$set(
|
|
|
+ this.form.detailList[this.currentIndex],
|
|
|
+ "checkUsers",
|
|
|
+ checkUsers,
|
|
|
+ );
|
|
|
},
|
|
|
|
|
|
// 获取审核人列表、巡点检人员
|
|
|
@@ -643,11 +671,19 @@ export default {
|
|
|
})
|
|
|
.filter((i) => i);
|
|
|
// 同步详情执行人
|
|
|
- this.form.detailList.forEach((detail) => {
|
|
|
- detail.checkUsersIds = this.form.executeUsersIds;
|
|
|
- detail.checkUsers = this.form.executeUsers;
|
|
|
+ this.form.detailList.forEach((detail, index) => {
|
|
|
+ this.$set(
|
|
|
+ this.form.detailList[index],
|
|
|
+ "checkUsersIds",
|
|
|
+ this.form.executeUsersIds,
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.form.detailList[index],
|
|
|
+ "checkUsers",
|
|
|
+ this.form.executeUsers,
|
|
|
+ );
|
|
|
});
|
|
|
- console.log("this.form.executeUsers", this.form.executeUsers);
|
|
|
+ console.log("this.form.executeUsers", this.form.detailList);
|
|
|
},
|
|
|
async getAllTeamList() {
|
|
|
const { list } = await getTeamPage({
|
|
|
@@ -949,7 +985,6 @@ export default {
|
|
|
gap: 8rpx;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
.item-row-input {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -1081,8 +1116,7 @@ button:after {
|
|
|
flex: 1;
|
|
|
}
|
|
|
}
|
|
|
-/deep/.uni-select{
|
|
|
- border-radius: 36rpx;
|
|
|
-
|
|
|
+/deep/.uni-select {
|
|
|
+ border-radius: 36rpx;
|
|
|
}
|
|
|
</style>
|