1.医院在web端新增业务单据,新增扫码单据修改;

2.仓库信息加入
master
anthonyywj2 3 years ago
parent 49523db144
commit 10bea3a4e2

@ -0,0 +1,43 @@
import axios from "../../utils/axios";
// 权限管理
// 获取列表
export function filterList(query) {
return axios({
url: "/spms/inv/warehouse/filter",
method: "get",
params: query
});
}
export function filterAll(query) {
return axios({
url: "/spms/inv/warehouse/filterAll",
method: "get",
params: query
});
}
// 保存
export function saveWarehouse(data, formName, method = "post") {
let url =
formName !== "edit"
? "/spms/inv/warehouse/save"
: "/spms/inv/warehouse/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function deleteWarehouse(data) {
return axios({
url: "/spms/inv/warehouse/delete",
method: "post",
data: data
});
}

@ -22,6 +22,7 @@ import thirdSysApiDownload from "../views/userManage/param/ThirdSysApiDownload.v
import showText from "../views/other/showText";
//基础数据维护
import invWarehouse from "../views/basic/invWarehouse"
import BussinessType from "../views/basic/BussinessType.vue";
import BussinessTypeLocl from "../views/basic/BussinessTypeLocl.vue";
import bussinessTypeThird from "../views/basic/BussinessTypeThird.vue";
@ -510,6 +511,15 @@ export const asyncRouterMap = [
authRule: ["basic"]
},
children: [
{
path: "invWarehouse",
component: invWarehouse,
name: "仓库信息",
icon: "",
meta: {
authRule: ["basicProduct/invWarehouse"]
}
},
{
path: "/udiinfo",
redirect: "/udiinfo/udiinfomg",

@ -0,0 +1,569 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="query.name"
clearable
placeholder="仓库名称"
style="width: 400px"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.advanceType" placeholder="请选择仓库类型" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="寄售" value=true></el-option>
<el-option label="仓库" value=false></el-option>
</el-select>
</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="getList"></el-button>
<el-button type="primary" @click.native="handleForm(null, null,'addTop')"
>添加仓库
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
:data="mergeList"
style="width: 100%;margin-bottom: 20px;"
row-key="id"
border
default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
prop="code"
label="仓库编码"
>
</el-table-column>
<el-table-column
prop="name"
label="仓库名称"
>
</el-table-column>
<el-table-column
prop="advanceType"
label="仓库类型">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.advanceType] }}</span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="isDefault"-->
<!-- label="是否默认库存">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ enableMap[scope.row.isDefault] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="scope.row.pid!=0"
@click.native.stop="handleSubForm(node, scope.row, 'add')"
>添加货位
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="handleForm(node, scope.row, 'edit')"
>编辑
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.code==1000 ||scope.row.code==1001"
@click.native.stop="handleDel(node,scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<!-- <el-tree-->
<!-- :data="mergeList"-->
<!-- :props="defaultProps"-->
<!-- node-key="id"-->
<!-- style="width: 50%"-->
<!-- default-expand-all-->
<!-- :expand-on-click-node="false"-->
<!-- :render-content="renderContent"-->
<!-- >-->
<!-- </el-tree>-->
</el-card>
<!--表单界面-->
<el-dialog
:title="formMap[formName]"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="subFormVisible"
:before-close="hideForm"
width="60%"
top="5vh"
>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-form-item label="本企业仓库" prop="pid">
<el-select v-model="formData.pid" placeholder="顶级" disabled>
<el-option
v-for="item in mergeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span style="float: left"
><span v-html="item.html"></span>{{ item.name }}</span
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="仓库编码" prop="title" class="query-form-item">
<el-input
v-model="formData.code" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
<el-form-item label="仓库名称" prop="name" class="query-form-item">
<el-input
v-model="formData.name" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="仓库类型:">
<el-select v-model="formData.advanceType" placeholder="仓库类型" clearable>
<el-option label="寄售" :value=true></el-option>
<el-option label="仓库" :value=false></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态:" prop="status" class="query-form-item">
<el-radio-group v-model="formData.status">
<el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item v-if="formData.pid == 0">-->
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="formData.advanceType"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="formData.isDefault"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
<el-button
type="primary"
@click.native="formSubmit()"
:loading="formLoading"
>提交
</el-button
>
</div>
</el-dialog>
<el-dialog
:title="formMap[formName]"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="formVisible"
:before-close="hideForm"
width="60%"
top="5vh"
>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-form-item label="仓库编码" prop="title" class="query-form-item">
<el-input
v-model="formData.code" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
<el-form-item label="仓库名称" prop="name" class="query-form-item">
<el-input
v-model="formData.name" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="仓库类型:">
<el-select v-model="formData.advanceType" placeholder="仓库类型" clearable>
<el-option label="寄售" :value='true'></el-option>
<el-option label="仓库" :value='false'></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态:" prop="status" class="query-form-item">
<el-radio-group v-model="formData.status">
<el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item v-if="formData.pid == 0">-->
<!-- <el-row :gutter="20" class="el-row" type="flex">-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="formData.advanceType"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">-->
<!-- <el-checkbox v-model="formData.isDefault"></el-checkbox>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
<el-button
type="primary"
@click.native="formSubmit()"
:loading="formLoading"
>提交
</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import {
filterList,
saveWarehouse,
deleteWarehouse
} from "../../api/basic/invWarehouse";
const formJson = {
id: null,
pid: null,
name: null,
code: null,
status: 1,
advanceType: false,
isDefault: false
};
export default {
data() {
return {
query: {
id: null,
pid: null,
name: null,
code: null,
status: null,
advanceType: null,
isDefault: null
},
mergeList: [],
node: null,
defaultProps: {
children: "children",
label: "name"
},
treeList: [],
loading: true,
index: null,
formName: null,
formMap: {
addTop: "添加仓库",
add: "添加货位",
edit: "编辑"
},
enableMap: {
true: "寄售",
false: "仓库",
},
formLoading: false,
subFormVisible: false,
formVisible: false,
formData: formJson,
formRules: {
name: [
{required: true, message: "请输入仓库货位名", trigger: "blur"}
],
code: [
{required: true, message: "请输入仓库货位代码", trigger: "blur"}
]
},
pidData: {}
,
deleteLoading: false
}
;
},
methods: {
/*eslint-disable */
renderContent(h, {node, data, store}) {
return (
<span
style="flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding-right: 8px;">
<span>
<span title={data.name} style="margin-left:8px">{node.label}</span>
<span style="margin-left:18px">(编码{data.code})</span>
</span>
<span>
<el-button
style="font-size: 12px;"
type="text"
on-click={() => this.handleSubForm(node, data, "add")}
>
添加货位
</el-button>
<el-button
style="font-size: 12px;"
type="text"
on-click={() => this.handleForm(node, data, "edit")}
>
编辑
</el-button>
<el-button
style="font-size: 12px;"
type="text"
on-click={() => this.handleDel(node, data)}
>
删除
</el-button>
</span>
</span>
);
},
onReset() {
this.$router.push({
path: "",
});
this.query = {
name: "",
status: "",
};
this.getList();
},
onSubmit() {
this.getList();
},
getList() {
this.loading = true;
filterList(this.query)
.then((response) => {
this.loading = false;
this.mergeList = response.data.list || [];
this.treeList = response.data.tree_list || [];
})
.catch(() => {
this.loading = false;
this.mergeList = [];
this.treeList = [];
});
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
//
this.$refs["dataForm"].resetFields();
this.getList();
}
},
//
hideForm() {
//
this.formVisible = false;
this.subFormVisible = false;
return true;
},
//
handleForm(node, data, formName) {
this.formVisible = true;
let no = this.getProjectNum() + Math.floor(Math.random() * 10000)
this.pidData = data || null;
formJson.pid = (data && parseInt(data.id)) || "";
this.formData = JSON.parse(JSON.stringify(formJson));
if (formName === "edit") {
this.formData = Object.assign({}, data);
this.node = node;
} else {
this.formData.code = no;
}
this.formData.pid = !this.formData.pid ? "" : this.formData.pid;
this.formName = formName;
if (data && data.id) {
this.index = this.mergeList.findIndex((d) => d.id === data.id);
}
},
handleSubForm(node, data, formName) {
this.subFormVisible = true;
this.pidData = data || null;
formJson.pid = (data && parseInt(data.id)) || "";
this.formData = JSON.parse(JSON.stringify(formJson));
if (formName === "edit") {
this.formData = Object.assign({}, data);
this.node = node;
} else {
let no = this.getProjectNum() + Math.floor(Math.random() * 10000);
this.formData.code = no;
}
this.formData.pid = !this.formData.pid ? "" : this.formData.pid;
this.formName = formName;
if (data && data.id) {
this.index = this.mergeList.findIndex((d) => d.id === data.id);
}
},
formSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
this.formLoading = true;
let data = Object.assign({}, this.formData);
saveWarehouse(data, this.formName)
.then((response) => {
this.formLoading = false;
if (response.code !== 20000) {
this.$message.error(response.message);
return false;
}
this.$message.success("操作成功");
this.formVisible = false;
if (this.formName !== "edit") {
if (response.data && response.data.id) {
data.id = response.data.id;
if (this.pidData) {
if (!this.pidData.children) {
this.$set(this.pidData, "children", []);
}
this.pidData.children.push(data);
} else {
this.mergeList.push(data);
}
}
} else {
const parent = this.node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex((d) => d.id === data.id);
children.splice(index, 1, data);
}
//
this.resetForm();
this.getList();
})
.catch(() => {
this.formLoading = false;
});
}
});
},
//
handleDel(node, data) {
if (data.children && data.children.length > 0) {
this.$alert("请先删除子节点", "提示", {
confirmButtonText: "确定",
});
return false;
}
if (data.id) {
this.$confirm("确认删除该记录吗?", "提示", {
type: "warning",
})
.then(() => {
this.deleteLoading = true;
let para = {id: data.id};
deleteWarehouse(para)
.then((response) => {
this.deleteLoading = false;
if (response.code !== 20000) {
this.$message.error(response.message);
return false;
}
this.$message.success("删除成功");
this.getList();
const parent = node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex((d) => d.id === data.id);
children.splice(index, 1);
})
.catch(() => {
this.deleteLoading = false;
});
})
.catch(() => {
this.$message.info("取消删除");
});
}
},
getProjectNum() {
const projectTime = new Date() //
const Year = projectTime.getFullYear() // IE.
const Month = projectTime.getMonth() + 1 //
const Day = projectTime.getDate() //
var CurrentDate = Year
if (Month >= 10) { // 1010
CurrentDate += Month
} else {
CurrentDate += '0' + Month
}
if (Day >= 10) {
CurrentDate += Day
} else {
CurrentDate += '0' + Day
}
return CurrentDate
}
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "gray",
1: "success",
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
0: "禁用",
1: "正常",
};
return statusMap[status];
},
},
mounted() {
},
created() {
//
this.getList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>

@ -65,13 +65,14 @@
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>供应商</span>
<span>往来信息</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="corpName">
<el-form-item prop="corpName"
v-if="curAction.corpType ==0 && curAction.genUnit ==false">
<el-select
v-model="formData.corp"
v-model="formData.fromCorp"
filterable
remote
clearable="true"
@ -81,7 +82,6 @@
:loading="loading"
@change="unitChange"
>
<!-- @change="unitChange"-->
<el-option
v-for="item in fromOptions"
:key="item.name"
@ -93,6 +93,8 @@
</el-select>
<!-- <el-select-->
<!-- style="width: 100%"-->
<!-- v-model="sValue"-->
@ -112,6 +114,38 @@
<!-- </el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1 && curAction.genUnit ==false">
<el-select
v-model="formData.fromCorp"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
:remote-method="findStorageMethod"
:loading="loading"
@change="unitChange"
>
<el-option
v-for="item in fromStorageOptions"
:key="item.value"
:label="item.code"
:value="item.name">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.genUnit ==true">
<el-input v-model="formData.fromCorp" auto-complete="off"
clearable
placeholder="请输入病人住院号"
></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
@ -123,7 +157,8 @@
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>-->
<el-select v-model="formData.billType" placeholder="请选择业务类型">
<el-select v-model="formData.billType" placeholder="请选择业务类型"
@change="actionChange">
<el-option
v-for="item in busTypes"
:key="item.name"
@ -135,22 +170,47 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="20" style="margin-top: -10px;">
<el-col :span="3">
<div class="ao-text">
<span>采购类别</span>
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="type">
<el-select v-model="formData.type" style="width: 100%" placeholder="采购类型">
<el-option label="预入库" value="1"></el-option>
<el-option label="普通采购" value="2"></el-option>
<el-form-item prop="locStorageCode">
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>-->
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20" style="margin-top: -10px;">-->
<!-- <el-col :span="3">-->
<!-- <div class="ao-text">-->
<!-- <span>采购类别</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="7">-->
<!-- <el-form-item prop="type">-->
<!-- <el-select v-model="formData.type" style="width: 100%" placeholder="采购类型">-->
<!-- <el-option label="预入库" value="1"></el-option>-->
<!-- <el-option label="普通采购" value="2"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-card>
<el-card>
@ -396,7 +456,8 @@
import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType} from "../../api/basic/busLocalType";
import {getLocalBusType,getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default {
name: "idQuery",
@ -423,6 +484,7 @@
limit: 10,
},
fromOptions: [],
fromStorageOptions: [],
formData: {},
formRules: {
corpName: [
@ -472,6 +534,10 @@
selectedIndex: "",
selectProductVisible: false,
thisData: {},
curAction: {
corpType: 0,
genUnit: false,
},
};
},
components: {
@ -1079,13 +1145,48 @@
let query = {
enabled: true,
};
getLocalBusType(query)
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {
});
},
findStorageMethod(query) {
console.log(query);
this.fromStorageOptions = [];
let cQuery = {
key: query,
};
filterAll(cQuery)
.then((response) => {
this.fromStorageOptions = response.data || [];
})
.catch(() => {
});
},
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
this.fromStorageOptions = response.data || [];
})
.catch(() => {
});
},
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i];
}
}
},
actionChange(item) {
this.curAction = this.getActionItem(item);
console.log(this.curAction.corpType+"---"+this.curAction.genUnit+"-----"+ this.curAction.action)
},
},
filters: {},
mounted() {
@ -1096,6 +1197,7 @@
},
created() {
this.getBusType();
this.getStorage(this.formData.billType);
this.formData = {};
this.codeArray = [];
this.closeConfirmFunction(false);

@ -0,0 +1,93 @@
<template>
<div>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="query.name"
clearable
placeholder="仓库名称"
style="width: 400px"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.advanceType" placeholder="请选择仓库类型" clearable>
<el-option label="全部" value=""></el-option>
<el-option label="寄售" value=true></el-option>
<el-option label="仓库" value=false></el-option>
</el-select>
</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="getList"></el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@row-click="selectStorage"
>
<el-table-column
prop="code"
label="仓库编码"
>
</el-table-column>
<el-table-column
prop="name"
label="仓库名称"
>
</el-table-column>
<el-table-column
prop="advanceType"
label="仓库类型">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.advanceType] }}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
filterAll,
} from "../../api/basic/invWarehouse";
export default {
name: "DialogSelectInvStorage",
data() {
return {
query: {key: "", page: 1, limit: 20},
list: [],
enableMap: {
true: "寄售",
false: "仓库",
},
}
},
methods: {
getList() {
this.loading = true;
filterAll(this.query)
.then((response) => {
this.loading = false;
this.list = response.data || [];
})
.catch(() => {
this.loading = false;
});
},
selectStorage(row) {
console.log(row.id);
this.$emit("selectStorage", row);
},
},
}
</script>
<style scoped>
</style>

