|
|
|
@ -34,16 +34,17 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-center" :style="{marginTop:`${contentListHeight+10}px`,marginBottom:`${type==='detail'?10:180}px`}">
|
|
|
|
|
<scroll-view class="content-center" :style="{marginTop:`${contentListHeight+10}px`,marginBottom:type==='detail'?'30rpx':'180rpx'}" @scroll="scrollDetail" :scroll-into-view="scrollId" scroll-y="true">
|
|
|
|
|
<div class="content-scroll" v-for="(item,index) of listPaintings" :id="`item-${index}`">
|
|
|
|
|
<div class="painting-name" v-if="listPaintings.length>1">
|
|
|
|
|
<div class="wrap1">画作{{currentIndex+1}}:</div>
|
|
|
|
|
<div class="wrap1">画作{{index+1}}:</div>
|
|
|
|
|
<div class="wrap2" style="display: none" @click="itemDelete">删除</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content2">
|
|
|
|
|
<u-upload
|
|
|
|
|
:fileList="listPaintings[currentIndex].fileList1"
|
|
|
|
|
@afterRead="afterRead"
|
|
|
|
|
@delete="deletePic"
|
|
|
|
|
:fileList="listPaintings[index].fileList1"
|
|
|
|
|
@afterRead="(e)=>{afterRead(e,index)}"
|
|
|
|
|
@delete="(e)=>{deletePic(e,index)}"
|
|
|
|
|
name="6"
|
|
|
|
|
multiple
|
|
|
|
|
:maxCount="1"
|
|
|
|
@ -66,7 +67,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画作编号</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[currentIndex].artworkNum" disabled placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作编号"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled v-model="listPaintings[index].artworkNum" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作编号"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -74,7 +75,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画作名称</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled v-model="listPaintings[currentIndex].artworkName" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作名称"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled v-model="listPaintings[index].artworkName" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -82,7 +83,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画家名称</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[currentIndex].artistName" disabled placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画家名称"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled v-model="listPaintings[index].artistName" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画家名称"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4">
|
|
|
|
|
</div>
|
|
|
|
@ -91,7 +92,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画作平尺数</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[currentIndex].artworkSquareSize" disabled placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作平尺数"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled v-model="listPaintings[index].artworkSquareSize" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作平尺数"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -103,7 +104,7 @@
|
|
|
|
|
<div class="wrap1_1_1">寄存地址</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled :value="listPaintings[currentIndex].warehouseID?addressList.find(x=>x.ID===listPaintings[currentIndex].warehouseID).address:''" placeholder-style="color: #939393;font-size: 24rpx;"
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" disabled :value="listPaintings[index].warehouseID?addressList.find(x=>x.ID===listPaintings[index].warehouseID).address:''" placeholder-style="color: #939393;font-size: 24rpx;"
|
|
|
|
|
placeholder="请选择寄存地址"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4"></div>
|
|
|
|
@ -111,11 +112,11 @@
|
|
|
|
|
<image src="../../static/zu611@3x.png"></image>
|
|
|
|
|
</div>-->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1" >
|
|
|
|
|
<div class="wrap1_1">
|
|
|
|
|
<div class="wrap1_1_1">寄存时长</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" :value="listPaintings[currentIndex].endAt" disabled placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请选择寄存时长"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" :value="listPaintings[index].endAt" disabled placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请选择寄存时长"/>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="wrap1_1_5">
|
|
|
|
|
<image src="../../static/zu612@3x.png"></image>
|
|
|
|
@ -134,6 +135,9 @@
|
|
|
|
|
<div class="wrap2">添加</div>
|
|
|
|
|
</div>-->
|
|
|
|
|
</div>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="content5" v-if="type!=='detail'">
|
|
|
|
|
<div class="wrap4" v-show="isExpand1" :style="{top:`-${152*listPaintings.length}rpx`}">
|
|
|
|
|
<div class="item" v-for="(item,index) in listPaintings">
|
|
|
|
@ -146,7 +150,7 @@
|
|
|
|
|
<div class="wrap3" @click="expand1" :style="{transform:`${isExpand1?'':'rotate(180deg)'}`}"> <img src="https://cdns.fontree.cn/fonchain-main/prod/image/default/approval/13639162-2871-4187-abc5-71c2d9f01ac2.png" alt=""></div>
|
|
|
|
|
<div class="wrap1">
|
|
|
|
|
<div class="wrap1_1">*仅微信付款</div>
|
|
|
|
|
<div class="wrap1_2">预计 ¥{{totalMoney}}</div>
|
|
|
|
|
<div class="wrap1_2">预计 ¥{{totalMoney||'0'}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap2" @click="signContract">付款</div>
|
|
|
|
|
</div>
|
|
|
|
@ -243,12 +247,13 @@
|
|
|
|
|
</div>
|
|
|
|
|
</u-popup>-->
|
|
|
|
|
<u-picker :show="show_1" ref="uPicker" :columns="columns" @confirm="confirmDate" @close="show_1=false" @change="changeHandler"></u-picker>
|
|
|
|
|
<u-loading-page bgColor="rgba(0,0,0,0.5)" :loading="loading" loading-text="正在进入法大大签署..."></u-loading-page>
|
|
|
|
|
<u-loading-page bgColor="rgba(0,0,0,0.5)" :loading="loading" loading-text="正在调起微信付款..."></u-loading-page>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import http from "@/http/api";
|
|
|
|
|
import {postDataByParams} from "../../http/service";
|
|
|
|
|
import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "order-details",
|
|
|
|
@ -270,7 +275,15 @@ export default {
|
|
|
|
|
days.push(i)
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
columns: [],
|
|
|
|
|
itemHeight:0,
|
|
|
|
|
scrollId:'item-0',
|
|
|
|
|
columns: [
|
|
|
|
|
[180],
|
|
|
|
|
['*'],
|
|
|
|
|
[1,2,3,4,5],
|
|
|
|
|
['='],
|
|
|
|
|
[180]
|
|
|
|
|
],
|
|
|
|
|
currentIndex:0,
|
|
|
|
|
listPaintings:[{
|
|
|
|
|
expectedPayment:'',
|
|
|
|
@ -282,12 +295,12 @@ export default {
|
|
|
|
|
warehouseID:'',
|
|
|
|
|
endAt:''
|
|
|
|
|
}],
|
|
|
|
|
type:'',
|
|
|
|
|
contentListHeight: 0,
|
|
|
|
|
isExpand:false,
|
|
|
|
|
isExpand1:false,
|
|
|
|
|
listHeight:308,
|
|
|
|
|
minDate:'',
|
|
|
|
|
type:'',
|
|
|
|
|
show: false,
|
|
|
|
|
value1: '',
|
|
|
|
|
loading:false,
|
|
|
|
@ -346,54 +359,75 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
currentEndAt(newValue, oldValue) {
|
|
|
|
|
console.log(newValue,oldValue)
|
|
|
|
|
if (newValue !== oldValue) {
|
|
|
|
|
this.obtainAmount()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
onLoad(load){
|
|
|
|
|
if (load.url){
|
|
|
|
|
this.url=load.url
|
|
|
|
|
this.getDetailUrl()
|
|
|
|
|
}
|
|
|
|
|
if (load.type==='detail'){
|
|
|
|
|
this.getData()
|
|
|
|
|
this.type=load.type
|
|
|
|
|
}else {
|
|
|
|
|
this.listPaintings=uni.getStorageSync('orderingInfo').listPaintings
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (load.type==='scan'){
|
|
|
|
|
this.listPaintings=uni.getStorageSync('scanlist')?.map((x)=>{
|
|
|
|
|
return {
|
|
|
|
|
...x,
|
|
|
|
|
expectedPayment:'',
|
|
|
|
|
warehouseID:'',
|
|
|
|
|
fileList1:[ { url:x.artworkImg }]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.listPaintings=uni.getStorageSync('orderingInfo').listPaintings
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.columns=[
|
|
|
|
|
[180],
|
|
|
|
|
['*'],
|
|
|
|
|
[1,2,3,4,5],
|
|
|
|
|
['='],
|
|
|
|
|
[180]
|
|
|
|
|
]
|
|
|
|
|
this.getCycle()
|
|
|
|
|
if (this.$mp.query.url){
|
|
|
|
|
this.url=this.$mp.query.url
|
|
|
|
|
this.getDetailUrl()
|
|
|
|
|
}
|
|
|
|
|
this.getAddress()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.$nextTick(async ()=>{
|
|
|
|
|
this.itemHeight= await this.getElementHeight('.content-scroll')
|
|
|
|
|
this.getheight()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getElementHeight(selector) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
const query = uni.createSelectorQuery();
|
|
|
|
|
query.select(selector).boundingClientRect(data => {
|
|
|
|
|
if (data) {
|
|
|
|
|
resolve(data.height); // 成功获取高度时,通过 Promise 返回
|
|
|
|
|
} else {
|
|
|
|
|
reject(new Error('无法获取元素高度')); // 如果找不到元素或获取高度失败时,通过 Promise 返回错误
|
|
|
|
|
}
|
|
|
|
|
}).exec();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
async scrollDetail(event){
|
|
|
|
|
const scrollTop = event.detail.scrollTop; // 获取当前滚动位置
|
|
|
|
|
const totalHeight = this.listPaintings.length * this.itemHeight;
|
|
|
|
|
const scrollPercent = (scrollTop / totalHeight) * 100;
|
|
|
|
|
const index = Math.floor(scrollTop / this.itemHeight); // 计算索引
|
|
|
|
|
/* console.log(`滚动了 ${scrollPercent}%`);
|
|
|
|
|
console.log(`滚动到了第 ${index} 个元素的位置`);*/
|
|
|
|
|
this.currentIndex=index
|
|
|
|
|
},
|
|
|
|
|
async getData() {
|
|
|
|
|
const data1 = {
|
|
|
|
|
ID: Number(this.$mp.query.ID)
|
|
|
|
|
}
|
|
|
|
|
const res1 = await postDataByParams('/api/v2/warehouse/detail', data1)
|
|
|
|
|
if (res1.code === 200) {
|
|
|
|
|
this.listPaintings = res1.data?.map((x)=>{
|
|
|
|
|
return {
|
|
|
|
|
...x,
|
|
|
|
|
expectedPayment:x.money,
|
|
|
|
|
endAt:x.days,
|
|
|
|
|
fileList1: [{url:x.artworkImg}]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.info = res1.data
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -422,6 +456,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
itemClick(index){
|
|
|
|
|
this.scrollId=`item-${index}`
|
|
|
|
|
this.currentIndex=index
|
|
|
|
|
},
|
|
|
|
|
addPainting(){
|
|
|
|
@ -432,8 +467,8 @@ export default {
|
|
|
|
|
artworkName:'',
|
|
|
|
|
artistName:'',
|
|
|
|
|
artworkSquareSize:'',
|
|
|
|
|
warehouseID:'',
|
|
|
|
|
endAt:''
|
|
|
|
|
warehouseID: this.listPaintings[0].warehouseID,
|
|
|
|
|
endAt:this.listPaintings[0].endAt
|
|
|
|
|
})
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.getheight()
|
|
|
|
@ -473,6 +508,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
confirmDate(data){
|
|
|
|
|
this.listPaintings[this.currentIndex].endAt=data.value[data.value.length-1]
|
|
|
|
|
this.obtainAmount()
|
|
|
|
|
this.show_1=false
|
|
|
|
|
},
|
|
|
|
|
openShow1(){
|
|
|
|
@ -495,7 +531,6 @@ export default {
|
|
|
|
|
success: (res) => {
|
|
|
|
|
const { path } = JSON.parse(res.data).data;
|
|
|
|
|
resolve(path);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
@ -504,12 +539,12 @@ export default {
|
|
|
|
|
this.fileList1=[]
|
|
|
|
|
},
|
|
|
|
|
// 新增图片
|
|
|
|
|
async afterRead(event) {
|
|
|
|
|
async afterRead(event,index) {
|
|
|
|
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
|
|
let lists = [].concat(event.file)
|
|
|
|
|
let fileListLen = this.listPaintings[this.currentIndex].fileList1.length
|
|
|
|
|
let fileListLen = this.listPaintings[index].fileList1.length
|
|
|
|
|
lists.map((item) => {
|
|
|
|
|
this.listPaintings[this.currentIndex].fileList1.push({
|
|
|
|
|
this.listPaintings[index].fileList1.push({
|
|
|
|
|
...item,
|
|
|
|
|
status: 'uploading',
|
|
|
|
|
message: '上传中'
|
|
|
|
@ -517,8 +552,8 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
|
|
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
|
|
|
|
let item = this.listPaintings[this.currentIndex].fileList1[fileListLen]
|
|
|
|
|
this.listPaintings[this.currentIndex].fileList1.splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
|
let item = this.listPaintings[index].fileList1[fileListLen]
|
|
|
|
|
this.listPaintings[index].fileList1.splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
|
status: 'success',
|
|
|
|
|
message: '',
|
|
|
|
|
url: result
|
|
|
|
@ -1124,6 +1159,8 @@ picker-view {
|
|
|
|
|
|
|
|
|
|
.content-center{
|
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
|
|
|
|
|
.content-scroll{
|
|
|
|
|
.painting-name{
|
|
|
|
|
margin-top: 48rpx;
|
|
|
|
|
align-items: center;
|
|
|
|
@ -1146,53 +1183,6 @@ picker-view {
|
|
|
|
|
border: 1px solid rgba(118, 196, 88, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
&>.content7{
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
width: 228rpx;
|
|
|
|
|
height: 56rpx;
|
|
|
|
|
border: 3rpx solid rgba(118, 196, 88, 1);
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.wrap2{
|
|
|
|
|
color: rgba(118, 196, 88, 1);
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
}
|
|
|
|
|
.wrap1{
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
width: 32rpx;
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
border: 3rpx solid rgba(118, 196, 88, 1);
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
.horizontal {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 50%;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translate(-50%,-50%);
|
|
|
|
|
width: 18rpx;
|
|
|
|
|
height: 2rpx;
|
|
|
|
|
background-color: rgba(118, 196, 88, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.vertical {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 50%;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translate(-50%,-50%);
|
|
|
|
|
width: 2rpx;
|
|
|
|
|
height: 18rpx;
|
|
|
|
|
background-color: rgba(118, 196, 88, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
& > .content4 {
|
|
|
|
|
margin-bottom: 24rpx;
|
|
|
|
|
margin-top: 60rpx;
|
|
|
|
@ -1304,6 +1294,57 @@ picker-view {
|
|
|
|
|
height: 306rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
&>.content7{
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
width: 228rpx;
|
|
|
|
|
height: 56rpx;
|
|
|
|
|
border: 3rpx solid rgba(118, 196, 88, 1);
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.wrap2{
|
|
|
|
|
color: rgba(118, 196, 88, 1);
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
}
|
|
|
|
|
.wrap1{
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
width: 32rpx;
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
border: 3rpx solid rgba(118, 196, 88, 1);
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
.horizontal {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 50%;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translate(-50%,-50%);
|
|
|
|
|
width: 18rpx;
|
|
|
|
|
height: 2rpx;
|
|
|
|
|
background-color: rgba(118, 196, 88, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.vertical {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 50%;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translate(-50%,-50%);
|
|
|
|
|
width: 2rpx;
|
|
|
|
|
height: 18rpx;
|
|
|
|
|
background-color: rgba(118, 196, 88, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|