|
|
@@ -0,0 +1,295 @@
|
|
|
+<template>
|
|
|
+ <view class="mainBox">
|
|
|
+ <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="检验项目" @clickLeft="back">
|
|
|
+ </uni-nav-bar>
|
|
|
+
|
|
|
+ <view class="wrapper">
|
|
|
+ <view class="herder_item">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view" style="font-size: 32rpx;">
|
|
|
+ 检验信息
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <text class="marginTop20 tag">
|
|
|
+ {{form.inspectionName}}
|
|
|
+ </text>
|
|
|
+ <view class="marginTop20 workValue">
|
|
|
+ {{workData.productName}}/{{workData.code}}/{{workData.productCode}}
|
|
|
+ </view>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 执行标准
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u--input suffixIcon="arrow-right" style="background-color:#fff ;" :disabledColor="'#ffffff'"
|
|
|
+ :disabled="true" class="marginTop20" placeholder=" " border="surround"
|
|
|
+ :value="getDictValue('质检标准类型', form.qualityStandardType+'')"></u--input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 工艺参数
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="marginTop20 defValue">
|
|
|
+ {{form.defaultValue}}
|
|
|
+ </view>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 质检内容
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input @input="handleInput(form, form.qualityResultContent)" class="marginTop20" placeholder="请输入内容"
|
|
|
+ border="surround" v-model="form.qualityResultContent">
|
|
|
+ <template slot="suffix" v-if="form.unitName">{{form.unitName}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 样品数
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround"
|
|
|
+ v-model="form.sampleQuantity">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 合格数
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround"
|
|
|
+ v-model="form.qualifiedQuantity">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 不合格数
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround"
|
|
|
+ v-model="form.noQualifiedQuantity">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 损耗数(合格品)
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.lossNumber">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 损耗数(不合格品)
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround"
|
|
|
+ v-model="form.lossNumberUnqualified">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 留样数(合格品)
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround"
|
|
|
+ v-model="form.retainedSampleQuantity">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 留样数(不合格品)
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <u-input type="number" class="marginTop20" placeholder="请输入内容" border="surround"
|
|
|
+ v-model="form.retainedSampleUnqualified">
|
|
|
+ <template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
|
|
|
+ </u-input>
|
|
|
+ <view class="herder_item marginTop20">
|
|
|
+ <view class="herder_text"></view>
|
|
|
+ <view class="herder_view">
|
|
|
+ 质检结果
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <uni-data-picker class="marginTop20" v-model="form.qualityResults" placeholder="请选择"
|
|
|
+ :localdata="acceptUnpackList">
|
|
|
+ </uni-data-picker>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="footerButton">
|
|
|
+ <u-button type="default" text="返回" @click="back"></u-button>
|
|
|
+ <u-button type="primary" @click="save" text="保存"></u-button>
|
|
|
+ </view>
|
|
|
+ <view style="width:100%;height: 100rpx;"></view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import dictMixns from '@/mixins/dictMixins'
|
|
|
+ import {
|
|
|
+ getById,
|
|
|
+ update
|
|
|
+ } from '@/api/inspectionWork/index.js'
|
|
|
+ import {
|
|
|
+ handleInput
|
|
|
+ } from './unit.js';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ components: {},
|
|
|
+ mixins: [dictMixns],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ handleInput,
|
|
|
+ show: false,
|
|
|
+ form: {
|
|
|
+
|
|
|
+ },
|
|
|
+ acceptUnpackList: [{
|
|
|
+ text: "合格",
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "不合格",
|
|
|
+ value: 2
|
|
|
+ }, {
|
|
|
+ text: "让步接收",
|
|
|
+ value: 3
|
|
|
+ },
|
|
|
+ ],
|
|
|
+
|
|
|
+ workData: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+
|
|
|
+ },
|
|
|
+ onLoad(data) {
|
|
|
+ this.requestDict('质检计划类型');
|
|
|
+ this.requestDict('取样类型');
|
|
|
+ this.requestDict('质检标准类型');
|
|
|
+ if (data) {
|
|
|
+ getById(data.workId).then(res => {
|
|
|
+ this.workData = res
|
|
|
+ this.form = res.templateList.find(item => item.id == data.projectId)
|
|
|
+ this.form.measureUnit = res.qualitySampleList[0]?.measureUnit
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ onShow() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+
|
|
|
+ update() {
|
|
|
+ let params = JSON.parse(JSON.stringify(this.workData))
|
|
|
+ let index= params.templateList.findIndex(item=>item.id==this.form.id)
|
|
|
+ params.templateList[index]=this.form
|
|
|
+ update(params)
|
|
|
+ .then((msg) => {
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .mainBox {
|
|
|
+ background-color: #f3f8fb;
|
|
|
+ height: 100vh;
|
|
|
+ font-size: 27rpx;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .wrapper {
|
|
|
+ width: 720rpx;
|
|
|
+ background: #fff;
|
|
|
+ margin: 20rpx auto 0;
|
|
|
+ border-radius: 30rpx;
|
|
|
+ padding: 26rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .footerButton {
|
|
|
+ width: 100%;
|
|
|
+ height: 84rpx;
|
|
|
+ display: flex;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 10;
|
|
|
+ background-color: #fff;
|
|
|
+
|
|
|
+ /deep/.u-button {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ >view {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .workValue {
|
|
|
+ word-break: break-all;
|
|
|
+ font-weight: bold;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .tag {
|
|
|
+ // font-size: 24rpx;
|
|
|
+ color: #fff;
|
|
|
+ padding: 12rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ background: #979797;
|
|
|
+ display: inline-block;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.input-value {
|
|
|
+ font-size: 28rpx !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .defValue {
|
|
|
+ color: #c1353c;
|
|
|
+ text-indent: 2ch;
|
|
|
+ }
|
|
|
+
|
|
|
+ .marginTop20 {
|
|
|
+ margin-top: 30rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .herder_item {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ font-weight: bold;
|
|
|
+ // font-size: 26rpx;
|
|
|
+
|
|
|
+ .herder_text {
|
|
|
+
|
|
|
+ min-width: 10rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ background: #00c0a1;
|
|
|
+ margin-right: 12rpx;
|
|
|
+ margin-top: 5rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|