登录出错问问题,

ywj_dev
anthonywj 2 years ago
parent 5acb037048
commit b7ef501166

@ -349,5 +349,9 @@
text-align: right; text-align: right;
} }
.el-table--mini .el-table__cell {
padding:0px!important;
}

@ -71,11 +71,16 @@ const user = {
const uuid = userInfo.uuid const uuid = userInfo.uuid
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => { login(username, password, code, uuid).then(res => {
setToken(res.data.token) if (res.code == 20000) {
setAdminId(res.data.id) setToken(res.data.token)
commit('SET_TOKEN', res.data.token) setAdminId(res.data.id)
commit('SET_ADMINID', res.data.id) commit('SET_TOKEN', res.data.token)
resolve() commit('SET_ADMINID', res.data.id)
resolve()
} else {
reject(res.message);
}
}).catch(error => { }).catch(error => {
reject(error) reject(error)
}) })

@ -206,11 +206,12 @@ export default {
Cookies.remove("password"); Cookies.remove("password");
// Cookies.remove('rememberMe'); // Cookies.remove('rememberMe');
} }
this.$store.dispatch("Login", this.loginForm).then(() => { this.$store.dispatch("Login", this.loginForm).then((res) => {
this.$router.push({path: this.redirect || "/"}).catch(() => { this.$router.push({path: this.redirect || "/"}).catch((res) => {
}); });
}).catch(() => { }).catch((res) => {
this.loading = false; this.loading = false;
this.$message.error(res);
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.getCode(); this.getCode();
} }

@ -26,7 +26,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
@ -58,8 +57,6 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑 <el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
@ -82,7 +79,6 @@
<el-card class="el-card"> <el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="序号" type="index" width="120"></el-table-column> <el-table-column label="序号" type="index" width="120"></el-table-column>
<!-- <el-table-column label="产品编码" prop="productId"></el-table-column> -->
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column> <el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="送货数量" prop="count"></el-table-column> <el-table-column label="送货数量" prop="count"></el-table-column>

@ -77,23 +77,49 @@
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border <el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border
highlight-current-row max-height="300" height="300" ref="multipleTable"> highlight-current-row max-height="300" height="300" ref="multipleTable">
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column> <el-table-column label="产品通用名" prop="productName" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column> <el-table-column label="规格型号" prop="spec" width="150" show-overflow-tooltip></el-table-column>
<el-table-column width="150" label="批次号">
<template slot-scope="scope">
<el-input v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef'
placeholder="请输入批次号"></el-input>
</template>
</el-table-column>
<el-table-column width="180" label="生产日期(yyMMdd)">
<template slot-scope="scope">
<el-input v-model="scope.row.productDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex"
type="number"
></el-input>
</template>
</el-table-column>
<el-table-column width="180" label="失效日期(yyMMdd)">
<template slot-scope="scope">
<el-input v-model="scope.row.expireDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex"
type="number"
></el-input>
</template>
</el-table-column>
<el-table-column width="150" label="送货数量"> <el-table-column width="150" label="送货数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.count" <el-input size="small" v-model="scope.row.count"
placeholder="请输入数量" style="width: 80%" placeholder="请输入数量" style="width: 80%"
type='number' type='number'
@change="tableCountChange(scope.row)"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
oninput="value=value.replace(/[^\d]/g,'')"></el-input> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column> <el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> <el-table-column label="生产厂家" prop="manufactory" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column> <el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> <el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true" <el-button type="text" size="small" :disabled="scope.row.index === selectedIndex" @click.stop="true"
@click.native="rowChange(scope.row)">编辑 @click.native="rowChange(scope.row)">编辑
@ -235,6 +261,9 @@ export default {
}, },
methods: { methods: {
saveOrder(status) { saveOrder(status) {
this.tableCountChange(this.currentRow);
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
if (this.codeArray.length < 1) { if (this.codeArray.length < 1) {
@ -333,6 +362,7 @@ export default {
}); });
}, },
rowChange(val) { rowChange(val) {
this.tableCountChange(this.currentRow);
this.currentRow = val; this.currentRow = val;
this.selectedIndex = val.index; this.selectedIndex = val.index;
}, },

Loading…
Cancel
Save