xiugai
This commit is contained in:
parent
967b349e97
commit
70f6ade5e0
|
@ -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',
|
||||
|
|
|
@ -45,21 +45,7 @@
|
|||
<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"
|
||||
|
@ -68,34 +54,7 @@
|
|||
: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>
|
||||
|
@ -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("成功");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 label="选择产品" prop="iproducts">
|
||||
<div class="trdiv">
|
||||
<el-transfer v-model="sale.iproducts" :data="iproductoptions" :titles="['未选产品', '已选产品']" right-check-change="change"></el-transfer>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
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>
|
||||
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue