|
@@ -2,79 +2,170 @@
|
|
|
<view>
|
|
<view>
|
|
|
<view class="title_box rx-bc">
|
|
<view class="title_box rx-bc">
|
|
|
<view class="name">物料清单</view>
|
|
<view class="name">物料清单</view>
|
|
|
|
|
+ <view class="btn_box rx-cc" v-if="deviceList.length > 1" @click="bindDevice">绑定设备</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="material rx-ss" v-for="(mate, idx) in list" :key="idx">
|
|
|
|
|
- <view class="left rx-ss" @click="getDelete(idx)" v-if='workOrderId'>
|
|
|
|
|
- <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="content_table">
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
|
|
|
|
|
|
|
|
- <view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
|
|
|
|
|
- <view class="lable rx-cc">{{ itm.label }}</view>
|
|
|
|
|
- <view class="content">{{ mate[itm.prop] }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="item" v-if='mate.isConsumable == 1'>
|
|
|
|
|
- <view class="lable rx-cc">包装库存</view>
|
|
|
|
|
- <view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
|
|
|
|
|
|
|
+ <view class="material rx-ss" v-for="(mate, idx) in list" :key="idx">
|
|
|
|
|
+ <view class="left rx-ss" @click="getDelete(idx)" v-if='workOrderId'>
|
|
|
|
|
+ <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="content_table">
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
- <view class="lable rx-cc">重量</view>
|
|
|
|
|
- <view class="content">{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}} </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="item rx-sc" v-if='mate.rootCategoryLevelId == 1 && mate.isConsumable == 1'>
|
|
|
|
|
+ <view class="rx ww50">
|
|
|
|
|
+ <view class="lable rx-cc">编码</view>
|
|
|
|
|
+ <view class="content">{{ mate.code }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
+ <view class="item rx-bc" v-if='mate.rootCategoryLevelId == 1 && mate.isConsumable == 0'
|
|
|
|
|
+ @click="handleCheck(idx, mate)">
|
|
|
|
|
+ <view class="rx ww80">
|
|
|
|
|
+ <view class="lable rx-cc">编码</view>
|
|
|
|
|
+ <view class="content">{{ mate.code }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="rx-cc ww20" v-if="deviceList.length > 1">
|
|
|
|
|
+ <image class="check" v-if="mate.check" src='../../../../static/check.png'></image>
|
|
|
|
|
+ <image class="check" v-if="!mate.check" src='../../../../static/check_no.png'></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
- <view class="lable rx-cc">刻码</view>
|
|
|
|
|
- <view class="content">{{mate.extInfo.engrave}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
- <view class="lable rx-cc">物料代号</view>
|
|
|
|
|
- <view class="content">{{mate.extInfo.materielCode}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
- <view class="lable rx-cc">客户代号</view>
|
|
|
|
|
- <view class="content">{{mate.extInfo.clientCode}}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
|
|
+ <view class="item" v-for="(itm, index) in tableH(mate.rootCategoryLevelId)" :key="index">
|
|
|
|
|
+ <view class="lable rx-cc">{{ itm.label }}</view>
|
|
|
|
|
+ <view class="content">{{ mate[itm.prop] }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="item" v-if='mate.isConsumable == 1'>
|
|
|
|
|
+ <view class="lable rx-cc">包装库存</view>
|
|
|
|
|
+ <view class="content">{{ mate.packingCountBase }}/ {{ mate.minUnit}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <view class="item rx-sc" v-if='mate.isConsumable == 0'>
|
|
|
|
|
+ <view class="rx ww50">
|
|
|
|
|
+ <view class="lable rx-cc">重量</view>
|
|
|
|
|
+ <view class="content">{{mate.extInfo.weight || 0}} {{ mate.extInfo.weightUnit}} </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <view class="rx ww50">
|
|
|
|
|
+ <view class="lable ww80 rx-cc">刻码</view>
|
|
|
|
|
+ <view class="content">{{mate.extInfo.engrave}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
- <view class="lable rx-cc">位置</view>
|
|
|
|
|
- <view class="content content_num ww400">
|
|
|
|
|
- <input class="uni-input" v-model='mate.extInfo.position'></input>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item">
|
|
|
|
|
- <view class="lable rx-cc">数量</view>
|
|
|
|
|
- <view class="content content_num">
|
|
|
|
|
- <input class="uni-input" v-model="mate.feedQuantity" type="digit"></input>
|
|
|
|
|
- <view class="unit">/{{mate.unit}}</view>
|
|
|
|
|
|
|
+ <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
+ <view class="lable rx-cc">物料代号</view>
|
|
|
|
|
+ <view class="content">{{mate.extInfo.materielCode}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <view class="item" v-if='mate.isConsumable == 0'>
|
|
|
|
|
+ <view class="lable rx-cc">客户代号</view>
|
|
|
|
|
+ <view class="content">{{mate.extInfo.clientCode}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <view class="item" v-if='mate.isConsumable == 0 && deviceList.length > 1'>
|
|
|
|
|
+ <view class="lable rx-cc">设备</view>
|
|
|
|
|
+ <view class="content content_num">
|
|
|
|
|
+ <zxz-uni-data-select :localdata="deviceList" v-model="mate.deviceId" dataValue='id'
|
|
|
|
|
+ format='{name}-{fixCode}' @change=" e => mate.deviceName = e.name" dataKey="id"
|
|
|
|
|
+ filterable :clear='false'></zxz-uni-data-select>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <view class="item rx-sc" v-if='mate.isConsumable == 0'>
|
|
|
|
|
+ <view class="rx ww50">
|
|
|
|
|
+ <view class="lable rx-cc">位置</view>
|
|
|
|
|
+ <view class="content content_num ">
|
|
|
|
|
+ <input class="uni-input" v-model='mate.extInfo.position'></input>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="rx ww50">
|
|
|
|
|
+ <view class="lable rx-cc ww80">数量</view>
|
|
|
|
|
+ <view class="content content_num ">
|
|
|
|
|
+ <input class="uni-input" v-model="mate.feedQuantity" type="digit"></input>
|
|
|
|
|
+ <view class="unit ">/{{mate.unit}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <view class="item" v-if='mate.isConsumable == 1'>
|
|
|
|
|
+ <view class="lable rx-cc">数量</view>
|
|
|
|
|
+ <view class="content content_num">
|
|
|
|
|
+ <input class="uni-input" v-model="mate.feedQuantity" type="digit"></input>
|
|
|
|
|
+ <view class="unit">/{{mate.unit}}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ </u-list>
|
|
|
|
|
+
|
|
|
|
|
+ <SearchPopup mode="center" v-if='deviveShow'>
|
|
|
|
|
+ <template v-slot:list>
|
|
|
|
|
+ <view class="search_list">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
|
|
|
|
|
+
|
|
|
|
|
+ <u-form-item label="绑定设备:" class="required-form" borderBottom prop="assetType">
|
|
|
|
|
+
|
|
|
|
|
+ <zxz-uni-data-select :localdata="deviceList" v-model="formData.deviceId" dataValue='id'
|
|
|
|
|
+ format='{name}-{fixCode}' @change="e => formData.deviceName = e.name" dataKey="id"
|
|
|
|
|
+ filterable :clear='false'></zxz-uni-data-select>
|
|
|
|
|
+
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ </u-form>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:operate>
|
|
|
|
|
+ <view class="operate_box rx-bc">
|
|
|
|
|
+ <u-button size="small" class="u-reset-button" @click="deviceClose">
|
|
|
|
|
+ 取消
|
|
|
|
|
+ </u-button>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <u-button type="success" size="small" class="u-reset-button" @click="deviceOk">
|
|
|
|
|
+ 确定
|
|
|
|
|
+ </u-button>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </SearchPopup>
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -83,7 +174,11 @@
|
|
|
import {
|
|
import {
|
|
|
tableHeader
|
|
tableHeader
|
|
|
} from './feedBom.js'
|
|
} from './feedBom.js'
|
|
|
|
|
+ import SearchPopup from '../../components/searchPopup.vue'
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ SearchPopup
|
|
|
|
|
+ },
|
|
|
props: {
|
|
props: {
|
|
|
workOrderId: {
|
|
workOrderId: {
|
|
|
type: String,
|
|
type: String,
|
|
@@ -92,15 +187,38 @@
|
|
|
list: {
|
|
list: {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
default: () => []
|
|
default: () => []
|
|
|
|
|
+ },
|
|
|
|
|
+ equipmentList: {
|
|
|
|
|
+ type: Array,
|
|
|
|
|
+ default: () => []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ equipmentList: {
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ handler(newVal) {
|
|
|
|
|
+ this.deviceList = newVal
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ deviceList: [],
|
|
|
|
|
|
|
|
|
|
+ deviveShow: false,
|
|
|
|
|
+ formData: {
|
|
|
|
|
+ deviceId: null,
|
|
|
|
|
+ deviceName: null,
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
tableH(type) {
|
|
tableH(type) {
|
|
@@ -110,6 +228,56 @@
|
|
|
getDelete(idx) {
|
|
getDelete(idx) {
|
|
|
this.list.splice(idx, 1)
|
|
this.list.splice(idx, 1)
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ scrolltolower() {},
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ handleCheck(idx, it) {
|
|
|
|
|
+ this.$set(this.list[idx], 'check', !it.check)
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ bindDevice() {
|
|
|
|
|
+ this.deviveShow = true
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ deviceOk() {
|
|
|
|
|
+ let arr = this.list.filter(e => {
|
|
|
|
|
+ return e.check
|
|
|
|
|
+ })
|
|
|
|
|
+ if (arr.length <= 0) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: '请先勾选物料'
|
|
|
|
|
+ })
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.formData.deviceId) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: '请先选择设备'
|
|
|
|
|
+ })
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.list.forEach(e => {
|
|
|
|
|
+ if (e.check) {
|
|
|
|
|
+ e['deviceId'] = this.formData.deviceId
|
|
|
|
|
+ e['deviceName'] = this.formData.deviceName
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ this.deviceClose()
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ deviceClose() {
|
|
|
|
|
+ this.formData.deviceName = null
|
|
|
|
|
+ this.formData.deviceId = null
|
|
|
|
|
+ this.deviveShow = false
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -142,9 +310,12 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
.btn_box {
|
|
.btn_box {
|
|
|
padding: 0 18rpx;
|
|
padding: 0 18rpx;
|
|
|
- height: 60rpx;
|
|
|
|
|
|
|
+ height: 48rpx;
|
|
|
|
|
+
|
|
|
background: $theme-color;
|
|
background: $theme-color;
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
font-style: normal;
|
|
font-style: normal;
|
|
@@ -189,7 +360,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.content_table {
|
|
.content_table {
|
|
|
- width: 722rpx;
|
|
|
|
|
|
|
+ width: 680rpx;
|
|
|
border: 2rpx solid $border-color;
|
|
border: 2rpx solid $border-color;
|
|
|
|
|
|
|
|
.item {
|
|
.item {
|
|
@@ -197,6 +368,7 @@
|
|
|
border-bottom: 2rpx solid $border-color;
|
|
border-bottom: 2rpx solid $border-color;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
.lable {
|
|
.lable {
|
|
|
width: 132rpx;
|
|
width: 132rpx;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -268,6 +440,49 @@
|
|
|
.ww45 {
|
|
.ww45 {
|
|
|
width: 45%;
|
|
width: 45%;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .ww50 {
|
|
|
|
|
+ width: 50%;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .ww80 {
|
|
|
|
|
+ width: 80%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .ww20 {
|
|
|
|
|
+ width: 20%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .check {
|
|
|
|
|
+ width: 30rpx;
|
|
|
|
|
+ height: 30rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ .z_list {
|
|
|
|
|
+ max-height: 2000rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ .search_list {
|
|
|
|
|
+ min-height: 100rpx;
|
|
|
|
|
+ width: 90vw;
|
|
|
|
|
+
|
|
|
|
|
+ /deep/ .baseForm {
|
|
|
|
|
+ padding: 0 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .operate_box {
|
|
|
|
|
+ padding: 10rpx 32rpx;
|
|
|
|
|
+
|
|
|
|
|
+ /deep/ .u-button {
|
|
|
|
|
+ width: 40%;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|