Browse Source

7.21

master
fengdong777 2 years ago
parent
commit
eb78e40158
  1. 13
      supervise-crm-ui/src/api/project/project.js
  2. BIN
      supervise-crm-ui/src/assets/images/x.png
  3. 166
      supervise-crm-ui/src/views/project/projectAdd.vue

13
supervise-crm-ui/src/api/project/project.js

@ -82,6 +82,13 @@ export default {
data: data
});
},
// 选择可用的仓库信息
selectStoreHouse: function() {
return request({
url: '/crm/v1/projectinformation/selectStoreHouse',
method: 'get',
});
},
delBySids: function(sid) {
return request({
@ -96,5 +103,11 @@ export default {
method: 'get'
})
},
selectStoreHouseSid: function(sid) {
return request({
url: '/crm/v1/projectinformation/selectStoreHouse/'+ sid,
method: 'get'
})
},
}

BIN
supervise-crm-ui/src/assets/images/x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

166
supervise-crm-ui/src/views/project/projectAdd.vue

@ -225,16 +225,17 @@
</el-col>
<el-col :span="20">
<el-form-item class="trightb_item">
<div class="Image" v-for="(item,i) in temps" :key="i" v-show="item.name">
<img v-if="item.picUrl" :src="item.picUrl" alt="">
<img v-else src="../../assets/images/notAvailable.jpg" alt="" />
<p><u class="Atext">{{ item.name }}</u></p>
<div class="Image" v-for="(item,i) in ImgSid" :key="i" v-show="item.name">
<div class="ImageX">
<i class="el-icon-close" @click="delSid(item)"></i>
<img v-if="item.picUrl" :src="item.picUrl" alt="">
<img v-else src="../../assets/images/notAvailable.jpg" alt="" />
<p><u class="Atext">{{ item.name }}</u></p>
</div>
</div>
<div class="Images">
<a href="http://jianguan.yyundong.com/warehouse/#/initial_value/storehouse" target="_blank">
<div class="Images" @click="addCangku">
<img src="../../assets//images//addImg.png" alt="">
<p> </p>
</a>
</div>
</el-form-item>
</el-col>
@ -243,6 +244,45 @@
</div>
</div>
<el-drawer
title="关联仓库"
:visible.sync="drawer"
size="800px"
>
<el-button style="margin-left: 700px;" type="primary" @click="guanlianSid">关联</el-button>
<div class="main-content">
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="name"
label="仓库名称"
align="center"
>
</el-table-column>
<el-table-column
prop="picUrl"
label="仓库图片"
align="center"
>
<template slot-scope="scope">
<div class="xx">
<img v-if="scope.row.picUrl" :src="scope.row.picUrl" alt="">
<img v-else src="../../assets/images/notAvailable.jpg" alt="" />
</div>
</template>
</el-table-column>
</el-table>
</div>
</el-drawer>
</div>
</template>
@ -254,6 +294,7 @@
return {
title: "【新增】项目信息",
submitdisabled: false,
drawer: false,
formobj: {
sid: "",
entryName: "", //
@ -276,6 +317,9 @@
generalManager: "", //
endDate: "", //
fillInDate: "", //
storeHouseProjectDto :{
shSids:[]
}
},
industryAllList: [],
industryList: [],
@ -288,6 +332,10 @@
enterpriseAllList: [],
enterpriseList: [],
temps: [],
tableData: [],
ValSid:[],
ARRSid:[],
ImgSid:[],
}
},
created() {
@ -458,6 +506,7 @@
message: resp.msg
})
this.handleReturn("true")
this.$refs.multipleTable.clearSelection();
} else {
// resp.code
}
@ -473,6 +522,7 @@
message: resp.msg
})
this.handleReturn("true")
this.$refs.multipleTable.clearSelection();
} else {
// resp.code
}
@ -481,6 +531,29 @@
}
},
selectStoreHouses(){
req.selectStoreHouse().then((res) => {
if (res.success) {
this.tableData=res.data
}
})
},
delSid(delSid){
console.log(delSid.sid);
for(var i=0;i<this.ImgSid.length;i++){
if(this.ImgSid[i].sid==delSid.sid){
// this.ImgSid = this.ImgSid.splice(i, 1)
let arrImg=this.ImgSid.splice(i, 1)
console.log(this.ImgSid);
for(var i=0;i<this.ImgSid.length;i++){
var ARRSid=[]
ARRSid.push(this.ImgSid[i].sid)
this.formobj.storeHouseProjectDto.shSids=ARRSid
}
}
// this.ImgSid=arrImg
}
},
handleReturn(isreload) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
@ -507,8 +580,13 @@
generalManager: "", //
endDate: "", //
fillInDate: "", //
storeHouseProjectDto :{
shSids:[]
},
}
this.title= "【新增】项目信息",
this.ImgSid=[]
this.title= "【新增】项目信息",
this.$emit('doback')
},
showEdit(row) {
@ -516,20 +594,56 @@
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
this.formobj.entryName=resp.data.entryName
this.formobj.sid=resp.data.sid
this.formobj.industryName=resp.data.industryName
this.formobj.industrySid=resp.data.industrySid
this.formobj.typeName=resp.data.typeName
this.formobj.typeSid=resp.data.typeSid
this.formobj.creditLimit=resp.data.creditLimit
this.formobj.bankName=resp.data.bankName
this.formobj.bankSid=resp.data.bankSid
this.formobj.bmanagerName=resp.data.bmanagerName
this.formobj.managerSid=resp.data.managerSid
this.formobj.engaDate=resp.data.engaDate
this.formobj.signingDate=resp.data.signingDate
this.formobj.enterpriseName=resp.data.enterpriseName
this.formobj.enterpriseSid=resp.data.enterpriseSid
this.formobj.econtacts=resp.data.econtacts
this.formobj.remarks=resp.data.remarks
this.formobj.regulatoryLeader=resp.data.regulatoryLeader
this.formobj.generalManager=resp.data.generalManager
this.formobj.endDate=resp.data.endDate
this.formobj.fillInDate=resp.data.fillInDate
}
})
.catch(e => {
this.formobj = row
})
req.getStorehouseBySid(row.sid).then((res) => {
this.selectStoreHouses() //
req.selectStoreHouseSid(row.sid).then((res) => {
if (res.success) {
this.temps=res.data
this.ImgSid=res.data
}
})
})
},
addCangku(){
this.drawer = true
},
handleSelectionChange(val) {
this.ValSid=val
},
guanlianSid(){
let val=this.ValSid
this.ImgSid=this.ValSid
for(let i=0;i<val.length;i++){
this.ARRSid.push(val[i].sid)
}
this.formobj.storeHouseProjectDto.shSids=this.ARRSid
this.drawer=false
this.$refs.multipleTable.clearSelection();
}
}
}
@ -589,22 +703,40 @@
.Image{
.ImageX{
width: 150px;
height: 100px;
float: left;
margin: 10px 20px 40px 10px;
}
.Image img{
.ImageX img{
width: 100%;
height: 100%;
}
.Image p{
.ImageX p{
color: #000;
text-align: center;
margin-top: -15px;
}
.Image p .Atext{
.ImageX p .Atext{
text-decoration: none;
}
.ImageX{
position: relative;
}
.ImageX i{
font-size: 30px;
color: #fff;
position: absolute;
top: 0;
left: 120px;
}
.xx{
width: 150px;
height: 100px;
}
.xx img{
width: 100%;
height: 100%;
}
</style>

Loading…
Cancel
Save