This commit is contained in:
shijing 2022-05-06 09:06:46 +08:00
parent e40977274d
commit df91dd18f4
3 changed files with 289 additions and 225 deletions

View File

@ -13,6 +13,30 @@
:model="loginForm"
:rules="loginRules"
>
<!--<el-form-item>
<el-input
v-model="loginForm.username"
type="text" name="text"
placeholder="账号"
autocomplete="off">
<i slot="prefix" class="el-input_icon el-icon-user"></i>
</el-input>
</el-form-item>
<el-form-item>
<input type="text"
name="password"
autocomplete="off"
onfocus="passwordType=='password'"
>
<el-input
v-model="loginForm.password"
type="text" name="pwd" id="pwd"
placeholder="密码"
autocomplete="off"
@input="setPassword">
<i slot="prefix" class="el-icon-lock"></i>
</el-input>
</el-form-item>-->
<el-form-item prop="username">
<el-input
ref="username"
@ -21,15 +45,24 @@
name="username"
type="text"
tabindex="1"
auto-complete="on"
><svg-icon
auto-complete="off"
>
<svg-icon
slot="prefix"
icon-class="userName"
class="el-input__icon input-icon"
/></el-input>
/>
</el-input>
</el-form-item>
<el-form-item prop="password">
<input
type="text"
name="password"
autocomplete="off"
onfocus="passwordType=='password'"
style="display: none;height: 0;"
>
<el-input
:key="passwordType"
ref="password"
@ -38,18 +71,18 @@
placeholder="密码"
name="password"
tabindex="2"
auto-complete="on"
auto-complete="off"
id="passwordInput"
@keyup.enter.native="handleLogin"
><svg-icon
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/></el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
/>
</el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/>
</span>
</el-form-item>
<el-button
@ -57,8 +90,9 @@
type="primary"
style="width: 100%; margin-bottom: 30px"
@click.native.prevent="handleLogin"
>登录</el-button
>
登录
</el-button>
</el-form>
</el-tab-pane>
</el-tabs>
@ -75,6 +109,7 @@
<script>
import faceLogin from '@/components/faceLogin/tracking.vue'
export default {
name: "Login",
inject: ['reload'],
@ -136,6 +171,10 @@
immediate: true,
},
},
mounted() {
this.loginForm.username = null;
this.loginForm.password = null;
},
methods: {
toBigScreen() {
this.$router.push('/index')
@ -159,7 +198,8 @@
.dispatch("user/login", this.loginForm)
.then(() => {
this.$store.dispatch("user/getCount", {});
this.$router.push({ path: this.redirect || "/" }, () => {});
this.$router.push({path: this.redirect || "/"}, () => {
});
this.loading = false;
localStorage.setItem("rem_username", this.loginForm.username);
localStorage.setItem("rem_password", this.loginForm.password);
@ -208,11 +248,13 @@
background-image: url("../../assets/bg-login.png");
background-size: cover;
}
.title {
margin: 30px auto 30px auto;
text-align: center;
color: #0174d7;
}
.logo {
width: 350px;
height: 140px;
@ -229,46 +271,56 @@
.el-input {
height: 45px;
input {
height: 45px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.faceLoginBtnWrap {
width: 250px;
border-right: 1px dashed #409EFF;
text-align: center;
}
.faceLoginBtn {
width: 150px;
margin-top: 90px;
}
#passwordInput {
padding-right: 35px;
}
.show-pwd {
height: 39px;
margin-right: 2px;
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.show-pwd {
position: absolute;
right: 10px;
@ -277,9 +329,11 @@
cursor: pointer;
user-select: none;
}
.login-code-img {
height: 38px;
}
.testTracking {
width: 100%;
height: 500px;

View File

@ -24,15 +24,16 @@
{{ materialdetail.count }}
</el-descriptions-item>
<el-descriptions-item label="文件">
<el-link v-if="materialdetail.file_" :href="materialdetail.file_.path">{{materialdetail.file_.name}}</el-link>
<el-link v-if="materialdetail.file_" :href="materialdetail.file_.path">{{materialdetail.file_.name}}
</el-link>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-tabs v-model="activeName" type="card">
<el-tab-pane
v-if="this.type == 3 || this.type == 4"
label="供应商"
name="5"
v-if="this.type == 3 || this.type == 4"
>
</el-tab-pane>
<el-tab-pane label="批次" name="3">
@ -68,7 +69,6 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="关联的订单" name="1">
<el-table
:data="orderlist"
@ -86,22 +86,26 @@
<el-table-column label="客户" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.customer_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="所属合同" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.contract_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品名称" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.product_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品型号" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
@ -109,12 +113,14 @@
<el-table-column label="交货日期">
<template slot-scope="scope">{{
scope.row.delivery_date
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
@ -135,12 +141,14 @@
<el-table-column label="订单编号">
<template slot-scope="scope">{{
scope.row.order_.number
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="合同编号">
<template slot-scope="scope">{{
scope.row.order_.contract_.number
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="生产数量">
@ -155,7 +163,8 @@
<el-table-column label="交付截止时间">
<template slot-scope="scope">{{
scope.row.order_.delivery_date
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="是否生成子计划">
@ -167,7 +176,8 @@
<el-table-column label="创建时间">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
@ -196,16 +206,17 @@
<el-table-column label="状态">
<template slot-scope="scope">{{
actstate_[scope.row.act_state]
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="仓库">
<template slot-scope="scope" v-if="scope.row.warehouse_">{{
scope.row.warehouse_.name
}}</template>
}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="装箱单" name="5" v-if="this.type == 1">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
新增装箱单
@ -219,19 +230,14 @@
height="460"
>
<el-table-column type="index" width="50"/>
<el-table-column label="名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="单位">
<template slot-scope="scope">{{ scope.row.unit }}</template>
</el-table-column>
<el-table-column label="数量">
<template slot-scope="scope" >{{
scope.row.count
}}</template>
<template slot-scope="scope">{{scope.row.count}}</template>
</el-table-column>
<el-table-column
align="center"
@ -239,19 +245,17 @@
width="220px"
>
<template slot-scope="scope">
<el-link
type="primary"
@click="handleEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
type="danger"
@click="handleDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -275,9 +279,10 @@
<el-option
v-for="item in materialoptions"
:key="item.id"
:value="item.id"
:label="item.name"
>
:value="item.id">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specification }}</span>
</el-option>
</el-select>
</el-form-item>
@ -309,9 +314,12 @@
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false"
>取消</el-button
<el-button
type="danger"
@click="dialogVisible = false"
>
取消
</el-button>
<el-button type="primary" @click="confirm('Form')">确认</el-button>
</div>
</el-dialog>
@ -328,7 +336,14 @@ import { upUrl, upHeaders } from "@/api/file";
import {getProductionplanList} from "@/api/pm";
import {getmaterialbatchList} from "@/api/inm";
import {getOrderList} from "@/api/sam";
import { getMaterial,getpackitemList,createpackitem,updatepackitem,deletepackitem,getMaterialList } from "@/api/mtm";
import {
getMaterial,
getpackitemList,
createpackitem,
updatepackitem,
deletepackitem,
getMaterialList
} from "@/api/mtm";
import {getwproductList} from "@/api/wpm";
import {upFile} from "@/api/file";
@ -336,6 +351,7 @@ import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
const defaultpackitem = {
name: "",
unit: "",
@ -380,7 +396,7 @@ export default {
created() {
this.material = this.$route.params.id;
this.type = this.$route.params.type;
this.getMaterialist()
this.getMaterialist();
this.getMaterial();
this.getpickList();
this.getOrderList();
@ -390,13 +406,11 @@ export default {
},
methods: {
//新增装箱单
getMaterialist()
{
getMaterialist() {
getMaterialList({pageoff: true, type: 3}).then((response) => {
if (response.data) {
this.materialoptions = response.data;
}
});
},
@ -406,15 +420,10 @@ selectmaterial(selval){
this.packitem.name = response.data.name;
this.packitem.unit = response.data.unit;
this.packitem.specification = response.data.specification;
}
});
},
handleCreate() {
this.packitem = Object.assign({}, defaultpackitem);
this.dialogType = "new";
@ -431,6 +440,7 @@ handleCreate() {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -446,6 +456,7 @@ handleCreate() {
console.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
@ -474,8 +485,7 @@ handleCreate() {
});
},
getpickList()
{
getpickList() {
getpackitemList({product: this.material, page: 0}).then((response) => {
if (response.data) {
this.pickList = response.data; //zhuangxiang信息
@ -486,8 +496,7 @@ getpickList()
getMaterial() {
getMaterial(this.material).then((response) => {
if (response.data) {
debugger;
// debugger;
this.materialdetail = response.data; //物料基本信息
}
});
@ -499,6 +508,7 @@ getpickList()
}
});
},
getplanList() {
getProductionplanList({material: this.material, page: 0}).then(
(response) => {

View File

@ -449,9 +449,9 @@
</el-col>
</el-row>
</el-form-item>
<el-form-item label="字段父级">
<!--<el-form-item label="字段父级">
<treeselect v-model="field.parent" :multiple="false" :options="treeDate" placeholder="字段父级"/>
</el-form-item>
</el-form-item>-->
<el-form-item label="字段说明">
<el-input v-model="field.help_text" placeholder="字段名称"/>
</el-form-item>