新增供应商关联选入产品信息界面

master
anthonyywj2 3 years ago
parent d63186a069
commit 4b5d6dfddb

@ -1,6 +1,6 @@
{
"UDI_SYNC_SERVER_IP": "http://192.168.0.109:9995/",
"BASE_URL":"http://139.9.178.73:8080/UDI_WMS_MC/",
"SERVER_IP": "http://139.9.178.73:8080/",
"BASE_URL":"http://192.168.0.109:9991/",
"SERVER_IP": "http://192.168.0.109:9991/",
"WEBSOCKET_URL": "ws://192.168.0.109:9991/UDI_WMS_MC/api/websocket/"
}

@ -30,3 +30,10 @@ export function downloadBussinessType(query) {
data: query
});
}
export function getOriginJoinBusType(query) {
return axios({
url: "/udiwms/originBusType/filterJoin",
method: "get",
params: query
});
}

@ -19,9 +19,26 @@ export function insertFilter(query) {
);
}
export function insertCompanyProductRelevance(query) {
return axios(
{
url: "/sale/info/insertCompanyProductRelevance",
method: "post",
data: query
}
);
}
export function deleteCompanyProductRelevance(query) {
return axios(
{
url: "/sale/info/deleteCompanyProductRelevance",
method: "post",
data: query
}
);
}

@ -0,0 +1,9 @@
import axios from "@/utils/axios";
export function inserThrOrderWeb(query) {
return axios({
url: "/udiwms/thrsys/order/insertWeb",
method: "post",
data: query
});
}

