+
+ 生产进度
+
-
+
@@ -339,12 +340,13 @@ export default {
visibleRecord:false,
tableHeight:null,
hideDo:true,
- activeName:'8车间',
+ activeName:'7车间',
dataList:[
- {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
- {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
+ // {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
+ // {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
],
- columList:['10.15','10.16','10.17'],
+ // columList:['10.15','10.16','10.17'],
+ columList:[],
selection: [],
selectedIds:[],
state_: {
@@ -426,13 +428,13 @@ export default {
this.$confirm(`确定终止该任务吗?`, "提示", {
type: "warning",
}).then(() => {
- // this.$API.pm.utask.delete.req(row.id).then((res) => {
- // this.$message.success("删除成功");
- // this.$refs.table7.refresh();
- // return res;
- // }).catch((err) => {
- // return err;
- // });
+ this.$API.pm.utask.stop.req(row.id).then((res) => {
+ this.$message.success("操作成功");
+ this.$refs.table10.refresh();
+ return res;
+ }).catch((err) => {
+ return err;
+ });
}).catch(() => {});
},
//本地更新数据
@@ -477,13 +479,19 @@ export default {
utaskDepuse(){
let that = this;
if(that.selectedIds.length>0){
+ let ids =that.selectedIds;
that.isloading = true;
- that.$API.pm.utask.scheduemtasks.req({ids:that.selectedIds}).then(res=>{
- that.$message.success('任务分解成功');
- that.isloading = false;
- that.$refs.table7.refresh();
- that.$refs.table8.refresh();
- that.$refs.table10.refresh();
+ that.$API.pm.utask.scheduemtasks.req({ids:ids}).then(res=>{
+ that.$API.pm.utask.assgin.req({ids:ids}).then(res=>{
+ that.$message.success('下达任务成功');
+ that.isloading = false;
+ that.$refs.table7.refresh();
+ that.$refs.table8.refresh();
+ that.$refs.table10.refresh();
+ }).catch(()=>{
+ that.isloading = false;
+ })
+
}).catch(()=>{
that.isloading = false;
})
diff --git a/src/views/pm/mtask2.vue b/src/views/pm/mtask2.vue
index 53fcd542..c423b0f4 100644
--- a/src/views/pm/mtask2.vue
+++ b/src/views/pm/mtask2.vue
@@ -69,33 +69,6 @@
-
@@ -353,13 +326,33 @@ export default {
//获取 mtask
let that = this;
that.tasks.data = [];
+ let objItem = {};
+ objItem.id=row.id;
+ objItem.type='utask';
+ objItem.number=row.number;
+ objItem.count=row.count;
+ objItem.text =row.number,
+ objItem.cate='',
+
+ objItem.duration = 10;
+ objItem.progress = 1;
+ objItem.count_ok=row.count_ok;
+ objItem.count_real=row.count_real;
+ objItem.count_notok=row.count_notok;
+ objItem.state =row.state;
+ objItem.start_date =row.start_date;
+ objItem.mgroup_name = '';
+ objItem.material_name = '';
+ objItem.specification = '';
+ that.tasks.data.push(objItem)
this.$API.pm.mtask.list.req({utask:row.id}).then(res=>{
// console.log(res.results)//获取甘特图数据
let data = res.results;
- let arr = [];
data.forEach(item=>{
let obj = {};
obj.id=item.id;
+ obj.type='mtask';
+ obj.parent=row.id;
obj.number=item.number;
obj.count=item.count;
obj.text = "一天任务",
@@ -379,25 +372,6 @@ export default {
that.tasks.data.push(obj)
})
console.log(that.tasks.data)
- // data.forEach(item=>{
- // let obj = {};
- // let progress = 0;
- // progress = item.count_ok/item.count;
- // obj.text = "一天任务",
- // obj.count_ok=item.count_ok;
- // obj.count_real=item.count_real;
- // obj.count_notok=item.count_notok;
- // obj.start_date=item.start_date;
- // obj.end_date=item.end_date;
- // obj.state = item.state;
- // obj.utask = item.utask;
- // obj.mgroup_name = item.mgroup_name;
- // obj.material_name = item.material_out_.name;
- // obj.specification = item.material_out_.specification;
- // arr.push(obj)
- // })
- // console.log(arr)
- // that.tasks.data = res.results;
console.log('tasks:',that.tasks)
// 数据解析:将数据解析到gantt列数据中
gantt.parse(that.tasks);
diff --git a/src/views/pum/order_form.vue b/src/views/pum/order_form.vue
index 29fe77b5..3239a967 100644
--- a/src/views/pum/order_form.vue
+++ b/src/views/pum/order_form.vue
@@ -79,15 +79,13 @@ export default {
loading: false,
mode: "add",
titleMap: {
- add: "新增仓库",
- edit: "编辑仓库",
- show: "查看仓库",
+ add: "新增采购订单",
+ edit: "编辑采购订单",
+ show: "查看采购订单",
},
form: {},
rules: {
- name: [{required: true, message: "请输入仓库名称", trigger: "blur"}],
- number: [{required: true, message: "请输入仓库编号", trigger: "blur"}],
- place: [{required: true, message: "请输入仓库地点", trigger: "blur"}]
+ number: [{required: true, message: "请输入采购订单编号", trigger: "blur"}]
},
visible: false,
isSaveing: false,
diff --git a/src/views/pum/orderitemplan.vue b/src/views/pum/orderitemplan.vue
index 1c90c900..206726d0 100644
--- a/src/views/pum/orderitemplan.vue
+++ b/src/views/pum/orderitemplan.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/views/pum/plan_form.vue b/src/views/pum/plan_form.vue
index 096d61ff..c2de7263 100644
--- a/src/views/pum/plan_form.vue
+++ b/src/views/pum/plan_form.vue
@@ -55,13 +55,13 @@
loading: false,
mode: "add",
titleMap: {
- add: "新增仓库",
- edit: "编辑仓库",
- show: "查看仓库",
+ add: "新增采购计划",
+ edit: "编辑采购计划",
+ show: "查看采购计划",
},
form: {},
rules: {
- number: [{required: true, message: "请输入编号", trigger: "blur"}],
+ number: [{required: true, message: "请输入采购计划编号", trigger: "blur"}],
},
visible: false,
isSaveing: false,
diff --git a/src/views/pum/planitem.vue b/src/views/pum/planitem.vue
index b2b3e5b9..c4d01f6d 100644
--- a/src/views/pum/planitem.vue
+++ b/src/views/pum/planitem.vue
@@ -15,7 +15,7 @@
-
+
@@ -66,7 +66,7 @@ export default {
},
puPlan: '',
orderObj: {},
- apiObj: this.$API.pum.planitem.list,
+ apiObj: null,
query: {
page: 1,
page_size: 20
@@ -75,6 +75,9 @@ export default {
},
mounted() {
this.puPlan = this.$route.query.pu_plan;
+ this.query.pu_plan = this.$route.query.pu_plan;
+ this.apiObj= this.$API.pum.planitem.list;
+ this.$refs.table.refresh();
this.getOrder();
},
methods: {
diff --git a/src/views/qm/income.vue b/src/views/qm/income.vue
index c5063c85..90d563b4 100644
--- a/src/views/qm/income.vue
+++ b/src/views/qm/income.vue
@@ -2,7 +2,6 @@
-
-
-
-
新增
+
+ 新增
+ 提交
+
+ 查询
@@ -85,22 +97,19 @@
-
+
-
- {{ scope.row.material_out_.name
- }}
-
+
-
+
-
+
-
+
-
+
-
+
@@ -108,6 +117,10 @@
编辑
+
+ 提交
+
+
删除
@@ -155,7 +168,7 @@
领料
-
@@ -203,7 +216,7 @@
+ hideDo @row-click="rowClick">
@@ -248,7 +261,7 @@
+ hideDo @row-click="rowClick">
@@ -290,40 +303,41 @@
-
- 退火日志
-
-
-
-
- {{ choseData.material_out_.name }}
-
-
-
-
- {{ choseData.material_out_.number }}
-
-
-
-
- {{ peifen_kg }}
-
-
-
-
-
+
+
+
+
+
+
+ {{ choseData.material_out_.name }}
+
+
+
+
+ {{ choseData.material_out_.number }}
+
+
+
+
+ {{ peifen_kg }}
+
+
+
+
+
+
新增
@@ -442,6 +456,36 @@
+
+
+
+
+
+
+
+
+ {{ scope.row.material_out_.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -525,14 +569,13 @@ export default {
handover: false
},
handoverVisible: false,
+ paramsDate:'',
// apiObj: this.$API.pm.mtask.list,
params7: {
- belong_dept_name: '7车间',
- date: '2023-10-24'
+ mgroup__belong_dept__name: '7车间'
},
params10: {
- belong_dept_name: '10车间',
- date: '2023-10-20'
+ mgroup__belong_dept__name: '10车间'
},
params8: {
mgroup__belong_dept__name: '8车间',
@@ -546,7 +589,7 @@ export default {
apiObjMlog: null,
apiObjHandover: null,
apiObjWMaterial: this.$API.wpm.wmaterial.list,
- apiObjMtask: null,
+ apiObjMtask: this.$API.pm.mtask.list,
apiObj: null,
apiObjMetarial: this.$API.wpm.wmaterial.list,
@@ -605,10 +648,9 @@ export default {
let rightHeight = heights - 100;
this.rightHeight = rightHeight / 2 + 'px';
let NowDate = new Date();
- let month = NowDate.getMonth() > 8 ? NowDate.getMonth() + 1 : '0' + (NowDate.getMonth() + 1)
- this.params7.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
- this.params10.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
- this.apiObjMtask = this.$API.pm.mtask.daylist;
+ let paramsDate = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
+ // NowDate.getMonth() > 8 ? NowDate.getMonth() + 1 : '0' + (NowDate.getMonth() + 1)
+ this.apiObjMtask = this.$API.pm.mtask.list;
this.apiObjMlog = this.$API.wpm.mlog.list;
this.apiObjHandover = this.$API.wpm.handover.list;
this.getGroup();
@@ -635,14 +677,39 @@ export default {
},
handleClick(val) {
console.log(val.index);
- if (val.index == 0 || val.index == 1) {
+ if (val.index == 0) {
this.activeSpan = 24
- } else {
- this.activeSpan = 12
+ }else if(val.index == 1) {
+ this.activeSpan = 24;
+ this.paramsMaterial.belong_dept__name = '8车间';
+ this.$refs.table8wM.refresh();
+ }else if(val.index == 2){
+ this.activeSpan = 12;
+ this.paramsMaterial.belong_dept__name = '7车间';
+ this.$refs.table8wM.refresh();
}
+ else if(val.index == 3){
+ this.activeSpan = 12;
+ this.paramsMaterial.belong_dept__name = '10车间';
+ this.$refs.table8wM.refresh();
+ }
+
this.choseData = null;
this.flogs = [];
},
+ handleQuerys(){
+ if(this.activeName=='7车间'){
+ this.params7.start_date = this.paramsDate;
+ this.params7.end_date = this.paramsDate;
+ console.log('paramsDate',this.paramsDate)
+ console.log('7车间',this.params7)
+ this.$refs.table7.queryData(this.params7);
+ }else{
+ this.params10.start_date = this.paramsDate;
+ this.params10.end_date = this.paramsDate;
+ this.$refs.table10.queryData(this.params10);
+ }
+ },
table_submit(row) {
let obj = {};
obj.ids = [];
@@ -651,6 +718,12 @@ export default {
debugger;
})
},
+ //退火日志提交
+ table_tuihuo_submit(row){
+ this.$API.wpm.mlog.submit.req(row.id,row).then(res => {
+ console.log(res)
+ })
+ },
//自定义新增任务
addTask(taskId) {
var $this = this;
@@ -680,6 +753,9 @@ export default {
}
}
},
+ //提交退火
+ submittuihuo(){},
+
//编辑
table_edit(row) {
this.dialog.save = true;
@@ -728,11 +804,11 @@ export default {
handleSuccess() {
},
- handleQuery() {
- // this.$refs.table.queryData(this.query)
- debugger;
- generateExcel(this.columns, this.flogsData, '测试')
- },
+ // handleQuery() {
+ // // this.$refs.table.queryData(this.query)
+ // debugger;
+ // generateExcel(this.columns, this.flogsData, '测试')
+ // },
resetQuery() {
this.query = {};
},
diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue
index 04da8973..4253d864 100644
--- a/src/views/wpm/worktask_form.vue
+++ b/src/views/wpm/worktask_form.vue
@@ -111,110 +111,185 @@
-
+
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+ 不合格原因及数量:
+
-
-
+
-
-
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ placeholder="请输入检测数">
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -621,7 +696,7 @@
关联产品计数:
-
+
{
let obj = {};
obj.material_out = item;
- obj.count_ok = 0;
+ obj.count_ok = null;
mlogb.push(obj)
})
- this.form.mlogb = mlogb;
+ this.mlogb = mlogb;
}
}
this.getWorkShopMaterial();
@@ -910,11 +986,13 @@
this.form.count_notok = this.form.count_n_zw+this.form.count_n_tw+this.form.count_n_qp+this.form.count_n_wq+this.form.count_n_qt;
}else if(this.activeType=='10车间'){
this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx;
- }
+ }else if(this.activeType=='退火'){
+ this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx+this.form.count_break;
+ }
},
countOkSun(){
let ok_number = 0;
- this.form.mlogb.forEach(item=>{
+ this.mlogb.forEach(item=>{
ok_number+=item.count_ok;
})
this.form.count_ok = ok_number;
@@ -934,14 +1012,32 @@
this.form.mtask = this.mtask;
this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx;
let ok_number = 0;
- this.form.mlogb.forEach(item=>{
+ this.mlogb.forEach(item=>{
ok_number+=item.count_ok;
})
this.form.count_ok = ok_number;
+ }else if(this.activeType=='退火'){
+ this.form.mgroup = '3428194648706011136';
+ this.form.count_notok = this.form.count_n_wq+this.form.count_n_tw+this.form.count_n_dl+this.form.count_n_pb+this.form.count_n_dxt+this.form.count_n_jsqx+this.form.count_break;
}
- let sun = this.form.count_ok+this.form.count_notok;
- if(sun==this.form.count_real){
- if (this.mode == "add") {
+ if(this.activeType=='10车间'){
+ let mlogb = this.mlogb;
+ let newArr = [];
+ mlogb.forEach(item=>{
+ if(item.count_ok!==null&&item.count_ok!==''){
+ newArr.push(item)
+ }
+ })
+ this.form.mlogb = newArr;
+ }
+ // let sun = this.form.count_ok+this.form.count_notok;
+ // if(sun==this.form.count_real){
+
+ // }else{
+ // this.isSaveing = false;
+ // this.$message.error("合格总数与不合格总数与出管总数不对等");
+ // }
+ if (this.mode == "add") {
this.$API.wpm.mlog.create.req(this.form).then(res=>{
this.isSaveing = false;
this.$emit("success", this.form, this.mode);
@@ -964,10 +1060,6 @@
return err;
})
}
- }else{
- this.isSaveing = false;
- this.$message.error("合格总数与不合格总数与出管总数不对等");
- }
}
});
},