- | {{ item[0] }} |
+
+ {{ item[0] }}
+ |
{{ item[1] }} |
import scEcharts from "@/components/scEcharts";
import { defineAsyncComponent } from "vue";
-const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666"];
+const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC"];
let tooltip = {
show: true,
trigger: "axis",
@@ -263,7 +266,7 @@ let toolbox = {
};
let legend = {
top: "2%",
- data: ["总产量", "分布电耗", "成本"],
+ data: ["总产量", "分布电耗", "成本", "消耗", "进厂"],
};
let yAxis = [
{
@@ -312,6 +315,38 @@ let yAxis = [
formatter: "{value}",
},
},
+ {
+ type: "value",
+ name: "消耗(t)",
+ position: "right",
+ alignTicks: true,
+ offset: 130,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: colors[3],
+ },
+ },
+ axisLabel: {
+ formatter: "{value}",
+ },
+ },
+ {
+ type: "value",
+ name: "进厂(t)",
+ position: "right",
+ alignTicks: true,
+ offset: 180,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: colors[4],
+ },
+ },
+ axisLabel: {
+ formatter: "{value}",
+ },
+ },
];
export default {
components: {
@@ -340,6 +375,8 @@ export default {
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
+ ["湿电石渣", "消耗", 0, 0, 0, 0, 0, 0, 0, 0],
+ ["湿电石渣", "进厂", 0, 0, 0, 0, 0, 0, 0, 0],
],
cate: "",
apiObj: this.$API.enm.enstat,
@@ -384,6 +421,18 @@ export default {
yAxisIndex: 2,
data: [],
},
+ {
+ name: "消耗",
+ type: "bar",
+ yAxisIndex: 3,
+ data: [],
+ },
+ {
+ name: "进厂",
+ type: "bar",
+ yAxisIndex: 4,
+ data: [],
+ },
],
},
option2: {
@@ -420,6 +469,18 @@ export default {
yAxisIndex: 2,
data: [],
},
+ {
+ name: "消耗",
+ type: "bar",
+ yAxisIndex: 3,
+ data: [],
+ },
+ {
+ name: "进厂",
+ type: "bar",
+ yAxisIndex: 4,
+ data: [],
+ },
],
},
};
@@ -473,7 +534,16 @@ export default {
that.tableDatas[0][2] = data3.total_production;
that.tableDatas[1][2] = data3.elec_consume_unit;
that.tableDatas[2][2] = data3.production_cost_unit;
+ if (data3.imaterial_data.length > 0) {
+ data3.imaterial_data.forEach((item) => {
+ if (item.material_name == "湿电石渣消耗") {
+ that.tableDatas[3][2] = item.amount_consume;
+ }else if(item.material_name == "湿电石渣进厂"){
+ that.tableDatas[4][2] = item.amount_consume;
+ }
+ });
}
+ }
});
//月目标
let params5 = {};
@@ -531,6 +601,15 @@ export default {
that.tableDatas[2][4],
that.tableDatas[2][7]
);
+ if (data1.imaterial_data.length > 0) {
+ data1.imaterial_data.forEach((item) => {
+ if (item.material_name == "湿电石渣消耗") {
+ that.tableDatas[3][4] = item.amount_consume;
+ }else if(item.material_name == "湿电石渣进厂"){
+ that.tableDatas[4][4] = item.amount_consume;
+ }
+ });
+ }
} else {
}
});
@@ -560,6 +639,15 @@ export default {
that.tableDatas[2][3],
that.tableDatas[2][5]
);
+ if (data2.imaterial_data.length > 0) {
+ data2.imaterial_data.forEach((item) => {
+ if (item.material_name == "湿电石渣消耗") {
+ that.tableDatas[3][3] = item.amount_consume;
+ }else if(item.material_name == "湿电石渣进厂"){
+ that.tableDatas[4][3] = item.amount_consume;
+ }
+ });
+ }
}
});
});
@@ -573,7 +661,6 @@ export default {
},
dateChange(val) {
let that = this;
- console.log(val);
if (val !== null) {
if (this.typeRadio == "month") {
let year = val.split("-")[0];
@@ -603,18 +690,31 @@ export default {
this.$API.enm.enstat.req(query1).then((response) => {
let seriesData0 = [],
seriesData1 = [],
- seriesData2 = [];
+ seriesData2 = [],
+ seriesData3 = [],
+ seriesData4 = [];
let data = response;
data.forEach((item) => {
let ind = item.day_s - 1;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_cost_unit;
seriesData2[ind] = item.elec_consume_unit;
+ if (item.imaterial_data.length > 0) {
+ item.imaterial_data.forEach((items_n) => {
+ if (items_n.material_name == "湿电石渣消耗") {
+ seriesData3[ind] = items_n.amount_consume;
+ }else if(items_n.material_name == "湿电石渣进厂"){
+ seriesData4[ind] = items_n.amount_consume;
+ }
+ });
+ }
});
let options = { ...that.option1 };
options.series[0].data = seriesData0;
options.series[1].data = seriesData1;
options.series[2].data = seriesData2;
+ options.series[3].data = seriesData3;
+ options.series[4].data = seriesData4;
let dayXAxis = [];
for (let i = 1; i <= that.days; i++) {
let item = i + "日";
@@ -635,18 +735,31 @@ export default {
this.$API.enm.enstat.req(query2).then((response) => {
let seriesData0 = [],
seriesData1 = [],
- seriesData2 = [];
+ seriesData2 = [],
+ seriesData3 = [],
+ seriesData4 = [];
let data = response;
data.forEach((item) => {
let ind = item.month_s - 1;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_cost_unit;
seriesData2[ind] = item.elec_consume_unit;
+ if (item.imaterial_data.length > 0) {
+ item.imaterial_data.forEach((items_n) => {
+ if (items_n.material_name == "湿电石渣消耗") {
+ seriesData3[ind] = items_n.amount_consume;
+ }else if(items_n.material_name == "湿电石渣进厂"){
+ seriesData4[ind] = items_n.amount_consume;
+ }
+ });
+ }
});
let options = { ...that.option2 };
options.series[0].data = seriesData0;
options.series[1].data = seriesData1;
options.series[2].data = seriesData2;
+ options.series[3].data = seriesData3;
+ options.series[4].data = seriesData4;
let monthXAxis = [];
for (let i = 1; i <= that.month; i++) {
let item = i + "月";
diff --git a/src/views/enm_slag/teamAnalysis.vue b/src/views/enm_slag/teamAnalysis.vue
index c2fc46cf..eb6fcf6e 100644
--- a/src/views/enm_slag/teamAnalysis.vue
+++ b/src/views/enm_slag/teamAnalysis.vue
@@ -85,6 +85,7 @@ export default {
timeStamp: null,
exportLoading: false,
tableDatas: [],
+ goalDatas: [],
};
},
mounted() {
@@ -105,9 +106,9 @@ export default {
this.$API.mtm.goal.list.req(params).then((res) => {
let data = [];
if (res.length > 0) {
- data = res[0];
+ this.goalDatas = res[0];
}
- that.getData(data);
+ that.getData(this.goalDatas);
});
});
},
@@ -121,42 +122,31 @@ export default {
query0.mgroup = that.query.mgroup;
let wrapArr = [],
wrapArr0 = [],
+ compareArr0 = [],
wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
if (data0.length > 0) {
data0.forEach((item0) => {
//先按月份排序,再按班组排序
- let n0 = item0.month_s;
- let ind0 = 0;
- if (item0.team_name.indexOf("甲") > -1) {
- ind0 = (n0 - 1) * 3;
- } else if (item0.team_name.indexOf("乙") > -1) {
- ind0 = (n0 - 1) * 3 + 1;
- } else if (item0.team_name.indexOf("丙") > -1) {
- ind0 = (n0 - 1) * 3 + 2;
- }
wrapArr0[ind0] = item0;
});
- console.log(wrapArr0);
} else {
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if (data.length > 0) {
+ data.forEach((item) => {
+ //先按月份排序,再按班组排序
+ let compareArr = [];
+ compareArr.push(item.month_s);
+ compareArr.push(item.team_name);
+ compareArr.push(item.elec_consume_unit);
+ compareArr0.push(compareArr);
+ });
data.forEach((item) => {
//先按月份排序,再按班组排序
let n = item.month_s;
- let team_name = item.team_name;
- let ind = 0;
- if (team_name.indexOf("甲") > -1) {
- ind = (n - 1) * 3;
- } else if (team_name.indexOf("乙") > -1) {
- ind = (n - 1) * 3 + 1;
- } else if (team_name.indexOf("丙") > -1) {
- ind = (n - 1) * 3 + 2;
- }
- wrapArrs[ind] = item;
let arr = [];
let time = "" + item.year_s + "." + item.month_s;
arr.push(time);
@@ -179,22 +169,21 @@ export default {
? wrapArr0[ind_pre].elec_consume_unit
: "/";
} else {
- ind_pre = n - 1;
- huanqi = wrapArr[ind_pre]
- ? wrapArr[ind_pre].elec_consume_unit
- ? wrapArr[ind_pre].elec_consume_unit
- : "/"
- : "/";
+ // 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
+ compareArr0.forEach((item0) => {
+ if (item0[0] == item.month_s - 1 && item0[1] == item.team_name) {
+ huanqi = item0[2];
+ }
+ })
}
arr[7] = huanqi; //环期值(KW·h/t)上个月的值
- if (huanqi !== "/") {
- huanqicha = item.celec_consume_unit - huanqi;
- } else {
- huanqicha = item.celec_consume_unit;
+ if (arr[6] !== "/"){
+ arr[8] = (arr[4] - arr[7]).toFixed(2); //当期与环期差值(KW·h/t)
+ }else{
+ arr[8] = "/"; //当期与环期差值(KW·h/t)
}
- arr[8] = huanqicha; //当期与环期差值(KW·h/t)
- arr[9] =
- huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //环比增长率(%)
+ // arr[8] = huanqicha; //当期与环期差值(KW·h/t)
+ arr[9] = arr[8] != "/" ? ((arr[7] / arr[8]) * 100).toFixed(2) : 0; //环比增长率(%)
if (wrapArr0[n]) {
tongqicha =
item.celec_consume_unit -
@@ -206,8 +195,10 @@ export default {
}
arr[10] = tongqi; //同比增长率(%)
arr[11] = 0; //得分
- wrapArr[ind] = arr;
+ wrapArr.push(arr);
+
});
+ console.log(wrapArr);
that.tableDatas = wrapArr;
} else {
}
@@ -216,7 +207,7 @@ export default {
},
handleQuery() {
this.tableDatas = [];
- this.getData();
+ this.getData(this.goalDatas);
},
itemClick(type, item) {
this.type = type;
diff --git a/src/views/home/blank.vue b/src/views/home/blank.vue
new file mode 100644
index 00000000..d4b7d494
--- /dev/null
+++ b/src/views/home/blank.vue
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/views/inm/inmScrap.vue b/src/views/inm/inmScrap.vue
new file mode 100644
index 00000000..5edb3cbb
--- /dev/null
+++ b/src/views/inm/inmScrap.vue
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{wmState[scope.row.state]?.text}}
+
+
+
+
+
+ {{ scope.row.material_name }}
+ ({{ scope.row.material_origin_name }})
+
+
+
+
+
+ {{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/inm/mio.vue b/src/views/inm/mio.vue
index f7f02517..1bbd9266 100644
--- a/src/views/inm/mio.vue
+++ b/src/views/inm/mio.vue
@@ -94,6 +94,14 @@
width="150px"
>
+
+ 编辑
+
提交
@@ -211,9 +215,10 @@ export default {
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
- this.$refs.saveDialog.open("edit", type).setData(row);
+ this.$refs.saveDialog.open("edit", row.type).setData(row);
});
},
+
//查看
table_detail(row) {
this.type = row.type;
diff --git a/src/views/inm/mioitem_check.vue b/src/views/inm/mioitem_check.vue
index 534a1ed2..1613fca0 100644
--- a/src/views/inm/mioitem_check.vue
+++ b/src/views/inm/mioitem_check.vue
@@ -1019,15 +1019,10 @@ export default {
that.weight_kgs.forEach((item) => {
arr.push(item.value);
});
- let obj = {};
- obj.test_date = that.form.test_date;
- obj.test_user = that.form.test_user;
- obj.count_bag = that.form.count_bag;
- obj.weight_kgs = arr;
- obj.is_testok = that.form.is_testok;
- console.log(obj);
+ that.form.weight_kgs = arr;
+ console.log('that.form',that.form);
that.$API.inm.mioitem.testpurin
- .req(that.mioitemId, obj)
+ .req(that.mioitemId, that.form)
.then((res) => {
that.isSaveing = false;
that.$emit("success");
diff --git a/src/views/inm/workshop.vue b/src/views/inm/workshop.vue
new file mode 100644
index 00000000..b8d72119
--- /dev/null
+++ b/src/views/inm/workshop.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.material_.name}}
+
+
+ {{scope.row.material_.specification}}
+
+
+ {{scope.row.material_.model}}
+
+
+ {{scope.row.material_.process_name}}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/inm/workshop_mio.vue b/src/views/inm/workshop_mio.vue
new file mode 100644
index 00000000..6386374b
--- /dev/null
+++ b/src/views/inm/workshop_mio.vue
@@ -0,0 +1,254 @@
+
+
+
+
+ 生产领料
+ 生产入库
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ typeDict[scope.row.type] }}
+
+
+
+
+ {{ stateDict[scope.row.state] }}
+
+
+
+
+
+
+ {{ scope.row.belong_dept_name }} - {{ scope.row.mgroup_name }}
+
+
+
+
+
+
+
+
+
+ 查看
+
+
+ 提交
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 38e42be3..bbf754fb 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -61,7 +61,7 @@
- Copyright © 2024 {{ baseConfig.base_right }}
+
diff --git a/src/views/mtm/materials_form_gx.vue b/src/views/mtm/materials_form_gx.vue
index 4620327f..88a370da 100644
--- a/src/views/mtm/materials_form_gx.vue
+++ b/src/views/mtm/materials_form_gx.vue
@@ -66,8 +66,15 @@
/>
-
+
+
+
+
+
{
+ console.error("请求失败", error);
+ });
}
}
});
diff --git a/src/views/mtm/route_form.vue b/src/views/mtm/route_form.vue
index f52b004a..1a80117d 100644
--- a/src/views/mtm/route_form.vue
+++ b/src/views/mtm/route_form.vue
@@ -66,10 +66,10 @@
-->
-
+
-
+
-->
-
+
@@ -171,9 +171,12 @@ const defaultForm = {
process: null,
sort: 1,
out_rate: 100,
+ material_in:'',
+ material_out:'',
+ hour_work:0,
batch_bind: true,
is_autotask: true,
- is_count_utask: false,
+ // is_count_utask: false,
};
export default {
props: {
@@ -185,7 +188,7 @@ export default {
loading: false,
mode: "add",
//表单数据
- form: defaultForm,
+ form: Object.assign({}, defaultForm),
//验证规则
rules: {
process: [
diff --git a/src/views/mtm/routepack_form.vue b/src/views/mtm/routepack_form.vue
index 8d270754..aa16da3b 100644
--- a/src/views/mtm/routepack_form.vue
+++ b/src/views/mtm/routepack_form.vue
@@ -79,67 +79,73 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 删除
+ 编辑
+
+
+ 删除
+
+
-
-
-
-
-
-
+
+
+
+
+
+ 上一步
退出
-
-
+
-
+
+
+
diff --git a/src/views/pum/supplier_form.vue b/src/views/pum/supplier_form.vue
index f4595fa1..1f91e0b9 100644
--- a/src/views/pum/supplier_form.vue
+++ b/src/views/pum/supplier_form.vue
@@ -49,6 +49,14 @@
/>
+
+
+
+
+
diff --git a/src/views/qm/products_form.vue b/src/views/qm/products_form.vue
index 8da06396..e78535c8 100644
--- a/src/views/qm/products_form.vue
+++ b/src/views/qm/products_form.vue
@@ -106,6 +106,25 @@
+
+
+
+
+
+
+
+
@@ -291,6 +310,18 @@
>
+
+
+
+
+
-
+
{
+ that.shiftOtions = res;
+ });
+ },
getUsers(){
let that = this;
let userList = [];
@@ -485,6 +525,7 @@ export default {
this.count_notok_json.count_n_qp=
this.count_notok_json.count_n_swen=
this.count_notok_json.count_n_zb=
+ this.count_notok_json.count_n_zq=
this.count_notok_json.count_n_hs=
this.count_notok_json.count_n_md=
this.count_notok_json.count_n_hqbx=
@@ -507,6 +548,7 @@ export default {
this.count_notok_json.count_n_z+
this.count_notok_json.count_n_swen+
this.count_notok_json.count_n_zb+
+ this.count_notok_json.count_n_zq+
this.count_notok_json.count_n_hs+
this.count_notok_json.count_n_md+
this.count_notok_json.count_n_hqbx+
diff --git a/src/views/statistics/good_check_gx.vue b/src/views/statistics/good_check_gx.vue
index 7583d0e3..eb12918f 100644
--- a/src/views/statistics/good_check_gx.vue
+++ b/src/views/statistics/good_check_gx.vue
@@ -2,6 +2,39 @@
+
+
+
+
+
+
+
导出
-
-
+
+
@@ -32,12 +70,38 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/sys/myschedule.vue b/src/views/sys/myschedule.vue
index 8f29a37d..84e67180 100644
--- a/src/views/sys/myschedule.vue
+++ b/src/views/sys/myschedule.vue
@@ -1,11 +1,16 @@
-
-
-
+
+
+
+
+
+
+
@@ -26,7 +30,7 @@
prop="name"
min-width="100"
>
-
+
-
+
+
@@ -126,6 +131,7 @@
>
+
diff --git a/src/views/wpm_gx/check_form.vue b/src/views/wpm_gx/check_form.vue
index eb777ba6..fc3a507d 100644
--- a/src/views/wpm_gx/check_form.vue
+++ b/src/views/wpm_gx/check_form.vue
@@ -16,26 +16,26 @@
>
-
+
-
- {{item.batch}}
- ({{item.count}})
-
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
-
-
-
+
+
+ precision="0"
+ >
@@ -85,6 +95,16 @@
>
+
+
+
+
+
@@ -135,7 +154,6 @@
v-model="count_notok_json.count_n_wj"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
@@ -147,7 +165,6 @@
v-model="count_notok_json.count_n_yd"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
@@ -159,7 +176,6 @@
v-model="count_notok_json.count_n_txd"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
@@ -171,7 +187,6 @@
v-model="count_notok_json.count_n_qp"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
@@ -183,7 +198,6 @@
v-model="count_notok_json.count_n_swen"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
@@ -195,12 +209,21 @@
v-model="count_notok_json.count_n_bb"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
-
+
+
+
+
+
@@ -220,7 +242,6 @@
v-model="count_notok_json.count_n_md"
style="width: 100%"
precision="0"
-
@change="handleCountChange"
>
@@ -233,7 +254,17 @@
v-model="count_notok_json.count_n_ps"
style="width: 100%"
precision="0"
-
+ @change="handleCountChange"
+ >
+
+
+
+
+
@@ -243,7 +274,7 @@
保存
+ >提交
取消
@@ -273,10 +304,12 @@ export default {
test_date: "",
batch: "",
count: null,
- count_ok: null,
+ count_ok: 0,
+ count_sampling_ok:'',
count_notok: 0,
count_notok_json:{}
},
+ count_ok_rate:100,
count_notok_json:{
//尺寸
count_n_wj: 0,
@@ -289,40 +322,36 @@ export default {
count_n_hs: 0,
count_n_md: 0,
count_n_bb:0,
+ count_n_xbb:0,
count_n_ps: 0,
count_n_qt:0,
},
rules: {
- test_date: [
- {
- required: true,
- message: "请选择检验日期",
- trigger: "blur",
- },
- ],
- batch: [
- {
- required: true,
- message: "请选择物料批次",
- trigger: "blur",
- },
- ],
+ test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}],
+ batch: [{required: true,message: "请选择物料批次",trigger: "blur"}],
+ test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}],
},
+ options: [],
+ userList : [],
+ typeOption:[
+ {name:'全检',value:20},
+ {name:'抽检',value:10},
+ ],
+ selectionFilters: [],
batchCount:null,
formCount:null,
visible: false,
+ supplier:null,
isSaveing: false,
- options: [],
- userList : [],
- selectionFilters: [],
setFiltersVisible: false,
};
},
mounted() {
- this.batchCount = this.itemObj.count;
+ this.batchCount = this.itemObj.count_cando;
this.form.batch = this.itemObj.batch;
this.form.wm = this.itemObj.id;
- this.form.count = this.itemObj.count;
+ this.form.count = this.itemObj.count_cando;
+ this.form.supplier = this.itemObj.supplier;
this.deptID = this.$TOOL.data.get('gx_deptID');
this.getUsers();
},
@@ -332,7 +361,6 @@ export default {
this.mode = mode;
this.modeTitle = mode+'抽检';
this.visible = true;
-
return this;
},
getUsers(){
@@ -351,9 +379,6 @@ export default {
});
});
},
- handleCheckChange(){
- this.form.count_ok = this.form.count-this.form.count_notok;
- },
handleCountChange(type){
this.form.count_notok =
this.count_notok_json.count_n_wj+
@@ -364,12 +389,20 @@ export default {
this.count_notok_json.count_n_swen+
this.count_notok_json.count_n_hs+
this.count_notok_json.count_n_bb+
+ this.count_notok_json.count_n_xbb+
this.count_notok_json.count_n_md+
- this.count_notok_json.count_n_ps;
- this.form.count_ok = this.form.count - this.form.count_notok;
+ this.count_notok_json.count_n_ps+
+ this.count_notok_json.count_n_qt;
+ this.handleCountNotokChange();
},
handleCountNotokChange(){
- this.form.count_ok = this.form.count - this.form.count_notok;
+ if(this.form.type2==10){//抽检
+ this.form.count_sampling_ok = this.form.count_sampling - this.form.count_notok;
+ this.count_ok_rate = ((this.form.count_sampling_ok/this.form.count_sampling)*100).toFixed(2);
+ }else if(this.form.type2==20){//全检
+ this.form.count_ok = this.form.count - this.form.count_notok;
+ this.count_ok_rate = ((this.form.count_ok/this.form.count)*100).toFixed(2);
+ }
},
//获取物料批次
getMaterialBatch() {
@@ -398,17 +431,28 @@ export default {
this.count_notok_json.count_n_swen+
this.count_notok_json.count_n_hs+
this.count_notok_json.count_n_bb+
+ this.count_notok_json.count_n_xbb+
this.count_notok_json.count_n_md+
- this.count_notok_json.count_n_ps;
- if(count_notok>this.form.count_notok){
- this.$notify.error("不合格数量有问题");
+ this.count_notok_json.count_n_ps+
+ this.count_notok_json.count_n_qt;
+ if(count_notok>that.form.count_notok){
+ that.$notify.error("不合格数量有问题");
that.isSaveing = false;
}else{
- if(count_notok {
that.$API.qm.ftestwork.submit.req(res.id)
diff --git a/src/views/wpm_gx/chengpinpao.vue b/src/views/wpm_gx/chengpinpao.vue
index a6e395e8..5eefabab 100644
--- a/src/views/wpm_gx/chengpinpao.vue
+++ b/src/views/wpm_gx/chengpinpao.vue
@@ -32,7 +32,7 @@
+
+
diff --git a/src/views/wpm_gx/fmlog_detail.vue b/src/views/wpm_gx/fmlog_detail.vue
new file mode 100644
index 00000000..6252bce0
--- /dev/null
+++ b/src/views/wpm_gx/fmlog_detail.vue
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+ {{
+ fmlogItem.routepack_name
+ }}
+ {{
+ fmlogItem.mtask_number
+ }}
+ {{
+ fmlogItem.belong_dept_name
+ }}
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+ {{item.batch}}
+ {{item.batch}}
+
+
+
+
+
+
+ {{props.row.count_n_hs}}
+
+
+ {{props.row.count_n_qp}}
+
+
+ {{props.row.count_n_swen}}
+
+
+ {{props.row.count_n_bb}}
+
+
+ {{props.row.count_n_xbb}}
+
+
+ {{props.row.count_n_wm}}
+
+
+ {{props.row.count_n_md}}
+
+
+ {{props.row.count_n_xh}}
+
+
+ {{props.row.count_n_ps}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+ 提交
+
+ 删除
+
+ 撤回
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/fmlog_form.vue b/src/views/wpm_gx/fmlog_form.vue
new file mode 100644
index 00000000..dd28f1a1
--- /dev/null
+++ b/src/views/wpm_gx/fmlog_form.vue
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+ {{ item.routepack_name }}-{{
+ item.process_name
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/fmlogs.vue b/src/views/wpm_gx/fmlogs.vue
new file mode 100644
index 00000000..79c73f0a
--- /dev/null
+++ b/src/views/wpm_gx/fmlogs.vue
@@ -0,0 +1,215 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
+
+
+
+
+
+
+ 编辑
+ 详情
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index df4244e3..99f86c3c 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -16,6 +16,11 @@
v-auth="'handover.create'"
>返工
+ 打印机
+
+
+
+
+
+
+ {{item.batch}}
+
+
+ {{item.count}}
+
+
+ {{item.notok_sign_name}}
+
+
+
+
+
+
+
+ {{scope.row.handoverb.length}}批
+
-
- 交送
-
- 接收
+
+ 交送
+ 接收
+
+
+ 交送
+ 接收
@@ -98,9 +120,12 @@
返工
- 检验
+ 报废
接收
+ v-if="(scope.row.recive_mgroup == mgroupId||scope.row.recive_dept == deptId)&&scope.row.submit_time == null"
+ >接收
+ 查看
{
+ if(res.length>0){
+ that.deptId = res[0].id;
+ that.params.dept=res[0].id;
+ console.log('that.deptId',that.deptId);
+ }
+ that.apiObj = that.$API.wpm.handover.list;
+ })
}else if(that.mgroupName=="facade"){//外观检验
- that.params.material__process__name="二次超洗";
- that.apiObj = that.$API.wpm.handover.list;
+ // that.params.material__process__name="二次超洗";
+ that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
+ if(res.length>0){
+ that.deptId = res[0].id;
+ that.params.dept=res[0].id;
+ console.log('that.deptId',that.deptId);
+ }
+ that.apiObj = that.$API.wpm.handover.list;
+ })
}else{//工段交接
that.printer_name = localStorage.getItem("printer_name");
that.$API.mtm.mgroup.list
@@ -273,6 +317,9 @@ export default {
}
},
methods: {
+ printSetting(){
+ this.setNameVisible = true;
+ },
handoverPrint() {
let that = this;
let str = [
@@ -324,6 +371,13 @@ export default {
this.$refs.saveDialog.open("edit").setData(row);
});
},
+ table_show(row){
+ this.type=row.type;
+ this.dialog.save = true;
+ this.$nextTick(() => {
+ this.$refs.saveDialog.open("show").setData(row);
+ });
+ },
//删除
async table_del(row) {
var id = row.id;
@@ -346,14 +400,26 @@ export default {
searchTypeQuery() {
let that = this;
if (that.searchType == "send") {
- that.query.send_mgroup = that.mgroupId;
- that.query.recive_mgroup = "";
+ if(that.mgroupName=="size"||that.mgroupName=="facade"){
+ that.query.send_dept = that.deptId;
+ that.query.recive_dept = "";
+ }else{
+ that.query.send_mgroup = that.mgroupId;
+ that.query.recive_mgroup = "";
+ }
} else if (that.searchType == "recive") {
- that.query.recive_mgroup = that.mgroupId;
- that.query.send_mgroup = "";
+ if(that.mgroupName=="size"||that.mgroupName=="facade"){
+ that.query.send_dept = "";
+ that.query.recive_dept =that.deptId;
+ }else{
+ that.query.recive_mgroup = that.mgroupId;
+ that.query.send_mgroup = "";
+ }
} else {
that.query.send_mgroup = "";
that.query.recive_mgroup = "";
+ that.query.recive_dept = "";
+ that.query.send_dept = "";
}
console.log(that.query);
this.$refs.table.queryData(that.query);
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index 17503778..675e0371 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -14,35 +14,6 @@
label-width="80px"
>
-
-
-
-
- {{ item.batch }}
-
- {{ item.count }}
- ({{ item.notok_sign_name }})
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.batch }}
+
+ {{ item.count }}
+
+ ({{ item.notok_sign_name }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
确定
@@ -178,16 +200,15 @@ export default {
edit: "编辑交接记录",
show: "查看交接记录",
},
+ lists:[],//交接数组
handle_user: [],
form: {
- batch: "",
- count: 0, //送料数
- wm: "",
- send_date: "",
- send_user: "",
- send_mgroup: "",
- recive_user: "",
- recive_mgroup: "",
+ send_date: null,
+ send_user: null,
+ send_mgroup: null,
+ recive_user: null,
+ recive_mgroup: null,
+ handoverb:[{wm:'',count:''}],
},
rules: {
batch: [
@@ -260,7 +281,6 @@ export default {
let day = date.getDate();
that.form.handle_date = year + "-" + month + "-" + day;
that.form.send_mgroup = that.mgroupId;
- console.log('mgroupName',that.mgroupName)
if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接
that.$API.system.user.list
.req({ page: 0, posts__code__contains: "check" })
@@ -271,7 +291,11 @@ export default {
that.deptID = that.$TOOL.data.get('gx_deptID');
that.getUserList();
}
- that.getMaterial();
+ if(that.type==20||that.type==40){
+ that.getMaterialNotok();
+ }else{
+ that.getMaterial();
+ }
that.getDeptOptions();
that.getMgroupOptions();
},
@@ -296,40 +320,83 @@ export default {
getMaterial() {
let that = this;
var req = {
- mgroupx: that.mgroupId,
page: 0,
notok_sign__isnull : 1,
count_xtest__isnull:1
};
if(that.mgroupName=="size"){
- req.material__process__name="一次超洗";
- }else if(that.mgroupName=="facade"){
- req.material__process__name="二次超洗";
- }
- // else{
- // if (this.type == 10) {
- // req.notok_sign__isnull = 1;
- // } else if (this.type == 20) {
- // req.notok_sign__isnull = 0;
- // }else if (this.type == 30) {
- // req.notok_sign__isnull = 1;
- // }
- // }
+ that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
+ if(res.length>0){
+ req.belong_dept=res[0].id;
+ this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ let arr = [];
+ res.forEach(item=>{
+ let obj = {};
+ Object.assign(obj,item);
+ obj.label = item.batch;
+ arr.push(obj);
+ })
+ that.materialOptions = arr;
+ });
+ }
+ })
+ }else if(that.mgroupName=="facade"){
+ that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
+ if(res.length>0){
+ req.belong_dept=res[0].id;
+ this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ let arr = [];
+ res.forEach(item=>{
+ let obj = {};
+ Object.assign(obj,item);
+ obj.label = item.batch;
+ arr.push(obj);
+ })
+ that.materialOptions = arr;
+ });
+ }
+ })
+ }else{
+ req.mgroupx = that.mgroupId;
+ this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ let arr = [];
+ res.forEach(item=>{
+ let obj = {};
+ Object.assign(obj,item);
+ obj.label = item.batch;
+ arr.push(obj);
+ })
+ that.materialOptions = arr;
+ });
+ }
- this.$API.wpm.wmaterial.list
- .req(req)
- .then((res) => {
- that.materialOptions = res;
- });
+ },
+ //获取车间不合格物料
+ getMaterialNotok() {
+ let that = this;
+ var req = {
+ mgroupx: that.mgroupId,
+ page: 0,
+ notok_sign__isnull : 0,
+ count_xtest__isnull:1
+ };
+ this.$API.wpm.wmaterial.list.req(req).then((res) => {
+ let arr = [];
+ res.forEach(item=>{
+ let obj = {};
+ Object.assign(obj,item);
+ obj.label = item.batch+'('+item.notok_sign_name+')';
+ arr.push(obj);
+ })
+ that.materialOptions = arr;
+ });
},
//获取交送工段人员
getUserList() {
let that = this;
- this.$API.system.user.list
- .req({ depts: that.deptID, page: 0 })
- .then((res) => {
- that.userList = res;
- });
+ this.$API.system.user.list.req({ depts: that.deptID, page: 0 }).then((res) => {
+ that.userList = res;
+ });
},
//获取接收工段人员
getUserList2() {
@@ -338,9 +405,7 @@ export default {
this.mgroupOptions.forEach(item => {
if(item.id==that.form.recive_mgroup){
deptID = item.belong_dept;
- this.$API.system.user.list
- .req({ depts: deptID, page: 0 })
- .then((res) => {
+ this.$API.system.user.list.req({ depts: deptID, page: 0 }).then((res) => {
that.userList2 = res;
});
}
@@ -355,6 +420,12 @@ export default {
that.userList2 = res;
});
},
+ addMaterial(){
+ this.form.handoverb.push({wm:'',count:''});
+ },
+ delMaterial(index){
+ this.form.handoverb.splice(index,1);
+ },
//显示
open(mode = "add") {
this.mode = mode;
@@ -369,36 +440,42 @@ export default {
},
//提交
submit() {
- this.$refs.dialogForm.validate(async (valid) => {
+ let that = this;
+ that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
- if (this.mode == "add") {
- this.$API.wpm.handover.create
- .req(this.form)
- .then((res) => {
- this.isSaveing = false;
- this.$emit("success", this.form, this.mode);
- this.visible = false;
- this.$message.success("操作成功");
- })
- .catch((err) => {
- //可以处理校验错误
- this.isSaveing = false;
- return err;
- });
- } else if (this.mode == "edit") {
- this.$API.wpm.handover.update
- .req(this.form.id, this.form)
- .then((res) => {
- this.isSaveing = false;
- this.$emit("success", this.form, this.mode);
- this.visible = false;
- this.$message.success("操作成功");
- })
- .catch((err) => {
- //可以处理校验错误
- this.isSaveing = false;
- return err;
- });
+ if (that.mode == "add") {
+ that.$API.wpm.handover.create.req(that.form).then((res) => {
+ if(that.type==40){
+ //提交
+ that.$API.wpm.handover.submit.req(res.id).then((res1) => {
+ that.isSaveing = false;
+ that.$emit("success");
+ that.visible = false;
+ that.$message.success("操作成功");
+ });
+ }else{
+ that.isSaveing = false;
+ that.$emit("success");
+ that.visible = false;
+ that.$message.success("操作成功");
+ }
+ }).catch((err) => {
+ //可以处理校验错误
+ that.isSaveing = false;
+ return err;
+ });
+ } else if (that.mode == "edit") {
+ that.$API.wpm.handover.update.req(that.form.id, that.form).then((res) => {
+ that.isSaveing = false;
+ that.$emit("success", that.form, that.mode);
+ that.visible = false;
+ that.$message.success("操作成功");
+ })
+ .catch((err) => {
+ //可以处理校验错误
+ that.isSaveing = false;
+ return err;
+ });
}
}
});
diff --git a/src/views/wpm_gx/inm.vue b/src/views/wpm_gx/inm.vue
index dac8f8df..dc5f440f 100644
--- a/src/views/wpm_gx/inm.vue
+++ b/src/views/wpm_gx/inm.vue
@@ -9,6 +9,8 @@
入库
+
+ 报废
+ 放行审批
+
新增
-
+
编辑
@@ -126,7 +141,48 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+
+
+
+
-
+
+
+
+ {{item.floor}}
+
+
+ {{item.count_sampling}}
+
+
+ {{item.count}}
+
+
+
+
{{
props.row.count_n_hs
@@ -152,6 +221,9 @@
{{
props.row.count_n_bb
}}
+ {{
+ props.row.count_n_xbb
+ }}
{{
props.row.count_n_wm
}}
@@ -194,7 +266,7 @@
检验
@@ -220,7 +292,17 @@
@closed="dialog.check = false"
>
-
+
+
+
+
-
-
+
+
+
+
+
+
+
min
+
+
+
+
+
+ °C
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+ :退火后直径23.5±0.2;黑圈内径:5.9±0.1;外径7.6-7.77
+
+
+
+
+
+
保 存{{ item.name }}
-
-
@@ -312,13 +430,32 @@ export default {
mlogItem: {},
saveInForm: {
count_use: 0,
- count_break: 0,
+ count_pn_jgqbl: 0,
},
+ oinfo_json:{
+ 退火炉号:'',
+ 退火时间:'',
+ 退火温度:'',
+ 抽检结果:'',
+ 抽检数:'',
+ 强度落球:'',
+ },
+ act_states: {
+ 0: "草稿中",
+ 1: "进行中",
+ 2: "被退回",
+ 3: "被撤回",
+ 4: "已完成",
+ 5: "已关闭",
+ },
+ fileList:[],
+ test_file:'',
deptId: "",
visible: false,
isSaveing: false,
options: [],
saveInDialog: false,
+ ticketDialog:false,
setFiltersVisible: false,
rules: {
count_use: [
@@ -328,13 +465,6 @@ export default {
trigger: "blur",
},
],
- count_break: [
- {
- required: true,
- message: "请输入破碎数量",
- trigger: "blur",
- },
- ],
},
};
},
@@ -343,15 +473,21 @@ export default {
this.paramsIn.mlog = this.mlogId;
this.paramsOut.mlog = this.mlogId;
this.apiObj = this.$API.wpm.mlogb.list;
+ this.getInit();
},
methods: {
open() {
this.visible = true;
},
+
getMlogItem() {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
+ if(res.test_file!==null){
+ that.fileList = [{name:res.test_file,url:res.test_file}];
+ that.form.test_file = res.test_file;
+ }
that.mgroup = res.mgroup;
that.materialIn = res.material_in;
that.deptId = res.belong_dept;
@@ -391,7 +527,7 @@ export default {
that.isSaveing = true;
let obj = {};
obj.count_use = that.saveInForm.count_use;
- obj.count_break = that.saveInForm.count_break;
+ obj.count_pn_jgqbl = that.saveInForm.count_pn_jgqbl;
that.$API.wpm.mlogb.updateIn
.req(that.saveInForm.id, obj)
.then((res) => {
@@ -420,8 +556,11 @@ export default {
},
table_out_check(row) {
this.dialog.check = true;
+ let obj = {};
+ Object.assign(obj, row);
+ obj.mgroup_name = this.mlogItem.mgroup_name;
this.$nextTick(() => {
- this.$refs.checkDialog.open(row);
+ this.$refs.checkDialog.open(obj);
});
},
@@ -434,6 +573,49 @@ export default {
that.$message.success("操作成功");
});
},
+ //渲染工单提交按钮
+ getInit() {
+ let that = this;
+ that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
+ that.initForm = res;
+ });
+ },
+ //填写退火放行单信息
+ createTicket(){
+ if(this.mlogItem.work_end_time==null){
+ this.$message.error("请先编辑日志并选择结束时间");
+ }else{
+ let sum = 0;
+ this.mlogItem.reminder_interval_list.forEach(item => {
+ sum+=item;
+ });
+ this.oinfo_json.退火时间 = sum;
+ this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:'';
+ this.ticketDialog = true;
+ }
+ },
+ //提交退火放行单信息,创建工单
+ submitTicketCreate(id) {
+ let that = this;
+ let obj = {};
+ obj.oinfo_json = that.oinfo_json;
+ obj.test_file = that.test_file;
+ that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
+ let ticket = {};
+ that.isSaveing = true;
+ ticket.title = '退火放行审批单';
+ ticket.workflow = that.initForm.workflow;
+ ticket.ticket_data = {t_id: that.mlogItem.id};
+ ticket.transition = id;
+ that.$API.wf.ticket.create.req(ticket).then((res) => {
+ that.isSaveing = false;
+ that.ticketDialog = false;
+ that.$message.success("提交成功");
+ }).catch((e) => {
+ that.isSaveing = false;
+ });
+ });
+ },
handleSaveSuccess() {
this.$refs.tableIn.refresh();
this.$refs.tableOut.refresh();
@@ -441,6 +623,11 @@ export default {
handleCheckSuccess() {
this.$refs.tableOut.refresh();
},
+ fileUPSuccess(res) {
+ let that = this;
+ console.log('res',res);
+ this.test_file = res.path;
+ },
handleEditSuccess() {},
//设置过滤项
setFilters(filters) {
diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue
index 8490c42b..f4719102 100644
--- a/src/views/wpm_gx/mlog_form.vue
+++ b/src/views/wpm_gx/mlog_form.vue
@@ -13,7 +13,7 @@
:model="form"
:rules="rules"
label-position="right"
- label-width="100px"
+ label-width="80px"
style="padding: 0 10px"
>
@@ -72,7 +72,7 @@
{{item.name}}
@@ -132,6 +132,24 @@
/>
+
+
+ (min)
+
+
+
+
+ (min)
+
+
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- (h)
-
-
@@ -211,12 +198,15 @@
-
+
diff --git a/src/views/wpm_gx/mtask.vue b/src/views/wpm_gx/mtask.vue
index 3951f11f..1988896a 100644
--- a/src/views/wpm_gx/mtask.vue
+++ b/src/views/wpm_gx/mtask.vue
@@ -8,23 +8,10 @@
row-key="id"
:params="params"
>
-
-
+
+
-
+
@@ -33,31 +20,50 @@
-
+
-
- {{ state_[scope.row.state] }}
-
+
+ {{scope.row.mtaskb.length}}
+
-
+
- 提交
-
+
+ 分配
+
+
+
+
+
diff --git a/src/views/wpm_gx/pingmo.vue b/src/views/wpm_gx/pingmo.vue
index 1b2a0547..1ef49570 100644
--- a/src/views/wpm_gx/pingmo.vue
+++ b/src/views/wpm_gx/pingmo.vue
@@ -32,7 +32,7 @@
|