ceshi
This commit is contained in:
parent
9c8cfd4731
commit
4e6312e3e0
|
@ -150,3 +150,11 @@ export function itemfiles(id, data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//其他出库
|
||||||
|
export function outOther(data) {
|
||||||
|
return request({
|
||||||
|
url: `/inm/fifo/out_other/`,
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handlecgCreate"
|
@click="handlecgCreate"
|
||||||
>
|
>
|
||||||
新增采购入库
|
采购入库
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="checkPermission(['fifo_in_other'])"
|
v-if="checkPermission(['fifo_in_other'])"
|
||||||
|
@ -16,7 +16,15 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleCreate"
|
@click="handleCreate"
|
||||||
>
|
>
|
||||||
新增其他入库
|
其他入库
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="checkPermission(['fifo_out_other'])"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleoutCreate"
|
||||||
|
>
|
||||||
|
其他出库
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
|
@ -54,12 +62,11 @@
|
||||||
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="记录编号" prop="number">
|
<el-table-column label="记录编号" prop="number"> </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 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="出/入库时间" prop="inout_date">
|
<el-table-column label="出/入库时间" prop="inout_date">
|
||||||
|
@ -73,12 +80,11 @@
|
||||||
<el-tag v-else>已审核</el-tag>
|
<el-tag v-else>已审核</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time">
|
<el-table-column label="创建时间" prop="create_time"> </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
|
<el-link
|
||||||
v-if="checkPermission(['fifo_pack'])&&scope.row.type==2"
|
v-if="checkPermission(['fifo_pack']) && scope.row.type == 2"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handlePack(scope)"
|
@click="handlePack(scope)"
|
||||||
>
|
>
|
||||||
|
@ -92,7 +98,9 @@
|
||||||
查看
|
查看
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['fifo_hear'])&&scope.row.is_audited == false"
|
v-if="
|
||||||
|
checkPermission(['fifo_hear']) && scope.row.is_audited == false
|
||||||
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAudit(scope)"
|
@click="handleAudit(scope)"
|
||||||
>
|
>
|
||||||
|
@ -141,16 +149,121 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button
|
<el-button type="danger" @click="dialogVisibles = false">
|
||||||
type="danger"
|
|
||||||
@click="dialogVisibles = false"
|
|
||||||
>
|
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="primary" @click="confirminpur('Form1')">
|
||||||
type="primary"
|
确认
|
||||||
@click="confirminpur('Form1')"
|
</el-button>
|
||||||
>
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisibleout"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
title="新增出库记录"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Formout"
|
||||||
|
:model="outfifo"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
|
<div v-for="(item, index) in outfifo.details" :key="index">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10" style="margin-right: 10px">
|
||||||
|
<el-form-item
|
||||||
|
class="material_batch"
|
||||||
|
label="批次:"
|
||||||
|
:prop="'details.' + index + '.material_batch'"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="item.material_batch"
|
||||||
|
filterable
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialbatchoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ item.batch }}</span>
|
||||||
|
<span
|
||||||
|
style="float: right; color: #8492a6; font-size: 13px"
|
||||||
|
>{{ item.material_.name }}</span
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" style="margin-right: 50px">
|
||||||
|
<el-form-item
|
||||||
|
class="count"
|
||||||
|
label="出库数量"
|
||||||
|
:prop="'details.' + index + '.count'"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="item.count"
|
||||||
|
:min="0"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 删除按钮 -->
|
||||||
|
<el-col :span="1">
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
content="删除"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="deleteItem1(index)"
|
||||||
|
style="
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin-top: 4px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<i class="el-icon-remove-outline" style="font-size: 20px"></i>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
content="添加条件"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="addConditions1"
|
||||||
|
style="
|
||||||
|
cursor: pointer;
|
||||||
|
width: 95%;
|
||||||
|
color: #fe000c;
|
||||||
|
border: 1px dashed #fe000c;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0px;
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-left: 20px;
|
||||||
|
font-size: 26px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
+
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisibleout = false">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="confirmoutfifo('Formout')">
|
||||||
确认
|
确认
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -247,7 +360,7 @@
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -309,233 +422,298 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getfifoList,
|
getfifoList,
|
||||||
createInventory,
|
createInventory,
|
||||||
createInother,
|
createInother,
|
||||||
getWarehouseList,
|
getWarehouseList,
|
||||||
deleteFifoitem,
|
deleteFifoitem,
|
||||||
deleteFifo,
|
getmaterialbatchList,
|
||||||
audit,
|
deleteFifo,
|
||||||
} from "@/api/inm";
|
audit,
|
||||||
import {getPuorderList} from "@/api/pum";
|
outOther,
|
||||||
import checkPermission from "@/utils/permission";
|
} from "@/api/inm";
|
||||||
import {getpVendorList} from "@/api/vendor";
|
import { getPuorderList } from "@/api/pum";
|
||||||
import {getMaterialList} from "@/api/mtm";
|
import checkPermission from "@/utils/permission";
|
||||||
import {getUserList} from "@/api/user";
|
import { getpVendorList } from "@/api/vendor";
|
||||||
import {genTree} from "@/utils";
|
import { getMaterialList } from "@/api/mtm";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import { getUserList } from "@/api/user";
|
||||||
const defaulteinventory = {
|
import { genTree } from "@/utils";
|
||||||
vendor: null,
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
details: [
|
const defaulteinventory = {
|
||||||
{
|
vendor: null,
|
||||||
warehouse: "", //仓库
|
details: [
|
||||||
material: "", // 物料
|
{
|
||||||
count: "", //数量
|
warehouse: "", //仓库
|
||||||
batch: "", //批次
|
material: "", // 物料
|
||||||
},
|
count: "", //数量
|
||||||
],
|
batch: "", //批次
|
||||||
};
|
|
||||||
export default {
|
|
||||||
components: {Pagination},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
inventory: defaulteinventory,
|
|
||||||
fifoList: {
|
|
||||||
count: 0,
|
|
||||||
},
|
|
||||||
types_: {
|
|
||||||
1: "生产领料",
|
|
||||||
2: "销售提货",
|
|
||||||
3: "采购入库",
|
|
||||||
4: "生产入库",
|
|
||||||
5: "其他入库",
|
|
||||||
},
|
|
||||||
inpur: {},
|
|
||||||
listQuery: {
|
|
||||||
page: 1,
|
|
||||||
page_size: 20,
|
|
||||||
},
|
|
||||||
puorderoptions: [],
|
|
||||||
warehouseData: [],
|
|
||||||
materialoptions: [],
|
|
||||||
vendoroptions: [],
|
|
||||||
listLoading: true,
|
|
||||||
dialogVisible: false,
|
|
||||||
dialogType: "new",
|
|
||||||
dialogVisibles: false,
|
|
||||||
rule1: {
|
|
||||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: {},
|
],
|
||||||
watch: {},
|
};
|
||||||
created() {
|
const defaulteoutfifo = {
|
||||||
this.getlists();
|
details: [
|
||||||
this.getList();
|
{
|
||||||
this.getListgys();
|
material_batch: null,
|
||||||
this.getmaterialList();
|
count: null,
|
||||||
this.getpuorderList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
],
|
||||||
checkPermission,
|
};
|
||||||
|
export default {
|
||||||
|
components: { Pagination },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
inventory: defaulteinventory,
|
||||||
|
outfifo: defaulteoutfifo,
|
||||||
|
dialogVisibleout: false,
|
||||||
|
fifoList: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
types_: {
|
||||||
|
1: "生产领料",
|
||||||
|
2: "销售提货",
|
||||||
|
3: "采购入库",
|
||||||
|
4: "生产入库",
|
||||||
|
5: "其他入库",
|
||||||
|
6:"其他出库",
|
||||||
|
},
|
||||||
|
inpur: {},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
puorderoptions: [],
|
||||||
|
materialbatchoptions: [],
|
||||||
|
warehouseData: [],
|
||||||
|
materialoptions: [],
|
||||||
|
vendoroptions: [],
|
||||||
|
listLoading: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogType: "new",
|
||||||
|
dialogVisibles: false,
|
||||||
|
rule1: {
|
||||||
|
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getlists();
|
||||||
|
this.getList();
|
||||||
|
this.getListgys();
|
||||||
|
this.getmaterialList();
|
||||||
|
this.getpuorderList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
|
||||||
getfifoList(this.listQuery).then((response) => {
|
getfifoList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.fifoList = response.data;
|
this.fifoList = response.data;
|
||||||
}
|
|
||||||
this.listLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//出入库详情
|
|
||||||
handleDetail(scope) {
|
|
||||||
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() {
|
|
||||||
getWarehouseList({page: 0}).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.warehouseData = genTree(response.data);
|
|
||||||
}
|
|
||||||
this.listLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handlecgCreate() {
|
|
||||||
this.dialogVisibles = true;
|
|
||||||
},
|
|
||||||
addConditions() {
|
|
||||||
if (this.inventory.details.length <= 10) {
|
|
||||||
this.inventory.details.push({
|
|
||||||
warehouse: "", //仓库
|
|
||||||
material: "", // 物料
|
|
||||||
count: "", //数量
|
|
||||||
batch: "", // 批次
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$message("最多可添加十项条件");
|
|
||||||
}
|
}
|
||||||
},
|
this.listLoading = false;
|
||||||
deleteItem(index) {
|
});
|
||||||
this.inventory.details.splice(index, 1);
|
},
|
||||||
},
|
//出入库详情
|
||||||
//物料
|
handleDetail(scope) {
|
||||||
getmaterialList() {
|
this.$router.push({
|
||||||
this.listLoading = true;
|
name: "fifodetail",
|
||||||
getMaterialList({pageoff: true}).then((response) => {
|
params: { id: scope.row.id, pu_order: scope.row.pu_order },
|
||||||
if (response.data) {
|
});
|
||||||
this.materialoptions = genTree(response.data);
|
},
|
||||||
}
|
|
||||||
this.listLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleCreate() {
|
|
||||||
this.inventory.details = [
|
|
||||||
{
|
|
||||||
warehouse: "", // 仓库
|
|
||||||
material: "", // 物料
|
|
||||||
count: "", //数量
|
|
||||||
batch: "", //批次
|
|
||||||
},
|
|
||||||
];
|
|
||||||
this.inventory = Object.assign({}, defaulteinventory);
|
|
||||||
this.dialogType = "new";
|
|
||||||
this.dialogVisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs["Form"].clearValidate();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//审核
|
|
||||||
handleAudit(scope) {
|
|
||||||
this.$confirm("是否通过?", "提示", {
|
|
||||||
confirmButtonText: "确认",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "success",
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
await audit(scope.row.id);
|
|
||||||
this.getList();
|
|
||||||
this.$message.success("已审核");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleFilter() {
|
|
||||||
this.listQuery.page = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
resetFilter() {
|
|
||||||
this.listQuery = {
|
|
||||||
page: 1,
|
|
||||||
page_size: 20,
|
|
||||||
};
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
|
|
||||||
async confirm(form) {
|
//供应商列表
|
||||||
console.log(this.inventory);
|
getListgys() {
|
||||||
|
getpVendorList({ page: 0 }).then((response) => {
|
||||||
createInother(this.inventory).then((res) => {
|
if (response.data) {
|
||||||
if (res.code >= 200) {
|
this.vendoroptions = response.data;
|
||||||
this.getList();
|
}
|
||||||
this.dialogVisible = false;
|
});
|
||||||
this.$message.success("成功");
|
},
|
||||||
}
|
//采购订单
|
||||||
|
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() {
|
||||||
|
getWarehouseList({ page: 0 }).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.warehouseData = genTree(response.data);
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handlecgCreate() {
|
||||||
|
this.dialogVisibles = true;
|
||||||
|
},
|
||||||
|
addConditions1() {
|
||||||
|
if (this.outfifo.details.length <= 10) {
|
||||||
|
this.outfifo.details.push({
|
||||||
|
material_batch: null,
|
||||||
|
count: null,
|
||||||
});
|
});
|
||||||
},
|
} else {
|
||||||
handleDelete(scope) {
|
this.$message("最多可添加十项条件");
|
||||||
this.$confirm("确认删除?", "警告", {
|
|
||||||
confirmButtonText: "确认",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "error",
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
await deleteFifo(scope.row.id);
|
|
||||||
this.getList();
|
|
||||||
this.$message.success("成功");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//装箱
|
|
||||||
handlePack(scope) {
|
|
||||||
this.$router.push({name: "salesdetail", params: {id: scope.row.sale},})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
addConditions() {
|
||||||
|
|
||||||
|
if (this.inventory.details.length <= 10) {
|
||||||
|
this.inventory.details.push({
|
||||||
|
warehouse: "", //仓库
|
||||||
|
material: "", // 物料
|
||||||
|
count: "", //数量
|
||||||
|
batch: "", // 批次
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message("最多可添加十项条件");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteItem(index) {
|
||||||
|
this.inventory.details.splice(index, 1);
|
||||||
|
},
|
||||||
|
deleteItem1(index) {
|
||||||
|
this.outfifo.details.splice(index, 1);
|
||||||
|
},
|
||||||
|
//物料
|
||||||
|
getmaterialList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
getMaterialList({ pageoff: true }).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.materialoptions = genTree(response.data);
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//其他入库
|
||||||
|
handleCreate() {
|
||||||
|
this.inventory.details = [
|
||||||
|
{
|
||||||
|
warehouse: "", // 仓库
|
||||||
|
material: "", // 物料
|
||||||
|
count: "", //数量
|
||||||
|
batch: "", //批次
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.inventory = Object.assign({}, defaulteinventory);
|
||||||
|
this.dialogType = "new";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//其他出库
|
||||||
|
handleoutCreate() {
|
||||||
|
this.outfifo.details = [
|
||||||
|
{
|
||||||
|
material_batch: null,
|
||||||
|
count: null,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.outfifo = Object.assign({}, defaulteoutfifo);
|
||||||
|
this.dialogVisibleout = true;
|
||||||
|
|
||||||
|
getmaterialbatchList({ page: 0 }).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.materialbatchoptions = response.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Formout"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirmoutfifo() {
|
||||||
|
console.log(this.outfifo);
|
||||||
|
outOther(this.outfifo).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisibleout = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//审核
|
||||||
|
handleAudit(scope) {
|
||||||
|
this.$confirm("是否通过?", "提示", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "success",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await audit(scope.row.id);
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("已审核");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
async confirm(form) {
|
||||||
|
console.log(this.inventory);
|
||||||
|
|
||||||
|
createInother(this.inventory).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await deleteFifo(scope.row.id);
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//装箱
|
||||||
|
handlePack(scope) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "salesdetail",
|
||||||
|
params: { id: scope.row.sale },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue