|
|
@@ -9,29 +9,14 @@
|
|
|
|
|
|
<view class="material ">
|
|
|
|
|
|
-
|
|
|
<view class='content_table' v-for="(item,index) in palletList" :key='index'>
|
|
|
- <view class="item" @click="handleType" v-if="!isDetails">
|
|
|
- <view class="lable rx-cc">舟皿类型</view>
|
|
|
- <view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.categoryLevelName"></input>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="item" @click="handleType" v-if="isDetails">
|
|
|
- <view class="lable rx-cc">舟皿类型</view>
|
|
|
- <view class="content ">
|
|
|
- {{item.name}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
|
|
|
|
|
|
<view class="item">
|
|
|
<view class="lable rx-cc">舟皿名称</view>
|
|
|
<view class="content ">
|
|
|
<zxz-uni-data-select :localdata="boatList" v-model="item.categoryId" dataValue='id'
|
|
|
- format='{name}-{code}' dataKey="code" filterable :clear='false' v-if="!isDetails"
|
|
|
+ format='{name}-{code}' dataKey="code" filterable :clear='false'
|
|
|
@change='inputChange'></zxz-uni-data-select>
|
|
|
|
|
|
<view v-if="isDetails">{{item.code }} </view>
|
|
|
@@ -48,27 +33,32 @@
|
|
|
<view class="item">
|
|
|
<view class="lable rx-cc">舟皿数量</view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="item.quantity" type='digit' :disabled="isDetails"></input>
|
|
|
+ <input class="uni-input" v-model="item.quantity " type='digit' :disabled="isDetails"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+
|
|
|
+ <view class="item" v-if="item.hideKc">
|
|
|
+ <view class="lable rx-cc">库存</view>
|
|
|
+ <view class="content content_num">
|
|
|
+ {{ packingCountBase }} {{item.unit}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- <ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
|
- :localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import baTreePicker from '@/components/ba-tree-picker/ba-tree-picker.vue'
|
|
|
-
|
|
|
-
|
|
|
import {
|
|
|
- treeByPid,
|
|
|
- assetPage,
|
|
|
+
|
|
|
+ realTimeInventory,
|
|
|
} from '@/api/pda/workOrder.js'
|
|
|
|
|
|
export default {
|
|
|
@@ -87,44 +77,32 @@
|
|
|
return {
|
|
|
classificationList: [],
|
|
|
boatList: [],
|
|
|
+
|
|
|
+ packingCountBase: 0,
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
created() {
|
|
|
- this.getTreeList()
|
|
|
+ this.getInventoryList()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
- getTreeList() {
|
|
|
- let params = {
|
|
|
- ids: [8]
|
|
|
- }
|
|
|
- treeByPid(params).then(res => {
|
|
|
- this.classificationList = res
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- confirm(id, name, rootCategoryLevelId) {
|
|
|
- this.$set(this.palletList[0], 'categoryLevelId', id[0])
|
|
|
- this.$set(this.palletList[0], 'categoryLevelName', name)
|
|
|
- this.$set(this.palletList[0], 'rootCategoryLevelId', rootCategoryLevelId)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ getInventoryList() {
|
|
|
let param = {
|
|
|
- categoryLevelId: id,
|
|
|
+ categoryLevelId: 8,
|
|
|
+ dimension: 1,
|
|
|
pageNum: 1,
|
|
|
size: -1,
|
|
|
}
|
|
|
- assetPage(param).then(res => {
|
|
|
+ realTimeInventory(param).then(res => {
|
|
|
this.boatList = res.list
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
inputChange(e) {
|
|
|
this.$set(this.palletList[0], 'categoryId', e.id)
|
|
|
this.$set(this.palletList[0], 'code', e.code)
|
|
|
@@ -135,19 +113,28 @@
|
|
|
this.$set(this.palletList[0], 'modelType', e.modelType)
|
|
|
this.$set(this.palletList[0], 'quantity', e.quantity)
|
|
|
this.$set(this.palletList[0], 'unit', e.unit)
|
|
|
+
|
|
|
+
|
|
|
+ if (Object.prototype.hasOwnProperty.call(e, 'packingCountBase')) {
|
|
|
+ this.packingCountBase = e.packingCountBase
|
|
|
+ this.$set(this.palletList[0], 'hideKc', true)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.$forceUpdate()
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- handleType() {
|
|
|
- this.$refs.treePicker._show()
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
}
|
|
|
</script>
|