ciagoudingdanxiang
This commit is contained in:
parent
efdc534a02
commit
bacddddca0
|
@ -36,6 +36,16 @@ export function getInventoryList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//其他入库
|
||||||
|
|
||||||
|
export function createInother(data) {
|
||||||
|
return request({
|
||||||
|
url: '/inm/fifo/in_other/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//采购入库
|
||||||
export function createInventory(data) {
|
export function createInventory(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/inm/fifo/in_pur/',
|
url: '/inm/fifo/in_pur/',
|
||||||
|
@ -43,6 +53,15 @@ export function createInventory(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//采购订单项入库
|
||||||
|
export function createfifoitem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/inm/fifoitem/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//仓库对应的物料
|
//仓库对应的物料
|
||||||
export function getfifodetailList(query) {
|
export function getfifodetailList(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -58,4 +58,13 @@ export function deletePuorderItem(id, data) {
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//采购订单项目详情
|
||||||
|
|
||||||
|
export function getpuorder(id) {
|
||||||
|
return request({
|
||||||
|
url: `/pum/pu_order_item/${id}/`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -2,8 +2,11 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handlecgCreate"
|
||||||
|
>新增采购入库</el-button
|
||||||
|
>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
>新增出入库记录</el-button
|
>新增其他入库</el-button
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
|
@ -41,13 +44,14 @@
|
||||||
height="100"
|
height="100"
|
||||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="出入记录ID">
|
|
||||||
|
<el-table-column label="记录编号">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.id
|
scope.row.number
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作人员">
|
<el-table-column label="操作人员">
|
||||||
<template slot-scope="scope" v-if="scope.row.create_by">{{
|
<template slot-scope="scope" v-if="scope.row.create_by">{{
|
||||||
scope.row.create_by_.name
|
scope.row.create_by_.name
|
||||||
|
@ -65,7 +69,9 @@
|
||||||
<el-tag v-else>已审核</el-tag>
|
<el-tag v-else>已审核</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间">
|
||||||
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
@ -97,6 +103,42 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisibles"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
|
||||||
|
title="新增采购入库"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form1"
|
||||||
|
:model="inpur"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
|
||||||
|
label="采购订单"
|
||||||
|
:prop="pu_order"
|
||||||
|
>
|
||||||
|
<el-select v-model="inpur.pu_order" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in puorderoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.number"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirminpur('Form1')">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
@ -110,9 +152,22 @@
|
||||||
label-position="right"
|
label-position="right"
|
||||||
:rules="rule1"
|
:rules="rule1"
|
||||||
>
|
>
|
||||||
|
<el-form-item
|
||||||
|
class="warehouse"
|
||||||
|
label="供应商"
|
||||||
|
:prop="vendor"
|
||||||
|
>
|
||||||
|
<el-select v-model="inventory.vendor" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in vendoroptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
<div v-for="(item, index) in inventory.details" :key="index">
|
<div v-for="(item, index) in inventory.details" :key="index">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="5" style="margin-right: 10px">
|
<el-col :span="5" style="margin-right: 10px">
|
||||||
|
@ -232,17 +287,24 @@
|
||||||
import {
|
import {
|
||||||
getfifoList,
|
getfifoList,
|
||||||
createInventory,
|
createInventory,
|
||||||
|
createInother,
|
||||||
getWarehouseList,
|
getWarehouseList,
|
||||||
deleteFifoitem,
|
deleteFifoitem,
|
||||||
deleteFifo,
|
deleteFifo,
|
||||||
audit,
|
audit,
|
||||||
} from "@/api/inm";
|
} from "@/api/inm";
|
||||||
|
import {
|
||||||
|
getPuorderList,
|
||||||
|
|
||||||
|
} from "@/api/pum";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { getpVendorList } from "@/api/vendor";
|
||||||
import { getMaterialList } from "@/api/mtm";
|
import { getMaterialList } from "@/api/mtm";
|
||||||
import { getUserList } from "@/api/user";
|
import { getUserList } from "@/api/user";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaulteinventory = {
|
const defaulteinventory = {
|
||||||
|
vendor:null,
|
||||||
details: [
|
details: [
|
||||||
{
|
{
|
||||||
warehouse:"",//仓库
|
warehouse:"",//仓库
|
||||||
|
@ -265,17 +327,21 @@ export default {
|
||||||
2: "销售提货",
|
2: "销售提货",
|
||||||
3: "采购入库",
|
3: "采购入库",
|
||||||
4: "生产入库",
|
4: "生产入库",
|
||||||
|
5: "其他入库",
|
||||||
},
|
},
|
||||||
|
inpur:{pu_order:null},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
puorderoptions:[],
|
||||||
warehouseData: [],
|
warehouseData: [],
|
||||||
materialoptions: [],
|
materialoptions: [],
|
||||||
|
vendoroptions:[],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
|
dialogVisibles: false,
|
||||||
rule1: {
|
rule1: {
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
|
@ -286,8 +352,9 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getlists();
|
this.getlists();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getListgys();
|
||||||
this.getmaterialList();
|
this.getmaterialList();
|
||||||
|
this.getpuorderList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
@ -304,9 +371,40 @@ export default {
|
||||||
},
|
},
|
||||||
//出入库详情
|
//出入库详情
|
||||||
handleDetail(scope) {
|
handleDetail(scope) {
|
||||||
this.$router.push({ name: "fifodetail", params: { id: scope.row.id } });
|
this.$router.push({ name: "fifodetail", params: { id: scope.row.id,pu_order:scope.row.pu_order, } });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//供应商列表
|
||||||
|
getListgys() {
|
||||||
|
|
||||||
|
getpVendorList({page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.vendoroptions = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//采购订单
|
||||||
|
getpuorderList() {
|
||||||
|
|
||||||
|
getPuorderList({page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.puorderoptions = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//采购入库提交
|
||||||
|
confirminpur(){
|
||||||
|
createInventory(this.inpur).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisibles = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//仓库
|
||||||
getlists() {
|
getlists() {
|
||||||
getWarehouseList({ page: 0 }).then((response) => {
|
getWarehouseList({ page: 0 }).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
@ -315,7 +413,9 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handlecgCreate(){
|
||||||
|
this.dialogVisibles=true;
|
||||||
|
},
|
||||||
addConditions() {
|
addConditions() {
|
||||||
if (this.inventory.details.length <= 10) {
|
if (this.inventory.details.length <= 10) {
|
||||||
this.inventory.details.push({
|
this.inventory.details.push({
|
||||||
|
@ -388,7 +488,7 @@ export default {
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
console.log(this.inventory);
|
console.log(this.inventory);
|
||||||
|
|
||||||
createInventory(this.inventory).then((res) => {
|
createInother(this.inventory).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handlecgxCreate"
|
||||||
|
>新增采购项入库</el-button
|
||||||
|
>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="fifodetailList.results"
|
:data="fifodetailList.results"
|
||||||
|
@ -8,7 +11,8 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="600"
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{ bottomOffset: 42 }"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="物料名称">
|
<el-table-column label="物料名称">
|
||||||
|
@ -50,7 +54,6 @@
|
||||||
|
|
||||||
<el-table-column label="文件">
|
<el-table-column label="文件">
|
||||||
<template slot-scope="scope" v-if="scope.row.files">
|
<template slot-scope="scope" v-if="scope.row.files">
|
||||||
|
|
||||||
<div v-for="item in scope.row.files_" v-bind:key="item.id">
|
<div v-for="item in scope.row.files_" v-bind:key="item.id">
|
||||||
<el-link :href="item.path" target="_blank" type="primary">{{
|
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||||
item.name
|
item.name
|
||||||
|
@ -60,12 +63,14 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link type="primary" @click="handleMaterial(scope)" v-if="scope.row.need_test"
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="handleMaterial(scope)"
|
||||||
|
v-if="scope.row.need_test"
|
||||||
>复验</el-link
|
>复验</el-link
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-link type="primary" @click="handleEdit(scope)">上传</el-link>
|
<el-link type="primary" @click="handleEdit(scope)">上传</el-link>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -77,54 +82,137 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisibles"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
title="新增采购项入库"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form1"
|
||||||
|
:model="inpur"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-form-item label="采购订单项目" :prop="pu_order_item">
|
||||||
|
<el-select v-model="inpur.pu_order_item" @change="showmessage">
|
||||||
|
<el-option
|
||||||
|
v-for="item in puorderTtemoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.material_.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-form-item label="采购数量">
|
||||||
|
<el-input v-model="puorderItemdetial.count" :disabled="true">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item></div
|
||||||
|
></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-form-item label="到货时间">
|
||||||
|
<el-input
|
||||||
|
v-model="puorderItemdetial.delivery_date"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item></div
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12"
|
||||||
|
><div class="grid-content bg-purple">
|
||||||
|
<el-form-item label="到货数量">
|
||||||
|
<el-input
|
||||||
|
v-model="puorderItemdetial.delivered_count"
|
||||||
|
:disabled="true"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item></div
|
||||||
|
></el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form-item label="仓库" :prop="warehouse">
|
||||||
|
<el-select v-model="inpur.warehouse">
|
||||||
|
<el-option
|
||||||
|
v-for="item in warehouseData"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次" :prop="batch">
|
||||||
|
<el-input v-model="inpur.batch" placeholder="批次号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入库数量" :prop="count">
|
||||||
|
<el-input-number v-model="inpur.count" :min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisibles = false"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="confirminpur('Form1')"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
title="上传文件"
|
title="上传文件"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
ref="Form"
|
ref="Form"
|
||||||
:model="FIFOItem"
|
:model="FIFOItem"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-form-item label="是否需要复验" prop="need_test">
|
<el-form-item label="是否需要复验" prop="need_test">
|
||||||
<el-switch v-model="FIFOItem.need_test"></el-switch>
|
<el-switch v-model="FIFOItem.need_test"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="文件列表">
|
<el-form-item label="文件列表">
|
||||||
<el-upload
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
ref="upload"
|
:action="upUrl"
|
||||||
:action="upUrl"
|
:before-upload="beforeUpload"
|
||||||
:before-upload="beforeUpload"
|
:on-success="handleUpSuccess"
|
||||||
:on-success="handleUpSuccess"
|
:headers="upHeaders"
|
||||||
:headers="upHeaders"
|
multiple
|
||||||
multiple
|
accept="image/*,.ppt,.pdf,.doc,.docx,.xls,.xlsx"
|
||||||
accept="image/*,.ppt,.pdf,.doc,.docx,.xls,.xlsx"
|
>
|
||||||
>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
|
||||||
<span class="el-upload__tip">
|
<span class="el-upload__tip">
|
||||||
可上传多个pdf,word,ppt,excel,图片文件,单文件大小不超过50M
|
可上传多个pdf,word,ppt,excel,图片文件,单文件大小不超过50M
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in fileList"
|
v-for="(item, index) in fileList"
|
||||||
v-bind:key="item.id"
|
v-bind:key="item.id"
|
||||||
style="margin-top: 2px;"
|
style="margin-top: 2px"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
class="el-icon-delete"
|
class="el-icon-delete"
|
||||||
@click="deleteFile(index)"
|
@click="deleteFile(index)"
|
||||||
style="color: red"
|
style="color: red"
|
||||||
|
></i>
|
||||||
></i>
|
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||||
<el-link :href="item.path" target="_blank" type="primary">{{
|
item.name
|
||||||
item.name
|
}}</el-link>
|
||||||
}}</el-link>
|
</div>
|
||||||
</div>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
@ -270,8 +358,14 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getfifodetailList,itemfiles } from "@/api/inm";
|
import {
|
||||||
|
getfifodetailList,
|
||||||
|
itemfiles,
|
||||||
|
createfifoitem,
|
||||||
|
getWarehouseList,
|
||||||
|
} from "@/api/inm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { getPuorderItemList, getpuorder } from "@/api/pum";
|
||||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||||
import { createTestrecord } from "@/api/inm";
|
import { createTestrecord } from "@/api/inm";
|
||||||
|
|
||||||
|
@ -279,8 +373,8 @@ import { upUrl, upHeaders } from "@/api/file";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultfile = {
|
const defaultfile = {
|
||||||
files:[],
|
files: [],
|
||||||
need_test:false,
|
need_test: false,
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
@ -292,10 +386,12 @@ export default {
|
||||||
fifodetailList: {
|
fifodetailList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
inpur: {},
|
||||||
|
dialogVisibles: false,
|
||||||
upHeaders: upHeaders(),
|
upHeaders: upHeaders(),
|
||||||
upUrl: upUrl(),
|
upUrl: upUrl(),
|
||||||
fileList: [],
|
fileList: [],
|
||||||
FIFOItem:defaultfile,
|
FIFOItem: defaultfile,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
|
@ -303,6 +399,7 @@ export default {
|
||||||
fieldList: {
|
fieldList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
warehouseData: [],
|
||||||
is_testok: "true",
|
is_testok: "true",
|
||||||
field: [],
|
field: [],
|
||||||
recordformList: [],
|
recordformList: [],
|
||||||
|
@ -311,27 +408,28 @@ export default {
|
||||||
listQueryrecordform: {
|
listQueryrecordform: {
|
||||||
page: 0,
|
page: 0,
|
||||||
},
|
},
|
||||||
fileData:{},
|
fileData: {},
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
innerVisible: false,
|
innerVisible: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogVisibles: false,
|
||||||
|
dialogType: "new",
|
||||||
testrecord: {},
|
testrecord: {},
|
||||||
|
puorderItemdetial: [],
|
||||||
|
puorderTtemoptions: [],
|
||||||
rule1: {
|
rule1: {
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
item: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
|
@ -346,9 +444,58 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
showmessage(value) {
|
||||||
|
getpuorder(value).then((response) => {
|
||||||
handleUpSuccess(res, file, filelist) {
|
if (response.data) {
|
||||||
|
this.puorderItemdetial = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//采购订单项入库
|
||||||
|
|
||||||
|
confirminpur() {
|
||||||
|
console.log(this.inpur);
|
||||||
|
this.inpur.material = this.puorderItemdetial.material_.id; //物料类型
|
||||||
|
this.inpur.fifo = this.$route.params.id; //出入库记录
|
||||||
|
createfifoitem(this.inpur).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisibles = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handlecgxCreate() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form1"].clearValidate();
|
||||||
|
});
|
||||||
|
if (this.$route.params.pu_order != null) {
|
||||||
|
this.dialogVisibles = true;
|
||||||
|
this.getpuorderitemList();
|
||||||
|
this.getlists();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//仓库
|
||||||
|
getlists() {
|
||||||
|
getWarehouseList({ page: 0 }).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.warehouseData = genTree(response.data);
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//采购顶单项列表
|
||||||
|
getpuorderitemList() {
|
||||||
|
getPuorderItemList({
|
||||||
|
pu_order: this.$route.params.pu_order,
|
||||||
|
page: 0,
|
||||||
|
}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.puorderTtemoptions = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleUpSuccess(res, file, filelist) {
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
id: res.data.id,
|
id: res.data.id,
|
||||||
name: res.data.name,
|
name: res.data.name,
|
||||||
|
@ -385,8 +532,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
this.FIFOItem = Object.assign({}, scope.row); // copy obj
|
this.FIFOItem = Object.assign({}, scope.row); // copy obj
|
||||||
this.fileList=[],
|
(this.fileList = []), (this.dialogVisible = true);
|
||||||
this.dialogVisible = true;
|
|
||||||
for (var i = 0; i < this.FIFOItem.files_.length; i++) {
|
for (var i = 0; i < this.FIFOItem.files_.length; i++) {
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
id: this.FIFOItem.files_[i].id,
|
id: this.FIFOItem.files_[i].id,
|
||||||
|
@ -396,25 +542,23 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
var files = [];
|
var files = [];
|
||||||
for (var i = 0; i < this.fileList.length; i++) {
|
for (var i = 0; i < this.fileList.length; i++) {
|
||||||
files.push(this.fileList[i].id);
|
files.push(this.fileList[i].id);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.fileData.files = files;
|
||||||
|
this.fileData.need_test = this.FIFOItem.need_test;
|
||||||
|
console.log(this.fileData);
|
||||||
|
itemfiles(this.FIFOItem.id, this.fileData).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
|
});
|
||||||
this.fileData.files=files;
|
|
||||||
this.fileData.need_test=this.FIFOItem.need_test;
|
|
||||||
console.log(this.fileData)
|
|
||||||
itemfiles(this.FIFOItem.id,this.fileData).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
this.getList();
|
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$message.success("成功");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleMaterial(scope) {
|
handleMaterial(scope) {
|
||||||
//调该物料对应的检查表
|
//调该物料对应的检查表
|
||||||
this.outerVisible = true;
|
this.outerVisible = true;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="任务编号">
|
<el-table-column label="子计划编号" width="100">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称">
|
<el-table-column label="产品名称">
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"> </el-table-column>
|
<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="子计划编号" width="100">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.subproduction_plan_.number
|
scope.row.subproduction_plan_.number
|
||||||
}}</template>
|
}}</template>
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
max-height="300"
|
max-height="300"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="任务编号">
|
<el-table-column label="子计划编号" width="100">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.subproduction_plan_.number
|
scope.row.subproduction_plan_.number
|
||||||
}}</template>
|
}}</template>
|
||||||
|
|
Loading…
Reference in New Issue