业务单据界面修改

master
anthonyywj2 3 years ago
parent a1ca9f8801
commit efb2814615

@ -1,6 +1,6 @@
{ {
"UDI_SYNC_SERVER_IP": "http://192.168.0.109:9995/", "UDI_SYNC_SERVER_IP": "http://127.0.0.1:9995/",
"BASE_URL":"http://192.168.0.109:9991/", "BASE_URL":"http://127.0.0.1:9991/",
"SERVER_IP": "http://192.168.0.109:9991/", "SERVER_IP": "http://127.0.0.1:9991/",
"WEBSOCKET_URL": "ws://192.168.0.109:9991/UDI_WMS_MC/api/websocket/" "WEBSOCKET_URL": "ws://127.0.0.1:9991/UDI_WMS_MC/api/websocket/"
} }

@ -64,20 +64,19 @@
<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">
<span>当前仓库</span> <span>业务类型</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="locStorageCode"> <el-form-item prop="billType">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange" <el-select v-model="formData.billType" placeholder="请选择业务类型" @change="actionChange"
clearable> clearable>
<el-option <el-option
v-for="item in storageList" v-for="item in busTypes"
:key="item.name" :key="item.localAction"
:label="item.name" :label="item.localName"
:value="item.code"> :value="item.localAction">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.localName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -146,22 +145,22 @@
</el-row> </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">
<span>业务类型</span> <span>当前仓库</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="billType"> <el-form-item prop="locStorageCode">
<el-select v-model="formData.billType" placeholder="请选择业务类型" @change="actionChange" <el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
clearable> clearable>
<el-option <el-option
v-for="item in busTypes" v-for="item in storageList"
:key="item.localAction" :key="item.name"
:label="item.localName" :label="item.name"
:value="item.localAction"> :value="item.code">
<span style="float: left">{{ item.localName }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>

@ -1,352 +1,355 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<div> <div>
<el-form :inline="true" :model="listQuery" size="mini"> <el-form :inline="true" :model="listQuery" size="mini">
<el-row style="margin-top: 15px;width: 1000px"> <el-row style="margin-top: 15px;width: 1000px">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.udiCode" <el-input v-model="listQuery.udiCode"
style="width: 600px" style="width: 600px"
placeholder="请扫描或输入UDI码" placeholder="请扫描或输入UDI码"
clearable="true" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input> @keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码" <el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input> <el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input> <el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人" <el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input> <el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input>
</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" icon="search" @click="combine"></el-button> <el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
:data="dataList" :data="dataList"
style="width: 100%" style="width: 100%"
highlight-current-row="false" highlight-current-row="false"
v-loading="loading" v-loading="loading"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@current-change="handleChange" @current-change="handleChange"
ref="multipleTable" ref="multipleTable"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="最小销售产品标识" label="最小销售产品标识"
prop="nameCode" prop="nameCode"
width="140" width="140"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="产品编码" label="产品编码"
prop="thirdId" prop="thirdId"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="生产企业" label="生产企业"
prop="ylqxzcrbarmc" prop="ylqxzcrbarmc"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="产品通用名" label="产品通用名"
prop="cpmctymc" prop="cpmctymc"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="规格型号" label="规格型号"
prop="ggxh" prop="ggxh"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="注册/备案凭证" label="注册/备案凭证"
prop="zczbhhzbapzbh" prop="zczbhhzbapzbh"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="器械类别" label="器械类别"
prop="qxlb" prop="qxlb"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
:page-size="listQuery.limit" :page-size="listQuery.limit"
@current-change="handleErpPageChange" @current-change="handleErpPageChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="pageTotal" :total="pageTotal"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { import {
getStockOrderDetailInstrumentById, getStockOrderDetailInstrumentById,
stockOrderDetailFilterProduct stockOrderDetailFilterProduct
} from "../../api/inout/stockOrder"; } from "../../api/inout/stockOrder";
import store from "../../store"; import store from "../../store";
export default { export default {
name: "closeDialog", name: "closeDialog",
props: { props: {
data: { data: {
type: Object, type: Object,
required: true, required: true,
},
closeDialog: {
type: Function,
required: true,
},
}, },
closeDialog: {
type: Function,
required: true,
},
},
data() { data() {
return { return {
listQuery: { listQuery: {
billNo: "", billNo: "",
page: 1, page: 1,
limit: 10, limit: 10,
},
combineQuery: {
thirdId: "",
relId: "",
erpName: "",
keys: [],
},
dataList: [],
pageTotal: 1,
total: 1,
currentRow: null,
loading: false,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
busTypes: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
}, },
combineQuery: { },
thirdId: "", {
relId: "", text: "最近一个月",
erpName: "", onClick(picker) {
keys: [], const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
}, },
dataList: [], },
pageTotal: 1, {
total: 1, text: "最近三个月",
currentRow: null, onClick(picker) {
loading: false, const end = new Date();
multipleUdiSelection: [], const start = new Date();
thirdSys: [], start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
thirdSysFk: null, picker.$emit("pick", [start, end]);
busTypes: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
}, },
orderEditor: false, },
orderId: "", ],
}; },
orderEditor: false,
orderId: "",
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.listQuery = {
unionCode: null,
udiCode: null,
ylqxzcrbarmc: "",
cpmctymc: "",
thrPiId: null,
nameCode: "",
ggxh: null,
page: 1,
limit: 20,
addType: 1,
billType: this.data.formData.billType,
corpId: this.data.formData.corpId,
};
this.getList();
},
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
checkSelectable(row) {
return !row.check;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
handleChange(val) {
console.log(val);
this.currentRow = val;
},
handleErpPageChange(val) {
this.listQuery.page = val;
this.getList();
}, },
methods: { keyup_submit(event) {
onReset() { this.listQuery.page = 1;
this.$router.push({ this.getList();
path: "", event.target.select();
}); },
this.listQuery = { getList() {
unionCode: null, this.loading = true;
udiCode: null, this.listQuery.customerId = store.getters.customerId;
ylqxzcrbarmc: "", stockOrderDetailFilterProduct(this.listQuery)
cpmctymc: "", thrPiId: null, .then((response) => {
nameCode: "", console.log(response)
ggxh: null, this.loading = false;
page: 1, if (response.code === 20000) {
limit: 20, this.dataList = response.data.list || [];
addType: 1, this.pageTotal = response.data.total || 0;
}; } else {
this.getList(); this.$message.error(response.message);
}, this.dataList = [];
tableRowClassName({row}) { this.pageTotal = 0;
if (row.checked) return "warning-row";
return "";
},
checkSelectable(row) {
return !row.check;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
handleChange(val) {
console.log(val);
this.currentRow = val;
},
handleErpPageChange(val) {
this.listQuery.page = val;
this.getList();
},
keyup_submit(event) {
this.listQuery.page = 1;
this.getList();
event.target.select();
},
getList() {
this.loading = true;
this.listQuery.customerId = store.getters.customerId;
stockOrderDetailFilterProduct(this.listQuery)
.then((response) => {
console.log(response)
this.loading = false;
if (response.code === 20000) {
this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else {
this.$message.error(response.message);
this.dataList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
combine() {//012693548470801311200226172302271020022632100025
// if (this.$isBlank(this.currentRow.id)) {
// return;
// }
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
this.$message.error('未选择产品');
return;
} }
let ids = []; })
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
combine() {//012693548470801311200226172302271020022632100025
// if (this.$isBlank(this.currentRow.id)) {
// return;
// }
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
this.$message.error('未选择产品');
return;
}
let ids = [];
selection.forEach((obj, index) => { selection.forEach((obj, index) => {
console.log("obj:===" + obj + "==" + obj.relIdFk) console.log("obj:===" + obj + "==" + obj.relIdFk)
let data = { let data = {
relId: obj.rlId, relId: obj.rlId,
} }
ids.push(data); ids.push(data);
}); });
this.loading = true; this.loading = true;
let tQuery = { let tQuery = {
datas: ids, datas: ids,
stockOrderLists: this.data.stockOrderLists, stockOrderLists: this.data.stockOrderLists,
}; };
getStockOrderDetailInstrumentById(tQuery).then((response) => { getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog(response.data); this.closeDialog(response.data);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
// let tQuery = { // let tQuery = {
// id: this.currentRow.id // id: this.currentRow.id
// }; // };
// if (this.orderEditor) { // if (this.orderEditor) {
// tQuery.orderId = this.orderId; // tQuery.orderId = this.orderId;
// console.log(tQuery) // console.log(tQuery)
// addStockOrderDetailFromCodeById(tQuery).then((response) => { // addStockOrderDetailFromCodeById(tQuery).then((response) => {
// this.loading = false; // this.loading = false;
// if (response.code === 20000) { // if (response.code === 20000) {
// this.closeDialog(response); // this.closeDialog(response);
// } else { // } else {
// this.$message.error(response.message); // this.$message.error(response.message);
// } // }
// }).catch(() => { // }).catch(() => {
// this.loading = false; // this.loading = false;
// }); // });
// } else { // } else {
// getStockOrderDetailInstrumentById(tQuery).then((response) => { // getStockOrderDetailInstrumentById(tQuery).then((response) => {
// this.loading = false; // this.loading = false;
// if (response.code === 20000) { // if (response.code === 20000) {
// this.closeDialog(response.data); // this.closeDialog(response.data);
// } else { // } else {
// this.$message.error(response.message); // this.$message.error(response.message);
// } // }
// }).catch(() => { // }).catch(() => {
// this.loading = false; // this.loading = false;
// }); // });
// } // }
},
handleSelectionUdiChange(val) {
console.log("----" + val);
this.multipleUdiSelection = val;
},
}, },
created() { handleSelectionUdiChange(val) {
if (this.$isNotBlank(this.data)) { console.log("----" + val);
console.log(this.data.stockOrderLists); this.multipleUdiSelection = val;
this.listQuery.nameCode = this.data.udi;
this.listQuery.billType = this.data.formData.billType;
this.listQuery.corpId = this.data.formData.corpId;
this.orderEditor = this.data.orderEditor;
this.orderId = this.data.orderId;
this.getList();
}
}, },
},
created() {
if (this.$isNotBlank(this.data)) {
console.log(this.data.stockOrderLists);
this.listQuery.nameCode = this.data.udi;
this.listQuery.billType = this.data.formData.billType;
this.listQuery.corpId = this.data.formData.corpId;
this.orderEditor = this.data.orderEditor;
this.orderId = this.data.orderId;
this.getList();
}
},
}; };
</script> </script>
<style scoped> <style scoped>
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
div /deep/ .el-table .warning-row { div /deep/ .el-table .warning-row {
background: #bebebe; background: #bebebe;
} }
div /deep/ .el-table .success-row { div /deep/ .el-table .success-row {
background: #ffffff; background: #ffffff;
} }
</style> </style>

Loading…
Cancel
Save