|
@@ -1,9 +1,163 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <view class="">123</view>
|
|
|
|
|
|
|
+ <view class="">
|
|
|
|
|
+ <view class="basic_info">
|
|
|
|
|
+ <view class="info_header">
|
|
|
|
|
+ <view class="info_title">基本信息</view>
|
|
|
|
|
+ <u-gap height="4" bgColor="#1890FF"></u-gap>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info_content">
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">计划单号:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value">{{infoData.code}}121212</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">来源计划配置单:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value">{{infoData.planConfigCode}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">完成时长:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value" v-if="infoData.duration">{{infoData.duration}}分钟</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">周期:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value" v-if="infoData.ruleInfo">
|
|
|
|
|
+ {{ infoData.ruleInfo.cycleValue}}
|
|
|
|
|
+ <!-- {{getDictValue('巡点检周期', infoData.ruleInfo.cycleType)}} -->
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">规则名称:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value">{{ infoData.name}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">创建人:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value">{{ infoData.createUserName}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">创建时间:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value">{{ infoData.createTime}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="4">
|
|
|
|
|
+ <view class="label">备注:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="8">
|
|
|
|
|
+ <view class="value">{{ infoData.remark}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info_header">
|
|
|
|
|
+ <view class="info_title">量具设备</view>
|
|
|
|
|
+ <u-gap height="4" bgColor="#1890FF"></u-gap>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="card_box" v-for="(item,index) in infoData.planDeviceList">
|
|
|
|
|
+ <view class="card_title">设备{{index + 1}}</view>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="3">
|
|
|
|
|
+ <view class="label">设备编码:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="9">
|
|
|
|
|
+ <view class="value">{{item.substance.code}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="3">
|
|
|
|
|
+ <view class="label">设备编号:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="9">
|
|
|
|
|
+ <view class="value">{{item.substance.codeNumber}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="3">
|
|
|
|
|
+ <view class="label">设备名称:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="9">
|
|
|
|
|
+ <view class="value">{{item.substance.name}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="3">
|
|
|
|
|
+ <view class="label">设备型号:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="9">
|
|
|
|
|
+ <view class="value">{{item.substance.model}}</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="3">
|
|
|
|
|
+ <view class="label">是否遗失:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="9">
|
|
|
|
|
+ <view class="value">
|
|
|
|
|
+ <u-radio-group v-if="taskDefinitionKey === 'user_submit'" size="30" iconSize="20"
|
|
|
|
|
+ v-model="item.isLose" placement="row" @change="">
|
|
|
|
|
+ <u-radio :customStyle="{marginRight: '15px'}" v-for="(Item, Index) in option"
|
|
|
|
|
+ :key="Index" :label="Item.label" :name="Item.value">
|
|
|
|
|
+ </u-radio>
|
|
|
|
|
+ </u-radio-group>
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-else>{{item.isLose != null? option.filter((i) => i.value == item.isLose)[0].label: ''}}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ <u-row>
|
|
|
|
|
+ <u-col span="3">
|
|
|
|
|
+ <view class="label">质检:</view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ <u-col span="9">
|
|
|
|
|
+ <view class="value">
|
|
|
|
|
+ <u-radio-group
|
|
|
|
|
+ v-if="(taskDefinitionKey === 'leader_check' &&infoData.logList.length == 1) ||taskDefinitionKey === 'user_receive'"
|
|
|
|
|
+ size="30" iconSize="20" v-model="item.qualityStatus" placement="row"
|
|
|
|
|
+ @change="qualityChange">
|
|
|
|
|
+ <u-radio :customStyle="{marginRight: '15px'}" v-for="(Item, Index) in statusOption"
|
|
|
|
|
+ :key="Index" :label="Item.label" :name="Item.value">
|
|
|
|
|
+ </u-radio>
|
|
|
|
|
+ </u-radio-group>
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-else>{{item.qualityStatus != null? statusOption.filter((i) => i.value == item.qualityStatus)[0].label: ''}}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-col>
|
|
|
|
|
+ </u-row>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { getBusinessOpportunityDetailAPI, businessOpportunityUpdateAPI } from '@/api/wt/index.js'
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ processById,
|
|
|
|
|
+ getList
|
|
|
|
|
+ } from '@/api/wt/index.js'
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
|
businessId: {
|
|
businessId: {
|
|
@@ -15,88 +169,145 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- form: {},
|
|
|
|
|
- calendarShow: false,
|
|
|
|
|
- tableField: [
|
|
|
|
|
- {
|
|
|
|
|
- label: '名称',
|
|
|
|
|
- field: 'productName'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '编码',
|
|
|
|
|
- field: 'productCode'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '类型',
|
|
|
|
|
- field: 'productCategoryName'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '单价',
|
|
|
|
|
- field: 'singlePrice'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '数量',
|
|
|
|
|
- field: 'totalCount'
|
|
|
|
|
|
|
+ infoData: {}, // 量具送检信息
|
|
|
|
|
+ statusOption: [{
|
|
|
|
|
+ value: 0,
|
|
|
|
|
+ label: '正常'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '合计',
|
|
|
|
|
- field: 'totalPrice'
|
|
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ label: '异常'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ option: [{
|
|
|
|
|
+ value: 0,
|
|
|
|
|
+ label: '否'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '生产交付交期',
|
|
|
|
|
- field: 'produceDeliveryDeadline',
|
|
|
|
|
- type: 'date',
|
|
|
|
|
- disabled: !['productionSupervisorApprove1', 'productionSupervisorApprove2'].includes(this.taskDefinitionKey)
|
|
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ label: '是'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- list: ['基本信息', '产品清单'],
|
|
|
|
|
- totalPrice: 0,
|
|
|
|
|
- curNow: 0,
|
|
|
|
|
- curIndex: null,
|
|
|
|
|
- rules: {
|
|
|
|
|
- produceDeliveryDeadline: {
|
|
|
|
|
- type: 'string',
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请选择生产交付日期',
|
|
|
|
|
- trigger: ['blur', 'change']
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getData()
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
- sectionChange(index) {
|
|
|
|
|
- this.curNow = index
|
|
|
|
|
|
|
+ qualityChange(e) { // 质检切换
|
|
|
|
|
+ // console.log(e,6666666666666666666)
|
|
|
},
|
|
},
|
|
|
- async getDetailData(id) {
|
|
|
|
|
- const data = await getBusinessOpportunityDetailAPI(id)
|
|
|
|
|
- if (data) {
|
|
|
|
|
- this.form = data
|
|
|
|
|
- console.log(this.form.productList)
|
|
|
|
|
- this.totalPrice = this.form.productList.reduce((num, row) => (num += row.totalPrice), 0)
|
|
|
|
|
|
|
+ getData() {
|
|
|
|
|
+ let type = '';
|
|
|
|
|
+ switch (this.taskDefinitionKey) {
|
|
|
|
|
+ case 'user_submit':
|
|
|
|
|
+ type = 1;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'team_leader_submit':
|
|
|
|
|
+ type = 2;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'leader_approve':
|
|
|
|
|
+ type = 3;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'leader_check':
|
|
|
|
|
+ type = 3;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'team_leader_receive_send':
|
|
|
|
|
+ type = 2;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'user_receive':
|
|
|
|
|
+ type = 1;
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
|
|
+ processById({
|
|
|
|
|
+ id: this.businessId,
|
|
|
|
|
+ type
|
|
|
|
|
+ }).then(async (data) => {
|
|
|
|
|
+ this.infoData = data;
|
|
|
|
|
+ if (this.taskDefinitionKey == 'leader_check') {
|
|
|
|
|
+ this.infoData.planDeviceList = this.infoData.planDeviceList.map(
|
|
|
|
|
+ (item) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ qualityStatus: 0
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- openCalendar(e, index) {
|
|
|
|
|
- this.calendarShow = true
|
|
|
|
|
- this.curIndex = index
|
|
|
|
|
- },
|
|
|
|
|
- confirm(e) {
|
|
|
|
|
- this.$set(this.form.productList[this.curIndex], 'produceDeliveryDeadline', ...e)
|
|
|
|
|
- this.calendarShow = false
|
|
|
|
|
- },
|
|
|
|
|
- //
|
|
|
|
|
- getTableValue() {
|
|
|
|
|
- let validField = ['produceDeliveryDeadline']
|
|
|
|
|
- let valid = false
|
|
|
|
|
- for (var i = 0; i < validField.length; i++) {
|
|
|
|
|
- valid = this.form.productList.some(item => !!item[validField[i]] == false)
|
|
|
|
|
- if (valid) break
|
|
|
|
|
- }
|
|
|
|
|
- return new Promise(async (resolve, reject) => {
|
|
|
|
|
- valid ? reject(uni.$u.toast('请完善产品清单信息')) : resolve(this.form)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ async getTableValue() {
|
|
|
|
|
+ return this.infoData;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style></style>
|
|
|
|
|
|
|
+<style lang="scss">
|
|
|
|
|
+ .basic_info {
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 0 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .info_title {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ padding: 16rpx 50rpx;
|
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .info_title::after {
|
|
|
|
|
+ content: '';
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 16rpx;
|
|
|
|
|
+ left: 0px;
|
|
|
|
|
+ width: 16rpx;
|
|
|
|
|
+ height: 50rpx;
|
|
|
|
|
+ background: #1890FF;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .info_content {
|
|
|
|
|
+ .label {
|
|
|
|
|
+ padding: 20rpx 0;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #6e6e6e;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .value {
|
|
|
|
|
+ padding: 20rpx 0;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .card_box {
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding: 20rpx;
|
|
|
|
|
+ margin: 20rpx;
|
|
|
|
|
+ width: calc(100% - 20rpx);
|
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
|
+ box-shadow: 0 0 12rpx -6rpx #000;
|
|
|
|
|
+
|
|
|
|
|
+ .card_title {
|
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .label {
|
|
|
|
|
+ padding: 18rpx 0;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #6e6e6e;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .value {
|
|
|
|
|
+ padding: 18rpx 0;
|
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|