Merge remote-tracking branch 'origin/master'

prod
anthonywj 2 years ago
commit 5d4428ae65

@ -7,3 +7,38 @@ export function getList(query) {
params: query
});
}
export function getDelectList(query) {
return axios({
url: "/udi/ioCode/Rel/delectList",
method: "get",
params: query
});
}
export function delIoCodeRel(query) {
return axios({
url: "/udi/ioCode/Rel/del",
method: "get",
params: query
});
}
export function checkUpProduct(query) {
return axios({
url: "/udi/ioCode/Rel/checkUpProduct",
method: "get",
params: query,
});
}
export function checkLowProduct(query) {
return axios({
url: "/udi/ioCode/Rel/checkLowProduct",
method: "get",
params: query,
});
}

@ -3,15 +3,16 @@
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="10">
<el-form-item label="udi">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入udi" clearable></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="10">-->
<!-- <el-form-item label="udi">-->
<!-- <el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入udi" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="10">
<el-form-item label="产品编码">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入产品编码" clearable></el-input>
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入产品编码"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
@ -25,7 +26,8 @@
<el-col :span="10">
<el-form-item label="产品名称">
<el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入产品名称" clearable></el-input>
<el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入产品名称"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
@ -43,10 +45,12 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border
highlight-current-row>
<el-table v-loading="loading" :data="list" border highlight-current-row
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
style="width: 100%" row-key="id" >
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="UDI码" prop="code"></el-table-column>
<el-table-column label="上级编码" prop="parentCode"></el-table-column>
<el-table-column label="产品编码" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
@ -90,8 +94,9 @@
</div>
</template>
<script>
import {getList} from "@/api/inout/ioCodeRel";
import {delIoCodeRel, getList} from "@/api/inout/ioCodeRel";
import ioCodeRelEdit from "@/views/inout/codeRel/ioCodeRelEdit"
import Treeselect from "@riophae/vue-treeselect";
export default {
data() {
@ -109,12 +114,13 @@ export default {
type: 1,
editStatus: 1,
},
idQuery:null,
formName:null,
loading:false,
list:[],
formData:null,
total:0,
isExpandAll: true,
idQuery: null,
formName: null,
loading: false,
list: [],
formData: null,
total: 0,
pickerOptions: {
shortcuts: [
{
@ -179,9 +185,9 @@ export default {
},
newDistributionForm(index, row) {
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.idQuery = row;
this.formName = "编辑";
this.newSpDistributionVisible = true;
} else {
this.formName = "新增";
this.newSpDistributionVisible = true;
@ -192,14 +198,20 @@ export default {
this.getList();
this.detailList = [];
},
deleteDialog(row) {
delIoCodeRel({parentCode:row.parentCode})
.then((response) => {
if (response.code == 20000) {
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
getList(this.filterQuery)
.then((response) => {
@ -217,32 +229,20 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
},
components: {
ioCodeRelEdit
ioCodeRelEdit,
Treeselect,
},
filters: {},
mounted() {
}
,
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getList();
}
,

@ -6,7 +6,8 @@
<el-row>
<el-col :span="10">
<el-form-item label="上级产品">
<el-input v-model="filterQuery.code" style="width: 90%" placeholder="请输入多级产品" clearable></el-input>
<el-input v-model="filterQuery.upProduct " :disabled="isUp" style="width: 90%" placeholder="请输入多级产品" clearable></el-input>
<el-button style="margin-left: 10px" :disabled="isUp" type="primary" @click="addUpProduct()"></el-button>
</el-form-item>
</el-col>
</el-row>
@ -14,40 +15,24 @@
<el-row>
<el-col :span="10">
<el-form-item label="下级产品">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入下级产品" clearable></el-input>
<el-input v-model="filterQuery.lowProduct" style="width: 90%" placeholder="请输入下级产品" clearable></el-input>
<el-button style="margin-left: 10px" :disabled="isLow" type="primary" @click="addLowProduct()"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <div class="top-right-btn">-->
<!-- <el-button-group style="display:flex;">-->
<!-- <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>-->
<!-- <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"></el-button>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增-->
<!-- </el-button>-->
<!-- </el-button-group>-->
<!-- </div>-->
<!-- <el-divider style="margin: 15px"></el-divider>-->
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border
highlight-current-row>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="UDI码" prop="code"></el-table-column>
<el-table-column label="产品编码" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="序列号" prop="serialNo"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
<el-table-column label="计量单位" prop="measname"></el-table-column>
<el-table-column label="创建时间" prop="createTime"></el-table-column>
<el-table-column label="操作" width="120px">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -56,84 +41,43 @@
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="handleCurrentChange"
></pagination>
<el-dialog
:title="formName"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<ioCodeRelEdit
:closeDialog="closeDialog"
:formData="formData"
></ioCodeRelEdit>
</el-dialog>
</el-card>
</div>
</template>
<script>
import {getList} from "@/api/inout/ioCodeRel";
import {checkLowProduct, checkUpProduct, getDelectList, getList} from "@/api/inout/ioCodeRel";
import ioCodeRelEdit from "@/views"
export default {
props: {
closeDialog: {
type: Function,
required: true,
},
idQuery: {
type: Object,
required: true,
},
},
data() {
return {
showSearch: true,
newSpDistributionVisible: false,
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
upProduct:'',
lowProduct:'',
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
},
isLow:true,
isUp:false,
upCode:null,
formName:null,
loading:false,
list:[],
formData:null,
total:0,
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]);
},
},
],
},
};
},
@ -143,53 +87,20 @@ export default {
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
};
this.actDateRange = [];
this.getList();
},
onSubmitFind() {
this.filterQuery.page = 1;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
this.formName = "编辑";
} else
this.formName = "新增";
this.newSpDistributionVisible = true;
},
closeDialog() {
this.newSpDistributionVisible = false;
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
this.detailList = [];
},
getList() {
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
if (this.filterQuery.upProduct!=null){
this.filterQuery.parentCode=this.filterQuery.upProduct
}
this.loading = true;
getList(this.filterQuery)
getDelectList(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
@ -205,18 +116,28 @@ export default {
this.total = 0;
});
},
handleDetail(row) {
let query = {orderIdFk: row.id};
this.loading = true;
listApplyDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
addUpProduct(){
checkUpProduct({code:this.filterQuery.upProduct}).then((res)=>{
if(res.code==20000){
this.isLow=false;
this.isUp=true;
}else{
this.$message.error(res.message);
}
}).catch(()=>{
this.$message.error("扫码错误!");
})
},
addLowProduct(){
checkLowProduct({lowCode:this.filterQuery.lowProduct,upCode:this.filterQuery.upProduct}).then((res)=>{
if(res.code==20000){
this.getList();
}else{
this.$message.error(res.message);
}
}).catch(()=>{
this.$message.error("扫码错误!");
})
},
},
components: {},
@ -225,11 +146,13 @@ export default {
}
,
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getList();
if(this.idQuery.id!=null){
this.filterQuery.upProduct=this.idQuery.parentCode
this.isLow=false;
this.isUp=true;
this.getList();
}
}
,
}

