1、新增签约宝
2、调整自营 3、新增购物车(未完善)
This commit is contained in:
+160
-6
@@ -23,9 +23,15 @@
|
||||
<span slot="title">已作废</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
<view class="mt-20 bg-white flex justify-start items-center sign pointer" @click="selectSign">
|
||||
<view class="icon">
|
||||
<agreement theme="outline" size="18" fill="#999" strokeLinecap="square"/>
|
||||
</view>
|
||||
<text class="ml-20" :class="[isSign ? 'text-main' : '']">签约宝</text>
|
||||
</view>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<view class="contract-list">
|
||||
<view class="contract-list" v-if="!isSign">
|
||||
<view class="trade-method">
|
||||
<view @click="formData.tradeMethod = 1" class="trade-method-item"
|
||||
:class="{active: formData.tradeMethod == 1}">自主交易
|
||||
@@ -43,6 +49,9 @@
|
||||
<el-tag size="mini" v-else-if="item.contract.type === 'process'" type="warning"
|
||||
effect="plain">加工单
|
||||
</el-tag>
|
||||
<el-tag size="mini" v-else-if="item.contract.type === 'sign'" type="success"
|
||||
effect="plain">签约宝
|
||||
</el-tag>
|
||||
<view class="contract-product">
|
||||
{{ item.contract.productTitle }}
|
||||
</view>
|
||||
@@ -92,8 +101,8 @@
|
||||
</view> -->
|
||||
<view class="">
|
||||
<el-button @click.native="changeContract(item.contract)"
|
||||
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
|
||||
size="mini" type="primary">修改合同内容
|
||||
v-if="item.contract.status == 1 && item.contract.userId == vk.getVuex('$user.userInfo._id')"
|
||||
size="mini" type="primary">修改合同内容
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -105,14 +114,19 @@
|
||||
:total="tableData.total"></el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else class="bg-white p-20">
|
||||
<vk-data-form ref="form2" v-model="form2.data" :action="form2.props.action"
|
||||
:columns="form2.props.columns"
|
||||
:rules="form2.props.rules" :form-type="form2.props.formType"
|
||||
:loading.sync="form2.props.loading"
|
||||
:auto-close="true" label-width="140px" @success="onFormSuccess"></vk-data-form>
|
||||
</view>
|
||||
</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"
|
||||
@@ -125,11 +139,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Agreement} from "@icon-park/vue";
|
||||
|
||||
export default {
|
||||
components: {Agreement},
|
||||
data() {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
menuIndex: '0',
|
||||
isSign: false,
|
||||
formData: {
|
||||
status: 0,
|
||||
tradeMethod: null
|
||||
@@ -231,6 +249,126 @@ export default {
|
||||
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
|
||||
}
|
||||
},
|
||||
// 表单相关结束-----------------------------------------------------------
|
||||
}
|
||||
},
|
||||
@@ -241,8 +379,13 @@ export default {
|
||||
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',
|
||||
@@ -264,7 +407,7 @@ export default {
|
||||
this.form1.props.action = 'client/contract/kh/launch'
|
||||
this.form1.props.show = true
|
||||
},
|
||||
async changeContract(contract){
|
||||
async changeContract(contract) {
|
||||
this.form1.data.contractId = contract._id
|
||||
const res = await vk.callFunction({
|
||||
url: 'client/contract/kh/getDetail',
|
||||
@@ -286,6 +429,8 @@ export default {
|
||||
this.form1.data.contractId = null
|
||||
this.formData.status = 1
|
||||
this.menuIndex = '1'
|
||||
this.isSign = false
|
||||
this.$refs.form2.resetForm()
|
||||
this.query(1)
|
||||
},
|
||||
/**
|
||||
@@ -405,4 +550,13 @@ export default {
|
||||
.contract-status-tag {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.sign {
|
||||
padding: 20px 20px 20px 25px;
|
||||
font-size: 14px;
|
||||
|
||||
.icon {
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user