this.tableData[map[this.num]] = this.feedbackContent this.feedbackContent = ''

<template>
<view id="addSupplierInfo">
<global-header :imgSrcLeft="‘/static/nav/back.png‘" :title="‘新增供应商‘" />
<view class="body">
<view class="cont">
<view class="cont_row" @click="supplier(1)" >
供应商编号
<text>
{{ tableData.supplierNo || ‘必填‘}}
<image src="../../../static/onlinePurchase/online17.png" mode=""></image>
</text>
</view>
<view class="cont_row" @click="supplier(2)">
西文名称
<text>

{{tableData.spanishName || ‘必填‘}}
<image src="../../../static/onlinePurchase/online17.png" mode=""></image>
</text>
</view>
<view class="cont_row" @click="supplier(3)">
中文名称
<text>
{{tableData.chineseName || ‘非必填‘}}
<image src="../../../static/onlinePurchase/online17.png" mode=""></image>
</text>
</view>
<view class="cont_row" @click="supplier(4)">
供应商类型
<text>
{{tableData.sysSupplierVO || ‘Normal‘}}
<image src="../../../static/onlinePurchase/online17.png" mode=""></image>
</text>
</view>
<view class="cont_row" @click="supplier(5)">
电话
<text>

{{tableData.telephone || ‘非必填‘}}
<image src="../../../static/onlinePurchase/online17.png" mode=""></image>
</text>
</view>
<view class="cont_row" @click="supplier(6)">
E-mail
<text>
{{tableData.email || ‘非必填‘}}
<image src="../../../static/onlinePurchase/online17.png" mode=""></image>
</text>
</view>
</view>
<view class="btn" @click="save">
保存
</view>
</view>
<!-- 弹窗 -->
<!-- 弹窗1 -->
<view :hidden="userFeedbackHidden" class="popup_content">
<view class="popup_title">{{title}}</view>
<view class="xin">

</view>
<view class="popup_textarea_item">
<input class="popup_textarea" :placeholder=‘placeholder‘ v-model="feedbackContent">
</input>

<view class="view_button">
<button class="popup_button" @click="cancel">取消</button>
<button class="popup_button popup_button2" @click="nextstep">确定</button>
</view>
</view>
</view>
<view class="popup_overlay" :hidden="userFeedbackHidden">hrthsrt</view>




</view>
</template>

<script>
// import uniPopup from ‘@/components/uni-popup/uni-popup.vue‘
export default {
data() {
return {
show_pop:false,
title:‘‘,
// 弹窗标题
placeholder:‘‘,
map: [],
// 获取用户输入
feedbackContent: ‘‘,
userFeedbackHidden: true, // 默认隐藏
noMsg: false,
num: ‘‘,
tableData: {
supplierNo: ‘‘,
spanishName: ‘‘,
chineseName: ‘‘,
sysSupplierVO: ‘‘,
telephone: ‘‘,
email: ‘‘
}
}
},
methods: {
showPop(){
this.show_pop = true
},

// 取消
cancel() {
this.userFeedbackHidden = true
},
// 供应商弹窗
supplier(id) {
this.num = id
if (this.num===1) {
this.feedbackContent=this.tableData.supplierNo
this.title = ‘供应商编号‘
}else if(this.num===2){
this.feedbackContent=this.tableData.spanishName
this.title = ‘西文名称‘
}else if(this.num===3){
this.feedbackContent=this.tableData.chineseName
this.title = ‘中文名称‘
}else if(this.num===4){
// this.feedbackContent=this.infos.
this.title=‘供应商类型‘
}else if(this.num===5){
this.feedbackContent=this.tableData.telephone
this.title=‘电话‘
}else{
this.feedbackContent=this.tableData.email
this.title=‘E-mail‘
}
// 显示弹窗
this.userFeedbackHidden = false
},
// 确定
nextstep() {
this.userFeedbackHidden = true
var map = {
1: ‘supplierNo‘,
2: ‘spanishName‘,
3: ‘chineseName‘,
4: ‘sysSupplierVO‘,
5: ‘telephone‘,
6: ‘email‘
}


this.tableData[map[this.num]] = this.feedbackContent
this.feedbackContent = ‘‘

},
// 保存按钮 请求接口
save(){
// 判断必填项是否有值
if(!this.tableData.supplierNo){
uni.showModal({
title: ‘提示‘,
content: ‘供应商编号未填写!‘,
success: function (res) {
if (res.confirm) {
console.log(‘用户点击确定‘);
} else if (res.cancel) {
console.log(‘用户点击取消‘);
}
}
});
return
}else{
this.request({
url: ‘/admin/appSupplier/add‘,
method: ‘post‘,
dataType: "json",
data: this.tableData,
}).then(res => {
uni.showToast({
title: res.msg,
duration: 2000
});

// 新增成功后跳转
uni.navigateTo({
url: ‘/pages/index/supplierProfile/index‘
});

});
}

}




}
}
</script>

