From 9daeeaba2172e79e5987d21188b1bec8bd0ab422 Mon Sep 17 00:00:00 2001 From: CTP <630182278@qq.com> Date: Mon, 17 Apr 2023 16:16:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=90=8E=E7=AB=AF=E5=9C=B0?= =?UTF-8?q?=E5=9D=80,=E5=90=8C=E6=AD=A5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sync/SysUdimsConfig.vue | 932 +++++++++++++++++------------- vue.config.js | 159 +++-- 2 files changed, 621 insertions(+), 470 deletions(-) diff --git a/src/views/sync/SysUdimsConfig.vue b/src/views/sync/SysUdimsConfig.vue index 055e3e3f..b82c5cd9 100644 --- a/src/views/sync/SysUdimsConfig.vue +++ b/src/views/sync/SysUdimsConfig.vue @@ -1,370 +1,524 @@ <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="6" class="el-col"> - - <el-switch - v-model="configQuery.downstreamEnable" - active-text="是否启用数据同步"> - </el-switch> - - </el-col> - <el-col :span="14" class="el-col"> - <div> - <span style="color: red;">说明: 修改同步参数时,请关闭数据同步服务 </span> - </div> - </el-col> - - </el-row> - </el-descriptions-item> - - <el-descriptions-item> - <template slot="label"> - 地址设置 - </template> - - <el-row :gutter="20" class="el-row" type="flex"> - - <el-col :span="20" class="el-col"> - <div> - <span>服务地址: </span> - <el-input - style="width: 50%" + <el-collapse v-model="activeNames" @change="handleChange"> + <el-collapse-item title="数据同步设置" name="1"> + <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="6" class="el-col"> + <el-switch + v-model="configQuery.downstreamEnable" + active-text="是否启用数据同步" + > + </el-switch> + </el-col> + <el-col :span="14" class="el-col"> + <div> + <span style="color: red" + >说明: 修改同步参数时,请关闭数据同步服务 + </span> + </div> + </el-col> + </el-row> + </el-descriptions-item> + + <el-descriptions-item> + <template slot="label"> 地址设置 </template> + + <el-row :gutter="20" class="el-row" type="flex"> + <el-col :span="20" class="el-col"> + <div> + <span>服务地址: </span> + <el-input + style="width: 50%" + size="small" + v-model="configQuery.syncIp" + :disabled="configQuery.downstreamEnable" + splaceholder="请输入内容" + ></el-input> + <el-button + type="primary" + size="small" + @click="testConnect()" + style="margin-left: 20px" + :disabled="configQuery.downstreamEnable" + :loading="testLoading" + >测试连通 + </el-button> + </div> + </el-col> + </el-row> + </el-descriptions-item> + </el-descriptions> + </el-collapse-item> + + <el-collapse-item title="上传至UDI自助平台基础数据" name="2"> + <el-descriptions + class="margin-top" + title="上传至UDI自助平台基础数据" + :column="1" + :size="100" + style="margin-top: 40px" + border + > + <el-descriptions-item> + <template slot="label"> 参数设置 </template> + + <el-row :gutter="20" class="el-row" type="flex"> + <el-col :span="20" class="el-col"> + <div> + <span>数据上传时间间隔(单位:分钟): </span> + <el-input + style="width: 100px" + size="small" + type="number" + v-model="configQuery.syncTime" + :disabled="configQuery.downstreamEnable" + splaceholder="请输入内容" + ></el-input> + <span style="margin-left: 30px" + >延时上传(单位:分钟): </span + > + <el-input + style="width: 100px" + size="small" + type="number" + v-model="configQuery.delaySyncTime" + :disabled="configQuery.downstreamEnable" + splaceholder="请输入内容" + ></el-input> + + <span style="margin-left: 30px" + >数据下载时间间隔(单位:分钟): </span + > + <el-input + style="width: 100px" + size="small" + type="number" + v-model="configQuery.syncDownloadTime" + :disabled="configQuery.downstreamEnable" + splaceholder="请输入内容" + ></el-input> + </div> + </el-col> + </el-row> + </el-descriptions-item> + + <!-- <el-descriptions-item>--> + <!-- <template slot="label">--> + <!-- 运行参数--> + <!-- </template>--> + <!-- <el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable">委托验收--> + <!-- </el-checkbox>--> + <!-- </el-descriptions-item>--> + <el-descriptions-item> + <template slot="label"> 单据类型 </template> + <!-- <el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable">业务单据类型</el-checkbox> + <el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable">扫码单据类型</el-checkbox> + <el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable">第三方单据类型</el-checkbox> --> + <el-form :inline="true" :model="configQuery"> + <el-form-item label="业务单据类型"> + <el-select v-model="configQuery.typeBus" placeholder="请选择"> + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + ><el-form-item label="扫码单据类型"> + <el-select v-model="configQuery.typeScan" placeholder="请选择"> + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + ><el-form-item label="第三方单据类型"> + <el-select v-model="configQuery.typeThird" placeholder="请选择"> + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> + </el-form-item> + </el-form> + </el-descriptions-item> + + <el-descriptions-item> + <template slot="label"> 基础信息 </template> + <!-- <el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable">耗材字典--> + <!-- </el-checkbox>--> + <!-- <el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable">往来单位字典--> + <!-- </el-checkbox>--> + + <!-- <el-checkbox v-model="configQuery.basicDept" :disabled="configQuery.downstreamEnable" >部门信息</el-checkbox > + <el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable" >仓库字典</el-checkbox > + <el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable" >用户信息</el-checkbox > --> + <el-form :inline="true" :model="configQuery"> + <el-form-item label="部门信息"> + <el-select v-model="configQuery.basicDept" placeholder="请选择"> + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + ><el-form-item label="仓库字典"> + <el-select v-model="configQuery.basicInv" placeholder="请选择"> + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + ><el-form-item label="用户信息"> + <el-select v-model="configQuery.sysUser" placeholder="请选择"> + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> + </el-form-item> + </el-form> + </el-descriptions-item> + <el-descriptions-item> + <template slot="label"> 第三方基础信息 </template> + <!-- <el-checkbox v-model="configQuery.basicThirdProducts" :disabled="configQuery.downstreamEnable" >第三方产品信息 </el-checkbox> + <el-checkbox v-model="configQuery.basicThirdCorp" :disabled="configQuery.downstreamEnable" >第三方往来信息 </el-checkbox> + <el-checkbox v-model="configQuery.basicThirdInv" :disabled="configQuery.downstreamEnable" >第三方仓库信息 </el-checkbox> + <el-checkbox v-model="configQuery.basicThirdBusOrder" :disabled="configQuery.downstreamEnable" >第三方业务单据 </el-checkbox> --> + <el-form :inline="true" :model="configQuery"> + <el-form-item label="第三方产品信息"> + <el-select + v-model="configQuery.basicThirdProducts" + placeholder="请选择" + > + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + ><el-form-item label="第三方往来信息"> + <el-select + v-model="configQuery.basicThirdCorp" + placeholder="请选择" + > + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + ><el-form-item label="第三方仓库信息"> + <el-select + v-model="configQuery.basicThirdInv" + placeholder="请选择" + > + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> + </el-form-item> + <el-form-item label="第三方业务单据"> + <el-select + v-model="configQuery.basicThirdBusOrder" + placeholder="请选择" + > + <el-option label="完成同步" value="0"></el-option> + <el-option label="由内到外" value="1"></el-option> + <el-option label="由外到内" value="2"></el-option> + </el-select> </el-form-item + >, + </el-form> + </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-item> + <template slot="label"> + 首营资质证书 + </template> + <el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable">配送企业 + </el-checkbox> + <el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable">生产企业 + </el-checkbox> + <el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable">配送产品 + </el-checkbox> + </el-descriptions-item> --> + </el-descriptions> + </el-collapse-item> + + <el-collapse-item title="上传至UDI自助平台扫码单据" name="3"> + <el-descriptions + class="margin-top" + title="上传至UDI自助平台扫码单据" + :column="1" + :size="100" + style="margin-top: 40px" + border + > + <el-descriptions-item> + <template slot="label"> 参数设置 </template> + + <el-row :gutter="20" class="el-row" type="flex"> + <el-col :span="20" class="el-col"> + <div> + <span>单据上传时间间隔(单位:分钟): </span> + <el-input + style="width: 100px" + size="small" + type="number" + v-model="configQuery.orderSyncTime" + :disabled="configQuery.downstreamEnable" + splaceholder="请输入内容" + ></el-input> + + <span style="margin-left: 30px" + >单据下载时间间隔(单位:分钟): </span + > + <el-input + style="width: 100px" + size="small" + type="number" + v-model="configQuery.orderSyncDlTime" + :disabled="configQuery.downstreamEnable" + splaceholder="请输入内容" + ></el-input> + </div> + </el-col> + </el-row> + </el-descriptions-item> + + <el-descriptions-item + label="单据(单据类型)" + label-style="width: 150px" + > + <div style="float: right; margin-bottom: 10px; margin-right: 25px"> + <el-button + type="primary" size="small" - v-model="configQuery.syncIp" :disabled="configQuery.downstreamEnable" - splaceholder="请输入内容" - ></el-input> - <el-button type="primary" size="small" @click="testConnect()" style="margin-left: 20px;" - :disabled="configQuery.downstreamEnable" - :loading="testLoading">测试连通 + :disabled="configQuery.downstreamEnable" + @click="addBusTypeDialog()" + >添加扫码单据类型 </el-button> - </div> - </el-col> - </el-row> - - </el-descriptions-item> - </el-descriptions> - <el-descriptions class="margin-top" title="上传至UDI自助平台基础数据" :column="1" :size="100" - style="margin-top: 40px" - border> - - <el-descriptions-item> - <template slot="label"> - 参数设置 - </template> - - <el-row :gutter="20" class="el-row" type="flex"> - - <el-col :span="20" class="el-col"> - <div> - <span>数据上传时间间隔(单位:分钟): </span> - <el-input - style="width: 100px" - size="small" - type="number" - v-model="configQuery.syncTime" :disabled="configQuery.downstreamEnable" - splaceholder="请输入内容" - ></el-input> - <span style="margin-left: 30px;">延时上传(单位:分钟): </span> - <el-input - style="width: 100px" + <el-table :data="checkedBusTypes" border style="width: 100%"> + <el-table-column label="序号" type="index"></el-table-column> + <el-table-column + label="单据类型" + prop="name" + show-overflow-tooltip + ></el-table-column> + <el-table-column + label="单据类型代码" + prop="action" + show-overflow-tooltip + ></el-table-column> + <el-table-column width="250" label="单据状态"> + <template slot-scope="scope"> + <el-select + v-model="scope.row.orderStatus" + placeholder="请选择单据状态" + > + <el-option label="待校验" :value="3">待校验</el-option> + <el-option label="待核对" :value="5">待核对</el-option> + <el-option label="待审核" :value="10">待审核</el-option> + <el-option label="已审核" :value="7">已审核</el-option> + </el-select> + </template> + </el-table-column> + <el-table-column label="操作" fixed="right"> + <template slot-scope="scope"> + <el-button + type="text" + size="small" + :disabled="configQuery.downstreamEnable" + @click.native="remveBus(scope.$index, scope.row)" + >移除 + </el-button> + </template> + </el-table-column> + </el-table> + </el-descriptions-item> + </el-descriptions> + </el-collapse-item> + + <el-collapse-item title="上传至UDI自助平台业务单据" name="4"> + <el-descriptions + class="margin-top" + title="上传至UDI自助平台业务单据" + :column="1" + :size="100" + style="margin-top: 40px" + border + > + <el-descriptions-item + label="单据(单据类型)" + label-style="width: 150px" + > + <div style="float: right; margin-bottom: 10px; margin-right: 25px"> + <el-button + type="primary" size="small" - type="number" - v-model="configQuery.delaySyncTime" :disabled="configQuery.downstreamEnable" - splaceholder="请输入内容" - ></el-input> - - <span style="margin-left: 30px;">数据下载时间间隔(单位:分钟): </span> - <el-input - style="width: 100px" - size="small" - type="number" - v-model="configQuery.syncDownloadTime" :disabled="configQuery.downstreamEnable" - splaceholder="请输入内容" - ></el-input> - </div> - </el-col> - </el-row> - - </el-descriptions-item> - - <!-- <el-descriptions-item>--> - <!-- <template slot="label">--> - <!-- 运行参数--> - <!-- </template>--> - <!-- <el-checkbox v-model="configQuery.entrustAction" :disabled="configQuery.downstreamEnable">委托验收--> - <!-- </el-checkbox>--> - <!-- </el-descriptions-item>--> - <el-descriptions-item> - <template slot="label"> - 单据类型 - </template> - <el-checkbox v-model="configQuery.typeBus" :disabled="configQuery.downstreamEnable">业务单据类型</el-checkbox> - <el-checkbox v-model="configQuery.typeScan" :disabled="configQuery.downstreamEnable">扫码单据类型</el-checkbox> - <el-checkbox v-model="configQuery.typeThird" :disabled="configQuery.downstreamEnable">第三方单据类型 - </el-checkbox> - </el-descriptions-item> - - <el-descriptions-item> - <template slot="label"> - 基础信息 - </template> - <!-- <el-checkbox v-model="configQuery.basicProducts" :disabled="configQuery.downstreamEnable">耗材字典--> - <!-- </el-checkbox>--> - <!-- <el-checkbox v-model="configQuery.basicCorp" :disabled="configQuery.downstreamEnable">往来单位字典--> - <!-- </el-checkbox>--> - <el-checkbox v-model="configQuery.basicDept" :disabled="configQuery.downstreamEnable">部门信息</el-checkbox> - <el-checkbox v-model="configQuery.basicInv" :disabled="configQuery.downstreamEnable">仓库字典</el-checkbox> - <el-checkbox v-model="configQuery.sysUser" :disabled="configQuery.downstreamEnable">用户信息</el-checkbox> - </el-descriptions-item> - <el-descriptions-item> - <template slot="label"> - 第三方基础信息 - </template> - <el-checkbox v-model="configQuery.basicThirdProducts" :disabled="configQuery.downstreamEnable">第三方产品信息 - </el-checkbox> - <el-checkbox v-model="configQuery.basicThirdCorp" :disabled="configQuery.downstreamEnable">第三方往来信息 - </el-checkbox> - <el-checkbox v-model="configQuery.basicThirdInv" :disabled="configQuery.downstreamEnable">第三方仓库信息 - </el-checkbox> - <el-checkbox v-model="configQuery.basicThirdBusOrder" :disabled="configQuery.downstreamEnable">第三方业务单据 - </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-item>--> - <!-- <template slot="label">--> - <!-- 首营资质证书--> - <!-- </template>--> - <!-- <el-checkbox v-model="configQuery.companyCert" :disabled="configQuery.downstreamEnable">配送企业--> - <!-- </el-checkbox>--> - <!-- <el-checkbox v-model="configQuery.manufacturerCert" :disabled="configQuery.downstreamEnable">生产企业--> - <!-- </el-checkbox>--> - <!-- <el-checkbox v-model="configQuery.productCert" :disabled="configQuery.downstreamEnable">配送产品--> - <!-- </el-checkbox>--> - <!-- </el-descriptions-item>--> - </el-descriptions> - - <el-descriptions class="margin-top" title="上传至UDI自助平台扫码单据" :column="1" :size="100" - style="margin-top: 40px" - border> - - <el-descriptions-item> - <template slot="label"> - 参数设置 - </template> - - <el-row :gutter="20" class="el-row" type="flex"> - - <el-col :span="20" class="el-col"> - <div> - <span>单据上传时间间隔(单位:分钟): </span> - <el-input - style="width: 100px" - size="small" - type="number" - v-model="configQuery.orderSyncTime" :disabled="configQuery.downstreamEnable" - splaceholder="请输入内容" - ></el-input> - - <span style="margin-left: 30px;">单据下载时间间隔(单位:分钟): </span> - <el-input - style="width: 100px" - size="small" - type="number" - v-model="configQuery.orderSyncDlTime" :disabled="configQuery.downstreamEnable" - splaceholder="请输入内容" - ></el-input> + :disabled="configQuery.downstreamEnable" + @click="addChangeBusTypeDialog()" + >添加业务单据类型 + </el-button> </div> - </el-col> - </el-row> - - </el-descriptions-item> - - <el-descriptions-item label="单据(单据类型)" label-style="width: 150px"> - - <div style="float: right;margin-bottom: 10px;margin-right: 25px"> - <el-button type="primary" size="small" - :disabled="configQuery.downstreamEnable" - @click="addBusTypeDialog()">添加扫码单据类型 - </el-button> + <el-table :data="checkedChangeBusTypes" border style="width: 100%"> + <el-table-column label="序号" type="index"></el-table-column> + <el-table-column + label="单据类型" + prop="name" + show-overflow-tooltip + ></el-table-column> + <el-table-column + label="单据类型代码" + prop="action" + show-overflow-tooltip + ></el-table-column> + <el-table-column width="250" label="单据状态"> + <template slot-scope="scope"> + <el-select + v-model="scope.row.orderStatus" + placeholder="请选择单据状态" + > + <el-option label="待校验" :value="1">草稿</el-option> + <el-option label="待核对" :value="2">未审核</el-option> + <el-option label="待审核" :value="3">已审核</el-option> + </el-select> + </template> + </el-table-column> + <el-table-column label="操作" fixed="right"> + <template slot-scope="scope"> + <el-button + type="text" + size="small" + :disabled="configQuery.downstreamEnable" + @click.native="removeChangeBus(scope.$index, scope.row)" + >移除 + </el-button> + </template> + </el-table-column> + </el-table> + </el-descriptions-item> + </el-descriptions> + </el-collapse-item> + + <el-dialog + title="添加扫码单据类型" + :visible.sync="addBusDialogVisible" + width="55%" + :close-on-click-modal="false" + :close-on-press-escape="false" + v-if="addBusDialogVisible" + > + <div style="float: right; margin-bottom: 10px; margin-right: 25px"> + <el-button type="primary" size="small" @click="addBusType()" + >选入</el-button + > </div> - <el-table :data="checkedBusTypes" border style="width: 100%"> + <el-table + :data="busTypes" + border + style="width: 100%" + @selection-change="handleCheckedChange" + > + <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="name" show-overflow-tooltip></el-table-column> - <el-table-column label="单据类型代码" prop="action" show-overflow-tooltip></el-table-column> - <el-table-column width="250" label="单据状态"> - <template slot-scope="scope"> - <el-select v-model="scope.row.orderStatus" placeholder="请选择单据状态"> - <el-option label="待校验" :value=3>待校验</el-option> - <el-option label="待核对" :value=5>待核对</el-option> - <el-option label="待审核" :value=10>待审核</el-option> - <el-option label="已审核" :value=7>已审核</el-option> - </el-select> - </template> - </el-table-column> - <el-table-column label="操作" fixed="right"> - <template slot-scope="scope"> - <el-button type="text" size="small" :disabled="configQuery.downstreamEnable" - @click.native="remveBus(scope.$index, scope.row)">移除 - </el-button> - </template> - </el-table-column> + <el-table-column + label="单据类型" + prop="name" + show-overflow-tooltip + ></el-table-column> + <el-table-column + label="单据类型代码" + prop="action" + show-overflow-tooltip + ></el-table-column> </el-table> - </el-descriptions-item> - - </el-descriptions> - - <el-descriptions class="margin-top" title="上传至UDI自助平台业务单据" :column="1" :size="100" - style="margin-top: 40px" - border> - <el-descriptions-item label="单据(单据类型)" label-style="width: 150px"> - - <div style="float: right;margin-bottom: 10px;margin-right: 25px"> - <el-button type="primary" size="small" - :disabled="configQuery.downstreamEnable" - @click="addChangeBusTypeDialog()">添加业务单据类型 - </el-button> + <el-pagination + :page-size="busQuery.limit" + @current-change="handleCurrentChange" + layout="prev, pager, next" + :total="total" + :current-page="busQuery.page" + ></el-pagination> + </el-dialog> + + <el-dialog + title="添加业务单据类型" + :visible.sync="addChangeBusDialogVisible" + width="55%" + :close-on-click-modal="false" + :close-on-press-escape="false" + v-if="addChangeBusDialogVisible" + > + <div style="float: right; margin-bottom: 10px; margin-right: 25px"> + <el-button type="primary" size="small" @click="addChangeBusType()" + >选入</el-button + > </div> - <el-table :data="checkedChangeBusTypes" border style="width: 100%"> + <el-table + :data="changeBusTypes" + border + style="width: 100%" + @selection-change="handleCheckedChangeBus" + > + <el-table-column + type="selection" + width="55" + :selectable="checkSelectableChange" + ></el-table-column> <el-table-column label="序号" type="index"></el-table-column> - <el-table-column label="单据类型" prop="name" show-overflow-tooltip></el-table-column> - <el-table-column label="单据类型代码" prop="action" show-overflow-tooltip></el-table-column> - <el-table-column width="250" label="单据状态"> - <template slot-scope="scope"> - <el-select v-model="scope.row.orderStatus" placeholder="请选择单据状态"> - <el-option label="待校验" :value=1>草稿</el-option> - <el-option label="待核对" :value=2>未审核</el-option> - <el-option label="待审核" :value=3>已审核</el-option> - </el-select> - </template> - </el-table-column> - <el-table-column label="操作" fixed="right"> - <template slot-scope="scope"> - <el-button type="text" size="small" :disabled="configQuery.downstreamEnable" - @click.native="removeChangeBus(scope.$index, scope.row)">移除 - </el-button> - </template> - </el-table-column> + <el-table-column + label="单据类型" + prop="name" + show-overflow-tooltip + ></el-table-column> + <el-table-column + label="单据类型代码" + prop="action" + show-overflow-tooltip + ></el-table-column> </el-table> - </el-descriptions-item> - - </el-descriptions> - - <el-dialog - title="添加扫码单据类型" - :visible.sync="addBusDialogVisible" - width="55%" - :close-on-click-modal="false" - :close-on-press-escape="false" - v-if="addBusDialogVisible" - > - - <div style="float: right;margin-bottom: 10px;margin-right: 25px"> - <el-button type="primary" size="small" @click="addBusType()">选入</el-button> - </div> - <el-table - :data="busTypes" - border - style="width: 100%" - @selection-change="handleCheckedChange" - > - <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="name" - show-overflow-tooltip - ></el-table-column> - <el-table-column - label="单据类型代码" - prop="action" - show-overflow-tooltip - ></el-table-column> - </el-table> - - <el-pagination - :page-size="busQuery.limit" - @current-change="handleCurrentChange" - layout="prev, pager, next" - :total="total" - :current-page="busQuery.page" - ></el-pagination> - - </el-dialog> - - <el-dialog - title="添加业务单据类型" - :visible.sync="addChangeBusDialogVisible" - width="55%" - :close-on-click-modal="false" - :close-on-press-escape="false" - v-if="addChangeBusDialogVisible" - > - - <div style="float: right;margin-bottom: 10px;margin-right: 25px"> - <el-button type="primary" size="small" @click="addChangeBusType()">选入</el-button> - </div> - <el-table - :data="changeBusTypes" - border - style="width: 100%" - @selection-change="handleCheckedChangeBus" - > - <el-table-column type="selection" width="55" :selectable="checkSelectableChange"></el-table-column> - <el-table-column label="序号" type="index"></el-table-column> - <el-table-column - label="单据类型" - prop="name" - show-overflow-tooltip - ></el-table-column> - <el-table-column - label="单据类型代码" - prop="action" - show-overflow-tooltip - ></el-table-column> - </el-table> - - <el-pagination - :page-size="changeBusQuery.limit" - @current-change="handleCurrentChangePage" - layout="prev, pager, next" - :total="changeBusTypeTotal" - :current-page="changeBusQuery.page" - ></el-pagination> - - </el-dialog> + <el-pagination + :page-size="changeBusQuery.limit" + @current-change="handleCurrentChangePage" + layout="prev, pager, next" + :total="changeBusTypeTotal" + :current-page="changeBusQuery.page" + ></el-pagination> + </el-dialog> + </el-collapse> </el-card> </template> <script> -import {findConfig, testConnect, updateConfig} from "@/api/sync/spsSyncStatus"; +import { + findConfig, + testConnect, + updateConfig, +} from "@/api/sync/spsSyncStatus"; import store from "@/store"; -import {getBussinessType} from "@/api/basic/bussinessType"; -import {getBusTypeChangeList} from "@/api/basic/busTypeChange"; +import { getBussinessType } from "@/api/basic/bussinessType"; +import { getBusTypeChangeList } from "@/api/basic/busTypeChange"; export default { name: "SysUdimsConfig", data() { return { + activeNames: ["1"], configQuery: { id: null, typeBus: null, @@ -395,7 +549,6 @@ export default { manufacturerCert: null, productCert: null, basicDept: null, - }, checkedBusTypes: [], checkedChangeBusTypes: [], @@ -415,14 +568,16 @@ export default { }, changeBusTypeTotal: 0, changeBusTypes: [], - changeBusTypeSelection: [] - } + changeBusTypeSelection: [], + }; }, methods: { + handleChange(val) { + console.log(val); + }, getConfig() { findConfig() .then((response) => { - this.configQuery = response.data; this.checkedBusTypes = this.configQuery.busTypes; this.checkedChangeBusTypes = this.configQuery.changeBusTypes; @@ -447,37 +602,37 @@ export default { }); }, saveConfig() { - - this.$confirm('是否确认修改?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', + this.$confirm("是否确认修改?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", center: true, - }).then(() => { - if (this.checkedBusTypes != null) { - this.configQuery.busTypes = this.checkedBusTypes; - // for (let i = 0; i < this.checkedBusTypes.length; i++) { - // this.configQuery.busTypes.push(this.checkedBusTypes); - // } - } - if (this.checkedChangeBusTypes != null) { - this.configQuery.changeBusTypes = this.checkedChangeBusTypes; - } - updateConfig(this.configQuery) - .then((response) => { - this.loading = false; - if (response.code == 20000) { - this.$message.success("修改成功!"); - this.getConfig(); - } else { - this.$message.error(response.message); - } - }) - .catch(() => { - this.loading = false; - }); - }).catch(() => { - }); + }) + .then(() => { + if (this.checkedBusTypes != null) { + this.configQuery.busTypes = this.checkedBusTypes; + // for (let i = 0; i < this.checkedBusTypes.length; i++) { + // this.configQuery.busTypes.push(this.checkedBusTypes); + // } + } + if (this.checkedChangeBusTypes != null) { + this.configQuery.changeBusTypes = this.checkedChangeBusTypes; + } + updateConfig(this.configQuery) + .then((response) => { + this.loading = false; + if (response.code == 20000) { + this.$message.success("修改成功!"); + this.getConfig(); + } else { + this.$message.error(response.message); + } + }) + .catch(() => { + this.loading = false; + }); + }) + .catch(() => {}); }, testConnect() { @@ -494,8 +649,6 @@ export default { .catch(() => { this.testLoading = false; }); - - }, handleCheckedChange(val) { @@ -509,8 +662,7 @@ export default { this.total = response.data.total || 0; // this.getConfig(); }) - .catch(() => { - }); + .catch(() => {}); }, addBusTypeDialog() { @@ -529,8 +681,7 @@ export default { isPut = false; } } - if (isPut) - this.checkedBusTypes.push(obj); + if (isPut) this.checkedBusTypes.push(obj); }); this.addBusDialogVisible = false; }, @@ -555,8 +706,7 @@ export default { isPut = false; } } - if (isPut) - this.checkedChangeBusTypes.push(obj); + if (isPut) this.checkedChangeBusTypes.push(obj); }); this.addChangeBusDialogVisible = false; }, @@ -571,13 +721,13 @@ export default { res.data.list.forEach((item) => { let changeBusType = { action: item.originAction, - name: item.originName + name: item.originName, }; this.changeBusTypes.push(changeBusType); }); } this.changeBusTypeTotal = res.data.total || 0; - }) + }); }, handleCurrentChangePage(val) { this.changeBusQuery.page = val; @@ -603,9 +753,15 @@ export default { this.getChangeBusType(); this.getConfig(); }, -} +}; </script> <style scoped> - +.el-select { + width: 100px; +} +.el-collapse-item { + font-weight: 800; + font-size: 20px; +} </style> diff --git a/vue.config.js b/vue.config.js index 5b064d38..ebbd3f18 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,15 +1,15 @@ -'use strict' -const path = require('path') +"use strict"; +const path = require("path"); function resolve(dir) { - return path.join(__dirname, dir) + return path.join(__dirname, dir); } -const CompressionPlugin = require('compression-webpack-plugin') +const CompressionPlugin = require("compression-webpack-plugin"); -const name = process.env.VUE_APP_TITLE || 'UDI管理系统' // 网页标题 +const name = process.env.VUE_APP_TITLE || "UDI管理系统"; // 网页标题 -const port = process.env.port || process.env.npm_config_port || 80 // 端口 +const port = process.env.port || process.env.npm_config_port || 80; // 端口 // vue.config.js 配置说明 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions @@ -20,117 +20,112 @@ module.exports = { // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 publicPath: process.env.VUE_APP_CONTEXT_PATH, // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) - outputDir: 'UDI_WMS_NEW', + outputDir: "UDI_WMS_NEW", // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) - assetsDir: 'static', + assetsDir: "static", // 是否开启eslint保存检测,有效值:ture | false | 'error' - lintOnSave: process.env.NODE_ENV === 'development', + lintOnSave: process.env.NODE_ENV === "development", // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, // webpack-dev-server 相关配置 devServer: { - host: '0.0.0.0', + host: "0.0.0.0", port: port, open: false, proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:9991/`, + target: `http://192.168.0.66:9150/UDI_WMS_MC/`, changeOrigin: true, pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } - } + ["^" + process.env.VUE_APP_BASE_API]: "", + }, + }, }, - disableHostCheck: true + disableHostCheck: true, }, css: { loaderOptions: { sass: { - sassOptions: { outputStyle: "expanded" } - } - } + sassOptions: { outputStyle: "expanded" }, + }, + }, }, configureWebpack: { name: name, resolve: { alias: { - '@': resolve('src') - } + "@": resolve("src"), + }, }, plugins: [ // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 new CompressionPlugin({ - cache: false, // 不启用文件缓存 - test: /\.(js|css|html)?$/i, // 压缩文件格式 - filename: '[path].gz[query]', // 压缩后的文件名 - algorithm: 'gzip', // 使用gzip压缩 - minRatio: 0.8 // 压缩率小于1才会压缩 - }) + cache: false, // 不启用文件缓存 + test: /\.(js|css|html)?$/i, // 压缩文件格式 + filename: "[path].gz[query]", // 压缩后的文件名 + algorithm: "gzip", // 使用gzip压缩 + minRatio: 0.8, // 压缩率小于1才会压缩 + }), ], }, chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test + config.plugins.delete("preload"); // TODO: need test + config.plugins.delete("prefetch"); // TODO: need test // set svg-sprite-loader + config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end(); config.module - .rule('svg') - .exclude.add(resolve('src/assets/icons')) - .end() - config.module - .rule('icons') + .rule("icons") .test(/\.svg$/) - .include.add(resolve('src/assets/icons')) + .include.add(resolve("src/assets/icons")) .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') + .use("svg-sprite-loader") + .loader("svg-sprite-loader") .options({ - symbolId: 'icon-[name]' + symbolId: "icon-[name]", }) - .end() + .end(); - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - config.optimization.runtimeChunk('single'), - { - from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 - to: './' //到根目录下 - } - } - ) - } -} + config.when(process.env.NODE_ENV !== "development", (config) => { + config + .plugin("ScriptExtHtmlWebpackPlugin") + .after("html") + .use("script-ext-html-webpack-plugin", [ + { + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/, + }, + ]) + .end(); + config.optimization.splitChunks({ + chunks: "all", + cacheGroups: { + libs: { + name: "chunk-libs", + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: "initial", // only package third parties that are initially dependent + }, + elementUI: { + name: "chunk-elementUI", // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm + }, + commons: { + name: "chunk-commons", + test: resolve("src/components"), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true, + }, + }, + }); + config.optimization.runtimeChunk("single"), + { + from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件 + to: "./", //到根目录下 + }; + }); + }, +};