gaojs
7 months ago
5 changed files with 523 additions and 52 deletions
@ -0,0 +1,418 @@ |
|||
<template> |
|||
<!-- 详情 --> |
|||
<view class="detail-container"> |
|||
<view> |
|||
<u-subsection :list="tabsList" v-model="current" @change="tabsChange"></u-subsection> |
|||
</view> |
|||
<u-form :model="form"> |
|||
<view class="info"> |
|||
<view v-if="current == '0'"> |
|||
<view class="title"> |
|||
<view>检验质检单</view> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="检验单编号" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入检验单编号"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="检验单名称" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入检验单名称"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="检验类型" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入检验类型"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="检验时间" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入检验时间"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="备注" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入备注"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view class="title"> |
|||
<view>检测信息</view> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="检测数量" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入检测数量"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="合格数量" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入合格数量"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="不合格数量" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" disabled placeholder="自动生成"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="合格率" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" disabled placeholder="自动生成"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
</view> |
|||
<view v-if="current == '1'"> |
|||
<view class="title"> |
|||
<view>报工信息</view> |
|||
</view> |
|||
<view> |
|||
<view class="dec-item"> |
|||
<view>报工人员:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>报工数量:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>报工时间:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view v-if="current == '2'"> |
|||
<view class="title"> |
|||
<view>任务信息</view> |
|||
</view> |
|||
<view> |
|||
<view class="dec-item"> |
|||
<view>任务编号:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>任务名称:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>站点名称:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工艺路线:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工序名称:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工序编号:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>班组:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>任务负责人:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view v-if="current == '3'"> |
|||
<view class="title"> |
|||
<view>工单信息</view> |
|||
</view> |
|||
<view> |
|||
<view class="dec-item"> |
|||
<view>工单编号:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工单名称:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>产品名称:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>产品编号:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>规格型号:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>产品类型:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>单位:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>BOM:</view> |
|||
<view>{{ data.schedulingCode }}</view> |
|||
</view> |
|||
<view> |
|||
<u-form-item label="批次号" prop="batchNo"> |
|||
<view> |
|||
<u-input v-model="form.batchNo" placeholder="请输入批次号"/> |
|||
</view> |
|||
</u-form-item> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view > |
|||
<u-button type="primary" @click="openQualityInspect()">提交</u-button> |
|||
</view> |
|||
</u-form> |
|||
|
|||
|
|||
|
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import { |
|||
onLoad, |
|||
onShow |
|||
} from '@dcloudio/uni-app' |
|||
import { |
|||
ref, |
|||
getCurrentInstance |
|||
} from 'vue' |
|||
|
|||
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts' |
|||
|
|||
const {proxy} = getCurrentInstance() |
|||
const number = ref('') |
|||
const data = ref({}) |
|||
const loading = ref(false) |
|||
|
|||
const tabsList = ref([{name:'质检信息'},{name:'报工信息'},{name:'任务信息'},{name:'工单信息'}]) |
|||
const current = ref(0) |
|||
|
|||
const form = ref({ |
|||
batchNo: '' |
|||
}) |
|||
|
|||
|
|||
function getWorkSchedulingDetail() { |
|||
workSchedulingListApi.getWorkSchedulingDetail(number.value).then((res) => { |
|||
console.log(number.value) |
|||
data.value = res.data |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
|
|||
|
|||
onLoad((option) => { |
|||
console.log(JSON.parse(option.obj).schedulingCode) |
|||
if (option.obj) { |
|||
number.value = JSON.parse(option.obj).schedulingCode |
|||
|
|||
} |
|||
}) |
|||
onShow(() => { |
|||
//getWorkSchedulingDetail() |
|||
}) |
|||
|
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.detail-container { |
|||
min-height: 100vh; |
|||
background: white; |
|||
} |
|||
|
|||
.line { |
|||
background: #f5f5f5; |
|||
height: 20rpx; |
|||
} |
|||
|
|||
.info { |
|||
background: white; |
|||
} |
|||
|
|||
|
|||
.tab { |
|||
border-bottom: 1px solid #e4e4e4; |
|||
|
|||
} |
|||
|
|||
.title { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 20rpx 30rpx; |
|||
border-bottom: 1px solid #e4e4e4; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
flex: 1; |
|||
border-left: 10rpx solid #409eff; |
|||
padding-left: 20rpx; |
|||
font-weight: bold; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.dec { |
|||
padding: 30rpx; |
|||
|
|||
.dec-item { |
|||
padding-bottom: 30rpx; |
|||
display: flex; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
width: 240rpx; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
color: #888888; |
|||
flex: 1; |
|||
width: 0px; |
|||
word-wrap: break-word; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.dec2 { |
|||
padding: 10rpx 30rpx; |
|||
display: flex; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
width: 180rpx; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
color: #888888; |
|||
flex: 1; |
|||
width: 0px; |
|||
word-wrap: break-word; |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
.items { |
|||
border-radius: 12rpx; |
|||
background: #F5F5F5; |
|||
padding-bottom: 20rpx; |
|||
|
|||
.items-name { |
|||
padding: 20rpx; |
|||
border-bottom: 1px solid #dedede; |
|||
} |
|||
|
|||
.items-dec { |
|||
padding: 0px 20rpx; |
|||
margin-top: 20rpx; |
|||
} |
|||
} |
|||
|
|||
|
|||
.list { |
|||
padding: 20rpx; |
|||
|
|||
.item { |
|||
display: flex; |
|||
margin-bottom: 20rpx; |
|||
|
|||
.item-box { |
|||
border-radius: 12rpx; |
|||
border: 1px solid #dedede; |
|||
border-radius: 12rpx; |
|||
|
|||
flex: 1; |
|||
width: 0rpx; |
|||
} |
|||
|
|||
.spare-title { |
|||
padding: 20rpx 30rpx; |
|||
border-bottom: 1px solid #e4e4e4; |
|||
display: flex; |
|||
|
|||
.title-txt { |
|||
color: #409eff; |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
flex: 1; |
|||
} |
|||
} |
|||
|
|||
.dec { |
|||
color: #9c9c9c; |
|||
padding: 0rpx 30rpx 20rpx; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
.add-btn { |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
|
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
z-index: 22; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue