submit
This commit is contained in:
parent
f5c70fe15a
commit
9a5d94cac7
798
package-lock.json
generated
798
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,6 @@
|
|||||||
"url": ""
|
"url": ""
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"node-sass": "^4.14.0",
|
|
||||||
"sass-loader": "^8.0.2"
|
"sass-loader": "^8.0.2"
|
||||||
},
|
},
|
||||||
"author": "uView",
|
"author": "uView",
|
||||||
@ -27,5 +26,10 @@
|
|||||||
"前端组件",
|
"前端组件",
|
||||||
"通用组件"
|
"通用组件"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"dayjs": "^1.11.10",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"sass": "^1.72.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap2_2" @click="expand">
|
<div class="wrap2_2" @click="expand">
|
||||||
<div class="wrap2_2_1" v-if="listPaintings.length>2" :style="{transform:`${isExpand?'rotate(180deg)':''}`}">
|
<div class="wrap2_2_1" v-if="listPaintings.length>2" :style="{transform:`translate(-50%, -50%) ${isExpand?'rotate(180deg)':''}`}">
|
||||||
<img src="https://cdns.fontree.cn/fonchain-main/prod/image/default/approval/13639162-2871-4187-abc5-71c2d9f01ac2.png" alt="">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap2_2_2">共计{{listPaintings.length}}幅画作</div>
|
<div class="wrap2_2_2">共计{{listPaintings.length}}幅画作</div>
|
||||||
</div>
|
</div>
|
||||||
@ -67,7 +66,7 @@
|
|||||||
<div class="wrap1_1_1">画作编号</div>
|
<div class="wrap1_1_1">画作编号</div>
|
||||||
<div class="wrap1_1_2"></div>
|
<div class="wrap1_1_2"></div>
|
||||||
<div class="wrap1_1_3">
|
<div class="wrap1_1_3">
|
||||||
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artworkNum" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作编号"/>
|
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artworkNum" placeholder-style="color: #939393;font-size: 24rpx;z-index:0" placeholder="请输入画作编号"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap1_1_4"></div>
|
<div class="wrap1_1_4"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -75,7 +74,7 @@
|
|||||||
<div class="wrap1_1_1">画作名称</div>
|
<div class="wrap1_1_1">画作名称</div>
|
||||||
<div class="wrap1_1_2"></div>
|
<div class="wrap1_1_2"></div>
|
||||||
<div class="wrap1_1_3">
|
<div class="wrap1_1_3">
|
||||||
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artworkName" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作名称"/>
|
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artworkName" placeholder-style="color: #939393;font-size: 24rpx;z-index:0" placeholder="请输入画作名称"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap1_1_4"></div>
|
<div class="wrap1_1_4"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -83,7 +82,7 @@
|
|||||||
<div class="wrap1_1_1">画家名称</div>
|
<div class="wrap1_1_1">画家名称</div>
|
||||||
<div class="wrap1_1_2"></div>
|
<div class="wrap1_1_2"></div>
|
||||||
<div class="wrap1_1_3">
|
<div class="wrap1_1_3">
|
||||||
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artistName" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画家名称"/>
|
<input style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artistName" placeholder-style="color: #939393;font-size: 24rpx;z-index:0" placeholder="请输入画家名称"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap1_1_4">
|
<div class="wrap1_1_4">
|
||||||
</div>
|
</div>
|
||||||
@ -92,7 +91,7 @@
|
|||||||
<div class="wrap1_1_1">画作平尺数</div>
|
<div class="wrap1_1_1">画作平尺数</div>
|
||||||
<div class="wrap1_1_2"></div>
|
<div class="wrap1_1_2"></div>
|
||||||
<div class="wrap1_1_3">
|
<div class="wrap1_1_3">
|
||||||
<input type="number" style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artworkSquareSize" placeholder-style="color: #939393;font-size: 24rpx;" placeholder="请输入画作平尺数"/>
|
<input type="number" style="color: #939393;font-size: 24rpx;" v-model="listPaintings[index].artworkSquareSize" @input="(e)=>{inputConfirm(e,index)}" placeholder-style="color: #939393;font-size: 24rpx;z-index:0" placeholder="请输入画作平尺数"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -104,9 +103,10 @@
|
|||||||
<div class="wrap1_1_1">寄存地址</div>
|
<div class="wrap1_1_1">寄存地址</div>
|
||||||
<div class="wrap1_1_2"></div>
|
<div class="wrap1_1_2"></div>
|
||||||
<div class="wrap1_1_3">
|
<div class="wrap1_1_3">
|
||||||
<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;"
|
<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;z-index:0"
|
||||||
placeholder="请选择寄存地址"/>
|
placeholder="请选择寄存地址"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wrap1_1_4"></div>
|
<div class="wrap1_1_4"></div>
|
||||||
<div class="wrap1_1_5">
|
<div class="wrap1_1_5">
|
||||||
<image src="../../static/zu611@3x.png"></image>
|
<image src="../../static/zu611@3x.png"></image>
|
||||||
@ -116,7 +116,7 @@
|
|||||||
<div class="wrap1_1_1">寄存时长</div>
|
<div class="wrap1_1_1">寄存时长</div>
|
||||||
<div class="wrap1_1_2"></div>
|
<div class="wrap1_1_2"></div>
|
||||||
<div class="wrap1_1_3">
|
<div class="wrap1_1_3">
|
||||||
<input style="color: #939393;font-size: 24rpx;" :value="listPaintings[index].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;z-index:0" placeholder="请选择寄存时长"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="wrap1_1_5">
|
<div class="wrap1_1_5">
|
||||||
<image src="../../static/zu612@3x.png"></image>
|
<image src="../../static/zu612@3x.png"></image>
|
||||||
@ -134,24 +134,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="wrap2">添加</div>
|
<div class="wrap2">添加</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</scroll-view>
|
|
||||||
<div class="content5">
|
|
||||||
<div class="wrap4" v-show="isExpand1" :style="{top:`-${152*listPaintings.length}rpx`}">
|
|
||||||
<div class="item" v-for="(item,index) in listPaintings">
|
|
||||||
<div class="item_1">{{index+1}}</div>
|
|
||||||
<div class="item_2">{{item.artworkNum}}</div>
|
|
||||||
<div class="item_3">{{item.artworkName}}</div>
|
|
||||||
<div class="item_4">¥ {{item.expectedPayment}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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||'0'}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="wrap2" @click="signContract">确认金额并签署合同</div>
|
|
||||||
</div>
|
|
||||||
<u-popup :round="15" :show="show_2" mode="bottom" @open="()=>{show_2=true}">
|
<u-popup :round="15" :show="show_2" mode="bottom" @open="()=>{show_2=true}">
|
||||||
<div class="poup1" >
|
<div class="poup1" >
|
||||||
<div class="content1">
|
<div class="content1">
|
||||||
@ -163,19 +145,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content2"></div>
|
<div class="content2"></div>
|
||||||
<div class="content3">
|
<div class="content3">
|
||||||
<div v-for="(item,index) in addressList" @click="selectAddress(item,index)"
|
<div v-for="(itemaddress,index1) of addressList" @click="selectAddress(itemaddress,index)"
|
||||||
:class="[listPaintings[currentIndex].warehouseID===item.ID?'active':'']" :key="index" class="wrap1">
|
:class="[listPaintings[index].warehouseID===itemaddress.ID?'active':'']" :key="index1" class="wrap1">
|
||||||
<div class="wrap1_1">{{ item.address }}</div>
|
<div class="wrap1_1">{{ itemaddress.address }}</div>
|
||||||
<div class="wrap1_2">*剩余{{ item.leftNum }}位置</div>
|
<div class="wrap1_2">*剩余{{ itemaddress.leftNum }}位置</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="wrap1 active">
|
|
||||||
<div class="wrap1_1">某某某某某某某地方</div>
|
|
||||||
<div class="wrap1_2">剩余12位置</div>
|
|
||||||
</div>-->
|
|
||||||
<!-- <div class="wrap1 disabled">
|
|
||||||
<div class="wrap1_1">某某某某某某某地方</div>
|
|
||||||
<div class="wrap1_2">*已满员</div>
|
|
||||||
</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content2"></div>
|
<div class="content2"></div>
|
||||||
<div class="content6" @click="confirmAddress">
|
<div class="content6" @click="confirmAddress">
|
||||||
@ -183,94 +157,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<u-picker v-if="show_1" :show="show_1" ref="uPicker" :columns="columns" @confirm="(e)=>{confirmDate(e,index)}" @cancel="closeClick" @change="(e)=>{changeHandler(e,index)}"></u-picker>
|
||||||
<!-- <u-popup :round="15" :show="show_1" mode="bottom" @open="()=>{show_1=true}">
|
|
||||||
<div class="poup">
|
|
||||||
<div class="content1" style="margin-top: 20rpx">
|
|
||||||
<div class="wrap1">寄存时长</div>
|
|
||||||
<div @click="show_1=false" class="wrap2">
|
|
||||||
<image
|
|
||||||
src="https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/d84593b3-10a8-4d86-be8c-b048b03b22c7.png"></image>
|
|
||||||
</div>
|
</div>
|
||||||
|
</scroll-view>
|
||||||
</div>
|
<div class="content5" @click="expand1">
|
||||||
<div class="content2"></div>
|
<div class="wrap4" v-show="isExpand1" :style="{top:`-${152*listPaintings.length}rpx`}">
|
||||||
<div class="content7" @click="show = true">
|
<div class="item" v-for="(item,index) in listPaintings">
|
||||||
<u-datetime-picker
|
<div class="item_1">{{index+1}}</div>
|
||||||
:show="show"
|
<div class="item_2">{{item.artworkNum}}</div>
|
||||||
@confirm="confirmDate"
|
<div class="item_3">{{item.artworkName}}</div>
|
||||||
mode="date"
|
<div class="item_4">¥ {{item.expectedPayment}}</div>
|
||||||
@cancel="show=false"
|
|
||||||
:minDate="minDate"
|
|
||||||
></u-datetime-picker>
|
|
||||||
<u--input
|
|
||||||
readonly
|
|
||||||
placeholder="点击选择"
|
|
||||||
border="surround"
|
|
||||||
v-model="listPaintings[currentIndex].endAt"
|
|
||||||
></u--input>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!– <div class="content2"></div>
|
|
||||||
<div class="content4">起始日期</div>
|
|
||||||
<div class="content5">
|
|
||||||
<div class="wrap1">年份</div>
|
|
||||||
<div class="wrap2">月</div>
|
|
||||||
<div class="wrap3">日</div>
|
|
||||||
</div>–>
|
|
||||||
<!– <div style="margin-left: -30rpx;margin-right: -30rpx">
|
|
||||||
<picker-view indicator-class="test" :value="value" @change="changeData" class="picker-view">
|
|
||||||
<picker-view-column>
|
|
||||||
<view style="display: flex;align-items: center;justify-content: center" class="item"
|
|
||||||
:class="[isDateFont(item,0)?'fontDate':'']" v-for="(item,index) in years" :key="index">{{ item }}年
|
|
||||||
</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<picker-view-column>
|
|
||||||
<view style="display: flex;align-items: center;justify-content: center" class="item"
|
|
||||||
:class="[isDateFont(item,1)?'fontDate':'']" v-for="(item,index) in months" :key="index">{{ item }}月
|
|
||||||
</view>
|
|
||||||
</picker-view-column>
|
|
||||||
<picker-view-column>
|
|
||||||
<view style="display: flex;align-items: center;justify-content: center" class="item"
|
|
||||||
:class="[isDateFont(item,2)?'fontDate':'']" v-for="(item,index) in days" :key="index">{{ item }}日
|
|
||||||
</view>
|
|
||||||
</picker-view-column>
|
|
||||||
</picker-view>
|
|
||||||
</div>
|
|
||||||
<div class="content2"></div>–>
|
|
||||||
<div class="content6" @click="confirmCycle">
|
|
||||||
<div class="wrap1">确定</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</u-popup>-->
|
<div class="wrap3" :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>
|
||||||
<u-picker :show="show_1" ref="uPicker" :columns="columns" @confirm="confirmDate" @cancel="closeClick" @change="changeHandler"></u-picker>
|
<div class="wrap1">
|
||||||
|
<div class="wrap1_1">*仅微信付款</div>
|
||||||
|
<div class="wrap1_2">预计 ¥{{totalMoney||'0'}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="wrap2" @click.stop="signContract">确认金额并签署合同</div>
|
||||||
|
</div>
|
||||||
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import http from "@/http/api";
|
import http from "@/http/api";
|
||||||
import {postDataByParams} from "../../http/service";
|
import {postDataByParams} from "../../http/service";
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import _ from 'lodash';
|
||||||
export default {
|
export default {
|
||||||
name: "order-details",
|
name: "order-details",
|
||||||
data() {
|
data() {
|
||||||
const date = new Date()
|
|
||||||
const years = []
|
|
||||||
const year = date.getFullYear()
|
|
||||||
const months = []
|
|
||||||
const month = date.getMonth() + 1
|
|
||||||
const days = []
|
|
||||||
const day = date.getDate()
|
|
||||||
for (let i = 1990; i <= date.getFullYear(); i++) {
|
|
||||||
years.push(i)
|
|
||||||
}
|
|
||||||
for (let i = 1; i <= 12; i++) {
|
|
||||||
months.push(i)
|
|
||||||
}
|
|
||||||
for (let i = 1; i <= 31; i++) {
|
|
||||||
days.push(i)
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
itemHeight:0,
|
itemHeight:0,
|
||||||
scrollId:'item-0',
|
scrollId:'item-0',
|
||||||
@ -312,13 +228,7 @@ export default {
|
|||||||
data: [],
|
data: [],
|
||||||
show_1: false,
|
show_1: false,
|
||||||
title: 'picker-view',
|
title: 'picker-view',
|
||||||
years,
|
|
||||||
year,
|
|
||||||
months,
|
|
||||||
month,
|
|
||||||
days,
|
|
||||||
day,
|
|
||||||
value: [9999, month - 1, day - 1],
|
|
||||||
visible: true,
|
visible: true,
|
||||||
url: ''
|
url: ''
|
||||||
}
|
}
|
||||||
@ -329,37 +239,6 @@ export default {
|
|||||||
return total + Number(item.expectedPayment);
|
return total + Number(item.expectedPayment);
|
||||||
}, 0);
|
}, 0);
|
||||||
},
|
},
|
||||||
currentArtworkSquareSize() {
|
|
||||||
if (
|
|
||||||
this.currentIndex >= 0 &&
|
|
||||||
this.currentIndex < this.listPaintings.length
|
|
||||||
) {
|
|
||||||
return this.listPaintings[this.currentIndex].artworkSquareSize;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
currentEndAt() {
|
|
||||||
if (
|
|
||||||
this.currentIndex >= 0 &&
|
|
||||||
this.currentIndex < this.listPaintings.length
|
|
||||||
) {
|
|
||||||
return this.listPaintings[this.currentIndex].endAt;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch:{
|
|
||||||
currentArtworkSquareSize(newValue, oldValue) {
|
|
||||||
if (newValue !== oldValue) {
|
|
||||||
this.obtainAmount()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
currentEndAt(newValue, oldValue) {
|
|
||||||
console.log(newValue,oldValue)
|
|
||||||
if (newValue !== oldValue) {
|
|
||||||
this.obtainAmount()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
onLoad(load){
|
onLoad(load){
|
||||||
if (load.url){
|
if (load.url){
|
||||||
@ -399,6 +278,12 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
inputConfirm: _.debounce(function (event,index) {
|
||||||
|
this.obtainAmount(index)
|
||||||
|
}, 1000),
|
||||||
|
addDaysToCurrentDate(days) {
|
||||||
|
return dayjs().add(days, 'day').format('YYYY-MM-DD');
|
||||||
|
},
|
||||||
show2Click(index){
|
show2Click(index){
|
||||||
this.currentIndex=index
|
this.currentIndex=index
|
||||||
this.show_2=true
|
this.show_2=true
|
||||||
@ -436,7 +321,7 @@ export default {
|
|||||||
this.info = res1.data
|
this.info = res1.data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeHandler(e) {
|
changeHandler(e,i) {
|
||||||
const {
|
const {
|
||||||
columnIndex,
|
columnIndex,
|
||||||
value,
|
value,
|
||||||
@ -445,7 +330,7 @@ export default {
|
|||||||
picker = this.$refs.uPicker
|
picker = this.$refs.uPicker
|
||||||
} = e
|
} = e
|
||||||
if (columnIndex === 2) {
|
if (columnIndex === 2) {
|
||||||
picker.setColumnValues(this.columns.length-1, [this.columns[2][e.index]*this.columns[0][0]])
|
picker[this.currentIndex].setColumnValues(this.columns.length-1, [this.columns[2][e.index]*this.columns[0][0]])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemDelete(index){
|
itemDelete(index){
|
||||||
@ -495,6 +380,13 @@ export default {
|
|||||||
}).exec();
|
}).exec();
|
||||||
},
|
},
|
||||||
expand1(){
|
expand1(){
|
||||||
|
if (this.isExpand){
|
||||||
|
this.listHeight=154*2
|
||||||
|
}
|
||||||
|
if (this.isExpand){
|
||||||
|
this.isExpand=false
|
||||||
|
}
|
||||||
|
|
||||||
this.isExpand1=!this.isExpand1
|
this.isExpand1=!this.isExpand1
|
||||||
},
|
},
|
||||||
expand(){
|
expand(){
|
||||||
@ -504,26 +396,23 @@ export default {
|
|||||||
this.listHeight=154*(this.listPaintings.length<=7?this.listPaintings.length:7)
|
this.listHeight=154*(this.listPaintings.length<=7?this.listPaintings.length:7)
|
||||||
}
|
}
|
||||||
this.isExpand=!this.isExpand
|
this.isExpand=!this.isExpand
|
||||||
|
if (this.isExpand1){
|
||||||
|
this.isExpand1=false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
timestampToDateString(timestamp) {
|
|
||||||
const date = new Date(timestamp ); // 把时间戳乘以1000转换为Date对象需要的毫秒数
|
confirmDate(data,index){
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = ("0" + (date.getMonth() + 1)).slice(-2); // 月份是从0开始的,所以加1,用slice保证格式是2位数
|
|
||||||
const day = ("0" + date.getDate()).slice(-2); // 用slice保证格式是2位数
|
|
||||||
return year + "-" + month + "-" + day;
|
|
||||||
},
|
|
||||||
confirmDate(data){
|
|
||||||
this.listPaintings[this.currentIndex].endAt=data.value[data.value.length-1]
|
this.listPaintings[this.currentIndex].endAt=data.value[data.value.length-1]
|
||||||
if (this.currentIndex===0){
|
if (this.currentIndex===0){
|
||||||
for (let listPainting of this.listPaintings) {
|
for (let listPainting of this.listPaintings) {
|
||||||
listPainting.endAt=data.value[data.value.length-1]
|
listPainting.endAt=data.value[data.value.length-1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.obtainAmount()
|
this.obtainAmount(this.currentIndex,this.currentIndex===0)
|
||||||
this.show_1=false
|
this.show_1=false
|
||||||
},
|
},
|
||||||
openShow1(index){
|
openShow1(index){
|
||||||
if (!this.listPaintings[this.currentIndex].artworkSquareSize){
|
if (!this.listPaintings[index].artworkSquareSize){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请先填写画作平尺数",
|
title: "请先填写画作平尺数",
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
@ -624,7 +513,7 @@ export default {
|
|||||||
const data={
|
const data={
|
||||||
orders:this.listPaintings.map((x)=>{
|
orders:this.listPaintings.map((x)=>{
|
||||||
return {
|
return {
|
||||||
endAt:new Date(Date.now() + x.endAt * 86400000)?.toISOString()?.slice(0, 10),
|
endAt:this.addDaysToCurrentDate(x.endAt),
|
||||||
warehouseID:x.warehouseID,
|
warehouseID:x.warehouseID,
|
||||||
artworkSquareSize:Number(x.artworkSquareSize),
|
artworkSquareSize:Number(x.artworkSquareSize),
|
||||||
artworkName: x.artworkName,
|
artworkName: x.artworkName,
|
||||||
@ -647,17 +536,38 @@ export default {
|
|||||||
this.loading=false
|
this.loading=false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async obtainAmount(){
|
async obtainAmount(index,list=false){
|
||||||
uni.setStorageSync("endAt",new Date(Date.now() + this.listPaintings[this.currentIndex].endAt * 86400000)?.toISOString()?.slice(0, 10))
|
let data={
|
||||||
const data={
|
|
||||||
orders:[
|
orders:[
|
||||||
{ artworkSquareSize:Number(this.listPaintings[this.currentIndex].artworkSquareSize),
|
{ artworkSquareSize:Number(this.listPaintings[index].artworkSquareSize),
|
||||||
endAt:new Date(Date.now() + this.listPaintings[this.currentIndex].endAt * 86400000)?.toISOString()?.slice(0, 10)}
|
endAt:this.addDaysToCurrentDate(this.listPaintings[index].endAt)
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
if (list){
|
||||||
|
data={
|
||||||
|
orders: this.listPaintings.map((x)=>{
|
||||||
|
return{
|
||||||
|
artworkSquareSize:Number(x.artworkSquareSize),
|
||||||
|
endAt:this.addDaysToCurrentDate(x.endAt)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const res = await postDataByParams('/api/v2/warehouse/calculate',data)
|
const res = await postDataByParams('/api/v2/warehouse/calculate',data)
|
||||||
if (res.code===200){
|
if (res.code===200){
|
||||||
this.listPaintings[this.currentIndex].expectedPayment=Number(res.data.orders?.[0]?.money)
|
if (list){
|
||||||
|
this.listPaintings.forEach((x,ix)=>{
|
||||||
|
res.data.orders?.forEach((y,iy)=>{
|
||||||
|
if (ix===iy){
|
||||||
|
x.expectedPayment=Number(y.money)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.listPaintings[index].expectedPayment=Number(res.data.orders?.[0]?.money)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmCycle() {
|
confirmCycle() {
|
||||||
@ -666,16 +576,13 @@ export default {
|
|||||||
confirmAddress() {
|
confirmAddress() {
|
||||||
this.show_2 = false
|
this.show_2 = false
|
||||||
},
|
},
|
||||||
selectAddress(item) {
|
selectAddress(item,index) {
|
||||||
|
|
||||||
this.listPaintings[this.currentIndex].warehouseID = item.ID
|
this.listPaintings[this.currentIndex].warehouseID = item.ID
|
||||||
if (this.currentIndex===0){
|
if (this.currentIndex===0){
|
||||||
console.log(this.listPaintings,'this.listPaintings')
|
|
||||||
this.listPaintings.forEach((x)=>{
|
this.listPaintings.forEach((x)=>{
|
||||||
x.warehouseID=item.ID
|
x.warehouseID=item.ID
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
},
|
||||||
selectionPeriod(item) {
|
selectionPeriod(item) {
|
||||||
this.cycleId = item.ID
|
this.cycleId = item.ID
|
||||||
@ -690,6 +597,7 @@ export default {
|
|||||||
const res = await postDataByParams('/api/warehouse/address')
|
const res = await postDataByParams('/api/warehouse/address')
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.addressList = res.data.data
|
this.addressList = res.data.data
|
||||||
|
console.log(this.addressList,'addressList')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDetailUrl() {
|
async getDetailUrl() {
|
||||||
@ -783,6 +691,7 @@ picker-view {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.content-list{
|
.content-list{
|
||||||
|
|
||||||
top: 130rpx;
|
top: 130rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -796,13 +705,14 @@ picker-view {
|
|||||||
}
|
}
|
||||||
.wrap2{
|
.wrap2{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
border: 2rpx dashed rgba(118, 196, 88, 1);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding-left: 18rpx;
|
padding-left: 20rpx;
|
||||||
padding-right: 32rpx;
|
padding-right: 20rpx;
|
||||||
.wrap2_2{
|
.wrap2_2{
|
||||||
|
border-top: 1rpx dashed rgba(118, 196, 88, 1);
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
.wrap2_2_2{
|
.wrap2_2_2{
|
||||||
@ -811,20 +721,20 @@ picker-view {
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
.wrap2_2_1{
|
.wrap2_2_1{
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%) ;
|
transform: translate(-50%, -50%) ;
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
img{
|
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 16rpx;
|
height: 16rpx;
|
||||||
}
|
background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/approval/13639162-2871-4187-abc5-71c2d9f01ac2.png");
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wrap2_1{
|
.wrap2_1{
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
.item{
|
.item{
|
||||||
height: 154rpx;
|
height: 154rpx;
|
||||||
@ -905,6 +815,9 @@ color: rgba(98, 98, 98, 1);
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
border-top-right-radius: 20rpx;
|
||||||
|
border-top-left-radius: 20rpx;
|
||||||
|
border-top: 1px dashed rgba(118, 196, 88, 1);
|
||||||
.item{
|
.item{
|
||||||
height: 152rpx;
|
height: 152rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1368,6 +1281,7 @@ color: rgba(98, 98, 98, 1);
|
|||||||
}
|
}
|
||||||
&>.content7{
|
&>.content7{
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
width: 228rpx;
|
width: 228rpx;
|
||||||
|
Loading…
Reference in New Issue
Block a user