外协库存事务核心
This commit is contained in:
parent
1d9b54e957
commit
1f6ca71eb8
44
src/api/mes/md/sip.js
Normal file
44
src/api/mes/md/sip.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询产品Sip列表
|
||||||
|
export function listSip(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/sip/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询产品Sip详细
|
||||||
|
export function getSip(sipId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/sip/' + sipId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增产品Sip
|
||||||
|
export function addSip(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/sip',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改产品Sip
|
||||||
|
export function updateSip(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/sip',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除产品Sip
|
||||||
|
export function delSip(sipId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/md/sip/' + sipId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -42,3 +42,12 @@ export function delOutsourcerecpt(recptId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//执行入库
|
||||||
|
export function execute(recptId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/outsourcerecpt/' + recptId,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
@ -226,7 +226,7 @@ export const dynamicRoutes = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'iqc',
|
path: 'iqc',
|
||||||
component: () => import('@/views/mes/qc/iqc/iqc'),
|
component: () => import('@/views/mes/qc/pendinginspect/iqc'),
|
||||||
name: 'iqcadd',
|
name: 'iqcadd',
|
||||||
props: true,
|
props: true,
|
||||||
meta: {title: '来料检验', activeMenu: '/mes/qc/pendinginspect/iqc'}
|
meta: {title: '来料检验', activeMenu: '/mes/qc/pendinginspect/iqc'}
|
||||||
|
231
src/views/mes/md/mditem/components/sip.vue
Normal file
231
src/views/mes/md/mditem/components/sip.vue
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row v-if="optType != 'view'" :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['mes:md:mditem:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="header">
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="标题" prop="sipTitle">
|
||||||
|
<el-input v-model="form.sipTitle" placeholder="请输入标题"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="展示顺序">
|
||||||
|
<el-input-number :min="1" v-model="form.orderNum"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容说明">
|
||||||
|
<el-input type="textarea" v-model="form.sipDescription" placeholder="请输入说明信息"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属工序" prop="processId">
|
||||||
|
<el-select v-model="form.processId" placeholder="请选择工序">
|
||||||
|
<el-option
|
||||||
|
v-for="item in processOptions"
|
||||||
|
:key="item.processId"
|
||||||
|
:label="item.processName"
|
||||||
|
:value="item.processId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图片">
|
||||||
|
<ImageUpload :limit="1" :value="form.sipUrl" :fileSize="5" @onUploaded="handleImgUplaoded" @onRemoved="handleImgRemoved" ></ImageUpload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">提 交</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
<div class="images">
|
||||||
|
<div v-for="(item,index) in sipList" :key="index" class="image-middle">
|
||||||
|
<el-card shadow="hover" :body-style="{pading: '10px'}">
|
||||||
|
<el-popover>
|
||||||
|
<img :src="sipList[index].sipUrl" slot="reference" class="image"/>
|
||||||
|
<el-image class="imagePreview" :src="sipList[index].sopUrl" :preview-src-list="imageList"></el-image>
|
||||||
|
</el-popover>
|
||||||
|
<div style="text-align:center;padding-top:12px">
|
||||||
|
<span>
|
||||||
|
{{sipList[index].sopTitle}}
|
||||||
|
</span>
|
||||||
|
<el-button @click="handleUpdate(sipList[index])" v-hasPermi="['mes:md:mditem:edit']" v-if="optType !='view'" type="primary" icon="el-icon-edit"></el-button>
|
||||||
|
<el-button @click="handleDelete(sipList[index])" v-hasPermi="['mes:md:mditem:edit']" v-if="optType !='view'" type="danger" icon="el-icon-delete"></el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listSip, getSip, delSip, addSip, updateSip } from "@/api/mes/md/sip";
|
||||||
|
import ImageUpload from "@/components/ImageUpload/index.vue"
|
||||||
|
import {listAllProcess} from "@/api/mes/pro/process";
|
||||||
|
export default{
|
||||||
|
name: "SOPTab",
|
||||||
|
components: {ImageUpload},
|
||||||
|
props:{
|
||||||
|
itemId: null,
|
||||||
|
optType: null,
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
title: "新增SIP信息",
|
||||||
|
loading: true,
|
||||||
|
open: false,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
itemId: [
|
||||||
|
{ required: true, message: "物料产品ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// 产品SOP表格数据
|
||||||
|
sipList: [],
|
||||||
|
//用于图片预览的清单
|
||||||
|
imageList: [],
|
||||||
|
//工序选项
|
||||||
|
processOptions:[],
|
||||||
|
queryParams: {
|
||||||
|
itemId: this.itemId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.getList();
|
||||||
|
this.getProcess();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取当前产品的SOP资料清单
|
||||||
|
getList(){
|
||||||
|
listSip(this.queryParams).then(response =>{
|
||||||
|
debugger;
|
||||||
|
this.imageList = [];
|
||||||
|
this.sipList = response.rows;
|
||||||
|
this.sipList.forEach(row => {
|
||||||
|
this.imageList.push(row.sipUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查询工序信息
|
||||||
|
getProcess(){
|
||||||
|
listAllProcess().then( response =>{
|
||||||
|
this.processOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
sopId: null,
|
||||||
|
itemId: this.itemId,
|
||||||
|
orderNum: null,
|
||||||
|
processId: null,
|
||||||
|
processCode: null,
|
||||||
|
processName: null,
|
||||||
|
sopTitle: null,
|
||||||
|
sopDescription: null,
|
||||||
|
sopUrl: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 新增操作
|
||||||
|
*/
|
||||||
|
handleAdd(){
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加产品SIP";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const sipId = row.sipId || this.ids
|
||||||
|
getSip(sipId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改产品SIP";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//图片上传成功
|
||||||
|
handleImgUplaoded(imgUrl){
|
||||||
|
this.form.sipUrl = imgUrl;
|
||||||
|
},
|
||||||
|
//图片移除
|
||||||
|
handleImgRemoved(imgUrl){
|
||||||
|
this.form.sipUrl = null;
|
||||||
|
},
|
||||||
|
//提交
|
||||||
|
submitForm(){
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.sipId != null) {
|
||||||
|
updateSip(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addSip(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const sipIds = row.sipId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除产品SIP编号为"' + sipIds + '"的数据项?').then(function() {
|
||||||
|
return delSip(sipIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.header {
|
||||||
|
margin-left: 15px;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.images {
|
||||||
|
display: flex;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 21px;
|
||||||
|
margin-right: 20px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-middle{
|
||||||
|
margin-right: 15px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image{
|
||||||
|
width:110px;
|
||||||
|
height: 110px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.imagePreview {
|
||||||
|
width: 600px;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -114,6 +114,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
v-hasPermi="['mes:wm:outsourceissue:edit']"
|
v-hasPermi="['mes:wm:outsourceissue:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@ -121,6 +122,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
v-hasPermi="['mes:wm:outsourceissue:remove']"
|
v-hasPermi="['mes:wm:outsourceissue:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -117,6 +117,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['mes:wm:outsourcerecpt:edit']"
|
v-hasPermi="['mes:wm:outsourcerecpt:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
@ -124,6 +125,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['mes:wm:outsourcerecpt:remove']"
|
v-hasPermi="['mes:wm:outsourcerecpt:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
@ -243,7 +245,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOutsourcerecpt, getOutsourcerecpt, delOutsourcerecpt, addOutsourcerecpt, updateOutsourcerecpt } from "@/api/mes/wm/outsourcerecpt";
|
import { listOutsourcerecpt, getOutsourcerecpt, delOutsourcerecpt, addOutsourcerecpt, updateOutsourcerecpt, execute } from "@/api/mes/wm/outsourcerecpt";
|
||||||
import {getTreeList} from "@/api/mes/wm/warehouse"
|
import {getTreeList} from "@/api/mes/wm/warehouse"
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
import WorkorderSelect from "@/components/workorderSelect/single.vue"
|
import WorkorderSelect from "@/components/workorderSelect/single.vue"
|
||||||
@ -426,6 +428,16 @@ export default {
|
|||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//执行入库
|
||||||
|
handleExecute(row){
|
||||||
|
const recptIds = row.recptId || this.ids;
|
||||||
|
this.$modal.confirm('确认执行入库?').then(function() {
|
||||||
|
return execute(recptIds)//执行入库
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("入库成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
//选择生产工单
|
//选择生产工单
|
||||||
handleWorkorderSelect(){
|
handleWorkorderSelect(){
|
||||||
this.$refs.woSelect.showFlag = true;
|
this.$refs.woSelect.showFlag = true;
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item label="盘点类型" prop="takingType">
|
||||||
|
<el-select v-model="queryParams.takingType" placeholder="请选择盘点类型" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.mes_stocktaking_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="盘点单编号" prop="takingCode">
|
<el-form-item label="盘点单编号" prop="takingCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.takingCode"
|
v-model="queryParams.takingCode"
|
||||||
@ -25,48 +35,6 @@
|
|||||||
placeholder="请选择盘点日期">
|
placeholder="请选择盘点日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点人用户名" prop="userName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userName"
|
|
||||||
placeholder="请输入盘点人用户名"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="盘点人" prop="nickName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.nickName"
|
|
||||||
placeholder="请输入盘点人"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="盘点类型" prop="takingType">
|
|
||||||
<el-select v-model="queryParams.takingType" placeholder="请选择盘点类型" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.mes_stocktaking_type"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="仓库ID" prop="warehouseId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.warehouseId"
|
|
||||||
placeholder="请输入仓库ID"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="仓库编码" prop="warehouseCode">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.warehouseCode"
|
|
||||||
placeholder="请输入仓库编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="仓库名称" prop="warehouseName">
|
<el-form-item label="仓库名称" prop="warehouseName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.warehouseName"
|
v-model="queryParams.warehouseName"
|
||||||
@ -86,92 +54,31 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['wm:stocktaking:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['wm:stocktaking:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['wm:stocktaking:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['wm:stocktaking:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="stocktakingList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="stocktakingList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="盘点单ID" align="center" prop="takingId" />
|
<el-table-column label="盘点单编号" align="center" prop="takingCode" >
|
||||||
<el-table-column label="盘点单编号" align="center" prop="takingCode" />
|
|
||||||
<el-table-column label="盘点单名称" align="center" prop="takingName" />
|
|
||||||
<el-table-column label="盘点日期" align="center" prop="takingDate" width="180">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.takingDate, '{y}-{m}-{d}') }}</span>
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:stocktaking:query']"
|
||||||
|
>{{scope.row.takingCode}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="盘点人用户名" align="center" prop="userName" />
|
<el-table-column label="盘点单名称" align="center" prop="takingName" />
|
||||||
<el-table-column label="盘点人" align="center" prop="nickName" />
|
|
||||||
<el-table-column label="盘点类型" align="center" prop="takingType">
|
<el-table-column label="盘点类型" align="center" prop="takingType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.mes_stocktaking_type" :value="scope.row.takingType"/>
|
<dict-tag :options="dict.type.mes_stocktaking_type" :value="scope.row.takingType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
|
<el-table-column label="盘点日期" align="center" prop="takingDate" width="180">
|
||||||
<el-table-column label="仓库编码" align="center" prop="warehouseCode" />
|
|
||||||
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
|
|
||||||
<el-table-column label="单据状态" align="center" prop="status" />
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<span>{{ parseTime(scope.row.takingDate, '{y}-{m}-{d}') }}</span>
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['wm:stocktaking:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['wm:stocktaking:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="盘点人" align="center" prop="nickName" />
|
||||||
|
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
|
||||||
|
<el-table-column label="单据状态" align="center" prop="status" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
@ -233,6 +140,14 @@
|
|||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-if="form.takingId != null">
|
||||||
|
<el-tab-pane v-if="form.takingType=='OPEN'" label="盘点清单">
|
||||||
|
<TakingLine></TakingLine>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="盘点结果">
|
||||||
|
<TakingResult></TakingResult>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@ -242,10 +157,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listStocktaking, getStocktaking, delStocktaking, addStocktaking, updateStocktaking } from "@/api/mes/wm/stocktaking";
|
import { listStocktaking, getStocktaking, delStocktaking, addStocktaking, updateStocktaking ,execute} from "@/api/mes/wm/stocktaking";
|
||||||
|
import TakingLine from './line.vue';
|
||||||
|
import TakingResult from './result.vue';
|
||||||
export default {
|
export default {
|
||||||
name: "Stocktaking",
|
name: "Stocktaking",
|
||||||
|
components: {TakingLine,TakingResult},
|
||||||
dicts: ['mes_stocktaking_type'],
|
dicts: ['mes_stocktaking_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -376,7 +293,17 @@ export default {
|
|||||||
this.download('wm/stocktaking/export', {
|
this.download('wm/stocktaking/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `stocktaking_${new Date().getTime()}.xlsx`)
|
}, `stocktaking_${new Date().getTime()}.xlsx`)
|
||||||
}
|
},
|
||||||
|
//执行盘点
|
||||||
|
handleExecute(row){
|
||||||
|
const takingIds = row.takingId || this.ids;
|
||||||
|
this.$modal.confirm('确认执行盘点?').then(function() {
|
||||||
|
return execute(takingIds)//执行入库
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("盘点完成");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -336,6 +336,10 @@ import { listStocktakingline, getStocktakingline, delStocktakingline, addStockta
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Stocktakingline",
|
name: "Stocktakingline",
|
||||||
|
props:{
|
||||||
|
optType: null,
|
||||||
|
takingId: null,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -360,7 +364,7 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
takingId: null, materialStockId: null, itemId: null, itemCode: null, itemName: null, specification: null, unitOfMeasure: null, unitName: null, quantity: null, takingQuantity: null, warehouseId: null, warehouseCode: null, warehouseName: null, locationId: null, locationCode: null, locationName: null, areaId: null, areaCode: null, areaName: null, takingStatus: null, },
|
takingId: this.takingId, materialStockId: null, itemId: null, itemCode: null, itemName: null, specification: null, unitOfMeasure: null, unitName: null, quantity: null, takingQuantity: null, warehouseId: null, warehouseCode: null, warehouseName: null, locationId: null, locationCode: null, locationName: null, areaId: null, areaCode: null, areaName: null, takingStatus: null, },
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
@ -212,6 +212,10 @@ import { listStocktakingresult, getStocktakingresult, delStocktakingresult, addS
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Stocktakingresult",
|
name: "Stocktakingresult",
|
||||||
|
props:{
|
||||||
|
optType: null,
|
||||||
|
takingId: null,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -236,7 +240,7 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
takingId: null, itemId: null, itemCode: null, itemName: null, specification: null, unitOfMeasure: null, unitName: null, quantity: null, takingQuantity: null, takingStatus: null, },
|
takingId: this.takingId, itemId: null, itemCode: null, itemName: null, specification: null, unitOfMeasure: null, unitName: null, quantity: null, takingQuantity: null, takingStatus: null, },
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
Loading…
Reference in New Issue
Block a user