定量相关调整

20231126-yw
anthonywj 1 year ago
parent b5c7b2897d
commit 744ef12f24

@ -5,7 +5,7 @@ VUE_APP_TITLE = UDI管理系统
ENV = 'development'
# 开发环境
VUE_APP_BASE_API = 'http://192.168.0.166:9991'
VUE_APP_BASE_API = 'http://127.0.0.1:9991'
VUE_APP_SYNC_API ="http://127.0.0.1:10001"

@ -9,7 +9,7 @@ ENV = 'production'
#林纪裕cd
# VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://www.linjiyu.lol:83/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://www.linjiyu.lol:83/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/'
@ -27,7 +27,7 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://192.168.0.61:9150/UDI_WMS_MC/'
刘恩典
VUE_APP_BASE_API = 'http://192.168.0.242:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://192.168.0.242:9150/UDI_WMS_MC/'
# 平潭正式
# VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'

@ -1,54 +1,65 @@
import axios from "@/utils/request";
export function filterCompanyProductRelevance(query) {
return axios(
{
url: "/sale/info/company/product/relevance/filter",
method: "get",
params: query
}
)
return axios(
{
url: "/sale/info/company/product/relevance/filter",
method: "get",
params: query
}
)
}
export function filterCompanyProductplanRelevance(query) {
return axios(
{
url: "/sale/info/company/product/plan/relevance/filter",
method: "get",
params: query
}
)
return axios(
{
url: "/sale/info/company/product/plan/relevance/filter",
method: "get",
params: query
}
)
}
export function filterCompanyProductRationRelevance(query) {
return axios(
{
url: "/company/product/plan/rationSet/filter",
method: "get",
params: query
}
)
}
export function insertFilter(query) {
return axios(
{
url: "/sale/info/insertFilter",
method: "post",
data: query
}
);
return axios(
{
url: "/sale/info/insertFilter",
method: "post",
data: query
}
);
}
export function insertCompanyProductRelevance(query) {
return axios(
{
url: "/sale/info/insertCompanyProductRelevance",
method: "post",
data: query
}
);
return axios(
{
url: "/sale/info/insertCompanyProductRelevance",
method: "post",
data: query
}
);
}
export function deleteCompanyProductRelevance(query) {
return axios(
{
url: "/sale/info/deleteCompanyProductRelevance",
method: "post",
data: query
}
);
return axios(
{
url: "/sale/info/deleteCompanyProductRelevance",
method: "post",
data: query
}
);
}

@ -0,0 +1,45 @@
import axios from "@/utils/request";
export function getSetList(params) {
return axios({
url: "/udiwms/inv/project/ration/filter",
method: "get",
params: params
});
}
export function addSet(data) {
return axios({
url: "/udiwms/inv/project/ration/add",
method: "post",
data: data
});
}
export function updateSet(data) {
return axios({
url: "/udiwms/inv/project/ration/edit",
method: "post",
data: data
});
}
export function deleteSet(data) {
return axios({
url: "/udiwms/inv/project/ration/remove",
method: "post",
data: data
});
}
export function genOrder(data) {
return axios({
url: "/udiwms/inv/project/ration/genOrder",
method: "post",
data: data
});
}

@ -360,5 +360,12 @@
padding:0px!important;
}
.order-el-row {
display: flex;
flex-wrap: wrap;
width: 100%;
margin-top: -10px
}

@ -563,6 +563,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -604,7 +605,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -627,7 +628,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -650,7 +651,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -673,7 +674,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -696,7 +697,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -718,7 +719,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -741,7 +742,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -763,6 +764,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
@ -784,6 +786,7 @@
<el-option label="有三期业务单配/拣货" :value="1"></el-option>
<el-option label="无三期业务单配/拣货" :value="2"></el-option>
<el-option label="有三期业务单校验" :value="3"></el-option>
<el-option label="业务单自动生成扫码单" :value="4"></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>

@ -33,6 +33,12 @@
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="价格"
prop="price"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="扫码数量"
prop="count"

@ -85,8 +85,6 @@
</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>
@ -100,32 +98,27 @@
<el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row
:row-class-name="tableRowClassName" @current-change="handleChange" :row-key="row=>row.id"
@selection-change="handleSelectionChange" ref="multipleTable">
<!--<el-table-column label width="45">-->
<!-- <template slot-scope="scope">-->
<!-- <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="最小销售产品标识" prop="nameCode" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方物资编码" prop="thirdId" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="器械类别" prop="qxlb" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="companyName" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方物资编码" prop="thirdId" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" width="160" prop="ylqxzcrbarmc"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="器械类别" prop="qxlb" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="companyName" width="160" show-overflow-tooltip></el-table-column>
<el-table-column
v-if="productRemarkSet.remarkEnable1"
:label="productRemarkSet.remarkTitle1" prop="basicPrductRemak1"
show-overflow-tooltip></el-table-column>
:label="productRemarkSet.remarkTitle1" prop="basicPrductRemak1" width="140"
show-overflow-tooltip></el-table-column>
<el-table-column
v-if="productRemarkSet.remarkEnable2"
:label="productRemarkSet.remarkTitle2" prop="basicPrductRemak2"
show-overflow-tooltip></el-table-column>
:label="productRemarkSet.remarkTitle2" prop="basicPrductRemak2" width="140"
show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="160">
<el-table-column label="操作" width="80" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="handleDetailClick(scope.row)">详情</el-button>
</template>
@ -175,11 +168,16 @@
</template>
<script>
import {filterCompanyProductplanRelevance, filterCompanyProductRelevance} from "../../../api/basic/udiRlSuptRelevance";
import {
filterCompanyProductplanRelevance,
filterCompanyProductRationRelevance,
filterCompanyProductRelevance
} from "../../../api/basic/udiRlSuptRelevance";
import {addApplyDetail, addApply} from "../../../api/purchase/purApply";
import store from "../../../store";
import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog";
import {finProductSet} from "@/api/param/systemParamConfig";
import {addSet} from "@/api/system/InvRationSet";
export default {
name: "stockOrderNewSelectProduct",
@ -204,6 +202,14 @@ export default {
type: Object,
required: true,
},
listType: {
type: Object,
required: true,
},
invCode: {
type: Object,
required: true,
},
},
data() {
@ -346,10 +352,17 @@ export default {
this.getList();
},
getList() {
if (this.listType == null)
this.getApplyList();
else {
this.getRationList();
}
},
getApplyList() {
this.loading = true;
this.listQuery.customerId = store.getters.customerId;
console.log("this.pId:")
console.log(this.pId)
this.listQuery.id = this.pId;
filterCompanyProductplanRelevance(this.listQuery)
.then((response) => {
@ -369,6 +382,27 @@ export default {
this.pageTotal = 0;
});
},
getRationList() {
this.loading = true;
filterCompanyProductRationRelevance(this.listQuery)
.then((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();
},
@ -392,29 +426,48 @@ export default {
this.$message.error('未选择产品');
return;
}
// if (this.ids.length > 0) {
// for (var i = 0; i < this.ids.length; i++) {
// if (this.ids[i] == this.multipleSelection.id) {
// this.$message.error("");
// return
// }
// }
// }
if (this.listType == null) {
this.puApplayAdd();
} else {
this.invRationAdd();
}
},
puApplayAdd() {
this.loading = true;
addApplyDetail(this.lists).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
// let str = this.multipleSelection.zczbhhzbapzbh;
// if (str.search(",") != -1) {
// this.currentCert = null;
// this.certList = str.split(',');
// this.dialogFormVisible = true;
// } else {
this.combine();
// }
},
combine() {
invRationAdd() {
this.loading = true;
addApplyDetail(this.lists).then((response) => {
let datas = [];
this.lists.forEach((item) => {
let dataItem = {
relId: item.productId,
supId: item.supId,
curInvCode: this.invCode,
}
datas.push(dataItem);
});
let query = {
rationEntities: datas
}
addSet(query).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
@ -432,6 +485,7 @@ export default {
},
selectCert() {
if (this.currentCert == null) {
this.$message.error("请先选择对应的注册证!");

@ -0,0 +1,538 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="18">
<el-form-item label="扫码查询:">
<el-input v-model="filterQuery.udiCode"
style="width: 97%"
placeholder="请扫描或输入UDI码"
clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row class="order-el-row">
<el-col :span="6">
<el-form-item label="当前仓库:">
<el-select v-model="filterQuery.curInvCode" placeholder="请选择当期仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
: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-col :span="6">
<el-form-item label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" placeholder="请输入DI/物资编码"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物资名称:">
<el-input v-model="filterQuery.cpmctymc" placeholder="请输入物资名称"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.ggxh" placeholder="请输入规格型号"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="请输入注册/备案号"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="生产企业:">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="请输入生产企业"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商名称:">
<el-select
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择供应商名称"
:remote-method="findMethod"
size="mini"
:loading="corpLoading"
@change="corpChange"
style="width: 90%"
@clear="getcorp"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<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="onSubmit">
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="onAddProduct">
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="buildOrder">
</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
:row-key="row=>row.id"
@selection-change="handleSelectionChange"
ref="multipleTable"
border>
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="仓库" prop="invName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="供应商" prop="supName" v-if="showSup" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="在库数量" prop="invCount" width="120">
</el-table-column>
<el-table-column label="定额数量" prop="rationCount" width="120"></el-table-column>
<el-table-column label="剩余数量" width="120">
<template slot-scope="scope">
<span>{{ scope.row.invCount - scope.row.rationCount }}</span>
</template>
</el-table-column>
<el-table-column label="计量单位" prop="measname" width="120"></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="180" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="invRemindSet(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="detailDialog(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
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<el-dialog
title="库存定量设置"
:visible.sync="addInvRemindSetDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="addInvRemindSetDialogVisible"
>
<editRaationSetDialog
:setFormDat="inputQuery"
:closeDialog="closeDetailDialog"
></editRaationSetDialog>
</el-dialog>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="80%"
v-if="selectProductVisible"
:append-to-body='true'
>
<purApplyProducts
:closeDialog="closeDetailDialog"
:invCode="filterQuery.curInvCode"
:listType="1"
></purApplyProducts>
</el-dialog>
</div>
</template>
<script>
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil";
import editRaationSetDialog from "@/views/system/ration/editRaationSetDialog.vue";
import addInvRemindSetDialog from "@/views/inventory/addInvRemindSetDialog.vue";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {selectUser} from "@/api/auth/authAdmin";
import purApplyProducts from "@/views/purchase/purApply/purOrderSelectProduct";
import {deleteSet, genOrder, getSetList} from "@/api/system/InvRationSet";
export default {
name: "InvProducts",
data() {
return {
showSearch: true,
filterQuery: {
nameCode: null,
cpmctymc: null,
ggxh: null,
batchNo: null,
supId: null,
zczbhhzbapzbh: null,
ylqxzcrbarmc: null,
curInvCode: this.$store.getters.locInvCode,
invSpaceCode: null,
page: 1,
limit: 10,
udiCode: null,
},
list: [],
total: 0,
invList: [],
loading: false,
deleteData: {
id: "",
status: 10,
},
mutlselecteds: [],
selectProductVisible: false,
dialogVisible: false,
corpLoading: false,
fromOptions: [],
showSup: false,
inputQuery: {
nameCode: null,
cpmctymc: null,
ggxh: null,
measname: null,
ylqxzcrbarmc: null,
zczbhhzbapzbh: null,
invCount: null,
rationCount: null,
scanType: null,
fromInvCode: null,
auditStatus: null,
busType: null,
busInvCode: null,
busAuditStatus: null,
remark: null,
},
addInvRemindSetDialogVisible: false,
invId: null,
spaceList: [],
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
nameCode: null,
cpmctymc: null,
ggxh: null,
supId: null,
zczbhhzbapzbh: null,
ylqxzcrbarmc: null,
curInvCode: null,
page: 1,
limit: 10,
};
this.getList();
this.findMethod();
},
keyup_submit(event) {
this.filterQuery.page = 1;
this.getList();
event.target.select();
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
getList() {
this.loading = true;
getSetList(this.filterQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
} else {
this.$message.error(res.message);
this.list = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
this.list = [];
this.total = 0;
})
},
getInvList() {
let query = {};
getInvListByUser(query)
.then((response) => {
this.invList = response.data || [];
this.getList();
this.getSpaceList();
})
.catch(() => {
});
},
findMethod(key) {
this.corpLoading = true;
this.fromOptions = [];
let params = {
key: key,
corpType: 2,
page: 1,
limit: 20
};
getBasicUnitMaintains(params).then((res) => {
this.corpLoading = false;
this.fromOptions = res.data.list || [];
}).catch(() => {
this.corpLoading = false;
});
},
corpChange(value) {
if (!isBlank(value)) {
this.findMethod(value);
}
},
getcorp() {
this.findMethod();
},
detailDialog(row) {
this.inputQuery = row;
this.addInvRemindSetDialogVisible = true;
},
onAddProduct() {
this.selectProductVisible = true;
},
buildOrder() {
if (this.mutlselecteds.length > 0) {
let query = {
rationEntities: this.mutlselecteds
}
genOrder(query).then((res) => {
if (res.code === 20000) {
this.$message.success("生成成功!");
this.getList();
this.mutlselecteds = [];
this.$refs.multipleTable.clearSelection();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
} else {
this.$message.warning("请选择要生成单据产品");
}
},
closeDetailDialog() {
this.addInvRemindSetDialogVisible = false;
this.selectProductVisible = false;
this.getList();
},
deleteDialog(row) {
this.$confirm("此操作将永久删除此配置信息,是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.deleteRationSet(row.id);
}).catch(() => {
});
},
deleteRationSet(id) {
let params = {id: id};
deleteSet(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功!");
this.getList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
},
invRemindSet(row) {
this.inputQuery = {
id: row.id,
relId: row.relId,
supId: row.supId,
curInvCode: row.curInvCode,
lyInvCode: row.lyInvCode,
sgInvCode: row.sgInvCode,
jhInvCode: row.jhInvCode,
cgInvCode: row.cgInvCode,
invName: row.invName,
supName: row.supName,
nameCode: row.nameCode,
cpmctymc: row.cpmctymc,
ggxh: row.ggxh,
measname: row.measname,
ylqxzcrbarmc: row.ylqxzcrbarmc,
zczbhhzbapzbh: row.zczbhhzbapzbh,
invCount: row.invCount,
rationCount: row.rationCount,
scanType: row.scanType,
fromInvCode: row.fromInvCode,
auditStatus: row.auditStatus == null ? 1 : row.auditStatus,
busType: row.busType,
busInvCode: row.busInvCode,
busAuditStatus: row.busAuditStatus == null ? 1 : row.busAuditStatus,
remark: row.remark,
}
this.addInvRemindSetDialogVisible = true;
},
closeRemindSetDialog() {
this.invId = null;
this.addInvRemindSetDialogVisible = false;
},
getSpaceList() {
if (isBlank(this.filterQuery.curInvCode)) {
return;
}
let params = {
invWarehouseCode: this.filterQuery.curInvCode,
status: 1
};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
})
},
querySearchAsync(queryString, cb) {
let restaurants = this.spaceList;
restaurants.forEach((item) => {
item.value = item.name;
})
let results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
if (!isBlank(queryString)) {
this.spaceSearchResult = results;
}
cb(results);
},
invChange() {
this.getSpaceList();
},
handleSelectionChange(val) {
this.mutlselecteds = val;
console.log(this.mutlselecteds)
},
},
components: {
purApplyProducts,
editRaationSetDialog,
addInvRemindSetDialog
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.filterQuery.curInvCode = this.$store.getters.locInvCode
selectUser().then((res) => {
let supId = res.data.customerId
if (supId == "110") {
this.showSup = true;
}
}).catch(() => {
this.corpLoading = false;
});
this.findMethod();
this.getInvList();
this.getList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>

@ -0,0 +1,474 @@
<template>
<el-card style="margin: 5px;margin-top: -15px">
<el-form
:model="setFormDat"
:rules="formRules"
ref="dataForm"
label-width="110px"
style="margin-bottom: -15px;margin-top: 15px"
>
<el-row class="order-el-row">
<el-col :span="11">
<el-form-item prop="invName" label="当前仓库:">
<el-input
v-model="setFormDat.invName"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="nameCode" label="DI/物资编码:">
<el-input
v-model="setFormDat.nameCode"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="cpmctymc" label="物资名称:">
<el-input
v-model="setFormDat.cpmctymc"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="ggxh" label="规格型号:">
<el-input
v-model="setFormDat.ggxh"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="measname" label="计量单位:">
<el-input
v-model="setFormDat.measname"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="ylqxzcrbarmc" label="生产企业:">
<el-input
v-model="setFormDat.ylqxzcrbarmc"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="zczbhhzbapzbh" label="注册/备案号:">
<el-input
v-model="setFormDat.zczbhhzbapzbh"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="invCount" label="在库数量:">
<el-input
v-model="setFormDat.invCount"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="rationCount" label="定额数量:">
<el-input
v-model="setFormDat.rationCount"
auto-complete="off"
style="width: 90%"
type="number"
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
<div style="margin-top: 12px">
<el-divider content-position="left">生成出入库单</el-divider>
<el-row class="order-el-row" style="margin-top: 20px">
<el-col :span="11">
<el-form-item prop="action" label="单据类型:">
<el-select
v-model="setFormDat.scanType"
placeholder="请选择单据类型"
style="width: 90%"
filterable
clearable
@change="actionChange"
>
<el-option
v-for="item in busTypeOptions"
:key="item.name"
:label="item.name"
:value="item.action"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11"
v-if="curAction.corpType == 3"
>
<!-- <el-form-item-->
<!-- prop="fromCorp"-->
<!-- label="供应商:"-->
<!-- v-if="-->
<!-- curAction.corpType === 0 ||-->
<!-- curAction.corpType === 2 ||-->
<!-- curAction.corpType === 4 ||-->
<!-- (curAction.corpType === 1 && !curAction.genUnit)-->
<!-- "-->
<!-- >-->
<!-- <el-select-->
<!-- v-model="setFormDat.fromCorp"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable-->
<!-- reserve-keyword-->
<!-- style="width: 90%"-->
<!-- placeholder="请输入往来信息"-->
<!-- :remote-method="findMethod"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in fromOptions"-->
<!-- :key="item.erpId"-->
<!-- :label="item.name"-->
<!-- :value="item.erpId"-->
<!-- >-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item
prop="fromCorp"
label="往来仓库:"
>
<el-select
v-model="setFormDat.fromInvCode"
placeholder="请选择往来仓库"
filterable
clearable
style="width: 90%"
>
<el-option
v-for="item in fromInvOptions"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="审核状态" prop="auditStatus">
<el-radio-group v-model="setFormDat.auditStatus">
<el-radio :label="1">草稿</el-radio>
<el-radio :label="2">已提交</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</div>
<div style="margin-top: 12px">
<el-divider content-position="left">生成业务单</el-divider>
<el-row class="order-el-row" style="margin-top: 20px">
<el-col :span="11">
<el-form-item label="目标业务单">
<el-select v-model="setFormDat.busType" placeholder="目标业务单" clearable size="small"
@change="busActionChange"
style="width: 90%">
<el-option
v-for="item in targetBusTypes"
:key="item.originAction"
:label="item.originName"
:value="item.originAction">
<span> {{ item.originName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="invTitle">
<el-select v-model="setFormDat.busInvCode" :placeholder="invTitle" clearable size="small"
style="width: 90%">
<el-option
v-for="item in busInvs"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span> {{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="审核状态" prop="busAuditStatus">
<el-radio-group v-model="setFormDat.busAuditStatus">
<el-radio :label="1">草稿</el-radio>
<el-radio :label="2">待审核</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="11">
<el-form-item prop="remark" label="备注:">
<el-input
v-model="setFormDat.remark"
auto-complete="off"
clearable
type="textarea"
style="width: 90%"
placeholder="请输入备注信息"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button type="primary" @click="saveSet"></el-button>
<el-button type="primary" @click="closeDialog"></el-button>
</div>
</el-card>
</template>
<script>
import {updateSet} from "@/api/system/InvRationSet";
import {getBusTypeChangeList} from "@/api/basic/busTypeChange";
import {findChangeTarget} from "@/api/basic/busType";
import {filterGroupBySpuse, filterSubAll} from "@/api/system/invSubWarehouse";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil";
export default {
name: "editRaationSetDialog",
props: {
closeDialog: {
type: Function,
required: true,
},
setFormDat: {
type: Function,
required: true,
},
},
data() {
return {
targetBusTypes: [],
busInvs: [],
busTypeOptions: [],
curAction: {},
fromInvOptions: [],
fromOptions: [],
invTitle: "仓库",
formRules: {
rationCount: [
{required: true, message: "请输入定额数量", trigger: "blur"},
],
},
loading: false,
}
},
components: {},
methods: {
saveSet() {
let data = Object.assign(
JSON.parse(JSON.stringify(this.setFormDat))
);
if (!isBlank(this.setFormDat.busType) && isBlank(this.setFormDat.busInvCode)) {
this.$message.warning("请选择" + this.invTitle + "!");
return;
}
updateSet(data).then((response) => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
}
this.loading = false;
});
},
getTargetChangeType() {
let query = {
enable: true
};
getBusTypeChangeList(query).then((res) => {
if (res.code === 20000) {
this.targetBusTypes = res.data.list || [];
}
})
},
getTargetScanType() {
let query = {
enable: true,
mainAction: "WareHouseIn"
};
findChangeTarget(query).then((res) => {
if (res.code === 20000) {
this.busTypeOptions = res.data.list || [];
}
})
},
actionChange(row) {
if (!isBlank(row)) {
this.curAction = this.busTypeOptions.filter(item => item.action === row)[0];
if (this.curAction.corpType === 3) {
//
this.getSubInvList();
}
}
},
busActionChange(row) {
this.setFormDat.busInvCode = "";
switch (row) {
case "HCLY":
this.invTitle = "领用仓库";
this.getBusInv();
break;
case "CPSG":
this.getBusInv();
this.invTitle = "采购仓库";
break;
case "CGJH":
this.getBusInv();
this.invTitle = "采购仓库";
break;
case "CGDD":
this.getBusInv();
this.invTitle = "采购仓库";
break;
default:
this.invTitle = "仓库";
}
},
getBusInv() {
var query = {
spUse: true,
}
filterGroupBySpuse(query).then((res) => {
this.busInvs = res.data || [];
// this.setFormDat.busInvCode = this.busInvs [0];
})
},
getSubInvList() {
let query = {
filter: 3,
};
filterSubAll(query)
.then((response) => {
this.fromInvOptions = response.data || [];
this.getList();
})
.catch(() => {
});
},
//
findMethod(query) {
this.fromOptions = [];
let cQuery = {
key: query,
corpType: null,
outType: null,
page: 1,
limit: 20,
};
if (this.curAction.corpType == 3) {
//
cQuery.corpType = 3;
} else if (this.curAction.corpType == 2) {
//
cQuery.corpType = 2;
} else if (this.curAction.corpType == 0) {
cQuery.corpType = 2;
} else if (this.curAction.corpType == 1) {
cQuery.corpType = 1;
cQuery.outType = 2;
} else if (this.curAction.corpType == 4) {
//
cQuery.corpType = 4;
} else
return;
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
},
created() {
this.getTargetChangeType();
this.getTargetScanType();
this.getBusInv();
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save