diff --git a/src/api/sync/spsSyncStatus.js b/src/api/sync/spsSyncStatus.js index a822d6c2..08d81b0c 100644 --- a/src/api/sync/spsSyncStatus.js +++ b/src/api/sync/spsSyncStatus.js @@ -50,3 +50,13 @@ export function updateConfig(query) { }); } +export function infoByStatus(query) { + return axios({ + url: "/spssync/basic/udiinfo/infoByStatus", + method: "post", + data: query, + responseType: 'blob' + }); +} + + diff --git a/src/views/inout/DialogCreateOrder.vue b/src/views/inout/DialogCreateOrder.vue index d1d9b649..37feb59a 100644 --- a/src/views/inout/DialogCreateOrder.vue +++ b/src/views/inout/DialogCreateOrder.vue @@ -1,6 +1,6 @@ <template> <div> - <el-card style="margin: 5px; margin-top: -20px"> + <el-card style="margin: 5px;"> <el-form :model="orderFormData" :rules="formRules" diff --git a/src/views/inout/DialogNewReviewOrder.vue b/src/views/inout/DialogNewReviewOrder.vue index 685d6766..a4f2be6c 100644 --- a/src/views/inout/DialogNewReviewOrder.vue +++ b/src/views/inout/DialogNewReviewOrder.vue @@ -180,6 +180,8 @@ export default { page: 1, limit: 10, }, + + isEntrust: false, } }, @@ -267,6 +269,7 @@ export default { this.detailList = response.data.orderDetailEntities || []; this.formData = response.data.orderEntity; this.orderQuery = this.formData; + this.isEntrust = response.data.entrust; } else { this.$message.error(response.message); } @@ -371,6 +374,7 @@ export default { postAccept() { let query = { orderId: this.orderQuery.billNo, + entrust: this.isEntrust, }; if (this.reviewType != null && this.reviewType == 2) { thirdUpdateStatus(query) diff --git a/src/views/inout/IoCheckAuditOrder.vue b/src/views/inout/IoCheckAuditOrder.vue index 62b15d76..a4cc3a6e 100644 --- a/src/views/inout/IoCheckAuditOrder.vue +++ b/src/views/inout/IoCheckAuditOrder.vue @@ -1022,6 +1022,7 @@ export default { //验收结束 closeAcceptDialog() { this.acceptOrderVisible = false; + this.newAcceptOrderVisible = false; }, //开始验收 diff --git a/src/views/inventory/InvOrderPlaceModify.vue b/src/views/inventory/InvOrderPlaceModify.vue index a08c3011..fc12f847 100644 --- a/src/views/inventory/InvOrderPlaceModify.vue +++ b/src/views/inventory/InvOrderPlaceModify.vue @@ -71,13 +71,13 @@ border max-height="300" height="300"> <el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="DI/物资编码" prop="relId" width="150"></el-table-column> - <el-table-column label="物资名称" prop="productName" width="150"></el-table-column> + <el-table-column label="物资名称" prop="productName" width="150" show-tooltip-when-overflow></el-table-column> <el-table-column label="规格型号" prop="ggxh" width="150"></el-table-column> <el-table-column label="批次号" prop="batchNo" width="150"></el-table-column> <el-table-column label="序列号" prop="serialNo" width="150"></el-table-column> <el-table-column label="计量单位" prop="measname" width="150"></el-table-column> <el-table-column label="货位" prop="invSpaceName" width="150"></el-table-column> - <el-table-column label="注册备案号" prop="zczbhhzbapzbh" width="150"></el-table-column> + <el-table-column label="注册备案号" prop="zczbhhzbapzbh" width="150" show-tooltip-when-overflow></el-table-column> <el-table-column label="生产厂家" prop="manufactory" width="150"></el-table-column> <el-table-column label="供应商" prop="supName" width="150"></el-table-column> </el-table> @@ -96,7 +96,7 @@ <invPlaceSelectOrder :closeDialog="closeDialog" :formData="selectFormData" - :getInvProductInfogetInvProductInfogetInvProductInfo="getInvProductInfo" + :getInvProductInfo="getInvProductInfo" > </invPlaceSelectOrder> </el-dialog> @@ -260,7 +260,7 @@ export default { getInvProductInfo(orderId) { let params = { invCode: this.formData.invCode, - code: orderId + orderId: orderId }; getInvProductInfo(params).then((res) => { if (res.data !== null) { diff --git a/src/views/inventory/InvPlaceSelectOrder.vue b/src/views/inventory/InvPlaceSelectOrder.vue index 63465c93..78992bd1 100644 --- a/src/views/inventory/InvPlaceSelectOrder.vue +++ b/src/views/inventory/InvPlaceSelectOrder.vue @@ -125,7 +125,7 @@ export default { }, getList() { this.loading = true; - getInvPlaceOrderList().then((res) => { + getInvPlaceOrderList(this.filterQuery).then((res) => { this.loading = false; if (res.code === 20000) { this.list = res.data.list || []; @@ -153,7 +153,7 @@ export default { }, }, created() { - this.getInvList(); + this.getList(); }, } </script> diff --git a/src/views/inventory/InvProductPlaceModify.vue b/src/views/inventory/InvProductPlaceModify.vue index 5a3a480e..bbe336ca 100644 --- a/src/views/inventory/InvProductPlaceModify.vue +++ b/src/views/inventory/InvProductPlaceModify.vue @@ -69,13 +69,13 @@ border max-height="300" height="300"> <el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="DI/物资编码" prop="relId" width="150"></el-table-column> - <el-table-column label="物资名称" prop="productName" width="150"></el-table-column> + <el-table-column label="物资名称" prop="productName" width="150" show-tooltip-when-overflow></el-table-column> <el-table-column label="规格型号" prop="ggxh" width="150"></el-table-column> <el-table-column label="批次号" prop="batchNo" width="150"></el-table-column> <el-table-column label="序列号" prop="serialNo" width="150"></el-table-column> <el-table-column label="计量单位" prop="measname" width="150"></el-table-column> <el-table-column label="货位" prop="invSpaceName" width="150"></el-table-column> - <el-table-column label="注册备案号" prop="zczbhhzbapzbh" width="150"></el-table-column> + <el-table-column label="注册备案号" prop="zczbhhzbapzbh" width="150" show-tooltip-when-overflow></el-table-column> <el-table-column label="生产厂家" prop="manufactory" width="150"></el-table-column> <el-table-column label="供应商" prop="supName" width="150"></el-table-column> </el-table> diff --git a/src/views/sync/SysUdimsData.vue b/src/views/sync/SysUdimsData.vue index 575914b2..552f0d9a 100644 --- a/src/views/sync/SysUdimsData.vue +++ b/src/views/sync/SysUdimsData.vue @@ -18,24 +18,24 @@ </el-form-item> <el-form-item class="query-form-item"> <el-date-picker v-model="filterQuery.syncTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" - value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择同步时间"> + value-format="yyyy-MM-dd HH:mm:ss" 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="createScheduleDialog(1)" - v-if="configParms.orderScanFinish==1 || configParms.orderUnReceive==1 || configParms.orderUnCheck==1"> - 同步单据 - </el-button> - <!-- <el-button type="primary" icon="search" @click="createScheduleDialog(2)" - v-if="configParms.typeBus==1||configParms.typeScan==1||configParms.typeThird==1"> - 同步单据类型 - </el-button> - <el-button type="primary" icon="search" @click="createScheduleDialog(3)" v-if="configParms.basicProducts==1||configParms.basicCorp==1||configParms.basicInv==1||configParms.basicThirdProducts==1|| - configParms.basicThirdCorp==1||configParms.basicThirdInv==1||configParms.basicThirdBusOrder==1||configParms.sysUser==1">同步基础信息 - </el-button> --> + <!-- <el-button type="primary" icon="search" @click="createScheduleDialog(1)"--> + <!-- v-if="configParms.orderScanFinish==1 || configParms.orderUnReceive==1 || configParms.orderUnCheck==1">--> + <!-- 同步单据--> + <!-- </el-button>--> + <!-- <el-button type="primary" icon="search" @click="createScheduleDialog(2)" + v-if="configParms.typeBus==1||configParms.typeScan==1||configParms.typeThird==1"> + 同步单据类型 + </el-button> + <el-button type="primary" icon="search" @click="createScheduleDialog(3)" v-if="configParms.basicProducts==1||configParms.basicCorp==1||configParms.basicInv==1||configParms.basicThirdProducts==1|| + configParms.basicThirdCorp==1||configParms.basicThirdInv==1||configParms.basicThirdBusOrder==1||configParms.sysUser==1">同步基础信息 + </el-button> --> </el-button-group> </el-form-item> </el-row> @@ -58,24 +58,31 @@ </el-table-column> <el-table-column label="开始时间" width="180" prop="startTime" show-overflow-tooltip></el-table-column> <el-table-column label="结束时间" width="180" prop="endTime" show-overflow-tooltip></el-table-column> - - <el-table-column label="同步信息" prop="remark" show-overflow-tooltip></el-table-column> + <el-table-column label="同步文件" prop="cacheFilePath" width="180" show-overflow-tooltip></el-table-column> + <el-table-column label="同步信息" prop="remark" width="180" show-overflow-tooltip></el-table-column> <el-table-column label="操作" fixed="right" width="160"> <template slot-scope="scope"> - <el-button type="text" size="small" @click.native.stop="detailDialog(scope.row.id)">详情 - </el-button> + + <el-popconfirm @confirm="downFile(scope.row)" confirm-button-text='下载' cancel-button-text='不用了' class="mr10" + icon="el-icon-info" icon-color="blck" title="是否确认要下载文件?" v-if="scope.row.cacheFilePath"> + <el-button type="text" size="small" slot="reference">下载 + </el-button> + </el-popconfirm> + + <!-- <el-button type="text" size="small" @click.native.stop="detailDialog(scope.row.id)">详情--> + <!-- </el-button>--> <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row.id)">删除 </el-button> </template> </el-table-column> </el-table> <el-pagination :page-size="filterQuery.limit" @current-change="handleCurrentChange" layout="prev, pager, next" - :total="total" :current-page="filterQuery.page"></el-pagination> + :total="total" :current-page="filterQuery.page"></el-pagination> </el-card> <el-dialog title="同步信息" width="25%" :close-on-click-modal="false" :close-on-press-escape="false" - :visible.sync="syncVisible"> + :visible.sync="syncVisible"> <span v-text="syncInfo" style="white-space:pre-line;" class="syncInfo"></span> </el-dialog> @@ -83,286 +90,308 @@ </template> <script> - import { - filterLog, - deleteLog, - createSchedule, - findConfig, - updateConfig - } from "@/api/sync/spsSyncStatus"; - import store from "@/store"; - - export default { - data() { - return { - filterQuery: { - id: null, - status: "1", - page: 1, - limit: 10, - syncTime: null, - }, - list: [], - headers: {}, - detailList: [], - thirdSys: [], - thirdSysDetail: null, - total: 0, - currentRow: null, - editQuery: null, - status: { - 1: "处理异常", - 2: "处理完成", - }, - - 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, - }, - uploadFileUrl: null, - uploadData: { - thirdSys: "thirdId", - }, - templateDlUrl: null, - checked: false, - configParms: {}, - syncInfo: null, - syncVisible: false - }; - }, +import { + filterLog, + deleteLog, + createSchedule, + findConfig, + updateConfig +} from "@/api/sync/spsSyncStatus"; +import store from "@/store"; - methods: { - onReset() { - this.$router.push({ - path: "", - }); - this.filterQuery = { - syncTime: null, - id: null, - status: null, - page: 1, - limit: 20, - }; - this.syncTime = null; - this.getList(); +export default { + data() { + return { + filterQuery: { + id: null, + status: null, + page: 1, + limit: 10, + syncTime: null, }, - getList() { - this.loading = true; - filterLog(this.filterQuery) - .then((response) => { - this.loading = false; - if (response.code == 20000) { - this.list = response.data.list || []; - this.total = response.data.total || 0; - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - this.loading = false; - this.list = []; - this.total = 0; - }); + list: [], + headers: {}, + detailList: [], + thirdSys: [], + thirdSysDetail: null, + total: 0, + currentRow: null, + editQuery: null, + status: { + 1: "处理异常", + 2: "处理完成", }, - getConfig() { - findConfig() - .then((response) => { - if (response.code == 20000) { - this.configQuery = response.data; - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - this.loading = false; - this.list = []; - this.total = 0; - }); + 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, }, - saveConfig() { - updateConfig(this.configQuery) - .then((response) => { - this.loading = false; - if (response.code == 20000) { - this.$message.success("更新成功!"); - this.getConfig(); - } - }) - .catch(() => { - this.loading = false; - }); + uploadFileUrl: null, + uploadData: { + thirdSys: "thirdId", }, + templateDlUrl: null, + checked: false, + configParms: {}, + syncInfo: null, + syncVisible: false + }; + }, + methods: { + onReset() { + this.$router.push({ + path: "", + }); + this.filterQuery = { + syncTime: null, + id: null, + status: null, + page: 1, + limit: 20, + }; + this.syncTime = null; + this.getList(); + }, + getList() { + this.loading = true; + filterLog(this.filterQuery) + .then((response) => { + this.loading = false; + if (response.code == 20000) { + this.list = response.data.list || []; + this.total = response.data.total || 0; + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + this.loading = false; + this.list = []; + this.total = 0; + }); + }, - cancelDialog(val) { - this.udiImportDetailVisible = false; - this.thrCorpSelectVisible = false; - if (val) { - this.getList(); - } - }, - handleCurrentChange(val) { - this.filterQuery.page = val; - this.getList(); - }, - + getConfig() { + findConfig() + .then((response) => { + if (response.code == 20000) { + this.configQuery = response.data; + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + this.loading = false; + this.list = []; + this.total = 0; + }); + }, + saveConfig() { + updateConfig(this.configQuery) + .then((response) => { + this.loading = false; + if (response.code == 20000) { + this.$message.success("更新成功!"); + this.getConfig(); + } + }) + .catch(() => { + this.loading = false; + }); + }, - createScheduleDialog(type) { - if (this.$isNotBlank(this.filterQuery.syncTime)) { - this.$confirm("此操作将从" + this.filterQuery.syncTime + "开始同步最新数据,是否继续", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - this.createSchedule(type); - }) - .catch(() => {}); - } else { - this.createSchedule(type); - } - }, + cancelDialog(val) { + this.udiImportDetailVisible = false; + this.thrCorpSelectVisible = false; + if (val) { + this.getList(); + } + }, + handleCurrentChange(val) { + this.filterQuery.page = val; + this.getList(); + }, - createSchedule(type) { - let query = { - createType: type, - syncTime: this.filterQuery.syncTime, - } - createSchedule(query) - .then((response) => { - this.loading = false; - if (response.code == 20000) { - this.$message.success("创建成功!"); - } else if (response.code == 501) { - this.$message.warning(response.message); - } else { - this.$message.error(response.message); - } - this.getList(); + createScheduleDialog(type) { + if (this.$isNotBlank(this.filterQuery.syncTime)) { + this.$confirm("此操作将从" + this.filterQuery.syncTime + "开始同步最新数据,是否继续", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.createSchedule(type); }) .catch(() => { - this.loading = false; }); - }, - deleteDialog(rowId) { - this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(() => { - let dQuery = { - id: rowId, - }; - deleteLog(dQuery) - .then((response) => { - this.loading = false; - if (response.code == 20000) { - this.$message.success("删除成功"); - } else { - this.$message.error(response.message); - } - this.getList(); - }) - .catch(() => { - this.loading = false; - }); - }) - .catch(() => {}); - }, - handleChange(response, files, fileList) { - console.log(response); - if (response.code != 20000) { - this.$message.error(response.message); - this.getList(); - } else { - // console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); - this.$message.success(response.data); - this.getList(); - } - }, - statusFilterType(status) { - const statusMap = { - 2: "success", - 1: "danger", - }; - return statusMap[status]; - }, - getSyncConfig() { - findConfig() - .then((response) => { - if (response.code == 20000) { - this.configParms = response.data; - } - }) - .catch(() => {}); - }, - detailDialog(id) { - this.syncVisible = true; - this.list.forEach(item => { - if (id === item.id) { - this.syncInfo = item.remark; + } else { + this.createSchedule(type); + } + + }, + + createSchedule(type) { + let query = { + createType: type, + syncTime: this.filterQuery.syncTime, + } + + createSchedule(query) + .then((response) => { + this.loading = false; + if (response.code == 20000) { + this.$message.success("创建成功!"); + } else if (response.code == 501) { + this.$message.warning(response.message); + } else { + this.$message.error(response.message); } + this.getList(); }) - } + .catch(() => { + this.loading = false; + }); + }, + deleteDialog(rowId) { + this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + let dQuery = { + id: rowId, + }; + deleteLog(dQuery) + .then((response) => { + this.loading = false; + if (response.code == 20000) { + this.$message.success("删除成功"); + } else { + this.$message.error(response.message); + } + this.getList(); + }) + .catch(() => { + this.loading = false; + }); + }) + .catch(() => { + }); + }, + + downFile(rows) { + infoByStatus({ + 'id': rows.id + }).then(res => { + let blob = new Blob([res]) + let fileName = rows.cacheFilePath.substring(rows.cacheFilePath.lastIndexOf('/')) + let link = document.createElement("a") + link.href = window.URL.createObjectURL(blob) + link.download = fileName + link.style.display = 'none' + document.body.appendChild(link) + link.click() + window.URL.revokeObjectURL(link.href) + document.body.removeChild(link) + }) }, - mounted() {}, - components: {}, - created() { - this.headers = { - ADMIN_ID: store.getters.adminId, - ADMIN_TOKEN: store.getters.token, + handleChange(response, files, fileList) { + console.log(response); + if (response.code != 20000) { + this.$message.error(response.message); + this.getList(); + } else { + // console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); + this.$message.success(response.data); + this.getList(); + } + }, + statusFilterType(status) { + const statusMap = { + 2: "success", + 1: "danger", }; - this.getSyncConfig(); - this.getList(); - this.getConfig(); + return statusMap[status]; }, - }; + getSyncConfig() { + findConfig() + .then((response) => { + if (response.code == 20000) { + this.configParms = response.data; + } + }) + .catch(() => { + }); + }, + detailDialog(id) { + this.syncVisible = true; + this.list.forEach(item => { + if (id === item.id) { + this.syncInfo = item.remark; + } + }) + } + }, + + mounted() { + }, + components: {}, + created() { + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; + this.getSyncConfig(); + this.getList(); + this.getConfig(); + }, +}; </script> <style> - .itemTag { - float: left; - text-align: left; - margin-top: 10px; - width: 100px; - } +.itemTag { + float: left; + text-align: left; + margin-top: 10px; + width: 100px; +} - .text { - font-size: 13px; - font-family: "Microsoft YaHei"; - } +.text { + font-size: 13px; + font-family: "Microsoft YaHei"; +} - .el-row { - display: flex; - flex-wrap: wrap; +.el-row { + display: flex; + flex-wrap: wrap; - } +} - .el-col { - border-radius: 4px; - flex-wrap: wrap; - } +.el-col { + border-radius: 4px; + flex-wrap: wrap; +} - .syncInfo { - font-size: medium; - font-family: "Microsoft YaHei"; - line-height: 25px; - } +.syncInfo { + font-size: medium; + font-family: "Microsoft YaHei"; + line-height: 25px; +} </style>