中继服务同步设置
parent
80700bc193
commit
bb82c73b78
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"BASE_URL": "http://192.168.0.109:9996",
|
"BASE_URL": "http://139.9.178.73:8080/SPMS_SERVER",
|
||||||
"SERVER_IP": "http://192.168.0.109:9996",
|
"SERVER_IP": "http://139.9.178.73:8080/SPMS_SERVER",
|
||||||
"hosp_name": "诏安县总医院(测试)"
|
"hosp_name": "诏安县总医院(测试)"
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
import axios from "../../utils/axios";
|
||||||
|
|
||||||
|
|
||||||
|
export function filterProducts(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/prein/inv/products/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterDetailProducts(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/prein/inv/products/filterDetail",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteProducts(query) {
|
||||||
|
return axios(
|
||||||
|
{
|
||||||
|
url: "/spms/prein/inv/products/delete",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export function statDetailProducts(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/prein/inv/products/stat",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,259 @@
|
|||||||
|
<template>
|
||||||
|
<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-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-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"
|
||||||
|
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="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="入库数量"
|
||||||
|
prop="inCount"
|
||||||
|
width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="出库数量"
|
||||||
|
prop="outCount"
|
||||||
|
width="150"
|
||||||
|
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"
|
||||||
|
width="200"
|
||||||
|
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>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
filterDetailProducts, statDetailProducts
|
||||||
|
} from "../../api/inventory/InvPreInProducts";
|
||||||
|
import store from "../../store";
|
||||||
|
import draggable from "vuedraggable";
|
||||||
|
import {getBussinessType} from "../../api/basic/bussinessType";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
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: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
draggable,
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
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(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filters: {},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getBusType();
|
||||||
|
this.getCodeList();
|
||||||
|
this.getStat();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,355 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card>
|
||||||
|
<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.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"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<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" width="120"></el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="cpmctymc" width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<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="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
|
||||||
|
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-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="库存详情"
|
||||||
|
:visible.sync="codeDetailVisible"
|
||||||
|
width="85%"
|
||||||
|
v-if="codeDetailVisible"
|
||||||
|
>
|
||||||
|
<codeDetail
|
||||||
|
:idQuery="idQuery"
|
||||||
|
v-on:closeDetailDialog="closeDetailDialog"
|
||||||
|
></codeDetail>
|
||||||
|
</el-dialog>
|
||||||
|
<el-pagination
|
||||||
|
:page-size="filterQuery.limit"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
filterProducts,
|
||||||
|
deleteProducts,
|
||||||
|
} from "../../api/inventory/InvPreInProducts";
|
||||||
|
import draggable from "vuedraggable";
|
||||||
|
import codeDetail from "./InvPreInProductsDetail";
|
||||||
|
import store from "../../store";
|
||||||
|
import {getBussinessType} from "../../api/basic/bussinessType";
|
||||||
|
import {filterCustomers} from "@/api/auth/customer";
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filterQuery: {
|
||||||
|
cpmctymc: null,
|
||||||
|
nameCode: null,
|
||||||
|
relIdFk: null,
|
||||||
|
batchNo: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
customerId: null,
|
||||||
|
unitFk: null,
|
||||||
|
},
|
||||||
|
detailQuery: {
|
||||||
|
code: null,
|
||||||
|
productIdFk: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
fromOptions: [],
|
||||||
|
codeDetailVisible: false,
|
||||||
|
total: 0,
|
||||||
|
loading: true,
|
||||||
|
index: null,
|
||||||
|
dialogTableVisible: false,
|
||||||
|
formLoading: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
deleteLoading: false,
|
||||||
|
busTypes: [],
|
||||||
|
idQuery: null,
|
||||||
|
showSup: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
draggable,
|
||||||
|
codeDetail,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
cpmctymc: null,
|
||||||
|
nameCode: null,
|
||||||
|
relIdFk: null,
|
||||||
|
batchNo: null,
|
||||||
|
customerId: null,
|
||||||
|
page: 1, unitFk: null,
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.loading = true;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.filterQuery.limit = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleUnitClick(row) {
|
||||||
|
this.curIndex = row.id;
|
||||||
|
this.dialogTableVisible = true;
|
||||||
|
},
|
||||||
|
closeDetailDialog(val) {
|
||||||
|
this.codeDetailVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
closeDialog() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.filterQuery.customerId = store.getters.customerId;
|
||||||
|
filterProducts(this.filterQuery)
|
||||||
|
.then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
this.loading = false;
|
||||||
|
this.showSup = response.data.showSup;
|
||||||
|
this.list = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteOrders(data) {
|
||||||
|
this.loading = true;
|
||||||
|
let query = {
|
||||||
|
id: data,
|
||||||
|
}
|
||||||
|
deleteProducts(query)
|
||||||
|
.then((response) => {
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.getList();
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: "删除成功!",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteDialog(rowId) {
|
||||||
|
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.deleteOrders(rowId);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
findMethod(query) {
|
||||||
|
console.log(query);
|
||||||
|
this.fromOptions = [];
|
||||||
|
let cQuery = {
|
||||||
|
key: query,
|
||||||
|
customerName: query,
|
||||||
|
|
||||||
|
};
|
||||||
|
// getBasicUnitMaintains(cQuery)
|
||||||
|
// .then((response) => {
|
||||||
|
// this.loading = false;
|
||||||
|
// this.fromOptions = response.data.page.list || [];
|
||||||
|
// })
|
||||||
|
// .catch(() => {
|
||||||
|
// this.loading = false;
|
||||||
|
// });
|
||||||
|
filterCustomers(cQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.fromOptions = response.data.list || [];
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.fromOptions = [];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
intentDetail(row) {
|
||||||
|
|
||||||
|
this.idQuery = row;
|
||||||
|
// this.idQuery.supId = null;
|
||||||
|
this.idQuery.customerId = null;
|
||||||
|
this.codeDetailVisible = true;
|
||||||
|
},
|
||||||
|
getBusType() {
|
||||||
|
let query = {
|
||||||
|
enabled: true,
|
||||||
|
};
|
||||||
|
getBussinessType(query)
|
||||||
|
.then((response) => {
|
||||||
|
this.busTypes = response.data.list || [];
|
||||||
|
this.filterQuery.billAction = this.busTypes[0].action;
|
||||||
|
// this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getActionName(action) {
|
||||||
|
for (let i = 0; i < this.busTypes.length; i++) {
|
||||||
|
if (this.busTypes[i].action === action) {
|
||||||
|
return this.busTypes[i].name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
false: "success",
|
||||||
|
true: "danger",
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findMethod();
|
||||||
|
this.getBusType();
|
||||||
|
let query = this.$route.query;
|
||||||
|
this.filterQuery = Object.assign(this.filterQuery, query);
|
||||||
|
this.filterQuery.limit = parseInt(this.filterQuery.limit);
|
||||||
|
// 加载表格数据
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
@ -0,0 +1,209 @@
|
|||||||
|
<template>
|
||||||
|
<el-card>
|
||||||
|
|
||||||
|
<el-descriptions class="margin-top" title="数据同步设置" :column="1" :size="100" border>
|
||||||
|
<template slot="extra">
|
||||||
|
<el-button type="primary" size="small" @click="saveConfig()">保存</el-button>
|
||||||
|
</template>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
参数设置
|
||||||
|
</template>
|
||||||
|
<el-row :gutter="20" class="el-row" type="flex">
|
||||||
|
<el-col :span="4" class="el-col" style="margin-top: 6px">
|
||||||
|
<el-checkbox v-model="configQuery.downstreamEnable">下游是否联通</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="20" class="el-col">
|
||||||
|
<div>
|
||||||
|
<span>数据同步轮询时间(单位:分钟): </span>
|
||||||
|
<el-input
|
||||||
|
style="width: 100px"
|
||||||
|
size="small"
|
||||||
|
type="number"
|
||||||
|
v-model="configQuery.syncTime"
|
||||||
|
splaceholder="请输入内容"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
单据类型
|
||||||
|
</template>
|
||||||
|
<el-checkbox v-model="configQuery.typeBus">业务单据类型</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.typeScan">扫码单据类型</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.typeThird">第三方单据类型</el-checkbox>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
基础信息
|
||||||
|
</template>
|
||||||
|
<el-checkbox v-model="configQuery.basicProducts">耗材字典</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.basicCorp">往来单位字典</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.basicInv">仓库字典</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.basicThirdProducts">第三方产品信息</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.basicThirdCorp">第三方往来信息</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.basicThirdInv">第三方仓库信息</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.basicThirdBusOrder">第三方业务单据</el-checkbox>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
国家库DI数据
|
||||||
|
</template>
|
||||||
|
<el-checkbox v-model="configQuery.dbDiProducts">DI产品信息</el-checkbox>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions class="margin-top" title="" :column="1" :size="100" style="margin-top: 30px" border>
|
||||||
|
|
||||||
|
<el-descriptions-item label="单据(单据类型)" label-style="width: 150px">
|
||||||
|
<el-checkbox-group v-model="checkedBusTypes" @change="handleCheckedChange" >
|
||||||
|
<el-checkbox
|
||||||
|
style="padding-top: 10px"
|
||||||
|
v-for="busType in busTypes" :label="busType" :key="busType.action"
|
||||||
|
:value="busType.action">{{ busType.name }}
|
||||||
|
|
||||||
|
|
||||||
|
</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
单据(单据状态)
|
||||||
|
</template>
|
||||||
|
<el-checkbox v-model="configQuery.orderUnCheck">待校验单据</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.orderUnReceive">未验收单据</el-checkbox>
|
||||||
|
<el-checkbox v-model="configQuery.orderScanFinish">已完成单据</el-checkbox>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {findConfig, updateConfig} from "@/api/thrsys/spsSyncStatus";
|
||||||
|
import store from "@/store";
|
||||||
|
import {getBussinessType} from "@/api/basic/bussinessType";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "SysUdimsConfig",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
configQuery: {
|
||||||
|
id: null,
|
||||||
|
typeBus: null,
|
||||||
|
typeScan: null,
|
||||||
|
typeThird: null,
|
||||||
|
basicProducts: null,
|
||||||
|
basicCorp: null,
|
||||||
|
basicInv: null,
|
||||||
|
basicThirdProducts: null,
|
||||||
|
basicThirdCorp: null,
|
||||||
|
basicThirdInv: null,
|
||||||
|
basicThirdBusOrder: null,
|
||||||
|
orderScanFinish: null,
|
||||||
|
dbDiProducts: null,
|
||||||
|
downstreamEnable: null,
|
||||||
|
syncTime: null,
|
||||||
|
orderUnCheck: null,
|
||||||
|
orderUnReceive: null,
|
||||||
|
busTypes: [],
|
||||||
|
},
|
||||||
|
checkedBusTypes: [],
|
||||||
|
busTypes: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getConfig() {
|
||||||
|
findConfig()
|
||||||
|
.then((response) => {
|
||||||
|
if (response.code == 20000) {
|
||||||
|
// debugger
|
||||||
|
this.configQuery = response.data;
|
||||||
|
if (this.configQuery.busTypes != null) {
|
||||||
|
for (let i = 0; i < this.configQuery.busTypes.length; i++) {
|
||||||
|
|
||||||
|
for (let k = 0; k < this.busTypes.length; k++) {
|
||||||
|
if (this.busTypes[k].action == this.configQuery.busTypes[i]) {
|
||||||
|
this.checkedBusTypes.push(this.busTypes[k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(this.checkedBusTypes);
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveConfig() {
|
||||||
|
if (this.checkedBusTypes != null) {
|
||||||
|
this.configQuery.busTypes = [];
|
||||||
|
for (let i = 0; i < this.checkedBusTypes.length; i++) {
|
||||||
|
this.configQuery.busTypes.push(this.checkedBusTypes[i].action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
updateConfig(this.configQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.$message.success("更新成功!");
|
||||||
|
this.getConfig();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCheckedChange() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getBusType() {
|
||||||
|
let query = {
|
||||||
|
enabled: true,
|
||||||
|
};
|
||||||
|
getBussinessType(query)
|
||||||
|
.then((response) => {
|
||||||
|
this.busTypes = response.data.list || [];
|
||||||
|
this.getConfig();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.headers = {
|
||||||
|
ADMIN_ID: store.getters.adminId,
|
||||||
|
ADMIN_TOKEN: store.getters.token,
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getBusType();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue