|
|
@@ -95,16 +95,15 @@
|
|
|
<text>{{ item.smallNum }}</text>
|
|
|
</view>
|
|
|
<view v-else-if="column.custom == 'inventory'">
|
|
|
- <text v-if="item.bigCount > 0 || item.smallCount > 0">{{
|
|
|
- `${item.bigCount}`
|
|
|
- }}</text>
|
|
|
+ <text v-if="item.bigCount > 0 || item.smallCount > 0">{{`${item.bigCount}`}}</text>
|
|
|
<text >/</text>
|
|
|
<text >{{ item.smallCount?item.smallCount:0 }}</text>
|
|
|
</view>
|
|
|
|
|
|
<view v-else-if="column.custom == 'profit'">
|
|
|
- <text v-if="item.bigNumProfitLoss">{{ item.bigNumProfitLoss?item.bigNumProfitLoss:0 }}/{{item.smallNumProfitLoss?item.smallNumProfitLoss:0}}</text>
|
|
|
- <text v-else>{{ getSelectItemProfitPrice(item) }}</text>
|
|
|
+ <!--<text v-if="item.bigNumProfitLoss">{{ item.bigNumProfitLoss?item.bigNumProfitLoss:0.00 }}/{{item.smallNumProfitLoss?item.smallNumProfitLoss:0.00}}</text>-->
|
|
|
+ <!--<text v-else>{{ getSelectItemProfitPrice(item) }}</text>-->
|
|
|
+ <text>{{ getSelectItemProfitPrice(item) }}</text>
|
|
|
|
|
|
</view>
|
|
|
<text v-else :class="[column.color || '']">
|
|
|
@@ -125,30 +124,13 @@
|
|
|
</view>
|
|
|
<view class="bar-view">
|
|
|
<view class="btn-view">
|
|
|
- <button
|
|
|
- :class="['admin-button-com', 'middle', 'default']"
|
|
|
- @click="gotoSelectPage"
|
|
|
- >
|
|
|
+ <button :class="['admin-button-com', 'middle', 'default']" @click="gotoSelectPage">
|
|
|
继续盘点
|
|
|
</button>
|
|
|
- <button
|
|
|
- :class="[
|
|
|
- 'admin-button-com',
|
|
|
- 'middle',
|
|
|
- 'default',
|
|
|
- { disabled: allCount == 0 }
|
|
|
- ]"
|
|
|
- :disabled="allCount == 0"
|
|
|
- @click="saveToDraft"
|
|
|
- >
|
|
|
+ <button :class="['admin-button-com','middle','default',{ disabled: allCount == 0 }]" :disabled="allCount == 0" @click="saveToDraft">
|
|
|
保存到草稿
|
|
|
</button>
|
|
|
- <button
|
|
|
- v-if="orderSn"
|
|
|
- :class="['admin-button-com', 'middle', { disabled: allCount == 0 }]"
|
|
|
- :disabled="allCount == 0"
|
|
|
- @click="saveCheckOrder"
|
|
|
- >
|
|
|
+ <button v-if="orderSn" :class="['admin-button-com', 'middle', { disabled: allCount == 0 }]" :disabled="allCount == 0" @click="saveCheckOrder">
|
|
|
确认
|
|
|
</button>
|
|
|
</view>
|
|
|
@@ -276,15 +258,15 @@ export default {
|
|
|
bigPrice,
|
|
|
smallPrice
|
|
|
} = item;
|
|
|
- let sum =
|
|
|
- Number(bigCount) * Number(bigPrice) +
|
|
|
- Number(smallCount) * Number(smallPrice);
|
|
|
- price = Math.round(sum * 100) / 100;
|
|
|
- let stockSum =
|
|
|
- Number(bigNum) * Number(bigPrice) + Number(smallNum) * Number(smallPrice);
|
|
|
- let stockPrice = Math.round(stockSum * 100) / 100;
|
|
|
- let diff = stockPrice - price;
|
|
|
- return Math.round(diff * 100) / 100;
|
|
|
+ let bigNumProfitLoss = Number(bigCount) - Number(bigNum);
|
|
|
+ let smallNumProfitLoss = Number(smallCount) - Number(smallNum);
|
|
|
+ // let sum = Number(bigCount) * Number(bigPrice) + Number(smallCount) * Number(smallPrice);
|
|
|
+ // price = Math.round(sum * 100) / 100;
|
|
|
+ // let stockSum = Number(bigNum) * Number(bigPrice) + Number(smallNum) * Number(smallPrice);
|
|
|
+ // let stockPrice = Math.round(stockSum * 100) / 100;
|
|
|
+ let diff = `${bigNumProfitLoss.toFixed(2)}/${smallNumProfitLoss.toFixed(2)}`;
|
|
|
+ // let diff = `${bigNumProfitLoss}/${smallNumProfitLoss}`;
|
|
|
+ return diff;
|
|
|
},
|
|
|
async saveToDraft() {
|
|
|
try {
|