From f18fabe8ef7d7d1a715e22c6be38b040b63c22d1 Mon Sep 17 00:00:00 2001 From: anthonywj <yewenjie20@vip.qq.com> Date: Mon, 5 Jun 2023 19:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/thrsys/thrUploadSet.js | 22 ++++- src/views/inout/uploadManage/uploadModify.vue | 91 +++++++------------ .../inout/uploadManage/uploadSetting.vue | 42 ++++++--- src/views/myLogin.vue | 27 +++--- 4 files changed, 100 insertions(+), 82 deletions(-) diff --git a/src/api/thrsys/thrUploadSet.js b/src/api/thrsys/thrUploadSet.js index 8f540e43..4f56052a 100644 --- a/src/api/thrsys/thrUploadSet.js +++ b/src/api/thrsys/thrUploadSet.js @@ -26,7 +26,6 @@ export function updateConfig(data) { } //查询已选入扫码单据类型 - export function getBusList(params) { return axios({ url: "/system/third/syncData/getBus", @@ -43,3 +42,24 @@ export function addBus(data) { data: data }); } + +// 编辑扫码单据类型 +export function editBus(data) { + return axios({ + url: "/system/third/syncData/editBus", + method: "post", + data: data + }); +} + + +// 移除扫码单据类型 +export function removeBus(data) { + return axios({ + url: "/system/third/syncData/removeBus", + method: "post", + data: data + }); +} + + diff --git a/src/views/inout/uploadManage/uploadModify.vue b/src/views/inout/uploadManage/uploadModify.vue index c4c5b78e..7c2221e3 100644 --- a/src/views/inout/uploadManage/uploadModify.vue +++ b/src/views/inout/uploadManage/uploadModify.vue @@ -8,6 +8,7 @@ <el-form-item label="单据类型:" label-width="120px"> <el-input size="mini" + :disabled="true" splaceholder="请输入内容" style="width: 80%" v-model="inputQuery.name" ></el-input> @@ -21,6 +22,7 @@ <el-input size="mini" style="width: 80%" + :disabled="true" splaceholder="请输入内容" v-model="inputQuery.action" ></el-input> @@ -30,22 +32,25 @@ <el-row :gutter="20" type="flex"> <el-col :span="24"> <el-form-item label="单据起始上传:" label-width="120px"> - <el-input - size="mini" - splaceholder="请输入内容" style="width: 80%" - :disabled="true" - v-model="inputQuery.createTime" - ></el-input> + <el-date-picker + type="date" + v-model="inputQuery.orderStartTime" + format="yyyy-MM-dd" + style="width: 80%" + value-format="yyyy-MM-dd" + :disabled="inputQuery.autoUpload" + placeholder="选择日期"> + </el-date-picker> </el-form-item> </el-col> </el-row> <el-row :gutter="20" type="flex"> <el-col :span="24"> <el-form-item label="单据状态:" label-width="120px"> - <el-radio-group v-model="configQuery.orderStatus" :disabled="configQuery.autoUpload"> - <el-radio :label="1" :value="1" @change="handleRadioChange">待审核</el-radio> - <el-radio :label="2" :value="2" @change="handleRadioChange">已审核</el-radio> - <el-radio :label="3" :value="3" @change="handleRadioChange">已确认</el-radio> + <el-radio-group v-model="inputQuery.orderStatus" :disabled="inputQuery.autoUpload"> + <el-radio :label="1" :value="1">待审核</el-radio> + <el-radio :label="2" :value="2">已审核</el-radio> + <el-radio :label="3" :value="3">已确认</el-radio> </el-radio-group> </el-form-item> </el-col> @@ -54,20 +59,25 @@ <el-col :span="24"> <el-form-item label="单据来源:" label-width="120px"> <el-select - v-model="configQuery.orderSources" + v-model="inputQuery.orderSource" multiple collapse-tags style="width: 80%" placeholder="请选择" > - <el-option label="web端新增单据" value="checkWebNew"></el-option> - <el-option label="手持终端未校验单据" value="checkPdaUn"></el-option> - <el-option label="手持终端已校验单据" value="checkPdaEd"></el-option> - <el-option label="UDIMS平台" value="checkUdims"></el-option> - <el-option label="UDI扫码通" value="checkPc"></el-option> - <el-option label="自助平台同步" value="checkSp"></el-option> - <el-option label="缺量补单" value="checkChange"></el-option> - <el-option label="平衡补单" value="checkBalacne"></el-option> + <el-option label="UDIMS平台" value="1"></el-option> + <el-option label="网页新增" value="2"></el-option> + <el-option label="pda即时校验" value="3"></el-option> + <el-option label="pda未校验" value="4"></el-option> + <el-option label="pc端扫码精灵" value="5"></el-option> + <el-option label="流转自动补单" value="6"></el-option> + <el-option label="UDI供应商平台" value="7"></el-option> + <el-option label="平衡补录单据" value="8"></el-option> + <el-option label="手动补单" value="10"></el-option> + <el-option label="仓库盘点" value="11"></el-option> + <el-option label="采购计划" value="12"></el-option> + <el-option label="领用单据" value="13"></el-option> + <el-option label="第三方系统单据" value="14"></el-option> </el-select> </el-form-item> </el-col> @@ -91,47 +101,12 @@ export default { }, }, - methods: { - handleRadioChange(val) { - if (val === 1) { - this.configQuery.orderUnCheck = 1; - this.configQuery.orderUnReceive = 0; - this.configQuery.orderScanFinish = 0; - } - if (val === 2) { - this.configQuery.orderUnCheck = 0; - this.configQuery.orderUnReceive = 1; - this.configQuery.orderScanFinish = 0; - } - if (val === 3) { - this.configQuery.orderUnCheck = 0; - this.configQuery.orderUnReceive = 0; - this.configQuery.orderScanFinish = 1; - } - }, - - - }, + methods: {}, data() { return { - configQuery: { - autoUpload: null, - orderSyncTime: null, - orderStartTime: null, - orderUnCheck: null, - orderUnReceive: null, - orderScanFinish: null, - checkWebNew: null, - checkPdaUn: null, - checkPdaEd: null, - checkUdims: null, - checkPc: null, - checkSp: null, - checkChange: null, - checkBalacne: null, - busTypes: [], - orderSources: [], // 存储用户选择的单据来源 - orderStatus: 3,//单选框默认选择已完成单据选项 + inputQuery: { + orderSource: [], // 存储用户选择的单据来源 + orderStatus: 3,//单选框默认选择已确认单据选项 }, } } diff --git a/src/views/inout/uploadManage/uploadSetting.vue b/src/views/inout/uploadManage/uploadSetting.vue index 0b966d47..a346e122 100644 --- a/src/views/inout/uploadManage/uploadSetting.vue +++ b/src/views/inout/uploadManage/uploadSetting.vue @@ -77,9 +77,14 @@ ></el-table-column> <el-table-column label="单据状态" - prop="" + prop="orderStatus" show-overflow-tooltip - ></el-table-column> + > + <template slot-scope="scope"> + <el-tag>{{ statusMap[scope.row.orderStatus] }}</el-tag> + </template> + + </el-table-column> <el-table-column label="操作"> <template slot-scope="scope"> <el-button @@ -167,7 +172,7 @@ <script> import modifyDialog from "./uploadModify"; import {getBusTypeList} from "@/api/basic/busType"; -import {addBus, getBusList, getConfig, saveConfig, updateConfig} from "@/api/thrsys/thrUploadSet"; +import {addBus, editBus, getBusList, getConfig, removeBus, saveConfig, updateConfig} from "@/api/thrsys/thrUploadSet"; import {isBlank} from "@/utils/strUtil"; import {filterListInvoice} from "@/api/inout/orderDetailBiz"; import {updateBasicThirdSys} from "@/api/thrsys/basicThirdSys"; @@ -210,7 +215,12 @@ export default { total: 0, busTypes: [], addBusDialogVisible: false, - multipleSelection: [] + multipleSelection: [], + statusMap: { + 1: "未审核", + 2: "已审核", + 3: "已确认", + }, }; }, methods: { @@ -251,16 +261,12 @@ export default { this.inputQuery = row; }, - //编辑提交 还没改完!!!!!! onModifySubmit() { - // this.$message.error(this.inputQuery.configQuery.orderSources); - //测试方法先注释一下 - updateConfig(this.inputQuery) + editBus(this.inputQuery) .then((response) => { if (response.code == 20000) { + this.getSelectBus(); this.Updocument = false; - this.loading = false; - this.getBuType(); this.$message.success(response.data); } else { this.$message.error(response.message); @@ -281,8 +287,22 @@ export default { //删除 removeBus(index, row) { - this.checkedBusTypes.splice(index, 1); + let query = { + id: row.id, + } + removeBus(query).then((res) => { + if (res.code == 20000) { + this.getSelectBus(); + } else { + this.$message.error(response.message); + } + }).catch((error) => { + this.loading = false; + }); + }, + + getBuType() { getBusTypeList(this.busQuery).then((res) => { this.busTypes = res.data.list || []; diff --git a/src/views/myLogin.vue b/src/views/myLogin.vue index d897988b..1a97d14c 100644 --- a/src/views/myLogin.vue +++ b/src/views/myLogin.vue @@ -6,7 +6,7 @@ </div> <el-form class="card-box login-form" - autocomplete="on" + autocomplete="on+ :model="ruleForm" :rules="rules" ref="ruleForm" @@ -14,7 +14,7 @@ > <el-card class="box-card"> <div style="text-align: center; margin-top: 10px"> - <img alt="element-logo" src="@/assets/logo/logo.png" /> + <img alt="element-logo" src="@/assets/logo/logo.png"/> </div> <h3 class="title">用户登录</h3> <el-form-item prop="username" class="item" style="margin-top: -20px"> @@ -25,7 +25,7 @@ v-model="loginForm.username" > <i slot="prefix" class="el-input__icon"> - <icon-svg icon-class="user" /> + <icon-svg icon-class="user"/> </i> </el-input> </el-form-item> @@ -39,14 +39,14 @@ autocomplete="on" > <i slot="prefix" class="el-input__icon"> - <icon-svg icon-class="pwd" /> + <icon-svg icon-class="pwd"/> </i> <i slot="suffix" class="el-input__icon" @click="isShowPwd = !isShowPwd" > - <icon-svg icon-class="eye" /> + <icon-svg icon-class="eye"/> </i> </el-input> </el-form-item> @@ -71,7 +71,7 @@ style="width: 60%; margin-bottom: 30px" :loading="loading" @click.native="handleLogin()" - >登录 + >登录 </el-button> </div> </el-card> @@ -96,7 +96,7 @@ import Verify from "vue2-verify"; import axios from "axios"; import Cookies from "js-cookie"; -import { decrypt, encrypt } from "@/utils/jsencrypt"; +import {decrypt, encrypt} from "@/utils/jsencrypt"; export default { data() { @@ -124,9 +124,9 @@ export default { }, rules: { userName: [ - { required: true, message: "请输入登录名", trigger: "blur" }, + {required: true, message: "请输入登录名", trigger: "blur"}, ], - pwd: [{ validator: validatePwd, trigger: "blur" }], + pwd: [{validator: validatePwd, trigger: "blur"}], }, isShowPwd: false, // 是否显示密码 loading: false, // 登录loading @@ -203,7 +203,7 @@ export default { if (this.loginForm.verificationCode) { this.loading = true; if (this.loginForm.rememberMe) { - Cookies.set("username", this.loginForm.username, { expires: 30 }); + Cookies.set("username", this.loginForm.username, {expires: 30}); Cookies.set("password", encrypt(this.loginForm.password), { expires: 30, }); @@ -217,8 +217,9 @@ export default { .dispatch("Login", this.loginForm) .then((res) => { this.$router - .push({ path: this.redirect || "/" }) - .catch((res) => {}); + .push({path: this.redirect || "/"}) + .catch((res) => { + }); }) .catch((res) => { this.loading = false; @@ -329,6 +330,7 @@ $light_gray: #eee; font-weight: bold; margin-bottom: 50px; } + .textTitle { width: 50%; font-size: 45px; @@ -340,6 +342,7 @@ $light_gray: #eee; margin-top: 132px; margin-bottom: -10px; } + .topSubtitle { color: #fcd38b; text-align: center;