|
|
@@ -1,70 +1,65 @@
|
|
|
<template>
|
|
|
- <div class="mobile-modal" v-if="showSayPriceBox" @click="setShowCurrencyList(false)" @touchmove="preventTouchMove($event)">
|
|
|
- <div class="mobile-modal-box">
|
|
|
- <div class="mobile-modal-header">
|
|
|
- <i class="icon-guanbi iconfont" @click="cancel"></i>
|
|
|
+ <div class="publish_seek_mobile">
|
|
|
+ <div class="publish-seek">
|
|
|
+ <div class="content-line">
|
|
|
+ <span><i>*</i>品牌:</span>
|
|
|
+ <input type="text" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号">
|
|
|
+ <ul class="similar brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
|
|
|
+ <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
- <div class="publish-seek">
|
|
|
- <div class="content-line">
|
|
|
- <span><i>*</i>品牌:</span>
|
|
|
- <input type="text" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号">
|
|
|
- <ul class="similar brand-similar-list" v-show="showSimilarBrandList && applyObj.brand">
|
|
|
- <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="content-line">
|
|
|
- <span><i>*</i>物料名称(类目):</span>
|
|
|
- <input type="text" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput">
|
|
|
- </div>
|
|
|
- <div class="content-line">
|
|
|
- <span><i>*</i>型号:</span>
|
|
|
- <input type="text" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
|
|
|
- <ul class="similar" v-show="showSimilarCodeList && applyObj.code">
|
|
|
- <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="content-line">
|
|
|
- <span>规格:</span>
|
|
|
- <input type="text" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput">
|
|
|
- </div>
|
|
|
- <div class="content-line">
|
|
|
- <span><i>*</i>截止日期:</span>
|
|
|
- <input type="date" v-model="applyObj.deadline" :min="minDay" :max="maxDay" @blur="deadlineChange">
|
|
|
- <!--<el-date-picker-->
|
|
|
- <!--v-model="applyObj.deadline"-->
|
|
|
- <!--type="date"-->
|
|
|
- <!--:editable="false"-->
|
|
|
- <!--:clearable="true"-->
|
|
|
- <!--size="mini">-->
|
|
|
- <!--</el-date-picker>-->
|
|
|
- </div>
|
|
|
- <!--<div class="content-line">
|
|
|
- <span>币种:</span>
|
|
|
- <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
|
|
|
- <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
|
|
|
- <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
|
|
|
- <ul v-if="showCurrencyList">
|
|
|
- <li @click="setCurrency('不限')">不限</li>
|
|
|
- <li @click="setCurrency('RMB')">RMB</li>
|
|
|
- <li @click="setCurrency('USD')">USD</li>
|
|
|
- </ul>
|
|
|
- </div>-->
|
|
|
- <div class="content-line">
|
|
|
- <span>数量(PCS):</span>
|
|
|
- <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
|
|
|
- </div>
|
|
|
- <!--<div class="content-line">
|
|
|
- <span>生产日期:</span>
|
|
|
- <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
|
|
|
- </div>-->
|
|
|
- <a @click="authorityInterceptor(baseUrls.userPublishSeek, goPublish)">确认发布</a>
|
|
|
+ <div class="content-line">
|
|
|
+ <span><i>*</i>物料名称(类目):</span>
|
|
|
+ <input type="text" v-model="applyObj.prodTitle" @blur="checkProdTitle" @input="onProdTitleInput">
|
|
|
</div>
|
|
|
+ <div class="content-line">
|
|
|
+ <span><i>*</i>型号:</span>
|
|
|
+ <input type="text" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
|
|
|
+ <ul class="similar" v-show="showSimilarCodeList && applyObj.code">
|
|
|
+ <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="content-line">
|
|
|
+ <span>规格:</span>
|
|
|
+ <input type="text" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput">
|
|
|
+ </div>
|
|
|
+ <div class="content-line">
|
|
|
+ <span><i>*</i>截止日期:</span>
|
|
|
+ <input type="date" v-model="applyObj.deadline" :min="minDay" :max="maxDay" @blur="deadlineChange">
|
|
|
+ <!--<el-date-picker-->
|
|
|
+ <!--v-model="applyObj.deadline"-->
|
|
|
+ <!--type="date"-->
|
|
|
+ <!--:editable="false"-->
|
|
|
+ <!--:clearable="true"-->
|
|
|
+ <!--size="mini">-->
|
|
|
+ <!--</el-date-picker>-->
|
|
|
+ </div>
|
|
|
+ <!--<div class="content-line">
|
|
|
+ <span>币种:</span>
|
|
|
+ <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
|
|
|
+ <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
|
|
|
+ <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
|
|
|
+ <ul v-if="showCurrencyList">
|
|
|
+ <li @click="setCurrency('不限')">不限</li>
|
|
|
+ <li @click="setCurrency('RMB')">RMB</li>
|
|
|
+ <li @click="setCurrency('USD')">USD</li>
|
|
|
+ </ul>
|
|
|
+ </div>-->
|
|
|
+ <div class="content-line">
|
|
|
+ <span>数量(PCS):</span>
|
|
|
+ <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
|
|
|
+ </div>
|
|
|
+ <!--<div class="content-line">
|
|
|
+ <span>生产日期:</span>
|
|
|
+ <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
|
|
|
+ </div>-->
|
|
|
</div>
|
|
|
+ <a @click="authorityInterceptor(baseUrls.userPublishSeek, goPublish)">确认发布</a>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
export default {
|
|
|
- props: ['showSayPriceBox'],
|
|
|
+ props: ['dataObj'],
|
|
|
data () {
|
|
|
return {
|
|
|
applyObj: {
|
|
|
@@ -106,29 +101,19 @@
|
|
|
return deadDate
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- showSayPriceBox: function (val, old) {
|
|
|
- this.emptyForm()
|
|
|
-// if (val) {
|
|
|
-// document.body.style.position = 'fixed'
|
|
|
-// document.body.style.left = '0'
|
|
|
-// document.body.style.right = '0'
|
|
|
-// } else {
|
|
|
-// document.body.style.position = 'static'
|
|
|
-// }
|
|
|
- }
|
|
|
- },
|
|
|
mounted () {
|
|
|
let _this = this
|
|
|
+ if (this.dataObj) {
|
|
|
+ this.applyObj = this.dataObj
|
|
|
+ } else {
|
|
|
+ this.emptyForm()
|
|
|
+ }
|
|
|
document.body.onclick = function () {
|
|
|
_this.showSimilarCodeList = false
|
|
|
_this.showSimilarBrandList = false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- cancel: function () {
|
|
|
- this.$emit('cancelAction')
|
|
|
- },
|
|
|
emptyForm: function () {
|
|
|
for (let attr in this.applyObj) {
|
|
|
this.applyObj[attr] = attr === 'currency' ? '不限' : ''
|
|
|
@@ -147,6 +132,7 @@
|
|
|
return this.$http.get('/productuser/match/getKind', {params: {cmpCode: code, brand: brand}})
|
|
|
},
|
|
|
goPublish: function () {
|
|
|
+ console.log('12', this.applyObj)
|
|
|
if (this.checkAll()) {
|
|
|
this.getMaterialKind(this.applyObj.code, this.applyObj.brand).then(response => {
|
|
|
let inquiry = {}
|
|
|
@@ -186,16 +172,11 @@
|
|
|
inquiry.currency = currency
|
|
|
this.$http.post('/inquiry/buyer/save', inquiry)
|
|
|
.then(response => {
|
|
|
- // this.$message.success('发布成功')
|
|
|
this.setRemindText('发布成功')
|
|
|
- // this.showRemindBox = true
|
|
|
this.emptyForm()
|
|
|
- // this.validObj.deadline = true
|
|
|
this.$emit('reloadAction')
|
|
|
- this.cancel()
|
|
|
}, error => {
|
|
|
console.log(error)
|
|
|
- // this.$message.error('发布失败')
|
|
|
this.setRemindText('发布失败')
|
|
|
})
|
|
|
})
|
|
|
@@ -368,129 +349,90 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- .mobile-modal {
|
|
|
- .mobile-modal-box {
|
|
|
- position: fixed;
|
|
|
- width: 5.92rem;
|
|
|
- font-size: .28rem;
|
|
|
- top: 50%;
|
|
|
- left: 50%;
|
|
|
- right: 11%;
|
|
|
- z-index: 1000;
|
|
|
- margin-top: -3.7rem;
|
|
|
- margin-left: -2.96rem;
|
|
|
+ .publish_seek_mobile{
|
|
|
+ padding:.2rem;
|
|
|
+ .publish-seek {
|
|
|
background: #fff;
|
|
|
- .mobile-modal-header {
|
|
|
- font-size: .38rem;
|
|
|
- background: #fff;
|
|
|
- background: url(/images/mobile/@2x/applyPurchase/pub.png) no-repeat;
|
|
|
- background-size: cover;
|
|
|
- height: 1.51rem;
|
|
|
- i {
|
|
|
- top: -.36rem;
|
|
|
+ padding: .1rem;
|
|
|
+ border-radius:.1rem;
|
|
|
+ .content-line {
|
|
|
+ position: relative;
|
|
|
+ height: 1rem;
|
|
|
+ line-height: 1rem;
|
|
|
+ font-size: .26rem;
|
|
|
+ text-align: left;
|
|
|
+ border-bottom:1px solid #d3d3d3;
|
|
|
+ &:last-child{
|
|
|
+ border:none;
|
|
|
}
|
|
|
- }
|
|
|
- .publish-seek {
|
|
|
- background: #fff;
|
|
|
- padding-top: .1rem;
|
|
|
- padding-bottom: .4rem;
|
|
|
- .content-line {
|
|
|
- position: relative;
|
|
|
- height: .8rem;
|
|
|
- line-height: .8rem;
|
|
|
+ input {
|
|
|
+ width: 3.49rem;
|
|
|
+ height: .52rem;
|
|
|
+ border: none;
|
|
|
font-size: .26rem;
|
|
|
- text-align: left;
|
|
|
- input {
|
|
|
- width: 3.49rem;
|
|
|
- height: .52rem;
|
|
|
- line-height: normal;
|
|
|
- padding: .1rem .19rem;
|
|
|
- border: 1px solid #7e7e7e;
|
|
|
- font-size: .26rem;
|
|
|
- vertical-align: middle;
|
|
|
- background: #fff;
|
|
|
- border-radius: 0;
|
|
|
- }
|
|
|
- > span {
|
|
|
- display: inline-block;
|
|
|
- width: 2.26rem;
|
|
|
- text-align: right;
|
|
|
- i {
|
|
|
- color: #ff0000;
|
|
|
- margin-right: .05rem;
|
|
|
- font-style: normal;
|
|
|
- }
|
|
|
+ vertical-align: middle;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+ > span {
|
|
|
+ display: inline-block;
|
|
|
+ width: 2.5rem;
|
|
|
+ text-align: right;
|
|
|
+ color:#3176e9;
|
|
|
+ i {
|
|
|
+ color: #ff0000;
|
|
|
+ margin-right: .05rem;
|
|
|
+ font-style: normal;
|
|
|
}
|
|
|
- > a {
|
|
|
+ }
|
|
|
+ > a {
|
|
|
+ font-size: .26rem;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ > img {
|
|
|
+ width: .12rem;
|
|
|
+ height: .06rem;
|
|
|
+ margin-left: .04rem;
|
|
|
+ }
|
|
|
+ .similar {
|
|
|
+ position: absolute;
|
|
|
+ width: 3.52rem;
|
|
|
+ max-height: 2.5rem;
|
|
|
+ overflow-y: auto;
|
|
|
+ z-index: 12;
|
|
|
+ border: 1px solid #7e7e7e;
|
|
|
+ border-radius: .05rem;
|
|
|
+ left: 2.25rem;
|
|
|
+ top: .7rem;
|
|
|
+ background: #fff;
|
|
|
+ li {
|
|
|
+ height: .5rem;
|
|
|
+ line-height: .5rem;
|
|
|
font-size: .26rem;
|
|
|
- color: #666;
|
|
|
- }
|
|
|
- > img {
|
|
|
- width: .12rem;
|
|
|
- height: .06rem;
|
|
|
- margin-left: .04rem;
|
|
|
- }
|
|
|
- .similar {
|
|
|
- position: absolute;
|
|
|
- width: 3.52rem;
|
|
|
- max-height: 2.5rem;
|
|
|
- overflow-y: auto;
|
|
|
- z-index: 12;
|
|
|
- border: 1px solid #7e7e7e;
|
|
|
- border-radius: .05rem;
|
|
|
- left: 2.25rem;
|
|
|
- top: .7rem;
|
|
|
- background: #fff;
|
|
|
- li {
|
|
|
- height: .5rem;
|
|
|
- line-height: .5rem;
|
|
|
- font-size: .26rem;
|
|
|
- color: #999;
|
|
|
- padding-left: .19rem;
|
|
|
- &:focus, &:active, &:hover {
|
|
|
- background: #999;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
+ color: #999;
|
|
|
+ padding-left: .19rem;
|
|
|
+ &:focus, &:active, &:hover {
|
|
|
+ background: #999;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
- /*> ul {
|
|
|
- position: absolute;
|
|
|
- top: .6rem;
|
|
|
- left: 1.16rem;
|
|
|
- z-index: 1;
|
|
|
- width: 1.75rem;
|
|
|
- background: #fff;
|
|
|
- text-align: center;
|
|
|
- border-radius: .1rem;
|
|
|
- border: .02rem solid #dfdfdf;
|
|
|
- -webkit-box-shadow: 0 0 .12rem .02rem #e2d9d975;
|
|
|
- -moz-box-shadow: 0 0 .12rem .02rem #e2d9d975;
|
|
|
- box-shadow: 0 0 .12rem .02rem #e2d9d975;
|
|
|
- li {
|
|
|
- height: .52rem;
|
|
|
- line-height: .52rem;
|
|
|
- border-bottom: .02rem solid #dfdfdf;
|
|
|
- &:hover, &:active {
|
|
|
- background: #dedede;
|
|
|
- }
|
|
|
- }
|
|
|
- }*/
|
|
|
- }
|
|
|
- > a {
|
|
|
- display: block;
|
|
|
- width: 5.19rem;
|
|
|
- height: .84rem;
|
|
|
- text-align: center;
|
|
|
- line-height: .84rem;
|
|
|
- font-size: .38rem;
|
|
|
- margin: .3rem auto 0;
|
|
|
- background: #3f84f6;
|
|
|
- color: #fff;
|
|
|
- border-radius: .08rem;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ > a {
|
|
|
+ display: block;
|
|
|
+ width: 5.19rem;
|
|
|
+ height: .84rem;
|
|
|
+ text-align: center;
|
|
|
+ line-height: .84rem;
|
|
|
+ font-size: .38rem;
|
|
|
+ margin: .3rem auto 0;
|
|
|
+ background: #3176e9;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: .08rem;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
.datepicker-overlay {
|
|
|
z-index: 9999;
|
|
|
.cov-date-body {
|