20261008
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="100%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
</view>
|
||||
<view v-for="(item, index) in quoteList.rows" :key="index" class="border-bottom py-20 ">
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">加工商:</text>
|
||||
<text v-if="item.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">报价:</text>
|
||||
<text>{{ item.totalPrice }}元</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">加工方补充条款:</text>
|
||||
<text>{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">附件:</text>
|
||||
<template v-if="item.files && item.files.length">
|
||||
<file-type :item="file" v-for="(file, fileIndex) in item.files" :key="fileIndex"
|
||||
@click.native="openDownload(file)"/>
|
||||
</template>
|
||||
<text v-else>无</text>
|
||||
</view>
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <text class="mr-10">报价详情:</text>-->
|
||||
<!-- <text>{{ item.remark ? item.remark : '无' }}</text>-->
|
||||
<!-- </view>-->
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="mr-10">申请时间:</text>
|
||||
<text>{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="flex justify-start items-center mt-25">
|
||||
<u-button
|
||||
size="mini"
|
||||
type="error"
|
||||
text="选择"
|
||||
style="width: 40rpx;"
|
||||
@click.native="createContract(item)" v-if="info.status === 0"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/util/address/provinces.json";
|
||||
import citys from "@/util/address/citys.json";
|
||||
import areas from "@/util/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "processModal",
|
||||
components: {FileType},
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
info: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(info) {
|
||||
this.info = info
|
||||
this.id = info._id
|
||||
this.quoteList = info.quoteList
|
||||
console.log(this.quoteList.rows)
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
toQuote() {
|
||||
vk.navigateTo(`/pages/process/quote?sheetId=${this.id}`)
|
||||
},
|
||||
createContract({totalPrice, uid, _id}) {
|
||||
vk.callFunction({
|
||||
url: 'client/contract/kh/add',
|
||||
data: {
|
||||
type: 'process',
|
||||
productTitle: this.info.title,
|
||||
transactionId: vk.pubfn.createOrderNo("P", 20),
|
||||
sheetId: this.id,
|
||||
quoteId: _id,
|
||||
buyer: vk.getStorageSync('uni_id_user_info')._id,
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.dialogVisible = false
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (this.info.signMethod === 0) vk.navigateTo('/pages/public/contract?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/user/buyer')
|
||||
else vk.navigateTo('/pages/public/contract?tab=0')
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
openDownload(url) {
|
||||
window.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.request-header {
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
border-left: 1px solid #EDEDED;
|
||||
border-right: 1px solid #EDEDED;
|
||||
border-bottom: 1px solid #EDEDED;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user