@ -97,7 +97,8 @@ import UdiInfoDonwloadSmp from "../views/basic/UdiInfoDonwloadSmp.vue";
import thrOrderExportSmp from "../views/thrsys/ThrOrderExportSmp.vue";
import thrProductsExportSmp from "../views/thrsys/ThrProductsExportSmp.vue";
import thrCorpsExportSmp from "../views/thrsys/ThrCorpsExportSmp.vue";
import receiveOrderNew from "../views/thrsys/ThrOrdedrReceiveAdd.vue";
import receiveOrderSearch from "../views/thrsys/ThrOrdedrReceiveSearch.vue";
import thrInvWarehouse from "@/views/thrsys/ThrInvWarehouse";
import syncConfig from "../views/thrsys/SysUdimsConfig.vue";
@ -336,7 +337,34 @@ export const asyncRouterMap = [
// authRule: ["inout/ioErrorOrder"]
// }
// },
{
path: "/receiveOrder",
component: Empty,
name: "耗材领用管理",
redirect: "/receiveOrder/receiveOrderNew",
meta: {
authRule: ["receiveOrder"]
},
children: [
{
path: "receiveOrderNew",
component: receiveOrderNew,
name: "新增领用单据",
meta: {
authRule: ["stock/receiveOrderNew"]
}
},
{
path: "receiveOrderSearch",
component: receiveOrderSearch,
name: "领用单查询",
meta: {
authRule: ["stock/receiveOrderSearch"]
}
},
]
},
{
path: "/inoutOrder",

@ -5,7 +5,7 @@
<el-row>
<el-form-item class="query-form-item">
<el-select
v-model="filterQuery.companyName"
v-model="filterQuery.unitFk"
filterable
remote
clearable="true"
@ -18,7 +18,7 @@
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
@ -68,6 +68,13 @@
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button>
<el-button
type="primary"
icon="search"
@click="selectProduct()"
>选入产品
</el-button
>
<el-button type="primary" icon="search" @click="lockProducts('3')" v-if="isSpCombine"
>锁定
</el-button
@ -147,7 +154,7 @@
</template>
</el-table-column>
<el-table-column width="80" label="操作" fixed="right">
<el-table-column width="200" label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@ -155,6 +162,13 @@
@click.native.stop="handleModifyClick(scope.row)"
>详情
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="deleteClick(scope.row)"
>移除
</el-button>
</template>
</el-table-column>
</el-table>
@ -696,12 +710,31 @@
@closeUdi="closeUdi"
></selectUdiVersion>
</el-dialog>
<el-dialog
title="选入产品信息"
:visible.sync="selectProductVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="selectProductVisible"
>
<selectProduct
:closeSelDialog="closeDialog"
:uuid="uuid"
:unitFk="filterQuery.unitFk"
></selectProduct>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template>
@ -718,9 +751,9 @@ import {
} from "../../api/basic/udiRelevance";
import {selectSysParamByKey} from "../../api/param/systemParamConfig";
import {filterByUuid, filterCompany} from "../../api/basic/udiInfo";
import {filterCompanyProductRelevance} from "../../api/basic/companyProductRelevance";
import {filterCompanyProductRelevance, deleteCompanyProductRelevance} from "../../api/basic/companyProductRelevance";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import selectProduct from "./basicCompanyProductsImport";
import selectUdi from "./UdiInfoRelevance.vue";
import selectErp from "./UdiInfoselectErpUdi";
import selectLocalUdi from "./UdiInfoSelectLocalUdi";
@ -742,6 +775,7 @@ export default {
thrPiId: null,
filterType: null,
companyName: null,
unitFk: null,
},
fromOptions: [],
editQuery: null,
@ -776,6 +810,7 @@ export default {
cpmctymc: null,
ggxh: null
},
selectProductVisible: false,
multipleSelection: [],
editDialogVisible: false, //
selectUdiDialogVisible: false, //
@ -798,7 +833,8 @@ export default {
unionCode: null,
udiCode: null,
ylqxzcrbarmc: "",
cpmctymc: "", thrPiId: null,
cpmctymc: "",
thrPiId: null,
nameCode: "",
ggxh: null,
page: 1,
@ -808,6 +844,10 @@ export default {
this.getList();
},
getList() {
if (this.$isBlank(this.filterQuery.unitFk)) {
this.$message.error("请先选择供应商!");
return;
}
this.loading = true;
filterCompanyProductRelevance(this.filterQuery)
.then((response) => {
@ -1026,6 +1066,37 @@ export default {
},
deleteClick(row) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.productLoading = true;
let tquery = {
id: row.id,
};
deleteCompanyProductRelevance(tquery)
.then((response) => {
this.productLoading = false;
if (response.code === 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.productLoading = false;
});
}).catch(() => {
});
},
lockProducts(status) {
let selectData = this.multipleSelection;
let postQuery = {
@ -1112,6 +1183,7 @@ export default {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.selectProductVisible = false;
},
onAddSubmit() {
if (this.checked == true) {
@ -1179,7 +1251,7 @@ export default {
},
findMethod(query) {
console.log(query);
this.fromOptions = [];
let cQuery = {
key: query,
page: 1,
@ -1192,25 +1264,34 @@ export default {
})
.catch(() => {
this.loading = false;
this.options = [];
this.fromOptions = [];
});
},
selectProduct() {
this.selectProductVisible = true;
},
}
,
mounted() {
},
}
,
components: {
selectUdi,
selectErp,
selectLocalUdi,
},
selectProduct
}
,
created() {
this.getList();
// this.getList();
this.selectSysParam();
this.getSysFilter();
this.findMethod();
},
};
}
,
}
;
</script>
<style scoped>
.itemTag {

@ -0,0 +1,956 @@
<template>
<div>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.unionCode" placeholder="DI/医保编码/商品条码" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.filterType" placeholder="请选择过滤对照条件">
<el-option
v-for="item in filterList"
:key="item.filterType"
:label="item.sysName"
:value="item.filterType">
<span style="float: left">{{ item.sysName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.supName" placeholder="配送企业" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="submitSearch"></el-button>
<el-button type="primary" icon="search" @click="selectExport"
>选中导入
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="最小销售产品标识"
prop="nameCode"
width="140"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品编码"
prop="thirdId"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产企业"
prop="ylqxzcrbarmc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品通用名"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="ggxh"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案凭证"
prop="zczbhhzbapzbh"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="器械类别"
prop="qxlb"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="配送企业"
prop="supName"
show-overflow-tooltip
></el-table-column>
<el-table-column width="200" label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>详情
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="产品信息详情"
:visible.sync="editDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="editDialogVisible"
>
<el-table :data="sysList" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="第三方系统名称"
prop="sysName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="第三方产品名称"
prop="thirdName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="第三方产品ID"
prop="thirdId"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-table
v-loading="loading"
:data="detailList"
style="width: 100%; margin-top: 20px"
border
@current-change="handleDetail"
>
<el-table-column
label="产品标识"
prop="nameCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品通用名"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装级别"
prop="packLevel"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装层级"
prop="bzcj"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-form
:model="editQuery"
:rules="rules"
ref="editQuery"
label-width="100px"
style="margin-top: 20px"
>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.cpmctymc"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品标识:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.nameCode"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>规格型号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ggxh"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>器械类别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.qxlb"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品类别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.cplb"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>分类编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.flbm"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>商品条码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.sptm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医保编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ybbm"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医疗器械注册人:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="ylqxzcrbarmc"
v-model="editQuery.ylqxzcrbarmc"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册人英文名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ylqxzcrbarywmc"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>统一社会信用号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.tyshxydm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册证/备案号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.zczbhhzbapzbh"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>上级产品编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.sjcpbm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装级别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.packLevel"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.bzcj"
:disabled="true"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级包装数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.bhxjsl"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级产品编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
:disabled="true"
splaceholder="请输入内容"
v-model="editQuery.bhxjcpbm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含最小销售包装数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
:disabled="true"
splaceholder="请输入内容"
v-model="editQuery.bhzxxsbzsl"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含批号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.scbssfbhph"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含序列号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
v-model="editQuery.scbssfbhxlh"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含生产日期:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.scbssfbhscrq"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>是否包含失效日期:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
v-model="editQuery.scbssfbhsxrq"
size="small"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品描述:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.cpms"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>最小包装单元内包含使用单元数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.zxxsbzbhsydysl"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="checked" class="text item itemTag"
>以使用单元数量入库
</el-checkbox>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import {
getUdiInfos,
updateErpProduct,
thirdSysDetail,
getSmUdiInfos
} from "../../api/basic/udiRelevance";
import {udiUpload} from "../../api/thrsys/smp"
import {exportExcel} from "../../api/basic/udiInfoExport"
import {selectSysParamByKey} from "../../api/param/systemParamConfig";
import {filterByUuid} from "../../api/basic/udiInfo";
import {
insertCompanyProductRelevance,
updateCompanyProductRelevance, insertFilter
} from "../../api/basic/companyProductRelevance";
import store from "../../store";
export default {
name: "UdIInfoSelect",
props: {
unitFk: {
type: Object,
required: true,
},
selectType: {
type: Object,
required: true,
},
closeSelDialog: {
type: Function,
required: true,
},
},
data() {
return {
filterQuery: {
customerId: null,
uuids: [],
rlIds: [],
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
limit: 20,
addType: 1,
isDisable: false,
},
editQuery: null,
relevanceEdit: {
id: null,
thirdId: "",
isUseDy: false,
},
isImport: false,
isImportUdi: false,
isUploadSmp: false,
isImportFile: false,
uploadFileUrl: null,
checked: false,
list: [],
detailList: [],
sysList: [],
total: 0,
thirdNo: "",
uuid: "111",
thirdId: null,
relId: "",
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null
},
multipleSelection: [],
editDialogVisible: false,
selectUdiDialogVisible: false,
selectErpDialogVisible: false,
selectLocalVisible: false,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
customerId: null,
uuids: [],
rlIds: [],
ylqxzcrbarmc: "",
supName: null,
cpmctymc: "",
nameCode: "",
page: 1,
limit: 20,
unitFk: null,
addType: 1,
};
this.getList();
},
submitSearch() {
this.filterQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.customerId = store.getters.customerId;
getSmUdiInfos(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getDetailList(detailQuery) {
this.loading = true;
filterByUuid(detailQuery)
.then((response) => {
this.loading = false;
this.detailList = response.data || [];
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
},
handleDetail(row) {
this.editQuery = row;
console.log(row);
},
combine() {
this.combineQuery.productUuid = this.currentRow.uuid;
this.combineQuery.customerId = store.getters.customerId;
insertCompanyProductRelevance(this.combineQuery).then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("添加成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
},
selectExport() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.rlIds.push(obj.id);
});
this.filterQuery.unitFk = this.unitFk;
this.allExport();
},
allExport() {
this.filterQuery.customerId = store.getters.customerId;
insertFilter(this.filterQuery).then(response => {
this.loading = false;
if (response.code == 20000) {
this.$message.success(response.data);
console.log("关闭弹窗");
this.$emit("closeSelDialog", true);
this.closeSelDialog();
} else {
this.$message.error(response.message);
}
});
},
intentDetail() {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
},
intentImportErp(val) {
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.selectErpDialogVisible = true;
},
uploadSMP() {
var selectData = this.multipleSelection;
selectData.forEach((obj) => {
this.filterQuery.uuids.push(obj.uuid);
});
this.allUploadSMP();
},
allUploadSMP() {
udiUpload(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
this.$emit("cancelDialog", true);
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
this.$emit("cancelDialog", true);
});
},
handleSelectionChange(val) {
console.log("----" + val);
this.multipleSelection = val;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleModifyClick(row) {
this.editDialogVisible = true;
this.editQuery = row;
this.relevanceEdit = {
id: row.id,
thirdId: row.thirdId,
isUseDy: row.isUseDy,
};
this.checked = row.isUseDy == 1;
let ttquery = {
uuid: row.uuid,
page: 1,
limit: 10,
};
console.log("this.editQuery.isUseDy = " + this.editQuery.isUseDy);
this.getDetailList(ttquery);
this.getThirdSysDetail();
},
closeUdi(val) {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
if (val) {
this.getList();
}
},
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
checkSelectable(row) {
return !row.isSelect;
},
uploadErpProduct() {
updateErpProduct()
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: response.data,
});
this.$emit("closeDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
},
selectSysParam() {
let query = {
paramKey: "smp_isUploadProuct",
};
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isUploadSmp = true;
}
}
});
let query1 = {
paramKey: "upload_pi_file_enabled",
};
selectSysParamByKey(query1).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isImportFile = true;
}
}
});
let query2 = {
paramKey: "upload_pi_file_url",
};
selectSysParamByKey(query2).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.paramValue;
}
});
},
},
mounted() {
},
components: {},
created() {
console.log(" this.filterQuery.unitFk = " + this.unitFk)
this.getList();
this.selectSysParam();
},
};
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -0,0 +1,496 @@
<template>
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery"
class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.corpName"
placeholder="往来单位"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.thirdSysName
}}</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
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="newDistributionForm()" :loading="loading">
新增订单
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="第三方单据类型" prop="billType"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId"></el-table-column>
<el-table-column label="往来单位" prop="corpName"
show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="单据状态" prop="billFlag"></el-table-column>-->
<el-table-column label="单据日期" prop="billdate"></el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native="newDistributionForm(scope.$index, scope.row)"
>编辑
</el-button
>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<!-- <el-table-column label="单据数量" prop="reCount"></el-table-column>-->
<el-table-column label="单据数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
title="编辑"
:visible.sync="newSpDistributionVisible"
width="80%"
v-if="newSpDistributionVisible"
@close='closeDialog'
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<thrOrderNew
:closeDialog="closeDialog"
:idQuery="idQuery"
:closeConfirmFunction="closeConfirmFunction"
></thrOrderNew>
</el-dialog>
</div>
</template>
<script>
import {
delThrOrders, delAll, downloadAll
} from "../../api/thrsys/thrOrder";
import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {getOriginBusType} from "../../api/basic/busOriginType";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
import {selectIp} from "../../api/param/systemParamConfig";
import {
getCloudErp,
} from "../../api/inout/erpOrder";
import thrOrderNew from "./thrOrderNew";
import store from "@/store";
export default {
data() {
return {
filterQuery: {
billAction: null,
billNo: "",
originType: null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
},
idQuery: {},
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
detailList: [],
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
closeConfirm: false,
loading: false,
actDateRange: [],
newSpDistributionVisible: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 1,
};
this.actDateRange = [];
this.getList();
},
getList() {
if (this.filterQuery.thirdSysFk == null) {
this.$message.warning("请先选择第三方系统!")
return;
}
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
getCloudErp(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
this.detailList = row.subErpOrders;
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: row.id,
};
delThrOrders(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
clearAll() {
this.$confirm("此操作将清空所有单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delAll()
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.success(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.selectSysParam();
this.getThirdSysDetail();
this.getBusType();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/pi/upload";
}
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getThirdSysDetail();
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "orderQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
downloadDatas() {
let query = {
billAction: this.filterQuery.billAction
};
downloadAll(query).then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
closeConfirmFunction(type) {
if (this.$isNotBlank(type) && type) {
this.closeConfirm = type;
}
},
getlocalName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].localName;
}
}
},
getBusType() {
let query = {
enabled: true,
corpType:1,
};
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.getList();
})
.catch(() => {
});
getOriginBusType(query)
.then((response) => {
this.originTypes = response.data.list || [];
// this.filterQuery.originType = this.originTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
closeDialog() {
this.newSpDistributionVisible = false;
this.getList();
this.detailList = [];
},
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
}
this.newSpDistributionVisible = true;
},
},
components: {
thrOrderNew,
},
mounted() {
},
created() {
this.getBasicThirdSys();
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
},
};
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -0,0 +1,499 @@
<template>
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery"
class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.corpName"
placeholder="往来单位"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.thirdSysName
}}</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
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<!--<el-form-item class="query-form-item">-->
<!--<el-select v-model="filterQuery.thirdSysFk" placeholder="请选择第三方系统">-->
<!--<el-option-->
<!--v-for="item in thirdSys"-->
<!--:key="item.value"-->
<!--:label="item.thirdName"-->
<!--:value="item.thirdId">-->
<!--<span style="float: left">{{ item.thirdName }}</span>-->
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>-->
<!--</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button>
<!--<el-button type="primary" icon="search" @click="clearAll"></el-button>-->
<!--<el-upload-->
<!--v-if="!this.thirdSysDetail.enabled"-->
<!--:action="uploadFileUrl"-->
<!--multiple-->
<!--:limit="3"-->
<!--:data="uploadData"-->
<!--:show-file-list="false"-->
<!--:on-success="handleChange"-->
<!--:file-list="fileList"-->
<!--&gt;-->
<!--<el-button size="mini" type="primary">导入业务单据</el-button>-->
<!--</el-upload>-->
<!--<el-button type="primary" icon="search" @click="downloadDatas"-->
<!--v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.itrCache">导入业务单据-->
<!--</el-button>-->
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="第三方单据类型" prop="billType"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId"></el-table-column>
<el-table-column label="往来单位" prop="corpName"
show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="单据状态" prop="billFlag"></el-table-column>-->
<el-table-column label="单据日期" prop="billdate"></el-table-column>
<!-- <el-table-column label="扫码单据类型" prop="billType">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getActionName(scope.row.billType) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="目标单据类型" prop="billType">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getlocalName(scope.row.billType) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="reCount"></el-table-column>
<el-table-column label="实际数量" prop="count"></el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import {
delThrOrders, delAll, downloadAll
} from "../../api/thrsys/thrOrder";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import {getOriginBusType} from "../../api/basic/busOriginType";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
import {selectIp} from "../../api/param/systemParamConfig";
import {
getCloudErp,
} from "../../api/inout/erpOrder";
export default {
data() {
return {
filterQuery: {
billAction: null,
billNo: "",
originType:null,
thirdSysFk: "",
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 0,
},
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes:[],
list: [],
detailList: [],
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
loading: false,
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
type: 1,
editStatus: 0,
};
this.actDateRange = [];
this.getList();
},
getList() {
if (this.filterQuery.thirdSysFk == null) {
this.$message.warning("请先选择第三方系统!")
return;
}
if (this.actDateRange != null) {
this.filterQuery.startDate = this.actDateRange[0];
this.filterQuery.endDate = this.actDateRange[1];
} else {
this.filterQuery.startDate = null;
this.filterQuery.endDate = null;
}
this.loading = true;
getCloudErp(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
this.detailList = row.subErpOrders;
// console.log(row.billNo);
// let query = {
// orderIdFk: row.id
// };
// this.loading = true;
// getThrOrderDetails(query)
// .then((response) => {
// this.loading = false;
// this.detailList = response.data.list || [];
// this.total = response.data.total || 0;
// })
// .catch(() => {
// this.loading = false;
// this.list = [];
// this.total = 0;
// });
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: row.id,
};
delThrOrders(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
clearAll() {
this.$confirm("此操作将清空所有单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delAll()
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.success(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.selectSysParam();
this.getThirdSysDetail();
this.getBusType();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/pi/upload";
}
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getThirdSysDetail();
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "orderQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
downloadDatas() {
let query = {
billAction: this.filterQuery.billAction
};
downloadAll(query).then((response) => {
if (response.code == 20000) {
this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
getlocalName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].localName;
}
}
},
getBusType() {
let query = {
enabled: true,
};
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.getList();
})
.catch(() => {
});
getOriginBusType(query)
.then((response) => {
this.originTypes = response.data.list || [];
// this.filterQuery.originType = this.originTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
},
components: {},
mounted() {
},
created() {
this.getBasicThirdSys();
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
},
};
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save