debug
This commit is contained in:
parent
6131dba97a
commit
7223ceca8a
|
@ -39,6 +39,9 @@
|
|||
</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="materialNumber">
|
||||
<el-input v-model="queryParams.materialNumber" placeholder="请输入物料编码" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格" prop="materialCategory">
|
||||
<el-input v-model="queryParams.materialCategory" placeholder="请输入物料规格" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
|
@ -51,6 +54,9 @@
|
|||
<el-form-item label="盖子方式" prop="materialCover">
|
||||
<el-input v-model="queryParams.materialCover" placeholder="请输入物料盖子方式" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图案" prop="materialGraphics">
|
||||
<el-input v-model="queryParams.materialGraphics" placeholder="请输入物料图案" clearable @keyup.enter.native="handleQuery"/>
|
||||
</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>
|
||||
|
@ -129,7 +135,6 @@ import BooleanTag from "@/components/BooleanTag/index.vue";
|
|||
import Price from "@/views/yh/price/index.vue";
|
||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||
import {$showColumns} from "@/utils/mixins";
|
||||
import {listPrice} from "@/api/yh/price";
|
||||
import {deepClone, isEmpty} from "@/utils";
|
||||
import {listProdOrder} from "@/api/yh/prodOrder";
|
||||
|
||||
|
@ -181,6 +186,14 @@ export default {
|
|||
isAsc: defaultSort.order,
|
||||
erpStatusList: [],
|
||||
erpIsRework: null,
|
||||
erpBillNo: null,
|
||||
erpDocumentStatus: null,
|
||||
deptId: null,
|
||||
materialCategory: null,
|
||||
materialSize: null,
|
||||
materialSurface: null,
|
||||
materialCover: null,
|
||||
materialGraphics: null,
|
||||
},
|
||||
total: 0,
|
||||
selected: [],
|
||||
|
|
26
src/components/Business/ProdOrder/ProdOrderLink.vue
Normal file
26
src/components/Business/ProdOrder/ProdOrderLink.vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<el-link type="primary" @click="handleClick" :disabled="id == null">{{name | dv}}</el-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'ProdOrderLink',
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.$emit('click');
|
||||
this.$router.push(`/view/prodOrder/${this.id}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -66,7 +66,7 @@ export const ReportStatus = {
|
|||
},
|
||||
// 允许删除
|
||||
canDel(status) {
|
||||
return [this.WAIT_SUBMIT].includes(status);
|
||||
return [this.WAIT_SUBMIT, this.REJECT].includes(status);
|
||||
},
|
||||
// 是否已审核过的状态
|
||||
isVerified(status) {
|
||||
|
@ -171,5 +171,11 @@ export const DatePickerOptions = {
|
|||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
},
|
||||
// 禁用未来
|
||||
DISABLE_FUTURE: {
|
||||
disabledDate(date) {
|
||||
return date.getTime() > Date.now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图案" prop="cover">
|
||||
<el-input
|
||||
v-model="queryParams.graphics"
|
||||
placeholder="请输入图案"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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>
|
||||
|
@ -184,10 +192,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial, syncMaterial} from "@/api/yh/material";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import {addMaterial, delMaterial, getMaterial, listMaterial, syncMaterial, updateMaterial} from "@/api/yh/material";
|
||||
import {$showColumns} from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import {syncProdOrder} from "@/api/yh/prodOrder";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -214,6 +221,7 @@ export default {
|
|||
{key: 'size', visible: true, label: '大小', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'surface', visible: true, label: '表面处理', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'cover', visible: true, label: '盖子方式', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'graphics', visible: true, label: '图案', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
|
|
|
@ -51,6 +51,9 @@
|
|||
<el-form-item label="盖子方式" prop="materialCover">
|
||||
<el-input v-model="queryParams.materialCover" placeholder="请输入物料盖子方式" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="盖子方式" prop="materialGraphics">
|
||||
<el-input v-model="queryParams.materialGraphics" placeholder="请输入物料图案" clearable @keyup.enter.native="handleQuery"/>
|
||||
</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>
|
||||
|
@ -258,14 +261,14 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
listProdOrder,
|
||||
getProdOrder,
|
||||
delProdOrder,
|
||||
addProdOrder,
|
||||
updateProdOrder,
|
||||
syncProdOrder
|
||||
delProdOrder,
|
||||
getProdOrder,
|
||||
listProdOrder,
|
||||
syncProdOrder,
|
||||
updateProdOrder
|
||||
} from "@/api/yh/prodOrder";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import {$showColumns} from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||
import BooleanTag from "@/components/BooleanTag/index.vue";
|
||||
|
@ -359,6 +362,14 @@ export default {
|
|||
productType: null,
|
||||
materialNo: null,
|
||||
erpStatusList: [],
|
||||
erpIsRework: null,
|
||||
erpBillNo: null,
|
||||
erpDocumentStatus: null,
|
||||
materialCategory: null,
|
||||
materialSize: null,
|
||||
materialSurface: null,
|
||||
materialCover: null,
|
||||
materialGraphics: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -508,9 +519,7 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('yh/prodOrder/export', {
|
||||
...this.queryParams
|
||||
}, `prodOrder_${new Date().getTime()}.xlsx`)
|
||||
this.download('yh/prodOrder/export', this.queryParams, `生产订单_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -34,7 +34,11 @@
|
|||
<el-card class="card-box">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="生产列表" lazy v-if="checkPermi(['yh:reportOrderProd:list'])">
|
||||
<report-order-prod v-if="detail.id != null" :query="{orderId: detail.id}"/>
|
||||
<report-order-prod
|
||||
v-if="detail.id != null"
|
||||
:query="{orderId: detail.id}"
|
||||
:hide-columns="['orderErpBillNo', 'orderErpQty']"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="同步日志" lazy v-if="checkPermi(['yh:logImportDetail:list'])">
|
||||
<log-import-detail v-if="detail.id != null" :query="{logBizType: LogImportBizType.PROD_ORDER, bstId: detail.id}"/>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<template #show>
|
||||
{{d.row.num | dv}} {{d.row.priceUnit}}
|
||||
</template>
|
||||
<el-input v-model="d.row.num" type="number" :min="0" placeholder="请输入良品数量">
|
||||
<el-input v-model.number="d.row.num" type="number" :min="0" placeholder="请输入良品数量">
|
||||
<template #suffix>
|
||||
{{d.row.priceUnit}}
|
||||
</template>
|
||||
|
@ -78,7 +78,7 @@
|
|||
<template #show>
|
||||
{{d.row.defectNum | dv}} {{d.row.priceUnit}}
|
||||
</template>
|
||||
<el-input v-model="d.row.defectNum" type="number" :min="0" placeholder="请输入不良品数量">
|
||||
<el-input v-model.number="d.row.defectNum" type="number" :min="0" placeholder="请输入不良品数量">
|
||||
<template #suffix>
|
||||
{{d.row.priceUnit}}
|
||||
</template>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<el-table-column label="产量" align="center" min-width="180" >
|
||||
<template slot-scope="d">
|
||||
<form-col table label-width="0" :prop="`orderProdList[${d.$index}].num`" :rules="rules.num">
|
||||
<el-input v-model="d.row.num" type="number" :min="0" placeholder="请输入订单产量">
|
||||
<el-input v-model.number="d.row.num" type="number" :min="0" placeholder="请输入订单产量">
|
||||
<template #suffix v-if="priceUnit != null">{{priceUnit}}</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
|
@ -141,6 +141,7 @@ export default {
|
|||
erpStatusList: [ProdOrderErpStatus.START_WORK],
|
||||
materialCategory: this.reportProd.priceCategory,
|
||||
materialSize: this.reportProd.priceSize,
|
||||
materialGraphics: this.reportProd.pricePattern,
|
||||
excludeIds: this.value.map(item => item.orderId),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
</el-select>
|
||||
</form-col>
|
||||
<form-col :span="span" label="良品数" prop="num">
|
||||
<el-input v-model="form.num" type="number" :min="0" placeholder="请输入良品数">
|
||||
<el-input v-model.number="form.num" type="number" :min="0" placeholder="请输入良品数">
|
||||
<template #suffix>
|
||||
{{form.priceUnit}}
|
||||
</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="不良品数" prop="defectNum">
|
||||
<el-input v-model="form.defectNum" type="number" :min="0" placeholder="请输入不良品数">
|
||||
<el-input v-model.number="form.defectNum" type="number" :min="0" placeholder="请输入不良品数">
|
||||
<template #suffix>
|
||||
{{form.priceUnit}}
|
||||
</template>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<el-table-column label="产量" align="center">
|
||||
<template slot-scope="d">
|
||||
<form-col table label-width="0" :prop="`userProdList[${d.$index}].num`" :rules="rules.num">
|
||||
<el-input v-model="d.row.num" type="number" placeholder="请输入员工产量">
|
||||
<el-input v-model.number="d.row.num" type="number" placeholder="请输入员工产量">
|
||||
<template #suffix v-if="priceUnit != null">{{priceUnit}}</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
style="width: 100%;"
|
||||
:clearable="false"
|
||||
:editable="false"
|
||||
:picker-options="pickerOptions"
|
||||
:picker-options="DatePickerOptions.DISABLE_FUTURE"
|
||||
/>
|
||||
</form-col>
|
||||
<form-col :span="span" label="总金额">
|
||||
|
@ -56,6 +56,7 @@ import Decimal from "decimal.js";
|
|||
import ReportProductEdit from "@/views/yh/report/edit/components/ReportProductEdit.vue";
|
||||
import {parseTime} from "@/utils/ruoyi";
|
||||
import {$reportCheck} from "@/views/yh/report/mixins";
|
||||
import {DatePickerOptions} from "@/utils/constants";
|
||||
|
||||
export default {
|
||||
name: "ReportEdit",
|
||||
|
@ -64,6 +65,7 @@ export default {
|
|||
components: {ReportProductEdit, EditHeader, DeptTreeSelect, PriceInput, FormCol},
|
||||
data() {
|
||||
return {
|
||||
DatePickerOptions,
|
||||
title: null,
|
||||
loading: false,
|
||||
gutter: 8,
|
||||
|
@ -116,12 +118,6 @@ export default {
|
|||
headerCellStyle: {
|
||||
backgroundColor: "#f5f7fa",
|
||||
},
|
||||
// 报表日期选项
|
||||
pickerOptions: {
|
||||
disabledDate(date) {
|
||||
return date.getTime() > Date.now();
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -38,6 +38,19 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报表日期" prop="reportDateRange">
|
||||
<el-date-picker
|
||||
type="daterange"
|
||||
v-model="queryParams.reportDateRange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
:picker-options="DatePickerOptions.DISABLE_FUTURE"
|
||||
/>
|
||||
</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>
|
||||
|
@ -165,11 +178,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {listReport, delReport, cancelReport, submitReport} from "@/api/yh/report";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import {cancelReport, delReport, listReport, submitReport} from "@/api/yh/report";
|
||||
import {$showColumns} from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||
import {ReportStatus} from "@/utils/constants";
|
||||
import {DatePickerOptions, ReportStatus} from "@/utils/constants";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -184,6 +197,7 @@ export default {
|
|||
components: {DeptTreeSelect, FormCol},
|
||||
data() {
|
||||
return {
|
||||
DatePickerOptions,
|
||||
ReportStatus,
|
||||
// 字段列表
|
||||
columns: [
|
||||
|
@ -237,6 +251,7 @@ export default {
|
|||
verifyBy: null,
|
||||
updateId: null,
|
||||
updateBy: null,
|
||||
reportDateRange: [],
|
||||
statusList: []
|
||||
},
|
||||
// 表单参数
|
||||
|
@ -353,7 +368,7 @@ export default {
|
|||
handleExport() {
|
||||
this.download('yh/report/export', {
|
||||
...this.queryParams
|
||||
}, `report_${new Date().getTime()}.xlsx`)
|
||||
}, `车间报表_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
<el-card header="工序产量" class="card-box">
|
||||
<report-prod
|
||||
v-if="!loading"
|
||||
:remove-search-columns="['reportId']"
|
||||
:hide-columns="['reportId', 'id']"
|
||||
:remove-search-columns="['reportId', 'reportStatus']"
|
||||
:hide-columns="['reportId', 'id', 'reportStatus']"
|
||||
:query="{reportId: detail.reportId}"
|
||||
:custom-config="{
|
||||
containerClass: null,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="生产订单" prop="orderErpBillNo">
|
||||
<el-form-item label="生产订单" prop="orderErpBillNo" v-if="isShow('orderErpBillNo')">
|
||||
<el-input
|
||||
v-model="queryParams.orderErpBillNo"
|
||||
placeholder="请输入生产订单编号"
|
||||
|
@ -74,6 +74,12 @@
|
|||
<template v-else-if="column.key === 'pricePrice'">
|
||||
{{d.row[column.key] | dv}} 元 / {{d.row.priceUnit}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'orderErpBillNo'">
|
||||
<prod-order-link :id="d.row.orderId" :name="d.row.orderErpBillNo"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'orderErpQty'">
|
||||
{{d.row[column.key] | dv}} {{d.row.unitName}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'reportStatus'">
|
||||
<dict-tag :value="d.row.reportStatus" :options="dict.type.report_status"/>
|
||||
</template>
|
||||
|
@ -135,9 +141,16 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listReportOrderProd, getReportOrderProd, delReportOrderProd, addReportOrderProd, updateReportOrderProd } from "@/api/yh/reportOrderProd";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
import {
|
||||
addReportOrderProd,
|
||||
delReportOrderProd,
|
||||
getReportOrderProd,
|
||||
listReportOrderProd,
|
||||
updateReportOrderProd
|
||||
} from "@/api/yh/reportOrderProd";
|
||||
import {$showColumns} from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import ProdOrderLink from "@/components/Business/ProdOrder/ProdOrderLink.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -149,7 +162,7 @@ export default {
|
|||
name: "ReportOrderProd",
|
||||
mixins: [$showColumns],
|
||||
dicts: ['report_status'],
|
||||
components: {FormCol},
|
||||
components: {ProdOrderLink, FormCol},
|
||||
props: {
|
||||
query: {
|
||||
type: Object,
|
||||
|
@ -168,6 +181,7 @@ export default {
|
|||
{key: 'reportStatus', visible: true, label: '报表状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'priceName', 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: 'orderErpQty', visible: true, 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},
|
||||
],
|
||||
// 排序方式
|
||||
|
@ -222,7 +236,7 @@ export default {
|
|||
...this.queryParams,
|
||||
...this.query
|
||||
}
|
||||
|
||||
this.initColumns();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
@ -327,7 +341,7 @@ export default {
|
|||
handleExport() {
|
||||
this.download('yh/reportOrderProd/export', {
|
||||
...this.queryParams
|
||||
}, `reportOrderProd_${new Date().getTime()}.xlsx`)
|
||||
}, `订单产量_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -110,16 +110,14 @@
|
|||
<template v-else-if="column.key === 'priceType'">
|
||||
<dict-tag :value="d.row.priceType" :options="dict.type.price_type"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'pricePrice'">
|
||||
{{d.row.pricePrice | dv}} 元
|
||||
<!-- <template v-if="d.row.priceUnit">/ {{d.row.priceUnit}}</template>-->
|
||||
<template v-else-if="column.key === 'reportStatus'">
|
||||
<dict-tag :value="d.row.reportStatus" :options="dict.type.report_status"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'totalAmount'">
|
||||
{{calcMulDecimal(d.row.pricePrice, d.row.num)}} 元
|
||||
<template v-else-if="['totalAmount', 'pricePrice'].includes(column.key)">
|
||||
{{d.row[column.key] | dv}} 元
|
||||
</template>
|
||||
<template v-else-if="['num','defectNum'].includes(column.key)">
|
||||
{{d.row[column.key] | dv}}
|
||||
<!-- <template v-if="d.row.priceUnit">{{d.row.priceUnit}}</template>-->
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key] | dv}}
|
||||
|
@ -215,7 +213,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listReportProd, getReportProd, delReportProd, addReportProd, updateReportProd } from "@/api/yh/reportProd";
|
||||
import {addReportProd, delReportProd, getReportProd, listReportProd, updateReportProd} 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";
|
||||
|
@ -234,7 +232,7 @@ const defaultSort = {
|
|||
export default {
|
||||
name: "ReportProd",
|
||||
mixins: [$showColumns, $listConfig, $showSearch],
|
||||
dicts: ['price_type'],
|
||||
dicts: ['price_type', 'report_status'],
|
||||
components: {ReportOrderProdDescriptions, ReportUserProdDescriptions, ReportUserProd, SearchFormItem, FormCol},
|
||||
props: {
|
||||
query: {
|
||||
|
@ -257,6 +255,7 @@ export default {
|
|||
searchColumns: [
|
||||
{key: 'reportId', label: "报表编号", type: 'input', dictType: null},
|
||||
{key: 'priceType', label: "类型", type: 'dict', dictType: 'price_type'},
|
||||
{key: 'reportStatus', label: "报表状态", type: 'dict', dictType: 'report_status'},
|
||||
{key: 'priceName', label: "工序", type: 'input', dictType: null},
|
||||
{key: 'priceSubName', label: "子工序", type: 'input', dictType: null},
|
||||
{key: 'priceCategory', label: "类别", type: 'input', dictType: null},
|
||||
|
@ -271,9 +270,10 @@ export default {
|
|||
columns: [
|
||||
{key: 'id', visible: true, label: '编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'reportId', visible: true, label: '报表编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||
{key: 'priceType', 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: 'priceSubName', visible: true, label: '子工序', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||
{key: 'priceType', visible: true, 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: true, 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},
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
{{d.row[column.key] | dv}} {{ d.row.priceUnit | dv}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'totalPrice'">
|
||||
{{ totalPrice(d.row) | dv}} 元
|
||||
{{d.row.totalPrice | dv}} 元
|
||||
</template>
|
||||
<template v-else-if="column.key === 'reportStatus'">
|
||||
<dict-tag :value="d.row.reportStatus" :options="dict.type.report_status"/>
|
||||
|
@ -140,10 +140,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listReportUserProd, getReportUserProd, delReportUserProd, addReportUserProd, updateReportUserProd } from "@/api/yh/reportUserProd";
|
||||
import {
|
||||
addReportUserProd,
|
||||
delReportUserProd,
|
||||
getReportUserProd,
|
||||
listReportUserProd,
|
||||
updateReportUserProd
|
||||
} from "@/api/yh/reportUserProd";
|
||||
import {$listConfig, $showColumns, $showSearch} from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import {notNullDecimal} from "@/utils";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -177,10 +182,10 @@ export default {
|
|||
{key: 'reportDate', visible: true, label: '报表日期', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
||||
{key: 'reportStatus', visible: true, label: '报表状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'userName', visible: true, label: '员工', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'priceName', visible: true, label: '工序名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'priceName', 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: 'num', visible: true, label: '产量', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'totalPrice', visible: true, label: '工资', minWidth: null, sortable: false, overflow: false, align: 'center', width: null},
|
||||
{key: 'totalPrice', visible: true, label: '工资', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
|
@ -229,17 +234,6 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 总价计算
|
||||
totalPrice() {
|
||||
return (row ) => {
|
||||
if (row == null) {
|
||||
return 0;
|
||||
}
|
||||
return notNullDecimal(row.pricePrice).mul(notNullDecimal(row.num));
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
|
@ -352,7 +346,7 @@ export default {
|
|||
handleExport() {
|
||||
this.download('yh/reportUserProd/export', {
|
||||
...this.queryParams
|
||||
}, `reportUserProd_${new Date().getTime()}.xlsx`)
|
||||
}, `员工产量_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user