20261008
This commit is contained in:
@@ -1,120 +1,143 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
<el-dialog
|
||||
title="报价列表"
|
||||
:visible.sync="dialogVisible"
|
||||
width="60%"
|
||||
:before-close="handleClose">
|
||||
<view slot="title" class="text-main text-40 m-30 flex justify-between items-center">
|
||||
<text>收到的加工申请</text>
|
||||
<el-button type="primary" @click.native="dialogVisible = false">关闭</el-button>
|
||||
</view>
|
||||
<view class="mt-15">
|
||||
<view class="request-header">
|
||||
<text class="flex-1">申请人</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">补充条款</text>
|
||||
<text class="flex-1">附件</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList.rows" :key="index">
|
||||
<text class="flex-1" v-if="item.user">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<view class="flex-1 flex flex-col justify-start items-start">
|
||||
<text>加工方补充条款:{{ item.supplierExt ? item.supplierExt : '无' }}</text>
|
||||
</view>
|
||||
<view class="mt-15" >
|
||||
<view class="request-header">
|
||||
<text class="flex-1">加工商</text>
|
||||
<text class="flex-1">报价</text>
|
||||
<text class="flex-1">申请时间</text>
|
||||
<text class="flex-1">操作</text>
|
||||
</view>
|
||||
<view class="quote" v-for="(item, index) in quoteList.rows" :key="index">
|
||||
<text class="flex-1">{{
|
||||
item.user.accountType === 1 ? item.user.person.personName : item.user.company.companyName
|
||||
}}
|
||||
</text>
|
||||
<text class="flex-1">{{ item.totalPrice }}元</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
<!-- <text class="flex-1">{{ item.remark }}</text>-->
|
||||
<text class="flex-1">
|
||||
<file-type v-for="(file, fileIndex) in item.files" :key="fileIndex" :item="file"
|
||||
@click.native="openDownload(file)"/>
|
||||
</text>
|
||||
<text class="flex-1">{{ item._add_time_str }}</text>
|
||||
<text class="flex-1">
|
||||
<el-button type="primary" @click.native="createContract(item)" v-if="item.status === 0">选择</el-button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import provinces from "@/uni_modules/vk-uview-ui/libs/address/provinces.json";
|
||||
import citys from "@/uni_modules/vk-uview-ui/libs/address/citys.json";
|
||||
import areas from "@/uni_modules/vk-uview-ui/libs/address/areas.json";
|
||||
import FileType from "../../../components/file-type/file-type.vue";
|
||||
|
||||
export default {
|
||||
name: "processModal",
|
||||
data() {
|
||||
return {
|
||||
provinceData: provinces,
|
||||
cityData: citys,
|
||||
areaData: areas,
|
||||
id: null,
|
||||
dialogVisible: false,
|
||||
quoteList: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(status, quoteList) {
|
||||
console.log(status, quoteList)
|
||||
this.quoteList = quoteList
|
||||
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.getVuex('$user.userInfo._id'),
|
||||
seller: uid,
|
||||
amount: totalPrice,
|
||||
partyCount: 2,
|
||||
signCount: 0,
|
||||
}
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: '选择成功',
|
||||
type: 'success'
|
||||
})
|
||||
setTimeout(() => {
|
||||
vk.navigateTo('/pages/contract/index')
|
||||
}, 1500)
|
||||
})
|
||||
}
|
||||
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
|
||||
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.getVuex('$user.userInfo._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/contract/index?tab=1')
|
||||
else {
|
||||
if (this.info.signMethod === 1) vk.navigateTo('/pages/store/buyer')
|
||||
else vk.navigateTo('/pages/contract/index?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;
|
||||
border: 1px solid #EDEDED;
|
||||
background-color: #FFF8F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
margin-top: 30px;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user