一些小问题以及bug修复,单据单号自动生成

master
anthonywj 3 years ago
parent 543ba9bd29
commit 76910d2aca

@ -1,4 +1,5 @@
{ {
"BASE_URL": "http://139.159.187.130/SPMS_SERVER", "BASE_URL": "http://192.168.0.109:9996",
"SERVER_IP": "http://192.168.0.109:9996" "SERVER_IP": "http://192.168.0.109:9996",
"hosp_name": "诏安县总医院(测试)"
} }

@ -94,7 +94,6 @@
<el-table <el-table
:data="udidlList" :data="udidlList"
style="width: 100%" style="width: 100%"
@row-click="intentDetail"
v-loading="loading" v-loading="loading"
highlight-current-row="true" highlight-current-row="true"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"

@ -74,7 +74,7 @@
</el-card> </el-card>
<el-dialog <el-dialog
title="库存详情" title="库存详情"
:visible.sync="codeDetailVisible" :visible.sync="codeDetailVisible"
width="85%" width="85%"
v-if="codeDetailVisible" v-if="codeDetailVisible"

@ -585,6 +585,11 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
this.filterQuery.customerId = store.getters.customerId; this.filterQuery.customerId = store.getters.customerId;
if (!this.$isBlank(this.filterQuery.code)) {
console.log(this.filterQuery.code)
let code = this.filterQuery.code;
this.filterQuery.code = code.replace("\r","")
}
filterOrderTrace(this.filterQuery) filterOrderTrace(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {

@ -3,7 +3,7 @@
<div> <div>
<h3 class="toptitle">诏安县总医院</h3> <h3 class="toptitle">{{hospName}}</h3>
</div> </div>
<el-form <el-form
@ -57,16 +57,17 @@
</el-form-item> </el-form-item>
<el-form-item prop="verificationCode" class="item" style="background-color: white"> <el-form-item prop="verificationCode" class="item" style="background-color: white">
<!--<el-input--> <!--<el-input-->
<!--placeholder="验证码"--> <!--placeholder="验证码"-->
<!--name="verificationCode"--> <!--name="verificationCode"-->
<!--v-model="ruleForm.verificationCode"--> <!--v-model="ruleForm.verificationCode"-->
<!--autocomplete="on"--> <!--autocomplete="on"-->
<!--&gt;--> <!--&gt;-->
<!--<i slot="prefix" class="el-input__icon">--> <!--<i slot="prefix" class="el-input__icon">-->
<!--<icon-svg icon-class="tongyong"/>--> <!--<icon-svg icon-class="tongyong"/>-->
<!--</i>--> <!--</i>-->
<!--</el-input>--> <!--</el-input>-->
<Verify ref="checkV" :showButton="false" :barSize="{width:'305px',height:'37px'}" :vOffset="5" @success="verifyAlert('success')" @error="verifyAlert('error')" :type="3"></Verify> <Verify ref="checkV" :showButton="false" :barSize="{width:'305px',height:'37px'}" :vOffset="5"
@success="verifyAlert('success')" @error="verifyAlert('error')" :type="3"></Verify>
</el-form-item> </el-form-item>
<div style="text-align: center; margin-top: 15px"> <div style="text-align: center; margin-top: 15px">
<el-button <el-button
@ -87,224 +88,231 @@
</div> </div>
</el-card> </el-card>
</el-form> </el-form>
<div style=" position: absolute; bottom: 0; left: 50%; transform: translate(-50%, -50%);" > <div style=" position: absolute; bottom: 0; left: 50%; transform: translate(-50%, -50%);">
<a href="http://www.beian.gov.cn/portal/registerSystemInfo" style="color: white; font-size: 12px" > <a href="http://beian.miit.gov.cn" style="color: white; font-size: 10px">闽ICP备17019234号-4</a>
厦门高立新鹏软件科技有限公司&nbsp; &nbsp;闽公网安备35020302034269号&nbsp;
</a>
<a href="http://beian.miit.gov.cn" style="color: white; font-size: 10px" >闽ICP备17019234号</a>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Verify from 'vue2-verify' import Verify from 'vue2-verify'
import axios from "axios";
export default { export default {
data() { data() {
let validatePwd = (rule, value, callback) => { let validatePwd = (rule, value, callback) => {
if (value === "") { if (value === "") {
callback(new Error("请输入密码")); callback(new Error("请输入密码"));
} else { } else {
callback(); callback();
} }
}; };
return { return {
ruleForm: { ruleForm: {
userName: "", userName: "",
pwd: "", pwd: "",
checked: true, checked: true,
verificationCode: false verificationCode: false
},
rules: {
userName: [
{required: true, message: "请输入登录名", trigger: "blur"},
],
pwd: [{validator: validatePwd, trigger: "blur"}],
},
isShowPwd: false, //
loading: false, // loading
showDialog: false, // dialog
redirect: null, //
};
},
methods: {
verifyAlert(text) {
if (text === 'success') {
this.ruleForm.verificationCode = true;
}
}, },
handleLogin() { rules: {
if (!this.ruleForm.verificationCode) { userName: [
this.$message({ {required: true, message: "请输入登录名", trigger: "blur"},
message: '请进行验证', ],
center: true, pwd: [{validator: validatePwd, trigger: "blur"}],
type: 'warning' },
}); isShowPwd: false, //
return; loading: false, // loading
} showDialog: false, // dialog
this.$refs["ruleForm"].validate((valid) => { redirect: null, //
if (valid) { hospName: "",
this.loading = true; };
this.$store },
.dispatch("loginName", this.ruleForm) methods: {
.then((response) => { verifyAlert(text) {
this.loading = false; if (text === 'success') {
if (response.code !== 20000) { this.ruleForm.verificationCode = true;
console.log("--code = " + response.code); }
this.ruleForm.verificationCode = false; },
this.$refs.checkV.refresh(); handleLogin() {
this.$message.error(response.message); if (!this.ruleForm.verificationCode) {
return; this.$message({
} message: '请进行验证',
let path = "/"; center: true,
if (this.redirect) { type: 'warning'
path = this.redirect; });
} return;
console.log("path = " + path); }
this.$router.push({ this.$refs["ruleForm"].validate((valid) => {
path: "../main", if (valid) {
}); this.loading = true;
// window.location.replace(path); this.$store
// this.showDialog = true .dispatch("loginName", this.ruleForm)
}) .then((response) => {
.catch(() => { this.loading = false;
if (response.code !== 20000) {
console.log("--code = " + response.code);
this.ruleForm.verificationCode = false; this.ruleForm.verificationCode = false;
this.$refs.checkV.refresh(); this.$refs.checkV.refresh();
this.loading = false; this.$message.error(response.message);
return;
}
let path = "/";
if (this.redirect) {
path = this.redirect;
}
console.log("path = " + path);
this.$router.push({
path: "../main",
}); });
} else { // window.location.replace(path);
return false; // this.showDialog = true
} })
}); .catch(() => {
}, this.ruleForm.verificationCode = false;
}, this.$refs.checkV.refresh();
components: { this.loading = false;
Verify });
} else {
return false;
}
});
}, },
created() { },
// components: {
let query = this.$route.query; Verify
if (query.redirect) { },
// URL Encode created() {
this.redirect = decodeURIComponent(query.redirect); //
} let query = this.$route.query;
if (query.redirect) {
// URL Encode
this.redirect = decodeURIComponent(query.redirect);
} }
};
axios.get("./config.json").then(res => {
this.hospName = res.data.hosp_name;
});
}
};
</script> </script>
<style type="text/scss" lang="scss"> <style type="text/scss" lang="scss">
@import "../../styles/mixin"; @import "../../styles/mixin";
$bg: #2d3a4b; $bg: #2d3a4b;
$dark_gray: #889aa4; $dark_gray: #889aa4;
$light_gray: #eee; $light_gray: #eee;
.login-container { .login-container {
@include relative; @include relative;
background-color: white; background-color: white;
background-image: url("../../assets/login.jpg"); background-image: url("../../assets/login.jpg");
background-size: 100vw 100vh; background-size: 100vw 100vh;
height: 100%; height: 100%;
input:-webkit-autofill { input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px #293444 inset !important; -webkit-box-shadow: 0 0 0 1000px #293444 inset !important;
-webkit-text-fill-color: #fff !important; -webkit-text-fill-color: #fff !important;
} }
.item { .item {
width: 22em; width: 22em;
margin-left: 5em; margin-left: 5em;
.el-form-item__content { .el-form-item__content {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
}
} }
}
input { input {
background: transparent; background: transparent;
border: 0; border: 0;
-webkit-appearance: none; -webkit-appearance: none;
border-radius: 0; border-radius: 0;
padding: 0.46rem 0.0666rem 0.16rem 0.2rem; padding: 0.46rem 0.0666rem 0.16rem 0.2rem;
color: $dark_gray; color: $dark_gray;
height: 100%; height: 100%;
} }
.el-input { .el-input {
display: inline-block; display: inline-block;
} }
.tips { .tips {
font-size: 14px; font-size: 14px;
color: #fff; color: #fff;
margin-bottom: 0.13333rem; margin-bottom: 0.13333rem;
} }
.svg-container { .svg-container {
padding: 0.08rem 0.0666rem 0.08rem 0.2rem; padding: 0.08rem 0.0666rem 0.08rem 0.2rem;
color: $dark_gray; color: $dark_gray;
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
&_login { &_login {
font-size: 20px; font-size: 20px;
}
} }
}
.title { .title {
font-size: 26px; font-size: 26px;
color: #2d3a4b; color: #2d3a4b;
margin: 0 auto 0.5333rem auto; margin: 0 auto 0.5333rem auto;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
margin-bottom: 50px; margin-bottom: 50px;
} }
.toptitle { .toptitle {
position: absolute; position: absolute;
font-size: 55px; font-size: 55px;
color: #FFFFFF; color: #FFFFFF;
margin: 50px auto 0.5333rem 50px; margin: 50px auto 0.5333rem 50px;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
} }
.login-form {
//@include fxied-center;
margin: 0px 100px auto auto;
width: 50em;
/*background-color: silver;*/
/*background: #fff;*/
padding: 10em 10em 15em 10em;
}
.el-form-item { .login-form {
border: 1px solid rgba(255, 255, 255, 0.1); //@include fxied-center;
background: rgba(0, 0, 0, 0.1); margin: 0px 100px auto auto;
border-radius: 0.0666rem; width: 50em;
color: #454545; /*background-color: silver;*/
} /*background: #fff;*/
padding: 10em 10em 15em 10em;
}
.show-pwd { .el-form-item {
position: absolute; border: 1px solid rgba(255, 255, 255, 0.1);
right: 0.1333rem; background: rgba(0, 0, 0, 0.1);
top: 0.09333rem; border-radius: 0.0666rem;
font-size: 16px; color: #454545;
color: $dark_gray; }
cursor: pointer;
}
.thirdparty-button { .show-pwd {
/*position: absolute;*/ position: absolute;
/*right: .4666rem;*/ right: 0.1333rem;
/*bottom: .37333rem;*/ top: 0.09333rem;
} font-size: 16px;
color: $dark_gray;
cursor: pointer;
}
.box-card { .thirdparty-button {
margin-top: -20px; /*position: absolute;*/
height: 550px; /*right: .4666rem;*/
width: 490px; /*bottom: .37333rem;*/
} }
.box-card {
margin-top: -20px;
height: 550px;
width: 490px;
} }
}
</style> </style>

