|
|
@@ -63,34 +63,22 @@
|
|
|
class="table-header"
|
|
|
:style="{ backgroundColor: headerBackgroundColor }"
|
|
|
>
|
|
|
- <view
|
|
|
- class="table-th"
|
|
|
- v-for="(item, index) in columns"
|
|
|
- :key="index"
|
|
|
- :style="{
|
|
|
- flex: item.width ? `0 0 ${item.width}rpx` : '1',
|
|
|
+ <view class="table-th" v-for="(item, index) in columns" :key="index"
|
|
|
+ :style="{flex: item.width ? `0 0 ${item.width}rpx` : '1',
|
|
|
textAlign: item.align || 'left',
|
|
|
fontSzie: `${headerFontSize}rpx`,
|
|
|
- margin: `0 ${gutter}rpx`
|
|
|
- }"
|
|
|
- >
|
|
|
+ margin: `0 ${gutter}rpx`}">
|
|
|
<!-- <slot :name="item.dataIndex" > -->
|
|
|
{{ item.name || "" }}
|
|
|
<!-- </slot> -->
|
|
|
</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}rpx` : '1',
|
|
|
+ <view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex"
|
|
|
+ :style="{flex: column.width ? `0 0 ${column.width}rpx` : '1',
|
|
|
textAlign: column.align || 'left',
|
|
|
fontSzie: `${fontSize}rpx`,
|
|
|
- margin: `0 ${gutter}rpx`
|
|
|
- }"
|
|
|
- >
|
|
|
+ margin: `0 ${gutter}rpx`}">
|
|
|
<!-- {{ item[column.dataIndex] || "" }} -->
|
|
|
|
|
|
<view v-if="column.custom == 'icon'" class="list-icon">
|
|
|
@@ -110,12 +98,14 @@
|
|
|
<text v-if="item.bigCount > 0 || item.smallCount > 0">{{
|
|
|
`${item.bigCount}`
|
|
|
}}</text>
|
|
|
- <text v-if="item.smallCount > 0">/</text>
|
|
|
- <text v-if="item.smallCount > 0">{{ `${item.smallCount}` }}</text>
|
|
|
+ <text >/</text>
|
|
|
+ <text >{{ item.smallCount?item.smallCount:0 }}</text>
|
|
|
</view>
|
|
|
|
|
|
<view v-else-if="column.custom == 'profit'">
|
|
|
- <text>{{ getSelectItemProfitPrice(item) }}</text>
|
|
|
+ <text v-if="item.bigNumProfitLoss">{{ item.bigNumProfitLoss?item.bigNumProfitLoss:0 }}/{{item.smallNumProfitLoss?item.smallNumProfitLoss:0}}</text>
|
|
|
+ <text v-else>{{ getSelectItemProfitPrice(item) }}</text>
|
|
|
+
|
|
|
</view>
|
|
|
<text v-else :class="[column.color || '']">
|
|
|
{{ (column.dataIndex && item[column.dataIndex]) || "" }}
|
|
|
@@ -320,6 +310,8 @@ export default {
|
|
|
} = await api(params);
|
|
|
this.orderSn = orderSn;
|
|
|
this.$msg("保存成功");
|
|
|
+ this.resetSelectInfoByType(this.pageType);
|
|
|
+ this.initInfo();
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
async saveCheckOrder() {
|
|
|
@@ -340,6 +332,7 @@ export default {
|
|
|
params.itemInfo = JSON.stringify(formatList);
|
|
|
await updateCheckOrderApi(params);
|
|
|
this.$msg("盘点成功");
|
|
|
+ this.resetSelectInfoByType(this.pageType);
|
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
|
});
|