Commit 2968c0ef authored by 黄媛媛's avatar 黄媛媛

11

parent b9dbc82e
......@@ -134,6 +134,10 @@
height: 28px;
}
:focus {
outline: none;
}
.vue-treeselect__menu{
border:none;
}
......@@ -219,3 +223,16 @@
width:32px!important;min-height:32px!important;
cursor: pointer;
}
/* select */
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover{
background: #28CACC;
color:#fff!important;
}
.el-select-dropdown__item.selected{
background: #28CACC;
color:#fff!important;
}
.el-select-dropdown__list .el-select-dropdown__item{
font-size: 12px;
color:#111111;
}
\ No newline at end of file
......@@ -116,8 +116,9 @@
<el-pagination
@current-change="currentChange"
background
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="1000">
:total="total">
</el-pagination>
<el-dialog
......@@ -158,7 +159,25 @@
</el-form-item>
<el-form-item label="" prop="BuyType">
<span class="label">购置方式</span>
<el-input size="mini" v-model="addMsg.BuyType" placeholder="请输入"></el-input>
<el-select size="mini" v-model="addMsg.BuyType" placeholder="请选择">
<el-option
v-for="item in BuyTypeList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="BranchId">
<span class="label">公司</span>
<el-select size="mini" v-model="addMsg.BranchId" placeholder="请选择">
<el-option
v-for="item in BranchList"
:key="item.Id"
:label="item.BName"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<span class="label">单位</span>
......@@ -169,13 +188,13 @@
<el-input size="mini" v-model="addMsg.UseMonths" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="">
<span class="label">使用状态</span>
<span class="label">使用类型</span>
<el-select size="mini" v-model="addMsg.UseStatus" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
v-for="item in UseStateList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
......@@ -198,7 +217,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-form-item label="" prop="SupplierId">
<span class="label">供应商</span>
<el-select size="mini" v-model="addMsg.SupplierId" placeholder="请选择">
<el-option
......@@ -221,10 +240,10 @@
</el-form-item>
<div class="_addUpload_box">
<ul class="uploadUl">
<li>
<img src="../../assets/img/pic.png" alt="">
<li v-for="(item,index) in addMsg.ImageList" :key="index">
<img :src="item" alt="">
<div class="hoverDiv">
<img src="../../assets/img/imgdelete.png" alt="">
<img @click="DeleteImg(item,index)" src="../../assets/img/imgdelete.png" alt="">
</div>
</li>
</ul>
......@@ -268,7 +287,7 @@ export default {
BuyDate:'',
BuyType:'',
Units:'',
UseMonths:'',
UseMonths:0,
UseStatus:'',
PropertyStatus:'',
PropertyModel:'',
......@@ -277,6 +296,7 @@ export default {
EmployeeId:'',
SupplierId:'',
GetTime:'',
BranchId:'',
},
normalizer(node) {
var obj = {
......@@ -325,19 +345,25 @@ export default {
},
dialogtitle:'新增资产',
dialogState:true,
dialogState:false,
rules:{
Name: [
{ required: true, message: '请输入供应商名称', trigger: 'blur' }
{ required: true, message: '请输入资产名称', trigger: 'blur' }
],
BrandName: [
{ required: true, message: '请输入品牌', trigger: 'blur' }
],
BuyType: [
{ required: true, message: '请输入购置方式', trigger: 'blur' }
{ required: true, message: '请输入购置方式', trigger: 'change' }
],
BranchId: [
{ required: true, message: '请选择公司', trigger: 'change' }
],
SupplierId: [
{ required: true, message: '请选择供应商', trigger: 'change' }
],
BuyDate: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
{ type: 'string', required: true, message: '请选择日期', trigger: 'change' }
],
Mobile: [
{ required: true, message: '请输入联系电话', trigger: 'blur' },
......@@ -353,6 +379,9 @@ export default {
Type:1,
},
treedata:[],
BuyTypeList:[],
UseStateList:[],
BranchList:[],
}
},
mounted(){
......@@ -360,8 +389,14 @@ export default {
this.getEmployee();
this.getSupplierList1();
this.getNode();
this.getBuyType();
this.getUseState();
this.getBranch();
},
methods:{
DeleteImg(item,index){
this.addMsg.ImageList.splice(index, 1);
},
chongzhi(){
this.msg={
pageIndex:1,
......@@ -404,13 +439,12 @@ export default {
this.$message.info("上传中...")
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0);
this.addMsg.ImageList = this.domainManager().ViittoFileUrl + x.data.FilePath;
console.log("this.addMsg.ImageList",this.addMsg.ImageList)
this.addMsg.ImageList.push(this.domainManager().ViittoFileUrl + x.data.FilePath);
this.Success("上传成功");
});
},
treeClick(data){
this.msg.CategoryId=data.Id;
this.addMsg.CategoryId=data.Id;
},
getNode(){
this.apiJavaPost("/api/property/CateporyGetTreeList",this.nodemsg,
......@@ -428,21 +462,34 @@ export default {
this.addMsg={
Id:0,
Name:'',
Contact:'',
Mobile:'',
}
BrandName:'',
SerialNumber:'',
CategoryId:null,
BuyDate:'',
BuyType:'',
Units:'',
UseMonths:0,
UseStatus:'',
PropertyStatus:'',
PropertyModel:'',
ImageList:[],
Remark:'',
EmployeeId:'',
SupplierId:'',
GetTime:'',
BranchId:'',
};
this.dialogtitle="新增资产";
this.dialogState=true;
},
Edit(item){
this.dialogtitle="编辑资产";
this.dialogState=true;
this.addMsg={
Id:item.Id,
Name:item.Name,
Contact:item.Contact,
Mobile:item.Mobile,
this.addMsg=Object.assign({},item)
if(!this.addMsg.ImageList){
this.addMsg.ImageList=[];
}
},
Delete(item){
let Id=item.Id;
......@@ -470,6 +517,8 @@ export default {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
delete this.addMsg.UpdateBy
delete this.addMsg.UpdateDate
this.apiJavaPost("/api/property/SetPropertyInfo",this.addMsg,
res => {
if (res.data.resultCode === 1) {
......@@ -539,6 +588,50 @@ export default {
null
);
},
getBuyType(){
this.loading=true;
this.apiJavaPost("/api/property/GetPropertyBuyTypeEnumList",{},
res => {
this.loading=false;
if (res.data.resultCode === 1) {
this.BuyTypeList=res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
getUseState(){
this.loading=true;
this.apiJavaPost("/api/property/GetPropertyUseStateEnumList",{},
res => {
this.loading=false;
if (res.data.resultCode === 1) {
this.UseStateList=res.data.data;
console.log("this.UseStateList",this.UseStateList)
} else {
this.Error(res.data.message);
}
},
null
);
},
getBranch(){
this.loading=true;
this.apiJavaPost("/api/User/GetBranchList",{},
res => {
this.loading=false;
if (res.data.resultCode === 1) {
this.BranchList=res.data.data;
console.log("this.BranchList",this.BranchList)
} else {
this.Error(res.data.message);
}
},
null
);
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment