From 12b5feba10e8f30553999d77205eb25ec0598f90 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期日, 07 四月 2024 11:27:05 +0800
Subject: [PATCH] login
---
src/components/makepager/pager/PagerView.vue | 4
src/views/systemSetting/silkStandardSetting/components/silkTableList.vue | 23
src/api/productManage/silkRegisterForm.js | 36
src/views/productManage/silkRegisterForm/index.vue | 22
vue.config.js | 6
src/views/employeeSalary/attendanceStatistics/index.vue | 268 +++++
src/views/employeeSalary/attendanceManage/index.vue | 251 +++++
src/views/productManage/silkRegisterForm/addPage.vue | 543 +++++++----
/dev/null | 104 --
src/components/makepager/TableCommonView.vue | 355 ++++---
src/common/untils/request.js | 8
src/views/employeeSalary/attendanceStatistics/components/RuleSettingDialog.vue | 177 ++++
src/views/reportManage/productionReport/index.vue | 121 ++
src/views/systemSetting/silkStandardSetting/index.vue | 192 ++++
src/api/systemSetting/silkStandardSetting.js | 17
src/api/data.js | 65 -
src/views/productManage/productRegisterForm/components/addProductDialog.vue | 12
src/views/other/commonDialog/EditDropdownDialog.vue | 1
src/views/reportManage/payableSalaryReport/index.vue | 145 +++
src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue | 228 +++++
src/views/productManage/productRegisterForm/addProductRegisterPage.vue | 8
21 files changed, 1,991 insertions(+), 595 deletions(-)
diff --git a/src/api/data.js b/src/api/data.js
index be0d736..deb21f5 100644
--- a/src/api/data.js
+++ b/src/api/data.js
@@ -1,59 +1,14 @@
-// 閲囪喘鐘舵��
-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
}
}
diff --git a/src/api/productManage/silkRegisterForm.js b/src/api/productManage/silkRegisterForm.js
index de9a91f..5b05747 100644
--- a/src/api/productManage/silkRegisterForm.js
+++ b/src/api/productManage/silkRegisterForm.js
@@ -1,29 +1,37 @@
import request from "@/common/untils/request.js"
-// 璺熻繘璁板綍鍒楄〃
-export function getFollowRecordList(data) {
+// 绾ゅ害鐧昏鍒楄〃
+export function getRegisterList(data) {
return request({
- url: "/api/followRecord/list",
+ url: "/api-jl/v1/fineness/register?page="+ data.page+"&pageSize="+data.pageSize,
+ method: "get",
+ data
+ })
+}
+//淇濆瓨绾ゅ害鐧昏
+export function saveRegister(data) {
+ return request({
+ url: "/api-jl/v1/fineness/register",
method: "post",
data
})
}
-// 娣诲姞璺熻繘璁板綍
-export function getAddFollowRecord(data) {
+// 鍒犻櫎绾ゅ害鐧昏鍒楄〃
+export function getDeleteRegister(data) {
return request({
- url: "/api/followRecord/add",
- method: "post",
- data
- })
-}
-// 鍒犻櫎璺熻繘璁板綍
-export function getDeleteFollowRecord(data) {
- return request({
- url: "/api/followRecord/delete",
+ url: "/api-jl/v1/fineness/register/"+data.id,
method: "delete",
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({
diff --git a/src/api/supplierManage/supplier.js b/src/api/supplierManage/supplier.js
deleted file mode 100644
index 94cad95..0000000
--- a/src/api/supplierManage/supplier.js
+++ /dev/null
@@ -1,104 +0,0 @@
-import request from "@/common/untils/request.js"
-import axios from "axios"
-
-// 鏈嶅姟鍟嗗垪琛�
-export const getSupplierList = async (data) => {
- return await axios.get(`/api/s/getSupplierList`, {
- params: data
- })
-}
-// 鍒涘缓鏈嶅姟鍟�
-export function createSupplier(data) {
- return request({
- url: "/api/s/createSupplier",
- method: "post",
- data
- })
-}
-// 鍒犻櫎鏈嶅姟鍟�
-export function deleteSupplier(data) {
- return request({
- url: "/api/s/deleteSupplier",
- method: "delete",
- data
- })
-}
-// 鏇存柊鏈嶅姟鍟�
-export function updateSupplier(data) {
- return request({
- url: "/api/s/updateSupplier",
- method: "put",
- data
- })
-}
-// 淇敼鏈嶅姟鍟嗙姸鎬�
-export function changeSupplierStatus(data) {
- return request({
- url: "/api/s/changeSupplierStatus",
- method: "post",
- data
- })
-}
-// 鐢╥d鏌ヨ鏈嶅姟鍟�
-export const findSupplier = async (data) => {
- return await axios.get(`/api/s/findSupplier`, {
- params: data
- })
-}
-
-// 鏇存柊鏈嶅姟鍟嗙被鍨�
-export function updateSupplierType(data) {
- return request({
- url: "/api/st/updateSupplierType",
- method: "put",
- data
- })
-}
-// 鏈嶅姟鍟嗙被鍨嬪垪琛�
-export const getSupplierTypeList = async (data) => {
- return await axios.get(`/api/st/getSupplierTypeList`, {
- params: data
- })
-}
-
-// 涓婁紶鍚堝悓
-export const createContract = async (data) => {
- return await axios.post(`/api/con/createContract`, data, {
- headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" }
- })
-}
-// 鍒犻櫎鍚堝悓
-export function deleteContract(data) {
- return request({
- url: "/api/con/deleteContract",
- method: "delete",
- data
- })
-}
-// 棰勮鍚堝悓
-export const previewContract = async (data) => {
- return await axios.get(`/api/con/previewContract`, {
- params: data
- })
-}
-// 涓嬭浇鍚堝悓
-export const downloadContract = async (data) => {
- return await axios.get(`/api/con/downloadContract`, {
- params: data
- })
-}
-
-// 鏇存柊鎵�灞炶涓�
-export function updateIndustry(data) {
- return request({
- url: "/api/i/updateIndustry",
- method: "put",
- data
- })
-}
-// 鎵�灞炶涓氬垪琛�
-export const getIndustryList = async (data) => {
- return await axios.get(`/api/i/getIndustryList`, {
- params: data
- })
-}
diff --git a/src/api/systemSetting/silkStandardSetting.js b/src/api/systemSetting/silkStandardSetting.js
new file mode 100644
index 0000000..1c03b3e
--- /dev/null
+++ b/src/api/systemSetting/silkStandardSetting.js
@@ -0,0 +1,17 @@
+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
+ })
+}
diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 9270bbc..5da21ec 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -16,7 +16,13 @@
// if (token != undefined) {
// config.headers.Authorization = "Bearer " + token;
// }
-
+ let token = document.cookie.replace(
+ /(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/,
+ "$1",
+ );
+ if (token) {
+ config.headers.Authorization = "Bearer " + token;
+ }
return config
},
(error) => {
diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index 2a0e649..50ac390 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -1,118 +1,145 @@
+<!-- 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>
@@ -122,16 +149,18 @@
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 }
@@ -139,19 +168,13 @@
}
}
},
- // 鏄惁鍙互閰嶇疆鍒楄〃 琛ㄥご
- colOpenShow: {
- type: Boolean,
- default: true,
- },
showSummary: {
type: Object,
default: () => {
return {
show: false,
sumProp: [],
- mergeNumber: 1,
- totalName: "鏈〉鎬昏"
+ mergeNumber: 1
}
}
},
@@ -161,32 +184,41 @@
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
@@ -204,10 +236,16 @@
.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()
+ }
+ }
}
})
}
@@ -219,7 +257,7 @@
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)) {
@@ -318,9 +356,37 @@
}
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 }) {
@@ -331,8 +397,13 @@
}
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
+ }
}
}
}
@@ -341,9 +412,6 @@
<!-- 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 {
@@ -362,19 +430,22 @@
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;
}
}
}
@@ -403,13 +474,17 @@
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 {
@@ -429,8 +504,8 @@
// line-height: 26px;
// background: #06c062;
top: 0;
- right: 2px;
- z-index: 9999;
+ right: -6px;
+ z-index: 11;
.label {
position: absolute;
top: 6px;
@@ -442,7 +517,7 @@
}
.checkbox-group {
width: 160px;
- height: 330px;
+ height: 300px;
overflow: auto;
display: flex;
flex-direction: column;
diff --git a/src/components/makepager/pager/PagerView.vue b/src/components/makepager/pager/PagerView.vue
index ac30707..d9a8c8f 100644
--- a/src/components/makepager/pager/PagerView.vue
+++ b/src/components/makepager/pager/PagerView.vue
@@ -29,7 +29,7 @@
props: {
pageSizes: {
type: Array,
- default: () => [5, 10, 20, 30, 40]
+ default: () =>[15, 30],
},
layout: {
type: String,
@@ -40,7 +40,7 @@
default: () => {
return {
currPage: 1,
- pageSize: 10,
+ pageSize: 15,
totalCount: 0
}
}
diff --git a/src/views/employeeSalary/attendanceManage/index.vue b/src/views/employeeSalary/attendanceManage/index.vue
index 18ed369..1b5873a 100644
--- a/src/views/employeeSalary/attendanceManage/index.vue
+++ b/src/views/employeeSalary/attendanceManage/index.vue
@@ -1,21 +1,252 @@
<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>
diff --git a/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue b/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue
new file mode 100644
index 0000000..a080151
--- /dev/null
+++ b/src/views/employeeSalary/attendanceStatistics/components/AttendanceStatisticsDetails.vue
@@ -0,0 +1,228 @@
+<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>
diff --git a/src/views/employeeSalary/attendanceStatistics/components/RuleSettingDialog.vue b/src/views/employeeSalary/attendanceStatistics/components/RuleSettingDialog.vue
new file mode 100644
index 0000000..30d6a40
--- /dev/null
+++ b/src/views/employeeSalary/attendanceStatistics/components/RuleSettingDialog.vue
@@ -0,0 +1,177 @@
+<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>
diff --git a/src/views/employeeSalary/attendanceStatistics/index.vue b/src/views/employeeSalary/attendanceStatistics/index.vue
index 02d4ef8..97b3de6 100644
--- a/src/views/employeeSalary/attendanceStatistics/index.vue
+++ b/src/views/employeeSalary/attendanceStatistics/index.vue
@@ -1,21 +1,269 @@
<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>
diff --git a/src/views/other/commonDialog/EditDropdownDialog.vue b/src/views/other/commonDialog/EditDropdownDialog.vue
index 61713a6..2abc4e2 100644
--- a/src/views/other/commonDialog/EditDropdownDialog.vue
+++ b/src/views/other/commonDialog/EditDropdownDialog.vue
@@ -211,3 +211,4 @@
margin-left: 0px;
}
</style>
+@/api/systemSetting/supplier
diff --git a/src/views/productManage/productRegisterForm/addProductRegisterPage.vue b/src/views/productManage/productRegisterForm/addProductRegisterPage.vue
index 4957b7f..51564e9 100644
--- a/src/views/productManage/productRegisterForm/addProductRegisterPage.vue
+++ b/src/views/productManage/productRegisterForm/addProductRegisterPage.vue
@@ -5,7 +5,7 @@
<el-button type="primary" size="small">鏀惧純</el-button>
<el-button type="primary" size="small">淇濆瓨</el-button>
<el-divider direction="vertical"></el-divider>
- <el-button type="primary" size="small">閫�鍑�</el-button>
+ <el-button type="primary" size="small" @click="quitClick">閫�鍑�</el-button>
</div>
<div class="t-right">
<div class="t-right-circle" :class="isDeviceConnectStatus ? 't-r-bg-green ' : 't-r-bg-red '"></div>
@@ -226,7 +226,7 @@
computed: {},
data() {
return {
- isDeviceConnectStatus: false,
+ isDeviceConnectStatus: true,
ruleForm: {
number: "",
productTime: "",
@@ -281,6 +281,10 @@
if (this.isDeviceConnectStatus) {
this.$refs.addProductDialog.editDialogVisible = true
}
+ },
+ // 閫�鍑�
+ quitClick() {
+ this.$router.go(-1)
}
}
}
diff --git a/src/views/productManage/productRegisterForm/components/addProductDialog.vue b/src/views/productManage/productRegisterForm/components/addProductDialog.vue
index 7dca258..9bed2ef 100644
--- a/src/views/productManage/productRegisterForm/components/addProductDialog.vue
+++ b/src/views/productManage/productRegisterForm/components/addProductDialog.vue
@@ -4,7 +4,8 @@
: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">
@@ -173,14 +174,19 @@
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;
} */
diff --git a/src/views/productManage/silkRegisterForm/addPage.vue b/src/views/productManage/silkRegisterForm/addPage.vue
index 10f1fad..62f66a8 100644
--- a/src/views/productManage/silkRegisterForm/addPage.vue
+++ b/src/views/productManage/silkRegisterForm/addPage.vue
@@ -6,213 +6,230 @@
<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",
@@ -230,17 +247,55 @@
search_map: {},
is_public: true,
tableColumn: [
- { label: "杞﹀彿", prop: "name", min: 100, default: true }, // 瀹㈡埛鍚嶇О
- { label: "绾ゅ害鍊�", prop: "member_name", default: true }, // 閿�鍞礋璐d汉
- { 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 }, // 閿�鍞礋璐d汉
+ { 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: {
@@ -286,12 +341,42 @@
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,
@@ -324,7 +409,7 @@
// 璇锋眰鏁版嵁
async getData() {
this.loading = true
- await getFollowRecordList({
+ await getRegisterList({
search_map: this.search_map,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
@@ -404,6 +489,35 @@
}
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() {
@@ -491,6 +605,9 @@
&:nth-of-type(3n) {
margin-right: 0;
}
+ .select-width{
+ width:100%;
+ }
}
}
@@ -561,14 +678,16 @@
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 {
diff --git a/src/views/productManage/silkRegisterForm/index.vue b/src/views/productManage/silkRegisterForm/index.vue
index ba237f2..f301c9d 100644
--- a/src/views/productManage/silkRegisterForm/index.vue
+++ b/src/views/productManage/silkRegisterForm/index.vue
@@ -46,7 +46,7 @@
</template>
<script>
-import { getFollowRecordList, getDeleteFollowRecord } from "@/api/productManage/silkRegisterForm.js"
+import { getRegisterList, getDeleteRegister } from "@/api/productManage/silkRegisterForm.js"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
@@ -68,14 +68,14 @@
},
search_map: {},
tableColumn: [
- { label: "缂栧彿", prop: "topic", min: 120, default: true }, // 涓婚
- { label: "钀戒笣鏃堕棿", prop: "client_name", min: 190, }, // 瀹㈡埛鍚嶇О
- { label: "杞︾粍", prop: "contact_name", min: 100, }, // 鑱旂郴浜哄鍚�
- { label: "瑙勬牸", prop: "client_status", min: 100 }, // 瀹㈡埛鐘舵��
- { label: "杞﹂棿", prop: "contact_information_name", min: 100 }, // 鑱旂郴鏂瑰紡
- { label: "搴勫彛", prop: "follow_time", min: 130 }, // 鑱旂郴浜烘棩鏈�
- { label: "寮�濮嬪洖鏁�", prop: "next_follow_time", min: 130 }, // 涓嬫鍥炶鏃ユ湡
- { label: "缁撴潫鍥炴暟", prop: "member_name", min: 110 }, // 璐熻矗浜�
+ { label: "缂栧彿", prop: "number", min: 120, default: true }, // 涓婚
+ { label: "钀戒笣鏃堕棿", prop: "finishDate", min: 190, }, // 瀹㈡埛鍚嶇О
+ { label: "杞︾粍", prop: "workshopGroup", min: 100, }, // 鑱旂郴浜哄鍚�
+ { label: "瑙勬牸", prop: "spec", min: 100 }, // 瀹㈡埛鐘舵��
+ { label: "杞﹂棿", prop: "name", min: 100 }, // 鑱旂郴鏂瑰紡
+ { label: "搴勫彛", prop: "market", min: 130 }, // 鑱旂郴浜烘棩鏈�
+ { label: "寮�濮嬪洖鏁�", prop: "startCircle", min: 130 }, // 涓嬫鍥炶鏃ユ湡
+ { label: "缁撴潫鍥炴暟", prop: "endCircle", min: 110 }, // 璐熻矗浜�
],
showCol: [
"缂栧彿",
@@ -127,7 +127,7 @@
// 璇锋眰鏁版嵁
async getData() {
this.loading = true
- await getFollowRecordList({
+ await getRegisterList({
search_map: this.search_map,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
@@ -197,7 +197,7 @@
type: "warning"
})
.then(() => {
- getDeleteFollowRecord({ ids: [id] }).then((response) => {
+ getDeleteRegister({ ids: id }).then((response) => {
if (response.code === 200) {
this.$message.success("鍒犻櫎鎴愬姛")
this.getData()
diff --git a/src/views/reportManage/payableSalaryReport/index.vue b/src/views/reportManage/payableSalaryReport/index.vue
index 67cd691..597d66b 100644
--- a/src/views/reportManage/payableSalaryReport/index.vue
+++ b/src/views/reportManage/payableSalaryReport/index.vue
@@ -1,21 +1,154 @@
<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>
diff --git a/src/views/reportManage/productionReport/index.vue b/src/views/reportManage/productionReport/index.vue
index ab4ef1b..4542902 100644
--- a/src/views/reportManage/productionReport/index.vue
+++ b/src/views/reportManage/productionReport/index.vue
@@ -1,21 +1,130 @@
<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>
diff --git a/src/views/systemSetting/silkStandardSetting/components/silkTableList.vue b/src/views/systemSetting/silkStandardSetting/components/silkTableList.vue
index 8875782..d900a09 100644
--- a/src/views/systemSetting/silkStandardSetting/components/silkTableList.vue
+++ b/src/views/systemSetting/silkStandardSetting/components/silkTableList.vue
@@ -67,7 +67,7 @@
:disabled="!isOperate"
@change="
(val) => {
- commonInputChange(val, item.prop, scope.row, scope)
+ commonInputChange(val, item.prop, scope)
}
"
></el-input>
@@ -83,7 +83,7 @@
v-for="(item, index) in projectOptions"
:key="index"
:label="item.value"
- :value="item.value"
+ :value="item.id"
>
</el-option>
</el-select>
@@ -162,6 +162,11 @@
"
></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>
@@ -198,6 +203,7 @@
<script>
// import { getProductList } from "@/api/common/other"
+import { getDataByType } from "@/api/data"
export default {
name: "CommmonFormTableView",
components: {},
@@ -250,13 +256,7 @@
productList: [],
tableList: [],
projectIndex: 0,
- projectOptions: [
- { id: 1, value: "绾ゅ害鍋忓樊" },
- { id: 2, value: "浜屾鍙樺寲" },
- { id: 3, value: "娓呮磥鍒�" },
- { id: 4, value: "娲佸噣鍒�" },
- { id: 5, value: "鏈�澶у亸宸�" }
- ]
+ projectOptions: getDataByType("projectOptions")
}
},
created() {
@@ -299,8 +299,8 @@
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) {
@@ -317,6 +317,7 @@
// 娣诲姞鍒楀ご閮ㄦ爣棰樿緭鍏�
addColumnInputChange(val, prop) {
console.log(val, prop, "娣诲姞鍒楀ご閮ㄦ爣棰樿緭鍏�")
+ this.$emit("addColumnInputChange", val, prop)
},
// 鍒犻櫎鍒�
clearupColumn(prop) {
diff --git a/src/views/systemSetting/silkStandardSetting/index.vue b/src/views/systemSetting/silkStandardSetting/index.vue
index 43fb89c..3417be4 100644
--- a/src/views/systemSetting/silkStandardSetting/index.vue
+++ b/src/views/systemSetting/silkStandardSetting/index.vue
@@ -5,7 +5,7 @@
<template slot="leftButton">
<el-button size="small" type="primary" @click="addBtnClick">鏂板</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>
@@ -24,6 +24,7 @@
@addProjectClick="addBtnClick"
@clearupProject="clearupProject"
@deleteClick="clearupProject"
+ @addColumnInputChange="addColumnInputChange"
>
</SilkTableList>
</div>
@@ -33,6 +34,8 @@
<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: {},
@@ -43,13 +46,91 @@
return {
isEdit: false,
silkTableList: {},
- tableData: []
+ tableData: [],
+ 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: {
+ 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,
@@ -80,12 +161,33 @@
})
},
// 鍒锋柊
- 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) {
@@ -95,6 +197,86 @@
// 淇濆瓨缂栬緫鎸夐挳鍒囨崲
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 = "prop" + this.columnNum
+ this.tableColumn.splice(2, 0, { label: "", prop: propStr, inputFloat: true, addColumn: true })
+ this.$set(this.dataObj, propStr, 0)
+ 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) {
+ let currentIndex = 0
+ this.tableColumn.map((item, index) => {
+ if (item.prop == prop) {
+ currentIndex = index
+ }
+ })
+ 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 "--"
+ }
}
}
}
diff --git a/vue.config.js b/vue.config.js
index b48fa64..f0c0319 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -14,10 +14,10 @@
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:8004",
- target: "http://192.168.20.119:8004", // http://192.168.20.119:8004 http://fai365.com:30150/
+ // target: "http://192.168.20.120:8008",
+ // 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
--
Gitblit v1.8.0