From 70f6ade5e0901822942c8bc778c19a311f9784a9 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Mon, 13 Dec 2021 14:29:06 +0800 Subject: [PATCH 1/2] xiugai --- hb_client/src/router/index.js | 12 +- hb_client/src/views/inm/product.vue | 55 +-------- hb_client/src/views/inm/wproduct.vue | 1 + hb_client/src/views/qm/product.vue | 165 +++++++++++++++++++++++++++ hb_client/src/views/sam/sales.vue | 111 +++++++++++------- 5 files changed, 245 insertions(+), 99 deletions(-) create mode 100644 hb_client/src/views/qm/product.vue diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index bb1f9c7..f5698c8 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -212,7 +212,7 @@ export const asyncRoutes = [ path: 'need', name: 'need', component: () => import('@/views/wpm/need'), - meta: { title: '半成品检验', icon: 'example', perms: ['index_manage'] } + meta: { title: '过程检验', icon: 'example', perms: ['index_manage'] } } , { @@ -305,15 +305,15 @@ export const asyncRoutes = [ { path: '/qm', component: Layout, - redirect: '/qm/standard', + redirect: '/qm/product', name: 'qm', meta: { title: '质量管理', icon: 'example', perms: ['equipment_set'] }, children: [ { - path: 'standard', - name: 'standard', - component: () => import('@/views/qm/standard'), - meta: { title: '标准', icon: 'example', perms: ['index_manage'] } + path: 'product', + name: 'product', + component: () => import('@/views/qm/product'), + meta: { title: '军检', icon: 'example', perms: ['index_manage'] } }, { path: 'testitem', diff --git a/hb_client/src/views/inm/product.vue b/hb_client/src/views/inm/product.vue index dc4d61f..e5dddef 100644 --- a/hb_client/src/views/inm/product.vue +++ b/hb_client/src/views/inm/product.vue @@ -45,21 +45,7 @@ 合格 - - - + - - - - - 合格 - 不合格 - - - - - - -
- 取消 - 确认 -
-
@@ -136,6 +95,7 @@ export default { //半成品列表 getList() { this.listLoading = true; + this.listQuery.material__type=1; getiproductList(this.listQuery).then((response) => { if (response.data) { this.iproductData= response.data; @@ -147,18 +107,7 @@ export default { this.saleproduct=scope.row.id; this.dialogVisible=true; }, - smtconfirm(){ - saleMtest(this.saleproduct,this.mtest).then((res) => { - - if (res.code >= 200) { - this.getList(); - this.dialogVisible = false; - this.$message.success("成功"); - } - - }); - } }, }; diff --git a/hb_client/src/views/inm/wproduct.vue b/hb_client/src/views/inm/wproduct.vue index d4ff5cf..bb46bf3 100644 --- a/hb_client/src/views/inm/wproduct.vue +++ b/hb_client/src/views/inm/wproduct.vue @@ -76,6 +76,7 @@ export default { //半成品列表 getList() { this.listLoading = true; + this.listQuery.material__type=2; getiproductList(this.listQuery).then((response) => { if (response.data) { this.iproductData= response.data; diff --git a/hb_client/src/views/qm/product.vue b/hb_client/src/views/qm/product.vue new file mode 100644 index 0000000..ac58135 --- /dev/null +++ b/hb_client/src/views/qm/product.vue @@ -0,0 +1,165 @@ + + diff --git a/hb_client/src/views/sam/sales.vue b/hb_client/src/views/sam/sales.vue index 75a1ebc..a6f53ce 100644 --- a/hb_client/src/views/sam/sales.vue +++ b/hb_client/src/views/sam/sales.vue @@ -143,10 +143,48 @@ -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -183,10 +221,11 @@ export default { page: 1, page_size: 20, }, + iproducts:[], orderoptions:[], customeroptions:[], materialoptions:[], - iproductoptions:[], + iproductoptions:"", dialogVisible: false, dialogType: "new", @@ -221,19 +260,12 @@ export default { if (response.data) { this.sale.customer = response.data.customer; this.sale.product = response.data.product; - this.iproductoptions=[]; - getiproductList({material: this.sale.product,page:0}).then((response) => { + getiproductList({page:0,material__type:1,material:this.sale.product}).then((response) => { if (response.data) { - response.data.forEach((item) => { - this.iproductoptions.push({ - label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") , - key: item.id - }) - }); + this.iproductoptions=response.data; } - + }); - } @@ -270,39 +302,27 @@ export default { }); }, - selectproduct(selval) - { - this.iproductoptions=[]; - getiproductList({material:selval,page:0}).then((response) => { - if (response.data) { - response.data.forEach((item) => { - this.iproductoptions.push({ - label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") , - key: item.id - }) - }); - } - - }); - - }, + //成品 getproductList() { - this.iproductoptions=[], - getiproductList({page:0}).then((response) => { + + getiproductList({page:0,material__type:1}).then((response) => { if (response.data) { - response.data.forEach((item) => { - this.iproductoptions.push({ - label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") , - key: item.id - }) - }); + this.iproductoptions=response.data; } }); }, - +//根据选择的产品弹出对应库里的产品 +selectproduct(){ + getiproductList({page:0,material__type:1,material:this.sale.product}).then((response) => { + if (response.data) { + this.iproductoptions=response.data; + } + + }); +}, handleFilter() { @@ -320,7 +340,7 @@ export default { this.sale = Object.assign({}, defaulteSale); this.dialogType = "new"; this.dialogVisible = true; - this.iproductoptions=[]; + this.iproducts=[]; this.$nextTick(() => { this.$refs["Form"].clearValidate(); }); @@ -364,6 +384,17 @@ export default { } }); } else { + + this.$refs.multipleTable.selection.forEach((item) => { + this.iproducts.push( + item.id + ); + + }); + + + + this.sale.iproducts=this.iproducts; createSale(this.sale).then((res) => { if (res.code >= 200) { this.getList(); From cff7457b50b225fb96927c3dd5ff824e82c13bc8 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Mon, 13 Dec 2021 14:48:37 +0800 Subject: [PATCH 2/2] xiugai --- hb_client/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hb_client/package.json b/hb_client/package.json index 0a17f55..f39a479 100644 --- a/hb_client/package.json +++ b/hb_client/package.json @@ -22,6 +22,7 @@ "compression-webpack-plugin": "^5.0.1", "d3": "^5.14.2", "dagre-d3": "^0.6.4", + "dhtmlx-gantt": "^6.2.1", "element-ui": "^2.15.5", "file-saver": "^2.0.2", "fuse.js": "^6.4.6", @@ -30,6 +31,7 @@ "nprogress": "0.2.0", "path-to-regexp": "^6.2.0", "vue": "^2.6.14", + "vue-function-api": "^2.1.2", "vue-json-editor": "^1.4.3", "vue-quill-editor": "^3.0.6", "vue-router": "^3.5.2",