|
|
@@ -10,18 +10,18 @@
|
|
|
<view class="content_table2">
|
|
|
<view class="head row rx-sc">
|
|
|
<view class="item ww35">名称</view>
|
|
|
- <view class="item ww45">废品数量</view>
|
|
|
+ <view class="item ww45">废品数量 ({{ count|| 0 }})</view>
|
|
|
<view class="item ww20">操作</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="table">
|
|
|
<u-list @scrolltolower="scrolltolower" class="z_list">
|
|
|
- <view class="tr row rx-sc" v-for="(it, idx) in List" :key='idx'>
|
|
|
+ <view class="tr row rx-sc" v-for="(it, idx) in inspectionList" :key='idx'>
|
|
|
<view class="item ww35">
|
|
|
{{ it.name }}
|
|
|
</view>
|
|
|
<view class="item ww45 content_num">
|
|
|
- <input class="uni-input" v-model="it.quantity" type="digit"></input>
|
|
|
+ <input class="uni-input" v-model="it.quantity" type="number" @input="onKeyInput"></input>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
@@ -38,6 +38,9 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
|
|
|
@@ -45,68 +48,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <ba-tree-picker ref="treePicker" :selectedData='selectedData' key="verify" :multiple="false"
|
|
|
+ <!-- <ba-tree-picker ref="treePicker" :selectedData='selectedData' key="verify" :multiple="false"
|
|
|
@select-change="confirm" title="选择分类" :localdata="classificationList" valueKey="id" textKey="name"
|
|
|
- childrenKey="children" multiple :selectParent='false' />
|
|
|
+ childrenKey="children" multiple :selectParent='false' /> -->
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- getLastTreeByPid,
|
|
|
-
|
|
|
- } from '@/api/pda/workOrder.js'
|
|
|
import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
baTreePicker,
|
|
|
},
|
|
|
-
|
|
|
+ props: {
|
|
|
+ inspectionList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => []
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
|
|
|
+ // classificationList: [],
|
|
|
+ // selectedData: [],
|
|
|
|
|
|
|
|
|
-
|
|
|
- classificationList: [],
|
|
|
- selectedData: [],
|
|
|
-
|
|
|
- List: []
|
|
|
+ count: 0,
|
|
|
}
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- this.getLastTree()
|
|
|
+
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
- getLastTree() {
|
|
|
- getLastTreeByPid(this.$route.query.inspectionId).then(res => {
|
|
|
- this.List = res
|
|
|
- })
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
|
|
- confirm(id, name, list) {
|
|
|
- this.List = list
|
|
|
- this.selectedData = []
|
|
|
- this.selectedData = this.List.map(m => {
|
|
|
- return m.id
|
|
|
- })
|
|
|
+ // confirm(id, name, list) {
|
|
|
+ // this.List = list
|
|
|
+ // this.selectedData = []
|
|
|
+ // this.selectedData = this.List.map(m => {
|
|
|
+ // return m.id
|
|
|
+ // })
|
|
|
|
|
|
- },
|
|
|
+ // },
|
|
|
|
|
|
handleDel(idx) {
|
|
|
- this.List.splice(idx, 1)
|
|
|
-
|
|
|
+ this.inspectionList.splice(idx, 1)
|
|
|
|
|
|
},
|
|
|
+ onKeyInput() {
|
|
|
+ this.count = 0
|
|
|
+ this.inspectionList.map(L => {
|
|
|
+ this.count = Number(this.count) + Number(L.quantity)
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
- handleView(it) {},
|
|
|
+ handleView(it) {
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
scrolltolower() {},
|
|
|
}
|
|
|
@@ -252,6 +256,6 @@
|
|
|
}
|
|
|
|
|
|
.z_list {
|
|
|
- max-height: 800rpx;
|
|
|
+ max-height: 400rpx;
|
|
|
}
|
|
|
</style>
|