| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- <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>
|