1、新增签约宝
2、调整自营 3、新增购物车(未完善)
This commit is contained in:
@@ -8,21 +8,31 @@
|
||||
<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 }}
|
||||
<el-checkbox @change="changeCheck(index)">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<text>服务内容:{{ item.name }}</text>
|
||||
<view class="ml-35">
|
||||
<text>业务编号:</text>
|
||||
<text v-if="item.contentIndex !== null">{{
|
||||
item.contents[item.contentIndex].code
|
||||
}}
|
||||
</text>
|
||||
<text class="ml-35">服务服务项目: {{ content.title }}</text>
|
||||
<text class="ml-35"> {{ content.amount }}元/次</text>
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="ml-35">服务服务项目:</text>
|
||||
<el-select v-model="configList[index].contentIndex" clearable>
|
||||
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
:label="content.title" :value="contentIndex"/>
|
||||
</el-select>
|
||||
</view>
|
||||
<text class="ml-35" v-if="item.contentIndex !== null">
|
||||
{{ item.contents[item.contentIndex].amount }}元/次
|
||||
</text>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, index) in companyList" :key="index">
|
||||
@@ -80,18 +90,24 @@
|
||||
<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 || companyList.length === 0 || !companyList[0].name">立即支付
|
||||
<el-button type="primary"
|
||||
:disabled="contentList.length === 0 || companyList.length === 0 || !companyList[0].name">
|
||||
立即支付
|
||||
</el-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<gap></gap>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Gap from "../../../components/gap/gap.vue";
|
||||
|
||||
export default {
|
||||
name: "companyQuote",
|
||||
components: {Gap},
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
@@ -104,6 +120,7 @@ export default {
|
||||
configList: [],
|
||||
checkList: [],
|
||||
contentList: [],
|
||||
contentNameList: [],
|
||||
companyList: [
|
||||
{
|
||||
name: '',
|
||||
@@ -127,24 +144,18 @@ export default {
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contents.map(content => {
|
||||
content.selected = false
|
||||
})
|
||||
item.contentIndex = null
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
changeCheck(itemIndex, content, contentIndex) {
|
||||
const index = this.contentList.indexOf(content._index)
|
||||
changeCheck(itemIndex) {
|
||||
const index = this.contentList.indexOf(itemIndex)
|
||||
if (index === -1) {
|
||||
this.contentList.push(content._index)
|
||||
this.contentNameList.push(content.title)
|
||||
}
|
||||
else {
|
||||
this.contentList.push(itemIndex)
|
||||
} else {
|
||||
this.contentList.splice(index, 1)
|
||||
this.contentNameList.splice(index, 1)
|
||||
}
|
||||
this.configList[itemIndex].contents[contentIndex].selected = index === -1
|
||||
},
|
||||
addCompany() {
|
||||
this.companyList.push({
|
||||
@@ -169,12 +180,10 @@ export default {
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.selected) {
|
||||
tmpAmount += parseFloat(content.amount)
|
||||
}
|
||||
})
|
||||
this.configList.forEach((item, index) => {
|
||||
if (this.contentList.indexOf(index) !== -1 && item.contentIndex !== null) {
|
||||
tmpAmount += parseFloat(item.contents[item.contentIndex].amount)
|
||||
}
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
|
||||
@@ -8,21 +8,31 @@
|
||||
<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 }}
|
||||
<el-checkbox @change="changeCheck(index)">
|
||||
<view class="flex flex-col justify-start items-start">
|
||||
<view class="flex justify-start items-center text-35 mb-20">
|
||||
<text>服务内容:{{ item.name }}</text>
|
||||
<view class="ml-35">
|
||||
<text>业务编号:</text>
|
||||
<text v-if="item.contentIndex !== null">{{
|
||||
item.contents[item.contentIndex].code
|
||||
}}
|
||||
</text>
|
||||
<text class="ml-35">服务服务项目: {{ content.title }}</text>
|
||||
<text class="ml-35"> {{ content.amount }}元/次</text>
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
<view class="flex justify-start items-center">
|
||||
<text class="ml-35">服务服务项目:</text>
|
||||
<el-select v-model="configList[index].contentIndex" clearable>
|
||||
<el-option v-for="(content, contentIndex) in item.contents" :key="contentIndex"
|
||||
:label="content.title" :value="contentIndex"/>
|
||||
</el-select>
|
||||
</view>
|
||||
<text class="ml-35" v-if="item.contentIndex !== null">
|
||||
{{ item.contents[item.contentIndex].amount }}元/次
|
||||
</text>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<view>备注: {{ item.remark }}</view>
|
||||
</view>
|
||||
</el-checkbox>
|
||||
</view>
|
||||
<el-form ref="form" :model="form" label-width="200px">
|
||||
<view v-for="(item, index) in productList" :key="index">
|
||||
@@ -128,24 +138,18 @@ export default {
|
||||
})
|
||||
if (rows) {
|
||||
this.configList = rows.map(item => {
|
||||
item.contents.map(content => {
|
||||
content.selected = false
|
||||
})
|
||||
item.contentIndex = null
|
||||
return item
|
||||
})
|
||||
}
|
||||
},
|
||||
changeCheck(itemIndex, content, contentIndex) {
|
||||
const index = this.contentList.indexOf(content._index)
|
||||
changeCheck(itemIndex) {
|
||||
const index = this.contentList.indexOf(itemIndex)
|
||||
if (index === -1) {
|
||||
this.contentList.push(content._index)
|
||||
this.contentNameList.push(content.title)
|
||||
}
|
||||
else {
|
||||
this.contentList.push(itemIndex)
|
||||
} else {
|
||||
this.contentList.splice(index, 1)
|
||||
this.contentNameList.splice(index, 1)
|
||||
}
|
||||
this.configList[itemIndex].contents[contentIndex].selected = index === -1
|
||||
},
|
||||
addCompany() {
|
||||
this.productList.push({
|
||||
@@ -170,12 +174,10 @@ export default {
|
||||
computed: {
|
||||
amount() {
|
||||
let tmpAmount = 0
|
||||
this.configList.forEach(item => {
|
||||
item.contents.forEach(content => {
|
||||
if (content.selected) {
|
||||
tmpAmount += parseFloat(content.amount)
|
||||
}
|
||||
})
|
||||
this.configList.forEach((item, index) => {
|
||||
if (this.contentList.indexOf(index) !== -1 && item.contentIndex !== null) {
|
||||
tmpAmount += parseFloat(item.contents[item.contentIndex].amount)
|
||||
}
|
||||
})
|
||||
return tmpAmount
|
||||
},
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
</view>
|
||||
<!-- 现货市场 end -->
|
||||
<gap height="50"/>
|
||||
<right-bar></right-bar>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user