@ -53,11 +53,12 @@
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
<span>往来单位</span>
<span>往来信息</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="fromCorp">
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==0 && curAction.genUnit ==false">
<el-select
v-model="formData.fromCorp"
filterable
@ -79,6 +80,35 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1 && curAction.genUnit ==false">
<el-select
v-model="formData.fromCorp"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
:remote-method="findStorageMethod"
:loading="loading"
@change="unitChange"
>
<el-option
v-for="item in fromStorageOptions"
:key="item.value"
:label="item.code"
:value="item.name">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.genUnit ==true">
<el-input v-model="formData.fromCorp" auto-complete="off"
clearable
placeholder="请输入病人住院号"
></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<div class="ao-text">
@ -87,7 +117,8 @@
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="billType">
<el-select v-model="formData.action" placeholder="请选择单据类型" :disabled="actionEnable">
<el-select v-model="formData.action" placeholder="请选择单据类型" :disabled="actionEnable"
@change="actionChange">
<el-option
v-for="item in busTypes"
:key="item.name"
@ -99,6 +130,31 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="locStorageCode">
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>-->
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
@ -185,6 +241,7 @@
import {parseTime} from "../../filtres/index";
import store from "../../store";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import {filterAll} from "@/api/basic/invWarehouse";
export default {
name: "idQuery",
@ -221,7 +278,9 @@
fromType: "网页端",
actDate: new Date(),
action: null,
locStorageCode: null,
},
storageList: [],
formRules: {
temp: [
{required: true, message: "请输入条码", trigger: "blur"}
@ -237,6 +296,11 @@
deleteLoading: false,
orderNo: null,
fromOptions: [],
fromStorageOptions: [],
curAction: {
corpType: 0,
genUnit: false,
},
};
},
components: {
@ -249,7 +313,9 @@
return;
}
let tQuery = {
orderId: this.idQuery.id
orderId: this.idQuery.id,
locStorageCode: this.formData.locStorageCode,
action: this.formData.action,
}
submitOrderWeb(tQuery)
.then((response) => {
@ -418,6 +484,51 @@
this.loading = false;
});
},
findStorageMethod(query) {
console.log(query);
this.fromStorageOptions = [];
let cQuery = {
key: query,
};
filterAll(cQuery)
.then((response) => {
this.fromStorageOptions = response.data || [];
})
.catch(() => {
});
},
getStorage(event) {
// let query = {
// advanceType: this.getActionName(event),
// };
this.storageList = [];
// this.formData.locStorageCode = null;
filterAll()
.then((response) => {
this.storageList = response.data || [];
this.fromStorageOptions = response.data || [];
})
.catch(() => {
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].advanceType;
}
}
},
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i];
}
}
},
actionChange(item) {
this.curAction = this.getActionItem(item);
},
},
filters: {},
mounted() {
@ -433,6 +544,7 @@
// this.formData.fromCorp = store.getters.customerId === 110 ? '' : store.getters.companyName;
// this.formData.customerId = store.getters.customerId;
this.getBusType();
this.getStorage(this.formData.billType);
if (this.$isNotBlank(this.idQuery.id)) {
this.formData.actDate = new Date(this.idQuery.actDate);
this.formData.corpOrderId = this.idQuery.corpOrderId;
@ -441,6 +553,7 @@
this.formData.action = this.idQuery.action;
this.formData.fromCorp = this.idQuery.fromCorp;
this.formData.fromCorpId = this.idQuery.fromCorpId;
this.formData.locStorageCode = this.idQuery.locStorageCode;
this.actionEnable = true;
this.getCodeList();
} else {

@ -144,6 +144,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
title="选择往来单位"
append-to-body
:visible.sync="dialogTableVisible"
width="70%"
>
@ -192,6 +193,19 @@
</el-table>
</el-dialog>
<el-dialog
title="选择仓库信息"
:visible.sync="dialogStorageVisible"
width="70%"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="dialogStorageVisible"
>
<dialogSelectInvStorage v-on:selectStorage="selectStorage"></dialogSelectInvStorage>
</el-dialog>
<el-dialog
title="单号详情"
:visible.sync="codeDetailVisible"
@ -226,6 +240,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import draggable from "vuedraggable";
import codeDetail from "./IONewCode";
import dialogSelectInvStorage from "./DialogSelectInvStorage";
const formJson = {
site_id: "",
@ -269,6 +284,7 @@ export default {
adList: {},
adListNoDataText: "无数据",
queryAdIdAsyncLoading: false,
dialogStorageVisible:false,
codeDetailVisible: false,
total: 0,
loading: true,
@ -301,6 +317,7 @@ export default {
components: {
draggable,
codeDetail,
dialogSelectInvStorage,
},
methods: {
onReset() {
@ -329,8 +346,16 @@ export default {
this.getList();
},
handleUnitClick(row) {
// this.curIndex = row.id;
// this.dialogTableVisible = true;
this.curIndex = row.id;
let actionItem = this.getActionItem(row.action);
if (actionItem.corpType == 0) {//
this.dialogTableVisible = true;
} else {
this.dialogStorageVisible = true;
}
},
closeDetailDialog() {
this.codeDetailVisible = false;
@ -395,7 +420,20 @@ export default {
.catch(() => {
});
},
selectStorage(row) {
console.log(row.id);
this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.code;
updateUnit(this.unitUpdateQuery)
.then((response) => {
this.dialogStorageVisible = false;
this.getList();
})
.catch(() => {
this.dialogStorageVisible = false;
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
@ -460,6 +498,13 @@ export default {
this.codeDetailVisible = true;
this.idQuery.id = row.id;
},
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i];
}
}
},
},
filters: {
statusFilterType(status) {

@ -517,9 +517,10 @@ export default {
if (row.id !== null && row.id !== undefined && row.id !== '') {
this.idQuery = row;
this.idQuery.id = row.id;
this.idQuery.locStorageCode = row.locStorageCode;
this.idQuery.actDate = row.actDate;
this.idQuery.corpOrderId = row.corpOrderId;
this.idQuery.billType = row.action;
}
this.addOrderVisible = true;
},

Loading…
Cancel
Save