|
|
@ -37,7 +37,7 @@ |
|
|
|
|
|
|
|
<!--商品详情--> |
|
|
|
<view class="item"> |
|
|
|
<view>商品内容</view> |
|
|
|
<view>详情图片</view> |
|
|
|
<view class=""> |
|
|
|
<uv-upload |
|
|
|
:fileList="contentFileList" |
|
|
@ -51,6 +51,22 @@ |
|
|
|
:previewFullImage="true"></uv-upload> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<view>详情视频</view> |
|
|
|
<view class=""> |
|
|
|
<uv-upload |
|
|
|
:fileList="contentFileVideoList" |
|
|
|
:maxCount="3" |
|
|
|
multiple |
|
|
|
accept="video" |
|
|
|
width="150rpx" |
|
|
|
height="150rpx" |
|
|
|
name="contentFileVideoList" |
|
|
|
@delete="deleteImage" |
|
|
|
@afterRead="afterRead" |
|
|
|
:previewFullImage="true"></uv-upload> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!--商品规格--> |
|
|
|
<view class="item" |
|
|
@ -106,7 +122,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item"> |
|
|
|
<view class="item" |
|
|
|
@click="$refs.startDateRef.open()"> |
|
|
|
<view>{{ $t('components.deliveryDate') }}</view> |
|
|
|
<view> |
|
|
|
{{ form.transactionTime }} |
|
|
@ -132,7 +149,9 @@ |
|
|
|
<view class="item"> |
|
|
|
<view>{{ $t('components.unitPrice') }}</view> |
|
|
|
<view> |
|
|
|
<input v-model="form.price" clearable></input> |
|
|
|
<input v-model="form.price" clearable |
|
|
|
class="input-color" |
|
|
|
placeholder="请输入单价"></input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -152,6 +171,22 @@ |
|
|
|
:previewFullImage="true"></uv-upload> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="item"> |
|
|
|
<view>检测视频</view> |
|
|
|
<view class=""> |
|
|
|
<uv-upload |
|
|
|
:fileList="reportFileVideoList" |
|
|
|
:maxCount="3" |
|
|
|
multiple |
|
|
|
accept="video" |
|
|
|
width="150rpx" |
|
|
|
height="150rpx" |
|
|
|
name="reportFileVideoList" |
|
|
|
@delete="deleteImage" |
|
|
|
@afterRead="afterRead" |
|
|
|
:previewFullImage="true"></uv-upload> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!--提交报价和提交审核--> |
|
|
|
<view class="btns"> |
|
|
@ -174,6 +209,10 @@ |
|
|
|
<!-- 地址选择弹框 --> |
|
|
|
<uv-popup ref="addressPopup" :round="30"> |
|
|
|
<addressList ref="addressList" height="60vh" @select="selectAddress" /> |
|
|
|
<view class="uni-color-btn" |
|
|
|
@click="toAddress"> |
|
|
|
添加地址 |
|
|
|
</view> |
|
|
|
</uv-popup> |
|
|
|
|
|
|
|
<uv-picker ref="unitListPicker" |
|
|
@ -215,7 +254,7 @@ |
|
|
|
form: { |
|
|
|
"addressId": "", |
|
|
|
"num": 1, |
|
|
|
"price": 0, |
|
|
|
"price": '', |
|
|
|
"transactionTime": dayjs(new Date()).format("YYYY-MM-DD") |
|
|
|
}, |
|
|
|
address: { |
|
|
@ -225,7 +264,9 @@ |
|
|
|
addressTotal: 0, |
|
|
|
fileList : [],//商品主图 |
|
|
|
reportFileList : [],//检测报告 |
|
|
|
reportFileVideoList : [],//检测视频 |
|
|
|
contentFileList : [],//商品内容 |
|
|
|
contentFileVideoList : [],//商品详情视频 |
|
|
|
unitList : [],//规格列表 |
|
|
|
unit : {//选中的规格 |
|
|
|
specsName : '请选择规格' |
|
|
@ -234,8 +275,24 @@ |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getUnitList() |
|
|
|
this.getAddressDefault() |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//获取默认地址 |
|
|
|
getAddressDefault() { |
|
|
|
return new Promise((success, fail) => { |
|
|
|
this.$api('addressList', { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1, |
|
|
|
}, res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.address = res.result.records[0]; |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 查询规格 |
|
|
|
getUnitList(){ |
|
|
@ -244,24 +301,28 @@ |
|
|
|
pageSize : 9999999, |
|
|
|
}, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
this.unitList.push(res.result.records) |
|
|
|
this.unitList = [res.result.records] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//获取地址列表 |
|
|
|
getAddressListA() { |
|
|
|
getAddressList() { |
|
|
|
this.$refs.addressList |
|
|
|
.getAddressList() |
|
|
|
.then(res => { |
|
|
|
if (res.total == 0) { |
|
|
|
this.$refs.addressPopup.close() |
|
|
|
return uni.navigateTo({ |
|
|
|
url: '/pages_order/center/addressListManage?type=back' |
|
|
|
}) |
|
|
|
this.toAddress() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 跳转到添加地址页面 |
|
|
|
toAddress(){ |
|
|
|
this.$refs.addressPopup.close() |
|
|
|
return uni.navigateTo({ |
|
|
|
url: '/pages_order/center/addressListManage?type=back' |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 提交报价/提交审核 |
|
|
|
confirmBtn() { |
|
|
@ -270,13 +331,20 @@ |
|
|
|
this.form.addressId = this.address.id |
|
|
|
this.form.specsId = this.unit.id |
|
|
|
|
|
|
|
// 商品主图 |
|
|
|
this.form.pic = this.fileList.map(n => n.url).join(',') |
|
|
|
// 检测报告 |
|
|
|
this.form.report = this.reportFileList.map(n => n.url).join(',') |
|
|
|
// 检测视频 |
|
|
|
this.form.reportVideo = this.reportFileVideoList.map(n => n.url).join(',') |
|
|
|
// 商品内容-详情图片 |
|
|
|
this.form.picDetail = this.contentFileList.map(n => n.url).join(',') |
|
|
|
// 商品内容-详情视频 |
|
|
|
this.form.video = this.contentFileVideoList.map(n => n.url).join(',') |
|
|
|
|
|
|
|
if (this.$utils.verificationAll(this.form, { |
|
|
|
"pic": '请上传主图', |
|
|
|
"picDetail": '请上传内容图片', |
|
|
|
// "picDetail": '请上传内容图片', |
|
|
|
specsId : "请选择规格", |
|
|
|
"addressId": '请选择提货地点', |
|
|
|
"num": '请选择吨数', |
|
|
@ -311,7 +379,7 @@ |
|
|
|
// this.getAddressList() |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.getAddressListA() |
|
|
|
this.getAddressList() |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 选择地址 |
|
|
@ -521,7 +589,7 @@ |
|
|
|
border-radius: 10rpx; |
|
|
|
overflow: hidden; |
|
|
|
input { |
|
|
|
background-color: #FFF; |
|
|
|
background-color: #00000011; |
|
|
|
font-size: 28rpx; |
|
|
|
padding: 16rpx 8rpx 16rpx 15rpx; |
|
|
|
} |
|
|
@ -530,5 +598,9 @@ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// .input-color{ |
|
|
|
// padding: 20rpx; |
|
|
|
// border-radius: 20rpx; |
|
|
|
// } |
|
|
|
} |
|
|
|
</style> |