@ -54,10 +54,9 @@
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="formData.fromInvCode" placeholder="领用仓库信息"
<el-form-item class="query-form-item" label="出库仓库:">
<el-select v-model="formData.fromInvCode" placeholder="出库仓库信息"
:disabled="detailList.length >0 "
@change="invChange"
style="width: 90%"
clearable>
<el-option
@ -74,7 +73,7 @@
</el-row>
<el-row>
<el-col :span="10">
<!-- <el-col :span="10">
<el-form-item class="query-form-item" label="领用货位:">
<el-select v-model="formData.fromInvSpaceCode" placeholder="领用货位信息"
:disabled="detailList.length >0 "
@ -90,7 +89,7 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="10">
<el-form-item class="query-form-item" label="领用人:">
@ -146,7 +145,7 @@
highlight-current-row
border max-height="300" height="300">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="条码" width="180" prop="originCode" show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="条码" width="180" prop="originCode" show-overflow-tooltip></el-table-column>-->
<el-table-column width="150"
label="产品通用名"
prop="productName"
@ -154,18 +153,15 @@
></el-table-column>
<el-table-column width="150" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="150" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="150" label="序列号" prop="serialNo">
<template slot-scope="scope">
<el-input :disabled="scope.$index != currentIndex" v-model="scope.row.serialNo"></el-input>
</template>
</el-table-column>
<el-table-column width="150" label="序列号" prop="serialNo"></el-table-column>
<el-table-column label="生产日期(yyMMdd)" prop="productionDate"></el-table-column>
<el-table-column label="失效日期(yyMMdd)" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
<!-- <el-button
type="text"
size="small"
v-if="scope.row.serialNo === null"
@ -181,7 +177,7 @@
@click.native="updateOrderDetail(scope.row)"
>保存
</el-button
>
>-->
<el-button
type="text"
size="small"
@ -223,7 +219,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="invSpaceCode">
<!-- <el-form-item class="query-form-item" prop="invSpaceCode">
<el-select v-model="filterQuery.invSpaceCode" placeholder="领用货位信息"
:disabled="true"
clearable>
@ -235,7 +231,7 @@
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form-item>-->
<el-form-item class="query-form-item" label="产品标识DI:">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI" clearable></el-input>
</el-form-item>
@ -275,6 +271,7 @@
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="供应商" prop="supName" width="120"></el-table-column>
</el-table>
<pagination
@ -373,8 +370,10 @@ export default {
//
this.formData.fromInvCode = null;
this.formData.fromInvSpaceCode = null;
this.formData.receiveUser = null;
this.invList = [];
this.spaceList = [];
this.userList = [];
this.getInvList();
//
@ -382,7 +381,12 @@ export default {
},
getDeptUserList() {
this.userList = [];
let params = {deptId: this.formData.fromDeptCode};
let params = {deptId: null};
this.deptList.forEach((item) => {
if (item.code === this.formData.fromDeptCode) {
params.deptId = item.id;
}
});
listDeptUser(params).then((res) => {
this.userList = res.data.list || [];
})
@ -425,7 +429,7 @@ export default {
this.onReset();
this.selectInvProductVisible = true;
this.filterQuery.invCode = this.formData.fromInvCode;
this.filterQuery.invSpaceCode = this.formData.fromInvSpaceCode;
// this.filterQuery.invSpaceCode = this.formData.fromInvSpaceCode;
},
saveMAOrder() {
this.saveOrder();
@ -499,8 +503,6 @@ export default {
return "请选择领用部门!";
} else if (isBlank(this.formData.fromInvCode)) {
return "请选择领用仓库!";
} else if (isBlank(this.formData.fromInvSpaceCode)) {
return "请选择领用货位!";
} else if (isBlank(this.formData.receiveUser)) {
return "请选择领用人!";
}
@ -614,7 +616,7 @@ export default {
},
queryInvProducts() {
this.filterQuery.invCode = this.formData.fromInvCode;
this.filterQuery.invSpaceCode = this.formData.fromInvSpaceCode;
// this.filterQuery.invSpaceCode = this.formData.fromInvSpaceCode;
getInvMAProducts(this.filterQuery).then((res) => {
if (res.code === 20000) {
this.productList = res.data.list || [];

@ -19,9 +19,8 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" label="领用仓库:">
<el-form-item class="query-form-item" label="出库仓库:">
<el-select v-model="filterQuery.fromInvCode" placeholder="请选择仓库" clearable="true"
@change="invChange"
>
<el-option
v-for="item in invList"
@ -32,7 +31,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" label="领用货位:">
<!--<el-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.fromInvSpaceCode" placeholder="请选择货位" clearable="true"
>
<el-option
@ -43,7 +42,7 @@
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form-item>-->
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
@ -58,7 +57,7 @@
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="设备领用记录号" prop="orderId"></el-table-column>
<el-table-column label="领用部门" prop="fromDeptName"></el-table-column>
<el-table-column label="领用仓库" prop="fromInvName"></el-table-column>
<el-table-column label="出库仓库" prop="fromInvName"></el-table-column>
<el-table-column label="领用货位" prop="fromInvSpaceName"></el-table-column>
<el-table-column label="领用日期" prop="createTime"></el-table-column>
<el-table-column label="领用人" prop="receiveUserName"></el-table-column>

@ -31,11 +31,11 @@ module.exports = {
devServer: {
host: '0.0.0.0',
port: port,
open: true,
open: false,
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.166:9991`,
target: `http://192.168.0.180:9991`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save