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

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,61 +110,136 @@
: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">-->
</div> <!-- <el-checkbox v-model="formData.isDefault"></el-checkbox>-->
</el-col> <!-- </div>-->
</el-row> <!-- </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>
<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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button> <el-button @click.native="hideForm">取消</el-button>
@ -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,20 +396,46 @@ 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.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.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);
@ -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,48 +1,50 @@
<template> <template>
<el-form :inline="true" :model="unitquery" class="query-form" size="mini"> <div>
<el-form-item class="query-form-item"> <el-form :inline="true" :model="unitquery" class="query-form" size="mini">
<el-input v-model="unitquery.key" placeholder="搜索"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="unitquery.key" placeholder="搜索"></el-input>
<el-form-item> </el-form-item>
<el-button <el-form-item>
type="primary" <el-button
icon="search" type="primary"
@click.native.stop="getUnitList()" icon="search"
>查询 @click.native.stop="getUnitList()"
</el-button >查询
> </el-button
</el-form-item> >
</el-form> </el-form-item>
</el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="unitlist" :data="unitlist"
style="width: 100%" style="width: 100%"
@row-click="selectUnit" @row-click="selectUnit"
> >
<el-table-column <el-table-column
label="往来单位ID" label="往来单位ID"
prop="erpId" prop="erpId"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="往来单位名称" label="往来单位名称"
prop="name" prop="name"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="往来单位简写" label="往来单位简写"
prop="spell" prop="spell"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="地址" label="地址"
prop="addr" prop="addr"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<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>