@ -391,8 +391,6 @@ import {
} from "../../../api/param/systemPDFTemplate"; } from "../../../api/param/systemPDFTemplate";
import {saveAs} from 'file-saver'; import {saveAs} from 'file-saver';
import {BASE_URL, SERVER_IP} from "../../../config/app"; import {BASE_URL, SERVER_IP} from "../../../config/app";
import {authRoleAuthList} from "../../../api/auth/authRole";
import {updateStockOrderDetail} from "@/api/warehouse/stockOrder";
const formJson = { const formJson = {
id: "", id: "",

@ -593,7 +593,7 @@ export default {
curRow: null, curRow: null,
successOrderExportPDFSettingVisible: false, successOrderExportPDFSettingVisible: false,
total: 0, total: 0,
loading: true, loading: false,
index: null, index: null,
formName: null, formName: null,
orderId: "", orderId: "",

@ -286,7 +286,7 @@ export default {
action: null, action: null,
page: 1, page: 1,
limit: 20, limit: 20,
locStorageCode:null, locStorageCode: null,
}, },
checkStatus: { checkStatus: {
'-1': "等待提交", '-1': "等待提交",
@ -546,6 +546,7 @@ export default {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code; this.filterQuery.locStorageCode = this.storageList[0].code;
this.getList();
} }
}) })
.catch(() => { .catch(() => {
@ -573,7 +574,7 @@ export default {
this.filterQuery = Object.assign(this.filterQuery, query); this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit); this.filterQuery.limit = parseInt(this.filterQuery.limit);
// //
this.getList();
this.getStorage(); this.getStorage();
}, },
}; };

