库存仓库,新增往来仓库,仓库,货位等

master
anthonywj 3 years ago
parent 92ec2e7458
commit 0ba5ba265f

@ -9,8 +9,8 @@ window.global_config = {
"SERVER_IP": "http://139.159.187.130/" "SERVER_IP": "http://139.159.187.130/"
"BASE_URL":"http://192.168.0.9:9996", "BASE_URL":"http://192.168.0.109:9996",
"SERVER_IP": "http://192.168.0.9:9996" "SERVER_IP": "http://192.168.0.109:9996"

@ -1,4 +1,4 @@
{ {
"BASE_URL":"http://192.168.0.109:9996", "BASE_URL": "http://192.168.0.109:9996",
"SERVER_IP": "http://192.168.0.109:9996" "SERVER_IP": "http://192.168.0.109:9996"
} }

@ -1,6 +1,6 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>医院UDI自助管理平台</title><link rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=css/home.5235ad9e.css rel=prefetch><link href=js/home.1a94cfbc.js rel=prefetch><link href=css/app.aff94608.css rel=preload as=style><link href=css/chunk-vendors.072ae084.css rel=preload as=style><link href=js/app.0b49955d.js rel=preload as=script><link href=js/chunk-vendors.ac7bf19a.js rel=preload as=script><link href=css/chunk-vendors.072ae084.css rel=stylesheet><link href=css/app.aff94608.css rel=stylesheet></head><body><div id=app></div><script src=./tinymce4.7.5/tinymce.min.js></script><script src=https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js></script><script src=https://unpkg.zhimg.com/vuex@3.6.2/dist//vuex.min.js></script><script src=https://unpkg.zhimg.com/vue-router@3.0.1/dist/vue-router.min.js></script><script src=https://unpkg.zhimg.com/element-ui@2.15.7/lib/index.js></script><script>ga('create', 'UA-110990780-1', 'auto'); <!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon.ico><title>医院UDI自助管理平台</title><link rel=stylesheet href=https://unpkg.com/element-ui/lib/theme-chalk/index.css><link href=css/home.5235ad9e.css rel=prefetch><link href=js/home.1a94cfbc.js rel=prefetch><link href=css/app.05d72c4e.css rel=preload as=style><link href=css/chunk-vendors.072ae084.css rel=preload as=style><link href=js/app.136e1339.js rel=preload as=script><link href=js/chunk-vendors.ac7bf19a.js rel=preload as=script><link href=css/chunk-vendors.072ae084.css rel=stylesheet><link href=css/app.05d72c4e.css rel=stylesheet></head><body><div id=app></div><script src=./tinymce4.7.5/tinymce.min.js></script><script src=https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js></script><script src=https://unpkg.zhimg.com/vuex@3.6.2/dist//vuex.min.js></script><script src=https://unpkg.zhimg.com/vue-router@3.0.1/dist/vue-router.min.js></script><script src=https://unpkg.zhimg.com/element-ui@2.15.7/lib/index.js></script><script>ga('create', 'UA-110990780-1', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');
window.addEventListener('hashchange', function () { window.addEventListener('hashchange', function () {
ga('set', 'page', window.location.href); ga('set', 'page', window.location.href);
ga('send', 'pageview'); ga('send', 'pageview');
});</script><script src=js/chunk-vendors.ac7bf19a.js></script><script src=js/app.0b49955d.js></script></body></html> });</script><script src=js/chunk-vendors.ac7bf19a.js></script><script src=js/app.136e1339.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -9,8 +9,8 @@ window.global_config = {
"SERVER_IP": "http://139.159.187.130/" "SERVER_IP": "http://139.159.187.130/"
"BASE_URL":"http://192.168.0.9:9996", "BASE_URL":"http://192.168.0.109:9996",
"SERVER_IP": "http://192.168.0.9:9996" "SERVER_IP": "http://192.168.0.109:9996"

@ -1,4 +1,4 @@
{ {
"BASE_URL":"http://127.0.0.1:9996", "BASE_URL": "http://192.168.0.109:9996",
"SERVER_IP": "http://127.0.0.1:9996" "SERVER_IP": "http://192.168.0.109:9996"
} }

@ -11,6 +11,15 @@ export function filterList(query) {
}); });
} }
export function filterAll(query) {
return axios({
url: "/spms/inv/warehouse/filterAll",
method: "get",
params: query
});
}
// 保存 // 保存
export function saveWarehouse(data, formName, method = "post") { export function saveWarehouse(data, formName, method = "post") {
let url = let url =

@ -185,6 +185,7 @@ export default {
secCheckPc: null, secCheckPc: null,
secCheckWebNew: null, secCheckWebNew: null,
secCheckChange: null, secCheckChange: null,
corpType: null,
}, },
enableMap: { enableMap: {
true: "是", true: "是",
@ -273,7 +274,7 @@ export default {
}, },
handleModifyClick(row) { handleModifyClick(row) {
this.modifyDialogVisible = true;
this.inputQuery = { this.inputQuery = {
id: row.id, id: row.id,
remark: row.remark, remark: row.remark,
@ -300,7 +301,9 @@ export default {
secCheckPc: row.secCheckPc, secCheckPc: row.secCheckPc,
secCheckWebNew: row.secCheckWebNew, secCheckWebNew: row.secCheckWebNew,
secCheckChange: row.secCheckChange, secCheckChange: row.secCheckChange,
corpType: row.corpType + "",
}; };
this.modifyDialogVisible = true;
}, },
deleteDialog(rowId) { deleteDialog(rowId) {

@ -82,6 +82,24 @@
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>往来信息类型:&nbsp;</span>
</div>
<el-select v-model="inputQuery.corpType" placeholder="往来信息">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-col>
<el-col :span="10" class="el-col"> <el-col :span="10" class="el-col">
<div class="text item"> <div class="text item">
<div class="itemTag"> <div class="itemTag">
@ -95,10 +113,15 @@
></el-input> ></el-input>
</div> </div>
</el-col> </el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<div class="text item" style="margin-top: 6px"> <div class="text item" style="margin-top: 6px">
<el-checkbox v-model="inputQuery.enable"></el-checkbox> <el-checkbox v-model="inputQuery.enable"></el-checkbox>
<el-checkbox v-model="inputQuery.innerOrder"></el-checkbox> <!-- <el-checkbox v-model="inputQuery.innerOrder"></el-checkbox>-->
<el-checkbox v-model="inputQuery.genUnit"></el-checkbox> <el-checkbox v-model="inputQuery.genUnit"></el-checkbox>
</div> </div>
@ -107,25 +130,25 @@
</el-row> </el-row>
<!-- <el-divider></el-divider>--> <!-- <el-divider></el-divider>-->
<!-- <el-row :gutter="20" class="el-row" type="flex">--> <!-- <el-row :gutter="20" class="el-row" type="flex">-->
<!-- <el-col :span="4" class="el-col">--> <!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">--> <!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.enable"></el-checkbox>--> <!-- <el-checkbox v-model="inputQuery.enable"></el-checkbox>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="4" class="el-col">--> <!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">--> <!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.innerOrder"></el-checkbox>--> <!-- <el-checkbox v-model="inputQuery.innerOrder"></el-checkbox>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="4" class="el-col">--> <!-- <el-col :span="4" class="el-col">-->
<!-- <div class="text item">--> <!-- <div class="text item">-->
<!-- <el-checkbox v-model="inputQuery.genUnit"></el-checkbox>--> <!-- <el-checkbox v-model="inputQuery.genUnit"></el-checkbox>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-divider></el-divider> <el-divider></el-divider>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<!-- <el-col :span="5" class="el-col">--> <!-- <el-col :span="5" class="el-col">-->
@ -262,8 +285,14 @@ export default {
}, },
thirdSys: [], thirdSys: [],
localTypes: [], localTypes: [],
options: [{
value: '0',
label: '往来单位信息'
}, {
value: '1',
label: '仓库信息'
}],
value: "",
} }
}, },
methods: { methods: {

@ -1,33 +1,28 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
v-model="query.code" v-model="query.name"
clearable clearable
placeholder="仓位货位码" placeholder="仓库名称"
style="width: 400px" style="width: 400px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.advanceType" placeholder="是否寄售" clearable> <el-select v-model="query.advanceType" placeholder="请选择仓库类型" clearable>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="" value=true></el-option> <el-option label="寄售" value=true></el-option>
<el-option label="" value=false></el-option> <el-option label="仓库" value=false></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <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="getList"></el-button>
<el-button type="primary" @click.native="handleForm(null, null)" <el-button type="primary" @click.native="handleForm(null, null,'addTop')"
>添加仓货位 >添加仓
</el-button </el-button
> >
</el-button-group> </el-button-group>
@ -42,29 +37,29 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column <el-table-column
prop="code" prop="code"
label="仓位货位码" label="仓库编码"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="仓位货位名称" label="仓名称"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="advanceType" prop="advanceType"
label="是否寄售"> label="仓库类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ enableMap[scope.row.advanceType] }}</span> <span>{{ enableMap[scope.row.advanceType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column-->
prop="isDefault" <!-- prop="isDefault"-->
label="是否默认库存"> <!-- label="是否默认库存">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span>{{ enableMap[scope.row.isDefault] }}</span> <!-- <span>{{ enableMap[scope.row.isDefault] }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@ -73,13 +68,14 @@
type="text" type="text"
size="small" size="small"
:disabled="scope.row.pid!=0" :disabled="scope.row.pid!=0"
@click.native.stop="handleForm(node, scope.row, 'add')" @click.native.stop="handleSubForm(node, scope.row, 'add')"
>添加 >添加货位
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="handleForm(node, scope.row, 'edit')" @click.native.stop="handleForm(node, scope.row, 'edit')"
>编辑 >编辑
</el-button </el-button
@ -87,6 +83,7 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
:disabled="scope.row.code==1000 ||scope.row.code==1001"
@click.native.stop="handleDel(node,scope.row)" @click.native.stop="handleDel(node,scope.row)"
>删除 >删除
</el-button </el-button
@ -113,60 +110,135 @@
:title="formMap[formName]" :title="formMap[formName]"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:visible.sync="formVisible" :visible.sync="subFormVisible"
:before-close="hideForm" :before-close="hideForm"
width="85%" width="60%"
top="5vh" top="5vh"
> >
<el-form :model="formData" :rules="formRules" ref="dataForm"> <el-form :model="formData" :rules="formRules" ref="dataForm">
<el-form-item label="父ID" prop="pid"> <el-form-item label="本企业仓库" prop="pid">
<el-select v-model="formData.pid" placeholder="顶级"> <el-select v-model="formData.pid" placeholder="顶级" disabled>
<el-option <el-option
v-for="item in treeList" v-for="item in mergeList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
> >
<span style="float: left" <span style="float: left"
><span v-html="item.html"></span>{{ item.title }}</span ><span v-html="item.html"></span>{{ item.name }}</span
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="仓库货位名称" prop="name">
<el-form-item label="仓库编码" prop="title" class="query-form-item">
<el-input <el-input
type="" v-model="formData.code" style="width: 80%"
v-model="formData.name"
auto-complete="off" auto-complete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="仓库货位代码" prop="title"> <el-form-item label="仓库名称" prop="name" class="query-form-item">
<el-input <el-input
type="" v-model="formData.name" style="width: 80%"
v-model="formData.code"
auto-complete="off" auto-complete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status">
<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-group v-model="formData.status">
<el-radio :label="0">禁用</el-radio> <el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio> <el-radio :label="1">正常</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item>
<el-row :gutter="20" class="el-row" type="flex"> <!-- <el-form-item v-if="formData.pid == 0">-->
<el-col :span="4" class="el-col"> <!-- <el-row :gutter="20" class="el-row" type="flex">-->
<div class="text item"> <!-- <el-col :span="4" class="el-col">-->
<el-checkbox v-model="formData.advanceType"></el-checkbox> <!-- <div class="text item">-->
</div> <!-- <el-checkbox v-model="formData.advanceType"></el-checkbox>-->
</el-col> <!-- </div>-->
<el-col :span="4" class="el-col"> <!-- </el-col>-->
<div class="text item"> <!-- <el-col :span="4" class="el-col">-->
<el-checkbox v-model="formData.isDefault"></el-checkbox> <!-- <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> </div>
</el-col> </el-dialog>
</el-row>
<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>
<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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -222,14 +294,16 @@ export default {
index: null, index: null,
formName: null, formName: null,
formMap: { formMap: {
add: "新增", addTop: "添加仓库",
add: "添加货位",
edit: "编辑" edit: "编辑"
}, },
enableMap: { enableMap: {
true: "", true: "寄售",
false: "", false: "仓库",
}, },
formLoading: false, formLoading: false,
subFormVisible: false,
formVisible: false, formVisible: false,
formData: formJson, formData: formJson,
formRules: { formRules: {
@ -260,7 +334,7 @@ export default {
<el-button <el-button
style="font-size: 12px;" style="font-size: 12px;"
type="text" type="text"
on-click={() => this.handleForm(node, data, "add")} on-click={() => this.handleSubForm(node, data, "add")}
> >
添加货位 添加货位
</el-button> </el-button>
@ -322,25 +396,51 @@ export default {
// //
hideForm() { hideForm() {
// //
this.formVisible = !this.formVisible; this.formVisible = false;
this.subFormVisible = false;
return true; return true;
}, },
// //
handleForm(node, data, formName) { handleForm(node, data, formName) {
this.formVisible = true; this.formVisible = true;
let no = this.getProjectNum() + Math.floor(Math.random() * 10000)
this.pidData = data || null; this.pidData = data || null;
formJson.pid = (data && parseInt(data.id)) || ""; formJson.pid = (data && parseInt(data.id)) || "";
this.formData = JSON.parse(JSON.stringify(formJson)); this.formData = JSON.parse(JSON.stringify(formJson));
if (formName === "edit") { if (formName === "edit") {
this.formData = Object.assign({}, data); this.formData = Object.assign({}, data);
this.node = node; this.node = node;
} else {
this.formData.code = no;
} }
this.formData.pid = !this.formData.pid ? "" : this.formData.pid; this.formData.pid = !this.formData.pid ? "" : this.formData.pid;
this.formName = formName; this.formName = formName;
if (data && data.id) { if (data && data.id) {
this.index = this.mergeList.findIndex((d) => d.id === 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() { formSubmit() {
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (valid) { if (valid) {
@ -406,6 +506,7 @@ export default {
return false; return false;
} }
this.$message.success("删除成功"); this.$message.success("删除成功");
this.getList();
const parent = node.parent; const parent = node.parent;
const children = parent.data.children || parent.data; const children = parent.data.children || parent.data;
const index = children.findIndex((d) => d.id === data.id); const index = children.findIndex((d) => d.id === data.id);
@ -420,6 +521,24 @@ export default {
}); });
} }
}, },
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: { filters: {
statusFilterType(status) { statusFilterType(status) {

@ -70,6 +70,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column> <el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

@ -68,6 +68,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column> <el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

@ -0,0 +1,89 @@
<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: [],
}
},
methods: {
getList() {
this.loading = true;
filterAll(this.query)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
selectStorage(row) {
console.log(row.id);
this.$emit("selectStorage", row);
},
},
}
</script>
<style scoped>
</style>

@ -1,4 +1,5 @@
<template> <template>
<div>
<el-form :inline="true" :model="unitquery" class="query-form" size="mini"> <el-form :inline="true" :model="unitquery" class="query-form" size="mini">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="unitquery.key" placeholder="搜索"></el-input> <el-input v-model="unitquery.key" placeholder="搜索"></el-input>
@ -43,6 +44,7 @@
<el-table-column label="状态" prop="status"></el-table-column> <el-table-column label="状态" prop="status"></el-table-column>
<el-table-column label="类型" prop="type"></el-table-column> <el-table-column label="类型" prop="type"></el-table-column>
</el-table> </el-table>
</div>
</template> </template>
<script> <script>

@ -345,6 +345,8 @@ export default {
}, },
handleUnitClick(row) { handleUnitClick(row) {
this.curIndex = row.id; this.curIndex = row.id;
let actionItem = this.getActionItem(row.action);
// if(actionItem.co)
this.dialogTableVisible = true; this.dialogTableVisible = true;
}, },
closeDetailDialog(val) { closeDetailDialog(val) {
@ -479,6 +481,13 @@ export default {
} }
} }
}, },
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i];
}
}
},
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {

@ -422,6 +422,7 @@ export default {
this.idQuery.actDate = row.actDate; this.idQuery.actDate = row.actDate;
this.idQuery.corpOrderId = row.corpOrderId; this.idQuery.corpOrderId = row.corpOrderId;
this.idQuery.billType = row.action; this.idQuery.billType = row.action;
this.idQuery.locStorageCode = row.locStorageCode;
} }
this.addOrderVisible = true; this.addOrderVisible = true;
}, },

@ -431,9 +431,9 @@ export default {
// error: "", // error: "",
// null: "", // null: "",
// success: "", // success: "",
1: "校验异常", 1: "已完成",
0: "未校验", 0: "已完成",
2: "校验成功", 2: "已完成",
}, },
fromTypeMap: { fromTypeMap: {
"1": "UDIMS平台", "1": "UDIMS平台",

@ -71,7 +71,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="formData.billType" placeholder="请选择业务类型"> <el-select v-model="formData.billType" placeholder="请选择业务类型" @change="getStorage">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
@ -83,6 +83,33 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-card> </el-card>
<el-card> <el-card>
@ -176,6 +203,7 @@ import {saveAs} from "file-saver";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {parseTime} from "../../filtres/index"; import {parseTime} from "../../filtres/index";
import store from "../../store"; import store from "../../store";
import {filterAll} from "@/api/basic/invWarehouse";
const formJson = { const formJson = {
corpOrderId: "", corpOrderId: "",
@ -184,6 +212,7 @@ const formJson = {
fromCorpId: "", fromCorpId: "",
fromCorp: "医院", fromCorp: "医院",
fromType: null, fromType: null,
locStorageCode: null,
actDate: new Date(), actDate: new Date(),
billType: null, billType: null,
}; };
@ -232,6 +261,7 @@ export default {
deleteLoading: false, deleteLoading: false,
orderNo: null, orderNo: null,
busTypes: [], busTypes: [],
storageList: [],
}; };
}, },
components: { components: {
@ -250,6 +280,7 @@ export default {
let tQuery = { let tQuery = {
orderId: this.idQuery.id, orderId: this.idQuery.id,
action: this.formData.billType, action: this.formData.billType,
locStorageCode: this.formData.locStorageCode,
} }
submitOrderWeb(tQuery) submitOrderWeb(tQuery)
@ -393,6 +424,7 @@ export default {
getBussinessType(query) getBussinessType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.getStorage(this.formData.billType);
// this.getList(); // this.getList();
}) })
.catch(() => { .catch(() => {
@ -401,6 +433,27 @@ export default {
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
getStorage(event) {
let query = {
advanceType: this.getActionName(event),
};
this.storageList = [];
// this.formData.locStorageCode = null;
filterAll(query)
.then((response) => {
this.storageList = 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;
}
}
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -416,11 +469,14 @@ export default {
this.formData.fromCorp = store.getters.companyName;// store.getters.customerId === 110 ? '' : store.getters.companyName; this.formData.fromCorp = store.getters.companyName;// store.getters.customerId === 110 ? '' : store.getters.companyName;
this.formData.customerId = store.getters.customerId; this.formData.customerId = store.getters.customerId;
this.getBusType(); this.getBusType();
if (this.$isNotBlank(this.idQuery.id)) { if (this.$isNotBlank(this.idQuery.id)) {
this.formData.actDate = new Date(this.idQuery.actDate); this.formData.actDate = new Date(this.idQuery.actDate);
this.formData.corpOrderId = this.idQuery.corpOrderId; this.formData.corpOrderId = this.idQuery.corpOrderId;
this.formData.billType = this.idQuery.billType; this.formData.billType = this.idQuery.billType;
this.formData.locStorageCode = this.idQuery.locStorageCode;
this.corpOrderIdDisabled = true; this.corpOrderIdDisabled = true;
if (this.addType == "edit") { if (this.addType == "edit") {
this.visiblV = 1; this.visiblV = 1;
} }

@ -105,7 +105,7 @@
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">--> <!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>--> <!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>--> <!--</el-select>-->
<el-select v-model="formData.billType" placeholder="请选择业务类型"> <el-select v-model="formData.billType" placeholder="请选择业务类型" @change="getStorage">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
@ -117,6 +117,31 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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="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-row :gutter="20" style="margin-top: -10px;">-->
<!-- <el-col :span="3">--> <!-- <el-col :span="3">-->
@ -414,6 +439,7 @@ import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain"; import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType} from "../../api/basic/busLocalType"; import {getLocalBusType} from "../../api/basic/busLocalType";
import {filterAll} from "@/api/basic/invWarehouse";
export default { export default {
name: "idQuery", name: "idQuery",
@ -488,6 +514,7 @@ export default {
selectedIndex: "", selectedIndex: "",
selectProductVisible: false, selectProductVisible: false,
thisData: {}, thisData: {},
storageList: [],
}; };
}, },
components: { components: {
@ -549,6 +576,26 @@ export default {
} }
}); });
}, },
getStorage(event) {
let query = {
advanceType: this.getActionName(event),
};
this.storageList = [];
filterAll(query)
.then((response) => {
this.storageList = 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;
}
}
},
submitFunction(status) { submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交'; let tMessage = status === '501' ? '保存' : '提交';
this.loading = true; this.loading = true;
@ -1074,6 +1121,7 @@ export default {
getLocalBusType(query) getLocalBusType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.getStorage(this.formData.billType);
}) })
.catch(() => { .catch(() => {
}); });

@ -106,13 +106,13 @@
>标签打印 >标签打印
</el-button </el-button
> >
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
@click.native="deleteStockOrder(scope.row)" <!-- @click.native="deleteStockOrder(scope.row)"-->
>删除 <!-- >删除-->
</el-button <!-- </el-button-->
> <!-- >-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -101,7 +101,7 @@
<!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">--> <!--<el-select v-model="formData.billType" style="width: 100%" placeholder="业务类型" :disabled="true">-->
<!--<el-option label="送货单" value="deliveryNote"></el-option>--> <!--<el-option label="送货单" value="deliveryNote"></el-option>-->
<!--</el-select>--> <!--</el-select>-->
<el-select v-model="formData.billType" placeholder="请选择业务类型"> <el-select v-model="formData.billType" placeholder="请选择业务类型" @change="getStorage">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
@ -114,6 +114,33 @@
</el-col> </el-col>
</el-row> </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="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-row :gutter="20" style="margin-top: -10px;">-->
<!-- <el-col :span="3">--> <!-- <el-col :span="3">-->
<!-- <div class="ao-text">--> <!-- <div class="ao-text">-->
@ -428,6 +455,10 @@ import {
getStockOrderDetailInstrumentById, stockOrderDetail2 getStockOrderDetailInstrumentById, stockOrderDetail2
} from "../../api/warehouse/stockOrder"; } from "../../api/warehouse/stockOrder";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {
filterAll
} from "../../api/basic/invWarehouse";
import {saveAs} from "file-saver"; import {saveAs} from "file-saver";
import {parseTime} from "../../filtres/index"; import {parseTime} from "../../filtres/index";
import store from "../../store"; import store from "../../store";
@ -505,6 +536,7 @@ export default {
sList: [], sList: [],
sLoading: false, sLoading: false,
busTypes: [], busTypes: [],
storageList: [],
currentRow: {}, currentRow: {},
selectedIndex: "", selectedIndex: "",
selectProductVisible: false, selectProductVisible: false,
@ -1103,10 +1135,32 @@ export default {
getLocalBusType(query) getLocalBusType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.getStorage(this.formData.billType);
})
.catch(() => {
});
},
getStorage(event) {
console.log("-----" + event);
let query = {
advanceType: this.getActionName(event),
};
this.storageList = [];
filterAll(query)
.then((response) => {
this.storageList = response.data || [];
}) })
.catch(() => { .catch(() => {
}); });
}, },
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].advanceType;
}
}
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -1127,6 +1181,7 @@ export default {
this.orderEditor = true; this.orderEditor = true;
this.sValue = this.formData.corpName; this.sValue = this.formData.corpName;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
} else { } else {
this.formData = { this.formData = {
billdate: "", billdate: "",

Loading…
Cancel
Save