@ -1,238 +1,238 @@
<template> <template>
<div> <div>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.id" placeholder="单号"></el-input> <el-input v-model="filterQuery.id" placeholder="单号"></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="filterQuery.mainAction" placeholder="出入库类型"> <el-select v-model="filterQuery.mainAction" placeholder="出入库类型">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option> <el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option> <el-option label="出库" value="WareHouseOut"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.action" placeholder="请选择业务类型"> <el-select v-model="filterQuery.action" placeholder="请选择业务类型">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.action"> :value="item.action">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </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 <el-button
type="primary" type="primary"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="onReset" @click="onReset"
></el-button> ></el-button>
<el-button type="primary" icon="search" @click="onSubmit" <el-button type="primary" icon="search" @click="onSubmit"
>查询 >查询
</el-button </el-button
> >
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table v-loading="loading" :data="list" style="width: 100%"> <el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="扫码单据类型" prop="action"> <el-table-column label="扫码单据类型" prop="action">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getActionName(scope.row.action) }}</span> <span>{{ getActionName(scope.row.action) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单号" prop="id" show-overflow-tooltip></el-table-column> <el-table-column label="订单号" prop="id" show-overflow-tooltip></el-table-column>
<el-table-column label="来源订单号" prop="corpOrderId" show-overflow-tooltip></el-table-column> <el-table-column label="来源订单号" prop="corpOrderId" show-overflow-tooltip></el-table-column>
<el-table-column label="来源" prop="fromType"> <el-table-column label="来源" prop="fromType">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span> <span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="往来单位" prop="fromCorp" width="220"> <el-table-column label="往来单位" prop="fromCorp" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- {{ scope.row.fromCorp }}--> <!-- {{ scope.row.fromCorp }}-->
<p v-if="scope.row.fromCorp == null"> <p v-if="scope.row.fromCorp == null">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click.native.stop="handleUnitClick(scope.row)" @click.native.stop="handleUnitClick(scope.row)"
>选择往来单位 >选择往来单位
</el-button </el-button
> >
</p> </p>
<p v-if="scope.row.fromCorp !== null"> <p v-if="scope.row.fromCorp !== null">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click.native.stop="handleUnitClick(scope.row)" @click.native.stop="handleUnitClick(scope.row)"
>{{ scope.row.fromCorp }} >{{ scope.row.fromCorp }}
</el-button </el-button
> >
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="actDate" show-overflow-tooltip> <el-table-column label="创建时间" prop="actDate" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-time"></i> <i class="el-icon-time"></i>
<span>{{ scope.row.actDate }}</span> <span>{{ scope.row.actDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="校验状态" prop="status" width="100"> <el-table-column label="校验状态" prop="status" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.status == 3) | statusFilterType">{{ <el-tag :type="(scope.row.status == 3) | statusFilterType">{{
checkStatus[scope.row.status] checkStatus[scope.row.status]
}} }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250" fixed="right"> <el-table-column label="操作" width="250" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
size="small" size="small"
v-if="scope.row.status === -1" v-if="scope.row.status === -1"
@click.native.stop="addOrders(scope.row)" @click.native.stop="addOrders(scope.row)"
>编辑 >编辑
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
v-if="scope.row.status !== -1" v-if="scope.row.status !== -1"
@click.native.stop="intentDetail(scope.row)" @click.native.stop="intentDetail(scope.row)"
>详情 >详情
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
v-if="scope.row.status !== -1" v-if="scope.row.status !== -1"
@click.native.stop="handleErrorDetail(scope.$index)" @click.native.stop="handleErrorDetail(scope.$index)"
>错误详情 >错误详情
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="deleteDialog(scope.row.id)" @click.native.stop="deleteDialog(scope.row.id)"
>删除 >删除
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
v-if="scope.row.status !== -1" v-if="scope.row.status !== -1"
@click.native.stop="onUpload(scope.row.id)" @click.native.stop="onUpload(scope.row.id)"
>重新提交 >重新提交
</el-button </el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog title="错误信息" :visible.sync="dialogVisible" width="30%" :append-to-body='true'> <el-dialog title="错误信息" :visible.sync="dialogVisible" width="30%" :append-to-body='true'>
<span>{{ errorDetail }}</span> <span>{{ errorDetail }}</span>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false" <el-button type="primary" @click="dialogVisible = false"
> </el-button > </el-button
> >
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="选择往来单位" title="选择往来单位"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
append-to-body append-to-body
width="70%" width="70%"
> >
<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>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
icon="search" icon="search"
@click.native.stop="getUnitList()" @click.native.stop="getUnitList()"
>查询 >查询
</el-button </el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="unitlist" :data="unitlist"
style="width: 100%" style="width: 100%"
@row-click="selectUnit" @row-click="selectUnit"
> >
<el-table-column <el-table-column
label="往来单位ID" label="往来单位ID"
prop="erpId" prop="erpId"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="往来单位名称" label="往来单位名称"
prop="name" prop="name"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="往来单位简写" label="往来单位简写"
prop="spell" prop="spell"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="地址" label="地址"
prop="addr" prop="addr"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<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>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="单号详情" title="单号详情"
:visible.sync="codeDetailVisible" :visible.sync="codeDetailVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="80%" append-to-body width="80%" append-to-body
v-if="codeDetailVisible" v-if="codeDetailVisible"
> >
<codeDetail <codeDetail
:idQuery="idQuery" :idQuery="idQuery"
v-on:closeDetailDialog="closeDetailDialog" v-on:closeDetailDialog="closeDetailDialog"
></codeDetail> ></codeDetail>
</el-dialog> </el-dialog>
<el-pagination <el-pagination
:page-size="filterQuery.limit" :page-size="filterQuery.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</template> </template>
<script> <script>
import { import {
orderListError, orderListError,
codeList, codeList,
filterOrder, filterOrder,
deleteByOrderId, deleteByOrderId,
commitOrder, commitOrder,
updateUnit, updateUnit,
} from "../../api/warehouse/order"; } from "../../api/warehouse/order";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
@ -244,265 +244,274 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
const formJson = { const formJson = {
site_id: "", site_id: "",
site_name: "", site_name: "",
describe: "", describe: "",
ads: [], ads: [],
}; };
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
id: "", id: "",
mainAction: null, mainAction: null,
action: null, action: null,
page: 1, page: 1,
limit: 20, limit: 20,
}, },
checkStatus: { checkStatus: {
'-1': "等待提交", '-1': "等待提交",
// 1: "", // 1: "",
1: "等待校验", 1: "等待校验",
2: "等待校验", 2: "等待校验",
3: "校验异常", 3: "校验异常",
4: "校验成功", 4: "校验成功",
}, },
curIndex: "", curIndex: "",
unitquery: {key: "", page: 1, limit: 20}, unitquery: {key: "", page: 1, limit: 20},
unitlist: [], unitlist: [],
unitUpdateQuery: { unitUpdateQuery: {
id: "", id: "",
fromCorpId: "", fromCorpId: "",
fromCorp: "", fromCorp: "",
}, },
idQuery: { idQuery: {
id: "", id: "",
}, },
fromTypeMap: { fromTypeMap: {
"1": "UDIMS平台", "1": "UDIMS平台",
"2": "网页新增", "2": "网页新增",
"3": "pda即时校验", "3": "pda即时校验",
"4": "pda未校验", "4": "pda未校验",
"5": "pc端扫码精灵", "5": "pc端扫码精灵",
"6": "补录单据", "6": "补录单据",
"7": "UDI供应商平台" "7": "UDI供应商平台"
}, },
list: [], list: [],
adId: [], adId: [],
adSelectList: [], adSelectList: [],
adList: {}, adList: {},
adListNoDataText: "无数据", adListNoDataText: "无数据",
queryAdIdAsyncLoading: false, queryAdIdAsyncLoading: false,
codeDetailVisible: false, codeDetailVisible: false,
total: 0, total: 0,
loading: true, loading: true,
index: null, index: null,
formName: null, formName: null,
errorDetail: "1111111111111", errorDetail: "1111111111111",
formMap: { formMap: {
add: "新增", add: "新增",
edit: "编辑", edit: "编辑",
}, },
deleteData: { deleteData: {
id: "", id: "",
}, },
dialogTableVisible: false, dialogTableVisible: false,
formLoading: false, formLoading: false,
dialogVisible: false, dialogVisible: false,
formData: formJson, formData: formJson,
deleteLoading: false, deleteLoading: false,
busTypes: [], busTypes: [],
}; };
},
components: {
draggable,
codeDetail,
addOrder,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
page: 1,
limit: 20,
};
this.getList();
},
onSubmit() {
this.loading = true;
this.getList();
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
}, },
handleCurrentChange(val) { components: {
this.filterQuery.page = val; draggable,
this.getList(); codeDetail,
addOrder,
}, },
handleUnitClick(row) { methods: {
this.curIndex = row.id; onReset() {
this.dialogTableVisible = true; this.$router.push({
}, path: "",
closeDetailDialog(val) { });
this.codeDetailVisible = false; this.filterQuery = {
}, page: 1,
limit: 20,
closeDialog() { };
this.getList();
},
getUnitList() {
this.loading = true;
getBasicUnitMaintains(this.unitquery)
.then((response) => {
this.loading = false;
this.unitlist = response.data.page.list || [];
})
.catch(() => {
this.loading = false;
});
},
selectUnit(row) {
console.log(row.id);
this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.erpId;
updateUnit(this.unitUpdateQuery)
.then((response) => {
this.dialogTableVisible = false;
this.getList(); this.getList();
}) },
.catch(() => { onSubmit() {
this.dialogTableVisible = false; this.loading = true;
}); this.getList();
}, },
// handleSizeChange(val) {
getList() { this.filterQuery.limit = val;
this.loading = true; this.getList();
this.filterQuery.status = 3; },
this.filterQuery.customerId = store.getters.customerId; handleCurrentChange(val) {
orderListError(this.filterQuery) this.filterQuery.page = val;
.then((response) => { this.getList();
console.log(response) },
this.loading = false; handleUnitClick(row) {
this.list = response.data.list || []; this.curIndex = row.id;
this.total = response.data.total || 0; let actionItem = this.getActionItem(row.action);
}) // if(actionItem.co)
.catch(() => { this.dialogTableVisible = true;
this.loading = false; },
this.list = []; closeDetailDialog(val) {
this.total = 0; this.codeDetailVisible = false;
}); },
},
deleteOrders(data) { closeDialog() {
this.loading = true;
this.deleteData.id = data;
deleteByOrderId(this.deleteData)
.then((response) => {
this.getList(); this.getList();
this.$message({ },
type: "success", getUnitList() {
message: "删除成功!", this.loading = true;
}); getBasicUnitMaintains(this.unitquery)
}) .then((response) => {
.catch(() => { this.loading = false;
}); this.unitlist = response.data.page.list || [];
}, })
.catch(() => {
this.loading = false;
});
},
deleteDialog(rowId) { selectUnit(row) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", { console.log(row.id);
confirmButtonText: "确定", this.unitUpdateQuery.id = this.curIndex;
cancelButtonText: "取消", this.unitUpdateQuery.fromCorp = row.name;
type: "warning", this.unitUpdateQuery.fromCorpId = row.erpId;
}) updateUnit(this.unitUpdateQuery)
.then(() => { .then((response) => {
this.deleteOrders(rowId); this.dialogTableVisible = false;
}) this.getList();
.catch(() => { })
}); .catch(() => {
}, this.dialogTableVisible = false;
});
},
//
getList() {
this.loading = true;
this.filterQuery.status = 3;
this.filterQuery.customerId = store.getters.customerId;
orderListError(this.filterQuery)
.then((response) => {
console.log(response)
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
onUpload(data) { deleteOrders(data) {
this.loading = true; this.loading = true;
var idQuery = { this.deleteData.id = data;
orderId: "", deleteByOrderId(this.deleteData)
}; .then((response) => {
idQuery.orderId = data; this.getList();
commitOrder(idQuery) this.$message({
.then((response) => { type: "success",
if (response.code === 20000) { message: "删除成功!",
this.$message.success(response.data); });
this.getList(); })
} else { .catch(() => {
this.$message.error(response.message); });
} },
})
.catch(() => {
});
},
handleErrorDetail(poistion) { deleteDialog(rowId) {
var mOrder = this.list[poistion]; this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
var corpOrderId = mOrder.remark; confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
this.errorDetail = mOrder.remark; onUpload(data) {
console.log(corpOrderId + " " + mOrder + " " + mOrder.remark); this.loading = true;
this.dialogVisible = true; var idQuery = {
}, orderId: "",
};
idQuery.orderId = data;
commitOrder(idQuery)
.then((response) => {
if (response.code === 20000) {
this.$message.success(response.data);
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleErrorDetail(poistion) {
var mOrder = this.list[poistion];
var corpOrderId = mOrder.remark;
intentDetail(row) { this.errorDetail = mOrder.remark;
this.codeDetailVisible = true; console.log(corpOrderId + " " + mOrder + " " + mOrder.remark);
this.idQuery.id = row.id; this.dialogVisible = true;
},
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery.id = row.id;
},
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;
}
}
},
getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i];
}
}
},
}, },
getBusType() { filters: {
let query = { statusFilterType(status) {
enabled: true, const statusMap = {
}; false: "success",
getBussinessType(query) true: "danger",
.then((response) => { };
this.busTypes = response.data.list || []; return statusMap[status];
this.filterQuery.billAction = this.busTypes[0].action; },
// this.getList();
})
.catch(() => {
});
}, },
getActionName(action) { mounted() {
for (let i = 0; i < this.busTypes.length; i++) { document.body.ondrop = function (event) {
if (this.busTypes[i].action === action) { event.preventDefault();
return this.busTypes[i].name; event.stopPropagation();
} };
}
}, },
}, created() {
filters: { this.getBusType();
statusFilterType(status) { let query = this.$route.query;
const statusMap = { this.filterQuery = Object.assign(this.filterQuery, query);
false: "success", this.filterQuery.limit = parseInt(this.filterQuery.limit);
true: "danger", //
}; this.getList();
return statusMap[status];
}, },
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getBusType();
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
//
this.getList();
},
}; };
</script> </script>

@ -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