@ -365,7 +365,7 @@ export default {
addOrderVisible: false, addOrderVisible: false,
addHosOrderVisible: false, addHosOrderVisible: false,
total: 0, total: 0,
loading: true, loading: false,
index: null, index: null,
formName: null, formName: null,
errorDetail: "1111111111111", errorDetail: "1111111111111",

@ -498,7 +498,7 @@ export default {
codeDetailVisible: false, codeDetailVisible: false,
successOrderExportPDFSettingVisible: false, successOrderExportPDFSettingVisible: false,
total: 0, total: 0,
loading: true, loading: false,
index: null, index: null,
formName: null, formName: null,
orderId: "", orderId: "",

@ -495,7 +495,7 @@ export default {
codeDetailVisible: false, codeDetailVisible: false,
successOrderExportPDFSettingVisible: false, successOrderExportPDFSettingVisible: false,
total: 0, total: 0,
loading: true, loading: false,
index: null, index: null,
formName: null, formName: null,
orderId: "", orderId: "",

@ -196,6 +196,7 @@
@keypress.enter.native="enterKey($event)" @keypress.enter.native="enterKey($event)"
ref='inputRef' ref='inputRef'
style="ime-mode:disabled" style="ime-mode:disabled"
type="tel"
v-model="formData.code" v-model="formData.code"
></el-input> ></el-input>
</el-form-item> </el-form-item>

@ -127,6 +127,7 @@
@keypress.enter.native="enterKey($event)" @keypress.enter.native="enterKey($event)"
ref='inputRef' ref='inputRef'
style="ime-mode:disabled" style="ime-mode:disabled"
type="tel"
v-model="formData.code" v-model="formData.code"
></el-input> ></el-input>
</el-form-item> </el-form-item>

@ -766,6 +766,7 @@ export default {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success(tMessage + "成功"); this.$message.success(tMessage + "成功");
this.formData.billNo = response.data;
this.closeDialog(true); this.closeDialog(true);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
@ -1196,23 +1197,23 @@ export default {
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
generateBillNo() { // generateBillNo() {
let tQuery = { // let tQuery = {
action: this.formData.billType // action: this.formData.billType
} // }
this.loading = true; // this.loading = true;
stockOrderGenerateBillNo(tQuery) // stockOrderGenerateBillNo(tQuery)
.then((response) => { // .then((response) => {
this.loading = false; // this.loading = false;
if (response.code === 20000) { // if (response.code === 20000) {
this.formData.billNo = response.data; // this.formData.billNo = response.data;
// this.formData.billdate = parseTime(new Date(), '{y}{m}{d}'); // // this.formData.billdate = parseTime(new Date(), '{y}{m}{d}');
this.formData.billdate = new Date(); // this.formData.billdate = new Date();
} else { // } else {
this.closeDialog(true); // this.closeDialog(true);
} // }
}); // });
}, // },
getBusType(invCode) { getBusType(invCode) {
let query = { let query = {
enabled: true, enabled: true,
@ -1325,7 +1326,8 @@ export default {
}; };
this.iCount = 0; this.iCount = 0;
this.orderEditor = false; this.orderEditor = false;
this.generateBillNo(); this.formData.billdate = new Date();
// this.generateBillNo();
} }
}, },
}; };

@ -637,6 +637,7 @@ export default {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.$message.success(tMessage + "成功"); this.$message.success(tMessage + "成功");
this.formData.billNo = response.data;
this.closeDialog(true); this.closeDialog(true);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
@ -1064,23 +1065,23 @@ export default {
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
generateBillNo() { // generateBillNo() {
let tQuery = { // let tQuery = {
action: this.formData.billType // action: this.formData.billType
} // }
this.loading = true; // this.loading = true;
stockOrderGenerateBillNo(tQuery) // stockOrderGenerateBillNo(tQuery)
.then((response) => { // .then((response) => {
this.loading = false; // this.loading = false;
if (response.code === 20000) { // if (response.code === 20000) {
this.formData.billNo = response.data; // this.formData.billNo = response.data;
// this.formData.billdate = parseTime(new Date(), '{y}{m}{d}'); // // this.formData.billdate = parseTime(new Date(), '{y}{m}{d}');
this.formData.billdate = new Date(); // this.formData.billdate = new Date();
} else { // } else {
this.closeDialog(true); // this.closeDialog(true);
} // }
}); // });
}, // },
getBusType() { getBusType() {
let query = { let query = {
enabled: true, enabled: true,
@ -1155,7 +1156,8 @@ export default {
}; };
this.iCount = 0; this.iCount = 0;
this.orderEditor = false; this.orderEditor = false;
this.generateBillNo(); this.formData.billdate = new Date();
// this.generateBillNo();
} }
}, },
}; };

Loading…
Cancel
Save