di绑定多个产品ID,产品绑定多个供应商,流程更改

master
anthonywj 3 years ago
parent ee75003983
commit d0dfdfd820

@ -1,4 +1,4 @@
{
"BASE_URL": "http://127.0.0.1:9996",
"SERVER_IP": "http://127.0.0.1:9996"
"BASE_URL": "http://192.168.0.109:9996",
"SERVER_IP": "http://192.168.0.109:9996"
}

@ -7,6 +7,15 @@ export function getBasicUnitMaintains(query) {
params: query
});
}
export function getCorpFilter(query) {
return axios({
url: "/sale/info/company/product/corp/filter",
method: "get",
params: query
});
}
export function getBasicUnitMaintains2(query) {
return axios({

@ -112,6 +112,14 @@ export function uploadSmp(query) {
});
}
export function disableUdi(query) {
return axios({
url: "/udi/udirel/disable",
method: "post",
data: query
});
}
export function thirdSysDetail(query) {
return axios({
url: "/udiwms/udirel/thirdSys/detail",

@ -237,6 +237,15 @@ export function updateBindSup(query) {
)
}
export function updateCodeBindSup(query) {
return axios(
{
url: "/udiwms/addCode/updateBindSup",
method: "post",
data: query
}
)
}
export function backStock(query) {
return axios(

@ -120,7 +120,6 @@
</el-col>
<!-- <el-col :span="10" class="el-col">-->
<!-- <div class="text item">-->
<!-- <div class="itemTag">-->
@ -146,34 +145,30 @@
<div class="itemTag">
<span>特殊单据往来:&nbsp;</span>
</div>
<el-input
style="width: 200px"
size="small"
v-model="inputQuery.defaultUnit"
></el-input>
<!-- :disabled="inputQuery.genUnit==false || inputQuery.genUnit==null"-->
<!-- <el-form-item class="query-form-item">-->
<!-- <el-select-->
<!-- v-model="filterQuery.companyName"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="供应商"-->
<!-- :remote-method="findMethod"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in fromOptions"-->
<!-- :key="item.companyName"-->
<!-- :label="item.companyName"-->
<!-- :value="item.companyName"-->
<!-- >-->
<!-- <span style="float: left">{{ item.companyName }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-input-->
<!-- style="width: 200px"-->
<!-- size="small"-->
<!-- v-model="inputQuery.defaultUnit"-->
<!-- ></el-input>-->
<el-select
v-model="inputQuery.defaultUnit"
filterable
remote
:disabled="inputQuery.corpType!=3"
clearable="true"
reserve-keyword
:remote-method="findSpecialMethod"
>
<el-option
v-for="item in fromSpecialOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</div>
@ -373,6 +368,7 @@ import {
} from "../../api/basic/busLocalType";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import {getCandidateBussinessType} from "../../api/receipts/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
export default {
name: "inputQuery",
@ -392,6 +388,7 @@ export default {
},
storageList: [],
orderTypeList: [],
fromSpecialOptions: [],
thirdSys: [],
localTypes: [],
options: [{
@ -404,6 +401,9 @@ export default {
{
value: '2',
label: '客户信息'
}, {
value: '3',
label: '特殊往来'
}],
twoCheck: false,
@ -440,6 +440,16 @@ export default {
.catch(() => {
});
},
findSpecialMethod() {
let query = {
corpType: 4,
};
getBasicUnitMaintains(query).then((response) => {
this.fromSpecialOptions = response.data.page.list || [];
}).catch(() => {
})
},
oneCheck(type) {
console.log(type);
if (!type) {
@ -490,6 +500,7 @@ export default {
}
this.getList();
this.getStorage();
this.findSpecialMethod();
},
};

@ -7,8 +7,10 @@
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.corpType" placeholder="往来单位类型">
<el-option label="全部" value=""></el-option>
<el-option label="客户" value="1"></el-option>
<el-option label="供应商" value="2"></el-option>
<el-option label="特殊往来" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item>
@ -267,10 +269,17 @@
<span>往来单位类型:&nbsp;</span>
</div>
<el-form-item class="query-form-item">
<el-select v-model="editQuery.corpType" placeholder="往来单位类型">
<el-option label="客户" value="1"></el-option>
<el-option label="供应商" value="2"></el-option>
<el-option label="特殊往来" value="4"></el-option>
<el-option
v-for="item in corpTypeList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
@ -347,6 +356,21 @@ export default {
0: "选入往来单位信息",
1: "关联往来单位信息",
},
corpTypeList: [
{
value: 1,
label: "客户"
},
{
value: 2,
label: "供应商"
},
{
value: 4,
label: "特殊往来"
}
],
formRules: {
// name: [
// {required: true, message: "", trigger: "blur"}

@ -683,6 +683,7 @@
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag"
@change="diableChange"
>是否禁用
</el-checkbox>
</el-form-item>
@ -769,7 +770,7 @@ import {
updateErpProduct,
uploadSmp,
thirdSysDetail,
removeRl, sysFilter, spcombie, lockStatus, removeDiRl
removeRl, sysFilter, spcombie, lockStatus, removeDiRl, disableUdi
} from "../../api/basic/udiRelevance";
import {selectSysParamByKey} from "../../api/param/systemParamConfig";
import {filterByUuid} from "../../api/basic/udiInfo";
@ -871,6 +872,23 @@ export default {
this.total = 0;
});
},
diableChange() {
let query = {
relId: this.editQuery.id
}
disableUdi(query)
.then((response) => {
if (response.code != 20000) {
this.editQuery.isDisable = false;
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
},
keyup_submit(event) {
this.filterQuery.page = 1;
this.getList();

@ -64,15 +64,18 @@
<el-table-column
prop="code"
label="仓库编码"
width="120"
>
</el-table-column>
<el-table-column
prop="name"
label="仓库名称"
width="250"
>
</el-table-column>
<el-table-column
prop="advanceType"
width="120"
label="仓库类型">
<template slot-scope="scope">
<span>{{ enableMap[scope.row.advanceType] }}</span>
@ -80,11 +83,13 @@
</el-table-column>
<el-table-column
prop="level"
width="120"
label="仓库等级"
>
</el-table-column>
<el-table-column
prop="pcode"
prop="pname"
width="250"
label="上级仓库"
>
</el-table-column>
@ -149,11 +154,11 @@
stripe
style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column-->
<!-- prop="username"-->
<!-- label="账号"-->
<!-- min-width="20%">-->
<!-- </el-table-column>-->
<el-table-column
prop="username"
label="账号"
min-width="20%">
</el-table-column>
<el-table-column
prop="employeeName"
label="用户名"
@ -438,7 +443,8 @@
</el-col>
<el-col :span="12" class="el-col">
<el-form-item class="query-form-item" label="上级仓库:">
<el-select v-model="formData.pcode" placeholder="请选择当前仓库" clearable="true" size="mini">
<el-select v-model="formData.pcode" placeholder="请选择当前仓库"
clearable="true" size="mini" @change="pcodeChange">
<el-option
v-for="item in pCodes"
:key="item.name"
@ -461,7 +467,8 @@
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="状态:" prop="status" class="query-form-item">
<el-radio-group v-model="formData.status" @change="statusChange">
<el-radio-group v-model="formData.status" @change="statusChange"
:disabled="formName!='edit'">
<el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio>
</el-radio-group>
@ -895,7 +902,12 @@ export default {
},
formSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
if (this.formData.pcode == null && this.formData.level != 1) {
this.$message.warning("上级仓库不能为空");
return;
}
this.formLoading = true;
let data = Object.assign({}, this.formData);
saveWarehouse(data, this.formName)
@ -1063,9 +1075,14 @@ export default {
},
changeLevel(row) {
this.formData.pcode = null;
//TODO
this.getParentInv(this.formData.level);
},
pcodeChange() {
this.$forceUpdate()
},
loadLinkData(row) {
let query = {
code: row.code

@ -225,6 +225,7 @@ export default {
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.supId = this.idQuery.supId;
this.query.invStorageCode = this.idQuery.invStorageCode;
filterDetailProducts(this.query) //
.then((response) => {
this.loading = false;
@ -242,6 +243,7 @@ export default {
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.customerId = store.getters.customerId;
this.query.invStorageCode = this.idQuery.invStorageCode;
statDetailProducts(this.query) //
.then((response) => {
this.loading = false;

@ -1,8 +1,8 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row style="width: 100%">
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
</el-form-item>
@ -12,7 +12,6 @@
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.supId"
@ -23,19 +22,32 @@
placeholder="请输入供应商名称"
:remote-method="findMethod"
size="mini"
style="width: 100%"
:loading="loading"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
:key="item.companyName"
:label="item.companyName"
:value="item.customerId"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: left">{{ item.companyName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-row>
<el-row style="width: 100%">
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invStorageCode" placeholder="请选择当前仓库" clearable="true"
size="mini">
@ -48,7 +60,6 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
@ -64,26 +75,30 @@
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc">
<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc" width="180">
</el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量" prop="reCount">
<el-table-column label="规格型号" prop="ggxh" width="180"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></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="inCount" width="120"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>
<el-table-column label="结余数量" prop="reCount" width="120">
<template slot-scope="scope">
{{ (scope.row.inCount - scope.row.outCount) }}
</template>
</el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup"
show-overflow-tooltip></el-table-column>
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -138,6 +153,7 @@ import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import {filterCustomers} from "@/api/auth/customer";
export default {
@ -145,7 +161,7 @@ export default {
return {
filterQuery: {
invStorageCode: null,
productsName: null,
productsName: null,
nameCode: null,
relIdFk: null,
batchNo: null,
@ -187,8 +203,8 @@ export default {
path: "",
});
this.filterQuery = {
productsName: null,
nameCode: null,
productsName: null,
nameCode: null,
relIdFk: null,
batchNo: null,
customerId: null,
@ -279,14 +295,23 @@ export default {
this.fromOptions = [];
let cQuery = {
key: query,
customerName: query,
};
getBasicUnitMaintains(cQuery)
// getBasicUnitMaintains(cQuery)
// .then((response) => {
// this.loading = false;
// this.fromOptions = response.data.page.list || [];
// })
// .catch(() => {
// this.loading = false;
// });
filterCustomers(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.page.list || [];
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromOptions = [];
});
},
getStorage() {
@ -344,6 +369,7 @@ export default {
created() {
this.getStorage();
this.getBusType();
this.findMethod();
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);

@ -1,293 +1,296 @@
<template>
<div>
<div>
<el-descriptions class="margin-top" title="产品信息" :column="3" :size="size" border>
<el-descriptions-item>
<template slot="label">
产品名称
</template>
{{ idQuery.cpmctymc }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
产品标识
</template>
{{ idQuery.nameCode }}
</el-descriptions-item>
<el-descriptions class="margin-top" title="产品信息" :column="3" :size="size" border>
<el-descriptions-item>
<template slot="label">
产品名称
</template>
{{ idQuery.cpmctymc }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
产品标识
</template>
{{ idQuery.nameCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
批次号
</template>
{{ idQuery.batchNo }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
规格型号
</template>
{{ idQuery.ggxh }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
生产日期
</template>
{{ idQuery.productionDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
失效日期
</template>
{{ idQuery.expireDate }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions-item>
<template slot="label">
批次号
</template>
{{ idQuery.batchNo }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
规格型号
</template>
{{ idQuery.ggxh }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
生产日期
</template>
{{ idQuery.productionDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
失效日期
</template>
{{ idQuery.expireDate }}
</el-descriptions-item>
</el-descriptions>
<!-- <el-descriptions style="margin-top: 15px" class="margin-top" title="库存统计" :column="3" :size="size" border>-->
<!-- <el-descriptions style="margin-top: 15px" class="margin-top" title="库存统计" :column="3" :size="size" border>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 入库数量-->
<!-- </template>-->
<!-- {{ statData.inCount }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 出库数量-->
<!-- </template>-->
<!-- {{ statData.outCount }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 结余数量-->
<!-- </template>-->
<!-- {{ (statData.inCount - statData.outCount) }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 普通采购数量-->
<!-- </template>-->
<!-- {{ statData.commonCount }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 预入库数量-->
<!-- </template>-->
<!-- {{ statData.advanceCount }}-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 入库数量-->
<!-- </template>-->
<!-- {{ statData.inCount }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 出库数量-->
<!-- </template>-->
<!-- {{ statData.outCount }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 结余数量-->
<!-- </template>-->
<!-- {{ (statData.inCount - statData.outCount) }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 普通采购数量-->
<!-- </template>-->
<!-- {{ statData.commonCount }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- 预入库数量-->
<!-- </template>-->
<!-- {{ statData.advanceCount }}-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input v-model="query.code" placeholder="条码查询"></el-input>
</el-form-item>
<el-form :inline="true" :model="query" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input v-model="query.code" placeholder="条码查询"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="search" @click="getCodeList"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="codeArry" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="条码"
prop="originCode"
width="300"
show-overflow-tooltip
></el-table-column>
<el-table-column label="单据类型" prop="action" width="150">
<template slot-scope="scope">
<span>{{ getActionName(scope.row.action) }}</span>
</template>
</el-table-column>
<el-table-column
label="出入库类型"
prop="mainActionStr"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="入库数量"
prop="inCount"
width="120"
show-overflow-tooltip
></el-table-column>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="search" @click="getCodeList"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="codeArry" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="条码"
prop="originCode"
width="300"
show-overflow-tooltip
></el-table-column>
<el-table-column label="单据类型" prop="action" width="150">
<template slot-scope="scope">
<span>{{ getActionName(scope.row.action) }}</span>
</template>
</el-table-column>
<el-table-column
label="出入库类型"
prop="mainActionStr"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="入库数量"
prop="inCount"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="出库数量"
prop="outCount"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="订单日期"
prop="updateTime"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="所属扫码单据"
prop="orderIdFk"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="所属业务单据"
prop="stockIdFk"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-table-column
label="出库数量"
prop="outCount"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="订单日期"
prop="updateTime"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="所属扫码单据"
prop="orderIdFk"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="所属业务单据"
prop="stockIdFk"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next,total"
:total="total"
>
</el-pagination>
</div>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next,total"
:total="total"
>
</el-pagination>
</div>
</template>
<script>
import {
filterDetailProducts, statDetailProducts
filterDetailProducts, statDetailProducts
} from "../../api/inventory/InvProducts";
import store from "../../store";
import draggable from "vuedraggable";
import {getBussinessType} from "../../api/basic/bussinessType";
export default {
name: "idQuery",
props: {
idQuery: {
type: Object,
required: true,
},
name: "idQuery",
props: {
idQuery: {
type: Object,
required: true,
},
data() {
return {
query: {
batchNo: null,
productIdFk: null,
customerId: null,
page: 1,
limit: 20,
},
codeArry: [],
total: 0,
loading: true,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
busTypes: [],
statData: {},
};
},
data() {
return {
query: {
batchNo: null,
productIdFk: null,
customerId: null,
page: 1,
invStorageCode: null,
limit: 20,
},
codeArry: [],
total: 0,
loading: true,
index: null,
formLoading: false,
formVisible: false,
deleteLoading: false,
orderNo: null,
busTypes: [],
statData: {},
};
},
components: {
draggable,
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.query = {
productIdFk: null,
customerId: null,
page: 1,
limit: 20,
};
this.getCodeList();
},
components: {
draggable,
onSubmit() {
this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.query = {
productIdFk: null,
customerId: null,
page: 1,
limit: 20,
};
this.getCodeList();
},
onSubmit() {
this.$router.push({
path: "",
query: this.query,
});
this.getCodeList();
},
handleSizeChange(val) {
this.query.limit = val;
this.getCodeList();
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
getCodeList() {
this.loading = true;
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.supId = this.idQuery.supId;
filterDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.codeArry = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getCodeList() {
this.loading = true;
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.supId = this.idQuery.supId;
this.query.invStorageCode = this.idQuery.invStorageCode;
filterDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.codeArry = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getStat() {
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.customerId = store.getters.customerId;
statDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.statData = response.data;
})
.catch(() => {
this.loading = false;
});
getStat() {
this.query.productIdFk = this.idQuery.relIdFk;
this.query.batchNo = this.idQuery.batchNo;
this.query.customerId = store.getters.customerId;
this.query.invStorageCode = this.idQuery.invStorageCode;
statDetailProducts(this.query) //
.then((response) => {
this.loading = false;
this.statData = response.data;
})
.catch(() => {
this.loading = false;
});
},
},
intentBack() {
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}});
this.$router.go(-1);
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
intentBack() {
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}});
this.$router.go(-1);
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
created() {
this.getBusType();
this.getCodeList();
this.getStat();
getBusType() {
let query = {
enabled: true,
};
getBussinessType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
},
filters: {},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getBusType();
this.getCodeList();
this.getStat();
},
};
</script>

@ -1,111 +1,108 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<div>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" placeholder="通用名称"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input>
</el-form-item>
</div>
<el-form :inline="true" :model="filterQuery" size="mini">
<div>
<el-form-item class="query-form-item" style="margin-right: 0px;">
<el-select
v-model="filterQuery.invStorageCode"
filterable
remote
clearable="true"
reserve-keyword
placeholder="仓库"
size="mini"
style="width: 92%"
:loading="loading"
<el-row style="width: 100%">
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.productsName" placeholder="产品名称"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入供应商名称"
:remote-method="findMethod"
size="mini"
:loading="loading"
>
<el-option
v-for="item in fromOptions"
:key="item.companyName"
:label="item.companyName"
:value="item.customerId"
>
<el-option
v-for="item in storageOptions"
:key="item.code"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" style="margin-left: 0px;">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
</el-form-item>
<span style="float: left">{{ item.companyName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入供应商名称"
:remote-method="findMethod"
size="mini"
style="width: 100%"
:loading="loading"
>
<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-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>统计
</el-button
>
</el-button-group>
</el-form-item>
</div>
</el-row>
<el-row style="width: 100%">
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invStorageCode" placeholder="请选择当前仓库" clearable="true"
size="mini">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>统计
</el-button
>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc">
<el-table-column label="序号" type="index" fixed></el-table-column>
<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc" width="180">
</el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量" prop="reCount">
<el-table-column label="规格型号" prop="ggxh" width="180"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></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="inCount" width="120"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>
<el-table-column label="结余数量" prop="reCount" width="120">
<template slot-scope="scope">
{{ (scope.row.inCount - scope.row.outCount) }}
</template>
</el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
</el-table>
</el-card>

@ -1,40 +1,64 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row style="width: 100%">
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称"></el-input>
<el-input v-model="filterQuery.productsName" placeholder="产品名称"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.unitFk"
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入企业名称"
placeholder="请输入供应商名称"
:remote-method="findMethod"
size="mini"
style="width: 100%"
:loading="loading"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
:key="item.companyName"
:label="item.companyName"
:value="item.customerId"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: left">{{ item.companyName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-row>
<el-row style="width: 100%">
<!-- <el-form-item class="query-form-item">-->
<!-- <el-select v-model="filterQuery.invStorageCode" placeholder="请选择当前仓库" clearable="true"-->
<!-- size="mini">-->
<!-- <el-option-->
<!-- v-for="item in storageList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
@ -49,26 +73,33 @@
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc">
<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc" width="180">
</el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量">
<el-table-column label="规格型号" prop="ggxh" width="180"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></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="inCount" width="120"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>
<el-table-column label="结余数量" prop="reCount" width="120">
<template slot-scope="scope">
{{ (scope.row.inCount - scope.row.outCount) }}
</template>
</el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="ylqxzcrbarmc" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -122,6 +153,7 @@ import codeDetail from "./InvPreProductsDetail";
import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {filterCustomers} from "@/api/auth/customer";
export default {
@ -258,14 +290,23 @@ export default {
this.fromOptions = [];
let cQuery = {
key: query,
customerName: query,
};
getBasicUnitMaintains(cQuery)
// getBasicUnitMaintains(cQuery)
// .then((response) => {
// this.loading = false;
// this.fromOptions = response.data.page.list || [];
// })
// .catch(() => {
// this.loading = false;
// });
filterCustomers(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.page.list || [];
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromOptions = [];
});
},
@ -313,6 +354,7 @@ export default {
};
},
created() {
this.findMethod();
this.getBusType();
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);

@ -45,25 +45,25 @@
</template>
</el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="intentDetail(scope.row)"
>详情
</el-button
>
<!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="intentDetail(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.id)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>

@ -45,25 +45,25 @@
</template>
</el-table-column>
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="intentDetail(scope.row)"
>详情
</el-button
>
<!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="intentDetail(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.id)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>

@ -3,7 +3,7 @@
<div>
<h3 class="toptitle">医院UDI自助平台</h3>
<h3 class="toptitle">zhaoan医院UDI自助平台</h3>
</div>
<el-form

@ -103,7 +103,7 @@
:close-on-press-escape="false"
:visible.sync="subFormVisible"
:before-close="hideForm"
width="60%"
width="40%"
top="5vh"
>
<el-form :model="formData" :rules="formRules" ref="dataForm">
@ -169,7 +169,7 @@
:close-on-press-escape="false"
:visible.sync="formVisible"
:before-close="hideForm"
width="60%"
width="40%"
top="5vh"
>
<el-form :model="formData" :rules="formRules" ref="dataForm">

@ -704,21 +704,27 @@
});
},
bindId(val) {
let query = {
id: this.curRow.id,
bindStatus: 0,
bindRlFk: val.id
};
updateBind(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.closeBindDialog(this.curRow.id);
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
if(this.curRow.code!=null){
this.$emit("selectBindRl", val);
this.$emit("closeBindDialog",true);
}else {
let query = {
id: this.curRow.id,
bindStatus: 0,
bindRlFk: val.id
};
updateBind(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.closeBindDialog(this.curRow.id);
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
});
}
});
},

@ -12,6 +12,13 @@
>查询
</el-button
>
<el-button
type="primary"
icon="search"
@click.native.stop="selectUnit()"
>确定
</el-button
>
</el-form-item>
</el-form>
@ -19,7 +26,8 @@
v-loading="loading"
:data="unitlist"
style="width: 100%"
@row-click="selectUnit"
highlight-current-row
@current-change="handleDetail"
>
<el-table-column
label="往来单位ID"
@ -49,10 +57,16 @@
<script>
import {updateUnit} from "@/api/warehouse/order";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {getBasicUnitMaintains, getCorpFilter} from "@/api/basic/basicUnitMaintain";
export default {
name: "DialogSelectUnit",
props: {
codeId: {
type: Object,
required: true,
},
},
data() {
return {
unitquery: {key: "", page: 1, limit: 20},
@ -76,11 +90,43 @@ export default {
this.loading = false;
});
},
selectUnit(row) {
console.log(row.id);
this.$emit("selectUnit", row);
getUnitListByCode(row) {
let query = {
udiRlIdFk: row.relId,
}
getCorpFilter(query)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.unitlist = response.data || [];
} else {
this.$message.warning(response.message);
}
})
.catch(() => {
this.loading = false;
});
},
handleDetail(row) {
this.curUnitRow = row;
},
selectUnit() {
this.$emit("selectSupUnit", this.curUnitRow);
this.$emit("closeBindDialog", true);
},
},
created() {
},
mounted() {
console.log("this.codeId = " + this.codeId)
if (this.codeId != null) {
this.getUnitListByCode(this.codeId)
}
}
}
</script>

@ -13,16 +13,16 @@
</el-form-item>
<!-- <el-form-item class="query-form-item">-->
<!-- <el-select-->
<!-- v-model="filterQuery.status"-->
<!-- placeholder="校验状态"-->
<!-- >-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="校验成功" :value="4"></el-option>-->
<!-- <el-option label="校验异常" :value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item class="query-form-item">-->
<!-- <el-select-->
<!-- v-model="filterQuery.status"-->
<!-- placeholder="校验状态"-->
<!-- >-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="校验成功" :value="4"></el-option>-->
<!-- <el-option label="校验异常" :value="3"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item class="query-form-item">
<el-select
@ -325,6 +325,11 @@
<el-table-column label="扫码数量" prop="count"
width="100"></el-table-column>
<el-table-column
label="供应商"
prop="supName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="生产企业"
prop="productCompany"

@ -246,18 +246,6 @@
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<!-- <el-table-column-->
<!-- label="ERP订单号"-->
<!-- prop="erpOrderId"-->
<!-- :show-overflow-tooltip="true"-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="产品名称"-->
<!-- prop="goodsname"-->
<!-- :show-overflow-tooltip="true"-->
<!-- ></el-table-column>-->
<el-table-column
label="产品通用名"
prop="coName"
@ -295,6 +283,11 @@
></el-table-column>
<el-table-column label="扫码数量" prop="count"></el-table-column>
<el-table-column
label="供应商"
prop="supName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="生产企业"
prop="productCompany"

@ -291,6 +291,11 @@
></el-table-column>
<el-table-column label="扫码数量" prop="count"></el-table-column>
<el-table-column
label="供应商"
prop="supName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="生产企业"
prop="productCompany"

@ -2,18 +2,17 @@
<div>
<el-form :model="formData" :rules="formRules" ref="dataForm">
<el-button-group style="display: flex">
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click.native="submit('1')"-->
<!-- style="margin: -50px 0 10px auto; height: 35px"-->
<!-- >保存订单-->
<!-- </el-button-->
<!-- >-->
<el-button-group style="display: flex;margin: -50px 0 10px 80%; height: 35px">
<el-button
type="primary"
@click.native="saveOrder()"
>草稿保存
</el-button
>
<el-button
type="primary"
@click.native="submit('0')"
style="margin: -50px 60px 10px auto; height: 35px"
>提交订单
</el-button
>
@ -33,7 +32,7 @@
</el-col>
<el-col :span="2">
<div class="ao-text">
<span>日期</span>
<span>单据时间</span>
</div>
</el-col>
<el-col :span="8">
@ -49,7 +48,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
@ -97,7 +95,6 @@
</el-row>
<!-- :disabled="actionEnable"/-->
<el-row :gutter="20">
@ -108,7 +105,7 @@
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==0">
v-if="curAction.corpType ==0 || curAction.corpType == 3 || (curAction.corpType == 2 && !curAction.genUnit)">
<el-select
v-model="formData.fromCorp"
filterable
@ -153,7 +150,8 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.corpType ==2">
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==2 && curAction.genUnit">
<el-input v-model="formData.fromCorp" auto-complete="off"
clearable
placeholder="请输入病人住院号"
@ -161,7 +159,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
@ -174,7 +171,6 @@
@focus="getInputFocus($event)"
@keypress.enter.native="addCode()"
v-model="formData.code"
auto-complete="off"
ref='inputRef'
></el-input>
</el-form-item>
@ -195,6 +191,7 @@
</el-row>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" max-height="350" height="350"
:row-style="rowStyle"
ref="multipleTable">
<el-table-column
type="selection"
@ -206,6 +203,13 @@
prop="code"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="供应商"
prop="supName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="扫码数量"
prop="count"
@ -222,6 +226,22 @@
>删除
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.relId != null "
@click.native.stop="bindRl(scope.row)"
>选择产品
</el-button
>
<el-button
type="text"
size="small"
:disabled=" scope.row.supId !=null"
@click.native.stop="handleUnitClick(scope.row)"
>选择供应商
</el-button
>
</template>
</el-table-column>
</el-table>
@ -235,12 +255,41 @@
</el-pagination>
</div>
</el-form>
<el-dialog
title="选择供应商"
:visible.sync="dialogTableVisible"
v-if="dialogTableVisible"
width="70%"
append-to-body
>
<DialogSelectUnit
:codeId="curRow"
v-on:selectSupUnit="selectSupUnit"
v-on:closeBindDialog="closeBindDialog"
></DialogSelectUnit>
</el-dialog>
<el-dialog
title="绑定产品ID"
:visible.sync="selectRlVisible"
width="80%"
v-if="selectRlVisible"
append-to-body
>
<selectRlDialog
:curRow="curRow"
v-on:selectBindRl="selectBindRl"
v-on:closeBindDialog="closeBindDialog"
></selectRlDialog>
</el-dialog>
</div>
</template>
<script>
import {
errorCodeList, addOrderWeb, deleteCodesTempById, submitOrderWeb
errorCodeList, addOrderWeb, deleteCodesTempById, submitOrderWeb, saveOrderWeb,
updateCodeBindSup
} from "../../api/warehouse/order";
import {getBussinessType} from "../../api/basic/bussinessType";
import draggable from "vuedraggable";
@ -249,6 +298,8 @@ import store from "../../store";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import DialogSelectUnit from "./DialogSelectUnit";
import selectRlDialog from "./DialogSelectRl";
export default {
name: "idQuery",
@ -287,6 +338,7 @@ export default {
action: null,
locStorageCode: null,
},
curId: null,
storageList: [],
formRules: {
temp: [
@ -308,10 +360,14 @@ export default {
corpType: 0,
genUnit: false,
},
curRow: null,
selectRlVisible: false,
dialogTableVisible: false,
};
},
components: {
draggable,
DialogSelectUnit, selectRlDialog
},
methods: {
submit(formName) {
@ -319,6 +375,7 @@ export default {
this.$message.error('未添加条码');
return;
}
let tQuery = {
orderId: this.idQuery.id,
locStorageCode: this.formData.locStorageCode,
@ -338,6 +395,27 @@ export default {
this.loading = false;
});
},
saveOrder() {
if (this.formData.action == null || this.formData.action == '') {
this.$message.error('未选择扫码单据类型');
return
}
if (this.formData.locStorageCode == null || this.formData.locStorageCode == '') {
this.$message.error('当前仓库不能为空');
return;
}
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData)));
tQuery.orderId = this.idQuery.id;
tQuery.actDate = parseTime(this.formData.actDate, '{y}-{m}-{d} {h}:{i}:{s}');
saveOrderWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
}
this.loading = false;
});
},
//
resetForm() {
if (this.$refs["dataForm"]) {
@ -348,15 +426,24 @@ export default {
this.getList();
}
},
addCode() {
addCode(event) {
this.formData.corpOrderId = this.formData.corpOrderId.trim();
this.actionEnable = true;
if (event == null) {
this.$refs.inputRef.focus();
} else event.target.select();
if (this.$isBlank(this.formData.action)) {
this.$message.warning("请选择单据类型!");
return;
}
if (this.$isBlank(this.formData.locStorageCode)) {
this.$message.error('当前仓库不能为空');
return;
}
if (this.$isBlank(this.formData.fromCorp)) {
this.$message.error('当前往来单位不能为空');
return;
}
if (this.$isBlank(this.formData.corpOrderId)) {
let date = new Date();
this.formData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10);
@ -374,17 +461,46 @@ export default {
if (response.code === 20000) {
this.idQuery.id = response.data;
this.corpOrderIdDisabled = true;
this.$refs.inputRef.focus();
this.getCodeList();
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
}
});
// this.$message.error(response.message);
this.corpOrderIdDisabled = true;
if (response.code == 502) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.bindRl(response.data);
}
});
} else if (response.code == 503) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.handleUnitClick(response.data);
}
});
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
}
});
}
}
this.loading = false;
});
@ -394,6 +510,7 @@ export default {
console.log(row);
this.formData.fromCorpId = row.erpId;
this.formData.fromCorp = row.name;
this.curRow = row;
},
storageChange(row) {
console.log(row);
@ -491,11 +608,33 @@ export default {
this.fromOptions = [];
let cQuery = {
key: query,
corpType: null,
outType: null,
};
if (this.curAction.corpType == 3) {//
cQuery.corpType = 4;
this.formData.fromCorpId = 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.fromCorpId) {
this.formData.fromCorp = this.fromOptions[i].name;
}
}
}
})
.catch(() => {
this.loading = false;
@ -507,7 +646,7 @@ export default {
return;
this.fromStorageOptions = [];
let cQuery = {
locInvCode: this.formData.locStorageCode ,
locInvCode: this.formData.locStorageCode,
};
filterAllByLoc(cQuery)
.then((response) => {
@ -545,8 +684,75 @@ export default {
},
actionChange(item) {
this.curAction = this.getActionItem(item);
this.formData.locStorageCode = this.curAction.storageCode;
// this.formData.locStorageCode = this.curAction.storageCode;
this.findMethod();
},
//
bindRl(val) {
console.log("curRow.erpId = " + val.id);
this.curRow = val;
this.selectRlVisible = true;
},
handleUnitClick(row) {
console.log("curRow.erpId = " + row.id);
this.curRow = row;
this.dialogTableVisible = true;
},
selectSupUnit(row) {
let query = {
id: this.curRow.id,
supId: row.erpId,
};
console.log("row.erpId = " + row.erpId);
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
});
},
selectBindRl(row) {
let query = {
id: this.curRow.id,
relId: row.id,
};
console.log("row.relId = " + row.id);
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
});
},
closeBindDialog(val) {
console.log("closeBindDialog" + val);
this.selectRlVisible = false;
this.dialogTableVisible = false;
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (row.supId == null || row.relId == null) {
//rowBackground.background="#f6f5ee";
rowBackground.color = '#f60303';
}
return rowBackground;
},
},
filters: {},
mounted() {
@ -562,7 +768,7 @@ export default {
// this.formData.fromCorp = store.getters.customerId === 110 ? '' : store.getters.companyName;
// this.formData.customerId = store.getters.customerId;
this.getBusType();
this.getStorage(this.formData.billType);
this.getStorage(this.formData.action);
if (this.$isNotBlank(this.idQuery.id)) {
this.formData.actDate = new Date(this.idQuery.actDate);
this.formData.corpOrderId = this.idQuery.corpOrderId;

@ -6,7 +6,7 @@
<el-button
type="primary"
@click.native="saveOrder()"
>完成
>草稿保存
</el-button
>
<el-button
@ -19,8 +19,6 @@
</el-button-group>
<el-card>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
@ -35,7 +33,7 @@
</el-col>
<el-col :span="2">
<div class="ao-text">
<span>日期</span>
<span>单据时间</span>
</div>
</el-col>
<el-col :span="8">
@ -43,7 +41,7 @@
<el-date-picker
v-model="formData.actDate"
type="datetime"
placeholder="日期"
placeholder="单据时间"
:disabled="true"
style="width: 100%; "
>
@ -51,7 +49,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
@ -69,7 +66,6 @@
</div>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item">
<el-select v-model="formData.billType" placeholder="请选择单据类型" @change="actionChange"
clearable>
@ -84,8 +80,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
@ -113,8 +107,6 @@
</el-row>
</el-card>
<el-card>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
@ -124,11 +116,10 @@
<el-col :span="19">
<el-form-item prop="code">
<el-input
@keyup.enter.native="addCode($event)"
@keypress.enter.native="addCode()"
v-model="formData.code"
ref='inputRef'
@focus="getInputFocus($event)"
></el-input>
</el-form-item>
@ -147,8 +138,8 @@
<!-- <div class="text item" style="margin-left: 30px"> 已扫码条码{{ total }}-->
<!-- </div>-->
</el-row>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" max-height="350" height="350"
:row-style="rowStyle"
ref="multipleTable">
<!-- <el-table-column-->
<!-- type="selection"-->
@ -167,7 +158,7 @@
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right" width="90">
<el-table-column label="操作" fixed="right" width="250">
<template slot-scope="scope">
<el-button
type="text"
@ -176,6 +167,22 @@
>删除
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.relId != null "
@click.native.stop="bindRl(scope.row)"
>选择产品
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- :disabled=" scope.row.supId !=null"-->
<!-- @click.native.stop="handleUnitClick(scope.row)"-->
<!-- >选择供应商-->
<!-- </el-button-->
<!-- >-->
</template>
</el-table-column>
</el-table>
@ -190,6 +197,32 @@
</div>
</el-card>
</el-form>
<el-dialog
title="选择供应商"
:visible.sync="dialogTableVisible"
v-if="dialogTableVisible"
width="70%"
append-to-body
>
<DialogSelectUnit
:codeId="curRow"
v-on:selectSupUnit="selectSupUnit"
v-on:closeBindDialog="closeBindDialog"
></DialogSelectUnit>
</el-dialog>
<el-dialog
title="绑定产品ID"
:visible.sync="selectRlVisible"
width="80%"
v-if="selectRlVisible"
append-to-body
>
<selectRlDialog
:curRow="curRow"
v-on:selectBindRl="selectBindRl"
v-on:closeBindDialog="closeBindDialog"
></selectRlDialog>
</el-dialog>
</div>
</template>
@ -197,7 +230,7 @@
import {
orderGetUdi, orderList, codeList, orderListError,
saveOrderWeb,
mergeOrder, postOrdersWeb, errorCodeList, addOrderWeb, deleteCodesTempById, submitOrderWeb
mergeOrder, postOrdersWeb, errorCodeList, addOrderWeb, deleteCodesTempById, submitOrderWeb, updateCodeBindSup
} from "../../api/warehouse/order";
import draggable from "vuedraggable";
import {saveAs} from "file-saver";
@ -206,6 +239,8 @@ import {parseTime} from "../../filtres/index";
import store from "../../store";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType";
import DialogSelectUnit from "./DialogSelectUnit";
import selectRlDialog from "./DialogSelectRl";
const formJson = {
corpOrderId: "",
@ -262,12 +297,15 @@ export default {
formVisible: false,
deleteLoading: false,
orderNo: null,
curRow: null,
busTypes: [],
storageList: [],
selectRlVisible: false,
dialogTableVisible: false,
};
},
components: {
draggable,
draggable, DialogSelectUnit, selectRlDialog
},
methods: {
submit(formName) {
@ -275,10 +313,7 @@ export default {
this.$message.error('未添加条码');
return;
}
if (this.formData.billType == null) {
this.$message.error('未选择扫码单据类型');
return;
}
let tQuery = {
orderId: this.idQuery.id,
action: this.formData.billType,
@ -300,13 +335,20 @@ export default {
},
saveOrder() {
if (this.formData.billType == null || this.formData.billType == '') {
this.$message.error('未选择扫码单据类型');
return
}
if (this.formData.locStorageCode == null || this.formData.locStorageCode == '') {
this.$message.error('当前仓库不能为空');
return;
}
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData)));
tQuery.orderId = this.idQuery.id;
tQuery.actDate = parseTime(this.formData.actDate, '{y}-{m}-{d} {h}:{i}:{s}');
tQuery.action = tQuery.billType;
saveOrderWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
@ -328,6 +370,14 @@ export default {
if (event == null) {
this.$refs.inputRef.focus();
} else event.target.select();
if (this.$isBlank(this.formData.billType)) {
this.$message.warning("请选择单据类型!");
return;
}
if (this.$isBlank(this.formData.locStorageCode)) {
this.$message.error('当前仓库不能为空');
return;
}
this.formData.corpOrderId = this.formData.corpOrderId.trim();
if (this.$isBlank(this.formData.corpOrderId)) {
let date = new Date();
@ -345,17 +395,44 @@ export default {
if (response.code === 20000) {
this.idQuery.id = response.data;
this.corpOrderIdDisabled = true;
this.$refs.inputRef.focus();
this.getCodeList();
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
}
});
// this.$message.error(response.message);
this.corpOrderIdDisabled = true;
if (response.code == 502) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.bindRl(response.data);
}
});
} else if (response.code == 503) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.handleUnitClick(response.data);
}
});
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
}
});
}
}
this.loading = false;
});
@ -465,8 +542,50 @@ export default {
},
actionChange(item) {
this.curAction = this.getActionItem(item);
this.formData.locStorageCode = this.curAction.storageCode;
// this.formData.locStorageCode = this.curAction.storageCode;
},
//
bindRl(val) {
console.log("curRow.erpId = " + val.id);
this.curRow = val;
this.selectRlVisible = true;
},
selectBindRl(row) {
let query = {
id: this.curRow.id,
relId: row.id,
};
console.log("row.relId = " + row.id);
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
});
},
closeBindDialog(val) {
console.log("closeBindDialog" + val);
this.selectRlVisible = false;
this.dialogTableVisible = false;
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (row.supId == null || row.relId == null) {
//rowBackground.background="#f6f5ee";
rowBackground.color = '#f60303';
}
return rowBackground;
},
},
filters: {},
mounted() {

@ -11,10 +11,10 @@
>查询
</el-button
>
<el-button type="primary" icon="search" @click="deleteDialog"
>删除
</el-button
>
<!-- <el-button type="primary" icon="search" @click="deleteDialog"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
</el-button-group>
</el-form-item>
</el-form>
@ -23,36 +23,96 @@
:data="codeArry"
style="width: 100%"
ref="multipleTable"
:row-style="rowStyle"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<!-- <el-table-column type="selection" width="55"></el-table-column>-->
<el-table-column label="序号" type="index" fixed></el-table-column>
<!-- <el-table-column label="ID" prop="id" fixed></el-table-column> -->
<el-table-column label="条码" prop="code" fixed></el-table-column>
<el-table-column
label="供应商"
prop="supId"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="扫码数量"
prop="count"
width="220"
show-overflow-tooltip
></el-table-column>
<el-table-column label="创建时间" prop="actDate">
<!-- <el-table-column label="创建时间" prop="actDate">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span>{{ scope.row.actDate }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right" width="250">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.actDate }}</span>
<el-button
type="text"
size="small"
@click.native.stop="deleteCode(scope.$index, scope.row)"
>删除
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.relId != null "
@click.native.stop="bindRl(scope.row)"
>选择产品
</el-button
>
<el-button
type="text"
size="small"
:disabled=" scope.row.supId !=null"
@click.native.stop="handleUnitClick(scope.row)"
>选择供应商
</el-button
>
</template>
</el-table-column>
<!-- <el-table-column label="操作员" prop="actor" fixed>
<el-button type="text" size="small" @click.native.stop="onDelete(scope.$index)">删除</el-button>
</el-table-column>-->
</el-table>
</el-table>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
<el-dialog
title="选择供应商"
:visible.sync="dialogTableVisible"
v-if="dialogTableVisible"
width="70%"
append-to-body
>
<DialogSelectUnit
:codeId="curRow"
v-on:selectSupUnit="selectSupUnit"
v-on:closeBindDialog="closeBindDialog"
></DialogSelectUnit>
</el-dialog>
<el-dialog
title="绑定产品ID"
:visible.sync="selectRlVisible"
width="80%"
v-if="selectRlVisible"
append-to-body
>
<selectRlDialog
:curRow="curRow"
v-on:selectBindRl="selectBindRl"
v-on:closeBindDialog="closeBindDialog"
></selectRlDialog>
</el-dialog>
</div>
</template>
@ -60,10 +120,12 @@
import {
orderList,
errorCodeList,
deleteCodes,
deleteCodes, updateCodeBindSup,
} from "../../api/warehouse/order";
import draggable from "vuedraggable";
import {saveAs} from "file-saver";
import DialogSelectUnit from "./DialogSelectUnit";
import selectRlDialog from "./DialogSelectRl";
export default {
name: "idQuery",
@ -89,11 +151,14 @@ export default {
formVisible: false,
deleteLoading: false,
orderNo: null,
curRow: null,
multipleSelection: [],
selectRlVisible: false,
dialogTableVisible: false,
};
},
components: {
draggable,
draggable, DialogSelectUnit, selectRlDialog
},
methods: {
handleSelectionChange(val) {
@ -181,6 +246,69 @@ export default {
// this.$router.push({path:'../readme/detail',query:{id:row.corpOrderId}});
this.$router.go(-1);
},
//
bindRl(val) {
this.curRow = val;
this.selectRlVisible = true;
},
handleUnitClick(row) {
this.curRow = row;
this.dialogTableVisible = true;
},
selectSupUnit(row) {
let query = {
id: this.curRow.id,
supId: row.erpId,
};
console.log("row.erpId = " + row.erpId);
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
});
},
selectBindRl(row) {
let query = {
id: this.curRow.id,
relId: row.id,
};
console.log("row.relId = " + row.id);
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
} else {
this.$message.error("绑定失败");
}
}).catch(() => {
});
},
closeBindDialog(val) {
console.log("closeBindDialog" + val);
this.selectRlVisible = false;
this.dialogTableVisible = false;
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (row.supId == null || row.relId == null) {
//rowBackground.background="#f6f5ee";
rowBackground.color = '#f60303';
}
return rowBackground;
},
},
filters: {},
mounted() {

@ -64,24 +64,26 @@
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
<span>业务类型</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
clearable>
<!-- @change="actionChange"-->
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择业务类型"
@change="actionChange" clearable>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
v-for="item in busTypes"
:key="item.localAction"
:label="item.localName"
:value="item.localAction">
<span style="float: left">{{ item.localName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>往来单位</span>
@ -89,7 +91,7 @@
</el-col>
<el-col :span="7">
<el-form-item class="query-form-item" prop="corpName"
v-if="curAction.corpType ==0">
v-if="curAction.corpType ==0 || curAction.corpType == 3 || (curAction.corpType == 2 && !curAction.genUnit)">
<el-select
v-model="formData.corpName"
filterable
@ -136,7 +138,8 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp" v-if="curAction.corpType ==2">
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==2 && curAction.genUnit">
<el-input v-model="formData.corpName" auto-complete="off"
clearable
placeholder="请输入病人住院号"
@ -146,23 +149,22 @@
</el-row>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>业务类型</span>
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="7">
<!-- @change="actionChange"-->
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择业务类型"
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
clearable>
<el-option
v-for="item in busTypes"
:key="item.localAction"
:label="item.localName"
:value="item.localAction">
<span style="float: left">{{ item.localName }}</span>
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
@ -1212,7 +1214,7 @@ export default {
getBusType(invCode) {
let query = {
enabled: true,
code: invCode,
// code: invCode,
};
getLocalJoinByUser(query)
.then((response) => {
@ -1234,11 +1236,32 @@ export default {
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;
@ -1252,14 +1275,15 @@ export default {
}
},
actionChange(item) {
console.log("item = " + item);
if (item == '') {
this.formData.locStorageCode == null;
} else {
this.curAction = this.getActionItem(item);
this.formData.locStorageCode = this.curAction.storageCode;
console.log(this.curAction.corpType + "---" + this.formData.locStorageCode + "-----" + this.curAction.action);
}
// console.log("item = " + item);
// if (item == '') {
// this.formData.locStorageCode == null;
// } else {
this.curAction = this.getActionItem(item);
this.formData.locStorageCode = this.curAction.storageCode;
console.log(this.curAction.corpType + "---" + this.formData.locStorageCode + "-----" + this.curAction.action);
this.findMethod();
// }
},
locInChange(item) {

@ -47,28 +47,6 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.billType" placeholder="请选择业务类型" clearable="true" size="mini">
<el-option
v-for="item in busTypes"
:key="item.localName"
:label="item.localName"
:value="item.localAction">
<span style="float: left">{{ item.localName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.locStorageCode" placeholder="请选择当前仓库" clearable="true" size="mini">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker

Loading…
Cancel
Save