|
@@ -19,11 +19,11 @@
|
|
|
</view>
|
|
|
<view class="info-row uni-row">
|
|
|
<view class="label">产品描述</view>
|
|
|
- <view class="value">{{processInspecion.lot. productDescription }}</view>
|
|
|
+ <view class="value">{{processInspecion.lot.productDescription }}</view>
|
|
|
</view>
|
|
|
<view class="info-row uni-row">
|
|
|
<view class="label">外协工序</view>
|
|
|
- <view class="value">{{ processInspecion.lot.processAlias }}</view>
|
|
|
+ <view class="value">{{ processInspecion.processNames }}</view>
|
|
|
</view>
|
|
|
<view class="info-row uni-row">
|
|
|
<view class="label">投产数量</view>
|
|
@@ -32,14 +32,15 @@
|
|
|
<view class="info-row uni-row">
|
|
|
<view class="label">检查载具</view>
|
|
|
<view class="value">{{ processInspecion.inspectionCarrierCode }}
|
|
|
- {{ processInspecion.isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}</view>
|
|
|
+ {{ processInspecion.isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 废品信息 -->
|
|
|
<view class="title unfit-title uni-row">
|
|
|
<text>废品信息</text>
|
|
|
- <view class="add-btn" @click="handleAddWaste">添加</view>
|
|
|
+ <view v-if="editable()" class="add-btn" @click="handleAddWaste">添加</view>
|
|
|
</view>
|
|
|
<view class="unfit-container">
|
|
|
<view class="unfit-item-container uni-column" v-for="(item, index) in unfitInfos" :key="index">
|
|
@@ -51,8 +52,9 @@
|
|
|
<!-- <view class="standard">检查标准:{{ item.standard }}</view> -->
|
|
|
<view class="resu uni-row">
|
|
|
<view class="label">检查标准</view>
|
|
|
- <input v-model="item.checkStandard" placeholder="请输入检查标准" maxlength="50" />
|
|
|
- <uni-icons type="trash" size="24" style="margin-left: 55rpx;" color="#fc6565"
|
|
|
+ <input v-if="editable()" v-model="item.checkStandard" placeholder="请输入检查标准" maxlength="50" />
|
|
|
+ <view v-else class="value">{{ item.checkStandard }}</view>
|
|
|
+ <uni-icons v-if="editable()" type="trash" size="24" style="margin-left: 55rpx;" color="#fc6565"
|
|
|
@click="handleDelWaste(index)" />
|
|
|
</view>
|
|
|
|
|
@@ -66,22 +68,27 @@
|
|
|
</view> -->
|
|
|
<view class="resu uni-row">
|
|
|
<view class="label">检查结果</view>
|
|
|
- <input v-model="item.checkResult" placeholder="请输入检查结果" maxlength="50" />
|
|
|
+ <input v-if="editable()" v-model="item.checkResult" placeholder="请输入检查结果" maxlength="50" />
|
|
|
+ <view v-else class="value">{{ item.checkResult }}</view>
|
|
|
</view>
|
|
|
<view class="resu uni-row">
|
|
|
<view class="label">超差范围</view>
|
|
|
- <input v-model="item.exceedLimits" placeholder="请输入超差范围" maxlength="50" />
|
|
|
+ <input v-if="editable()" v-model="item.exceedLimits" placeholder="请输入超差范围" maxlength="50" />
|
|
|
+ <view v-else class="value">{{ item.exceedLimits }}</view>
|
|
|
</view>
|
|
|
<view class="resu uni-row">
|
|
|
- <view class="label">检查量</view>
|
|
|
- <input class="number" type="number" @blur="rejectNumberChange" v-model="item.examiningNum"
|
|
|
- placeholder="" />
|
|
|
- <view class="label">不良品量</view>
|
|
|
- <input class="number" type="number" @blur="rejectNumberChange" v-model="item.disqualificationNum"
|
|
|
- placeholder="" />
|
|
|
- <view class="label">废品量</view>
|
|
|
- <input class="number" type="number" @blur="rejectNumberChange" v-model="item.rejectNum"
|
|
|
- placeholder="" />
|
|
|
+ <view :class="!editable() ? 'label' : ''">检查量</view>
|
|
|
+ <input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
|
|
|
+ v-model="item.examiningNum" placeholder="" />
|
|
|
+ <view v-else class="number value">{{ item.examiningNum }}</view>
|
|
|
+ <view :class="!editable() ? 'label' : ''">不良品量</view>
|
|
|
+ <input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
|
|
|
+ v-model="item.disqualificationNum" placeholder="" />
|
|
|
+ <view v-else class="value">{{ item.disqualificationNum }}</view>
|
|
|
+ <view :class="!editable() ? 'label' : ''">废品量</view>
|
|
|
+ <input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
|
|
|
+ v-model="item.rejectNum" placeholder="" />
|
|
|
+ <view v-else class="value">{{ item.rejectNum }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -117,8 +124,9 @@
|
|
|
</view> -->
|
|
|
<view class="result uni-row">
|
|
|
<view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">序检状态</view>
|
|
|
- <uni-data-checkbox style="margin-top: 20rpx;" v-model="processInspecion.status" :localdata="range"
|
|
|
- @change="change"></uni-data-checkbox>
|
|
|
+ <uni-data-checkbox v-if="editable()" style="margin-top: 20rpx;" v-model="processInspecion.status"
|
|
|
+ :localdata="range" @change="change"></uni-data-checkbox>
|
|
|
+ <view v-else class="value">{{ processInspecion.status }}</view>
|
|
|
</view>
|
|
|
<view class="result uni-row">
|
|
|
<view class="label">废品总数</view>
|
|
@@ -126,17 +134,17 @@
|
|
|
</view>
|
|
|
<view class="remark uni-row">
|
|
|
<view class="label">备注</view>
|
|
|
- <textarea v-model="processInspecion.remark" />
|
|
|
+ <textarea v-if="editable()" v-model="processInspecion.remark" />
|
|
|
+ <view v-else class="value">{{ processInspecion.remark }}</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="btns-container uni-row">
|
|
|
- <view class="finished-btn" @click="endWork">结束报工</view>
|
|
|
- <view class="question-btn uni-column" @click.stop="handleAddConsultation">
|
|
|
+ <view v-if="editable()" class="finished-btn" @click="endWork">结束报工</view>
|
|
|
+ <view v-if="editable()" class="question-btn uni-column" @click.stop="handleAddConsultation">
|
|
|
<uni-icons type="headphones" size="24" />
|
|
|
<text>咨询</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -173,6 +181,19 @@
|
|
|
examiningNum: 0,
|
|
|
status: 0,
|
|
|
})
|
|
|
+ const initStatus = ref(0)
|
|
|
+ const editable = () => {
|
|
|
+ if (store.userInfo.permissions.some(item => item === 'business:outsourcedInspection:edit')) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (initStatus.value == 0) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (processInspecion.value.firstUpdaterId == store.userInfo.userId) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
|
|
|
const consul = [{
|
|
|
value: 0,
|
|
@@ -227,6 +248,7 @@
|
|
|
console.log("res", res);
|
|
|
if (res.code == 200) {
|
|
|
processInspecion.value = res.data;
|
|
|
+ initStatus.value = res.data.status
|
|
|
unfitInfos.value = res.data.rejects;
|
|
|
consultations.value = res.data.dayworkItemConsults;
|
|
|
console.log("res", res);
|
|
@@ -545,6 +567,21 @@
|
|
|
border: 1px solid #9f9f9f;
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .label {
|
|
|
+ width: 160rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .value {
|
|
|
+ flex: 1;
|
|
|
+
|
|
|
+ textarea {
|
|
|
+ flex: 1;
|
|
|
+ border: 1px solid #888888;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 16rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.result {
|