This commit is contained in:
磷叶 2025-02-21 10:05:06 +08:00
parent 7585a1c284
commit a841f6038d
7 changed files with 287 additions and 126 deletions

View File

@ -42,3 +42,13 @@ export function delReportProd(id) {
method: 'delete'
})
}
// 刷新单价匹配报表产量
export function refreshPriceMatchReportProd(ids) {
return request({
url: '/yh/reportProd/priceMatch',
method: 'put',
data: ids
})
}

View File

@ -20,11 +20,11 @@
>
<span style="float: left">
{{ item.name | dv}} ({{ item.price | dv }})
<dict-tag :value="item.status" :options="dict.type.price_status" size="mini"/>
<dict-tag :value="item.status" :options="priceStatus" size="mini"/>
</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code | dv}}</span>
</el-option>
<el-option v-if="value == null && options.length == 0" disabled label="请检查" :value="null"/>
<el-option v-if="value == null && options.length == 0" disabled label="无单价" :value="null"/>
<div style="text-align: center; color: #8492a6; font-size: 13px">
{{ total }}条数据
</div>
@ -35,7 +35,6 @@
import { listPrice } from '@/api/yh/price'
export default {
name: 'PriceSelect',
dicts: ['price_status'],
props: {
value: {
type: String,
@ -60,6 +59,10 @@ export default {
query: {
type: Object,
default: () => ({}),
},
priceStatus: {
type: Array,
default: () => [],
}
},
data() {

View File

@ -7,33 +7,40 @@
clearable
size="mini"
style="width: 300px;"
@keyup.enter.native="handleSearch"
@clear="handleSearch"
@input="handleSearch"
@keyup.enter.native="getList"
@clear="getList"
@change="getList"
>
<el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
<el-button slot="append" icon="el-icon-search"></el-button>
</el-input>
<el-row type="flex" style="justify-content: flex-end;align-items: center;">
<div style="font-size: 12px; color: #999; margin-right: 10px;line-height: 1em;">仅看无单价:<el-switch v-model="onlyNoPrice" @change="getList" style="height: 20px" size="mini" /></div>
<div style="font-size: 12px; color: #999; margin-right: 10px;line-height: 1em;">显示图案:<el-switch v-model="showPattern" @change="handleChangeShowPattern" style="height: 20px" size="mini" /></div>
<div style="font-size: 12px; color: #999; margin-right: 10px;line-height: 1em;">自动汇总良品:<el-switch v-model="autoSumNum" style="height: 20px" size="mini" /></div>
<el-button type="text" size="mini" :disabled="rows.length === 0" @click="handleBatchEditUserProduct" icon="el-icon-edit">修改所选员工产量</el-button>
<el-button type="text" size="mini" :disabled="rows.length === 0" @click="handleCopy" icon="el-icon-document-copy">复制所选工序</el-button>
<el-button type="text" size="mini" :disabled="rows.length === 0" @click="handleBatchDel" icon="el-icon-delete">删除所选工序</el-button>
<el-button type="text" size="mini" :disabled="rows.length === 0" @click="handleBatchEditUserProduct" icon="el-icon-edit">批量修改员工产量</el-button>
<el-button type="text" size="mini" :disabled="rows.length === 0" @click="handleCopy" icon="el-icon-document-copy">批量复制</el-button>
<el-button type="text" size="mini" :disabled="rows.length === 0" @click="handleBatchDel" icon="el-icon-delete">批量删除</el-button>
</el-row>
</el-row>
<el-table
:data="filteredProductList"
v-loading="loadLoading"
:element-loading-text="`加载中...第${loadIndex}行/共${loadTotal}行`"
:data="tableData"
size="mini"
stripe
max-height="500px"
:header-cell-style="headerCellStyle"
class="mini-table table-form"
ref="table"
accordion
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" align="center"/>
<el-table-column type="index" min-width="10" align="center" label="#"/>
<el-table-column type="index" min-width="10" align="center" label="#">
<template slot-scope="d">
{{d.$index + (pageNum - 1) * pageSize + 1}}
</template>
</el-table-column>
<table-form-col label="工序名称" prop-prefix="productList" prop="priceName" :rules="rules.productList.priceName" header-icon="el-icon-edit" @click-header="handleBatchEdit('priceName')">
<el-input slot-scope="d" v-model="d.row.priceName" placeholder="请输入工序名称" @change="selectPrice(d.index)" />
</table-form-col>
@ -43,7 +50,7 @@
<table-form-col label="大小" prop-prefix="productList" prop="priceSize" width="60" :rules="rules.productList.priceSize" header-icon="el-icon-edit" @click-header="handleBatchEdit('priceSize')">
<el-input slot-scope="d" v-model="d.row.priceSize" placeholder="请输入大小" @change="selectPrice(d.index)" />
</table-form-col>
<table-form-col label="图案" v-if="showPattern" prop-prefix="productList" width="100" prop="pricePattern" :rules="rules.productList.pricePattern" header-icon="el-icon-edit" @click-header="handleBatchEdit('pricePattern')">
<table-form-col :label="showPattern ? '图案' : ''" prop-prefix="productList" :width="showPattern ? '100' : '0'" prop="pricePattern" :rules="rules.productList.pricePattern" header-icon="el-icon-edit" @click-header="handleBatchEdit('pricePattern')">
<el-input slot-scope="d" v-model="d.row.pricePattern" placeholder="请输入图案" @change="selectPrice(d.index)" />
</table-form-col>
<table-form-col label="成品" prop-prefix="productList" prop="isEnd" :rules="rules.productList.isEnd" required width="60">
@ -91,7 +98,7 @@
</table-form-col>
<el-table-column label="操作" align="center" width="120">
<template #header>
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd" >新增工序</el-button>
<el-button size="small" icon="el-icon-plus" type="text" @click="handleAdd">新增工序</el-button>
</template>
<template slot-scope="d">
<el-button
@ -112,15 +119,9 @@
icon="el-icon-document-copy"
size="small"
>复制</el-button>
<!-- <el-button
type="text"
@click="handleDel(d.$index, d.row)"
icon="el-icon-delete"
size="small"
style="color: #f56c6c;"
>删除</el-button> -->
</template>
</el-table-column>
<el-table-column type="expand" width="20" align="left">
<template slot-scope="d">
<div class="expand-container">
@ -150,6 +151,16 @@
</el-table-column>
</el-table>
<!-- TODO 分页 -->
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
@pagination="getList"
/>
<user-product-batch-dialog
:show.sync="showUserEditDialog"
@submit="onSubmitUserProductBatch"
@ -172,7 +183,7 @@ import PriceSelect from '@/components/Business/Price/PriceSelect.vue'
export default {
name: "ReportProductList",
dicts: ['price_type', 'surface', 'color_code'],
dicts: ['price_type', 'surface', 'color_code', 'price_status'],
components: { HoverShow, BooleanTag, TableFormCol, ReportProductUserList, ReportProductOrderList, UserProductBatchDialog, PriceSelect},
props: {
form: {
@ -193,12 +204,13 @@ export default {
},
data() {
return {
onlyNoPrice: false, //
tableData: [],
headerCellStyle: {
backgroundColor: "#f5f7fa",
},
rows: [], //
searchKey: '', //
filteredProductList: [], //
showUserEditDialog: false, //
fieldMap: { //
surface: '表面处理',
@ -210,7 +222,20 @@ export default {
priceName: '工序',
},
autoSumNum: true, //
showPattern: false, //
showPattern: true, //
searchTimer: null,
patternChangeTimer: null, //
isPatternChanging: false, //
expandedRows: new Set(), //
cachedComponents: {}, //
total: 0, //
pageNum: 1, //
pageSize: 20, //
loadLoading: false, //
loadIndex: 0, //
loadTotal: 0, //
loadInterval: null, //
}
},
computed: {
@ -229,10 +254,83 @@ export default {
}
},
created() {
this.handleSearch();
this.showPattern = localStorage.getItem("report_show_pattern") == "true";
this.getList();
},
mounted() {
this.showPattern = localStorage.getItem("report_show_pattern") === "true";
},
methods: {
getList() {
if (this.loadLoading) {
return;
}
let filteredList = [];
if (this.searchKey == null || this.searchKey === '') {
filteredList = this.form.productList;
} else {
// 使
const searchRegex = new RegExp(this.searchKey, 'i');
filteredList = this.form.productList.filter(item => {
return searchRegex.test(item.priceName) ||
searchRegex.test(item.priceCode) ||
searchRegex.test(item.priceCategory) ||
searchRegex.test(item.priceSize) ||
searchRegex.test(item.pricePattern);
});
}
if (this.onlyNoPrice) {
filteredList = filteredList.filter(item => {
return item.priceId == null;
});
}
this.total = filteredList.length;
//
const start = (this.pageNum - 1) * this.pageSize;
const end = start + this.pageSize;
// 使Array.from,
const data = Array.from({length: Math.min(this.pageSize, filteredList.length - start)},
(_, i) => filteredList[start + i]);
this.loadLoading = true;
this.loadIndex = 0;
this.loadTotal = data.length;
let batchSize = 1; //
let timeout = 50; //
// tableDatadata
if (this.tableData.length == this.loadTotal) {
batchSize = this.pageSize;
timeout = 10;
}
// 使setTimeout
const loadNextBatch = () => {
for(let i = 0; i < batchSize && this.loadIndex <= this.loadTotal; i++) {
const item = data[this.loadIndex];
if (item) {
// ,push
this.$set(this.tableData, this.loadIndex, item);
}
this.loadIndex++;
}
// ,
if (this.loadIndex >= this.loadTotal) {
// tableData,
if (this.tableData.length > this.loadTotal) {
this.tableData.splice(this.loadTotal);
}
this.loadLoading = false;
} else {
setTimeout(loadNextBatch, timeout);
}
};
setTimeout(loadNextBatch, 100);
},
handleChangeShowPattern(val) {
localStorage.setItem("report_show_pattern", val);
},
@ -240,6 +338,7 @@ export default {
selectPrice(index) {
this.$refs[`priceSelect${index}`].getOptionsAndSelectFirst();
},
//
handleDetail(row) {
//
this.$refs.table.toggleRowExpansion(row);
@ -368,7 +467,6 @@ export default {
}
})
this.$message.success(`批量编辑成功,一共修改了${this.rows.length}行数据`);
this.handleSearch();
})
},
//
@ -386,26 +484,49 @@ export default {
}).then(({ value }) => {
for (let i = 0; i < value; i++) {
for (let j = 0; j < this.rows.length; j++) {
this.doCopy(null, this.rows[j]);
this.form.productList.push(this.getCopyData(null, this.rows[j]));
}
}
this.$message.success(`复制成功,一共复制了${value * this.rows.length}行工序`);
// ,getList
if (Math.ceil(this.total / this.pageSize) === this.pageNum) {
this.getList();
}
})
},
//
doCopy(index, row) {
//
getCopyData(index, row) {
let data = JSON.parse(JSON.stringify(row));
// ID
data.id = null;
if (data.userProdList != null) {
data.userProdList.forEach(item => {
item.id = null;
})
}
if (data.orderProdList != null) {
data.orderProdList.forEach(item => {
item.id = null;
})
}
//
if (index == null) {
data.sort = this.getNewSort();
} else {
data.sort = row.sort + 1;
}
return data;
},
doCopy(index, row) {
let data = this.getCopyData(index, row);
for (let i = index + 1 ; i < this.form.productList.length; i ++) {
this.form.productList[i].sort ++;
}
}
this.form.productList.push(data);
this.handleSearch();
this.reorder();
this.getList();
},
//
handleSelectionChange(selection) {
@ -414,9 +535,13 @@ export default {
isEmpty,
//
handleAdd() {
this.form.productList.push(this.getNewRow());
this.handleSearch();
this.reorder();
let row = this.getNewRow();
this.form.productList.push(row);
this.total ++;
// ,
if (Math.ceil(this.total / this.pageSize) <= this.pageNum) {
this.tableData.push(row);
}
},
//
getNewRow() {
@ -502,23 +627,9 @@ export default {
}
this.$message.success(`删除成功,一共删除了${this.rows.length}行工序`);
this.rows = [];
this.handleSearch();
this.getList();
});
},
handleSearch() {
if (!this.searchKey) {
this.filteredProductList = this.form.productList;
return;
}
const key = this.searchKey.toLowerCase();
this.filteredProductList = this.form.productList.filter(item => {
const priceName = (item.priceName || '').toLowerCase();
const priceCode = (item.priceCode || '').toLowerCase();
const surface = (item.surface || '').toLowerCase();
const color = (item.color || '').toLowerCase();
return priceName.includes(key) || priceCode.includes(key) || surface.includes(key) || color.includes(key);
});
}
}
}
</script>

View File

@ -37,12 +37,15 @@
</form-col>
</el-row>
<el-tabs v-if="init">
<el-tabs v-if="init" >
<el-tab-pane :label="`工序产量 (${form.productList.length}) `">
<report-product-list :form="form" :rules="rules" />
<report-product-list
ref="productList"
:form="form"
:rules="rules"
/>
</el-tab-pane>
</el-tabs>
</el-form>
</div>
@ -97,9 +100,6 @@ export default {
{ required: true, message: "报表日期不能为空", trigger: "blur" }
],
productList: {
priceId: [
{ required: true, message: "工序不能为空", trigger: "blur" }
],
isEnd: [
{ required: true, message: "是否成品不能为空", trigger: "blur" }
],
@ -127,6 +127,11 @@ export default {
autoSaveInterval: null,
saveTime: null,
init: false,
loadLoading: false, //
loadIndex: 0, //
loadTotal: 0, //
loadInterval: null, //
}
},
computed: {
@ -184,8 +189,10 @@ export default {
// 10
if (this.autoSaveInterval == null) {
this.autoSaveInterval = setInterval(() => {
if (this.form != null) {
this.saveTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}');
localStorage.setItem('report', JSON.stringify(this.form));
}
}, 1000 * 10);
}
},
@ -202,7 +209,11 @@ export default {
},
//
getLocalSave() {
return JSON.parse(localStorage.getItem('report'));
let save = localStorage.getItem('report');
if (save == null) {
return null;
}
return JSON.parse(save);
},
handleEditProduct(row, index) {
this.row = row;
@ -232,9 +243,12 @@ export default {
getReport(reportId, {needProductList: true, needUserProd: true, needOrderProd: true}).then(response => {
this.form = response.data;
this.init = true;
}).catch(error => {
this.$modal.msgError("获取数据失败");
console.error(error);
}).finally(() => {
this.loading = false;
})
});
},
submitForm(submit) {
this.$refs["form"].validate(valid => {
@ -301,17 +315,13 @@ export default {
}
}
return null;
}
},
}
}
</script>
<style lang="scss" scoped>
.report-edit-container {
height: 100%;
display: flex;
flex-direction: column;
padding-bottom: 32px;
.edit-header {
flex-shrink: 0;
@ -319,7 +329,7 @@ export default {
.edit-container {
padding: 16px;
padding-bottom: 232px;
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div>
<template v-for="(item, index) of data">
<el-descriptions border :column="4" >
<el-descriptions border :column="4" size="mini">
<el-descriptions-item :key="item.id" label="生产订单" :span="2">{{item.orderErpBillNo | dv}}</el-descriptions-item>
<el-descriptions-item :key="item.id" label="本次提交产量">{{item.num | fix2 | dv}} {{priceUnit}}</el-descriptions-item>
<el-descriptions-item :key="item.id" label="订单进度">

View File

@ -1,5 +1,5 @@
<template>
<el-descriptions border>
<el-descriptions border size="mini">
<template v-for="(item, index) of data">
<el-descriptions-item :key="item.id" label="员工">{{item.userName | dv}}</el-descriptions-item>
<el-descriptions-item :key="item.id" label="产量">{{item.num | dv}} {{priceUnit}}</el-descriptions-item>

View File

@ -1,6 +1,6 @@
<template>
<div :class="listConfig.containerClass">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" v-show="showSearch" label-width="68px">
<search-form-item
v-for="item of searchColumns"
:key="item.key"
@ -12,6 +12,13 @@
:dict="dict"
@query="handleQuery"
/>
<el-form-item label="单价">
<el-radio-group v-model="queryParams.priceMatch" @change="handleQuery">
<el-radio-button :label="null">全部</el-radio-button>
<el-radio-button :label="true">有单价</el-radio-button>
<el-radio-button :label="false">无单价</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -41,6 +48,17 @@
<!-- v-has-permi="['yh:reportProd:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-refresh"
size="mini"
:disabled="multiple"
@click="handleRefreshPriceMatchReportProd"
v-has-permi="['yh:reportProd:priceMatch']"
>刷新单价</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
@ -73,7 +91,7 @@
<el-table-column type="expand" width="20" align="left" fixed="left">
<template slot-scope="d">
<div class="expand-container">
<el-descriptions border>
<el-descriptions border size="mini">
<el-descriptions-item label="类别">{{d.row.priceCategory | dv}}</el-descriptions-item>
<el-descriptions-item label="大小">{{d.row.priceSize | dv}}</el-descriptions-item>
<el-descriptions-item label="图案">{{d.row.pricePattern | dv}}</el-descriptions-item>
@ -114,17 +132,27 @@
<dict-tag :value="d.row.priceType" :options="dict.type.price_type"/>
</template>
<template v-else-if="column.key === 'isEnd'">
<boolean-tag :value="d.row.isEnd"/>
<boolean-tag :value="d.row.isEnd" size="mini"/>
</template>
<template v-else-if="column.key === 'reportStatus'">
<dict-tag :value="d.row.reportStatus" :options="dict.type.report_status"/>
<dict-tag :value="d.row.reportStatus" :options="dict.type.report_status" size="mini"/>
</template>
<template v-else-if="column.key === 'priceStatus'">
<dict-tag :value="d.row.priceStatus" :options="dict.type.price_status"/>
<template v-else-if="column.key === 'num'">
{{d.row[column.key] | dv}} {{d.row.priceUnit | dv}}
</template>
<template v-else-if="['totalAmount', 'pricePrice'].includes(column.key)">
<template v-else-if="['totalAmount'].includes(column.key)">
{{d.row[column.key] | dv}}
</template>
<template v-else-if="['pricePrice'].includes(column.key)">
<template v-if="d.row.priceId">
{{d.row[column.key] | dv}}
<dict-tag :value="d.row.priceStatus" :options="dict.type.price_status" size="mini"/>
</template>
<span v-else style="color: red;">
暂无单价
</span>
</template>
<template v-else-if="['num','defectNum'].includes(column.key)">
{{d.row[column.key] | dv}}
</template>
@ -134,24 +162,18 @@
</template>
</el-table-column>
</template>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-has-permi="['yh:reportProd:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-has-permi="['yh:reportProd:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-has-permi="['yh:report:edit']"
v-show="ReportStatus.canEdit(scope.row.reportStatus)"
>修改报表</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -222,7 +244,7 @@
</template>
<script>
import {addReportProd, delReportProd, getReportProd, listReportProd, updateReportProd} from "@/api/yh/reportProd";
import {addReportProd, delReportProd, getReportProd, listReportProd, updateReportProd, refreshPriceMatchReportProd} from "@/api/yh/reportProd";
import {$listConfig, $showColumns, $showSearch} from '@/utils/mixins';
import FormCol from "@/components/FormCol/index.vue";
import SearchFormItem from "@/components/SearchFormItem/index.vue";
@ -232,6 +254,7 @@ import ReportUserProdDescriptions from "@/views/yh/reportProd/components/ReportU
import {formatFraction, isEmpty} from "@/utils";
import ReportOrderProdDescriptions from "@/views/yh/reportProd/components/ReportOrderProdDescriptions.vue";
import BooleanTag from '@/components/BooleanTag/index.vue'
import {ReportStatus} from "@/utils/constants";
//
const defaultSort = {
@ -254,6 +277,7 @@ export default {
},
data() {
return {
ReportStatus,
expandCustomConfig: {
containerClass: null,
showSearch: false,
@ -265,11 +289,10 @@ export default {
searchColumns: [
{key: 'reportId', label: "报表编号", type: 'input', dictType: null},
{key: 'reportStatus', label: "报表状态", type: 'dict', dictType: 'report_status'},
{key: 'priceDeptId', label: "车间", type: 'dept', dictType: null},
{key: 'deptId', label: "车间", type: 'dept', dictType: null},
{key: 'reportDateRange', label: "报表日期", type: 'daterange', dictType: null},
{key: 'priceName', label: "工序", type: 'input', dictType: null},
{key: 'priceSubName', label: "子工序", type: 'input', dictType: null},
{key: 'priceType', label: "类型", type: 'dict', dictType: 'price_type'},
{key: 'priceCategory', label: "类别", type: 'input', dictType: null},
{key: 'priceSize', label: "大小", type: 'input', dictType: null},
{key: 'pricePattern', label: "图案", type: 'input', dictType: null},
@ -280,25 +303,24 @@ export default {
span: 24,
//
columns: [
{key: 'id', visible: true, label: '编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'reportId', visible: true, label: '报表编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'reportStatus', visible: true, label: '报表状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'priceDeptName', visible: true, label: '车间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'id', visible: false, label: '编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'reportId', visible: false, label: '报表', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'deptName', visible: true, label: '车间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'reportDate', visible: true, label: '日期', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'reportStatus', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'priceName', visible: true, label: '工序', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceStatus', visible: true, label: '单价状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'priceSubName', visible: true, label: '子工序', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'priceCategory', visible: true, label: '类别', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceSize', visible: true, label: '大小', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'pricePattern', visible: true, label: '图案', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceSubName', visible: false, label: '子工序', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'priceType', visible: false, label: '类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'isEnd', visible: true, label: '成品', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'surface', visible: false, label: '表面处理', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'color', visible: false, label: '颜色', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'num', visible: true, label: '良品', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'defectNum', visible: false, label: '不良品', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'priceUnit', visible: true, label: '单位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'pricePrice', visible: true, label: '单价', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'totalAmount', visible: true, label: '总价', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceCategory', visible: false, label: '类别', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceSize', visible: false, label: '大小', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'pricePattern', visible: false, label: '图案', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceSpec', visible: false, label: '规格', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceClassify', visible: false, label: '分类', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'priceQuantity', visible: false, label: '倍数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
@ -346,7 +368,8 @@ export default {
priceClassify: null,
priceQuantity: null,
deleted: null,
priceType: null
priceType: null,
priceMatch: null,
},
//
form: {},
@ -390,6 +413,16 @@ export default {
this.getList();
},
methods: {
handleRefreshPriceMatchReportProd() {
refreshPriceMatchReportProd(this.ids).then(response => {
if (response.code === 200 && response.data > 0) {
this.$modal.msgSuccess("刷新成功,刷新了" + response.data + "条数据");
this.getList();
} else {
this.$modal.msgError("刷新失败");
}
})
},
formatFraction,
isEmpty,
calcMulDecimal,
@ -469,13 +502,7 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getReportProd(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改报表产量";
});
this.$router.push(`/edit/report/${row.reportId}`)
},
/** 提交按钮 */
submitForm() {