Merge branch 'master' of http://192.168.5.5:10010/r/silk/silk-web
| | |
| | | // 采购状态 |
| | | const purchaseStatus=[ |
| | | { |
| | | name:'已下单', |
| | | id:1, |
| | | }, |
| | | { |
| | | name:'到货质检', |
| | | id:2, |
| | | }, |
| | | { |
| | | name:'已入库', |
| | | id:3, |
| | | }, |
| | | { |
| | | name:'已完成', |
| | | id:4, |
| | | }, |
| | | ] |
| | | // 质检单状态 |
| | | const qualityStatus=[ |
| | | { |
| | | name:'待质检', |
| | | id:1, |
| | | }, |
| | | { |
| | | name:'已完成', |
| | | id:2, |
| | | } |
| | | ] |
| | | // 退货单状态 |
| | | const returnedStatus=[ |
| | | { |
| | | name:'待发货', |
| | | id:1, |
| | | }, |
| | | { |
| | | name:'待签收', |
| | | id:2, |
| | | }, |
| | | { |
| | | name:'待发货', |
| | | id:3, |
| | | }, |
| | | { |
| | | name:'已完成', |
| | | id:4, |
| | | }, |
| | | // 检查项目名称 |
| | | const projectOptions = [ |
| | | { id: 1, value: "纤度偏差" }, |
| | | { id: 2, value: "二次变化" }, |
| | | { id: 3, value: "清洁分" }, |
| | | { id: 4, value: "洁净分" }, |
| | | { id: 5, value: "最大偏差" } |
| | | ] |
| | | |
| | | export const getDataByType = type => { |
| | | if(type =='purchaseStatus'){ |
| | | return purchaseStatus; |
| | | }else if(type=='qualityStatus'){ |
| | | return qualityStatus; |
| | | }else if(type=='returnedStatus'){ |
| | | return returnedStatus; |
| | | export const getDataByType = (type) => { |
| | | if (type == "projectOptions") { |
| | | return projectOptions |
| | | } |
| | | } |
New file |
| | |
| | | import request from "@/common/untils/request.js" |
| | | |
| | | // 创建服务商 |
| | | export function getRankStandard() { |
| | | return request({ |
| | | url: "/api-jl/v1/system/getRankStandard", |
| | | method: "get" |
| | | }) |
| | | } |
| | | // 创建服务商 |
| | | export function saveRankStandard(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/saveRankStandard", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | <!-- eslint-disable vue/no-use-v-if-with-v-for --> |
| | | <template> |
| | | <div class="table-view"> |
| | | <div class="table-view" v-loading="loading"> |
| | | <el-table |
| | | ref="table" |
| | | :class="tableList.headerColor=='red'?'table-red':''" |
| | | border |
| | | :data="tableList.tableInfomation" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :height="'calc(100% - 0px)'" |
| | | :max-height="tableList.maxHeight" |
| | | style="width: 100%" |
| | | :lazy="tableList.lazy" |
| | | size="mini" |
| | | :show-summary="showSummary.show" |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod" |
| | | @selection-change="handleSelectionChange" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009' , 'font-size': '14px'}" |
| | | :highlight-current-row="tableList.highlight" |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009', 'font-size': '12px', 'font-family': 'PingFangSC' }" |
| | | size="mini" |
| | | @row-click="tableRowClick" |
| | | :row-key="tableList.key" |
| | | :default-expand-all="tableList.isDefaultExpandAll" |
| | | :tree-props="{ children: 'child', hasChildren: 'hasChildren' }" |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column align="center" v-if="tableList.selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column align="center" v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column> |
| | | <template v-for="(item, i) in tableList.tableColumn"> |
| | | <el-table-column |
| | | align="center" |
| | | :key="i" |
| | | :prop="item.prop" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | :min-width="item.min" |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | v-if="item.isShowColumn" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-if="item.price">{{ "¥" + number_format(scope.row[item.prop], 2, ".", ",") }}</span> |
| | | <div v-else-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div> |
| | | <span v-else-if="item.isTime">{{ |
| | | dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) === "1900-01-01 00:06:26" |
| | | ? "--" |
| | | : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) |
| | | }}</span> |
| | | <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selCommonClick(scope.row)">{{ |
| | | scope.row[item.prop] |
| | | }}</span> |
| | | <span v-else-if="item.isFirst">{{ scope.row[item.prop] ? "是" : "否" }}</span> |
| | | <span |
| | | v-else-if="item.isCommonClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selCommonClick(scope.row)" |
| | | <el-table-column v-if="selectBox" type="selection" width="40" :selectable="selectable"> </el-table-column> |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | | :prop="item.prop" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | :min-width="item.min" |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | v-if="item.isShowColumn" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-if="item.price">{{ "¥" + number_format(scope.row[item.prop], 2, ".", ",") }}</span> |
| | | <div v-else-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div> |
| | | <span v-else-if="item.isTime">{{ |
| | | dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) === "1900-01-01 00:06:26" |
| | | ? "--" |
| | | : dateFormat("YYYY-mm-dd HH:MM:SS", scope.row[item.prop]) |
| | | }}</span> |
| | | <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selNameClick(scope.row)">{{ |
| | | scope.row[item.prop] |
| | | }}</span> |
| | | <span v-else-if="item.isFirst">{{ scope.row[item.prop] ? "是" : "否" }}</span> |
| | | <span |
| | | v-else-if="item.isSalesLeadClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selSalesLeadClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <div v-else-if="item.isProductName" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'"> |
| | | {{ item.name }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductAmount" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'"> |
| | | {{ item.amount }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductPrice" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'"> |
| | | {{ item.price }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductTotal" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'"> |
| | | {{ item.total }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | > |
| | | <span |
| | | v-else-if="item.isClientClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selClientClick(scope.row)" |
| | | >{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span |
| | | > |
| | | <span |
| | | v-else-if="item.isContactClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selContactsClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <span |
| | | v-else-if="item.isMasterClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selMasterClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <span |
| | | v-else-if="item.isServiceOrder && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selServiceOrderClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <span |
| | | v-else-if="item.isCommonClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selCommonClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <div v-else-if="item.isProductName" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div class="name-view"> |
| | | {{ item.name }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductAmount" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div class="name-view"> |
| | | {{ item.amount }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductPrice" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div class="name-view"> |
| | | {{ item.price }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductTotal" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div class="name-view"> |
| | | {{ item.total }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <!-- 调用方法显示文字 --> |
| | | <div v-else-if="item.isCallMethod"> |
| | | <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{ |
| | | item.getCallMethod(scope.row[item.prop], scope.row) |
| | | }}</span> |
| | | </div> |
| | | <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <slot name="tableButton" /> |
| | | <div slot="empty"> |
| | | <el-empty description="暂无数据"></el-empty> |
| | | </div> |
| | | </el-table> |
| | | |
| | | <div class="overSpread1" v-show="iscolopen" @click="onMaskClick"></div> |
| | | <div class="styleBtn"> |
| | | <i @click="checkCol()" v-if="colOpenShow" class="label">...</i> |
| | | <el-checkbox-group |
| | | v-model="showcol" |
| | | v-show="iscolopen" |
| | | class="checkbox-group" |
| | | @change="selectCheckBoxList" |
| | | > |
| | | <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item" |
| | | >{{ item }} |
| | | </el-checkbox> |
| | | <i @click="checkCol()" class="label">...</i> |
| | | <el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList"> |
| | | <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | |
| | | export default { |
| | | name: "TableCommonView", |
| | | props: { |
| | | selectBox: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | tableList: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | selectBox: false, |
| | | selectIndex: false, |
| | | selectIndex: true, |
| | | tableInfomation: [], // 接口返回数据 |
| | | showcol: [], |
| | | allcol: [], |
| | | highlight: false, |
| | | tableColumn: [ |
| | | // table表单 |
| | | { label: "", prop: "", min: 200, tooltip: true } |
| | |
| | | } |
| | | } |
| | | }, |
| | | // 是否可以配置列表 表头 |
| | | colOpenShow: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | showSummary: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | show: false, |
| | | sumProp: [], |
| | | mergeNumber: 1, |
| | | totalName: "本页总计" |
| | | mergeNumber: 1 |
| | | } |
| | | } |
| | | }, |
| | |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | selectBoxList: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | iscolopen: false, |
| | | showcol:[] |
| | | } |
| | | }, |
| | | watch: { |
| | | 'tableList.showcol':{ |
| | | handler(newVal){ |
| | | this.showcol=newVal |
| | | }, |
| | | immediate:true |
| | | showcol: [] |
| | | } |
| | | }, |
| | | computed: {}, |
| | | watch: { |
| | | "tableList.showcol": { |
| | | handler(newVal) { |
| | | this.showcol = newVal |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | onMaskClick() { |
| | | this.iscolopen = false; |
| | | this.iscolopen = false |
| | | }, |
| | | checkCol() { |
| | | this.iscolopen = !this.iscolopen; |
| | | this.iscolopen = !this.iscolopen |
| | | }, |
| | | selectCheckBoxList(val) { |
| | | this.$emit("selTableCol", val); |
| | | this.$emit("selTableCol", val) |
| | | }, |
| | | handleReserve(row) { |
| | | return row._id ? row._id : row.id |
| | |
| | | .querySelector(".el-table__footer") |
| | | var cell = current.rows[0].cells |
| | | for (let i = 0; i < this.showSummary.mergeNumber; i++) { |
| | | cell[i].style.display = "none" |
| | | cell[i] && cell[i].style && (cell[i].style.display = "none") |
| | | } |
| | | cell[this.showSummary.mergeNumber].classList.remove("is-left") |
| | | cell[this.showSummary.mergeNumber].colSpan = this.showSummary.mergeNumber.toString() |
| | | if (cell[this.showSummary.mergeNumber]) { |
| | | if (cell[this.showSummary.mergeNumber].classList) { |
| | | cell[this.showSummary.mergeNumber].classList.remove("is-left") |
| | | } |
| | | if (cell[this.showSummary.mergeNumber].colSpan) { |
| | | cell[this.showSummary.mergeNumber].colSpan = this.showSummary.mergeNumber.toString() |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === this.showSummary.mergeNumber) { |
| | | sums[index] = this.showSummary.totalName |
| | | sums[index] = "本页总计" |
| | | } |
| | | const values = data.map((item) => Number(item[column.property])) |
| | | if (this.showSummary.sumProp.includes(column.property)) { |
| | |
| | | } |
| | | return fmt |
| | | }, |
| | | // 公共详情 |
| | | // 新建编辑选择弹窗 |
| | | selNameClick(row) { |
| | | this.$emit("selCommonClick", row) |
| | | }, |
| | | // 销售线索 |
| | | selSalesLeadClick(row) { |
| | | this.$emit("selSalesLeadClick", row) |
| | | }, |
| | | // 客户名称 |
| | | selClientClick(row) { |
| | | this.$emit("selClientClick", row) |
| | | }, |
| | | // 联系人姓名 |
| | | selContactsClick(row) { |
| | | this.$emit("selContactsClick", row) |
| | | }, |
| | | // 销售总单 |
| | | selMasterClick(row) { |
| | | this.$emit("selMasterClick", row) |
| | | }, |
| | | // 客户服务单 |
| | | selServiceOrderClick(row) { |
| | | this.$emit("selServiceOrderClick", row) |
| | | }, |
| | | // 公共(销售机会、报价单、销售总单、销售子单。。。) |
| | | selCommonClick(row) { |
| | | this.$emit("selCommonClick", row) |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row, column, event) { |
| | | this.$emit("tableRowClick", row, column, event) |
| | | }, |
| | | // 单选行相关 |
| | | tableRowClassName({ row }) { |
| | |
| | | } |
| | | this.$emit("tableRowClassName", row) |
| | | }, |
| | | tableRowClick(row) { |
| | | this.$emit("tableRowClick", row) |
| | | selectable(row) { |
| | | let list = this.selectBoxList.map((item) => item.number) |
| | | if (list.findIndex((v) => v == row.number) == -1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .table-view { |
| | | // margin-top: 20px; |
| | | // margin-right: 10px; |
| | | // margin-bottom: 40px; |
| | | position: relative; |
| | | height: 100%; |
| | | .blue { |
| | |
| | | margin-left: -10px; |
| | | margin-right: -11px; |
| | | li { |
| | | height: 57px; |
| | | line-height: 57px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | .name-view { |
| | | padding-left: 10px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | .no-bottom { |
| | | border-bottom: 0px; |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | li:last-child .name-view { |
| | | border-bottom: none; |
| | | } |
| | | .no-product { |
| | | height: 57px; |
| | | line-height: 57px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | } |
| | | } |
| | | } |
| | |
| | | height: 35px; |
| | | text-align: center; |
| | | } |
| | | ::v-deep .table-red.el-table th.el-table__cell>.cell{ |
| | | color:red; |
| | | } |
| | | ::v-deep{ |
| | | .el-table .cell .el-button--text.el-button--small{ |
| | | |
| | | ::v-deep { |
| | | .el-table .cell .el-button--text.el-button--small { |
| | | padding: 4px 0; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-table .el-table__cell { |
| | | padding: 6px 0 !important; |
| | | height: 35px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .overSpread1 { |
| | |
| | | // line-height: 26px; |
| | | // background: #06c062; |
| | | top: 0; |
| | | right: 2px; |
| | | z-index: 9999; |
| | | right: -6px; |
| | | z-index: 11; |
| | | .label { |
| | | position: absolute; |
| | | top: 6px; |
| | |
| | | } |
| | | .checkbox-group { |
| | | width: 160px; |
| | | height: 330px; |
| | | height: 300px; |
| | | overflow: auto; |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | margin-left: 0px; |
| | | } |
| | | </style> |
| | | @/api/systemSetting/supplier |
| | |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | isDeviceConnectStatus: false, |
| | | isDeviceConnectStatus: true, |
| | | ruleForm: { |
| | | number: "", |
| | | productTime: "", |
| | |
| | | :close-on-click-modal="false" |
| | | :visible.sync="editDialogVisible" |
| | | width="533px" |
| | | class="add-event-dialog" |
| | | append-to-body |
| | | custom-class="add-event-dialog" |
| | | @close="handleClose" |
| | | > |
| | | <div class="dialog-content-box"> |
| | |
| | | color: #333; |
| | | font-weight: 700; |
| | | } |
| | | .add-event-dialog .el-dialog { |
| | | position: absolute; |
| | | right: 40px; |
| | | top: 40px; |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | .add-event-dialog .el-dialog { |
| | | /* .add-event-dialog.el-dialog { |
| | | position: absolute; |
| | | right: 40px; |
| | | top: 40px; |
| | | } |
| | | } */ |
| | | /* .add-event-dialog .el-dialog__header { |
| | | display: none; |
| | | } */ |
| | |
| | | <template> |
| | | <div class="container"></div> |
| | | <div class="payableSalaryReport-container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="exportBtnClick">导出</el-button> |
| | | <el-button size="small" type="primary" @click="refreshBtnClick">刷新</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :colOpenShow="false" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | </div> |
| | | <!-- <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "payableSalaryReport", |
| | | props: {}, |
| | | components: {}, |
| | | mixins: [], |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | | return {} |
| | | return { |
| | | loading: false, |
| | | tableList: {}, |
| | | tableColumn: [ |
| | | { label: "姓名", prop: "name", default: true, fixed: true }, |
| | | { label: "人员id", prop: "member_name" }, |
| | | { label: "手机号", prop: "client_level" }, |
| | | { label: "工种", prop: "next_visit_time" }, |
| | | { label: "生产工资", prop: "detail_address" }, |
| | | { label: "满勤", prop: "client_status" }, |
| | | { label: "超时工资", prop: "contact_name" }, |
| | | { label: "加班工资", prop: "contact_phone" }, |
| | | { label: "交通补贴", prop: "client_level" }, |
| | | { label: "带徒补贴", prop: "next_visit_time" }, |
| | | { label: "岗位补贴", prop: "detail_address" }, |
| | | { label: "社保补贴", prop: "client_status" }, |
| | | { label: "工龄补贴", prop: "contact_name" }, |
| | | { label: "不达保底", prop: "contact_phone" }, |
| | | { label: "质量奖", prop: "contact_phone" }, |
| | | { label: "奖罚1", prop: "client_level" }, |
| | | { label: "奖罚2/清凉补", prop: "next_visit_time", width: "110" }, |
| | | { label: "日常检查/奖罚3", prop: "detail_address", width: "110" }, |
| | | { label: "停机补贴", prop: "client_status" }, |
| | | { label: "应发工资", prop: "contact_name" }, |
| | | { label: "备注", prop: "contact_phone", width: "140" } |
| | | ], |
| | | showCol: [ |
| | | "姓名", |
| | | "人员id", |
| | | "手机号", |
| | | "工种", |
| | | "生产工资", |
| | | "满勤", |
| | | "超时工资", |
| | | "加班工资", |
| | | "交通补贴", |
| | | "带徒补贴", |
| | | "岗位补贴", |
| | | "社保补贴", |
| | | "工龄补贴", |
| | | "不达保底", |
| | | "质量奖", |
| | | "奖罚1", |
| | | "奖罚2/清凉补", |
| | | "日常检查/奖罚3", |
| | | "停机补贴", |
| | | "应发工资", |
| | | "备注" |
| | | ] |
| | | } |
| | | }, |
| | | created() {}, |
| | | methods: {} |
| | | created() { |
| | | this.setTable() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | fixed: true, |
| | | tableInfomation: [{ name: "张三" }, { name: "lisi" }, { name: "王五" }], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol) { |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn: showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | console.log(searchText) |
| | | }, |
| | | // 导出 |
| | | exportBtnClick() {}, |
| | | // 刷新 |
| | | refreshBtnClick() {} |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .payableSalaryReport-container { |
| | | height: 100%; |
| | | .filter-card { |
| | | margin: 20px 30px; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px 0 20px; |
| | | border-radius: 12px; |
| | | background-color: #fff; |
| | | } |
| | | .body-card { |
| | | margin: 0 30px; |
| | | background-color: #fff; |
| | | padding: 10px 15px; |
| | | height: calc(100% - 180px); |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="container"></div> |
| | | <div class="productionRreport-container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="exportBtnClick">导出</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView ref="tableListRef" v-loading="loading" :table-list="tableList" @selTableCol="selTableCol"> |
| | | </TableCommonView> |
| | | </div> |
| | | <!-- <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "productionReport", |
| | | props: {}, |
| | | components: {}, |
| | | mixins: [], |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | | return {} |
| | | return { |
| | | loading: false, |
| | | tableList: {}, |
| | | tableColumn: [ |
| | | { label: "车间", prop: "name", default: true }, |
| | | { label: "机组", prop: "member_name" }, |
| | | { label: "Ⅱ度", prop: "client_level" }, |
| | | { label: "清洁", prop: "next_visit_time" }, |
| | | { label: "洁净", prop: "detail_address" }, |
| | | { label: "最大纤度", prop: "client_status" }, |
| | | { label: "最小纤度", prop: "contact_name" }, |
| | | { label: "平均纤度", prop: "contact_phone" }, |
| | | { label: "公量纤度", prop: "client_level" }, |
| | | { label: "最大偏差", prop: "next_visit_time" }, |
| | | { label: "纤度偏差", prop: "detail_address" }, |
| | | { label: "日产量", prop: "client_status" }, |
| | | { label: "等级", prop: "contact_name" }, |
| | | { label: "综合等级", prop: "contact_phone" } |
| | | ], |
| | | showCol: [ |
| | | "车间", |
| | | "机组", |
| | | "Ⅱ度", |
| | | "清洁", |
| | | "洁净", |
| | | "最大纤度", |
| | | "最小纤度", |
| | | "平均纤度", |
| | | "公量纤度", |
| | | "最大偏差", |
| | | "纤度偏差", |
| | | "日产量", |
| | | "等级", |
| | | "综合等级" |
| | | ] |
| | | } |
| | | }, |
| | | created() {}, |
| | | methods: {} |
| | | created() { |
| | | this.setTable() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol) { |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn: showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | console.log(searchText) |
| | | }, |
| | | // 导出 |
| | | exportBtnClick() {} |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .productionRreport-container { |
| | | height: 100%; |
| | | .filter-card { |
| | | margin: 20px 30px; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 20px 0 20px; |
| | | border-radius: 12px; |
| | | background-color: #fff; |
| | | } |
| | | .body-card { |
| | | margin: 0 30px; |
| | | background-color: #fff; |
| | | padding: 10px 15px; |
| | | height: calc(100% - 180px); |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :disabled="!isOperate" |
| | | @change=" |
| | | (val) => { |
| | | commonInputChange(val, item.prop, scope.row, scope) |
| | | commonInputChange(val, item.prop, scope) |
| | | } |
| | | " |
| | | ></el-input> |
| | |
| | | v-for="(item, index) in projectOptions" |
| | | :key="index" |
| | | :label="item.value" |
| | | :value="item.value" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | " |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | <div v-else-if="item.isCallMethod"> |
| | | <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{ |
| | | item.getCallMethod(scope.row[item.prop], scope.row) |
| | | }}</span> |
| | | </div> |
| | | <span v-else style="text-align: right">{{ scope.row[item.prop] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | <script> |
| | | // import { getProductList } from "@/api/common/other" |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | | name: "CommmonFormTableView", |
| | | components: {}, |
| | |
| | | productList: [], |
| | | tableList: [], |
| | | projectIndex: 0, |
| | | projectOptions: [ |
| | | { id: 1, value: "纤度偏差" }, |
| | | { id: 2, value: "二次变化" }, |
| | | { id: 3, value: "清洁分" }, |
| | | { id: 4, value: "洁净分" }, |
| | | { id: 5, value: "最大偏差" } |
| | | ] |
| | | projectOptions: getDataByType("projectOptions") |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.$emit("addProjectClick") |
| | | } |
| | | }, |
| | | commonInputChange(val, prop, row, scope) { |
| | | this.$emit("inputContent", val, prop, row, scope) |
| | | commonInputChange(val, prop, scope) { |
| | | this.$emit("inputContent", val, prop, scope) |
| | | }, |
| | | // 删除 |
| | | deleteClick(scope) { |
| | |
| | | // 添加列头部标题输入 |
| | | addColumnInputChange(val, prop) { |
| | | console.log(val, prop, "添加列头部标题输入") |
| | | this.$emit("addColumnInputChange", val, prop) |
| | | }, |
| | | // 删除列 |
| | | clearupColumn(prop) { |
| | |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick" :disabled="!isEdit">新增</el-button> |
| | | <el-button size="small" type="primary" @click="refreshClick">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="printClick">打印</el-button> |
| | | <el-button size="small" type="primary" @click="printClick" disabled>打印</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | |
| | | @deleteClick="clearupProject" |
| | | @addColumnClick="addColumnClick" |
| | | @clearupColumn="clearupColumn" |
| | | @addColumnInputChange="addColumnInputChange" |
| | | > |
| | | </SilkTableList> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import SilkTableList from "@/views/systemSetting/silkStandardSetting/components/silkTableList" |
| | | import { getRankStandard, saveRankStandard } from "@/api/systemSetting/silkStandardSetting" |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | | name: "silkStandardSetting", |
| | | props: {}, |
| | |
| | | isEdit: false, |
| | | silkTableList: {}, |
| | | tableData: [], |
| | | tableColumn: [ |
| | | { label: "检查项目名称", prop: "projectName", projectName: true }, |
| | | { label: "开始纤度", prop: "start", inputFloat: true }, |
| | | { label: "结束纤度", prop: "end", inputFloat: true }, |
| | | { label: "野纤", prop: "price1", inputFloat: true }, |
| | | { label: "大野", prop: "price2", inputFloat: true }, |
| | | { label: "特野", prop: "price3", inputFloat: true } |
| | | defaultColumn: [ |
| | | { |
| | | label: "检查项目名称", |
| | | prop: "checkItem", |
| | | projectName: true, |
| | | isCallMethod: true, |
| | | getCallMethod: this.getCheckItemName |
| | | }, |
| | | { label: "开始纤度", prop: "startFineness", inputFloat: true }, |
| | | { label: "结束纤度", prop: "endFineness", inputFloat: true }, |
| | | { label: "野纤", prop: "rankA", inputFloat: true }, |
| | | { label: "大野", prop: "rankB", inputFloat: true }, |
| | | { label: "特野", prop: "rankC", inputFloat: true } |
| | | ], |
| | | tableColumn: [], |
| | | columnNum: 0, |
| | | dataObj: { |
| | | projectName: "", |
| | | start: 0, |
| | | end: 0, |
| | | price1: 0, |
| | | price2: 0, |
| | | price3: 0 |
| | | } |
| | | checkItem: 1, |
| | | startFineness: 0, |
| | | endFineness: 0, |
| | | rankA: 0, |
| | | rankB: 0, |
| | | rankC: 0 |
| | | }, |
| | | projectOptions: getDataByType("projectOptions"), |
| | | rankObj: {}, |
| | | columnInputList: [], |
| | | dynamicsRanks: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTableForm() |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | // 获取数据 |
| | | getData() { |
| | | getRankStandard().then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.length > 0) { |
| | | this.tableData = [] |
| | | this.tableColumn = this.defaultColumn |
| | | this.columnDataProcess(res.data[0].dynamicsRanks) |
| | | this.rankObj = {} |
| | | this.allDataProcess(res.data) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 整体数据处理 |
| | | allDataProcess(dataList) { |
| | | let rankList = dataList.map((ite) => { |
| | | for (let i = 0; i < ite.dynamicsRanks.length; i++) { |
| | | this.$set(this.rankObj, ite.dynamicsRanks[i].rankProp, ite.dynamicsRanks[i].rankValue) |
| | | this.$set(this.dataObj, ite.dynamicsRanks[i].rankProp, 0) |
| | | } |
| | | return { |
| | | ...ite, |
| | | ...this.rankObj |
| | | } |
| | | }) |
| | | this.tableData = rankList || [] |
| | | this.silkTableList.tableData = this.tableData |
| | | }, |
| | | // 列信息数据处理 |
| | | columnDataProcess(data) { |
| | | this.columnInputList = data.map((ite) => { |
| | | return { ...ite } |
| | | }) |
| | | let list = data.map((item) => { |
| | | return { |
| | | label: item.rankName, |
| | | prop: item.rankProp, |
| | | inputFloat: true |
| | | } |
| | | }) |
| | | this.columnNum = list.length + 1 |
| | | for (let j = 0; j < list.length; j++) { |
| | | this.tableColumn.splice(2, 0, list[j]) |
| | | } |
| | | console.log(this.tableColumn) |
| | | this.silkTableList.tableColumn = this.tableColumn |
| | | }, |
| | | setTableForm() { |
| | | this.silkTableList = { |
| | | tableData: this.tableData, |
| | |
| | | this.tableData.push(this.dataObj) |
| | | }, |
| | | // 刷新 |
| | | refreshClick() {}, |
| | | refreshClick() { |
| | | this.getData() |
| | | }, |
| | | // 打印 |
| | | printClick() {}, |
| | | // 列表输入回调 |
| | | inputContent(val, prop, row) { |
| | | console.log(val, prop, row) |
| | | inputContent(val, prop, scope) { |
| | | console.log(val, prop, scope) |
| | | let list = this.tableData.map((item, index) => { |
| | | let dynamicsRanks = this.columnInputList.map((ite) => { |
| | | if (ite.rankProp == prop) { |
| | | ite.rankValue = val |
| | | } |
| | | return { |
| | | ...ite |
| | | } |
| | | }) |
| | | if (index === scope.$index) { |
| | | item[prop] = val |
| | | item.dynamicsRanks = dynamicsRanks |
| | | } |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | console.log(list) |
| | | this.tableData = list |
| | | }, |
| | | // 删除 |
| | | clearupProject(data, index) { |
| | |
| | | // 保存编辑按钮切换 |
| | | editSaveClick() { |
| | | this.isEdit = !this.isEdit |
| | | if (!this.isEdit) { |
| | | let params = this.saveParam() |
| | | saveRankStandard({ |
| | | rankStandard: params |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.$message.success("保存成功") |
| | | this.getData() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | saveParam() { |
| | | let saveList = this.tableData.map((item) => { |
| | | return { |
| | | checkItem: item.checkItem, |
| | | dynamicsRanks: item.dynamicsRanks, |
| | | endFineness: item.endFineness, |
| | | lineId: item.lineId || "", |
| | | rankA: item.rankA, |
| | | rankB: item.rankB, |
| | | rankC: item.rankC, |
| | | startFineness: item.startFineness |
| | | } |
| | | }) |
| | | return saveList |
| | | }, |
| | | // 添加列 |
| | | addColumnClick() { |
| | | let propStr = "trends" + this.columnNum |
| | | let propStr = "prop" + this.columnNum |
| | | this.tableColumn.splice(2, 0, { label: "", prop: propStr, inputFloat: true, addColumn: true }) |
| | | this.$set(this.dataObj, propStr, 0) |
| | | console.log(this.tableColumn) |
| | | this.$set(this.rankObj, propStr, 0) |
| | | console.log(this.columnInputList) |
| | | this.columnInputList.push({ rankProp: propStr, rankName: "", rankValue: 0 }) |
| | | console.log(this.tableColumn, this.dataObj, "32323", this.columnInputList) |
| | | this.silkTableList.tableColumn = this.tableColumn |
| | | this.columnNum += 1 |
| | | let allList = this.tableData.map((item) => { |
| | | return { |
| | | ...item, |
| | | [propStr]: 0 |
| | | } |
| | | }) |
| | | this.tableData = allList |
| | | this.silkTableList.tableData = allList |
| | | }, |
| | | // 删除列 |
| | | clearupColumn(prop) { |
| | |
| | | this.tableColumn.splice(currentIndex, 1) |
| | | this.silkTableList.tableColumn = this.tableColumn |
| | | this.$delete(this.dataObj, prop) |
| | | }, |
| | | // 列表头输入回调 |
| | | addColumnInputChange(val, prop) { |
| | | console.log(val, prop, this.columnInputList) |
| | | this.columnInputList.forEach((item) => { |
| | | if (item.rankProp == prop) { |
| | | item.rankName = val |
| | | } |
| | | }) |
| | | console.log(this.columnInputList, "888") |
| | | }, |
| | | getCheckItemName(val) { |
| | | if (val) { |
| | | for (let i in this.projectOptions) { |
| | | if (this.projectOptions[i].id == val) { |
| | | return this.projectOptions[i].value |
| | | } |
| | | } |
| | | } else { |
| | | return "--" |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | devServer: { |
| | | proxy: { |
| | | "/api": { |
| | | |
| | | // target: "http://192.168.20.118:8889", // http://192.168.20.119:8002 http://fai365.com:30150/ |
| | | // target: "http://192.168.20.120:8008", |
| | | target: "http://192.168.20.119:8004", // http://192.168.20.119:8004 http://fai365.com:30150/ |
| | | // target: "http://192.168.20.120:8004", |
| | | target: "http://192.168.20.119:8008", // http://192.168.20.119:8004 http://fai365.com:30150/ |
| | | |
| | | ws: true, |
| | | changeOrigin: true |