diff --git a/src/config/route.js b/src/config/route.js index 5bf3b5e3..e21ef344 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -2392,12 +2392,12 @@ const routes = [ }, "component": "statistics/user_statistics.vue" }, - //主库存统计 + //销售统计 { "path": "/inm_statistics", "name": "inm_statistics", "meta": { - "title": "主库存统计", + "title": "销售统计", "icon": "el-icon-trend-charts", "perms": ["bigScreenP"], }, @@ -2455,7 +2455,6 @@ const routes = [ "title": "报表", "icon": "el-icon-trend-charts", "type": "menu", - "perms": ["bi"] }, "children": [ { @@ -2464,7 +2463,6 @@ const routes = [ "meta": { "title": "数据集", "icon": "el-icon-grid", - "perms": ["dataset"] }, "component": "bi/dataset" }, diff --git a/src/views/inm/good_mio.vue b/src/views/inm/good_mio.vue index fe3689a0..82e6bf8c 100644 --- a/src/views/inm/good_mio.vue +++ b/src/views/inm/good_mio.vue @@ -81,18 +81,16 @@ export default { typeDict: { 'sale_out': '销售发货', 'do_in': '生产入库', - 'other_in': '其他出库', }, cateOptions: [ { id: 'sale_out', name: '销售发货' }, { id: 'do_in', name: '生产入库' }, - { id: 'other_out', name: '其他出库' }, ], dialog: { save: false, }, query: { - type: 'sale_out' + type__in: 'sale_out,do_in' }, form: { diff --git a/src/views/inm/mio.vue b/src/views/inm/mio.vue index 9b7fa74b..77f5128d 100644 --- a/src/views/inm/mio.vue +++ b/src/views/inm/mio.vue @@ -51,11 +51,11 @@ 查看 + v-if="scope.row.state == 10&&(scope.row.type=='other_in'||scope.row.type=='other_out')"> 提交 + v-if="scope.row.state == 10&&(scope.row.type=='other_in'||scope.row.type=='other_out')"> 删除 @@ -93,10 +93,10 @@ export default { 'other_out': '其他出库', }, cateOptions: [ - // { id: 'do_out', name: '生产领料' }, - // { id: 'sale_out', name: '销售发货' }, - // { id: 'pur_in', name: '采购入库' }, - // { id: 'do_in', name: '生产入库' }, + { id: 'do_out', name: '生产领料' }, + { id: 'sale_out', name: '销售发货' }, + { id: 'pur_in', name: '采购入库' }, + { id: 'do_in', name: '生产入库' }, { id: 'other_in', name: '其他入库' }, { id: 'other_out', name: '其他出库' }, ], diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index f7e23bc9..33f5ea80 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -38,6 +38,8 @@ + + diff --git a/src/views/statistics/good_check.vue b/src/views/statistics/good_check.vue index a3ac64b9..45bc925a 100644 --- a/src/views/statistics/good_check.vue +++ b/src/views/statistics/good_check.vue @@ -1,50 +1,121 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/statistics/inm_check.vue b/src/views/statistics/inm_check.vue index 9c8ce69d..9678be35 100644 --- a/src/views/statistics/inm_check.vue +++ b/src/views/statistics/inm_check.vue @@ -1,32 +1,121 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/statistics/inm_statistics.vue b/src/views/statistics/inm_statistics.vue index 1b608781..a89ac871 100644 --- a/src/views/statistics/inm_statistics.vue +++ b/src/views/statistics/inm_statistics.vue @@ -1,45 +1,112 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + 棒管交付数 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 棒交付数 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/statistics/material_statistics.vue b/src/views/statistics/material_statistics.vue index d5472ea3..cfb728ad 100644 --- a/src/views/statistics/material_statistics.vue +++ b/src/views/statistics/material_statistics.vue @@ -1,22 +1,112 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + 采购统计 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 消耗统计 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/statistics/pass_num.vue b/src/views/statistics/pass_num.vue index e321d24d..41cc43fa 100644 --- a/src/views/statistics/pass_num.vue +++ b/src/views/statistics/pass_num.vue @@ -1,108 +1,139 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index c67d3537..620f4b0c 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -1,16 +1,35 @@ - - - - - - - + + + + + + + + + + + @@ -32,8 +51,8 @@ - - + @@ -44,18 +63,21 @@ diff --git a/src/views/statistics/product_check.vue b/src/views/statistics/product_check.vue index 18d64389..958bd965 100644 --- a/src/views/statistics/product_check.vue +++ b/src/views/statistics/product_check.vue @@ -2,13 +2,32 @@ - + - + :value="item" + > + + + + + @@ -19,7 +38,7 @@ - + @@ -52,7 +71,7 @@ - + @@ -87,7 +106,7 @@ - + @@ -129,10 +148,13 @@ }, data() { return { - query:{type:'', - search:'' - }, - typeOptions:['周','月','年'], + queryType:'月', + queryDate:'', + start_date:'', + end_date:'', + currentYear:'', + currentMonth:'', + typeOptions:['月','年'], option1: { title: { text: '7车间', @@ -149,7 +171,7 @@ center: ['50%', '60%'], label: false, data: [ - {value: 500, name: '合格数'}, + {value: 800, name: '合格数'}, {value: 5, name: '炸纹'}, {value: 2, name: '条纹'}, {value: 6, name: '气泡'}, @@ -175,7 +197,7 @@ center: ['50%', '60%'], label: false, data: [ - {value: 300, name: '合格数'}, + {value: 800, name: '合格数'}, {value: 2, name: '条纹'}, {value: 5, name: '断裂'}, {value: 6, name: '偏壁'}, @@ -201,7 +223,7 @@ center: ['50%', '60%'], label: false, data: [ - {value: 300, name: '合格数'}, + {value: 800, name: '合格数'}, {value: 5, name: '椭圆/弯曲'}, {value: 2, name: '条纹'}, {value: 6, name: '断裂'}, @@ -213,15 +235,94 @@ } ] }, - tableData:[ {id:1,date:'2023-12-11',name:'ZJ2-1',count:300,count_ok:200,count_rate:66}, {id:1,date:'2023-12-11',name:'ZJ2-2',count:300,count_ok:200,count_rate:66}, {id:1,date:'2023-12-11',name:'ZJ2-3',countk:300,count_ok:200,count_rate:66}, {id:1,date:'2023-12-11',name:'ZJ2-4',count:300,count_ok:200,count_rate:66}, ], + tableData1:[], + tableData2:[], + tableData3:[], } - } + }, + mounted(){ + let date = new Date(); + let year = date.getFullYear(); + let month = date.getMonth()+1; + let days = new Date(year, month, 0).getDate(); + console.log(year,month,days) + this.currentYear = year; + this.currentMonth = month; + this.start_date =year+'-'+month+'-01'; + this.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate(); + this.getData(); + this.getData7(); + this.getData10(); + }, + methods:{ + queryTypeChange(value){ + console.log(value) + this.queryDate = ''; + }, + getData(){ + let that = this; + let exec = that.queryType=='月'?'lineWeek':'lineMonth'; + let obj = { + query: { start_date: this.start_date, end_date: this.end_date, dept_name: "6车间" }, + }; + that.$API.bi.dataset.exec.req(exec, obj).then((doInRes) => { + console.log('退火车间统计:',doInRes); + debugger; + }); + }, + getData7(){ + let that = this; + let obj = { + query: { start_date: this.start_date, end_date: this.end_date, dept_name: "7车间" }, + }; + let exec = that.queryType=='月'?'lineWeek':'lineMonth'; + that.$API.bi.dataset.exec.req(exec, obj).then((doInRes) => { + console.log('7生产车间统计:',doInRes); + debugger; + }); + }, + getData10(){ + let that = this; + let obj = { + query: { start_date: this.start_date, end_date: this.end_date, dept_name: "10·车间" }, + }; + let exec = that.queryType=='月'?'lineWeek':'lineMonth'; + that.$API.bi.dataset.exec.req(exec, obj).then((doInRes) => { + console.log('10生产车间统计:',doInRes); + debugger; + }); + }, + handleQuery(){ + if(this.queryDate!==''){ + if(this.queryType=='月'){ + + this.start_date =this.queryDate+'-01'; + let arr = this.queryDate.split('-'); + this.end_date = this.queryDate+'-'+new Date(arr[0], arr[1], 0).getDate(); + }else{ + this.start_date = this.queryDate+'-01-01'; + this.end_date = this.queryDate+'-12-31'; + } + }else{ + if(this.queryType=='月'){ + this.start_date =this.currentYear+'-'+this.currentMonth+'-01'; + this.end_date = this.currentYear+'-'+this.currentMonth+'-'+new Date(this.currentYear, this.currentMonth, 0).getDate(); + }else{ + this.start_date = this.currentYear+'-01-01'; + this.end_date = this.currentYear+'-12-31'; + } + } + this.getData(); + this.getData7(); + this.getData10(); + }, + }, } diff --git a/src/views/statistics/product_check2.vue b/src/views/statistics/product_check2.vue index 9337ecfa..9c7e43f2 100644 --- a/src/views/statistics/product_check2.vue +++ b/src/views/statistics/product_check2.vue @@ -1,60 +1,108 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + 各工序检验 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 成品检验 + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/src/views/statistics/task_rate.vue b/src/views/statistics/task_rate.vue index 3baec446..7b632ce6 100644 --- a/src/views/statistics/task_rate.vue +++ b/src/views/statistics/task_rate.vue @@ -1,19 +1,37 @@ - - - - - - - + + + + + + + + + + + - @@ -32,7 +50,7 @@ - + @@ -40,14 +58,17 @@ - + + + {{ scope.row.count_ok/scope.row.count*100}}% + - + @@ -55,14 +76,17 @@ - + + + {{ scope.row.count_ok/scope.row.count*100}}% + - + @@ -70,7 +94,10 @@ - + + + {{ scope.row.count_ok/scope.row.count*100}}% + @@ -79,17 +106,8 @@ - diff --git a/src/views/statistics/user_statistics.vue b/src/views/statistics/user_statistics.vue index cdc9045b..14ecad63 100644 --- a/src/views/statistics/user_statistics.vue +++ b/src/views/statistics/user_statistics.vue @@ -1,35 +1,66 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue index 6366371e..2fdb1758 100644 --- a/src/views/wpm/mlog_dept10.vue +++ b/src/views/wpm/mlog_dept10.vue @@ -133,10 +133,13 @@ 编辑 - - --> + 删除 + + 日志记录 + @@ -201,7 +204,7 @@ 领料 - 入库 + 入库 @@ -242,13 +245,19 @@ @success="handleSaveSuccess" @closed="dialogSave = false" > + + \ No newline at end of file diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue index 96855032..09ea7b46 100644 --- a/src/views/wpm/mlog_dept6.vue +++ b/src/views/wpm/mlog_dept6.vue @@ -156,7 +156,7 @@ export default { }, methods: { tomio() { - this.$router.push({ name: "mio" }); + this.$router.push({ name: "halfgood_mio" }); }, //点击任务 rowClick(row) { diff --git a/src/views/wpm/mlog_dept6_detail.vue b/src/views/wpm/mlog_dept6_detail.vue index c87e3395..93a0ebcf 100644 --- a/src/views/wpm/mlog_dept6_detail.vue +++ b/src/views/wpm/mlog_dept6_detail.vue @@ -60,6 +60,9 @@ 编辑 + 删除 + 日志记录 @@ -81,6 +84,7 @@ > @@ -109,6 +113,7 @@ export default { params:{ mtask:'' }, + mlogId:'', handledate:'', dialogSave:false, visibleDrawer:false, @@ -136,6 +141,7 @@ export default { }, table_show(row) { this.visibleDrawer = true; + this.mlogId = row.id; this.$nextTick(() => { this.$refs.showDrawer.open(); }); @@ -162,11 +168,11 @@ export default { }); }, //删除 - async table_del(row) { + table_del(row) { this.$confirm(`确定删除吗?`, "提示", { type: "warning", }).then(() => { - this.$API.pm.mtask.delete.req(row.id).then((res) => { + this.$API.wpm.mlog.delete.req(row.id).then((res) => { this.$message.success("删除成功"); return res; }).catch((err) => { diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index 3efc2207..b8b2b7ee 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -139,10 +139,13 @@ 编辑 - - --> + 删除 + + 日志记录 + @@ -209,7 +212,7 @@ 领料 - 入库 + 入库 @@ -249,13 +252,19 @@ @success="handleSaveSuccess" @closed="dialogSave = false" > + + \ No newline at end of file diff --git a/src/views/wpm/mlog_drawer.vue b/src/views/wpm/mlog_drawer.vue index b922abf4..43ebfad3 100644 --- a/src/views/wpm/mlog_drawer.vue +++ b/src/views/wpm/mlog_drawer.vue @@ -3,12 +3,20 @@ - + {{scope.row.change_time.slice(0, -3)}} + + + 新建 + 更改 + + + + {{scope.row.val_new.mgroup_name}} @@ -86,11 +94,6 @@ - - - {{scope.row.val_new.handle_user_name}} - - @@ -100,12 +103,16 @@ export default { emits: ["closed"], props: { + mlogId:{ type: String, default:''} }, data() { return { visible: false, - apiObj: this.$API.ops.logs.audit, - paramsObj: {}, + apiObj: null, + paramsObj: { + model_name:'wpm.mlog', + instance_id:'' + }, state_: { 10: "创建中", 14: "已分解", @@ -116,6 +123,10 @@ export default { } }, mounted() { + debugger; + console.log(this.mlogId) + this.paramsObj.instance_id = this.mlogId; + this.apiObj = this.$API.ops.logs.audit; }, methods: { handleMtaskQuery() { diff --git a/src/views/wpm/worktask_form.vue b/src/views/wpm/worktask_form.vue index e7823fd6..47925252 100644 --- a/src/views/wpm/worktask_form.vue +++ b/src/views/wpm/worktask_form.vue @@ -1057,11 +1057,9 @@ export default { }; }, mounted() { - // 先去除缓存 - // let materialObj = this.$TOOL.data.get('MATERIAL_OBJECT'); - // this.materialObj = materialObj; - // this.form.material_out = materialObj.id; - this.getMaterial(0); + console.log('brothersList') + console.log(this.brothersList) + this.getMaterial(); this.getMgroupList(); this.getUserList(); this.getEquipment(); @@ -1075,19 +1073,20 @@ export default { this.form.mgroup = this.mgroup; this.form.handle_date = year + "-" + month + "-" + day; if (this.activeType == "10车间") { - if (this.mode == "add") { - let mlogb = []; - if (this.brothersList && this.brothersList.length > 0) { - this.brothersList.forEach((item) => { - let obj = {}; - obj.material_out = item; - obj.count_ok = null; - mlogb.push(obj); - }); - } + let mlogb = []; + this.brothersList.forEach((item) => { + let obj = {}; + obj.material_out = item.material_out; + obj.count_ok = item.count_ok; + mlogb.push(obj); + }); this.mlogb = mlogb; - } } + if(this.activeType == "10车间"){ + this.getMaterial(0); + }else{ + this.getMaterial(this.mgroup); + } }, methods: { getRouteOptions() { @@ -1144,9 +1143,6 @@ export default { this.$API.mtm.mgroup.list .req({ page: 0, belong_dept__name: activeDeptName }) .then((res) => { - // let data = res.filter(item => { - // return item.process_cate == '成型' - // }) that.mgroupOptions = res; }); }, @@ -1326,7 +1322,6 @@ export default { //表单注入数据 setData(data) { Object.assign(this.form, data); - this.getMaterial(this.form.mgroup); this.getRouteOptions(); if (this.activeType == "8车间") { if (this.form.handle_user.indexOf(",") > -1) {