部署
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
<script lang="tsx">
|
||||
//表格
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from 'vue-router';
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const tableRef = ref();
|
||||
const router = useRouter();
|
||||
//列
|
||||
const columns = ref([
|
||||
{ prop: "districtName", label: "内部订单号",hideInSearchForm: true },
|
||||
{ label: "物料编码", prop: "name",hideInSearchForm: true },
|
||||
{ label: "物料信息", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "成本中心代码" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "成本中心名称",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本1)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本1)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "人工工时(版本1)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "人工费率(版本1)",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本2)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本2)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "人工工时(版本2)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "人工费率(版本2)",hideInSearchForm: true },
|
||||
{ label: "人工差价", prop: "name",hideInSearchForm: true },
|
||||
{ label: "人工量差", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "人工总差" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "基于成品结构用量(版本1)",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本1)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "燃动力工时(版本1)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "燃动力费率(版本1)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "基于成品结构用量(版本2)",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本2)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "燃动力工时(版本2)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "燃动力费率(版本2)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "燃动力价差",hideInSearchForm: true },
|
||||
{ label: "燃动力量差", prop: "name",hideInSearchForm: true },
|
||||
{ label: "燃动力总差", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "基于成品结构用量(版本1)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "单个零件报工工时(版本1)",hideInSearchForm: true },
|
||||
{ label: "辅料工时(版本1)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "辅料费率(版本1)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "基于成品结构用量(版本2)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "单个零件报工工时(版本2)",hideInSearchForm: true },
|
||||
{ label: "辅料工时(版本2)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "辅料费率(版本2)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "辅料价差" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "辅料量差",hideInSearchForm: true },
|
||||
{ label: "辅料总差", prop: "name",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本1)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "单个零件报工工时(版本1)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "其他工时(版本1)",hideInSearchForm: true },
|
||||
{ label: "其他费率(版本1)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本2)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "单个零件报工工时(版本2)" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "其他工时(版本2)",hideInSearchForm: true },
|
||||
{ label: "其他费率(版本2)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "其他价差", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "其他量差" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "其他总差",hideInSearchForm: true },
|
||||
]);
|
||||
|
||||
const render = () => {
|
||||
return (
|
||||
<BaseTable
|
||||
columns={columns.value}
|
||||
queryParamsToUrl
|
||||
ref={tableRef}
|
||||
request={async ({ pageSize = 10, current = 1, ...otherSearchParams }) => {
|
||||
await new Promise((resolve) => setTimeout(resolve, Math.random() * 1111));
|
||||
return {
|
||||
data: Array(pageSize)
|
||||
.fill(0)
|
||||
.map((item, index) => ({
|
||||
id: Math.random(),
|
||||
name: "Tom" + current,
|
||||
date123: "date123" + current,
|
||||
createTime: new Date().getTime(),
|
||||
districtName: "区划" + index,
|
||||
districtName1: "区划1" + index,
|
||||
})),
|
||||
current,
|
||||
// pages: 500 / pageSize,
|
||||
total: 500,
|
||||
};
|
||||
}}
|
||||
curdConfig={{
|
||||
}}
|
||||
v-slots={{
|
||||
toolbar: ({ doAddOrEdit }) => (
|
||||
<el-space>
|
||||
<el-button type="danger" onClick={toBack}>返回</el-button>
|
||||
</el-space>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
const toBack = ()=>{
|
||||
router.go(-1);
|
||||
}
|
||||
return render;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,73 @@
|
||||
<script lang="tsx">
|
||||
//表格
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from 'vue-router';
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const tableRef = ref();
|
||||
const router = useRouter();
|
||||
//列
|
||||
const columns = ref([
|
||||
{ prop: "districtName", label: "成本中心代码",hideInSearchForm: true },
|
||||
{ label: "成本中心代码名称", prop: "name",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本1)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "单个零件报工工时(版本1)" ,hideInSearchForm: true },
|
||||
{ prop: "districtName", label: "人工工时(版本1)",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本2)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本2)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "人工工时(版本2)" ,hideInSearchForm: true },
|
||||
{ prop: "districtName", label: "人工工时总差",hideInSearchForm: true },
|
||||
{ label: "基于成品结构用量(版本1)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本1)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "机器工时(版本1)" ,hideInSearchForm: true },
|
||||
{ prop: "districtName", label: "基于成品结构用量(版本2)",hideInSearchForm: true },
|
||||
{ label: "单个零件报工工时(版本2)", prop: "name",hideInSearchForm: true },
|
||||
{ label: "机器工时(版本2)", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "机器工时总差" ,hideInSearchForm: true },
|
||||
]);
|
||||
|
||||
const render = () => {
|
||||
return (
|
||||
<BaseTable
|
||||
columns={columns.value}
|
||||
queryParamsToUrl
|
||||
ref={tableRef}
|
||||
request={async ({ pageSize = 10, current = 1, ...otherSearchParams }) => {
|
||||
await new Promise((resolve) => setTimeout(resolve, Math.random() * 1111));
|
||||
return {
|
||||
data: Array(pageSize)
|
||||
.fill(0)
|
||||
.map((item, index) => ({
|
||||
id: Math.random(),
|
||||
name: "Tom" + current,
|
||||
date123: "date123" + current,
|
||||
createTime: new Date().getTime(),
|
||||
districtName: "区划" + index,
|
||||
districtName1: "区划1" + index,
|
||||
})),
|
||||
current,
|
||||
// pages: 500 / pageSize,
|
||||
total: 500,
|
||||
};
|
||||
}}
|
||||
curdConfig={{
|
||||
}}
|
||||
v-slots={{
|
||||
toolbar: ({ doAddOrEdit }) => (
|
||||
<el-space>
|
||||
<el-button type="danger" onClick={toBack}>返回</el-button>
|
||||
</el-space>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
const toBack = ()=>{
|
||||
router.go(-1);
|
||||
}
|
||||
return render;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,75 @@
|
||||
<script lang="tsx">
|
||||
//表格
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useRouter } from 'vue-router';
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const tableRef = ref();
|
||||
const router = useRouter();
|
||||
//列
|
||||
const columns = ref([
|
||||
{ prop: "districtName", label: "单位",hideInSearchForm: true },
|
||||
{ label: "采购类型", prop: "name",hideInSearchForm: true },
|
||||
{ label: "特殊采购类型", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "结构用量" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "单位材料价格",hideInSearchForm: true },
|
||||
{ label: "单位总成本", prop: "name",hideInSearchForm: true },
|
||||
{ label: "版本1", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "结构用量" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "单位材料价格",hideInSearchForm: true },
|
||||
{ label: "单位总成本", prop: "name",hideInSearchForm: true },
|
||||
{ label: "版本2", prop: "date123",hideInSearchForm: true },
|
||||
{ prop: "createTime", label: "结构用量量差" ,hideInSearchForm: true },
|
||||
|
||||
{ prop: "districtName", label: "材料价格价差",hideInSearchForm: true },
|
||||
{ label: "单位成本差异", prop: "name",hideInSearchForm: true },
|
||||
{ label: "备注", prop: "date123",hideInSearchForm: true },
|
||||
]);
|
||||
|
||||
const render = () => {
|
||||
return (
|
||||
<BaseTable
|
||||
columns={columns.value}
|
||||
queryParamsToUrl
|
||||
ref={tableRef}
|
||||
request={async ({ pageSize = 10, current = 1, ...otherSearchParams }) => {
|
||||
await new Promise((resolve) => setTimeout(resolve, Math.random() * 1111));
|
||||
return {
|
||||
data: Array(pageSize)
|
||||
.fill(0)
|
||||
.map((item, index) => ({
|
||||
id: Math.random(),
|
||||
name: "Tom" + current,
|
||||
date123: "date123" + current,
|
||||
createTime: new Date().getTime(),
|
||||
districtName: "区划" + index,
|
||||
districtName1: "区划1" + index,
|
||||
})),
|
||||
current,
|
||||
// pages: 500 / pageSize,
|
||||
total: 500,
|
||||
};
|
||||
}}
|
||||
curdConfig={{
|
||||
}}
|
||||
v-slots={{
|
||||
toolbar: ({ doAddOrEdit }) => (
|
||||
<el-space>
|
||||
<el-button type="danger" onClick={toBack}>返回</el-button>
|
||||
</el-space>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
const toBack = ()=>{
|
||||
router.go(-1);
|
||||
}
|
||||
return render;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,216 @@
|
||||
<script lang="tsx">
|
||||
//表格
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { transformPageResponse } from "@/utils/qomo";
|
||||
import { useRouter } from "vue-router";
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const tableRef = ref();
|
||||
const forecastDialogRef = ref();
|
||||
const selectionRows = ref([]);
|
||||
const btnTitle = ref("工时差异");
|
||||
// const uploadUrl = ref("/c7525cost/importExcel");
|
||||
//列
|
||||
const columnsCheck = ref([
|
||||
{ prop: "type", label: "对比项", hideInSearchForm: true },
|
||||
{
|
||||
label: "金额(单位:元)",
|
||||
prop: "costCenterCode",
|
||||
hideInSearchForm: true
|
||||
},
|
||||
{ label: "版本1", prop: "factory", hideInSearchForm: true },
|
||||
{ label: "版本2", prop: "factory", hideInSearchForm: true },
|
||||
{ label: "差异金额", prop: "factory", hideInSearchForm: true },
|
||||
{
|
||||
type: "operation",
|
||||
label: "差异分析",
|
||||
minWidth: 120,
|
||||
render: ({ row }) => (
|
||||
<base-table-operation
|
||||
btnList={[
|
||||
{
|
||||
key: "check",
|
||||
label:
|
||||
row.type === 0
|
||||
? "工时差异"
|
||||
: row.type === 1
|
||||
? "人工制费差异"
|
||||
: "材料成本差异",
|
||||
onclick: () => timeVariance(row)
|
||||
}
|
||||
]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
]);
|
||||
const columns = ref([
|
||||
{ type: "selection" },
|
||||
{ prop: "year", label: "内部订单号" },
|
||||
{ label: "物料号", prop: "costCenterCode" },
|
||||
{ label: "成本阶段", prop: "factory" },
|
||||
{ prop: "laborHourRate", label: "版本号", hideInSearchForm: true },
|
||||
{ prop: "equipHourRate", label: "状态",hideInAddOrEditForm: true},
|
||||
{
|
||||
prop: "fuelHourRate",
|
||||
label: "总标准成本(版本1)",
|
||||
hideInSearchForm: true,
|
||||
hideInAddOrEditForm: true
|
||||
},
|
||||
{
|
||||
prop: "auxiliaryHourRate",
|
||||
label: "总标准成本(版本2)",
|
||||
hideInSearchForm: true,
|
||||
hideInAddOrEditForm: true
|
||||
},
|
||||
{ prop: "otherHourRate", label: "总差额", hideInSearchForm: true,hideInAddOrEditForm: true },
|
||||
{ prop: "effectiveDate", label: "差额比", hideInSearchForm: true,hideInAddOrEditForm: true },
|
||||
{
|
||||
valueType: "date",
|
||||
prop: "expirationDate",
|
||||
label: "创建时间",
|
||||
hideInSearchForm: true,
|
||||
hideInAddOrEditForm: true
|
||||
},
|
||||
{
|
||||
type: "operation",
|
||||
label: "操作",
|
||||
minWidth: 120,
|
||||
render: ({ row, doAddOrEdit, doDeleteRows, doPreview }) => (
|
||||
<base-table-operation
|
||||
btnList={[
|
||||
{
|
||||
key: "check",
|
||||
label: "查看报告",
|
||||
onclick: () => checkReport(row)
|
||||
}
|
||||
]}
|
||||
/>
|
||||
)
|
||||
}
|
||||
]);
|
||||
|
||||
const render = () => {
|
||||
return (
|
||||
<div>
|
||||
<BaseTable
|
||||
columns={columns.value}
|
||||
ref={tableRef}
|
||||
selectionRows={selectionRows.value}
|
||||
toolbar={{
|
||||
layout: "search-dnamic,reload,column-setting,fullscreen"
|
||||
}}
|
||||
request={async ({
|
||||
pageSize = 10,
|
||||
current = 1,
|
||||
...otherSearchParams
|
||||
}) => {
|
||||
await new Promise(resolve =>
|
||||
setTimeout(resolve, Math.random() * 1111)
|
||||
);
|
||||
return {
|
||||
data: Array(pageSize)
|
||||
.fill(0)
|
||||
.map((item, index) => ({
|
||||
id: Math.random(),
|
||||
name: "Tom" + current,
|
||||
date123: "date123" + current,
|
||||
createTime: new Date().getTime(),
|
||||
districtName: "区划" + index,
|
||||
districtName1: "区划1" + index
|
||||
})),
|
||||
current,
|
||||
// pages: 500 / pageSize,
|
||||
total: 500
|
||||
};
|
||||
}}
|
||||
curdConfig={{
|
||||
/**
|
||||
* 接受自动表单的数据
|
||||
* @param data
|
||||
*/
|
||||
async onAddOrEdit(data) {},
|
||||
|
||||
unitColSpan: 24
|
||||
}}
|
||||
v-slots={{
|
||||
toolbar: ({ doAddOrEdit, doDeleteRows }) => (
|
||||
<el-space>
|
||||
<el-button type="primary" onClick={doAddOrEdit}>
|
||||
添加对比项
|
||||
</el-button>
|
||||
</el-space>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
<BaseDialog
|
||||
title="报告详情"
|
||||
width="80%"
|
||||
ref={forecastDialogRef}
|
||||
confirmButtonProps={false}
|
||||
>
|
||||
<BaseTable
|
||||
columns={columnsCheck.value}
|
||||
ref={tableRef}
|
||||
selectionRows={selectionRows.value}
|
||||
request={async ({ pageSize = 10, current = 1 }) => {
|
||||
await new Promise(resolve =>
|
||||
setTimeout(resolve, Math.random() * 1111)
|
||||
);
|
||||
return {
|
||||
data: Array(pageSize)
|
||||
.fill(0)
|
||||
.map((item, index) => ({
|
||||
id: Math.random(),
|
||||
name: "Tom" + current,
|
||||
date123: "date123" + current,
|
||||
createTime: new Date().getTime(),
|
||||
districtName: "区划" + index,
|
||||
districtName1: "区划1" + index,
|
||||
type: index % 3
|
||||
})),
|
||||
current,
|
||||
total: 500
|
||||
};
|
||||
}}
|
||||
curdConfig={{
|
||||
/**
|
||||
* 接受自动表单的数据
|
||||
* @param data
|
||||
*/
|
||||
async onAddOrEdit(data) {},
|
||||
|
||||
unitColSpan: 24
|
||||
}}
|
||||
/>
|
||||
</BaseDialog>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const checkReport = () => {
|
||||
forecastDialogRef.value.open();
|
||||
};
|
||||
const timeVariance = row => {
|
||||
if (row.type == 0) {
|
||||
// 工时
|
||||
router.push({
|
||||
path: "/standardComparison/manHour",
|
||||
});
|
||||
} else if (row.type == 1) {
|
||||
// 人工
|
||||
router.push({
|
||||
path: "/standardComparison/artificial",
|
||||
});
|
||||
} else if (row.type == 2) {
|
||||
// 材料
|
||||
router.push({
|
||||
path: "/standardComparison/materials",
|
||||
});
|
||||
}
|
||||
};
|
||||
return render;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user