领料申请

This commit is contained in:
jjLv 2024-11-12 10:28:11 +08:00
parent 65aff8c6d7
commit a170b129cc
7 changed files with 312 additions and 320 deletions

View File

@ -9,6 +9,15 @@ export function getListLeaseApply(query) {
}) })
} }
// 领料申请到货-新增
export function addApplyInfo(data) {
return request({
url: '/material/lease_apply_info',
method: 'post',
data: data,
})
}
//新购到货-二级列表详情 //新购到货-二级列表详情
export function getPurchaseCheckInfo(query) { export function getPurchaseCheckInfo(query) {
return request({ return request({
@ -56,11 +65,3 @@ export function uploadPurchaseFile(data) {
} }
// // 状态信息下拉框-
// export function queryStatusDataApi(query) {
// return request({
// url: '/system/lease_apply_status/listNoPage',
// method: 'get',
// params: query
// })
// }

View File

@ -85,10 +85,7 @@
</el-collapse> </el-collapse>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</template> </template>

View File

@ -2,7 +2,12 @@
<div class="container"> <div class="container">
<div class="login"> <div class="login">
<div class="login-form"> <div class="login-form">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<h3 class="title">博诺思后台管理系统</h3> <h3 class="title">博诺思后台管理系统</h3>
<template v-if="loginMethod === 'password'"> <template v-if="loginMethod === 'password'">
<el-form-item prop="username"> <el-form-item prop="username">
@ -10,9 +15,15 @@
v-model="loginForm.username" v-model="loginForm.username"
type="text" type="text"
auto-complete="off" auto-complete="off"
:placeholder="`用户名${config.loginConfig.phonePassword ? '/手机号' : ''}${config.loginConfig.emailPassword ? '/邮箱' : ''}`" :placeholder="`用户名${
config.loginConfig.phonePassword ? '/手机号' : ''
}${config.loginConfig.emailPassword ? '/邮箱' : ''}`"
> >
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
@ -23,7 +34,11 @@
placeholder="密码" placeholder="密码"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="captchaEnabled"> <el-form-item prop="code" v-if="captchaEnabled">
@ -34,25 +49,38 @@
style="width: 63%" style="width: 63%"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/> <img :src="codeUrl" @click="getCode" class="login-code-img" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-show="isAdmin" prop="verificationCode"> <el-form-item v-show="isAdmin" prop="verificationCode">
<el-input v-model="loginForm.verificationCode" placeholder="请输入验证码"> <el-input
v-model="loginForm.verificationCode"
placeholder="请输入验证码"
>
<template slot="append"> <template slot="append">
<el-button <el-button
type="primary" type="primary"
@click="sendAdminCode" @click="sendAdminCode"
:disabled="isSendingCode || captchaEnabled?!loginForm.code:false" :disabled="
isSendingCode || captchaEnabled ? !loginForm.code : false
"
class="send-code-button" class="send-code-button"
> >
{{ countdown === 0 ? '获取验证码' : `${countdown}s` }} {{ countdown === 0 ? "获取验证码" : `${countdown}s` }}
</el-button> </el-button>
</template> </template>
<svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="message"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
</template> </template>
@ -62,9 +90,15 @@
v-model="loginForm.mobile" v-model="loginForm.mobile"
type="text" type="text"
auto-complete="off" auto-complete="off"
:placeholder="`${config.loginConfig.phoneCode ? '手机号' : '/'}${config.loginConfig.emailCode ? '邮箱' : ''}`" :placeholder="`${
config.loginConfig.phoneCode ? '手机号' : '/'
}${config.loginConfig.emailCode ? '邮箱' : ''}`"
> >
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="captchaEnabled"> <el-form-item prop="code" v-if="captchaEnabled">
@ -75,54 +109,80 @@
style="width: 63%" style="width: 63%"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
> >
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/> <img :src="codeUrl" @click="getCode" class="login-code-img" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="verificationCode"> <el-form-item prop="verificationCode">
<el-input v-model="loginForm.verificationCode" placeholder="请输入验证码"> <el-input
v-model="loginForm.verificationCode"
placeholder="请输入验证码"
>
<template slot="append"> <template slot="append">
<el-button <el-button
type="primary" type="primary"
@click="sendCode" @click="sendCode"
:disabled="isSendingCode || captchaEnabled?!loginForm.code:false" :disabled="
isSendingCode || captchaEnabled ? !loginForm.code : false
"
class="send-code-button" class="send-code-button"
> >
{{ countdown === 0 ? '获取验证码' : `${countdown}s` }} {{ countdown === 0 ? "获取验证码" : `${countdown}s` }}
</el-button> </el-button>
</template> </template>
<svg-icon slot="prefix" icon-class="message" class="el-input__icon input-icon"/> <svg-icon
slot="prefix"
icon-class="message"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
</template> </template>
<div class="login-form-center"> <div class="login-form-center">
<el-link v-if="config.loginConfig.emailCode ||config.loginConfig.phoneCode " @click="toggleLoginMethod"> <el-link
{{ loginMethod === 'password' ? '短信登录' : '密码登录' }} v-if="
config.loginConfig.emailCode || config.loginConfig.phoneCode
"
@click="toggleLoginMethod"
>
{{ loginMethod === "password" ? "短信登录" : "密码登录" }}
</el-link> </el-link>
<router-link v-if="config.registersConfig.emailRegisters || config.registersConfig.phoneRegisters" to="/register"> <router-link
v-if="
config.registersConfig.emailRegisters ||
config.registersConfig.phoneRegisters
"
to="/register"
>
<el-link>注册账号</el-link> <el-link>注册账号</el-link>
</router-link> </router-link>
<el-checkbox v-model="loginForm.rememberMe">记住密码</el-checkbox> <el-checkbox v-model="loginForm.rememberMe">记住密码</el-checkbox>
</div> </div>
<el-form-item style="width: 100%;"> <el-form-item style="width: 100%">
<el-button v-if="!isAdmin" <el-button
:loading="loading" v-if="!isAdmin"
size="medium" :loading="loading"
type="primary" size="medium"
style="width: 100%;" type="primary"
@click="loginMethod === 'password' ?IsAdmin():isLogin()" style="width: 100%"
@click="loginMethod === 'password' ? IsAdmin() : isLogin()"
> >
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
</el-button> </el-button>
<el-button v-if="isAdmin" <el-button
:loading="loading" v-if="isAdmin"
size="medium" :loading="loading"
type="primary" size="medium"
style="width: 100%;" type="primary"
@click="isLogin()" style="width: 100%"
@click="isLogin()"
> >
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
@ -132,13 +192,13 @@
<div class="login-divider">第三方登录</div> <div class="login-divider">第三方登录</div>
<div class="login-icons"> <div class="login-icons">
<div class="login-icon"> <div class="login-icon">
<img :src="dingding" alt="Weibo"> <img :src="dingding" alt="Weibo" />
</div> </div>
<div class="login-icon"> <div class="login-icon">
<img :src="wx" alt="WeChat"> <img :src="wx" alt="WeChat" />
</div> </div>
<div class="login-icon"> <div class="login-icon">
<img :src="qq" alt="QQ"> <img :src="qq" alt="QQ" />
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
@ -149,233 +209,268 @@
</template> </template>
<script> <script>
import { getCodeImg } from '@/api/login' import { getCodeImg } from "@/api/login";
import Cookies from 'js-cookie' import Cookies from "js-cookie";
import { decrypt, encrypt } from '@/utils/jsencrypt' import { decrypt, encrypt } from "@/utils/jsencrypt";
import dingding from '@/assets/images/dingding.svg' import dingding from "@/assets/images/dingding.svg";
import wx from '@/assets/images/wx.svg' import wx from "@/assets/images/wx.svg";
import qq from '@/assets/images/QQ.svg' import qq from "@/assets/images/QQ.svg";
export default { export default {
name: 'Login', name: "Login",
data() { data() {
return { return {
dingding: dingding, dingding: dingding,
wx: wx, wx: wx,
qq: qq, qq: qq,
codeUrl: '', codeUrl: "",
isAdmin: false, isAdmin: false,
loginForm: { loginForm: {
username: '', username: "",
password: '', password: "",
rememberMe: false, rememberMe: false,
code: '', code: "",
mobile: '', mobile: "",
verificationCode: '', verificationCode: "",
uuid: '', uuid: "",
loginType: '', loginType: "",
phoneUuid: '', phoneUuid: "",
mobileCodeType: 'LOGIN' mobileCodeType: "LOGIN",
}, },
passwordLoginRules: { passwordLoginRules: {
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }], username: [
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }], { required: true, trigger: "blur", message: "请输入您的账号" },
code: [{ required: true, trigger: 'change', message: '请输入验证码' }] ],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
}, },
mobileLoginRules: { mobileLoginRules: {
mobile: [{ required: true, trigger: 'blur', message: '请输入您的手机号' }], mobile: [
verificationCode: [{ required: true, trigger: 'blur', message: '请输入验证码' }] { required: true, trigger: "blur", message: "请输入您的手机号" },
],
verificationCode: [
{ required: true, trigger: "blur", message: "请输入验证码" },
],
}, },
loading: false, loading: false,
captchaEnabled: true, captchaEnabled: true,
redirect: undefined, redirect: undefined,
isSendingCode: false, isSendingCode: false,
countdown: 0, countdown: 0,
loginMethod: 'password', // 'password' or 'mobile' loginMethod: "password", // 'password' or 'mobile'
supportsPhoneLogin: false, supportsPhoneLogin: false,
supportsEmailLogin: false supportsEmailLogin: false,
} };
}, },
computed: { computed: {
config() { config() {
return JSON.parse(localStorage.getItem('systemConfig')) || {loginConfig:{ return (
phonePassword: true, JSON.parse(localStorage.getItem("systemConfig")) || {
emailPassword: true, loginConfig: {
phoneCode: false, phonePassword: true,
emailCode: false emailPassword: true,
},registersConfig: { phoneCode: false,
phoneRegisters: true, emailCode: false,
emailRegisters: true },
}}; // JSON registersConfig: {
phoneRegisters: true,
emailRegisters: true,
},
}
); // JSON
}, },
loginRules() { loginRules() {
return this.loginMethod === 'password' ? this.passwordLoginRules : this.mobileLoginRules return this.loginMethod === "password"
} ? this.passwordLoginRules
: this.mobileLoginRules;
},
}, },
watch: { watch: {
$route: { $route: {
handler(route) { handler(route) {
this.redirect = route.query && route.query.redirect this.redirect = route.query && route.query.redirect;
}, },
immediate: true immediate: true,
} },
}, },
created() { created() {
this.getCode() this.getCode();
this.getCookie() this.getCookie();
}, },
methods: { methods: {
getCode() { getCode() {
getCodeImg().then(res => { getCodeImg().then((res) => {
this.captchaEnabled = res.captchaEnabled !== undefined ? res.captchaEnabled : true this.captchaEnabled =
res.captchaEnabled !== undefined ? res.captchaEnabled : true;
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.img this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid this.loginForm.uuid = res.uuid;
} }
}) });
}, },
getCookie() { getCookie() {
const username = Cookies.get('username') const username = Cookies.get("username");
const password = Cookies.get('password') const password = Cookies.get("password");
const rememberMe = Cookies.get('rememberMe') const rememberMe = Cookies.get("rememberMe");
this.loginForm.username = username || '' this.loginForm.username = username || "";
this.loginForm.password = password ? decrypt(password) : '' this.loginForm.password = password ? decrypt(password) : "";
this.loginForm.rememberMe = rememberMe === 'true' this.loginForm.rememberMe = rememberMe === "true";
}, },
handleLogin() { handleLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true;
if (this.loginForm.rememberMe) { 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 }) Cookies.set("password", encrypt(this.loginForm.password), {
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }) expires: 30,
});
Cookies.set("rememberMe", this.loginForm.rememberMe, {
expires: 30,
});
} else { } else {
Cookies.remove('username') Cookies.remove("username");
Cookies.remove('password') Cookies.remove("password");
Cookies.remove('rememberMe') Cookies.remove("rememberMe");
} }
this.loginForm.loginMethod = this.loginMethod this.loginForm.loginMethod = this.loginMethod;
this.$store.dispatch('Login', this.loginForm) this.$store
.then(() => this.$router.push({ path: this.redirect || '/' })) .dispatch("Login", this.loginForm)
.then(() => this.$router.push({ path: this.redirect || "/" }))
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
if (this.captchaEnabled) this.getCode() if (this.captchaEnabled) this.getCode();
}) });
} }
}) });
}, },
IsAdmin() { IsAdmin() {
this.loginForm.loginMethod = this.loginMethod this.loginForm.loginMethod = this.loginMethod;
this.$store.dispatch('IsAdmin', this.loginForm).then(res => { this.$store.dispatch("IsAdmin", this.loginForm).then((res) => {
if (res.data) { if (res.data) {
this.isAdmin = res.data this.isAdmin = res.data;
this.$message.success('检测到您是超级管理账号,需进行手机检验') this.$message.success("检测到您是超级管理账号,需进行手机检验");
} else { } else {
this.isLogin() this.isLogin();
} }
}) });
}, },
isLogin() { isLogin() {
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true;
let that = this let that = this;
this.loginForm.loginMethod = this.loginMethod this.loginForm.loginMethod = this.loginMethod;
this.$store.dispatch('IsLogin', this.loginForm) this.$store
.then(res => { .dispatch("IsLogin", this.loginForm)
.then((res) => {
if (res.data) { if (res.data) {
this.$modal.confirm('账号已在其他地方登录是否继续登录!!!!').then(function() { this.$modal
return that.handleLogin() .confirm("账号已在其他地方登录是否继续登录!!!!")
}).then(() => { .then(function () {
this.loading = false return that.handleLogin();
}).catch(() => { })
this.loading = false .then(() => {
}) this.loading = false;
})
.catch(() => {
this.loading = false;
});
} else { } else {
that.handleLogin() that.handleLogin();
} }
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
if (this.captchaEnabled) this.getCode() if (this.captchaEnabled) this.getCode();
}) });
} }
}) });
}, },
sendAdminCode() { sendAdminCode() {
this.loginForm.mobile = this.loginForm.username this.loginForm.mobile = this.loginForm.username;
this.$store.dispatch('GetPhoneCode', this.loginForm) this.$store
.then(res => { .dispatch("GetPhoneCode", this.loginForm)
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.loginForm.phoneUuid = res.data this.loginForm.phoneUuid = res.data;
this.$message.success('验证码发送成功') this.$message.success("验证码发送成功");
this.isSendingCode = true this.isSendingCode = true;
this.countdown = 60 this.countdown = 60;
const timer = setInterval(() => { const timer = setInterval(() => {
this.countdown -= 1 this.countdown -= 1;
if (this.countdown <= 0) { if (this.countdown <= 0) {
clearInterval(timer) clearInterval(timer);
this.isSendingCode = false this.isSendingCode = false;
} }
}, 1000) }, 1000);
} }
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
// //
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.getCode() this.getCode();
} }
// //
this.isSendingCode = false this.isSendingCode = false;
this.countdown = 0 this.countdown = 0;
}) });
}, },
sendCode() { sendCode() {
if (this.captchaEnabled ? !this.loginForm.code : false) { if (this.captchaEnabled ? !this.loginForm.code : false) {
this.$message.error('请先填写验证码') this.$message.error("请先填写验证码");
return return;
} }
if (!this.loginForm.mobile) { if (!this.loginForm.mobile) {
this.$message.error('请先填写'+this.config.loginConfig.phoneCode ? '手机号' : '/' + this.config.loginConfig.emailCode ? '邮箱' : '') this.$message.error(
return "请先填写" + this.config.loginConfig.phoneCode
? "手机号"
: "/" + this.config.loginConfig.emailCode
? "邮箱"
: ""
);
return;
} }
this.$store.dispatch('GetPhoneCode', this.loginForm) this.$store
.dispatch("GetPhoneCode", this.loginForm)
.then(() => { .then(() => {
this.isSendingCode = true this.isSendingCode = true;
this.countdown = 60 this.countdown = 60;
const timer = setInterval(() => { const timer = setInterval(() => {
this.countdown -= 1 this.countdown -= 1;
if (this.countdown <= 0) { if (this.countdown <= 0) {
clearInterval(timer) clearInterval(timer);
this.isSendingCode = false this.isSendingCode = false;
} }
}, 1000) }, 1000);
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
// //
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.getCode() this.getCode();
} }
// //
this.isSendingCode = false this.isSendingCode = false;
this.countdown = 0 this.countdown = 0;
}) });
}, },
toggleLoginMethod() { toggleLoginMethod() {
this.loginMethod = this.loginMethod === 'password' ? 'mobile' : 'password' this.loginMethod =
this.loginForm.username = '' this.loginMethod === "password" ? "mobile" : "password";
this.loginForm.password = '' this.loginForm.username = "";
this.loginForm.code = '' this.loginForm.password = "";
this.loginForm.verificationCode = '' this.loginForm.code = "";
this.loginForm.loginMethod = '' this.loginForm.verificationCode = "";
this.isAdmin = false this.loginForm.loginMethod = "";
this.getCode() this.isAdmin = false;
} this.getCode();
} },
} },
};
</script> </script>
<style lang="scss"> <style lang="scss">
@ -478,17 +573,17 @@ export default {
.login-divider::before, .login-divider::before,
.login-divider::after { .login-divider::after {
content: ''; content: "";
flex: 1; flex: 1;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
.login-divider:not(:empty)::before { .login-divider:not(:empty)::before {
margin-right: .25em; margin-right: 0.25em;
} }
.login-divider:not(:empty)::after { .login-divider:not(:empty)::after {
margin-left: .25em; margin-left: 0.25em;
} }
.login-icons { .login-icons {

View File

@ -41,9 +41,9 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="领料人" prop="taxRate"> <el-form-item label="领料人" prop="leasePerson">
<el-input <el-input
v-model="maForm.taxRate" v-model="maForm.leasePerson"
placeholder="请输入领料人" placeholder="请输入领料人"
clearable clearable
maxlength="50" maxlength="50"
@ -53,9 +53,9 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="taxRate"> <el-form-item label="联系电话" prop="phone">
<el-input <el-input
v-model="maForm.taxRate" v-model="maForm.phone"
placeholder="请输入联系电话" placeholder="请输入联系电话"
clearable clearable
maxlength="50" maxlength="50"
@ -68,7 +68,7 @@
<el-form-item label="类型规格" prop="deviceType"> <el-form-item label="类型规格" prop="deviceType">
<el-cascader <el-cascader
:key="propsKey" :key="propsKey"
v-model="deviceType" v-model="maForm.deviceType"
:show-all-levels="false" :show-all-levels="false"
:options="equipmentTypeList" :options="equipmentTypeList"
:props="deviceTypeTreeProps" :props="deviceTypeTreeProps"
@ -163,7 +163,7 @@
import { import {
getPurchaseCheckInfo, getPurchaseCheckInfo,
equipmentTypeTree, equipmentTypeTree,
addPurchaseCheckInfo, addApplyInfo,
updatePurchaseCheckInfo, updatePurchaseCheckInfo,
} from "@/api/purchase/goodsArrived"; } from "@/api/purchase/goodsArrived";
import { getListFacturer } from "@/api/ma/supplier"; import { getListFacturer } from "@/api/ma/supplier";
@ -273,10 +273,10 @@ export default {
// trigger: 'blur', // trigger: 'blur',
// }, // },
// ], // ],
arrivalTime: [ deviceType: [
{ {
required: true, required: true,
message: "请选择到货日期", message: "请选择规格型号",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -496,7 +496,7 @@ export default {
// path: '/store/newBuy/newDevicesList', // path: '/store/newBuy/newDevicesList',
// }) // })
this.$emit("addToolsSuccessApply"); this.$emit("addToolsSuccess");
} }
this.loading = false; this.loading = false;
}); });
@ -504,9 +504,9 @@ export default {
console.log("新增"); console.log("新增");
// console.log(this.equipmentList) // console.log(this.equipmentList)
this.loading = true; this.loading = true;
addPurchaseCheckInfo({ addApplyInfo({
purchaseCheckDetailsList: this.equipmentList, leaseApplyDetailsList: this.equipmentList,
purchaseCheckInfo: this.maForm, leaseApplyInfo: this.maForm,
}).then((response) => { }).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
@ -514,7 +514,7 @@ export default {
// path: '/store/newBuy/newDevicesList', // path: '/store/newBuy/newDevicesList',
// }) // })
this.$emit("addToolsSuccessApply"); this.$emit("addToolsSuccess");
} }
this.loading = false; this.loading = false;
}); });

View File

@ -182,7 +182,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.purchase_task_status" :options="dict.type.lease_apply_status"
:value="scope.row.status" :value="scope.row.status"
/> />
</template> </template>
@ -218,7 +218,7 @@
size="mini" size="mini"
style="margin-bottom: 10px" style="margin-bottom: 10px"
type="success" type="success"
@click="handleNotice(scope.row)" @click="handleSend(scope.row)"
v-if="scope.row.status == '0'" v-if="scope.row.status == '0'"
v-hasPermi="['purchase:person:notice']" v-hasPermi="['purchase:person:notice']"
>发布</el-button >发布</el-button
@ -646,6 +646,11 @@ export default {
}, },
}, },
//
handleSend(row) {
console.log("发布");
},
watch: { watch: {
$route: { $route: {
handler(to) { handler(to) {

View File

@ -15,7 +15,7 @@
<el-table v-loading="loading" :data="equipmentList"> <el-table v-loading="loading" :data="equipmentList">
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column <el-table-column
label="物资名称" label="类型名称"
align="center" align="center"
prop="maTypeName" prop="maTypeName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
@ -27,144 +27,38 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="单位" label="计量单位"
align="center" align="center"
prop="unitName" prop="unitName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="采购数量" label="当前库存"
align="center" align="center"
prop="purchaseNum" prop="purchaseNum"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="购置单价(元含税)" label="预领数量"
align="center" align="center"
prop="purchaseTaxPrice" prop="purchaseTaxPrice"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="购置单价(元不含税)" label="出库数量"
align="center" align="center"
prop="purchasePrice" prop="purchasePrice"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="是否未固定资产" label="备注"
align="center" align="center"
prop="fixCode" prop="remark"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column
label="出厂日期"
align="center"
prop="productionTime"
:show-overflow-tooltip="true"
/>
<el-table-column label="相关配套资料" align="center" prop="">
<template slot-scope="scope">
<div
style="color: rgb(2, 167, 240); cursor: pointer"
@click="openFileDialog(scope.row)"
>
报告管理
</div>
</template>
</el-table-column>
<el-table-column
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.purchase_task_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
</el-table> </el-table>
<el-dialog
title="报告管理"
:visible.sync="open"
width="900px"
append-to-body
>
<el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column
label="报告类型"
align="center"
prop="dictLabel"
:show-overflow-tooltip="true"
/>
<el-table-column
label="文件名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column
label="类型名称"
align="center"
:show-overflow-tooltip="true"
>
<template>
<div>{{ this.rowData.maTypeName }}</div>
</template>
</el-table-column>
<el-table-column
label="规格型号"
align="center"
:show-overflow-tooltip="true"
>
<template>
<div>{{ this.rowData.typeName }}</div>
</template>
</el-table-column>
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers"
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
:on-success="handleFileSuccess" :auto-upload="true"
>
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
上传
</el-button>
</el-upload> -->
<el-button
size="mini"
type="text"
@click="picturePreview(scope.row)"
v-if="scope.row.url"
>
查看
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px">
<img width="100%" height="500px" :src="dialogImageUrl" />
</el-dialog>
</div> </div>
</template> </template>

View File

@ -1,12 +1,12 @@
<script> <script>
export default { export default {
created() { created() {
const { params, query } = this.$route const { params, query } = this.$route;
const { path } = params const { path } = params;
this.$router.replace({ path: '/' + path, query }) this.$router.replace({ path: "/" + path, query });
}, },
render: function(h) { render: function (h) {
return h() // avoid warning message return h(); // avoid warning message
} },
} };
</script> </script>