|
@@ -1,10 +1,8 @@
|
|
<template>
|
|
<template>
|
|
<view class="partList-box">
|
|
<view class="partList-box">
|
|
<view class="partList-title flex align_center justify_between">
|
|
<view class="partList-title flex align_center justify_between">
|
|
- <text>配件列表</text>
|
|
|
|
- <view>
|
|
|
|
- {{list.length}}款,共<text>{{totalNums}}</text>件
|
|
|
|
- </view>
|
|
|
|
|
|
+ <text>{{title}}</text>
|
|
|
|
+ <view>{{list.length}}款,共<text>{{totalNums}}</text>件</view>
|
|
</view>
|
|
</view>
|
|
<view class="partList-list">
|
|
<view class="partList-list">
|
|
<view class="partList-list-box" v-for="item in partList" :key="item.id">
|
|
<view class="partList-list-box" v-for="item in partList" :key="item.id">
|
|
@@ -12,41 +10,52 @@
|
|
<view class="checkbox" v-if="model == 'checkbox'"><u-checkbox v-model="item.checked" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox></view>
|
|
<view class="checkbox" v-if="model == 'checkbox'"><u-checkbox v-model="item.checked" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox></view>
|
|
<view class="flex align_center flex_1">
|
|
<view class="flex align_center flex_1">
|
|
<view class="pimgs">
|
|
<view class="pimgs">
|
|
- <u-image width="128" height="128" border-radius="10"></u-image>
|
|
|
|
|
|
+ <u-image :src="item.product&&item.product.productMsg?item.product.productMsg:`../../static/${theme}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
|
|
</view>
|
|
</view>
|
|
<view class="pinfo">
|
|
<view class="pinfo">
|
|
- <view class="pname">
|
|
|
|
- {{item.productName}}
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="pname" v-if="pageType=='replenishmentSign'">{{item.product&&item.product.name?item.product.name:'--'}}</view>
|
|
|
|
+ <view class="pname" v-else>{{item.productName}}</view>
|
|
<view class="ptxt flex align_center justify_between">
|
|
<view class="ptxt flex align_center justify_between">
|
|
<view>
|
|
<view>
|
|
- <text class="pcode">{{item.productCode}}</text>
|
|
|
|
|
|
+ <text class="pcode" v-if="pageType=='replenishmentSign'">{{item.product&&item.product.code?item.product.code:'--'}}</text>
|
|
|
|
+ <text class="pcode" v-else>{{item.productCode}}</text>
|
|
</view>
|
|
</view>
|
|
- <view v-if="pageType=''">
|
|
|
|
- 数量:<text class="pnums">{{item.qty}}个</text>
|
|
|
|
|
|
+ <view v-if="pageType=='replenishmentSign'">
|
|
|
|
+ 实发数量:<text class="pnums">{{item.confirmQty}}个</text>
|
|
</view>
|
|
</view>
|
|
- <view v-if="pageType='recall'">
|
|
|
|
|
|
+ <view v-if="pageType=='recall'">
|
|
调回数量:<text class="pnums">{{item.qty}}个</text>
|
|
调回数量:<text class="pnums">{{item.qty}}个</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 有复选框 -->
|
|
<view v-if="model == 'checkbox'" class="ptools flex align_center justify_between">
|
|
<view v-if="model == 'checkbox'" class="ptools flex align_center justify_between">
|
|
<view></view>
|
|
<view></view>
|
|
- <view class="pcurnums flex align_center" v-if="pageType=''">
|
|
|
|
|
|
+ <view class="pcurnums flex align_center" v-if="pageType==''">
|
|
<text>数量</text>
|
|
<text>数量</text>
|
|
<view class="u-ninput">
|
|
<view class="u-ninput">
|
|
<u-number-box color="#000" bg-color="#fff" v-model="item.retQty" :min="1" :max="item.qty"></u-number-box>
|
|
<u-number-box color="#000" bg-color="#fff" v-model="item.retQty" :min="1" :max="item.qty"></u-number-box>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="pcurnums flex align_center" v-if="pageType='recall'">
|
|
|
|
|
|
+ <view class="pcurnums flex align_center" v-if="pageType=='recall'">
|
|
<text>实退数量</text>
|
|
<text>实退数量</text>
|
|
<view class="u-ninput">
|
|
<view class="u-ninput">
|
|
<u-number-box color="#000" bg-color="#fff" v-model="item.quitQty" :min="1" :max="item.qty"></u-number-box>
|
|
<u-number-box color="#000" bg-color="#fff" v-model="item.quitQty" :min="1" :max="item.qty"></u-number-box>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 无复选框 -->
|
|
|
|
+ <view v-if="model == 'view'" class="ptools flex align_center justify_between">
|
|
|
|
+ <view></view>
|
|
|
|
+ <view class="pcurnums flex align_center" v-if="pageType=='replenishmentSign'">
|
|
|
|
+ <text>入库数量</text>
|
|
|
|
+ <view class="u-ninput">
|
|
|
|
+ <u-number-box color="#000" bg-color="#fff" v-model="item.putQty" @change="numberChange" :min="0" :max="item.confirmQty"></u-number-box>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="nodata" v-if="list.length==0">
|
|
<view class="nodata" v-if="list.length==0">
|
|
<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="120" :text="noDataText" img-width="120" mode="list"></u-empty>
|
|
<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="120" :text="noDataText" img-width="120" mode="list"></u-empty>
|
|
@@ -77,7 +86,7 @@
|
|
type: String,
|
|
type: String,
|
|
default: 'checkbox'
|
|
default: 'checkbox'
|
|
},
|
|
},
|
|
- // 那个功能页面调用,展示不同的字段,recall: 调回单,
|
|
|
|
|
|
+ // 那个功能页面调用,展示不同的字段,recall: 调回单,replenishmentSign:补货签收
|
|
fromPage: {
|
|
fromPage: {
|
|
type: String,
|
|
type: String,
|
|
default: ''
|
|
default: ''
|
|
@@ -85,8 +94,13 @@
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
list(newValue, oldValue) {
|
|
list(newValue, oldValue) {
|
|
|
|
+ const _this = this
|
|
newValue.map(item => {
|
|
newValue.map(item => {
|
|
- this.totalNums = this.totalNums + item.qty
|
|
|
|
|
|
+ if(_this.pageType=='replenishmentSign'){ // 补货签收
|
|
|
|
+ this.totalNums = this.totalNums + item.putQty
|
|
|
|
+ }else{
|
|
|
|
+ this.totalNums = this.totalNums + item.qty
|
|
|
|
+ }
|
|
item.quitQty = item.qty
|
|
item.quitQty = item.qty
|
|
item.checked = false
|
|
item.checked = false
|
|
})
|
|
})
|
|
@@ -94,11 +108,15 @@
|
|
this.pageType = this.fromPage
|
|
this.pageType = this.fromPage
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ onLoad() {
|
|
|
|
+ this.theme = getApp().globalData.theme
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
partList: this.list,
|
|
partList: this.list,
|
|
totalNums: 0,
|
|
totalNums: 0,
|
|
- pageType: this.fromPage
|
|
|
|
|
|
+ pageType: this.fromPage,
|
|
|
|
+ theme: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -127,6 +145,10 @@
|
|
// 获取所有数据
|
|
// 获取所有数据
|
|
getAllData(){
|
|
getAllData(){
|
|
return this.partList
|
|
return this.partList
|
|
|
|
+ },
|
|
|
|
+ // 数量 change
|
|
|
|
+ numberChange(value, index){
|
|
|
|
+ this.$emit('numberChange', value, index)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|