This commit is contained in:
xingyy 2023-09-25 12:00:57 +08:00
parent 212ab81594
commit 581a84bb9c
3 changed files with 58 additions and 18 deletions

View File

@ -1,5 +1,6 @@
{ {
"easycom": { "easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue", "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"^tm-(.*)": "@/tm-vuetify/components/tm-$1/tm-$1.vue" "^tm-(.*)": "@/tm-vuetify/components/tm-$1/tm-$1.vue"
}, },

View File

@ -166,7 +166,7 @@
<div class="content5"> <div class="content5">
<div class="wrap1"> <div class="wrap1">
<div class="wrap1_1">*仅微信付款</div> <div class="wrap1_1">*仅微信付款</div>
<div class="wrap1_2">预计 ¥600.00</div> <div class="wrap1_2">预计 ¥{{expectedPayment}}</div>
</div> </div>
<div class="wrap2">确认金额并签署合同</div> <div class="wrap2">确认金额并签署合同</div>
</div> </div>
@ -195,6 +195,7 @@ export default {
days.push(i) days.push(i)
} }
return { return {
expectedPayment:'',
warehouseID: '', warehouseID: '',
cycleId: '', cycleId: '',
cycleList: [], cycleList: [],
@ -220,7 +221,14 @@ export default {
this.url = e.url this.url = e.url
} }
}, },
watch:{
cycleId(newValue){
this.obtainAmount()
}
},
mounted() { mounted() {
this.getCycle() this.getCycle()
this.getDetailUrl() this.getDetailUrl()
this.getAddress() this.getAddress()
@ -229,6 +237,17 @@ export default {
this.data = [today.getFullYear(), today.getMonth() + 1, today.getDate()] this.data = [today.getFullYear(), today.getMonth() + 1, today.getDate()]
}, },
methods: { methods: {
async obtainAmount(){
const data={
cycleID:this.cycleId,
artworkSquareSize:this.info.artworkSquareSize
}
const res = await postDataByParams('/api/warehouse/calculate',data)
if (res.code===200){
this.expectedPayment=res.data.money
}
console.log(res,'obtainAmount')
},
confirmCycle() { confirmCycle() {
this.show_1 = false this.show_1 = false
}, },

View File

@ -53,9 +53,9 @@
</div> </div>
<div class="wrap1_3" :class="[`status${item.artworkStatus}`]"> <div class="wrap1_3" :class="[`status${item.artworkStatus}`]">
<div class="wrap1_3_1" v-if="item.artworkStatus===4"> <div class="wrap1_3_1" v-if="item.artworkStatus===4">
<div class="wrap1_3_1_1">2023.09.28</div> <div class="wrap1_3_1_1">{{ item.endAt }}</div>
<div class="wrap1_3_1_2">已延期</div> <div class="wrap1_3_1_2">已延期</div>
<div class="wrap1_3_1_3">点击补款</div> <div class="wrap1_3_1_3" @click.stop="openShow2(item)">点击补款</div>
</div> </div>
<div class="wrap1_3_3" v-if="item.artworkStatus!==4"> <div class="wrap1_3_3" v-if="item.artworkStatus!==4">
<div class="wrap1_3_3_1">{{ statusValue.find(x => x.value === item.artworkStatus).label }}</div> <div class="wrap1_3_3_1">{{ statusValue.find(x => x.value === item.artworkStatus).label }}</div>
@ -72,9 +72,11 @@
</div> </div>
</scroll-view> </scroll-view>
</div> </div>
<uni-popup ref="alertDialog" type="dialog">
<u-modal :show="show_1" title="确认删除吗" @cancel="show_1=false" @confirm="deleteClick" confirmText="确认" <uni-popup-dialog :type="'info'" cancelText="关闭" confirmText="确认" title="提示" :content="messageText"
cancelText="取消" showCancelButton></u-modal> @confirm="popForward"
></uni-popup-dialog>
</uni-popup>
<tabbar :current="1"></tabbar> <tabbar :current="1"></tabbar>
</div> </div>
</template> </template>
@ -87,6 +89,7 @@ export default {
name: "index", name: "index",
data() { data() {
return { return {
messageText: '',
show_1: false, show_1: false,
show: false, show: false,
mobileKey: '', mobileKey: '',
@ -114,17 +117,34 @@ export default {
}) })
this.getDistanceFromTopToPageBottom('.content3') this.getDistanceFromTopToPageBottom('.content3')
}, },
computed:{ computed: {},
},
methods: { methods: {
popForward() {
if (this.messageText === '确认补款吗') {
this.supplementaryPayment()
} else if (this.messageText === '确认删除吗') {
this.deleteClick()
}
},
openShow2() {
this.messageText = `确认补款吗`
this.$refs.alertDialog.open()
},
async supplementaryPayment(item) {
const data = {
ID: item.ID
}
const res = await postDataByParams('/api/warehouse/remove', data)
console.log(res, 'supplementaryPayment')
},
async getDistanceFromTopToPageBottom(classValue) { async getDistanceFromTopToPageBottom(classValue) {
const {windowHeight, windowWidth} = await uni.getSystemInfo(); const {windowHeight, windowWidth} = await uni.getSystemInfo();
const [{top}] = await new Promise(resolve => uni.createSelectorQuery().select(classValue).boundingClientRect().exec(resolve)); const [{top}] = await new Promise(resolve => uni.createSelectorQuery().select(classValue).boundingClientRect().exec(resolve));
this.elementBottom = ((windowHeight - top) / windowWidth) * 750 - 175; this.elementBottom = ((windowHeight - top) / windowWidth) * 750 - 175;
}, },
openDelete(item) { openDelete(item) {
this.show_1 = true this.messageText = `确认删除吗`
this.$refs.alertDialog.open()
this.item = item this.item = item
}, },
async deleteClick() { async deleteClick() {