| | |
| | | data |
| | | }) |
| | | } |
| | | // 添加跟进记录 |
| | | export function getAddFollowRecord(data) { |
| | | //保存纤度登记 |
| | | export function saveRegister(data) { |
| | | return request({ |
| | | url: "/api/followRecord/add", |
| | | url: "/api-jl/v1/fineness/register", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 纤度登记 select数据 |
| | | export function getDictList(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/dict?dictType="+data.dictType, |
| | | method: "get", |
| | | data |
| | | }) |
| | | } |
| | | // 更新跟进记录 |
| | | export function getUpdateFollowRecord(data) { |
| | | return request({ |
| | |
| | | props: { |
| | | pageSizes: { |
| | | type: Array, |
| | | default: () => [5, 10, 20, 30, 40] |
| | | default: () =>[15, 30], |
| | | }, |
| | | layout: { |
| | | type: String, |
| | |
| | | default: () => { |
| | | return { |
| | | currPage: 1, |
| | | pageSize: 10, |
| | | pageSize: 15, |
| | | totalCount: 0 |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="container"></div> |
| | | <div class="silkRegister-form"> |
| | | <div class="filter"> |
| | | <div class="filter-card"> |
| | | <CommonSearch |
| | | :show-add="false" |
| | | :show-download="false" |
| | | :amount-view="false" |
| | | :show-action-btn="false" |
| | | placeholder="请输入关键词" |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="exportClick">导入</el-button> |
| | | <el-button size="small" type="primary" @click="synchClick">同步</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="body"> |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFollowRecordList, getDeleteFollowRecord } from "@/api/productManage/silkRegisterForm.js" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | |
| | | export default { |
| | | name: "attendanceManage", |
| | | props: {}, |
| | | components: {}, |
| | | mixins: [], |
| | | computed: {}, |
| | | data() { |
| | | return {} |
| | | props: { |
| | | }, |
| | | created() {}, |
| | | methods: {} |
| | | mixins: [pageMixin], |
| | | components: { |
| | | }, |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | loading: false, |
| | | searchOptions: [], |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "日期", prop: "topic", min: 120, default: true }, |
| | | { label: "员工编号", prop: "client_name", min: 190,default: true}, |
| | | { label: "员工姓名", prop: "contact_name", min: 100, }, |
| | | { label: "上班打卡时间", prop: "client_status", min: 100 }, |
| | | { label: "下班打卡时间", prop: "contact_information_name", min: 100 }, |
| | | { label: "班次", prop: "follow_time", min: 100 }, |
| | | { label: "班次上班时间", prop: "next_follow_time", min: 110 }, |
| | | { label: "班次下班时间", prop: "member_name", min: 110 }, |
| | | { label: "添加时间", prop: "next_follow_time", min: 130 }, |
| | | { label: "添加人", prop: "member_name", min: 110 }, |
| | | ], |
| | | showCol: [ |
| | | "日期", |
| | | "员工编号", |
| | | "员工姓名", |
| | | "上班打卡时间", |
| | | "下班打卡时间", |
| | | "班次", |
| | | "班次上班时间", |
| | | "班次下班时间", |
| | | "添加时间", |
| | | "添加人", |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData(this.search_map) |
| | | }, |
| | | computed: { |
| | | }, |
| | | 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) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getFollowRecordList({ |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.client.name, |
| | | contact_name: item.contact.name, |
| | | client_status: item.client_status.name, |
| | | phone: item.contact.phone, |
| | | member_name: item.member.username, |
| | | contact_information_name: item.contact_information.name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableList.tableInfomation = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.client_name = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | exportClick() { |
| | | |
| | | }, |
| | | // 打印 |
| | | synchClick(){ |
| | | |
| | | }, |
| | | |
| | | // 删除 |
| | | delClick(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: [id] }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .silkRegister-form { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | .filter { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 12px 20px 0 20px; |
| | | &-card { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | padding: 10px 20px; |
| | | flex: 1; |
| | | border-radius: 12px; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | .body { |
| | | box-sizing: border-box; |
| | | padding: 10px 20px; |
| | | border-radius: 12px; |
| | | height: calc(100% - 92px); |
| | | .body-card { |
| | | background-color: #fff; |
| | | border-radius: 12px; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <el-dialog :close-on-click-modal="false" :visible.sync="islook" width="40rem" class="add-event-dialog" |
| | | @close="cancelMethod"> |
| | | <div slot="title" class="tac drawerHeader">{{ editRow.title }}</div> |
| | | <div class="dialog-content-box"> |
| | | <el-form class="form-box" ref="form" :rules="rules" :model="form" label-width="140px" label-position="right"> |
| | | <el-form-item label="员工姓名:" prop="id"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="员工ID:" prop="isCore"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="工种:" prop="id"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="考勤日期:" prop="isCore"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="状态:" prop="id"> |
| | | <template v-if="!isEditOne"> |
| | | <i class="el-icon-circle-check cursor_pointer font_size_20 color_67c23a"></i> |
| | | {{ form.name }} |
| | | <i @click="editOneClick" class="el-icon-edit-outline cursor_pointer font_size_20"></i> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="form.phoneNum" filterable placeholder="请选择" class="margin_right_15px" style="width: calc(100% - 80px)"> |
| | | <el-option v-for="item in DeviceList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button type="text" @click="submitEditOneClick('form')">确定</el-button> |
| | | </template> |
| | | </el-form-item> |
| | | <el-form-item label="上班打卡时间:" prop="isCore"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="下班打卡时间:" prop="id"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="班次:" prop="isCore"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="班次开始时间:" prop="id"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="班次结束时间:" prop="isCore"> |
| | | {{ form.name }} |
| | | </el-form-item> |
| | | <el-form-item label="工作日加班时长:" prop="id"> |
| | | <template v-if="!isEditTwo"> |
| | | {{ form.name }} |
| | | <i @click="editTwoClick" class="el-icon-edit-outline cursor_pointer font_size_20"></i> |
| | | </template> |
| | | <template v-else> |
| | | <el-input |
| | | v-model.number="form.produceAheadDay" |
| | | maxlength="20" |
| | | style="width: calc(100% - 80px)" |
| | | clearable |
| | | placeholder="请输入" |
| | | class="margin_right_15px" |
| | | ></el-input> |
| | | <el-button type="text" @click="submitEditTwoClick('form')">确定</el-button> |
| | | </template> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer tac"> |
| | | <el-button type="cancel" @click="cancelMethod()">取消</el-button> |
| | | <el-button type="primary" @click="submitForm('form')">确定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDeleteFollowRecord } from "@/api/employeeManage/employeeInfo.js" |
| | | export default { |
| | | props: { |
| | | editRow: { |
| | | type: Object, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | islook: true, |
| | | form: { |
| | | id: '', |
| | | isCore: '', |
| | | phoneNum: '', |
| | | }, |
| | | isEditOne:false, |
| | | isEditTwo:false, |
| | | DeviceList:[], |
| | | rules: { |
| | | id: [ |
| | | { |
| | | required: true, |
| | | message: "请输入人员姓名", |
| | | trigger: ["blur", "change"], |
| | | }, |
| | | ], |
| | | name: [ |
| | | { |
| | | required: true, |
| | | message: "请输入员工编码", |
| | | trigger: ["blur", "change"], |
| | | }, |
| | | ], |
| | | produceAheadDay: [ |
| | | { |
| | | required: false, |
| | | message: "请输入", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: this.validatorNum, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | watch: { |
| | | islook(newVal) { |
| | | if (newVal) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | editRow() { |
| | | this.formInfo() |
| | | }, |
| | | }, |
| | | methods: { |
| | | editOneClick(){ |
| | | this.isEditOne=true |
| | | }, |
| | | submitEditOneClick(){ |
| | | this.isEditOne=false |
| | | }, |
| | | editTwoClick(){ |
| | | this.isEditTwo=true |
| | | }, |
| | | submitEditTwoClick(){ |
| | | this.isEditTwo=false |
| | | }, |
| | | formInfo() { |
| | | if (this.islook) { |
| | | this.form = { |
| | | isCore: "", |
| | | id: "", |
| | | }; |
| | | this.$nextTick(()=>{ |
| | | this.$refs["form"].resetFields(); |
| | | if (this.editRow.id) { |
| | | this.form = JSON.parse(JSON.stringify(this.editRow)); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | validatorNum(rule, value, callback) { |
| | | if (value) { |
| | | if (value == undefined || value == null) { |
| | | callback(new Error("请输入有效数字")); |
| | | } else { |
| | | var reg = /^\+?[0-9]\d*$/; |
| | | if (!reg.test(value)) { |
| | | callback(new Error("请填写不小于0的数字")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | } |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | cancelMethod() { |
| | | this.$refs["form"].resetFields(); |
| | | this.islook = false; |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let form = JSON.parse(JSON.stringify(this.form)); |
| | | if (this.editRow.type == "add") { |
| | | getDeleteFollowRecord(form).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "添加成功!", |
| | | type: "success", |
| | | }); |
| | | this.cancelMethod(); |
| | | } |
| | | }); |
| | | } else { |
| | | getDeleteFollowRecord(form).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "编辑成功!", |
| | | type: "success", |
| | | }); |
| | | this.cancelMethod(); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dialog-content-box { |
| | | height: 28rem; |
| | | |
| | | .form-box { |
| | | width: 90%; |
| | | padding: 0 5%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <el-dialog :close-on-click-modal="false" :visible.sync="islook" width="35rem" class="add-rule-set-dialog" |
| | | @close="shutdown"> |
| | | <div slot="title" class="tac drawerHeader">规则设置</div> |
| | | <div class="dialog-content-box"> |
| | | <el-form ref="form" class="form-box" :rules="rules" :model="form" :inline="true" label-width="150px" |
| | | label-position="right"> |
| | | <el-form-item label="工作日加班规则:" prop="materialMatch"> |
| | | <el-radio-group v-model="form.materialMatch"> |
| | | <el-radio label="1"> |
| | | 不启用工作日加班 |
| | | </el-radio> |
| | | <el-radio label="2"> |
| | | 超过 |
| | | <el-input class="margin_left_10px margin_right_10px" style="width:120px" v-model.number="form.cycle" |
| | | placeholder="请输入"></el-input> |
| | | 小时算加班 |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="休息日加班规则:" prop="materialMatch"> |
| | | <el-radio-group v-model="form.materialMatch"> |
| | | <el-radio label="1"> |
| | | 不启用休息日加班 |
| | | </el-radio> |
| | | <el-radio label="2"> |
| | | 超过 |
| | | <el-input class="margin_left_10px margin_right_10px" style="width:120px" v-model.number="form.cycle" |
| | | placeholder="请输入"></el-input> |
| | | 小时算加班 |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer tac"> |
| | | <el-button @click="shutdown">取消</el-button> |
| | | <el-button type="primary" @click="onSubmit(form)">确定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getMiniDictList, saveMiniDict } from "@/api/employeeSalary/attendanceStatistics.js" // 版本类型 |
| | | export default { |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | islook: false, |
| | | form: { |
| | | warningDays: 3, |
| | | materialMatch: '1', |
| | | }, |
| | | rules: { |
| | | cycle: [ |
| | | { |
| | | required: true, |
| | | message: "请输入", |
| | | trigger: "blur", |
| | | }, |
| | | { |
| | | validator: this.validatorNum, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | procedureIdsList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.getMiniDictList(); |
| | | }, |
| | | watch: { |
| | | islook(newVal) { |
| | | if (newVal) { |
| | | this.getMiniDictList(); |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].resetFields(); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | validatorNum(rule, value, callback) { |
| | | if (value) { |
| | | if (value == undefined || value == null) { |
| | | callback(new Error("请输入有效数字")); |
| | | } else { |
| | | var reg = /^\+?[0-9]\d*$/; |
| | | if (!reg.test(value)) { |
| | | callback(new Error("请填写不小于0的数字")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | } |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | async getMiniDictList() { |
| | | await getMiniDictList({ type: 3 }).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.data) { |
| | | for (let i in res.data) { |
| | | if (res.data[i].value == '预警天数') { |
| | | this.form.warningDays = parseInt(res.data[i].name); |
| | | } else if (res.data[i].value == '物料匹配条件') { |
| | | this.form.materialMatch = res.data[i].name ? res.data[i].name : '1'; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | onSubmit() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.form); |
| | | let params = { |
| | | list: [ |
| | | { |
| | | name: "" + this.form.warningDays, |
| | | value: "预警天数" |
| | | }, |
| | | { |
| | | name: "" + this.form.materialMatch, |
| | | value: "物料匹配条件" |
| | | }, |
| | | ], |
| | | type: 3, |
| | | }; |
| | | |
| | | saveMiniDict(params).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "保存成功!", |
| | | type: "success", |
| | | }); |
| | | // 保存 |
| | | this.shutdown("save"); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | shutdown(val) { |
| | | this.islook = false; |
| | | this.$emit("closeClick", val); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .add-rule-set-dialog { |
| | | .form-box { |
| | | ::v-deep .el-form-item__content { |
| | | width: calc(100% - 150px); |
| | | } |
| | | |
| | | .el-form-item { |
| | | width: 100%; |
| | | .el-radio{ |
| | | height:40px; |
| | | line-height:40px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | ::v-deep .el-input__inner { |
| | | font-size: 13px !important; |
| | | color: rgba(0, 0, 0, 0.9); |
| | | text-align: left; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="container"></div> |
| | | <div class="silkRegister-form"> |
| | | <div class="filter"> |
| | | <div class="filter-card"> |
| | | <CommonSearch |
| | | :show-add="false" |
| | | :show-download="false" |
| | | :amount-view="false" |
| | | :show-action-btn="false" |
| | | placeholder="请输入关键词" |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <template slot="leftButton"> |
| | | <div class="margin_right_20px" style="width:200px;"> |
| | | <el-date-picker v-model="object.date" style="width:100%" type="month" placeholder="选择日期" |
| | | value-format="yyyy-MM"> |
| | | </el-date-picker> |
| | | </div> |
| | | <el-button size="small" type="primary" @click="ruleSettingClick">规则设置</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="body"> |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <AttendanceStatisticsDetails ref="attendanceStatisticsDetails" :editRow="editRow" @shutdown="getData" /> |
| | | <!-- 规则设置 --> |
| | | <RuleSettingDialog ref="RuleSettingDialog" :editRow="editRow" @closeClick="getData" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFollowRecordList, getDeleteFollowRecord } from "@/api/employeeSalary/attendanceStatistics.js" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import AttendanceStatisticsDetails from "@/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails" |
| | | import RuleSettingDialog from "@/views/employeeSalary/attendanceStatistics/components/RuleSettingDialog" |
| | | import Date from "@/api/date"; |
| | | const { getCurrentMonth } = Date; |
| | | export default { |
| | | name: "attendanceStatistics", |
| | | props: {}, |
| | | components: {}, |
| | | mixins: [], |
| | | computed: {}, |
| | | data() { |
| | | return {} |
| | | props: { |
| | | }, |
| | | created() {}, |
| | | methods: {} |
| | | mixins: [pageMixin], |
| | | components: { |
| | | AttendanceStatisticsDetails, |
| | | RuleSettingDialog |
| | | }, |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | loading: false, |
| | | object:{ |
| | | date:getCurrentMonth() |
| | | }, |
| | | editRow:{ |
| | | |
| | | }, |
| | | searchOptions: [], |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "姓名", prop: "topic", min: 120, default: true }, |
| | | { label: "人员ID", prop: "client_name", min: 190,default: true}, |
| | | { label: "工种", prop: "contact_name", min: 100, }, |
| | | { label: "月份", prop: "client_status", min: 100 }, |
| | | { label: "1/周一", prop: "client_status", min: 100 }, |
| | | { label: "工作日加班时长(小时)", prop: "contact_information_name", min: 180 }, |
| | | { label: "休息日加班时长(小时)", prop: "follow_time", min: 180 }, |
| | | { label: "应出勤天数", prop: "next_follow_time", min: 110 }, |
| | | { label: "实际出勤天数", prop: "member_name", min: 110 }, |
| | | ], |
| | | showCol: [ |
| | | "姓名", |
| | | "人员ID", |
| | | "工种", |
| | | "月份", |
| | | "工作日加班时长(小时)", |
| | | "休息日加班时长(小时)", |
| | | "应出勤天数", |
| | | "实际出勤天数", |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData(this.search_map) |
| | | }, |
| | | computed: { |
| | | }, |
| | | 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) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getFollowRecordList({ |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.client.name, |
| | | contact_name: item.contact.name, |
| | | client_status: item.client_status.name, |
| | | phone: item.contact.phone, |
| | | member_name: item.member.username, |
| | | contact_information_name: item.contact_information.name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableList.tableInfomation = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.client_name = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | // 详情 |
| | | detailsClick(row) { |
| | | let config=JSON.parse(JSON.stringify(row)); |
| | | this.editRow = { ...config, title:'编辑',type:'add' } |
| | | this.$refs.addWorkKind.islook = true; |
| | | }, |
| | | // 打印 |
| | | ruleSettingClick(){ |
| | | this.$refs.RuleSettingDialog.islook = true; |
| | | }, |
| | | |
| | | // 删除 |
| | | delClick(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: [id] }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .silkRegister-form { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | .filter { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 12px 20px 0 20px; |
| | | &-card { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | padding: 10px 20px; |
| | | flex: 1; |
| | | border-radius: 12px; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | .body { |
| | | box-sizing: border-box; |
| | | padding: 10px 20px; |
| | | border-radius: 12px; |
| | | height: calc(100% - 92px); |
| | | .body-card { |
| | | background-color: #fff; |
| | | border-radius: 12px; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-tab-pane label="纤度检验表" name="second"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | |
| | | <div class="filter"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :show-download="false" :amount-view="false" :show-action-btn="false" |
| | | placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="cancelClick">放弃</el-button> |
| | | <el-button size="small" type="primary" @click="saveClick">保存</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | <template v-if="activeName == 'first'"> |
| | | <div class="filter"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :show-download="false" :amount-view="false" :show-action-btn="false" |
| | | placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="cancelClickOne">放弃</el-button> |
| | | <el-button size="small" type="primary" @click="saveClickOne('form')">保存</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="body" v-if="activeName == 'first'"> |
| | | <div class="body-l"> |
| | | <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="left" label-width="70px"> |
| | | <el-form-item label="编号" prop="clientName" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="落丝时间" prop="signTime" class="form-item"> |
| | | <el-date-picker v-model="form.signTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" |
| | | style="width:100%"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="庄口" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="规格" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="组别" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择" style="width: 100%"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="回数" prop="amount" class="form-item"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-input v-model.number="form.amount" placeholder="请输入" show-word-limit |
| | | style="width: 100%"></el-input> |
| | | </el-col> |
| | | <el-col :span="2" style="margin:0 auto;text-align:center;">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-input v-model.number="form.amount" placeholder="请输入" show-word-limit |
| | | style="width: 100%"></el-input> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label="车号" prop="clientName" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <div class="body"> |
| | | <div class="body-l"> |
| | | <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="left" |
| | | label-width="80px"> |
| | | <el-form-item label="编号" prop="number" class="form-item"> |
| | | <el-input v-model="form.number" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="落丝时间" prop="finishDate" class="form-item"> |
| | | <el-date-picker v-model="form.finishDate" value-format="yyyy-MM-dd" type="date" |
| | | placeholder="选择日期" class="select-width"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="庄口" prop="market" class="form-item"> |
| | | <el-select v-model="form.market" placeholder="请选择" class="select-width"> |
| | | <el-option v-for="item in marketList" :key="item.ID" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="name" class="form-item"> |
| | | <el-select v-model="form.name" placeholder="请选择" class="select-width"> |
| | | <el-option v-for="item in nameList" :key="item.ID" :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="规格" prop="spec" class="form-item"> |
| | | <el-input v-model="form.spec" placeholder="请输入"> |
| | | </el-input> |
| | | <!-- <el-select v-model="form.spec" placeholder="请选择" class="select-width"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | <el-form-item label="组别" prop="workshopGroup" class="form-item"> |
| | | <el-select v-model="form.workshopGroup" placeholder="请选择" class="select-width"> |
| | | <el-option v-for="item in workshopGroupList" :key="item.ID" :label="item.name" |
| | | :value="item.ID"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="回数" prop='circle' class="form-item"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-form-item label="" @input="inputStart" label-width="0" prop="startCircle" class="select-width"> |
| | | <el-input v-model.number="form.startCircle" placeholder="请输入" show-word-limit |
| | | class="select-width"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="2" style="margin:0 auto;text-align:center;">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="" label-width="0" prop="endCircle" class="select-width"> |
| | | |
| | | <el-input v-model.number="form.endCircle" @input="inputStart" placeholder="请输入" show-word-limit |
| | | class="select-width"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label="车号" prop="position" class="form-item"> |
| | | <el-input v-model="form.position" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="list-view"> |
| | | <TableCommonView ref="tableListRef" :colOpenShow="false" v-loading="loading" :table-list="tableList" |
| | | @selTableCol="selTableCol"> |
| | | </TableCommonView> |
| | | </div> |
| | | </div> |
| | | <div class="body-r"> |
| | | 纤度: |
| | | <p>{{ form.sumFineness }}</p> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-if="activeName == 'second'"> |
| | | <!-- <div class="body-two body" v-if="activeName == 'second'"> |
| | | <div class="body-two-t">纤度检验表</div> |
| | | <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="right" label-width="60px"> |
| | | <div class="form-box-t"> |
| | | <el-form-item label="编号" prop="clientName" class="form-item"> |
| | | 1234546677 |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="组别" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择" style="width: 100%"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="回数" prop="amount" class="form-item"> |
| | | <el-input v-model.number="form.amount" placeholder="请输入" show-word-limit |
| | | style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="规格" prop="clientName" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="日期" prop="signTime" class="form-item"> |
| | | <el-date-picker v-model="form.signTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" |
| | | style="width:100%"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="list-view"> |
| | | <el-table ref="multipleTable" :data="tableTwoList.tableInfomation" tooltip-effect="dark" |
| | | style="width: 100%"> |
| | | <el-table-column label="车号" prop="templateName" width="100"> |
| | | </el-table-column> |
| | | <el-table-column label="下差纤度" prop="name" width="100" align="center"> |
| | | <template v-for="(item, i) in tableTwoList.lower"> |
| | | <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"> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="目的纤度" prop="name" width="100" align="center"> |
| | | <template v-for="(item, i) in tableTwoList.objective"> |
| | | <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"> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="上差纤度" prop="name" width="100" align="center"> |
| | | <template v-for="(item, i) in tableTwoList.upper"> |
| | | <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"> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="偏差" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="总差" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="野纤" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="大野" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="特野" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="等级" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="II度" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="清洁" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="洁净" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="备注" show-overflow-tooltip> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="form-box-b"> |
| | | <el-form-item label="平均纤度" prop="clientName" class="form-item-two" label-width="100px"> |
| | | 1234546677 |
| | | </el-form-item> |
| | | <el-form-item label="公量纤度" prop="deliverType" class="form-item" label-width="100px"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="偏差" prop="clientName" class="form-item-two"> |
| | | 0.98 |
| | | </el-form-item> |
| | | <el-form-item label="总差" prop="clientName" class="form-item-two"> |
| | | 0.98 |
| | | </el-form-item> |
| | | <el-form-item label="车组等级" prop="deliverType" class="form-item-two" label-width="100px"> |
| | | 4A |
| | | </el-form-item> |
| | | <el-form-item label="II度" prop="amount" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="清洁" prop="clientName" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="洁净" prop="signTime" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="庄口工艺单编号" prop="signTime" class="form-item" label-width="110px"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检验员" prop="signTime" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <div class="list-view"> |
| | | <TableCommonView ref="tableListRef" :colOpenShow="false" v-loading="loading" :table-list="tableList" |
| | | @selTableCol="selTableCol"> |
| | | </TableCommonView> |
| | | </div> |
| | | </div> |
| | | <div class="body-r"> |
| | | 纤度: |
| | | <p>19.00</p> |
| | | </div> |
| | | </div> |
| | | <div class="body-two body" v-if="activeName == 'second'"> |
| | | <div class="body-two-t">纤度检验表</div> |
| | | <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="right" label-width="60px"> |
| | | <div class="form-box-t"> |
| | | <el-form-item label="编号" prop="clientName" class="form-item"> |
| | | 1234546677 |
| | | </el-form-item> |
| | | <el-form-item label="车间" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="组别" prop="deliverType" class="form-item"> |
| | | <el-select v-model="form.deliverType" placeholder="请选择" style="width: 100%"> |
| | | <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="回数" prop="amount" class="form-item"> |
| | | <el-input v-model.number="form.amount" placeholder="请输入" show-word-limit |
| | | style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="规格" prop="clientName" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="日期" prop="signTime" class="form-item"> |
| | | <el-date-picker v-model="form.signTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" |
| | | style="width:100%"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="list-view"> |
| | | <el-table ref="multipleTable" :data="tableTwoList.tableInfomation" tooltip-effect="dark" |
| | | style="width: 100%"> |
| | | <el-table-column label="车号" prop="templateName" width="100"> |
| | | </el-table-column> |
| | | <el-table-column label="下差纤度" prop="name" width="100" align="center"> |
| | | <template v-for="(item, i) in tableTwoList.lower"> |
| | | <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"> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="目的纤度" prop="name" width="100" align="center"> |
| | | <template v-for="(item, i) in tableTwoList.objective"> |
| | | <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"> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="上差纤度" prop="name" width="100" align="center"> |
| | | <template v-for="(item, i) in tableTwoList.upper"> |
| | | <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"> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="偏差" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="总差" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="野纤" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="大野" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="特野" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="等级" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="II度" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="清洁" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="valueRange" label="洁净" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="备注" show-overflow-tooltip> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="form-box-b"> |
| | | <el-form-item label="平均纤度" prop="clientName" class="form-item-two" label-width="100px"> |
| | | 1234546677 |
| | | </el-form-item> |
| | | <el-form-item label="公量纤度" prop="deliverType" class="form-item" label-width="100px"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="偏差" prop="clientName" class="form-item-two"> |
| | | 0.98 |
| | | </el-form-item> |
| | | <el-form-item label="总差" prop="clientName" class="form-item-two"> |
| | | 0.98 |
| | | </el-form-item> |
| | | <el-form-item label="车组等级" prop="deliverType" class="form-item-two" label-width="100px"> |
| | | 4A |
| | | </el-form-item> |
| | | <el-form-item label="II度" prop="amount" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="清洁" prop="clientName" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="洁净" prop="signTime" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="庄口工艺单编号" prop="signTime" class="form-item" label-width="110px"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检验员" prop="signTime" class="form-item"> |
| | | <el-input v-model="form.clientName" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </div> --> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFollowRecordList } from "@/api/productManage/silkRegisterForm.js" |
| | | import { getRegisterList,saveRegister,getDictList } from "@/api/productManage/silkRegisterForm.js" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "silkRegisterAddPage", |
| | |
| | | search_map: {}, |
| | | is_public: true, |
| | | tableColumn: [ |
| | | { label: "车号", prop: "name", min: 100, default: true }, // 客户名称 |
| | | { label: "纤度值", prop: "member_name", default: true }, // 销售负责人 |
| | | { label: "数量", prop: "client_level", default: true }, // 重要级别 |
| | | { label: "纤度合计", prop: "next_visit_time", min: 90, default: true }, // 下次回访日期 |
| | | { label: "车号", prop: "position", min: 100, default: true }, // 客户名称 |
| | | { label: "纤度值", prop: "fineness", default: true }, // 销售负责人 |
| | | { label: "数量", prop: "quantity", default: true }, // 重要级别 |
| | | { label: "纤度合计", prop: "sum", min: 90, default: true }, // 下次回访日期 |
| | | ], |
| | | showCol: ['车号', '纤度值', '数量', '纤度合计'], |
| | | marketList:[], //庄口 |
| | | nameList:[], //车间 |
| | | workshopGroupList:[], //组别 |
| | | deliveryTypeList: [], |
| | | form: {}, |
| | | form: { |
| | | number:'', |
| | | finishDate:'', |
| | | market:'', |
| | | name:'', |
| | | spec:'', |
| | | workshopGroup:'', |
| | | circle:'', |
| | | startCircle:'', |
| | | endCircle:'', |
| | | position:'', |
| | | }, |
| | | rules: { |
| | | clientName: [ |
| | | { required: true, message: "请选择客户名称", trigger: "change" }, |
| | | number: [ |
| | | { required: true, message: "请填写", trigger: ["change", 'blur'] }, |
| | | ], |
| | | finishDate: [ |
| | | { required: true, message: "请选择", trigger: ["change", 'blur'] }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: "请选择", trigger: ["change", 'blur'] }, |
| | | ], |
| | | spec: [ |
| | | { required: true, message: "请填写", trigger: ["change", 'blur'] }, |
| | | ], |
| | | workshopGroup: [ |
| | | { required: true, message: "请选择", trigger: ["change", 'blur'] }, |
| | | ], |
| | | circle: [ |
| | | { required: true, message: "请填写", trigger: ["change", 'blur'] }, |
| | | ], |
| | | startCircle: [ |
| | | { required: true, message: "请填写", trigger: ["change", 'blur'] }, |
| | | ], |
| | | endCircle: [ |
| | | { required: true, message: "请填写", trigger: ["change", 'blur'] }, |
| | | ], |
| | | position: [ |
| | | { required: true, message: "请填写", trigger: ["change", 'blur'] }, |
| | | ], |
| | | }, |
| | | tableTwoList: { |
| | |
| | | this.activeName = query.activeName ? query.activeName : "first"; |
| | | } |
| | | this.setTable() |
| | | this.getSelectDataList() |
| | | this.search_map = { |
| | | is_public: this.is_public |
| | | } |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | getSelectDataList(){ |
| | | //车间 |
| | | getDictList({ |
| | | dictType: 0, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.nameList=res.data||[] |
| | | } |
| | | }) |
| | | //组别 |
| | | getDictList({ |
| | | dictType: 1, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.workshopGroupList=res.data||[] |
| | | } |
| | | }) |
| | | //庄口 |
| | | getDictList({ |
| | | dictType: 2, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.marketList=res.data||[] |
| | | } |
| | | }) |
| | | }, |
| | | inputStart(){ |
| | | this.form.circle=this.form.startCircle+'-'+this.form.endCircle |
| | | }, |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: false, |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getFollowRecordList({ |
| | | await getRegisterList({ |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | |
| | | } |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | // 纤度登记表 |
| | | // 放弃 |
| | | cancelClickOne() { |
| | | |
| | | }, |
| | | // 保存 |
| | | saveClickOne(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let form = JSON.parse(JSON.stringify(this.form)); |
| | | delete form.circle |
| | | let params = { |
| | | finenessList: this.tableList.tableInfomation, |
| | | ...form |
| | | } |
| | | saveRegister(params).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "保存成功!", |
| | | type: "success", |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // 放弃 |
| | | cancelClick() { |
| | |
| | | &:nth-of-type(3n) { |
| | | margin-right: 0; |
| | | } |
| | | .select-width{ |
| | | width:100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | max-height: calc(100% - 90px - 10px); |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .form-box-b { |
| | | width: 100%; |
| | | height: 60px; |
| | | margin-top:10px; |
| | | margin-top: 10px; |
| | | overflow: hidden; |
| | | .form-item-two{ |
| | | width:160px; |
| | | float:left; |
| | | |
| | | .form-item-two { |
| | | width: 160px; |
| | | float: left; |
| | | } |
| | | |
| | | .form-item { |
| | |
| | | "/api": { |
| | | |
| | | // target: "http://192.168.20.118:8889", // http://192.168.20.119:8002 http://fai365.com:30150/ |
| | | // target: "http://192.168.20.120:8004", |
| | | // target: "http://192.168.20.120:8008", |
| | | target: "http://192.168.20.119:8004", // http://192.168.20.119:8004 http://fai365.com:30150/ |
| | | |
| | | ws: true, |