1、新增商城
2、新增自营
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<view class="w-1200 m-a">
|
||||
<u-swiper :list="list" :height="380" borderRadius="0"></u-swiper>
|
||||
<view class="bg-white p-40">
|
||||
<view v-for="(item, index) in configList" :key="index"
|
||||
class="my-20 flex flex-col justify-start items-start">
|
||||
<view v-for="(content, contentIndex) in item.contents" :key="contentIndex" class="mb-20 ">
|
||||
<el-checkbox @change="changeCheck(index, content, contentIndex)">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<text>服务内容:{{ item.name }}</text>
|
||||
<text class="ml-35">
|
||||
业务编号:{{ content.code }}
|
||||
</text>
|
||||
<text class="ml-35">服务服务项目: {{ content.title }}</text>
|
||||
<text class="ml-35"> {{ content.amount }}元/次</text>
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, index) in productList" :key="index">
|
||||
<el-form-item label="检测产品:" required>
|
||||
<el-input v-model="productList[index].name"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测内容">
|
||||
{{ contentNameList.join() }}
|
||||
</el-form-item>
|
||||
<el-form-item label="取样所在地">
|
||||
<el-input v-model="productList[index].address"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件电子邮箱:">
|
||||
<el-input v-model="productList[index].email"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件微信:">
|
||||
<el-input v-model="productList[index].wechat"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收文件寄件地址">
|
||||
<el-input v-model="productList[index].receiveAddress"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人:">
|
||||
<el-input v-model="productList[index].requestName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人:">
|
||||
<el-input v-model="productList[index].contactName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式:">
|
||||
<el-input v-model="productList[index].contact"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="本次服务费用小计:">
|
||||
<view class="flex justify-between items-start mb-20 w-100p">
|
||||
<view class="flex justify-start items-center">
|
||||
<el-input v-model="amount" disabled/>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" @click.native="addCompany">增加考察对象
|
||||
</el-button>
|
||||
</view>
|
||||
<view class="ml-20">
|
||||
<el-button type="primary" plain @click.native="removeCompany(index)"
|
||||
class="ml-20"
|
||||
:disabled="productList.length === 1">删除该对象
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</el-form-item>
|
||||
</view>
|
||||
</el-form>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<view class="flex justify-center items-center">
|
||||
<text>总价:</text>
|
||||
<text class="text-main font-bold text-35">{{ totalAmount }}元</text>
|
||||
</view>
|
||||
<view class="ml-35">客服联系方式: 0771-3923001</view>
|
||||
</view>
|
||||
<view class="mt-40 flex justify-center items-center">
|
||||
<el-button type="primary" :disabled="contentList.length === 0 || productList.length === 0 || !productList[0].name">立即支付
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "productQuote",
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
image: '/static/images/selfSupport/swiper.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
],
|
||||
form: {},
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
productList: [
|
||||
{
|
||||
name: '',
|
||||
code: '',
|
||||
address: '',
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getConfigList() {
|
||||
const {rows} = await vk.callFunction({
|
||||
url: 'client/coop/config/pub/getList',
|
||||
data: {type: 1}
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contents.map(content => {
|
||||
content.selected = false
|
||||
})
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
changeCheck(itemIndex, content, contentIndex) {
|
||||
const index = this.contentList.indexOf(content._index)
|
||||
if (index === -1) {
|
||||
this.contentList.push(content._index)
|
||||
this.contentNameList.push(content.title)
|
||||
}
|
||||
else {
|
||||
this.contentList.splice(index, 1)
|
||||
this.contentNameList.splice(index, 1)
|
||||
}
|
||||
this.configList[itemIndex].contents[contentIndex].selected = index === -1
|
||||
},
|
||||
addCompany() {
|
||||
this.productList.push({
|
||||
name: '',
|
||||
code: '',
|
||||
address: '',
|
||||
email: '',
|
||||
wechat: '',
|
||||
receiveAddress: '',
|
||||
requestName: '',
|
||||
contactName: '',
|
||||
contact: '',
|
||||
})
|
||||
},
|
||||
removeCompany() {
|
||||
this.productList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getConfigList()
|
||||
},
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.selected) {
|
||||
tmpAmount += parseFloat(content.amount)
|
||||
}
|
||||
})
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
totalAmount() {
|
||||
return this.amount * this.productList.length
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user