xiugai
This commit is contained in:
parent
f22078bb0a
commit
7752f45968
|
@ -58,14 +58,6 @@ export function wproductTest(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//半成品复检
|
|
||||||
export function wproductRetest(data) {
|
|
||||||
return request({
|
|
||||||
url: '/wpm/wproduct/retest/',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//半成品入库
|
//半成品入库
|
||||||
|
@ -261,4 +253,14 @@ export function createTool(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//检验合格的半成品批量入库
|
||||||
|
export function createputins(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wpm/wproduct/putins/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,14 @@ export const asyncRoutes = [
|
||||||
component: () => import('@/views/mtm/materialdo.vue'),
|
component: () => import('@/views/mtm/materialdo.vue'),
|
||||||
meta: { title: '绑定检查表', perms: ['vendor_manage'] },
|
meta: { title: '绑定检查表', perms: ['vendor_manage'] },
|
||||||
hidden: true
|
hidden: true
|
||||||
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
path: 'materialDetail/:id',
|
||||||
|
name: 'MaterialDetail',
|
||||||
|
component: () => import('@/views/mtm/materialDetail.vue'),
|
||||||
|
meta: { title: '物料详情', perms: ['vendor_manage'] },
|
||||||
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'process',
|
path: 'process',
|
||||||
|
@ -201,11 +209,19 @@ export const asyncRoutes = [
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'need/:id',
|
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'] }
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
path: 'productjy',
|
||||||
|
name: 'productjy',
|
||||||
|
component: () => import('@/views/wpm/productjy'),
|
||||||
|
meta: { title: '成品检验', icon: 'example', perms: ['index_manage'] }
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,10 +92,16 @@
|
||||||
@click="handlebind(scope)"
|
@click="handlebind(scope)"
|
||||||
>检查表</el-link
|
>检查表</el-link
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
>编辑</el-link
|
>编辑</el-link
|
||||||
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['material_update'])"
|
||||||
|
@click="handledetail(scope)"
|
||||||
|
>详情</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
|
@ -176,7 +182,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getMaterialList, createMaterial,updateMaterial,deleteMaterial,getProcessList } from "@/api/mtm";
|
import { getMaterialList,getMaterial, createMaterial,updateMaterial,deleteMaterial,getProcessList } from "@/api/mtm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
|
||||||
|
@ -269,6 +275,15 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
|
//物料详情
|
||||||
|
handledetail(scope)
|
||||||
|
{
|
||||||
|
this.$router.push({name: "MaterialDetail", params: { id: scope.row.id }, })
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
//选项卡切换
|
//选项卡切换
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
|
|
@ -0,0 +1,230 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<el-card >
|
||||||
|
<el-descriptions title="物料基本信息" direction="vertical" :column="8" border>
|
||||||
|
<el-descriptions-item label="物料编号"> {{materialdetail.number}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="物料名称"> {{materialdetail.name}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="规格型号" :span="2"> {{materialdetail.specification}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="计量单位"> {{materialdetail.unit}} </el-descriptions-item>
|
||||||
|
<el-descriptions-item label="数量"> {{materialdetail.count}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
<el-tabs v-model="activeName" type="card" >
|
||||||
|
<el-tab-pane label="对应的批次" name="3">
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="InventoryList"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<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.material_.specification }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="物料编号">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.material_.number
|
||||||
|
}}</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">{{
|
||||||
|
scope.row.warehouse_.number
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料总存量">
|
||||||
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="关联的订单" name="1">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="orderlist"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
|
<el-table-column label="订单编号" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="客户" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="所属合同" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品名称" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品型号" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品数量" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交货日期" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="关联的计划" name="2">
|
||||||
|
<el-table
|
||||||
|
:data="productionplanList"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="300"
|
||||||
|
|
||||||
|
>
|
||||||
|
<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.order_.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合同编号" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.order_.contract_.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="生产数量" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划开工时间">
|
||||||
|
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划完工时间" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交付截止时间" >
|
||||||
|
<template slot-scope="scope">{{ scope.row.order_.delivery_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="是否生成子计划" >
|
||||||
|
<template slot-scope="scope" >
|
||||||
|
<el-tag v-if="scope.row.is_planed==false">否</el-tag>
|
||||||
|
<el-tag v-if="scope.row.is_planed==true">是</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间">
|
||||||
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import vueJsonEditor from "vue-json-editor";
|
||||||
|
import {upUrl, upHeaders} from "@/api/file";
|
||||||
|
import {getProductionplanList } from "@/api/pm";
|
||||||
|
import {getmaterialbatchList} from "@/api/inm";
|
||||||
|
import {getOrderList } from "@/api/sam";
|
||||||
|
import {getMaterial } from "@/api/mtm";
|
||||||
|
import { upFile } from "@/api/file";
|
||||||
|
import {genTree} from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {Pagination, vueJsonEditor, Treeselect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
materialdetail:"",
|
||||||
|
orderlist:"",
|
||||||
|
productionplanList:"",
|
||||||
|
InventoryList:"",
|
||||||
|
activeName:'3',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.material = this.$route.params.id;
|
||||||
|
this.getMaterial();
|
||||||
|
this.getOrderList();
|
||||||
|
this.getplanList();
|
||||||
|
this.getmaterialbatchList();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
getMaterial(){
|
||||||
|
getMaterial(this.material).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.materialdetail = response.data;//物料基本信息
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getOrderList(){
|
||||||
|
getOrderList({product:this.material,page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.orderlist = response.data;//物料关联的订单
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getplanList() {
|
||||||
|
getProductionplanList({product:this.material,page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.productionplanList = response.data;//物料关联计划
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getmaterialbatchList() {
|
||||||
|
|
||||||
|
|
||||||
|
getmaterialbatchList({material:this.material,page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.InventoryList = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -46,14 +46,14 @@
|
||||||
|
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-mobile-phone"></i>
|
|
||||||
产品名称
|
产品名称
|
||||||
</template>
|
</template>
|
||||||
{{products.name}}
|
{{products.name}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<i class="el-icon-location-outline"></i>
|
|
||||||
产品编号
|
产品编号
|
||||||
</template>
|
</template>
|
||||||
{{products.number}}
|
{{products.number}}
|
||||||
|
|
|
@ -99,15 +99,24 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="已合格半成品">
|
<el-tab-pane label="已合格半成品">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>批量入库</el-button
|
||||||
|
>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="wproductList1.results"
|
:data="wproductList1.results"
|
||||||
|
ref="multipleTable"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="600"
|
max-height="600"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="半成品名称">
|
<el-table-column label="半成品名称">
|
||||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
|
@ -328,11 +337,38 @@
|
||||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="putin">确 定</el-button>
|
<el-button type="primary" @click="putin">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="半成品批量入库" :close-on-click-modal="false" :visible.sync="dialogFormVisibles">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="仓库" :label-width="formLabelWidth">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.warehouse"
|
||||||
|
placeholder="请选择仓库"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in WarehouseData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="form.remark" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisibles = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="putins">确 定</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getwproductList ,wproductTest,wproductPutin} from "@/api/wpm";
|
import { getwproductList ,wproductTest,wproductPutin,createputins} from "@/api/wpm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { getWarehouseList } from "@/api/inm";
|
import { getWarehouseList } from "@/api/inm";
|
||||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||||
|
@ -344,7 +380,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
testitem: defaultetestitem,
|
testitem: defaultetestitem,
|
||||||
form:{},
|
form:{remark:"",warehouse:""},
|
||||||
wproductList: {
|
wproductList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
@ -396,9 +432,11 @@ export default {
|
||||||
listQueryrecordform: {
|
listQueryrecordform: {
|
||||||
page: 0,
|
page: 0,
|
||||||
},
|
},
|
||||||
|
mutipID:[],
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
innerVisible: false,
|
innerVisible: false,
|
||||||
dialogFormVisible:false,
|
dialogFormVisible:false,
|
||||||
|
dialogFormVisibles:false,
|
||||||
testrecord: {},
|
testrecord: {},
|
||||||
WarehouseData:"",
|
WarehouseData:"",
|
||||||
};
|
};
|
||||||
|
@ -439,12 +477,39 @@ export default {
|
||||||
getList1() {
|
getList1() {
|
||||||
|
|
||||||
this.listQuery1.act_state = 30;
|
this.listQuery1.act_state = 30;
|
||||||
|
this.listQuery1.material__type = 1;
|
||||||
getwproductList(this.listQuery1).then((response) => {
|
getwproductList(this.listQuery1).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.wproductList1 = response.data;
|
this.wproductList1 = response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//半成品批量入库
|
||||||
|
handleCreate(){
|
||||||
|
this.dialogFormVisibles=true;
|
||||||
|
this.getWarehouseLists();//仓库
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
//批量入库
|
||||||
|
putins(){
|
||||||
|
let _this=this
|
||||||
|
_this.mutipID=[]
|
||||||
|
this.$refs.multipleTable.selection.forEach((item) => {
|
||||||
|
_this.mutipID.push( item.id );
|
||||||
|
alert(_this.mutipID);
|
||||||
|
});
|
||||||
|
console.log(_this.mutipID);
|
||||||
|
|
||||||
|
createputins({warehouse:this.form.warehouse,wproducts: _this.mutipID,remark:this.form.remark}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.$message.success("批量入库成功!");
|
||||||
|
this.dialogFormVisibles=false;
|
||||||
|
this.getList1();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//仓库列表
|
//仓库列表
|
||||||
getWarehouseLists(){
|
getWarehouseLists(){
|
||||||
|
|
|
@ -0,0 +1,538 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-tabs type="border-card">
|
||||||
|
<el-tab-pane label="待检成品">
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="wproductList.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<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.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检测状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ actstate_[scope.row.act_state] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在子工序">
|
||||||
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
@click="handleInspection(scope)"
|
||||||
|
>检验</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="wproductList.count > 0"
|
||||||
|
:total="wproductList.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="已合格成品">
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>批量入库</el-button
|
||||||
|
>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="wproductList1.results"
|
||||||
|
ref="multipleTable"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<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.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检测状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ actstate_[scope.row.act_state] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在子工序">
|
||||||
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
@click="handlePutin(scope)"
|
||||||
|
>入库</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="wproductList1.count > 0"
|
||||||
|
:total="wproductList1.count"
|
||||||
|
:page.sync="listQuery1.page"
|
||||||
|
:limit.sync="listQuery1.page_size"
|
||||||
|
@pagination="getList1"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog title="物料检查表" :close-on-click-modal="false" :visible.sync="outerVisible">
|
||||||
|
<el-select style="width: 100%" v-model="recordform" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in recordformList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
width="50%"
|
||||||
|
title="检查项目"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form label-width="100px" label-position="right">
|
||||||
|
<el-row
|
||||||
|
:gutter="2"
|
||||||
|
v-for="(item, $index) in fieldList"
|
||||||
|
:key="$index"
|
||||||
|
>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
v-if="item.field_type === 'string'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input placeholder="请输入" v-model="item.sort" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'int'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
width="120"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="item.sort"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'float'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="item.sort"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'date'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="item.create_time"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'datetime'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="item.create_time"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'select'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="item.sort"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.field_choice"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'selects'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="optio"
|
||||||
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.field_choice"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否检验合格" width="50px">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="item.is_testok"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in choice"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="是否合格" prop="sort_str">
|
||||||
|
<el-radio v-model="is_testok" label="true">检查合格</el-radio>
|
||||||
|
<el-radio v-model="is_testok" label="false">检查不合格</el-radio>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="innerVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitfield"
|
||||||
|
>提交检查项目</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitrecordform"
|
||||||
|
>填写检查项目</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="成品入库" :close-on-click-modal="false" :visible.sync="dialogFormVisible">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="仓库" :label-width="formLabelWidth">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.warehouse"
|
||||||
|
placeholder="请选择仓库"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in WarehouseData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="form.remark" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="putin">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="半成品批量入库" :close-on-click-modal="false" :visible.sync="dialogFormVisibles">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="仓库" :label-width="formLabelWidth">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.warehouse"
|
||||||
|
placeholder="请选择仓库"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in WarehouseData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="form.remark" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisibles = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="putins">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getwproductList ,wproductTest,wproductPutin,createputins} from "@/api/wpm";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { getWarehouseList } from "@/api/inm";
|
||||||
|
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||||
|
import { genTree } from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
const defaultetestitem = {};
|
||||||
|
export default {
|
||||||
|
components: { Pagination },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
testitem: defaultetestitem,
|
||||||
|
form:{remark:"",warehouse:""},
|
||||||
|
wproductList: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
wproductList1: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
wproductList2: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
listQuery1: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
listQuery2: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
actstate_: {
|
||||||
|
6: "待复检",
|
||||||
|
10: "生产中",
|
||||||
|
20: "待检验",
|
||||||
|
30: "已合格",
|
||||||
|
40: "库存中",
|
||||||
|
50: "不合格",
|
||||||
|
60: "待成品检验",
|
||||||
|
},
|
||||||
|
choice: [
|
||||||
|
{
|
||||||
|
value: true,
|
||||||
|
label: "合格",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: false,
|
||||||
|
label: "不合格",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options: [],
|
||||||
|
listLoading: true,
|
||||||
|
fieldList: "",
|
||||||
|
is_testok: "true",
|
||||||
|
field: [],
|
||||||
|
recordformList: [],
|
||||||
|
recordform: "",
|
||||||
|
fifo_detail: "",
|
||||||
|
listQueryrecordform: {
|
||||||
|
page: 0,
|
||||||
|
},
|
||||||
|
outerVisible: false,
|
||||||
|
innerVisible: false,
|
||||||
|
dialogFormVisible:false,
|
||||||
|
dialogFormVisibles:false,
|
||||||
|
testrecord: {},
|
||||||
|
WarehouseData:"",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
|
||||||
|
this.getList1();
|
||||||
|
this.getLists();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
//待检成品列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
this.listQuery.act_state = 60;
|
||||||
|
this.listQuery.material__type = 1;
|
||||||
|
getwproductList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wproductList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//已合格成品
|
||||||
|
getList1() {
|
||||||
|
|
||||||
|
this.listQuery1.act_state = 30;
|
||||||
|
this.listQuery1.material__type = 1;
|
||||||
|
getwproductList(this.listQuery1).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wproductList1 = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//半成品批量入库
|
||||||
|
handleCreate(){
|
||||||
|
this.dialogFormVisibles=true;
|
||||||
|
this.getWarehouseLists();//仓库
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
//批量入库
|
||||||
|
putins(){
|
||||||
|
let _this=this
|
||||||
|
_this.mutipID=[]
|
||||||
|
this.$refs.multipleTable.selection.forEach((item) => {
|
||||||
|
_this.mutipID.push( item.id );
|
||||||
|
alert(_this.mutipID);
|
||||||
|
});
|
||||||
|
console.log(_this.mutipID);
|
||||||
|
|
||||||
|
createputins({warehouse:this.form.warehouse,wproducts: _this.mutipID,remark:this.form.remark}).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.$message.success("批量入库成功!");
|
||||||
|
this.dialogFormVisibles=false;
|
||||||
|
this.getList1();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//仓库列表
|
||||||
|
getWarehouseLists(){
|
||||||
|
|
||||||
|
getWarehouseList({page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.WarehouseData = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleInspection(scope) {
|
||||||
|
//调该物料对应的检查表
|
||||||
|
this.outerVisible = true;
|
||||||
|
this.wproduct=scope.row.id;//半成品ID
|
||||||
|
this.wproductactstate=scope.row.act_state;//半成品状态
|
||||||
|
this.listQueryrecordform.material = scope.row.material;//
|
||||||
|
this.listQueryrecordform.type = 2;
|
||||||
|
this.recordform="";
|
||||||
|
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.recordformList = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//根据选择的表,渲染检查项目
|
||||||
|
submitrecordform() {
|
||||||
|
if (this.recordform != "") {
|
||||||
|
getrffieldList({ form: this.recordform, page: 0 }).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.fieldList = response.data;
|
||||||
|
this.innerVisible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else this.$message.error("请选择检查表!");
|
||||||
|
},
|
||||||
|
//提交检查项目
|
||||||
|
submitfield() {
|
||||||
|
let _this = this;
|
||||||
|
_this.field = []; //检查项目
|
||||||
|
this.fieldList.forEach((item) => {
|
||||||
|
|
||||||
|
_this.field.push({
|
||||||
|
form_field:item.id,
|
||||||
|
field_value:item.sort,
|
||||||
|
is_testok:item.is_testok//单项检查结果
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(this.recordform);
|
||||||
|
this.testrecord.form = this.recordform;//检查表
|
||||||
|
this.testrecord.record_data = _this.field;//检查项列表
|
||||||
|
this.testrecord.is_testok = this.is_testok;//检查表检查结果
|
||||||
|
this.testrecord.wproduct = this.wproduct;//半成品ID
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
wproductTest(this.testrecord).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.innerVisible = false;
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.getList();
|
||||||
|
this.getList1();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
//半成品入库
|
||||||
|
handlePutin(scope){
|
||||||
|
this.dialogFormVisible=true;
|
||||||
|
this.getWarehouseLists();//仓库
|
||||||
|
this.id=scope.row.id;//半成品id
|
||||||
|
},
|
||||||
|
putin(){
|
||||||
|
wproductPutin(this.id,this.form).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.$message.success("入库成功!");
|
||||||
|
this.dialogFormVisible=false;
|
||||||
|
this.getList1();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -162,17 +162,12 @@
|
||||||
scope.row.step_.name
|
scope.row.step_.name
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验状态">
|
<el-table-column label="进行状态">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
actstate_[scope.row.act_state]
|
actstate_[scope.row.act_state]
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所在子工序执行状态">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="scope.row.is_executed">已执行</el-tag>
|
|
||||||
<el-tag v-else>待执行</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="更新时间">
|
<el-table-column label="更新时间">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
|
@ -701,12 +696,13 @@ export default {
|
||||||
showPrise1: false,
|
showPrise1: false,
|
||||||
actstate_: {
|
actstate_: {
|
||||||
6: "待复检",
|
6: "待复检",
|
||||||
10: "生产中",
|
10: "操作进行中",
|
||||||
20: "待检验",
|
20: "待检验",
|
||||||
30: "已合格",
|
30: "已合格",
|
||||||
40: "库存中",
|
40: "库存中",
|
||||||
50: "不合格",
|
50: "不合格",
|
||||||
60: "待成品检验",
|
60: "待成品检验",
|
||||||
|
8:"操作准备中",
|
||||||
},
|
},
|
||||||
state_: {
|
state_: {
|
||||||
0: "制定中",
|
0: "制定中",
|
||||||
|
|
Loading…
Reference in New Issue