|
|
@@ -5,45 +5,33 @@
|
|
|
<block v-if="!$util.isEmpty(selectList)">
|
|
|
<view class="table-view">
|
|
|
<view class="table-header" >
|
|
|
- <view class="table-th" v-for="(item, index) in columns" :key="index" :style="{flex: item.width ? `0 0 ${item.width}upx` : '1', textAlign: item.align || 'left', }">
|
|
|
- {{ item.name || "" }}
|
|
|
- </view>
|
|
|
+ <view class="table-th" style="width:330upx;">名称</view>
|
|
|
+ <view class="table-th" style="width:150upx;">盘点前</view>
|
|
|
+ <view class="table-th" style="width:150upx;">盘点后</view>
|
|
|
</view>
|
|
|
<view class="table-tr" v-for="(item, index) in selectList" :key="index">
|
|
|
- <view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex" :style="{flex: column.width ? `0 0 ${column.width}upx` : '1', textAlign: column.align || 'left', }">
|
|
|
- <view v-if="column.custom == 'icon'" class="list-icon">
|
|
|
+ <view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex">
|
|
|
+ <view v-if="column.custom == 'icon'" class="list-icon" style="width:330upx;">
|
|
|
<image class="icon-image" :src="item.cover" />
|
|
|
- <view class="icon-info">
|
|
|
- <view class="info-name">
|
|
|
- {{ item.itemName }}
|
|
|
- </view>
|
|
|
- <view class="info-type"></view>
|
|
|
- </view>
|
|
|
+ <view class="icon-info"> <view class="info-name"> {{ item.itemName }} </view> </view>
|
|
|
</view>
|
|
|
- <view v-else-if="column.custom == 'stock'">
|
|
|
+ <view v-else-if="column.custom == 'stock'" style="width:150upx;">
|
|
|
<text v-if="Number(item.bigNum)>0">{{ `${item.bigNum}` }}扎</text>
|
|
|
<text v-if="Number(item.smallNum)>0">{{ item.smallNum }}支</text>
|
|
|
</view>
|
|
|
- <view v-else-if="column.custom == 'inventory'">
|
|
|
- <text v-if="Number(item.bigCount)>0">{{`${item.bigCount}`}}扎</text>
|
|
|
+ <view v-else-if="column.custom == 'inventory'" style="width:150upx;">
|
|
|
+ <text v-if="Number(item.bigCount)>0">{{item.bigCount==99999?0:item.bigCount}}扎</text>
|
|
|
<text v-if="Number(item.smallCount)>0">{{ item.smallCount }}支</text>
|
|
|
</view>
|
|
|
-
|
|
|
- <view v-else-if="column.custom == 'profit'">
|
|
|
- <text>{{ getSelectItemProfitPrice(item) }}</text>
|
|
|
- </view>
|
|
|
- <text v-else :class="[column.color || '']">
|
|
|
- {{ (column.dataIndex && item[column.dataIndex]) || "" }}
|
|
|
- </text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
- <view class="empty-view">
|
|
|
+ <view>
|
|
|
<button class="admin-button-com blue middle"
|
|
|
- style="margin:5upx 0 5upx 30upx;" @click="gotoSelectPage">返回修改</button>
|
|
|
+ style="margin:12upx 0 5upx 30upx;" @click="gotoSelectPage">返回修改</button>
|
|
|
<button class="admin-button-com blue middle"
|
|
|
- style="margin:5upx 0 5upx 40upx;" @click="removeFromSave(0)">清空花材</button>
|
|
|
+ style="margin:12upx 0 5upx 40upx;" @click="removeFromSave(0)">清空花材</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="space-view ex-info">
|
|
|
@@ -136,28 +124,14 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
gotoSelectPage() {
|
|
|
- let type = this.option.type ? this.option.type: ''
|
|
|
- uni.navigateTo({ url:"/pagesStorehouse/inventory/select?type="+type,type:2})
|
|
|
+ let pdType = this.option.pdType ? this.option.pdType: ''
|
|
|
+ uni.navigateTo({ url:"/pagesStorehouse/inventory/select?pdType="+pdType,type:2})
|
|
|
},
|
|
|
getInfo(){
|
|
|
return currentShop().then(res => {
|
|
|
this.shopInfo = res.data
|
|
|
})
|
|
|
},
|
|
|
- //获取当前选中商品总价
|
|
|
- getSelectItemProfitPrice(item) {
|
|
|
- const { bigCount, smallCount, bigNum, smallNum} = item
|
|
|
- let bigNumProfitLoss = Number(bigCount) - Number(bigNum)
|
|
|
- let smallNumProfitLoss = Number(smallCount) - Number(smallNum)
|
|
|
- let diff = ''
|
|
|
- if(Number(bigNumProfitLoss)!=0){
|
|
|
- diff += `${bigNumProfitLoss}扎`
|
|
|
- }
|
|
|
- if(Number(smallNumProfitLoss)!=0){
|
|
|
- diff+= `/${smallNumProfitLoss}支`
|
|
|
- }
|
|
|
- return diff;
|
|
|
- },
|
|
|
async saveToDraft() {
|
|
|
let api = savaCheckOrderDraftApi;
|
|
|
if (this.orderSn) {
|
|
|
@@ -254,8 +228,9 @@ export default {
|
|
|
/deep/.list-icon {
|
|
|
display: flex;
|
|
|
.icon-image {
|
|
|
- width: 80upx;
|
|
|
- height: 80upx;
|
|
|
+ width: 40upx;
|
|
|
+ height: 40upx;
|
|
|
+ border-radius: 10upx;
|
|
|
margin-right: 20upx;
|
|
|
}
|
|
|
.icon-info {
|