|
|
@@ -0,0 +1,396 @@
|
|
|
+<template>
|
|
|
+ <view>
|
|
|
+ <view class="title_box rx-bc">
|
|
|
+ <view class="name">取样</view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="material ">
|
|
|
+
|
|
|
+ <view class="content_table">
|
|
|
+ <view class="item">
|
|
|
+ <view class="lable rx-cc">工序名称</view>
|
|
|
+ <view class="content">
|
|
|
+ {{item.diagramLast.taskTypeName}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <view class="item rx-sc">
|
|
|
+ <view class="rx ww55 ">
|
|
|
+ <view class="lable rx-cc">数量</view>
|
|
|
+ <view class="content rx-sc">
|
|
|
+ <view>{{item.formedNum}}</view>
|
|
|
+ <view class="unit">{{item.unit}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="rx ww45">
|
|
|
+ <view class="lable rx-cc ww80">重量</view>
|
|
|
+ <view class="content content_num">
|
|
|
+ <view>{{item.formedWeight}}</view>
|
|
|
+ <view class="unit">{{item.weightUnit}}</view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="item">
|
|
|
+ <view class="lable rx-cc">取样数量</view>
|
|
|
+ <view class="content content_num rx-sc">
|
|
|
+ <input class="uni-input" v-model="item.sampleNum" type='digit'
|
|
|
+ @blur='item.sampleNum > item.formedNum ? item.sampleNum = item.formedNum : item.sampleNum'></input>
|
|
|
+ <view class="unit">{{item.unit}}</view>
|
|
|
+ <view class="penalize" @click="penalize">处置
|
|
|
+ {{Number(item.sampleNum || 0) - Number(item.recoveryNum || 0) }}</view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="item">
|
|
|
+ <view class="lable rx-cc">回收数量</view>
|
|
|
+ <view class="content content_num rx-sc">
|
|
|
+ <input class="uni-input" v-model="item.recoveryNum" type='digit'
|
|
|
+ @blur='item.recoveryNum > item.sampleNum ? item.recoveryNum = item.sampleNum : item.recoveryNum'></input>
|
|
|
+ <view class="unit">{{item.unit}}</view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="content_table2" v-if="item.sampleList.length > 0">
|
|
|
+ <view class="head row rx-sc">
|
|
|
+ <view class="item ww30">数量</view>
|
|
|
+ <view class="item ww55">处置</view>
|
|
|
+ <view class="item ww15">操作</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="table">
|
|
|
+
|
|
|
+ <view class="tr row rx-sc" v-for="(item, index) in item.sampleList" :key='index'>
|
|
|
+
|
|
|
+ <view class="item ww30 content_num">
|
|
|
+ <input class="uni-input" v-model="item.num"></input>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="item ww55 content_num">
|
|
|
+ <zxz-uni-data-select :localdata="warehouseList" v-model="item.warehouseId" dataValue='id'
|
|
|
+ dataKey="name" filterable format='{name}' ></zxz-uni-data-select>
|
|
|
+ </view>
|
|
|
+ <view class="item ww15">
|
|
|
+ <view class="left rx-ss" @click="getDelete(index)">
|
|
|
+ <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20"
|
|
|
+ color="#fa3534"></uni-icons>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+
|
|
|
+ getWarehouseList,
|
|
|
+
|
|
|
+ } from '@/api/pda/workOrder.js'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ props: {
|
|
|
+ item: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {}
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ warehouseList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getWarehouseListFn()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getWarehouseListFn() {
|
|
|
+ getWarehouseList().then(res => {
|
|
|
+ this.warehouseList = res
|
|
|
+ })
|
|
|
+ },
|
|
|
+ penalize() {
|
|
|
+ if (Number(this.item.sampleNum || 0) - Number(this.item.recoveryNum || 0) <= 0) {
|
|
|
+
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '处置数量不能小于等于0'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.item.sampleList.push({
|
|
|
+ num: null,
|
|
|
+ warehouseId: null
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getDelete(idx) {
|
|
|
+ this.item.sampleList.splice(idx, 1)
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .title_box {
|
|
|
+ margin-top: 28rpx;
|
|
|
+
|
|
|
+ .name {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 400;
|
|
|
+ color: $theme-color;
|
|
|
+ padding-left: 20rpx;
|
|
|
+
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ &:before {
|
|
|
+ position: absolute;
|
|
|
+ content: '';
|
|
|
+ left: 0rpx;
|
|
|
+ top: 0rpx;
|
|
|
+ bottom: 0rpx;
|
|
|
+ width: 4rpx;
|
|
|
+ height: 28rpx;
|
|
|
+ background: $theme-color;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn_box {
|
|
|
+ padding: 0 18rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ background: $theme-color;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 4rpx;
|
|
|
+
|
|
|
+ .scan {
|
|
|
+ width: 34rpx;
|
|
|
+ height: 34rpx;
|
|
|
+ margin-right: 12rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .material {
|
|
|
+ margin-top: 10rpx;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ .content_table {
|
|
|
+ width: 100%;
|
|
|
+ border: 2rpx solid $border-color;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ display: flex;
|
|
|
+ border-bottom: 2rpx solid $border-color;
|
|
|
+
|
|
|
+
|
|
|
+ .lable {
|
|
|
+ width: 156rpx;
|
|
|
+ text-align: center;
|
|
|
+ background-color: #F7F9FA;
|
|
|
+ font-size: 26rpx;
|
|
|
+ border-right: 2rpx solid $border-color;
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .lable150 {
|
|
|
+ width: 156rpx !important;
|
|
|
+ font-size: 24rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ww80 {
|
|
|
+ width: 80rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ width: 518rpx;
|
|
|
+ min-height: 64rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ line-height: 28rpx;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 400;
|
|
|
+ padding: 18rpx 8rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ word-wrap: break-word;
|
|
|
+ flex-grow: 1 !important;
|
|
|
+
|
|
|
+
|
|
|
+ .unit {
|
|
|
+ padding: 0 4rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #404446;
|
|
|
+ }
|
|
|
+
|
|
|
+ .penalize {
|
|
|
+ width: 200rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ background: $theme-color;
|
|
|
+ font-size: 24rpx;
|
|
|
+ text-align: center;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .pd4 {
|
|
|
+ padding: 4rpx 8rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .ww55 {
|
|
|
+ width: 55%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ww45 {
|
|
|
+ width: 45%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .content_table2 {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 8rpx;
|
|
|
+
|
|
|
+
|
|
|
+ .row {
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+
|
|
|
+ .item {
|
|
|
+ padding: 8rpx 0;
|
|
|
+ color: #404446;
|
|
|
+ font-size: 28rpx;
|
|
|
+ padding-left: 12rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .left {
|
|
|
+ width: 40rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ww30 {
|
|
|
+ width: 30%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ww55 {
|
|
|
+ width: 55%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ww15 {
|
|
|
+ width: 15%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .head {
|
|
|
+ height: 64rpx;
|
|
|
+ background: #F7F9FA;
|
|
|
+ border-top: 2rpx solid #E3E5E5;
|
|
|
+ border-left: 2rpx solid #E3E5E5;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ height: 64rpx;
|
|
|
+ line-height: 64rpx;
|
|
|
+ border-right: 2rpx solid #E3E5E5;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ .tr {
|
|
|
+ border-top: 2rpx solid #E3E5E5;
|
|
|
+ border-left: 2rpx solid #E3E5E5;
|
|
|
+
|
|
|
+
|
|
|
+ .item {
|
|
|
+ font-size: 24rpx;
|
|
|
+ min-height: 64rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ border-right: 2rpx solid #E3E5E5;
|
|
|
+ box-sizing: border-box;
|
|
|
+ white-space: normal;
|
|
|
+ word-break: break-all;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ border-bottom: 2rpx solid #E3E5E5;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .content_num {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 4rpx;
|
|
|
+
|
|
|
+ /deep/ .uni-input-input {
|
|
|
+ border: 2rpx solid #F0F8F2;
|
|
|
+ width: 260rpx;
|
|
|
+ background: #F0F8F2;
|
|
|
+ color: $theme-color;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+</style>
|