Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
1bb89ee1d9
|
|
@ -22,6 +22,7 @@
|
||||||
"compression-webpack-plugin": "^5.0.1",
|
"compression-webpack-plugin": "^5.0.1",
|
||||||
"d3": "^5.14.2",
|
"d3": "^5.14.2",
|
||||||
"dagre-d3": "^0.6.4",
|
"dagre-d3": "^0.6.4",
|
||||||
|
"dhtmlx-gantt": "^6.2.1",
|
||||||
"element-ui": "^2.15.5",
|
"element-ui": "^2.15.5",
|
||||||
"file-saver": "^2.0.2",
|
"file-saver": "^2.0.2",
|
||||||
"fuse.js": "^6.4.6",
|
"fuse.js": "^6.4.6",
|
||||||
|
|
@ -30,6 +31,7 @@
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"path-to-regexp": "^6.2.0",
|
"path-to-regexp": "^6.2.0",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
|
"vue-function-api": "^2.1.2",
|
||||||
"vue-json-editor": "^1.4.3",
|
"vue-json-editor": "^1.4.3",
|
||||||
"vue-quill-editor": "^3.0.6",
|
"vue-quill-editor": "^3.0.6",
|
||||||
"vue-router": "^3.5.2",
|
"vue-router": "^3.5.2",
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,7 @@ export const asyncRoutes = [
|
||||||
path: 'need',
|
path: 'need',
|
||||||
name: 'need',
|
name: 'need',
|
||||||
component: () => import('@/views/wpm/need'),
|
component: () => import('@/views/wpm/need'),
|
||||||
meta: { title: '半成品检验', icon: 'example', perms: ['index_manage'] }
|
meta: { title: '过程检验', icon: 'example', perms: ['index_manage'] }
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
|
|
@ -313,15 +313,15 @@ export const asyncRoutes = [
|
||||||
{
|
{
|
||||||
path: '/qm',
|
path: '/qm',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/qm/standard',
|
redirect: '/qm/product',
|
||||||
name: 'qm',
|
name: 'qm',
|
||||||
meta: { title: '质量管理', icon: 'example', perms: ['equipment_set'] },
|
meta: { title: '质量管理', icon: 'example', perms: ['equipment_set'] },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'standard',
|
path: 'product',
|
||||||
name: 'standard',
|
name: 'product',
|
||||||
component: () => import('@/views/qm/standard'),
|
component: () => import('@/views/qm/product'),
|
||||||
meta: { title: '标准', icon: 'example', perms: ['index_manage'] }
|
meta: { title: '军检', icon: 'example', perms: ['index_manage'] }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'testitem',
|
path: 'testitem',
|
||||||
|
|
|
||||||
|
|
@ -45,21 +45,7 @@
|
||||||
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag></template>
|
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag></template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
width="220px"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
|
|
||||||
<el-link
|
|
||||||
v-if="scope.row.is_mtested == false"
|
|
||||||
@click="handleMtest(scope)"
|
|
||||||
>军检</el-link
|
|
||||||
>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="iproductData.count > 0"
|
v-show="iproductData.count > 0"
|
||||||
|
|
@ -68,34 +54,7 @@
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
<el-dialog
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
title="军检"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
ref="Form"
|
|
||||||
:model="mtest"
|
|
||||||
label-width="150px"
|
|
||||||
label-position="right"
|
|
||||||
|
|
||||||
>
|
|
||||||
<el-form-item label="军检是否合格">
|
|
||||||
|
|
||||||
<el-radio v-model="mtest.is_mtestok" label=True >合格</el-radio>
|
|
||||||
<el-radio v-model="mtest.is_mtestok" label=False >不合格</el-radio>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="mtest.remark" placeholder="备注" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
<div style="text-align: right">
|
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="smtconfirm('Form')">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -136,6 +95,7 @@ export default {
|
||||||
//半成品列表
|
//半成品列表
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
this.listQuery.material__type=1;
|
||||||
getiproductList(this.listQuery).then((response) => {
|
getiproductList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.iproductData= response.data;
|
this.iproductData= response.data;
|
||||||
|
|
@ -147,18 +107,7 @@ export default {
|
||||||
this.saleproduct=scope.row.id;
|
this.saleproduct=scope.row.id;
|
||||||
this.dialogVisible=true;
|
this.dialogVisible=true;
|
||||||
},
|
},
|
||||||
smtconfirm(){
|
|
||||||
|
|
||||||
saleMtest(this.saleproduct,this.mtest).then((res) => {
|
|
||||||
|
|
||||||
if (res.code >= 200) {
|
|
||||||
this.getList();
|
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$message.success("成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ export default {
|
||||||
//半成品列表
|
//半成品列表
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
this.listQuery.material__type=2;
|
||||||
getiproductList(this.listQuery).then((response) => {
|
getiproductList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.iproductData= response.data;
|
this.iproductData= response.data;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,165 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="iproductData.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="700"
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="成品编号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="成品批次">
|
||||||
|
<template slot-scope="scope">{{ scope.row.batch }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="成品名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在仓库">
|
||||||
|
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否已军检">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
|
||||||
|
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
|
||||||
|
<el-tag v-else>已军检</el-tag></template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="军检">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
|
||||||
|
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag></template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
width="220px"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.is_mtested == false"
|
||||||
|
@click="handleMtest(scope)"
|
||||||
|
>军检</el-link
|
||||||
|
>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="iproductData.count > 0"
|
||||||
|
:total="iproductData.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
title="军检"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="mtest"
|
||||||
|
label-width="150px"
|
||||||
|
label-position="right"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-form-item label="军检是否合格">
|
||||||
|
|
||||||
|
<el-radio v-model="mtest.is_mtestok" label=True >合格</el-radio>
|
||||||
|
<el-radio v-model="mtest.is_mtestok" label=False >不合格</el-radio>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="mtest.remark" placeholder="备注" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="smtconfirm('Form')">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getiproductList,saleMtest} from "@/api/inm";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
import { genTree } from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { Pagination },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
iproductData: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
mtest: {},
|
||||||
|
salesdetail:"",
|
||||||
|
saleproduct:"",
|
||||||
|
dialogVisible:false,
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
//半成品列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
this.listQuery.type=1;
|
||||||
|
getiproductList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.iproductData= response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMtest(scope){
|
||||||
|
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("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -143,10 +143,48 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="选择产品" prop="iproducts">
|
<el-form-item label="选择产品" prop="iproducts">
|
||||||
<div class="trdiv">
|
|
||||||
<el-transfer v-model="sale.iproducts" :data="iproductoptions" :titles="['未选产品', '已选产品']" right-check-change="change"></el-transfer>
|
<el-table
|
||||||
</div>
|
v-loading="listLoading"
|
||||||
|
:data="iproductoptions"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
ref="multipleTable"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="成品编号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="成品批次">
|
||||||
|
<template slot-scope="scope">{{ scope.row.batch }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="成品名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在仓库">
|
||||||
|
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否已军检">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
|
||||||
|
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
|
||||||
|
<el-tag v-else>已军检</el-tag></template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
@ -183,10 +221,11 @@ export default {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
iproducts:[],
|
||||||
orderoptions:[],
|
orderoptions:[],
|
||||||
customeroptions:[],
|
customeroptions:[],
|
||||||
materialoptions:[],
|
materialoptions:[],
|
||||||
iproductoptions:[],
|
iproductoptions:"",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
|
|
||||||
|
|
@ -221,19 +260,12 @@ export default {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.sale.customer = response.data.customer;
|
this.sale.customer = response.data.customer;
|
||||||
this.sale.product = response.data.product;
|
this.sale.product = response.data.product;
|
||||||
this.iproductoptions=[];
|
getiproductList({page:0,material__type:1,material:this.sale.product}).then((response) => {
|
||||||
getiproductList({material: this.sale.product,page:0}).then((response) => {
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
response.data.forEach((item) => {
|
this.iproductoptions=response.data;
|
||||||
this.iproductoptions.push({
|
|
||||||
label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") ,
|
|
||||||
key: item.id
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -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() {
|
getproductList() {
|
||||||
this.iproductoptions=[],
|
|
||||||
getiproductList({page:0}).then((response) => {
|
getiproductList({page:0,material__type:1}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
response.data.forEach((item) => {
|
this.iproductoptions=response.data;
|
||||||
this.iproductoptions.push({
|
|
||||||
label: item.number+"__"+item.material_.name+"__"+(item.is_mtested==true?"已军检":"未军检") ,
|
|
||||||
key: item.id
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//根据选择的产品弹出对应库里的产品
|
||||||
|
selectproduct(){
|
||||||
|
getiproductList({page:0,material__type:1,material:this.sale.product}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.iproductoptions=response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
|
|
@ -320,7 +340,7 @@ export default {
|
||||||
this.sale = Object.assign({}, defaulteSale);
|
this.sale = Object.assign({}, defaulteSale);
|
||||||
this.dialogType = "new";
|
this.dialogType = "new";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.iproductoptions=[];
|
this.iproducts=[];
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
});
|
});
|
||||||
|
|
@ -364,6 +384,17 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
this.$refs.multipleTable.selection.forEach((item) => {
|
||||||
|
this.iproducts.push(
|
||||||
|
item.id
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.sale.iproducts=this.iproducts;
|
||||||
createSale(this.sale).then((res) => {
|
createSale(this.sale).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue