Compare commits
No commits in common. "baa7abcc77e020c34747eb4581d8550457c36cfa" and "e9fd52f5bd797d6299283b27f8ba5daea9a3612a" have entirely different histories.
baa7abcc77
...
e9fd52f5bd
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="pager.lists" border style="width: 100%; margin-top: 10px">
|
<el-table :data="pager.lists" border style="width: 100%; margin-top: 10px">
|
||||||
<el-table-column prop="id" label="ID" width="120" />
|
<el-table-column prop="id" label="ID" width="120" />
|
||||||
<!-- <el-table-column prop="order_id" label="采购订单id" width="120" /> -->
|
<el-table-column prop="order_id" label="采购订单id" width="120" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="商品名称"
|
label="商品名称"
|
||||||
prop="goods_name"
|
prop="goods_name"
|
||||||
|
@ -61,60 +61,18 @@
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="row.is_adopt === 0 && row.price > 0"
|
v-if="row.is_adopt === 0"
|
||||||
size="small"
|
size="small"
|
||||||
@click="offerGood(row, 0)"
|
@click="offerGood(row)"
|
||||||
>采纳</el-button
|
>采纳</el-button
|
||||||
>
|
>
|
||||||
<span v-if="row.is_storage">已入库</span>
|
<span v-else>商品已采纳</span>
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
v-else-if="row.is_adopt === 1 && row.price > 0"
|
|
||||||
size="small"
|
|
||||||
@click="offerGood(row, 1)"
|
|
||||||
>入库</el-button
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
v-if="row.is_adopt === 0 && row.price == 0"
|
|
||||||
style="color: #e6a23c"
|
|
||||||
>等待供应商报价</span
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="flex mt-4 justify-end">
|
<div class="flex mt-4 justify-end">
|
||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="dialogVisible" title="入库" width="600">
|
|
||||||
<el-descriptions class="margin-top" :column="1" border>
|
|
||||||
<el-descriptions-item label="供应商名称">
|
|
||||||
{{ updateInfo.supplier_name }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="商品名称">
|
|
||||||
{{ updateInfo.goods_name }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="商品报价">
|
|
||||||
¥ {{ updateInfo.price }} / {{ updateInfo.unit_name }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="应入库数量">
|
|
||||||
{{ updateInfo.q_nums }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="实际入库数量">
|
|
||||||
<el-input-number v-model="updateInfo.nums" :step="1" :min="1" />
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="备注">
|
|
||||||
<el-input v-model="updateInfo.notes" type="textarea" placeholder="请输入备注"></el-input>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="goodsOfferUpdate">
|
|
||||||
确认
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -146,39 +104,12 @@ const changeType = (e: any) => {
|
||||||
getLists();
|
getLists();
|
||||||
};
|
};
|
||||||
|
|
||||||
const dialogVisible = ref(false);
|
const offerGood = (row: any) => {
|
||||||
const updateInfo = ref({
|
|
||||||
id: "",
|
|
||||||
type: 0,
|
|
||||||
notes: "", //备注
|
|
||||||
nums: 0,//实际数量
|
|
||||||
q_nums: 0, //应到数量
|
|
||||||
});
|
|
||||||
const offerGood = (row: any, type: number) => {
|
|
||||||
//type:0 采纳,1 入库
|
|
||||||
updateInfo.value = Object.assign(
|
|
||||||
{
|
|
||||||
id: "",
|
|
||||||
type: type,
|
|
||||||
notes: "", //备注
|
|
||||||
nums: 0,
|
|
||||||
},
|
|
||||||
row
|
|
||||||
);
|
|
||||||
if(type==0) return goodsOfferUpdate(); // 采纳时直接成功, 入库弹窗显示数量
|
|
||||||
updateInfo.value.q_nums = row.nums;
|
|
||||||
dialogVisible.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const goodsOfferUpdate = () => {
|
|
||||||
apiOpurchaseclassGoodsOfferUpdate({
|
apiOpurchaseclassGoodsOfferUpdate({
|
||||||
id: updateInfo.value.id,
|
id: row.id,
|
||||||
type: updateInfo.value.type,
|
|
||||||
notes: updateInfo.value.notes, //备注
|
|
||||||
nums: updateInfo.value.nums,
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
getLists();
|
getLists();
|
||||||
dialogVisible.value = false;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
<el-table-column prop="unit_name" label="单位" />
|
<el-table-column prop="unit_name" label="单位" />
|
||||||
<el-table-column prop="nums" label="数量" />
|
<el-table-column prop="nums" label="数量" />
|
||||||
<el-table-column prop="total" label="合计(元)" />
|
<el-table-column prop="total" label="合计(元)" />
|
||||||
<el-table-column prop="nums_count" label="已采纳数量" />
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="子订单" name="order">
|
<el-tab-pane label="子订单" name="order">
|
||||||
|
|
Loading…
Reference in New Issue