-
+
@@ -25,7 +25,21 @@ export default {
labelWidth: {
type: String,
default: null
+ },
+ rules: {
+ type: Array,
+ default: null
+ },
+ table: {
+ type: Boolean,
+ default: false
}
}
}
+
+
diff --git a/src/router/index.js b/src/router/index.js
index 8c3f412..c65a194 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -106,6 +106,19 @@ export const constantRoutes = [
meta: { title: '个人中心', icon: 'user' }
}
]
+ },
+ {
+ path: '/util',
+ component: Layout,
+ redirect: 'noredirect',
+ children: [
+ {
+ path: 'k3',
+ component: () => import('@/views/tool/k3/index.vue'),
+ name: 'K3',
+ meta: { title: '金蝶工具', icon: 'tool' }
+ }
+ ]
}
]
diff --git a/src/utils/constants.js b/src/utils/constants.js
index 93a5cd0..12b80ce 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -33,3 +33,9 @@ export const PriceStatus = {
return [this.PASS].includes(status);
}
}
+
+// 工资模式
+export const IncomeMode = {
+ SCORE: "1", // 计分
+ COUNT: "2", // 计量
+}
diff --git a/src/views/tool/k3/FieldConverter.vue b/src/views/tool/k3/FieldConverter.vue
new file mode 100644
index 0000000..cdb1113
--- /dev/null
+++ b/src/views/tool/k3/FieldConverter.vue
@@ -0,0 +1,47 @@
+
+
+
+ 转换主表
+
+
+
+
+
+
diff --git a/src/views/tool/k3/index.vue b/src/views/tool/k3/index.vue
new file mode 100644
index 0000000..7ba8a70
--- /dev/null
+++ b/src/views/tool/k3/index.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/yh/prodOrder/index.vue b/src/views/yh/prodOrder/index.vue
new file mode 100644
index 0000000..023b84e
--- /dev/null
+++ b/src/views/yh/prodOrder/index.vue
@@ -0,0 +1,497 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 删除
+
+
+ 导出
+
+
+ 同步
+
+
+
+
+
+
+
+
+
+
+ {{d.row[column.key]}}
+
+
+
+
+
+ {{d.row[column.key]}}
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/yh/report/components/EditIncome.vue b/src/views/yh/report/components/EditIncome.vue
deleted file mode 100644
index 0df5bca..0000000
--- a/src/views/yh/report/components/EditIncome.vue
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
- 添加一行
- 批量选择员工
-
-
- 未分配工资: {{waitIncome | dv}} 元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 分数
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{d.row.num | fix2 | dv}}
-
-
-
-
-
-
- {{d.row.num | fix2 | dv}}
-
-
-
-
-
-
- {{d.row.income | fix2 | dv}} 元
-
-
-
-
-
-
- {{ incomePoint(d.row.income) | fix2 | dv }} %
-
-
-
-
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/yh/report/components/EditOrder.vue b/src/views/yh/report/components/EditOrder.vue
deleted file mode 100644
index 7259b13..0000000
--- a/src/views/yh/report/components/EditOrder.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- 添加
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
diff --git a/src/views/yh/report/components/EditPrice.vue b/src/views/yh/report/components/EditPrice.vue
deleted file mode 100644
index 296f53e..0000000
--- a/src/views/yh/report/components/EditPrice.vue
+++ /dev/null
@@ -1,224 +0,0 @@
-
-
-
- 添加一行
- 批量选择工序
-
-
-
-
-
-
-
-
-
-
- {onChangePrice(d.row, val)}"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{d.row.price | dv}} 元
-
-
-
-
-
-
- {{ totalPrice(d.row) | dv }} 元
-
-
-
-
-
-
- 订单工序、辅助工序、公共工序
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1000
-
-
-
-
- 300
-
-
-
-
-
-
-
-
-
-
- 添加关联
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/yh/report/components/ReportProductEdit.vue b/src/views/yh/report/components/ReportProductEdit.vue
new file mode 100644
index 0000000..41c13e4
--- /dev/null
+++ b/src/views/yh/report/components/ReportProductEdit.vue
@@ -0,0 +1,435 @@
+
+
+
+ 添加一行
+ 批量选择工序
+
+
+
+
+
+
+
+
+
+
+ 工序
+
+
+
+ {onChangePrice(d.row, val)}" placeholder="点击选择工序" title="选择工序"/>
+
+
+
+
+
+ 总产量
+
+
+
+
+
+ {{d.row.priceUnit}}
+
+
+
+
+
+
+
+
+ {{d.row.pricePrice | dv}} 元
+
+
+
+
+
+
+ {{ totalPrice(d.row) | dv }} 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 员工产量
+
+
+
+
+
+
+
+
+
+
+
+
+ {{d.row.priceUnit}}
+
+
+
+ ¥ {{calcIncome(item.num, d.row.pricePrice) | dv }}
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1000
+
+
+
+
+ 300
+
+
+
+
+
+
+
+
+
+
+ 添加关联
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/yh/report/components/UserProductBatchDialog.vue b/src/views/yh/report/components/UserProductBatchDialog.vue
new file mode 100644
index 0000000..337017e
--- /dev/null
+++ b/src/views/yh/report/components/UserProductBatchDialog.vue
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+ 产量
+ 计分
+
+
+ 请注意!计分模式下,需要提前输入选中行的总产量,否则无法计算员工产量!
+
+
+
+
+ 添加员工
+
+
+
+
+
+
+ 员工
+
+
+
+
+
+
+
+
+
+
+
+ 产量
+
+
+ 分数
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
diff --git a/src/views/yh/report/edit.vue b/src/views/yh/report/edit.vue
index a1842b1..dcef8f1 100644
--- a/src/views/yh/report/edit.vue
+++ b/src/views/yh/report/edit.vue
@@ -5,51 +5,29 @@
-
+
基础信息
-
+
-
+
-
-
- {{item.label}}
-
-
-
-
-
-
-
-
-
+
{{totalPrice.toNumber() | dv}} 元
- 工序列表
- 工序产量
+
-
- 工资详情
-
-
-
-
@@ -62,17 +40,16 @@ import PriceInput from "@/components/Business/Price/PriceInput.vue";
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
import {addReport, getReport, updateReport} from "@/api/yh/report";
import EditHeader from "@/components/EditHeader/index.vue";
-import EditIncome from "@/views/yh/report/components/EditIncome.vue";
import {isEmpty, notNullDecimal} from "@/utils";
-import EditOrder from "@/views/yh/report/components/EditOrder.vue";
import {mapGetters} from "vuex";
-import EditPrice from "@/views/yh/report/components/EditPrice.vue";
import Decimal from "decimal.js";
+import ReportProductEdit from "@/views/yh/report/components/ReportProductEdit.vue";
+import {parseTime} from "@/utils/ruoyi";
export default {
name: "ReportEdit",
dicts: ['income_mode'],
- components: {EditPrice, EditOrder, EditIncome, EditHeader, DeptTreeSelect, PriceInput, FormCol},
+ components: {ReportProductEdit, EditHeader, DeptTreeSelect, PriceInput, FormCol},
data() {
return {
title: null,
@@ -93,14 +70,24 @@ export default {
{ required: true, message: "工资模式不能为空", trigger: "blur" }
]
},
- incomeRules: {
- userId: [
- { required: true, message: "员工不能为空", trigger: "change" }
+ productRules: {
+ priceId: [
+ { required: true, message: "工序不能为空", trigger: "change" }
],
- score: [
- { required: true, message: "分数不能为空", trigger: "blur" },
- { pattern: /^[0-9]*$/, message: "分数只能为数字", trigger: "blur"}
- ]
+ num: [
+ { required: true, message: "产量不能为空", trigger: "change" }
+ ],
+ priceType: [
+ { required: true, message: "工序类型不能为空", trigger: "change" }
+ ],
+ userProductList: {
+ userId: [
+ { required: true, message: "用户不能为空", trigger: "change" }
+ ],
+ num: [
+ { required: true, message: "产量不能为空", trigger: "change" }
+ ]
+ }
},
headerCellStyle: {
backgroundColor: "#f5f7fa",
@@ -112,8 +99,8 @@ export default {
// 总价
totalPrice() {
let total = new Decimal(0);
- if (this.form != null && !isEmpty(this.form.priceList)) {
- this.form.priceList.forEach(item => {
+ if (this.form != null && !isEmpty(this.form.productList)) {
+ this.form.productList.forEach(item => {
total = total.plus(notNullDecimal(item.price).mul(notNullDecimal(item.num)))
})
}
@@ -184,10 +171,8 @@ export default {
updateTime: null,
updateId: null,
updateBy: null,
- reportDate: new Date(),
- incomeList: [],
- orderList: [],
- priceList: [],
+ reportDate: parseTime(new Date(), '{y}-{m}-{d}'),
+ productList: [],
};
this.resetForm("form");
},
diff --git a/src/views/yh/report/index.vue b/src/views/yh/report/index.vue
index 0d3f178..5a991e5 100644
--- a/src/views/yh/report/index.vue
+++ b/src/views/yh/report/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -14,70 +14,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -164,13 +100,16 @@
+
+ {{d.row.totalAmount | dv}} 元
+
- {{d.row[column.key]}}
+ {{d.row[column.key] | dv}}
-
+