|
|
|
@ -82,6 +82,7 @@
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="bpprocureList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="id" align="center" prop="id" v-if="false" />
|
|
|
|
|
<el-table-column label="采购单号" align="center" prop="procureCode" />
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" />
|
|
|
|
@ -91,30 +92,6 @@
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
|
<el-table-column label="价格" align="center" prop="price" />
|
|
|
|
|
|
|
|
|
|
<el-table-column label="计划时间" align="center" prop="attr1" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.attr1, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<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="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['wms:bpprocure:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['wms:bpprocure:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
@ -298,7 +275,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.ID)
|
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
@ -311,7 +288,7 @@ export default {
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const ID = row.ID || this.ids
|
|
|
|
|
const ID = row.id || this.ids
|
|
|
|
|
getBpprocure(ID).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
@ -340,7 +317,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
handlePrint() {
|
|
|
|
|
// 获取选中数据
|
|
|
|
|
const selectedData = this.bpprocureList.filter(item => this.ids.includes(item.ID));
|
|
|
|
|
const selectedData = this.bpprocureList.filter(item => this.ids.includes(item.id));
|
|
|
|
|
if (selectedData.length === 0) {
|
|
|
|
|
this.$message.warning("请先选择要打印的记录");
|
|
|
|
|
return;
|
|
|
|
@ -415,9 +392,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const IDs = row.ID || this.ids;
|
|
|
|
|
const IDs = row.id || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除白坯原材料采购单编号为"' + IDs + '"的数据项?').then(function() {
|
|
|
|
|
return delBpprocure(IDs);
|
|
|
|
|
return delBpprocure(JSON.stringify(IDs));
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|