|  |  |  | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-form-item label="物料" prop="keyWord"> | 
|---|
|  |  |  | <el-form-item label="物料信息" prop="keyWord"> | 
|---|
|  |  |  | <el-input v-model="searchForm.keyWord" placeholder="请输入物料名称/编码" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="工序" prop="procedureName"> | 
|---|
|  |  |  | 
|---|
|  |  |  | :key="item.value" | 
|---|
|  |  |  | :label="item.label" | 
|---|
|  |  |  | :value="item.value" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-option> | 
|---|
|  |  |  | ></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:salaryparam:exportExcel']" @click="exportExcel">导出</el-button> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <!-- 表格和分页 --> | 
|---|
|  |  |  | <template v-slot:table-wrap> | 
|---|
|  |  |  | <ul class="toolbar" v-permissions="['business:salaryparam:create', 'business:salaryparam:delete']"> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.operaSalaryParamWindow.open('新建绩效工资配置')" icon="el-icon-plus" v-permissions="['business:salaryparam:create']">新建</el-button></li> | 
|---|
|  |  |  | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:salaryparam:delete']">删除</el-button></li> | 
|---|
|  |  |  | <ul class="toolbar" v-permissions="['business:salaryparam:create', 'business:salaryparam:delete', 'business:salaryparam:exportExcel', 'business:salaryparam:importExcel']"> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.operaSalaryParamWindow.open('新建绩效工资配置')" v-permissions="['business:salaryparam:create']">新建</el-button></li> | 
|---|
|  |  |  | <li><el-button type="primary" @click="deleteByIdInBatch" v-permissions="['business:salaryparam:delete']">批量删除</el-button></li> | 
|---|
|  |  |  | <li> | 
|---|
|  |  |  | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:salaryparam:exportExcel']" @click="exportExcel">导出</el-button> | 
|---|
|  |  |  | </li> | 
|---|
|  |  |  | <li v-permissions="['business:salaryparam:importExcel']"> | 
|---|
|  |  |  | <ImportButton | 
|---|
|  |  |  | text="导入" | 
|---|
|  |  |  | template-name="salary_import_template.xlsx" | 
|---|
|  |  |  | template-path="/template/salary_import_template.xlsx" | 
|---|
|  |  |  | action="/business/salaryParam/importBatch" | 
|---|
|  |  |  | @success="search" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table | 
|---|
|  |  |  | v-loading="isWorking.search" | 
|---|
|  |  |  | 
|---|
|  |  |  | @selection-change="handleSelectionChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-table-column type="selection" width="55"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="id" label="主键"  min-width="100px"></el-table-column> | 
|---|
|  |  |  | <!-- align="center" --> | 
|---|
|  |  |  | <el-table-column prop="id" label="序号" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="type" label="计价方式" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | {{ row.type == 0 ? '计件' : '计时' }} | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="departName" label="所属工厂" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="materialName" label="物料名称" min-width="140px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="materialCode" label="物料编码" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="procedureName" label="工序名称" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="salary" label="工资单价(元)" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="num" label="标准数量" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="salary" label="工资单价(元)" min-width="100px"> | 
|---|
|  |  |  | <!-- <template slot-scope="{row}"> | 
|---|
|  |  |  | {{ accDiv(row.salary, 100) }} | 
|---|
|  |  |  | </template> --> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="times" label="标准时长" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="num" label="标准产出" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | {{ (row.num == 0 || !row.num) ? '-' : row.num }} | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="times" label="标准工时" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | {{ timesToStr(row.times) }} | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="createTime" label="创建时间" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <!-- <el-table-column prop="updateUser" label="更新人编码" min-width="100px"></el-table-column> --> | 
|---|
|  |  |  | <el-table-column prop="createUserName" label="创建人" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <!-- <el-table-column prop="updateTime" label="更新时间" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="rootDepartId" label="主组织编码(关联department表根组织)" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="departId" label="工厂编码(关联department表)" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="bomId" label="bom编码(关联bom表)" min-width="100px"></el-table-column> --> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | 
|---|
|  |  |  | import BaseTable from '@/components/base/BaseTable' | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import ImportButton from '@/components/common/ImportButton' | 
|---|
|  |  |  | import OperaSalaryParamWindow from '@/components/business/OperaSalaryParamWindow' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'SalaryParam', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaSalaryParamWindow }, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaSalaryParamWindow, ImportButton }, | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | timesToStr(times) { | 
|---|
|  |  |  | if (!times) { | 
|---|
|  |  |  | if (times==0||!times) { | 
|---|
|  |  |  | return '-' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let sec = times%60 | 
|---|