fix:供应商管理增加“物料清单”和“采购记录”功能
This commit is contained in:
parent
ca940e773b
commit
5527834271
@ -60,3 +60,19 @@ export function delItemrecpt(recptId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据供应商Id查询物料数据
|
||||||
|
export function getItem(vendorId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/itemrecpt/getItem/' + vendorId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据供应商Id查询采购记录
|
||||||
|
export function getProcurementRecord(vendorId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/itemrecpt/getProcurementRecord/' + vendorId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
78
src/views/mes/md/vendor/components/item.vue
vendored
Normal file
78
src/views/mes/md/vendor/components/item.vue
vendored
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="itemList">
|
||||||
|
<el-table-column label="物料编码" align="center" width="120px" prop="itemCode" />
|
||||||
|
<el-table-column label="物料名称" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="quantityRecived" />
|
||||||
|
<el-table-column label="批次号" align="center" prop="batchCode" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleSkip(scope.row)"
|
||||||
|
v-hasPermi="['mes:md:mditem:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getItem} from "@/api/mes/wm/itemrecpt";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Bom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 物料数据
|
||||||
|
itemList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
optType: undefined,
|
||||||
|
vendorId: undefined
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList(this.vendorId);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOpen(vendorId) {
|
||||||
|
this.getList(vendorId)
|
||||||
|
},
|
||||||
|
/** 获取表格数据 */
|
||||||
|
getList(vendorId) {
|
||||||
|
this.loading = true;
|
||||||
|
getItem(vendorId).then(response => {
|
||||||
|
this.itemList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 点击跳转按钮 */
|
||||||
|
handleSkip(row) {
|
||||||
|
console.log(row, '点击跳转按钮');
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
66
src/views/mes/md/vendor/components/purchase.vue
vendored
Normal file
66
src/views/mes/md/vendor/components/purchase.vue
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="recordList">
|
||||||
|
<el-table-column label="入库编号" align="center" prop="recptCode" width="120px" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="入库名称" align="center" prop="recptName" />
|
||||||
|
<el-table-column label="采购订单号" align="center" prop="poCode" />
|
||||||
|
<el-table-column label="物料编码" align="center" prop="itemCode" width="120px" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="物料名称" align="center" prop="itemName" />
|
||||||
|
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="入库数量" align="center" prop="quantityRecived" :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {getProcurementRecord} from "@/api/mes/wm/itemrecpt";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Bom",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 产品BOM关系表格数据
|
||||||
|
recordList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
optType: undefined,
|
||||||
|
vendorId: undefined
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList(this.vendorId);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleOpen(vendorId) {
|
||||||
|
this.getList(vendorId)
|
||||||
|
},
|
||||||
|
/** 获取表格数据 */
|
||||||
|
getList(vendorId) {
|
||||||
|
this.loading = true;
|
||||||
|
getProcurementRecord(vendorId).then(response => {
|
||||||
|
this.recordList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
24
src/views/mes/md/vendor/index.vue
vendored
24
src/views/mes/md/vendor/index.vue
vendored
@ -181,7 +181,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改供应商对话框 -->
|
<!-- 添加或修改供应商对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" @close="cancel" width="960px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
@ -356,6 +356,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="物料清单" name="item">
|
||||||
|
<Item ref="itemList" :optType="optType" :vendorId="form.vendorId"></Item>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="采购记录" name="purchase">
|
||||||
|
<Purchase ref="PurchaseList" :optType="optType" :vendorId="form.vendorId"></Purchase>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@ -400,11 +408,15 @@ import { listVendor, getVendor, delVendor, addVendor, updateVendor } from "@/api
|
|||||||
import { getBarcodeUrl } from "@/api/mes/wm/barcode";
|
import { getBarcodeUrl } from "@/api/mes/wm/barcode";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
|
import Item from "@/views/mes/md/vendor/components/item.vue";
|
||||||
|
import Purchase from "@/views/mes/md/vendor/components/purchase.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "Vendor",
|
name: "Vendor",
|
||||||
dicts: ['sys_yes_no','mes_vendor_level'],
|
dicts: ['sys_yes_no','mes_vendor_level'],
|
||||||
|
components: { Item, Purchase },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeName: "item",
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
@ -543,6 +555,14 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(tab) {
|
||||||
|
if (tab.name == 'item') {
|
||||||
|
this.$refs.itemList.handleOpen(this.form.vendorId)
|
||||||
|
}
|
||||||
|
if (tab.name == 'purchase') {
|
||||||
|
this.$refs.PurchaseList.handleOpen(this.form.vendorId)
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询供应商列表 */
|
/** 查询供应商列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -554,6 +574,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
this.activeName = "item"
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
@ -629,6 +650,7 @@ export default {
|
|||||||
this.title = "查看供应商";
|
this.title = "查看供应商";
|
||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
this.getBarcodeUrl();
|
this.getBarcodeUrl();
|
||||||
|
this.$refs.itemList.handleOpen(vendorId)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
|
Loading…
Reference in New Issue
Block a user