添加单采购商品入库
This commit is contained in:
parent
baf705de57
commit
7d0a0a1469
|
@ -67,4 +67,9 @@ export function apiBeforehandOrderCartInfoSyncPrice(params: any) {
|
|||
// 设置门店出货
|
||||
export function apiBeforehandOrderCartInfoSetStoreSale(params: any) {
|
||||
return request.post({ url: '/beforehand_order_cart_info/beforehandordercartinfo/setStoreSale', params })
|
||||
}
|
||||
|
||||
// 单个商品入库
|
||||
export function apiBeforehandOrderCartInfoPutInStorage(params: any) {
|
||||
return request.post({ url: '/beforehand_order_cart_info/beforehandordercartinfo/putInStorage', params })
|
||||
}
|
|
@ -19,14 +19,14 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
@click="OclickDialogBuyer"
|
||||
v-perms="['beforehand_order.beforehand_order/oneClickStorage']"
|
||||
class="mb-4"
|
||||
>
|
||||
一键入库
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-table :data="pager.lists" border style="width: 100%; margin-top: 10px">
|
||||
<el-table-column prop="id" label="ID" width="60" />
|
||||
<el-table-column label="商品图片" prop="image" width="120">
|
||||
|
@ -86,7 +86,7 @@
|
|||
<pagination v-if="pager.lists" v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="dialogBuyer" title="入库设置" width="600">
|
||||
<!-- <el-dialog v-model="dialogBuyer" title="入库设置" width="600">
|
||||
<el-form ref="formRef" :model="one_click_storage" label-width="90px">
|
||||
<el-form-item label="仓库">
|
||||
<el-select
|
||||
|
@ -120,7 +120,7 @@
|
|||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-dialog> -->
|
||||
<el-dialog v-model="procureShow" title="采购设置" width="600">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px">
|
||||
<el-form-item label="供应商">
|
||||
|
@ -218,37 +218,43 @@
|
|||
</el-dialog>
|
||||
<el-dialog v-model="storeroomShow" title="分拣设置" width="600">
|
||||
<el-form ref="formRef" :model="storeroom" label-width="90px">
|
||||
<el-form-item label="分拣数量" prop="accept_num">
|
||||
<el-form-item label="仓库">
|
||||
<el-select
|
||||
v-model="storeroom.warehouse_id"
|
||||
placeholder="请选择仓库"
|
||||
size="large"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouse_list"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分拣数量" prop="buyer_nums">
|
||||
<el-input
|
||||
v-model="storeroom.accept_num"
|
||||
v-model="storeroom.buyer_nums"
|
||||
clearable
|
||||
placeholder="请输入分拣数量"
|
||||
:readonly="false"
|
||||
@change="compute"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="毛重" prop="gross_weight">
|
||||
<el-input
|
||||
v-model="storeroom.gross_weight"
|
||||
clearable
|
||||
placeholder="请输入毛重"
|
||||
:readonly="false"
|
||||
@change="compute"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="净重" prop="net_weight">
|
||||
<el-input
|
||||
v-model="storeroom.net_weight"
|
||||
clearable
|
||||
placeholder="请输入净重"
|
||||
:readonly="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="mark">
|
||||
<el-input
|
||||
v-model="storeroom.mark"
|
||||
clearable
|
||||
placeholder="请输入备注"
|
||||
:readonly="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="storeroomShow = false">取消</el-button>
|
||||
<el-button type="primary" @click="setStoreroomInfo"> 确认 </el-button>
|
||||
<el-button type="primary" @click="putInStorage" :disabled="disableClick"> 确认 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -281,7 +287,7 @@ import {
|
|||
apiPurchaseProductOffersetStoreroomInfoTwo,
|
||||
apiPurchaseProductOfferDelete
|
||||
} from '@/api/purchase_product_offer'
|
||||
import { apiBeforehandOrderCartInfoOneClickStorage } from '@/api/beforehand_order_cart_info'
|
||||
import { apiBeforehandOrderCartInfoOneClickStorage, apiBeforehandOrderCartInfoPutInStorage } from '@/api/beforehand_order_cart_info'
|
||||
import { apiWarehouseLists } from '@/api/warehouse'
|
||||
import { apiSupplierLists } from '@/api/supplier'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
|
@ -323,9 +329,9 @@ const storeroom = ref({
|
|||
id: '',
|
||||
bhoid: order_id.value.id,
|
||||
product_id: '',
|
||||
accept_num: '',
|
||||
gross_weight: '',
|
||||
net_weight: ''
|
||||
buyer_nums: '',
|
||||
warehouse_id: '',
|
||||
mark: ''
|
||||
})
|
||||
const productOfferData = ref({
|
||||
id: '',
|
||||
|
@ -374,6 +380,21 @@ const setProcureInfo = () => {
|
|||
getLists()
|
||||
})
|
||||
}
|
||||
|
||||
const putInStorage = () => {
|
||||
try {
|
||||
apiBeforehandOrderCartInfoPutInStorage(storeroom.value).then((res => {
|
||||
storeroomShow.value = false
|
||||
disableClick.value = false
|
||||
getLists()
|
||||
}))
|
||||
} catch (error) {
|
||||
setTimeout(() => {
|
||||
disableClick.value = false
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 库房信息设置
|
||||
*/
|
||||
|
@ -424,6 +445,9 @@ const storeroomClick = (data: any) => {
|
|||
storeroom.value.product_id = data.product_id
|
||||
storeroom.value.accept_num = data.buyer_nums
|
||||
storeroomShow.value = true
|
||||
apiWarehouseLists({}).then((res) => {
|
||||
warehouse_list.value = res.lists
|
||||
})
|
||||
}
|
||||
const productOfferClick = (data: any) => {
|
||||
productOfferData.value.id = data.id
|
||||
|
|
Loading…
Reference in New Issue