<style lang="less" scoped>
#addSupplierInfo {
.body {
width: 100%;
height: auto;

.cont {
width: 100%;
height: auto;
background-color: #FFFFFF;
padding: 0 24upx;

.cont_row {
width: 100%;
height: 98upx;
border-bottom: 1px solid #e6e6e6;
font-size: 30upx;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
text-align: left;
color: #333333;
line-height: 98upx;

text {
text-align: right;
color: #999999;
float: right;

image {
width: 32upx;
height: 32upx;
float: right;
margin-left: 10upx;
margin-top: 32upx;
}
}
}
}

.btn {
width: 654upx;
height: 88upx;
opacity: 1;
background: #c6c6c6;
margin: 0 auto;
margin-top: 348upx;
font-size: 36upx;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
text-align: center;
color: #ffffff;
letter-spacing: 2px;
line-height: 88upx;
}
}
}

 

// 弹窗
#settings {
.settings_c {
padding-top: 48upx;

h1 {
font-size: 36upx;
font-weight: 500;
color: #333333;
letter-spacing: 2px;
}

p {
font-size: 26upx;
font-weight: 500;
color: #333333;
letter-spacing: 1px;

span {
color: #D81E06;
}
}

.btn_open {
width: 654upx;
height: 88upx;
background: #1081c7;
font-size: 36upx;
font-weight: 500;
text-align: center;
color: #ffffff;
letter-spacing: 2px;
line-height: 88upx;
margin: 350upx auto;
}
}
}

.popup_overlay {

position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.8;
opacity: .80;
filter: alpha(opacity=88);
}

.popup_content {
position: fixed;
top: 50%;
left: 50%;
width: 654upx;
height: 500upx;
margin-left: -325upx;
margin-top: -270upx;
border: 10px solid white;
background-color: white;
z-index: 1002;
overflow: auto;
border-radius: 20upx;
}

.popup_title {
padding-top: 15upx;
width: 95%;

text-align: center;
font-size: 32upx;
}

.popup_textarea_item {
// padding-top: 55upx;
margin-top: 92upx;
height: 240upx;
width: 100%;
// background-color: #F1F1F1;
margin-top: 30upx;
// margin-left: 20upx;
padding: 0 20upx;
}

.popup_textarea {
width: 100%;
height: 76upx;
font-size: 26upx;
padding: 0 20px;
margin-top: 72upx;
border: 1upx solid #110605;


}

.popup_button {

width: 250upx;
float: left;
// margin-left: 50upx;
color: white;
background-color: #4399FC;
border-radius: 20upx;

}

.popup_button2 {
// margin-left: 80upx;
float: right;
}

// 单选
.checkbox {
font-size: 20upx;
color: #8a8a8a;

}

.uni-padding-wrap {
margin-top: 76upx;
}

// 下一步
.view_button {
margin-top: 80upx;
// border: 1px solid #4CD964;
}

.view_button:after {
/*伪元素是行内元素 正常浏览器清除浮动方法*/
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.view_button {
width: 100%;
// border: 1px solid #4CD964;

}

.xin {
border-bottom: 1px solid #a4acb0;
margin-top: 60upx;
}
</style>

this.tableData[map[this.num]] = this.feedbackContent this.feedbackContent = ''

上一篇:MySQL自增主键排序问题


下一篇:Java(IntelliJ IDEA)连接数据库(SqlServer) 环境配置