821 lines
20 KiB
Vue
821 lines
20 KiB
Vue
<template>
|
||
<view class="">
|
||
<top-bar></top-bar>
|
||
<common-nav></common-nav>
|
||
<view class="w-1200">
|
||
<el-row :gutter="20">
|
||
<el-col :span="6">
|
||
<el-menu @select="menuSelect" :default-active="menuIndex" class="el-menu-vertical-demo">
|
||
<el-menu-item index="0">
|
||
<i class="el-icon-edit"></i>
|
||
<span slot="title">现货列表</span>
|
||
</el-menu-item>
|
||
<el-menu-item index="1">
|
||
<i class="el-icon-warning-outline"></i>
|
||
<span slot="title">询价单管理</span>
|
||
</el-menu-item>
|
||
</el-menu>
|
||
</el-col>
|
||
<el-col :span="18">
|
||
<el-card shadow="never">
|
||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||
<el-tab-pane label="全部(4)" name="all">
|
||
</el-tab-pane>
|
||
<el-tab-pane label="待报价(2)" name="待报价"></el-tab-pane>
|
||
<el-tab-pane label="待选商(1)" name="待选商"></el-tab-pane>
|
||
<el-tab-pane label="已选商" name="已选商"></el-tab-pane>
|
||
</el-tabs>
|
||
<div class="search">
|
||
<view class="p">
|
||
<el-select v-model="value2" placeholder="请选择">
|
||
<el-option v-for="item in options2" :key="item.value" :label="item.label"
|
||
:value="item.value">
|
||
</el-option>
|
||
</el-select>
|
||
</view>
|
||
<view class="p">
|
||
<el-date-picker v-model="value1" type="date" placeholder="选择日期">
|
||
</el-date-picker>
|
||
</view>
|
||
<view class="p">
|
||
<el-input placeholder="请输入内容" v-model="input3" class="input-with-select"
|
||
@change="onSearch">
|
||
<i slot="append" class="el-icon-search" @click="onSearch"></i>
|
||
</el-input>
|
||
</view>
|
||
</div>
|
||
</el-card>
|
||
<el-card shadow="never" style="margin-top: 20px;">
|
||
<template v-if="menuIndex === '0'">
|
||
<view class="transaction-list">
|
||
<view class="item">
|
||
<view class="info">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status">
|
||
<view class="text">发布中</view>
|
||
<view class="sjx"></view>
|
||
</view>
|
||
<span>直缝钢管</span>
|
||
<el-tag effect="plain" size="mini" class="el-tag">签单宝</el-tag>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-shopping-bag-1"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">采购量</view>
|
||
<view class="unit">500吨</view>
|
||
</view>
|
||
</view>
|
||
<view class="item" style="margin-left: 100px;">
|
||
<view class="icon">
|
||
<i class="el-icon-location-outline"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">交易地址</view>
|
||
<view class="unit">广西壮族自治区-南宁市-五象航洋城</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<text>交易编号:JJX008456456</text>
|
||
<text>发布时间:2023-05-13 10:30:55</text>
|
||
</view>
|
||
<view class="status">
|
||
<view class="icon">
|
||
<img src="https://oss.wsdns.cn/20231207/2b391d8a0ca94201ae08ee0196c7754d.png"
|
||
alt="" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tool">
|
||
<view class="btn">
|
||
<el-button size="small" plain style="width: 160px;">编辑询价详情</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="danger"
|
||
style="width: 160px;">查看收到的报价列表</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="text"
|
||
style="width: 160px;">共收到4个报价</el-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="1000">
|
||
</el-pagination>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<template v-if="menuIndex === '1'">
|
||
<view class="transaction-list">
|
||
<view class="item">
|
||
<view class="info">
|
||
<view class="title">
|
||
<view class="name">
|
||
<view class="fabu-status">
|
||
<view class="text">发布中</view>
|
||
<view class="sjx"></view>
|
||
</view>
|
||
<span>直缝钢管</span>
|
||
<el-tag effect="plain" size="mini" class="el-tag">签单宝</el-tag>
|
||
</view>
|
||
</view>
|
||
<view class="caigou">
|
||
<view class="item">
|
||
<view class="icon">
|
||
<i class="el-icon-shopping-bag-1"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">采购量</view>
|
||
<view class="unit">500吨</view>
|
||
</view>
|
||
</view>
|
||
<view class="item" style="margin-left: 100px;">
|
||
<view class="icon">
|
||
<i class="el-icon-location-outline"></i>
|
||
</view>
|
||
<view class="infos">
|
||
<view class="name">交易地址</view>
|
||
<view class="unit">广西壮族自治区-南宁市-五象航洋城</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="sub-title">
|
||
<text>交易编号:JJX008456456</text>
|
||
<text>发布时间:2023-05-13 10:30:55</text>
|
||
</view>
|
||
<view class="status">
|
||
<view class="icon">
|
||
<img src="https://oss.wsdns.cn/20231207/2b391d8a0ca94201ae08ee0196c7754d.png"
|
||
alt="" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tool">
|
||
<view class="btn">
|
||
<el-button size="small" plain style="width: 160px;">编辑询价详情</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="danger"
|
||
style="width: 160px;">查看收到的报价列表</el-button>
|
||
</view>
|
||
<view class="btn">
|
||
<el-button size="small" type="text"
|
||
style="width: 160px;">共收到4个报价</el-button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="paginatio">
|
||
<el-pagination background layout="prev, pager, next" :total="1000">
|
||
</el-pagination>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
</el-card>
|
||
</el-col>
|
||
</el-row>
|
||
|
||
</view>
|
||
<common-footer></common-footer>
|
||
|
||
<el-dialog :visible.sync="form1.props.show">
|
||
<vk-data-form ref="form1" v-model="form1.data" :action="form1.props.action" :columns="form1.props.columns"
|
||
:rules="form1.props.rules" :form-type="form1.props.formType" :loading.sync="form1.props.loading"
|
||
:auto-close="true" label-width="140px" @success="onFormSuccess"></vk-data-form>
|
||
</el-dialog>
|
||
|
||
<!-- 上传合同弹窗 -->
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
Agreement
|
||
} from "@icon-park/vue";
|
||
|
||
export default {
|
||
components: {
|
||
Agreement
|
||
},
|
||
data() {
|
||
return {
|
||
activeName: 'all',
|
||
value: '',
|
||
value1: '',
|
||
options: [{
|
||
value: '金久信自营',
|
||
label: '金久信自营'
|
||
}],
|
||
value2: '',
|
||
options2: [{
|
||
value: '未开发票',
|
||
label: '自主交易'
|
||
}],
|
||
input3: '',
|
||
pageIndex: 1,
|
||
menuIndex: '0',
|
||
isSign: false,
|
||
formData: {
|
||
status: 0,
|
||
tradeMethod: null
|
||
},
|
||
tableData: {},
|
||
// 表单相关开始-----------------------------------------------------------
|
||
form1: {
|
||
// 表单请求数据,此处可以设置默认值
|
||
data: {
|
||
contractId: '',
|
||
signEndDate: '',
|
||
title: '',
|
||
contractFile: '',
|
||
buyerSignKeyword: '',
|
||
sellerSignKeyword: '',
|
||
otherFile: '',
|
||
},
|
||
// 表单属性
|
||
props: {
|
||
// 表单请求地址
|
||
action: 'client/contract/kh/launch',
|
||
// 表单字段显示规则
|
||
columns: [{
|
||
key: "title",
|
||
title: "标题",
|
||
type: "text"
|
||
},
|
||
{
|
||
key: "signEndDate",
|
||
title: "签署截止日期",
|
||
type: "date",
|
||
pickerOptions: {
|
||
disabledDate: (date) => {
|
||
const now = new Date()
|
||
return now > date
|
||
}
|
||
}
|
||
|
||
},
|
||
{
|
||
key: "contractFile",
|
||
title: "签署文档",
|
||
type: "file",
|
||
limit: 1,
|
||
accept: ".pdf",
|
||
tips: "仅支持PDF文件",
|
||
},
|
||
{
|
||
key: "buyerSignKeyword",
|
||
title: "买家签章关键字",
|
||
type: "text",
|
||
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||
},
|
||
{
|
||
key: "sellerSignKeyword",
|
||
title: "卖家签章关键字",
|
||
type: "text",
|
||
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||
},
|
||
{
|
||
key: "otherFile",
|
||
title: "附件",
|
||
type: "file"
|
||
},
|
||
],
|
||
// 表单验证规则
|
||
rules: {
|
||
title: [{
|
||
required: true,
|
||
message: "标题不能为空",
|
||
trigger: "change"
|
||
}, ],
|
||
signEndDate: [{
|
||
required: true,
|
||
message: "签署截止日期不能为空",
|
||
trigger: "change"
|
||
}],
|
||
buyerSignKeyword: [{
|
||
required: true,
|
||
message: "买家签章关键字不能为空",
|
||
trigger: "change"
|
||
}],
|
||
sellerSignKeyword: [{
|
||
required: true,
|
||
message: "卖家签章关键字不能为空",
|
||
trigger: "change"
|
||
}],
|
||
contractFile: [{
|
||
required: true,
|
||
message: "签署文档不能为空",
|
||
trigger: "change"
|
||
}, ]
|
||
},
|
||
// add 代表添加 update 代表修改
|
||
formType: "",
|
||
// 表单是否在请求中
|
||
loading: false,
|
||
// 是否显示表单1 的弹窗
|
||
show: false
|
||
}
|
||
},
|
||
form2: {
|
||
// 表单请求数据,此处可以设置默认值
|
||
data: {
|
||
contractId: '',
|
||
signEndDate: '',
|
||
title: '',
|
||
contractFile: '',
|
||
buyerSignKeyword: '',
|
||
sellerSignKeyword: '',
|
||
otherFile: '',
|
||
},
|
||
// 表单属性
|
||
props: {
|
||
// 表单请求地址
|
||
action: 'client/contract/kh/addSign',
|
||
// 表单字段显示规则
|
||
columns: [{
|
||
key: "title",
|
||
title: "标题",
|
||
type: "text"
|
||
},
|
||
{
|
||
key: "phone",
|
||
title: "对方手机号",
|
||
type: "text"
|
||
},
|
||
{
|
||
key: "userType",
|
||
title: "对方身份",
|
||
type: "select",
|
||
data: [{
|
||
value: 1,
|
||
label: "买家"
|
||
},
|
||
{
|
||
value: 2,
|
||
label: "卖家"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
key: "signEndDate",
|
||
title: "签署截止日期",
|
||
type: "date",
|
||
pickerOptions: {
|
||
disabledDate: (date) => {
|
||
const now = new Date()
|
||
return now > date
|
||
}
|
||
}
|
||
},
|
||
{
|
||
key: "contractFile",
|
||
title: "签署文档",
|
||
type: "file",
|
||
limit: 1,
|
||
accept: ".pdf",
|
||
tips: "仅支持PDF文件",
|
||
},
|
||
{
|
||
key: "buyerSignKeyword",
|
||
title: "买家签章关键字",
|
||
type: "text",
|
||
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||
},
|
||
{
|
||
key: "sellerSignKeyword",
|
||
title: "卖家签章关键字",
|
||
type: "text",
|
||
tips: '关键字为文档中的文字内容(要能使用ctrl+f搜索到)。法大大按此关键字进行签章位置的定位,将电子章盖在这个关键字上面。凡出现关键字的地方均会盖上指定用户的电子章,建议关键字在合同中保持唯一。'
|
||
},
|
||
{
|
||
key: "otherFile",
|
||
title: "附件",
|
||
type: "file"
|
||
},
|
||
],
|
||
// 表单验证规则
|
||
rules: {
|
||
title: [{
|
||
required: true,
|
||
message: "标题不能为空",
|
||
trigger: "change"
|
||
}, ],
|
||
phone: [{
|
||
required: true,
|
||
message: "标题不能为空",
|
||
trigger: "change"
|
||
}, ],
|
||
signEndDate: [{
|
||
required: true,
|
||
message: "签署截止日期不能为空",
|
||
trigger: "change"
|
||
}],
|
||
buyerSignKeyword: [{
|
||
required: true,
|
||
message: "买家签章关键字不能为空",
|
||
trigger: "change"
|
||
}],
|
||
sellerSignKeyword: [{
|
||
required: true,
|
||
message: "卖家签章关键字不能为空",
|
||
trigger: "change"
|
||
}],
|
||
contractFile: [{
|
||
required: true,
|
||
message: "签署文档不能为空",
|
||
trigger: "change"
|
||
}, ]
|
||
},
|
||
// add 代表添加 update 代表修改
|
||
formType: "",
|
||
// 表单是否在请求中
|
||
loading: false,
|
||
// 是否显示表单1 的弹窗
|
||
show: false
|
||
}
|
||
},
|
||
// 表单相关结束-----------------------------------------------------------
|
||
}
|
||
},
|
||
onLoad(options) {
|
||
if (options.tab) {
|
||
if (options.tab === 'sign') {
|
||
this.isSign = true
|
||
} else {
|
||
this.menuIndex = String(options.tab)
|
||
this.formData.status = Number(options.tab)
|
||
this.isSign = false
|
||
this.query(1)
|
||
}
|
||
}
|
||
},
|
||
methods: {
|
||
menuSelect(e) {
|
||
this.menuIndex = String(e)
|
||
this.formData.status = Number(e)
|
||
this.isSign = false
|
||
this.query(1)
|
||
},
|
||
selectSign() {
|
||
this.isSign = true
|
||
this.menuIndex = ''
|
||
},
|
||
async query(pageIndex) {
|
||
this.tableData = await vk.callFunction({
|
||
url: 'client/contract/kh/getList',
|
||
title: '请求中...',
|
||
data: {
|
||
pageIndex,
|
||
pageSize: 10,
|
||
status: this.formData.status
|
||
},
|
||
|
||
});
|
||
},
|
||
/**
|
||
* 创建合同
|
||
* @param contract
|
||
*/
|
||
createContract(contract) {
|
||
this.form1.data.contractId = contract._id
|
||
this.form1.props.action = 'client/contract/kh/launch'
|
||
this.form1.props.show = true
|
||
},
|
||
async changeContract(contract) {
|
||
this.form1.data.contractId = contract._id
|
||
const res = await vk.callFunction({
|
||
url: 'client/contract/kh/getDetail',
|
||
title: '请求中...',
|
||
data: {
|
||
contractId: contract._id
|
||
},
|
||
});
|
||
this.form1.data.signEndDate = res.signEndDate
|
||
this.form1.data.title = res.docTitle
|
||
this.form1.data.contractFile = res.contractBase
|
||
this.form1.data.buyerSignKeyword = res.buyerSignKeyword
|
||
this.form1.data.sellerSignKeyword = res.sellerSignKeyword
|
||
this.form1.data.otherFile = res.otherFile
|
||
this.form1.props.show = true
|
||
},
|
||
onFormSuccess() {
|
||
this.form1.props.show = false
|
||
this.form1.data.contractId = null
|
||
this.formData.status = 1
|
||
this.menuIndex = '1'
|
||
this.isSign = false
|
||
this.$refs.form2.resetForm()
|
||
this.query(1)
|
||
},
|
||
/**
|
||
* 签署合同
|
||
* @param {Object} contract
|
||
*/
|
||
extSign(contract) {
|
||
vk.callFunction({
|
||
url: 'client/contract/kh/extSign',
|
||
title: '请求中...',
|
||
data: {
|
||
contractId: contract._id
|
||
},
|
||
success: (res) => {
|
||
window.open(res.data)
|
||
}
|
||
});
|
||
},
|
||
viewContract(contract) {
|
||
vk.callFunction({
|
||
url: 'client/contract/kh/viewContract',
|
||
title: '请求中...',
|
||
data: {
|
||
contractId: contract._id
|
||
},
|
||
success: (res) => {
|
||
window.open(res.data)
|
||
this.query(1)
|
||
}
|
||
});
|
||
},
|
||
onSearch() {
|
||
console.log('sdfsd: ');
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.w-1200 {
|
||
width: 1200px;
|
||
margin: 20px auto;
|
||
}
|
||
|
||
.contract-list {
|
||
background-color: #FFFFFF;
|
||
padding: 10px 20px 20px;
|
||
}
|
||
|
||
|
||
.transaction-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
.item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 10px 0;
|
||
border-bottom: 1px solid #f3f3f3;
|
||
|
||
.info {
|
||
position: relative;
|
||
border-right: 1px solid #f3f3f3;
|
||
flex: 1;
|
||
|
||
.name {
|
||
display: flex;
|
||
font-size: 16px;
|
||
font-weight: bold;
|
||
line-height: 1.6em;
|
||
align-items: center;
|
||
|
||
.fabu-status {
|
||
margin-right: 20px;
|
||
font-weight: normal;
|
||
display: flex;
|
||
.text {
|
||
padding: 0 10px 0 20px;
|
||
font-size: 13px;
|
||
color: #fff;
|
||
background-color: #A92924;
|
||
}
|
||
|
||
.sjx {
|
||
border: 12px solid;
|
||
border-color: #A92924 #ffffff #A92924 #A92924;
|
||
position: relative;
|
||
}
|
||
|
||
// .text{
|
||
// color: #fff;
|
||
// background-color: #A92924
|
||
// }
|
||
}
|
||
|
||
.buyer,
|
||
.seller {
|
||
font-size: 14px;
|
||
font-weight: normal;
|
||
display: flex;
|
||
margin: 0 30px;
|
||
}
|
||
|
||
.el-tag {
|
||
margin-left: 10px;
|
||
}
|
||
}
|
||
|
||
.caigou {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
.item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 10px 0;
|
||
border: none;
|
||
|
||
.icon {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
margin: 10px;
|
||
background-color: #f3f3f3;
|
||
padding: 10px;
|
||
border-radius: 100px;
|
||
|
||
.el-icon-shopping-bag-1,
|
||
.el-icon-location-outline {
|
||
font-size: 30px;
|
||
}
|
||
}
|
||
|
||
.infos {
|
||
display: flex;
|
||
flex-direction: column;
|
||
|
||
.unit {
|
||
color: #A92924
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.sub-title {
|
||
color: #999999;
|
||
|
||
text {
|
||
margin-right: 60px;
|
||
}
|
||
}
|
||
|
||
.action {
|
||
padding: 10px 0;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
|
||
.btn-buy,
|
||
.btn-close {
|
||
color: #A92924;
|
||
}
|
||
}
|
||
|
||
.status {
|
||
position: absolute;
|
||
top: 0;
|
||
right: 0;
|
||
|
||
.icon {
|
||
margin: 0 20px;
|
||
|
||
img {
|
||
width: 80px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.tool {
|
||
display: flex;
|
||
width: 200px;
|
||
align-items: center;
|
||
justify-content: space-around;
|
||
flex-direction: column;
|
||
|
||
.btn {
|
||
margin: 5px 0;
|
||
}
|
||
|
||
.price {
|
||
margin: 0 20px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
align-items: center;
|
||
|
||
.red {
|
||
font-size: 16px;
|
||
color: #A92924;
|
||
font-weight: bold;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.paginatio {
|
||
margin: 20px auto;
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
|
||
|
||
.contract-box {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
border-bottom: solid 1px #e8e8e8;
|
||
padding: 10rpx 0;
|
||
}
|
||
|
||
.contract-left {}
|
||
|
||
.contract-right {
|
||
text-align: right;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.trade-method {
|
||
display: flex;
|
||
margin-bottom: 20px;
|
||
border-bottom: solid 2px #f4f4f4;
|
||
}
|
||
|
||
.trade-method-item {
|
||
cursor: pointer;
|
||
font-size: 18px;
|
||
margin-right: 15px;
|
||
height: 40px;
|
||
line-height: 40px;
|
||
}
|
||
|
||
.trade-method-item.active {
|
||
color: #A92924;
|
||
border-bottom: solid 2px #A92924;
|
||
}
|
||
|
||
.contract-left-top {
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
}
|
||
|
||
.contract-product {
|
||
margin: 0 10px;
|
||
}
|
||
|
||
.contract-left-center {
|
||
height: 40px;
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
align-items: flex-start;
|
||
color: #999999;
|
||
font-size: 12px;
|
||
flex-direction: column;
|
||
margin-top: 5px;
|
||
}
|
||
|
||
.contract-left-bottom {
|
||
display: flex;
|
||
}
|
||
|
||
.contract-status {
|
||
display: flex;
|
||
}
|
||
|
||
.contract-status-tag {
|
||
margin-left: 2px;
|
||
}
|
||
|
||
.sign {
|
||
padding: 20px 20px 20px 25px;
|
||
font-size: 14px;
|
||
|
||
.icon {
|
||
line-height: 18px;
|
||
}
|
||
}
|
||
|
||
.search {
|
||
display: flex;
|
||
|
||
.p {
|
||
margin-right: 10px;
|
||
}
|
||
}
|
||
|
||
.el-select .el-input {
|
||
width: 130px;
|
||
}
|
||
|
||
.input-with-select .el-input-group__prepend {
|
||
background-color: #fff;
|
||
}
|
||
</style> |