委托验收,扫码校验,bug修复,等等,大修改
parent
169f4fa538
commit
7cc4d8c8cc
@ -1,5 +1,5 @@
|
||||
{
|
||||
"BASE_URL": "http://127.0.0.1:9996",
|
||||
"SERVER_IP": "http://127.0.0.1:9996",
|
||||
"BASE_URL": "http://192.168.0.109:9996",
|
||||
"SERVER_IP": "http://192.168.0.109:9996",
|
||||
"hosp_name": "诏安县总医院(测试)"
|
||||
}
|
||||
|
@ -0,0 +1,44 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
export function getEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/delete",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function updateEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/update",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function insertEntrustRece(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/add",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function filterNoUseBusType(query) {
|
||||
return axios({
|
||||
url: "/spms/entrust/rece/filterAllNoUse",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
import axios from "@/utils/axios";
|
||||
|
||||
export function saveCode(query) {
|
||||
return axios({
|
||||
url: "/warehouse/inout/saveTempCode",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
@ -0,0 +1,266 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input
|
||||
v-model="filterQuery.name"
|
||||
style="width: 250px"
|
||||
placeholder="单据类型名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group style="margin-left: 10px;display:flex;">
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
||||
<el-button type="primary" icon="search" @click="getList">查询</el-button>
|
||||
<el-button type="primary" icon="search" @click="handleAddClick"
|
||||
>新增
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<el-table-column label="序号" type="index" width="60" fixed></el-table-column>
|
||||
<el-table-column label="扫码单据类型" prop="curName" fixed></el-table-column>
|
||||
<el-table-column label="委托验收仓库" prop="entrustInvName" fixed>
|
||||
</el-table-column>
|
||||
<el-table-column label="委托验收人" prop="employeeName" fixed>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="handleModifyClick(scope.row)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog
|
||||
title="新增委托验收"
|
||||
:visible.sync="addDialogVisible"
|
||||
width="70%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="addDialogVisible"
|
||||
>
|
||||
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
|
||||
>提交
|
||||
</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
|
||||
>取消
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="编辑委托验收"
|
||||
:visible.sync="modifyDialogVisible"
|
||||
width="70%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="modifyDialogVisible"
|
||||
>
|
||||
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
|
||||
>提交
|
||||
</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
|
||||
>取消
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getEntrustRece,
|
||||
deleteEntrustRece,
|
||||
updateEntrustRece,
|
||||
insertEntrustRece,
|
||||
} from "../../api/basic/EntrustRece";
|
||||
|
||||
import modifyDialog from "./BasicEntrutsReceModify";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
name: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
loading: false,
|
||||
addDialogVisible: false,
|
||||
modifyDialogVisible: false,
|
||||
list: [],
|
||||
inputQuery: {
|
||||
action: "",
|
||||
name: "",
|
||||
entrustInv: "",
|
||||
entrustUser: "",
|
||||
entrustAction: null,
|
||||
finishRece: false,
|
||||
},
|
||||
enableMap: {
|
||||
true: "是",
|
||||
false: "否",
|
||||
},
|
||||
mainActionMap: {
|
||||
WareHouseIn: "入库",
|
||||
WareHouseOut: "出库"
|
||||
},
|
||||
fileList: [],
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
uploadFileUrl: null,
|
||||
headers: {},
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
name: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
cancelDialog() {
|
||||
this.modifyDialogVisible = false;
|
||||
this.addDialogVisible = false;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getEntrustRece(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
onAddSubmit() {
|
||||
insertEntrustRece(this.inputQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
});
|
||||
},
|
||||
|
||||
onModifySubmit() {
|
||||
insertEntrustRece(this.inputQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.cancelDialog();
|
||||
});
|
||||
},
|
||||
|
||||
handleAddClick() {
|
||||
this.inputQuery = {enable: true, expireTip: true};
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
|
||||
handleModifyClick(row) {
|
||||
this.inputQuery = row;
|
||||
this.modifyDialogVisible = true;
|
||||
},
|
||||
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该委托验收信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
let tquery = {
|
||||
id: data.id + "",
|
||||
};
|
||||
deleteEntrustRece(tquery)
|
||||
.then((response) => {
|
||||
this.getList();
|
||||
if (response.code == 20000) {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
},
|
||||
components: {
|
||||
modifyDialog,
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,259 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>扫码单据类型: </span>
|
||||
</div>
|
||||
<el-select v-model="inputQuery.action" placeholder="请选择" clearable @change="actionChange">
|
||||
<el-option
|
||||
v-for="item in busTypes"
|
||||
:key="item.action"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left">{{ item.localName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>当前仓库: </span>
|
||||
</div>
|
||||
<el-select v-model="inputQuery.entrustInv" placeholder="当前仓库" @change="invChange" clearable>
|
||||
<el-option
|
||||
v-for="item in storageList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>委托验收人: </span>
|
||||
</div>
|
||||
<el-select v-model="inputQuery.entrustUser" placeholder="委托验收人">
|
||||
<el-option
|
||||
v-for="item in entrustUserArray"
|
||||
:key="item.userid"
|
||||
:label="item.employeeName"
|
||||
:value="item.userid">
|
||||
<span style="float: left">{{ item.employeeName }}</span>
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>委托验收人仓库: </span>
|
||||
</div>
|
||||
<el-select v-model="inputQuery.entrustInv" placeholder="委托验收人仓库" @change="invChange">
|
||||
<el-option
|
||||
v-for="item in storageList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>委托生成单据类型: </span>
|
||||
</div>
|
||||
<el-select v-model="inputQuery.entrustAction" placeholder="单据类型">
|
||||
<el-option
|
||||
v-for="item in entrustBusArray"
|
||||
:key="item.action"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="el-col">
|
||||
<div class="text item">
|
||||
<el-checkbox v-model="inputQuery.finishRece">是否直接验收完成
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
getBasicThirdSys,
|
||||
} from "../../api/basic/basicThirdSys";
|
||||
|
||||
import {
|
||||
getLocalJoinNoUse
|
||||
} from "../../api/basic/busLocalType";
|
||||
import {filterAll, filterAllByUser, warehouseBussinessTypeList, warehouseUserList} from "@/api/basic/invWarehouse";
|
||||
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
||||
import {filterNoUseBusType} from "@/api/basic/EntrustRece";
|
||||
|
||||
|
||||
export default {
|
||||
name: "inputQuery",
|
||||
props: {
|
||||
inputQuery: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
enabled: true,
|
||||
isBuType: true,
|
||||
isFilterBind: true,
|
||||
},
|
||||
storageList: [],
|
||||
orderTypeList: [],
|
||||
fromSpecialOptions: [],
|
||||
thirdSys: [],
|
||||
busTypes: [],
|
||||
entrustBusArray: [],
|
||||
entrustUserArray: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
getBasicThirdSys(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.thirdSys = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
});
|
||||
let query = {
|
||||
curAction: this.inputQuery.localAction,
|
||||
};
|
||||
getLocalJoinNoUse(query)
|
||||
.then((response) => {
|
||||
this.localTypes = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.localTypes = [];
|
||||
});
|
||||
},
|
||||
getStorage() {
|
||||
this.storageList = [];
|
||||
filterAll()
|
||||
.then((response) => {
|
||||
this.storageList = response.data || [];
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getOrderType() {
|
||||
filterNoUseBusType().then((response) => {
|
||||
this.busTypes = response.data || [];
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
invChange(code) {
|
||||
let query = {
|
||||
code: code
|
||||
}
|
||||
//加载用户数据
|
||||
warehouseUserList(query).then((res) => {
|
||||
this.entrustUserArray = res.data;
|
||||
}).catch((error) => {
|
||||
this.$message.error("用户数据加载失败")
|
||||
});
|
||||
|
||||
//加载单据类型数据
|
||||
warehouseBussinessTypeList(query).then((res) => {
|
||||
this.entrustBusArray = res.data;
|
||||
}).catch((error) => {
|
||||
this.$message.error("单据类型数据加载失败")
|
||||
});
|
||||
},
|
||||
|
||||
actionChange(action){
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
corpType() {
|
||||
return this.inputQuery.corpType;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
this.getOrderType();
|
||||
this.getList();
|
||||
this.getStorage();
|
||||
|
||||
if (this.$isNotBlank(this.inputQuery.entrustInv)) {
|
||||
this.invChange(this.inputQuery.entrustInv);
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,389 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :inline="true" :model="filterQuery" size="mini">
|
||||
<el-row style="width: 100%">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.productsName" placeholder="产品名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select
|
||||
v-model="filterQuery.supId"
|
||||
filterable
|
||||
remote
|
||||
clearable="true"
|
||||
reserve-keyword
|
||||
placeholder="请输入供应商名称"
|
||||
:remote-method="findMethod"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fromOptions"
|
||||
:key="item.companyName"
|
||||
:label="item.companyName"
|
||||
:value="item.customerId"
|
||||
>
|
||||
<span style="float: left">{{ item.companyName }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-row>
|
||||
<el-row style="width: 100%">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh"
|
||||
@click="onReset"
|
||||
></el-button>
|
||||
<el-button type="primary" icon="search" @click="onSubmit"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
<el-button type="primary" icon="search" @click="clearAll"
|
||||
>清空库存
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column>
|
||||
<el-table-column label="产品名称" prop="cpmctymc" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" prop="ggxh" width="180"></el-table-column>
|
||||
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
|
||||
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
|
||||
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
|
||||
<el-table-column label="入库数量" prop="inCount" width="120"></el-table-column>
|
||||
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>
|
||||
|
||||
<el-table-column label="结余数量" prop="reCount" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.inCount - scope.row.outCount) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
|
||||
width="120"></el-table-column>
|
||||
|
||||
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
|
||||
width="120"></el-table-column>
|
||||
<!-- <el-table-column label="仓库" prop="invStorageName" v-if="showSup"-->
|
||||
<!-- show-overflow-tooltip width="120"></el-table-column>-->
|
||||
<!-- <el-table-column label="操作" width="120" fixed="right">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="text"-->
|
||||
<!-- size="small"-->
|
||||
<!-- @click.native.stop="intentDetail(scope.row)"-->
|
||||
<!-- >详情-->
|
||||
<!-- </el-button-->
|
||||
<!-- >-->
|
||||
|
||||
<!-- <el-button-->
|
||||
<!-- type="text"-->
|
||||
<!-- size="small"-->
|
||||
<!-- @click.native.stop="deleteDialog(scope.row.id)"-->
|
||||
<!-- >删除-->
|
||||
<!-- </el-button-->
|
||||
<!-- >-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="库存详情"
|
||||
:visible.sync="codeDetailVisible"
|
||||
width="85%"
|
||||
v-if="codeDetailVisible"
|
||||
>
|
||||
<codeDetail
|
||||
:idQuery="idQuery"
|
||||
v-on:closeDetailDialog="closeDetailDialog"
|
||||
></codeDetail>
|
||||
</el-dialog>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
filterProducts,
|
||||
deleteProducts,clearAllProducts
|
||||
} from "../../api/inventory/InvPreInProducts";
|
||||
import draggable from "vuedraggable";
|
||||
import codeDetail from "./InvPreInProductsDetail";
|
||||
import store from "../../store";
|
||||
import {getBussinessType} from "../../api/basic/bussinessType";
|
||||
import {filterCustomers} from "@/api/auth/customer";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
cpmctymc: null,
|
||||
nameCode: null,
|
||||
relIdFk: null,
|
||||
batchNo: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
customerId: null,
|
||||
unitFk: null,
|
||||
},
|
||||
detailQuery: {
|
||||
code: null,
|
||||
productIdFk: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
list: [],
|
||||
fromOptions: [],
|
||||
codeDetailVisible: false,
|
||||
total: 0,
|
||||
loading: true,
|
||||
index: null,
|
||||
dialogTableVisible: false,
|
||||
formLoading: false,
|
||||
dialogVisible: false,
|
||||
deleteLoading: false,
|
||||
busTypes: [],
|
||||
idQuery: null,
|
||||
showSup: false,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
draggable,
|
||||
codeDetail,
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
cpmctymc: null,
|
||||
nameCode: null,
|
||||
relIdFk: null,
|
||||
batchNo: null,
|
||||
customerId: null,
|
||||
page: 1, unitFk: null,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
this.loading = true;
|
||||
this.getList();
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.filterQuery.limit = val;
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
handleUnitClick(row) {
|
||||
this.curIndex = row.id;
|
||||
this.dialogTableVisible = true;
|
||||
},
|
||||
closeDetailDialog(val) {
|
||||
this.codeDetailVisible = false;
|
||||
},
|
||||
|
||||
closeDialog() {
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.filterQuery.customerId = store.getters.customerId;
|
||||
filterProducts(this.filterQuery)
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
this.loading = false;
|
||||
this.showSup = response.data.showSup;
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
let query = {
|
||||
id: data,
|
||||
}
|
||||
deleteProducts(query)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
clearAll(){
|
||||
this.$confirm("此操作将永久清空所有预验收库存信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let query={id:1};
|
||||
|
||||
clearAllProducts(query)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
findMethod(query) {
|
||||
console.log(query);
|
||||
this.fromOptions = [];
|
||||
let cQuery = {
|
||||
key: query,
|
||||
customerName: query,
|
||||
|
||||
};
|
||||
// getBasicUnitMaintains(cQuery)
|
||||
// .then((response) => {
|
||||
// this.loading = false;
|
||||
// this.fromOptions = response.data.page.list || [];
|
||||
// })
|
||||
// .catch(() => {
|
||||
// this.loading = false;
|
||||
// });
|
||||
filterCustomers(cQuery)
|
||||
.then((response) => {
|
||||
this.fromOptions = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.fromOptions = [];
|
||||
});
|
||||
},
|
||||
|
||||
intentDetail(row) {
|
||||
|
||||
this.idQuery = row;
|
||||
// this.idQuery.supId = null;
|
||||
this.idQuery.customerId = null;
|
||||
this.codeDetailVisible = true;
|
||||
},
|
||||
getBusType() {
|
||||
let query = {
|
||||
enabled: true,
|
||||
};
|
||||
getBussinessType(query)
|
||||
.then((response) => {
|
||||
this.busTypes = response.data.list || [];
|
||||
this.filterQuery.billAction = this.busTypes[0].action;
|
||||
// this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getActionName(action) {
|
||||
for (let i = 0; i < this.busTypes.length; i++) {
|
||||
if (this.busTypes[i].action === action) {
|
||||
return this.busTypes[i].name;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
false: "success",
|
||||
true: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.findMethod();
|
||||
this.getBusType();
|
||||
let query = this.$route.query;
|
||||
this.filterQuery = Object.assign(this.filterQuery, query);
|
||||
this.filterQuery.limit = parseInt(this.filterQuery.limit);
|
||||
// 加载表格数据
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss">
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue