修改一二级程度bug

zhairh
郑明梁 3 years ago
parent ba166ea6bc
commit 617b728178

@ -35,7 +35,7 @@
<el-select v-model="inputQuery.action" placeholder="请选择" clearable> <el-select v-model="inputQuery.action" placeholder="请选择" clearable>
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.localAction" :key="item.action"
:label="item.name" :label="item.name"
:value="item.localAction"> :value="item.localAction">
<span style="float: left">{{ item.localName }}</span> <span style="float: left">{{ item.localName }}</span>
@ -167,7 +167,6 @@ export default {
action: [ action: [
{required: true, message: "请输入扫码单据类型", trigger: "blur"} {required: true, message: "请输入扫码单据类型", trigger: "blur"}
], ],
entrustInv: [ entrustInv: [
{required: true, message: "请输入委托验收人仓库", trigger: "blur"} {required: true, message: "请输入委托验收人仓库", trigger: "blur"}
], ],
@ -199,17 +198,6 @@ export default {
this.localTypes = []; this.localTypes = [];
}); });
}, },
getStorage() {
this.storageList = [];
filterAll()
.then((response) => {
this.storageList = response.data || [];
this.findSubInvByInv();
this.getEntrustStorage();
})
.catch(() => {
});
},
findSubInvByInv() { findSubInvByInv() {
this.subInvList = []; this.subInvList = [];
@ -227,36 +215,21 @@ export default {
}, },
findEntrustSubInvByInv() { findEntrustSubInvByInv(code) {
this.entrustSubInvList = []; this.entrustSubInvList = [];
let query = { let query = {
code: this.inputQuery.invWarehouseCode, code: this.inputQuery.invWarehouseCode,
}; };
filterSub(query) filterSub(query)
.then((response) => { .then((response) => {
this.entrustSubInvList = response.data || []; this.entrustSubInvList = response.data || [];
this.entrustSubInvChange(); this.entrustSubInvChange(code);
}) })
.catch(() => { .catch(() => {
}); });
}, },
getEntrustStorage() {
this.entrustStorageList = [];
let nextQuery = {pcode: this.inputQuery.curInv};
filterNext(nextQuery)
.then((response) => {
this.entrustStorageList = response.data || [];
this.findEntrustSubInvByInv();
})
.catch(() => {
});
},
getOrderType() { getOrderType() {
let query = { let query = {
locSubInvCode: this.inputQuery.invWarehouseCode locSubInvCode: this.inputQuery.invWarehouseCode
} }
@ -266,30 +239,24 @@ export default {
}) })
}, },
invChange() {
this.findSubInvByInv();
this.inputQuery.invWarehouseCode = null;
this.$set(this.inputQuery, "entrustUser", "");
this.$set(this.inputQuery, "entrustInv", "");
this.getEntrustStorage();
},
subInvChange() { subInvChange() {
this.getOrderType(); this.getOrderType();
}, },
entrustInvChange(code) {
entrustInvChange() { this.inputQuery.curInv= this.subInvList.find(item => item.code == code).parentId
this.inputQuery.entrustSubInv = null; this.$set(this.inputQuery, "action", "");
this.$set(this.inputQuery, "entrustSubInv", "");
this.getOrderType();
this.findEntrustSubInvByInv(); this.findEntrustSubInvByInv();
}, },
entrustSubInvChange() { entrustSubInvChange(code) {
this.inputQuery.entrustInv= this.entrustSubInvList.find(item => item.code == code).parentId
let query = { let query = {
code: this.inputQuery.entrustSubInv, code: this.inputQuery.entrustSubInv,
} }
// //
warehouseUserList(query).then((res) => { warehouseUserList(query).then((res) => {
this.entrustUserArray = []; this.entrustUserArray = [];
@ -316,9 +283,11 @@ export default {
created() { created() {
this.findSubInvByInv();
if(this.inputQuery.entrustSubInv!=null && this.inputQuery.entrustSubInv!=undefined){
this.findEntrustSubInvByInv(this.inputQuery.entrustSubInv);
}
this.getList();
this.getStorage();
// if (this.$isNotBlank(this.inputQuery.entrustInv)) { // if (this.$isNotBlank(this.inputQuery.entrustInv)) {
// this.findEntrustSubInvByInv(); // this.findEntrustSubInvByInv();

@ -1074,7 +1074,7 @@ export default {
thirdId: row.thirdId, thirdId: row.thirdId,
isUseDy: row.isUseDy, isUseDy: row.isUseDy,
}; };
this.checked = row.isUseDy == 1;
let ttquery = { let ttquery = {
uuid: row.uuid, uuid: row.uuid,

@ -188,7 +188,8 @@ export default {
this.loading = true; this.loading = true;
this.query.orderIdFk = this.idQuery.orderIdFk; this.query.orderIdFk = this.idQuery.orderIdFk;
let query = { let query = {
orderIdFk: this.idQuery.orderIdFk orderIdFk: this.idQuery.orderIdFk,
code:this.query.code
} }
/* this.query.batchNo = this.idQuery.batchNo; /* this.query.batchNo = this.idQuery.batchNo;
this.query.supId = this.idQuery.supId; this.query.supId = this.idQuery.supId;

@ -196,18 +196,18 @@
v-if="selectProductVisible" v-if="selectProductVisible"
:append-to-body='true' :append-to-body='true'
> >
<stockOrderNewSelectProduct <purPlanOrderSelectProduct
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:data="thisData" :data="thisData"
:purType="1" :purType="1"
></stockOrderNewSelectProduct> ></purPlanOrderSelectProduct>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import stockOrderNewSelectProduct from "../warehouse/stockOrderNewSelectProduct"; import purPlanOrderSelectProduct from "../purchase/purPlanOrderSelectProduct";
import {inserThrOrderWeb, delApplyDetail, listApplyDetail} from "@/api/purchase/purApply"; import {inserThrOrderWeb, delApplyDetail, listApplyDetail} from "@/api/purchase/purApply";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse"; import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -277,7 +277,7 @@ export default {
}, },
components: { components: {
draggable, draggable,
stockOrderNewSelectProduct, purPlanOrderSelectProduct,
}, },
methods: { methods: {
saveOrder(status) { saveOrder(status) {

@ -84,7 +84,7 @@
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="locStorageCode"> <el-form-item prop="locStorageCode">
<el-select v-model="formData.invWarehouseCode" auto-complete="" @change="setLocStorageCode" filterable placeholder="采购库信息" style="width: 100%" <el-select v-model="formData.invWarehouseCode" auto-complete="" @change="setLocStorageCode" filterable placeholder="采购库信息" style="width: 100%"
clearable> clearable>
<el-option <el-option
v-for="item in subInvList" v-for="item in subInvList"
@ -98,10 +98,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<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>
@ -112,7 +108,9 @@
<el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input> <el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3" v-show="formData.status==4"> <el-col :span="3" v-show="formData.status==4">
<div class="ao-text"> <div class="ao-text">
<span>拒绝原因</span> <span>拒绝原因</span>
@ -241,11 +239,11 @@
v-if="selectProductVisible" v-if="selectProductVisible"
:append-to-body='true' :append-to-body='true'
> >
<stockOrderNewSelectProduct <purPlanOrderSelectProduct
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:purType="1" :purType="1"
:data="thisData" :data="thisData"
></stockOrderNewSelectProduct> ></purPlanOrderSelectProduct>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
@ -268,7 +266,7 @@
<script> <script>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import stockOrderNewSelectProduct from "../warehouse/stockOrderNewSelectProduct"; import purPlanOrderSelectProduct from "../purchase/purPlanOrderSelectProduct";
import {inserThrOrderWeb, delApplyDetail, listApplyDetail} from "@/api/purchase/purPlan"; import {inserThrOrderWeb, delApplyDetail, listApplyDetail} from "@/api/purchase/purPlan";
import {filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse"; import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -342,7 +340,7 @@ export default {
components: { components: {
SelectApplyListDialog, SelectApplyListDialog,
draggable, draggable,
stockOrderNewSelectProduct, purPlanOrderSelectProduct,
}, },
methods: { methods: {
saveOrder(status) { saveOrder(status) {
@ -415,7 +413,7 @@ export default {
this.selectProductVisible = true; this.selectProductVisible = true;
}, },
setLocStorageCode(obj){ setLocStorageCode(obj){
 this.formData.locStorageCode= this.subInvList.find(item => item.code == obj).parentId; this.formData.locStorageCode= this.subInvList.find(item => item.code == obj).parentId;
}, },
selectApply() { selectApply() {

@ -0,0 +1,447 @@
<template>
<div>
<el-card class="el-card">
<div>
<el-form :inline="true" :model="listQuery" size="mini">
<el-row style="margin-top: 15px;width: 1000px">
<el-form-item class="query-form-item">
<el-input v-model="listQuery.udiCode"
style="width: 600px"
placeholder="请扫描或输入UDI码"
clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input>
</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="search"></el-button>
<el-button type="primary" icon="search" @click="confirmSelect"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
:data="dataList"
style="width: 100%"
highlight-current-row="false"
v-loading="loading"
:row-class-name="tableRowClassName"
@current-change="handleChange"
ref="multipleTable"
>
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<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 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"
show-overflow-tooltip
></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="操作" fixed="right" width="160">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleDetailClick(scope.row)"
>详情
</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-dialog
title="耗材字典详情"
:visible.sync="udiRlDetailVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="udiRlDetailVisible"
>
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog>
</el-dialog>
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form">
<el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert">
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getStockOrderDetailInstrumentById,
stockOrderDetailFilterProduct
} from "../../api/warehouse/stockOrder";
import store from "../../store";
import udiRlDetailDialog from "./../basic/UdiRlDetailDialog";
export default {
name: "stockOrderNewSelectProduct",
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
purType: {
type: Object,
required: true,
},
},
data() {
return {
listQuery: {
udiCode: "",
unionCode: "",
cpmctymc: "",
ggxh: "",
ylqxzcrbarmc: "",
thrPiId: "",
page: 1,
limit: 10,
},
combineQuery: {
thirdId: "",
relId: "",
erpName: "",
keys: [],
},
ids: [],
radioCheck: null,
dataList: [],
pageTotal: 1,
total: 1,
currentRow: null,
loading: false,
udiRlDetailVisible: false,
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]);
},
},
{
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: "",
currentCert: null,
certList: [],
dialogFormVisible: false,
multipleSelection: null,
};
},
methods: {
onReset() {
// this.$router.push({
// path: "",
// });
this.listQuery = {
udiCode: "",
unionCode: "",
cpmctymc: "",
ggxh: "",
ylqxzcrbarmc: "",
thrPiId: "",
page: 1,
limit: 10,
},
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) {
this.radioCheck = val.id;
this.currentRow = val;
this.multipleSelection = val
},
handleDetailClick(row) {
this.currentRow = row;
this.udiRlDetailVisible = true;
},
handleErpPageChange(val) {
this.listQuery.page = val;
this.getList();
},
keyup_submit(event) {
this.listQuery.page = 1;
this.getList();
event.target.select();
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.listQuery.customerId = store.getters.customerId;
if(this.listQuery.customerId==110 && this.data.formData!=null && this.data.formData!=undefined){
this.listQuery.companyName=this.data.formData.corpName
}
if(this.listQuery.customerId!=110 && this.data!=null && this.data!=undefined){
this.listQuery.companyName=this.data.corpName
}
stockOrderDetailFilterProduct(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();
},
confirmSelect() {
if (this.multipleSelection == null) {
this.$message.error('未选择产品');
return;
}
if (this.ids.length > 0) {
for (var i = 0; i < this.ids.length; i++) {
if (this.ids[i] == this.multipleSelection.rlId) {
this.$message.error("该产品已录入!");
return
}
}
}
let str = this.multipleSelection.zczbhhzbapzbh;
if (str.search(",") != -1) {
this.currentCert = null;
this.certList = str.split(',');
this.dialogFormVisible = true;
} else {
this.combine();
}
},
combine() {
let ids = [];
let data = {
relId: this.multipleSelection.rlId,
supId: this.multipleSelection.customerId,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh,
}
ids.push(data);
this.loading = true;
let tQuery = {
datas: ids,
stockOrderLists: this.data.stockOrderLists,
purType: this.purType
};
getStockOrderDetailInstrumentById(tQuery).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;
});
},
selectCert() {
if (this.currentCert == null) {
this.$message.error("请先选择对应的注册证!");
} else {
this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine();
}
},
},
components: {udiRlDetailDialog},
created() {
if (this.$isNotBlank(this.data)) {
// this.listQuery.nameCode = this.data.udi;
// if (this.data.billType != null) {
// this.listQuery.billType = this.data.billType;
// } else
// this.listQuery.billType = this.data.formData.billType;
// if (this.data.formData != null) {
// this.listQuery.corpId = this.data.formData.corpId;
// }
// this.orderEditor = this.data.orderEditor;
// this.orderId = this.data.orderId;
this.ids = [];
if (this.data.stockOrderLists.length > 0) {
for (var i = 0; i < this.data.stockOrderLists.length; i++) {
this.ids.push(this.data.stockOrderLists[i].productId);
}
}
}
this.getList();
},
};
</script>
<style scoped>
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style>

@ -56,83 +56,86 @@
<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="请选择业务类型" <el-select v-model="formData.invWarehouseCode" @change="subStorageChange" placeholder="当前仓库信息" style="width: 100%;"
@change="actionChange" clearable> clearable>
<el-option <el-option
v-for="item in busTypes" v-for="item in subInvList"
:key="item.thirdAction" :key="item.name"
:label="item.thirdName" :label="item.name"
:value="item.thirdAction"> :value="item.code">
<span style="float: left">{{ item.thirdName }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
</el-col>
<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 class="query-form-item" prop="fromCorp"> <el-form-item class="query-form-item" prop="fromCorp">
<el-select <el-select v-model="formData.fromSubInvCode" placeholder="请选择仓库" @change="getFormStorageCode" clearable="true"
v-model="formData.corpName" style="width: 100%"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入往来单位"
:remote-method="findStorageMethod"
:loading="loading"
@change="storageChange"
> >
<el-option <el-option
v-for="item in fromStorageOptions" v-for="item in fromSubStorageOptions"
:key="item.value" :key="item.code"
:label="item.code" :label="item.name"
:value="item"> :value="item.code">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
item.code
}}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</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="invWarehouseCode"> <el-form-item prop="billType">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" <el-select v-model="formData.billType" placeholder="请选择领用类型" style="width: 100%"
clearable> clearable>
<el-option <el-option
v-for="item in subInvList" v-for="item in busTypes"
:key="item.name" :key="item.originAction"
:label="item.name" :label="item.originName"
:value="item.code"> :value="item.originAction">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.originName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3">
<div class="ao-text">
<span>备注</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="remark">
<el-input v-model="formData.remark" auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-card> </el-card>
@ -256,20 +259,6 @@
</el-card> </el-card>
</el-form> </el-form>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
<el-dialog <el-dialog
title="库存产品录入" title="库存产品录入"
@ -284,6 +273,7 @@
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:data="thisData" :data="thisData"
:invQueryData="invQueryData" :invQueryData="invQueryData"
:type="1"
></dialogInvProduct> ></dialogInvProduct>
</el-dialog> </el-dialog>
</div> </div>
@ -312,8 +302,8 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
import dialogInvProduct from "../inventory/DialogInvProduct" import dialogInvProduct from "../inventory/DialogInvProduct"
import {getOriginJoinBusType} from "@/api/basic/busOriginType"; import {getBusChange} from "@/api/basic/busTypeChange";
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive"; import {inserThrOrderWeb, updateReceive} from "@/api/thrsys/thrOrderReceive";
import {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder"; import {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder";
import {filterSubByInv} from "@/api/basic/invSubWarehouse"; import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -332,6 +322,10 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
editType: {
type: Object,
required: true,
},
}, },
data() { data() {
return { return {
@ -377,6 +371,7 @@ export default {
subInvList: [], subInvList: [],
fromOptions: [], fromOptions: [],
fromStorageOptions: [], fromStorageOptions: [],
fromSubStorageOptions: [],
total: 0, total: 0,
loading: false, loading: false,
index: null, index: null,
@ -398,10 +393,6 @@ export default {
1: "预入库", 1: "预入库",
2: "普通采购", 2: "普通采购",
}, },
curAction: {
corpType: 0,
genUnit: false,
},
orderEditor: true, orderEditor: true,
iCount: 0, iCount: 0,
sOptions: [], sOptions: [],
@ -411,11 +402,11 @@ export default {
busTypes: [], busTypes: [],
currentRow: {}, currentRow: {},
selectedIndex: "", selectedIndex: "",
selectProductVisible: false,
selectInvProductVisible: false, selectInvProductVisible: false,
thisData: {}, thisData: {},
storageList: [], storageList: [],
invQueryData: {}, invQueryData: {},
type: 1,
}; };
}, },
@ -449,7 +440,7 @@ export default {
} }
if (status === '0') { if (status === '2') {
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
@ -492,13 +483,24 @@ export default {
console.log(row); console.log(row);
this.formData.corpId = row.code; this.formData.corpId = row.code;
this.formData.corpName = row.name; this.formData.corpName = row.name;
this.findSubStorageMethod();
}, },
getStorage(event) {
this.storageList = [];
filterAllByUser()
//
findSubInvs() {
this.subInvList = [];
let query = {
filter:3
};
filterSubByInv(query)
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.subInvList = response.data || [];
this.findSubInvs(); if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
this.getBusType();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -511,7 +513,9 @@ export default {
} }
} }
}, },
findStorageMethod(query) {
//
findStorageMethod() {
if (this.formData.locStorageCode == null) if (this.formData.locStorageCode == null)
return; return;
this.fromStorageOptions = []; this.fromStorageOptions = [];
@ -531,6 +535,22 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
//
findSubStorageMethod() {
let cQuery = {
code: this.formData.invWarehouseCode,
filter: 2,
};
filterSubByInv(cQuery)
.then((response) => {
this.fromSubStorageOptions = response.data || [];
})
.catch(() => {
});
},
submitFunction(status) { submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交'; let tMessage = status === '501' ? '保存' : '提交';
this.loading = true; this.loading = true;
@ -538,10 +558,7 @@ export default {
tQuery.editStatus = status; tQuery.editStatus = status;
tQuery.subErpOrders = this.codeArray; tQuery.subErpOrders = this.codeArray;
tQuery.thirdPartyDate = 2; tQuery.thirdPartyDate = 2;
if (this.editType === "add") {
// tQuery.billType = this.formData.bi;
console.log(tQuery);
inserThrOrderWeb(tQuery) inserThrOrderWeb(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
@ -555,6 +572,23 @@ export default {
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}) })
} else if (this.editType === "update") {
updateReceive(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
}
}, },
selectProductFunction(event) { selectProductFunction(event) {
@ -565,8 +599,8 @@ export default {
} }
if (this.$isBlank(event)) { if (this.$isBlank(event)) {
if (this.$isBlank(this.formData.corpName) || this.$isBlank(this.formData.billType)) { if (this.$isBlank(this.formData.fromSubInvCode) || this.$isBlank(this.formData.billType)) {
this.$message.error("往来信息和单据类型不能为空!") this.$message.error("往来信息和领用类型不能为空!")
return; return;
} }
this.code = ""; this.code = "";
@ -580,25 +614,21 @@ export default {
if (this.orderEditor) { if (this.orderEditor) {
this.thisData.orderId = this.formData.id this.thisData.orderId = this.formData.id
} }
this.curAction = this.getActionItem(this.formData.billType);
this.thisData.stockOrderLists = this.codeArray; this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData; this.thisData.formData = this.formData;
this.thisData.formData.thirdSysFk = this.curAction.thirdSys;
this.thisData.billType = this.curAction.localAction;
this.invQueryData = { this.invQueryData = {
locStorageCode: this.formData.locStorageCode, locStorageCode: this.formData.locStorageCode,
invWarehouseCode:this.formData.invWarehouseCode
}; };
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
return; return;
} }
}, },
closeDialogC2(rData) { closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false; this.selectInvProductVisible = false;
this.thisData = {}; this.thisData = {};
@ -787,6 +817,18 @@ export default {
}); });
}, },
getFormStorageCode(code) {
var row= this.fromSubStorageOptions.find(item => item.code == code)
this.formData.fromSubInvCode = row.code
this.formData.corpId = row.parentId;
this.formData.corpName = row.name;
},
subStorageChange(code) {
this.formData.locStorageCode= this.subInvList.find(item => item.code == code).parentId
this.getBusType();
this.findSubStorageMethod();
},
copyDetail(row) { copyDetail(row) {
this.$confirm("是否复制该记录?", "提示", { this.$confirm("是否复制该记录?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -847,13 +889,12 @@ export default {
}, },
getBusType() { getBusType() {
let query = { let query = {
enabled: true, enable: false,
corpType: 1, type: 1,
}; };
getOriginJoinBusType(query) getBusChange(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.curAction = this.busTypes[0];
}) })
.catch(() => { .catch(() => {
}); });
@ -864,42 +905,6 @@ export default {
this.formData.corpId = event.erpId; this.formData.corpId = event.erpId;
this.formData.unitIdFk = event.erpId; this.formData.unitIdFk = event.erpId;
}, },
findMethod(query) {
console.log(query);
this.fromOptions = [];
let cQuery = {
key: query,
corpType: null,
outType: null,
};
if (this.curAction.corpType == 3) {//
cQuery.corpType = 4;
this.formData.corpId = this.curAction.defaultUnit;
} else if (this.curAction.corpType == 2)//
{
cQuery.corpType = 4;
cQuery.outType = 2;
} else if (this.curAction.corpType == 0) {
cQuery.corpType = 2;
} else return;
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.page.list || [];
if (this.curAction.corpType == 3) {
for (let i = 0; i < this.fromOptions.length; i++) {
if (this.fromOptions[i].erpId == this.formData.corpId) {
this.formData.corpName = this.fromOptions[i].name;
}
}
}
})
.catch(() => {
this.loading = false;
});
},
getActionItem(action) { getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) { for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].thirdAction === action) { if (this.busTypes[i].thirdAction === action) {
@ -907,38 +912,15 @@ export default {
} }
} }
}, },
actionChange(item) {
console.log(item);
this.curAction = this.getActionItem(item);
this.locInChange();
this.findMethod();
},
locInChange(item) { locInChange(item) {
if (this.formData.invWarehouseCode != null) { if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = ""; this.formData.invWarehouseCode = "";
} }
this.formData.locStorageCode = item; this.formData.locStorageCode = item;
this.$forceUpdate(); this.$forceUpdate();
this.getBusType(item);
this.findStorageMethod(); this.findStorageMethod();
this.findSubInvs(); this.findSubInvs();
}, },
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
}
}, },
@ -977,9 +959,9 @@ export default {
} }
this.getBusType(); this.getBusType();
this.getStorage(); this.findSubInvs();
this.findSubInvByInv();
this.findSubStorageMethod(); this.findSubStorageMethod();
// this.findSubInvByInv();
this.codeArray = []; this.codeArray = [];
this.closeConfirmFunction(false); this.closeConfirmFunction(false);
}, },

@ -70,13 +70,13 @@
<el-col :span="2"> <el-col :span="2">
<div class="ao-text"> <div class="ao-text">
<span>当前</span> <span>当前</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="invWarehouseCode"> <el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前库信息" <el-select v-model="formData.invWarehouseCode" placeholder="当前库信息"
:disabled="corpOrderIdDisabled" @change="findSubStorageMethod" filterable> :disabled="corpOrderIdDisabled" @change="findSubStorageMethod" filterable>
<el-option <el-option
v-for="item in subInvList" v-for="item in subInvList"

@ -145,13 +145,13 @@
<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="invWarehouseCode"> <el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" filterable placeholder="当前库信息" <el-select v-model="formData.invWarehouseCode" filterable placeholder="当前库信息"
:disabled="codeArray.length>0" :disabled="codeArray.length>0"
@change="subStorageChange" @change="subStorageChange"
clearable> clearable>

@ -515,15 +515,15 @@ export default {
newSpDistributionVisible: false, newSpDistributionVisible: false,
isSp: store.getters.customerId, isSp: store.getters.customerId,
detailFormRules: { detailFormRules: {
batchNo: [ // batchNo: [
{required: true, message: "请输入批次号", trigger: "blur"} // {required: true, message: "", trigger: "blur"}
], // ],
productDate: [ // productDate: [
{required: true, message: "请输入生产日期", trigger: "blur"} // {required: true, message: "", trigger: "blur"}
], // ],
expireDate: [ // expireDate: [
{required: true, message: "请输入失效日期", trigger: "blur"} // {required: true, message: "", trigger: "blur"}
], // ],
sweepCount: [ sweepCount: [
{required: true, message: "请输入扫码数量", trigger: "blur"} {required: true, message: "请输入扫码数量", trigger: "blur"}
] ]

@ -305,9 +305,10 @@ export default {
this.loading = true; this.loading = true;
this.listQuery.customerId = store.getters.customerId; this.listQuery.customerId = store.getters.customerId;
if(this.listQuery.customerId==110){ if(this.listQuery.customerId==110 && this.data.formData!=null && this.data.formData!=undefined){
this.listQuery.companyName=this.data.formData.corpName this.listQuery.companyName=this.data.formData.corpName
}else{ }
if(this.listQuery.customerId!=110 && this.data!=null && this.data!=undefined){
this.listQuery.companyName=this.data.corpName this.listQuery.companyName=this.data.corpName
} }

Loading…
Cancel
Save