|
|
@@ -137,6 +137,9 @@
|
|
|
<button :class="['admin-button-com','middle',{ 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="saveCheckOrderFun">
|
|
|
+ 确认
|
|
|
+ </button>
|
|
|
<button v-if="orderSn" :class="['admin-button-com', 'middle', { disabled: allCount == 0 }]" :disabled="allCount == 0" @click="saveCheckOrder">
|
|
|
确认
|
|
|
</button>
|
|
|
@@ -152,7 +155,8 @@ import {
|
|
|
updateCheckOrderApi,
|
|
|
updateCheckOrderToDraftApi,
|
|
|
savaCheckOrderDraftApi,
|
|
|
- getCheckOrderDetailApi
|
|
|
+ getCheckOrderDetailApi,
|
|
|
+ checkOrderApi
|
|
|
} from "@/api/inventory/index";
|
|
|
import {currentShop} from "@/api/shop/index";
|
|
|
export default {
|
|
|
@@ -325,6 +329,29 @@ export default {
|
|
|
delta: 1
|
|
|
});
|
|
|
} catch (error) {}
|
|
|
+ },
|
|
|
+ async saveCheckOrderFun() {
|
|
|
+ try {
|
|
|
+ let params = {
|
|
|
+ remark: this.remark
|
|
|
+ };
|
|
|
+ if (this.orderSn) {
|
|
|
+ params.orderSn = this.orderSn;
|
|
|
+ }
|
|
|
+ let formatList = this.selectList.map(ele => {
|
|
|
+ return {
|
|
|
+ bigNum: ele.bigCount,
|
|
|
+ smallNum: ele.smallCount,
|
|
|
+ productId: ele.id
|
|
|
+ };
|
|
|
+ });
|
|
|
+ params.itemInfo = JSON.stringify(formatList);
|
|
|
+ await checkOrderApi(params);
|
|
|
+ this.$msg("盘点成功");
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: 1
|
|
|
+ });
|
|
|
+ } catch (error) {}
|
|
|
}
|
|
|
}
|
|
|
};
|