|
@@ -56,7 +56,7 @@
|
|
|
v-if="record.state=='WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckAuditAudit')"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
- @click="handleExamine(record, true)"
|
|
|
+ @click="handleOk(record, true)"
|
|
|
id="warehousingAudit-adopt-btn">通过</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
@@ -72,7 +72,7 @@
|
|
|
<!-- 详情 -->
|
|
|
<inventoryChecking-detail-modal :openModal="openDetailModal" :itemSn="itemSn" @close="handleDetailClose" />
|
|
|
<!-- 设置成本价 -->
|
|
|
- <setPriceModal ref="setPriceModal" :openModal="openCostPriceModal" @close="openCostPriceModal=false"></setPriceModal>
|
|
|
+ <setPriceModal ref="setPriceModal" @ok="handleOk" :openModal="openCostPriceModal" @close="openCostPriceModal=false"></setPriceModal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -83,7 +83,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
import inventoryCheckingDetailModal from '@/views/inventoryManagement/inventoryChecking/detailModal.vue'
|
|
|
import setPriceModal from './setPriceModal.vue'
|
|
|
-import { checkWarehouseAuditList, checkWarehouseFinanceAudit, checkWarehouseReInventory } from '@/api/checkWarehouse'
|
|
|
+import { checkWarehouseAuditList, checkWarehouseFinanceAudit, checkWarehouseReInventory, queryStockProductCostNull } from '@/api/checkWarehouse'
|
|
|
export default {
|
|
|
name: 'InventoryCheckingList',
|
|
|
components: { STable, VSelect, rangeDate, inventoryCheckingDetailModal, stateIcon, setPriceModal },
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
},
|
|
|
productTotal: null,
|
|
|
openDetailModal: false,
|
|
|
- openCostPriceModal: true,
|
|
|
+ openCostPriceModal: false,
|
|
|
itemSn: null
|
|
|
}
|
|
|
},
|
|
@@ -154,6 +154,18 @@ export default {
|
|
|
this.itemSn = null
|
|
|
this.openDetailModal = false
|
|
|
},
|
|
|
+ handleOk (row, type) {
|
|
|
+ queryStockProductCostNull({ checkWarehouseSn: row.checkWarehouseSn }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ // 设置成本价
|
|
|
+ if (res.data.length) {
|
|
|
+ // 如果有盈亏的产品,没有最近一次入库成本价,需要设置成本价
|
|
|
+ this.setCostPrice(res.data, row)
|
|
|
+ } else {
|
|
|
+ this.handleExamine(row, type)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 审核
|
|
|
handleExamine (row, type) {
|
|
|
const _this = this
|
|
@@ -168,8 +180,6 @@ export default {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|
|
|
_this.spinning = false
|
|
|
- // 如果有盈亏的产品,没有最近一次入库成本价,需要设置成本价
|
|
|
- _this.setCostPrice(res.data)
|
|
|
} else {
|
|
|
_this.spinning = false
|
|
|
}
|
|
@@ -178,10 +188,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 设置成本价
|
|
|
- setCostPrice (data) {
|
|
|
+ setCostPrice (data, row) {
|
|
|
this.openCostPriceModal = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.setPriceModal.setData(data)
|
|
|
+ this.$refs.setPriceModal.setData(data, row)
|
|
|
})
|
|
|
},
|
|
|
// 重盘
|