Commit bbcf8e16 authored by 刘文虎's avatar 刘文虎

自定义报价接口调试

parent 4678241d
Pipeline #3481 canceled with stages
;(function() {
let NODE_ENV = 'prod' // dev:开发环境 | test:测试环境 | prod:生产环境
let NODE_ENV = 'test' // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null
let VERSION = 'v1.0.15'
if (process.env.NODE_ENV === 'development') {
......
......@@ -13,4 +13,105 @@ export function getOffer(data) {
method: 'POST',
data
})
}
export function getCustomOffer(data) {
return request({
url: `/rest/offer/getOffer/${data}`,
method: 'GET'
})
}
// 选择报价 -列表(返回分类数量/报价数量)
export function getOfferTemplate(data) {
return request({
url: `/rest/offer/getOfferTemplate`,
method: 'GET',
data
})
}
// 编辑报价名称 -列表
export function updateOfferTemplate(data) {
return request({
url: `/rest/offer/editOfferTemplate`,
method: 'POST',
data
})
}
// 获取报价详情 -列表
export function getTemplateInfo(data) {
return request({
url: `/rest/offer/getTemplateInfo/${data}`,
method: 'GET',
data
})
}
// 删除报价 -列表
export function deleteTemplate(data) {
return request({
url: `/rest/offer/deleteTemplate/${data}`,
method: 'GET',
})
}
//===========
// 报价分类
export function getClassificationList(data) {
return request({
url: `/rest/offer/getClassification/${data}`,
method: 'GET',
})
}
export function updateClassification(data) {
return request({
url: `/rest/offer/editOfferClassification`,
method: 'POST',
data
})
}
// 删除分类
export function deleteClassification(data) {
return request({
url: `/rest/offer/deleteClassification/${data}`,
method: 'GET',
})
}
//===========
// 报价
export function getOfferPriceList(data) {
return request({
url: `/rest/offer/getPrice/${data}`,
method: 'GET',
})
}
export function updateOfferPrice(data) {
return request({
url: `/rest/offer/editOfferPrice`,
method: 'POST',
data
})
}
export function getOfferPriceInfo(data) {
return request({
url: `/rest/offer/getPriceInfo/${data}`,
method: 'GET',
})
}
// 删除报价
export function deleteOfferPrice(data) {
return request({
url: `/rest/offer/deletePrice/${data}`,
method: 'GET',
})
}
\ No newline at end of file
<template>
<view class="bottom-buttons">
<view class="left-view" v-if="showCancel">
<u-button :custom-style="customCancel" @click="handleClickCancel"><view class="skip-view">{{cancelText}}</view></u-button>
</view>
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickSure" :disabled="disabled" :loading="loading"><view class="confirm-view">{{confirmText}}</view></u-button>
</view>
</view>
</template>
<script>
export default {
props:{
disabled:{
type:Boolean,
default:false
},
loading:{
type:Boolean,
default:false
},
showCancel:{
type:Boolean,
default:true
},
cancelText:{
type:String,
default:'取消'
},
confirmText:{
type:String,
default:'保存'
},
},
data() {
return {
customCancel: {
color: '#02A074',
height: '104rpx',
'border-radius': '16rpx',
width: '200rpx',
},
};
},
computed:{
customConFirm() {
return {
color: 'transparent',
'background-color': this.disabled ? '#7DCFB8':'#02a074' ,
height: '104rpx',
'border-radius': '16rpx'
}
},
},
methods:{
handleClickCancel(){
this.$emit('cancel')
},
handleClickSure(){
this.$emit('confirm')
}
}
};
</script>
<style lang="scss" scoped>
.bottom-buttons {
margin: 16rpx 0rpx 36rpx 0rpx;
display: flex;
align-items: center;
.left-view {
margin-right: 32rpx;
.skip-view {
color: #fc524d;
height: 104rpx;
line-height: 104rpx;
font-weight: bold;
font-size: 32rpx;
}
}
.right-view {
flex: 1;
.confirm-view {
color: #ffffff;
height: 104rpx;
line-height: 104rpx;
font-weight: bold;
font-size: 32rpx;
}
}
}
</style>
{
"name" : "扳手记账",
"name" : "account-book",
"appid" : "__UNI__EDB8C7C",
"description" : "",
"versionName" : "1.0.6",
......
......@@ -144,49 +144,58 @@
"enablePullDownRefresh": false
}
} ,{
"path" : "quoted-price/custom/custom",
"style" :
{
"navigationBarTitleText": "查报价",
"enablePullDownRefresh": false
}
}
,{
"path" : "quoted-price/select-price/select-price",
"style" :
{
"navigationBarTitleText": "选择报价",
"enablePullDownRefresh": false
}
}
,{
"path" : "quoted-price/create/create",
"style" :
{
"navigationBarTitleText": "创建报价",
"enablePullDownRefresh": false,
}, {
"path": "quoted-price/custom/custom",
"style": {
"navigationBarTitleText": "查报价",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
,{
"path" : "quoted-price/create/edit",
"style" :
{
"navigationBarTitleText": "创建报价",
"enablePullDownRefresh": false,
}
}, {
"path": "quoted-price/select-price/select-price",
"style": {
"navigationBarTitleText": "选择报价",
"enablePullDownRefresh": false
}
}, {
"path": "quoted-price/create/create",
"style": {
"navigationBarTitleText": "创建报价",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
,{
"path" : "quoted-price/create/list",
}
}, {
"path": "quoted-price/create/edit",
"style": {
"navigationBarTitleText": "创建报价",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "quoted-price/create/price",
"style": {
"navigationBarTitleText": "服务报价",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "quoted-price/create/create-price",
"style": {
"navigationBarTitleText": "新建价格",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
} ,{
"path" : "quoted-price/create/classification",
"style" :
{
"navigationBarTitleText": "服务",
"navigationBarTitleText": "服务分类",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
......@@ -322,6 +331,14 @@
"enablePullDownRefresh": false
}
}, {
"path": "global-input/global-input",
"style": {
"navigationBarTitleText": "修改",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
]
},
......@@ -375,25 +392,21 @@
"enablePullDownRefresh": false,
"disableScroll": true
}
} ,{
"path" : "bill-style",
"style" :
{
"navigationBarTitleText": "收据样式",
"enablePullDownRefresh": false
}
}
,{
"path" : "choose-remark/choose-remark",
"style" :
{
"navigationBarTitleText": "备注模板",
"enablePullDownRefresh": false
}
}
]
}, {
"path": "bill-style",
"style": {
"navigationBarTitleText": "收据样式",
"enablePullDownRefresh": false
}
}, {
"path": "choose-remark/choose-remark",
"style": {
"navigationBarTitleText": "备注模板",
"enablePullDownRefresh": false
}
}]
},
{
"root": "pages/card",
......@@ -442,7 +455,7 @@
"navigationBarBackgroundColor": "#F6F7FA",
"backgroundColor": "#F6F7FA",
"app-plus": {
"scrollIndicator":"none"
"scrollIndicator": "none"
}
},
"tabBar": {
......
<template>
<view class="select-view" @click="tabsClick">
<text>家电维安</text>
<text>{{label}}</text>
<u-icon name="arrow-down" class="arrow"></u-icon>
</view>
</template>
<script>
export default {
props:{
label:{
type:String,
default:'家电维安'
},
value:{
type:Number|null,
}
},
data() {
return {
......@@ -14,9 +23,12 @@
},
methods:{
tabsClick(){
uni.navigateTo({
url:"/pages/bill/quoted-price/select-price/select-price"
})
this.$u.route({
url: '/pages/bill/quoted-price/select-price/select-price',
params: {
id: this.value
}
});
}
}
}
......
<template>
<view class="list">
<NavbarRight backTextBold :backText="backText" />
<NoData v-if="noData" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" />
<block v-else>
<view class="item" v-for="(item, index) in list" :key="item.id" @click="clickCell(item)">
<view class="item-left">{{ item.classificationName }}</view>
<view class="item-right">
<view class="item-right-price" v-if="type === 'priceNumber'">
<text>¥</text>
<text>100</text>
<text>-</text>
<text>150</text>
</view>
<view class="item-right-icon"><u-icon name="edit-pen"></u-icon></view>
</view>
</view>
</block>
<submit-button @handleClick="add" plusIcon text="创建服务分类"></submit-button>
<PopInput title="删除提醒" type="text" sureText="确定" content="确认删除该分类?" :visible.sync="showConfirm" @click="handleConfirm" @cancel="handleCancel" />
</view>
</template>
<script>
import NavbarRight from '@/components/navbar-right';
import NoData from '@/components/no-data';
import PopInput from '@/components/pop-input-view';
import SubmitButton from '@/components/submit-button/index.vue';
import { billBaseUrl } from '@/utils/config.js';
import { getList, deleteById, enable, close } from '@/api/mine/timed.js';
import { getClassificationList, updateClassification } from '@/api/bill/quoted-price.js';
export default {
components: {
NoData,
PopInput,
SubmitButton,
NavbarRight
},
data() {
return {
billBaseUrl,
showConfirm: false,
readyDeleteItem: null,
loaded: false,
noDataText: '当前暂无内容',
noDataImage: 'bill/wuzhangdanneirong@3x.png',
list: [],
title: '',
type: '',
templateId: '',
notification: 'update-offer-classification',
refreshNotification: 'refresh-offer-classification'
};
},
onLoad(option) {
if (option && option.id) {
this.templateId = option.id;
this.getList();
}
},
onUnload() {
uni.$off(this.notification);
uni.$off(this.refreshNotification);
},
onReady() {},
computed: {
noData() {
return (this.list || []).length == 0 && this.loaded;
},
backText() {
return '服务分类';
}
},
methods: {
async getList() {
this.loaded = false;
try {
let { data } = await getClassificationList(this.templateId);
this.list = data || [];
} catch (e) {
console.log(e);
//TODO handle the exception
}
this.loaded = true;
},
add() {
this.toEdit();
},
clickCell(item) {
this.toEdit(item);
},
toEdit(item) {
let params = {
type: this.notification,
deleteType:this.refreshNotification,
value: ''
};
let id = (item && item.id) || '';
if (id) {
params.value = encodeURIComponent(item.classificationName);
params.id = id;
}
console.log(params);
this.$u.route({
url: '/pages/mine/global-input/global-input',
params
});
uni.$once(`input-sure-${this.notification}`, res => {
let data = {
classificationName: res.content,
templateId: this.templateId
};
if (id) {
data.id = id;
}
this.update(data);
});
uni.$once(this.refreshNotification, res => {
this.getList();
});
},
async update(params) {
try {
let { data } = await updateClassification(params);
this.getList();
} catch (e) {
//TODO handle the exception
console.log(e);
}
},
beforeDelete(item) {
this.readyDeleteItem = item;
this.showConfirm = true;
},
handleConfirm() {
this.onDelete();
},
handleCancel() {},
async onDelete() {
try {
let params = {
id: this.readyDeleteItem.id
};
let { data } = await deleteById(params);
this.getList();
} catch (e) {
console.log(e);
//TODO handle the exception
}
}
}
};
</script>
<style lang="scss" scoped>
.list {
width: 100%;
padding: 32rpx 24rpx;
padding-bottom: 144rpx;
min-height: 100%;
color: #333333;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
border-radius: 16rpx;
padding: 32rpx 24rpx;
margin-top: 24rpx;
&-left {
font-size: 28rpx;
font-weight: bold;
}
&-right {
display: flex;
align-items: center;
&-price {
font-size: 28rpx;
font-weight: bold;
color: #fc524d;
}
&-icon {
margin-left: 32rpx;
color: #cccccc;
}
}
}
}
</style>
This diff is collapsed.
......@@ -25,6 +25,7 @@
<script>
import NavbarNormal from '@/components/navbar-normal';
import { updateOfferTemplate } from "@/api/bill/quoted-price.js"
export default {
components: {
NavbarNormal
......@@ -83,6 +84,7 @@ export default {
},
onLoad(options) {},
onUnload() {},
methods: {
handleInput(event) {
// 直接给input设maxlength输入拼音的时候有影响
......@@ -102,14 +104,15 @@ export default {
},
async create(name){
try{
// let {data}=await add({
// name:name
// })
let {data}=await updateOfferTemplate({
templateName:name
})
console.log(data)
this.$u.route({
url: '/pages/bill/quoted-price/create/edit',
type:'redirectTo',
params: {
// id: id
id: data
}
});
}catch(e){
......
......@@ -5,28 +5,18 @@
<view class="content-view">
<view class="name">
<view class="name-label">报价名称</view>
<view class="name-value">
<u-input
v-model="info.name"
type="text"
height="36rpx"
input-align="right"
placeholder="填写报价名称,10字以内"
:border="false"
:custom-style="inputStyle"
:placeholder-style="placeholderStyle"
:clearable="false"
@input="handleInput"
/>
<view class="name-value" @click="toEdit">
<text>{{info.templateName}}</text>
<u-icon name="arrow-right" class="name-value-arrow"></u-icon>
</view>
</view>
<view class="item" v-for="(item, index) in createCategoryOptions" :key="index">
<view class="item" v-for="(item, index) in createCategoryOptions" :key="index" @click="clickCell(item)">
<view class="item-left">
<view class="item-left-icon"><image :src="item.icon" mode=""></image></view>
<view class="item-left-label">{{ item.label }}</view>
<view class="item-left-num" v-if="info[item.value]">({{ (info[item.value] && info[item.value].length) || 0 }})</view>
<view class="item-left-num">({{ info[item.value]||0 }})</view>
</view>
<view class="item-right" hover-class="u-hover-class" @click="add(item)">
<view class="item-right" hover-class="u-hover-class" @click.stop="add(item)">
<view class="item-right-icon"><u-icon name="plus"></u-icon></view>
<view class="item-right-label">新建</view>
</view>
......@@ -36,14 +26,7 @@
<text>查看报价示意图</text>
</view>
</view>
<view class="bottom-view">
<view class="left-view">
<u-button :custom-style="customDelete" @click="handleClickDelete"><view class="skip-view">删除</view></u-button>
</view>
<view class="right-view">
<u-button :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">保存</view></u-button>
</view>
</view>
<bottom-buttons cancelText='删除' confirmText="返回" @cancel="handleClickDelete" @confirm="handleClickSure"></bottom-buttons>
<PopNormal title="操作提醒" :visible.sync="visible" @confirm="handleClickConfirm" cancelText="取消" confirmText="确认" content="确认删除该条报价吗?" />
</view>
</template>
......@@ -52,20 +35,23 @@
import NavbarNormal from '@/components/navbar-normal';
import NavbarRight from '@/components/navbar-right';
import PopNormal from '@/components/pop-normal';
import BottomButtons from '@/components/common/bottom-buttons.vue';
import { billBaseUrl } from '@/utils/config.js';
import { createCategoryOptions } from '@/utils/options/bill/quoted-price.js';
import { updateOfferTemplate,getTemplateInfo } from '@/api/bill/quoted-price.js';
export default {
components: {
BottomButtons,
NavbarNormal,
NavbarRight,
PopNormal,
PopNormal
},
data() {
return {
createCategoryOptions,
previewIcon: billBaseUrl + 'yulanicon@3x.png',
info: {
name: ''
templateName: ''
},
inputStyle: {
'font-size': '28rpx',
......@@ -75,57 +61,131 @@ export default {
},
placeholderStyle: 'font-weight:normal',
maxlength: 10,
customConFirm: {
color: 'transparent',
'background-color': this.canConfirm ? '#02a074' : '#7DCFB8',
height: '104rpx',
'border-radius': '16rpx'
},
customDelete: {
color: '#02A074',
height: '104rpx',
'border-radius': '16rpx',
width: '200rpx',
},
buttonLoading: false,
visible:false
visible: false,
id:null,
notification:'update-price-template-name',
refreshNotification:'refresh-price',
canRefresh:false
};
},
computed: {
canConfirm() {
if (!this.info.name) {
return false;
}
return true;
},
onLoad(options) {
if(options&&options.id){
this.id=options.id
this.getDetail()
}
},
onUnload() {
uni.$off(this.notification);
uni.$off(this.refreshNotification);
},
onShow() {
// if(this.canRefresh){
// this.getDetail()
// }
},
methods: {
handleInput(event) {
// 直接给input设maxlength输入拼音的时候有影响
if (event.length > this.maxlength) {
this.$nextTick(() => {
this.info.name = event.substring(0, this.maxlength);
});
async getDetail() {
try {
let { data } = await getTemplateInfo(this.id);
if (data) {
this.info = data;
}
} catch (e) {
console.log(e);
//TODO handle the exception
}
this.canRefresh=true
},
clickCell(item){
uni.$once(`input-sure-${this.refreshNotification}`, res => {
this.getDetail()
});
let path=''
if(item.value==='classificationNumber'){
path='pages/bill/quoted-price/create/classification'
}else{
if(this.info.classificationNumber<=0){
this.showToast('请先创建服务分类')
return false
}
path='pages/bill/quoted-price/create/price'
}
this.$u.route({
url: path,
type: 'navigateTo',
params: {
id:this.id
}
});
},
add(item) {
uni.$once(`input-sure-${this.refreshNotification}`, res => {
this.getDetail()
});
let path=''
if(item.value==='classificationNumber'){
path='pages/bill/quoted-price/create/classification'
}else{
path='pages/bill/quoted-price/create/price'
}
this.$u.route({
url: 'pages/bill/quoted-price/create/list',
url: path,
type: 'navigateTo',
params: {
type: item.value
type: item.value,
id:this.id
}
});
},
handleClickDelete(){
this.visible=true
toEdit(){
let value = this.info.templateName;
this.$u.route({
url: '/pages/mine/input/input',
params: {
type: this.notification,
value: encodeURIComponent(value),
}
});
uni.$once(`input-sure-${this.notification}`, res => {
let params={
id:this.info.id,
templateName:res.content
}
this.updateTemplateName(params)
});
},
async updateTemplateName(params){
try{
let {data}=await updateOfferTemplate(params)
this.getDetail()
}catch(e){
//TODO handle the exception
console.log(e)
}
},
handleClickSure(){
handleClickDelete() {
this.visible = true;
},
handleClickConfirm(){
handleClickSure() {
this.$u.route({
type: 'back'
});
},
// 确认删除
async handleClickConfirm() {
try {
let { data } = await updateOfferTemplate({ id: this.id,deleteFlag:true });
this.$u.route({
type: 'back'
});
} catch (e) {
console.log(e);
//TODO handle the exception
}
}
}
};
</script>
......@@ -141,33 +201,8 @@ export default {
.content-view {
height: 100%;
overflow: auto;
padding: 0 24rpx;
}
.bottom-view {
margin: 16rpx 32rpx 36rpx 32rpx;
display: flex;
align-items: center;
.left-view {
.skip-view {
color: #FC524D;
height: 104rpx;
line-height: 104rpx;
font-weight: bold;
font-size: 32rpx;
}
}
.right-view {
margin-left: 32rpx;
flex: 1;
.confirm-view {
color: #ffffff;
height: 104rpx;
line-height: 104rpx;
font-weight: bold;
font-size: 32rpx;
}
}
}
.name {
height: 108rpx;
background: #ffffff;
......@@ -181,8 +216,14 @@ export default {
color: #333333;
}
&-value {
display: flex;
align-items: center;
justify-content: flex-end;
width: 460rpx;
height: 100%;
&-arrow{
color: #cccccc;
}
}
}
......
<template>
<view class="list">
<NavbarRight backTextBold backText="创建报价" />
<NavbarRight backTextBold :backText="backText" />
<NoData v-if="noData" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" />
<block v-else>
<view class="item" v-for="(item, index) in list" :key="item.id" @click="clickCell(item)">
<view class="item-left">{{ item.name }}</view>
<view class="item-left">{{ item.offerName }}</view>
<view class="item-right">
<view class="item-right-price">
<text>¥</text>
<text>100</text>
<text>-</text>
<text>150</text>
<text>{{item.offerMinPrice}}</text>
<text v-if="item.offerType==='scope'">
<text>-</text>
<text>{{item.offerMaxPrice}}</text>
</text>
</view>
<view class="item-right-icon"><u-icon name="edit-pen"></u-icon></view>
</view>
</view>
</block>
<PopInput title="删除提醒" type="text" sureText="确定" content="确认删除该定时计划?" :visible.sync="showConfirm" @click="handleConfirm" @cancel="handleCancel" />
<submit-button @handleClick="add" plusIcon text="创建服务价格"></submit-button>
</view>
</template>
......@@ -28,6 +29,7 @@ import PopInput from '@/components/pop-input-view';
import SubmitButton from '@/components/submit-button/index.vue';
import { billBaseUrl } from '@/utils/config.js';
import { getList, deleteById, enable, close } from '@/api/mine/timed.js';
import { getOfferPriceList,updateOfferPrice } from '@/api/bill/quoted-price.js';
export default {
components: {
NoData,
......@@ -45,41 +47,35 @@ export default {
noDataImage: 'bill/wuzhangdanneirong@3x.png',
list: [],
title: '',
type: ''
type: '',
templateId: '',
notification: 'refresh-offer-price'
};
},
onLoad(option) {
if (option && option.type) {
this.type = option.type;
if (option && option.id) {
this.templateId = option.id;
this.getList();
}
},
onReady() {
this.getList();
onUnload() {
uni.$off(this.notification);
},
onReady() {},
computed: {
noData() {
return (this.list || []).length == 0 && this.loaded;
},
backText() {
return '服务价格';
}
},
onUnload() {
uni.$off('timed-sure-delete');
},
methods: {
async getList() {
this.loaded = false;
try {
let params = {
current: 1,
size: 99999
};
let { data } = await getList(params);
data.records.forEach(item => {
item.label = item.classification.name;
item.icon = item.classification.recordSelectedIcon;
item.show = false;
item.loading = false;
});
this.list = data.records || [];
let { data } = await getOfferPriceList(this.templateId);
this.list = data || [];
} catch (e) {
console.log(e);
//TODO handle the exception
......@@ -89,36 +85,20 @@ export default {
add() {
this.toEdit();
},
toEdit(id = '') {
clickCell(item) {
this.toEdit(item.id);
},
toEdit(id='') {
this.$u.route({
url: '/pages/mine/timed/create-timed/create-timed',
params: {
id: id
url: '/pages/bill/quoted-price/create/create-price',
params:{
id:id,
templateId:this.templateId,
}
});
uni.$once(`refreshList`, res => {
this.getList();
uni.$once(this.notification, res => {
this.getList()
});
if (id) {
uni.$once(`timed-sure-delete`, res => {
this.list.map(el => {
if (el.id === res.id) {
this.beforeDelete(el);
}
});
});
}
},
clickCell(item) {
let flag = true;
this.list.map(el => {
if (el.show) {
flag = false;
}
});
if (flag) {
this.toEdit(item.id);
}
},
beforeDelete(item) {
this.readyDeleteItem = item;
......@@ -159,11 +139,14 @@ export default {
background-color: #ffffff;
border-radius: 16rpx;
padding: 32rpx 24rpx;
margin-top: 24rpx;
&-left {
font-size: 28rpx;
font-weight: bold;
}
&-right {
display: flex;
align-items: center;
&-price {
font-size: 28rpx;
font-weight: bold;
......
<template>
<view class="collapse-body">
<view class="collapse-body-title">{{detail.classCProject}}</view>
<view class="collapse-body-desc">{{detail.pubRemark}}</view>
<view class="collapse-body-desc">{{detail.offerRemark}}</view>
<view class="collapse-body-bottom">
<text class="collapse-body-bottom-price">
<text>¥</text>
<text>{{ detail.chargeStandard }}{{detail.unit}}</text>
<text>{{ detail.offerMinPrice }}</text>
<text v-if="detail.offerType==='scope'">
<text>-</text>
<text>{{detail.offerMaxPrice}}</text>
</text>
</text>
<view class="collapse-body-bottom-add">
<zb-tooltip placement="top-end" ref="tooltip1" color="#7f7f7f" :visible.sync="showTips">
......@@ -74,7 +77,6 @@ export default {
this.$emit('add', {
item: this.detail,
num: this.form.num,
parentTitle:this.parentTitle
});
}
}
......
<template>
<!-- 查报价详情 -->
<view class="container">
<NavbarRight title="查报价" imageWidth="20" />
<!-- 顶部面板 -->
<view class="top--panel">
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
<select-view ></select-view>
<select-view></select-view>
<quoted-price-tips></quoted-price-tips>
<quoted-price-step></quoted-price-step>
</view>
......@@ -14,38 +15,37 @@
<view class="list-box" v-else>
<view class="left">
<scroll-view scroll-y :style="{ width: '100%', height: '100%' }">
<view class="item" :class="{ active: index == leftIndex }" v-for="(item, index) in leftArray" :id="item.classA" :key="index" @click="leftTap(item, index)">
<view class="item" :class="{ active: index == leftIndex }" v-for="(item, index) in totalArray" :id="item.classA" :key="index" @click="leftTap(item, index)">
<view class="item-icon"></view>
<view class="item-label ellipsis">{{ item.classAProject }}</view>
<view class="item-label ellipsis">{{ item.classificationName }}</view>
</view>
</scroll-view>
</view>
<view class="main">
<scroll-view scroll-y :style="{ width: '100%', height: '100%' }">
<view class="item main-item">
<view class="title">
<view>{{ mainData.classAProject }}</view>
</view>
<view class="goods-list">
<view class="collapse">
<view v-for="(item2, index2) in mainData.children" :key="index2">
<view class="collapse-title" @click="openCollapse(item2)">
<view class="collapse-title-left">{{ item2.classBProject }}</view>
<view class="collapse-title-left">{{ item2.offerName }}</view>
<view class="collapse-title-right">
<text>¥</text>
<text>{{ resetPrice(item2) }}</text>
<text>{{ item2.offerMinPrice }}</text>
<text v-if="item2.offerType==='scope'">
<text>-</text>
<text>{{item2.offerMaxPrice}}</text>
</text>
<u-icon name="arrow-up" class="collapse-title-right-icon" v-if="item2.open"></u-icon>
<u-icon name="arrow-down" class="collapse-title-right-icon" v-else></u-icon>
</view>
</view>
<view v-if="item2.open">
<collapse-body
:detail="item3"
:parentTitle="item2.classBProject"
:detail="item2"
:parentTitle="item2.offerName"
@add="addPrice"
v-for="(item3, index3) in item2.children"
:key="item3.classC"
:showTips="!quotedPriceTooltip && index3 === 0"
:showTips="!quotedPriceTooltip"
></collapse-body>
</view>
</view>
......@@ -63,6 +63,8 @@
</template>
<script>
import NavbarRight from '@/components/navbar-right';
import SelectView from '../components/select-view.vue';
import NoData from '@/components/no-data';
import QuotedPriceStep from '../components/quoted-price-step.vue';
import UniCollapse from '@/components/uni-collapse/uni-collapse.vue';
......@@ -71,54 +73,37 @@ import QuotedPriceTips from '../components/quoted-price-tips.vue';
import CollapseBody from './components/collapse-body.vue';
import ShoppingCart from './components/shopping-cart.vue';
import CartPopup from './components/cart-popup.vue';
import SelectView from '../components/select-view.vue';
import { mapGetters } from 'vuex';
import { getOffer } from '@/api/bill/quoted-price.js';
import { getCustomOffer } from '@/api/bill/quoted-price.js';
export default {
components: { NoData, QuotedPriceStep, UniCollapse, UniCollapseItem, QuotedPriceTips, CollapseBody, ShoppingCart, CartPopup, SelectView },
components: { NoData, QuotedPriceStep, UniCollapse, UniCollapseItem, QuotedPriceTips, CollapseBody, ShoppingCart, CartPopup,NavbarRight, SelectView },
data() {
return {
noDataText: '当前暂无内容',
noDataImage: 'bill/wuzhangdanneirong@3x.png',
form: {
serviceType: '',
brandCode: '',
prodCode: ''
},
scrollHeight: 400,
scrollTopSize: 0,
fillHeight: 0, // 填充高度,用于最后一项低于滚动区域时使用
leftArray: [],
mainData: [], // 右侧数据
totalArray: [], // 数据集合
topArr: [],
leftIndex: 0,
shoppingCartList: [], // 购物车商品
cartShow: false,
loaded: false
loaded: false,
id: null
};
},
computed: {
...mapGetters(['quotedPriceTooltip']),
// mainData(){
// return this.totalArray[this.leftIndex]
// },
noData() {
return (this.totalArray || []).length == 0 && this.loaded;
}
},
onLoad(options) {
if (options) {
let { serviceType, brandCode, prodCode } = options;
if (serviceType && brandCode && prodCode) {
this.form.serviceType = serviceType;
this.form.brandCode = brandCode;
this.form.prodCode = prodCode;
}
if (options && options.id) {
this.id = options.id;
}
// this.form.serviceType = 'WX';
// this.form.brandCode = 'MIDEA';
// this.form.prodCode = '1000';
},
onReady() {
/* 在非H5平台,nextTick回调后有概率获取到错误的元素高度,则添加200ms的延迟来减少BUG的产生 */
......@@ -131,6 +116,26 @@ export default {
}, 100);
},
methods: {
/* 获取列表数据 */
async getListData() {
try {
let res = await getCustomOffer(this.id);
let { code, data, msg } = res;
data.map(item=>{
item.children.map(el=>{
el.open=false
})
})
// 总列表赋值
this.totalArray = data;
// 右侧列表赋值
this.mainData = this.totalArray[this.leftIndex];
} catch (e) {
console.log(e);
//TODO handle the exception
}
this.loaded = true;
},
resetPrice(item) {
let price = 0;
if (item.standardMin && item.standardMax) {
......@@ -154,11 +159,11 @@ export default {
this.setCart(params);
},
setCart(params) {
let { num, parentTitle } = params;
let { num } = params;
let item = this.deepClone(params.item);
let flag = true;
this.shoppingCartList.forEach((target, index) => {
if (target.classC === item.classC) {
if (target.id === item.id) {
if (num === 0) {
this.shoppingCartList.splice(index, 1);
} else {
......@@ -169,7 +174,6 @@ export default {
});
if (flag) {
item.num = num;
item.parentTitle = parentTitle;
this.shoppingCartList.push(item);
}
if (this.shoppingCartList.length) {
......@@ -195,25 +199,21 @@ export default {
resetCollapseBody(deleted) {
if (this.shoppingCartList.length) {
this.shoppingCartList.forEach(item => {
this.mainData.children.forEach(data => {
data.children.map(el => {
if (item.classC === el.classC) {
this.mainData.children.forEach(el => {
if (item.id === el.id) {
this.$set(el, 'num', item.num);
data.open = true;
el.open = true;
}
});
});
});
}
// 当购物车中有被删除项时,通知main里面计数器变为0
if (deleted) {
this.mainData.children.forEach(data => {
data.children.map(el => {
if (deleted.classC === el.classC) {
this.$set(el, 'num', 0);
data.open = true;
}
});
if (deleted.id === data.id) {
this.$set(data, 'num', 0);
data.open = true;
}
});
}
},
......@@ -234,65 +234,7 @@ export default {
const res = new Map();
return arr.filter(item => !res.has(item[uniId]) && res.set(item[uniId], 1));
},
/* 获取列表数据 */
async getListData() {
try {
let res = await getOffer(this.form);
let { code, data, msg } = res;
//第一层
let newList = JSON.parse(JSON.stringify(data));
// 去重
newList = this.uniqueFunc(newList, 'classA');
// 移除 "备件费"
newList.splice(newList.findIndex(item => item.classA === 'T12'), 1);
// 左侧列表赋值
this.leftArray = this.deepClone(newList);
// 第二层
newList.map(el => {
data.map((item, index) => {
if (item.classA === el.classA) {
let item1 = this.deepClone(item);
item1.open = false;
if (!el.children) {
el.children = [item1];
} else {
el.children.push(item1);
}
}
});
});
// 第二层去重
newList = newList.map(item => {
let arr = this.deepClone(item.children);
item.children = this.uniqueFunc(arr, 'classB');
return item;
});
// 第三层
newList.map(el => {
el.children.map(el2 => {
data.map((item, index) => {
if (item.classB === el2.classB) {
let item1 = this.deepClone(item);
item1.num = 0;
if (!el2.children) {
el2.children = [item1];
} else {
el2.children.push(item1);
}
}
});
});
});
// 总列表赋值
this.totalArray = newList;
// 右侧列表赋值
this.mainData = this.totalArray[this.leftIndex];
} catch (e) {
console.log(e);
//TODO handle the exception
}
this.loaded = true;
},
/* 左侧导航点击 */
leftTap(item, index) {
this.leftIndex = index;
......
<template>
<!-- 查报价 -->
<view class="quoted-price">
<NavbarRight title="电子名片" imageWidth="20" />
<!-- <select-view></select-view> -->
<NavbarRight title="查报价" imageWidth="20" />
<select-view ></select-view>
<quoted-price-tips></quoted-price-tips>
<quoted-price-step></quoted-price-step>
<view class="quoted-price-brand">
......@@ -17,7 +17,7 @@
</template>
<script>
import NavbarRight from '@/components/navbar-right';
import NavbarRight from '@/components/navbar-right';
import QuotedPriceTips from './components/quoted-price-tips.vue';
import QuotedPriceStep from './components/quoted-price-step.vue';
import SelectView from './components/select-view.vue';
......
......@@ -2,17 +2,15 @@
<view class="list">
<NoData v-if="noData" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" />
<block v-else>
<view class="item" v-for="(item, index) in list" :key="item.id" @click="clickCell(item)">
<view class="item-left">
<view class="item-left-icon">
默认
</view>
<text>家电维安</text>
</view>
<view class="item-right">
<u-icon name="edit-pen"></u-icon>
</view>
<view class="item" v-for="(item, index) in list" :key="item.id" @click="clickCell(item)">
<view class="item-left">
<view class="item-left-icon" :class="{ 'item-left-default': item.systemFlag }">{{ item.systemFlag ? '默认' : '自建' }}</view>
<view class="item-left-label">{{ item.templateName }}</view>
</view>
<view class="item-right" v-if="!item.systemFlag" @click.stop="toEdit(item)">
<view class="item-right-icon"><u-icon name="edit-pen"></u-icon></view>
</view>
</view>
</block>
<PopInput title="删除提醒" type="text" sureText="确定" content="确认删除该报价?" :visible.sync="showConfirm" @click="handleConfirm" @cancel="handleCancel" />
......@@ -25,7 +23,7 @@ import NoData from '@/components/no-data';
import PopInput from '@/components/pop-input-view';
import SubmitButton from '@/components/submit-button/index.vue';
import { billBaseUrl } from '@/utils/config.js';
import { getList, deleteById, enable, close } from '@/api/mine/timed.js';
import { getOfferTemplate } from '@/api/bill/quoted-price.js';
export default {
components: {
NoData,
......@@ -41,9 +39,15 @@ export default {
noDataText: '当前暂无内容',
noDataImage: 'bill/wuzhangdanneirong@3x.png',
list: [],
id:null,
};
},
onReady() {
onLoad(options) {
if(options){
this.id=options.id||null
}
},
onShow() {
this.getList();
},
computed: {
......@@ -51,25 +55,13 @@ export default {
return (this.list || []).length == 0 && this.loaded;
}
},
onUnload() {
uni.$off("timed-sure-delete");
},
onUnload() {},
methods: {
async getList() {
this.loaded = false;
try {
let params = {
current: 1,
size: 99999
};
let { data } = await getList(params);
data.records.forEach(item => {
item.label = item.classification.name;
item.icon = item.classification.recordSelectedIcon;
item.show = false;
item.loading = false;
});
this.list = data.records || [];
let { data } = await getOfferTemplate();
this.list = data || [];
} catch (e) {
console.log(e);
//TODO handle the exception
......@@ -77,39 +69,51 @@ export default {
this.loaded = true;
},
add() {
this.$u.route({
url: '/pages/bill/quoted-price/create/create',
});
// uni.$once(`input-sure-create-price`, res => {
// this.$emit('update', {
// value: 'create-price',
// content: res.content
// });
// });
this.$u.route({
url: '/pages/bill/quoted-price/create/create'
});
},
toEdit(id = '') {
toEdit(item) {
this.$u.route({
url: '/pages/bill/quoted-price/create/create',
url: '/pages/bill/quoted-price/create/edit',
params: {
id: id
id: item.id
}
});
uni.$once(`refreshList`, res => {
this.getList();
});
// if(id){
// uni.$once(`timed-sure-delete`, res => {
// this.list.map(el => {
// if (el.id === res.id) {
// this.beforeDelete(el);
// }
// });
// });
// }
},
clickCell(item) {
let pages = getCurrentPages();
let prePage=pages[pages.length-2]
console.log(pages)
let path=""
if (item.systemFlag) {
if(prePage.route==='pages/bill/quoted-price/quoted-price'){
this.$u.route({
type: 'back'
});
}else{
path='pages/bill/quoted-price/quoted-price'
}
} else {
if(this.id===item.id){
this.$u.route({
type: 'back'
});
}else{
path='pages/bill/quoted-price/custom/custom'
}
}
if(path){
this.$u.route({
url: path,
params: {
id: item.id
}
});
}
},
beforeDelete(item) {
this.readyDeleteItem = item;
this.showConfirm = true;
......@@ -117,8 +121,7 @@ export default {
handleConfirm() {
this.onDelete();
},
handleCancel() {
},
handleCancel() {},
async onDelete() {
try {
let params = {
......@@ -130,8 +133,7 @@ export default {
console.log(e);
//TODO handle the exception
}
},
}
}
};
</script>
......@@ -142,6 +144,54 @@ export default {
padding: 32rpx 24rpx;
padding-bottom: 144rpx;
min-height: 100%;
.item {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
border-radius: 16rpx;
padding: 24rpx 24rpx;
margin-top: 24rpx;
&-left {
font-size: 32rpx;
font-weight: bold;
display: flex;
align-items: center;
&-icon {
display: flex;
align-items: center;
justify-content: center;
margin-right: 32rpx;
color: $default-color;
width: 80rpx;
height: 44rpx;
border-radius: 12rpx;
font-size: 24rpx;
border: 2rpx solid $default-color;
}
&-default {
background: $default-color;
color: #ffffff;
}
}
&-right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 60rpx;
height: 60rpx;
background-color: #fc524d;
&-price {
font-size: 28rpx;
font-weight: bold;
color: #fc524d;
}
&-icon {
margin-left: 32rpx;
color: #cccccc;
}
}
}
}
</style>
......@@ -2,7 +2,7 @@
<view class="voucher">
<view class="voucher-title">
<view class="voucher-title-text">
<text>{{ stopInfo.name }}</text>
<text>{{ detail.repairShopName }}</text>
<view class="voucher-title-text-underline"></view>
</view>
</view>
......@@ -60,8 +60,7 @@
</view>
<view class="voucher-head-item-value">
<text>{{ item.currencySign || '' }}</text>
<text v-if="item.value === 'stopInfo'">{{ stopInfo[item.childrenValue] || '' }}</text>
<text v-else-if="item.value === 'arearAmount'">{{ arearAmount }}</text>
<text v-if="item.value === 'arearAmount'">{{ arearAmount }}</text>
<text v-else>{{ detail[item.value] || '' }}</text>
</view>
</view>
......@@ -88,10 +87,6 @@ export default {
};
}
},
stopInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
......@@ -460,7 +455,7 @@ export default {
];
// 表格底部
let footerView = this.voucherFooterOptions.map((item, index) => {
let text = item.value === 'stopInfo' ? this.stopInfo[item.childrenValue] : item.value === 'arearAmount' ? this.arearAmount : this.detail[item.value];
let text = item.value === 'arearAmount' ? this.arearAmount : this.detail[item.value];
let view = {
type: 'view',
css: {
......@@ -495,10 +490,6 @@ export default {
}
]
};
// <text>{{item.currencySign||""}}</text>
// <text v-if="item.value === 'stopInfo'">{{ stopInfo[item.childrenValue] || '' }}</text>
// <text v-else-if="item.value==='arearAmount'">{{ arearAmount }}</text>
// <text v-else>{{ detail[item.value] || '' }}</text>
if (index === this.voucherFooterOptions.length - 1) {
view.css.width = '75%';
}
......@@ -540,7 +531,7 @@ export default {
color: orangeColor,
'line-height': '26px'
},
text: this.stopInfo.name
text: this.detail.repairShopName
},
{
type: 'text',
......@@ -555,7 +546,7 @@ export default {
'border-bottom': orangeBorderCss,
color: 'rgba(255,255,255,0)'
},
text: this.stopInfo.name
text: this.detail.repairShopName
}
]
}
......
......@@ -74,7 +74,7 @@
<view class="item-view">
<view class="lable-view">服务时间</view>
<view class="right-view">
<DateRangePicker type="date" :clear-icon="false" v-show="showDatePicker" v-model="form.repairTime">
<DateRangePicker type="date" :clear-icon="false" v-model="form.repairTime">
<view class="date-view" hover-class="u-hover-class">
<view class="date-text" v-if="repairTime.dayTime">{{ repairTime.dayTime }}</view>
<view class="placeholder-text" v-else>选择服务日期</view>
......
......@@ -16,7 +16,7 @@
<view class="top-view"></view>
<view class="content-view">
<scroll-view scroll-y="true" style="height:100%">
<view class="scroll-view" v-if="info.type === 'voucher'"><show-voucher ref="show-voucher" :detail="info" :stopInfo="stopInfo" @save="savePoster" @preview="previewPoster"></show-voucher></view>
<view class="scroll-view" v-if="info.type === 'voucher'"><show-voucher ref="show-voucher" :detail="info" @save="savePoster" @preview="previewPoster"></show-voucher></view>
<view class="scroll-view>" v-else>
<view class="info-view part-view">
<view class="title-view">账单信息</view>
......@@ -188,7 +188,6 @@ import { maintain_share_url, wxMiniId, webUrl } from '@/utils/config.js';
import { getSetting } from '@/utils/common.js';
import { checkToken } from '@/utils/common.js';
import { tableOptions } from '@/utils/options/maintain-bill/index.js';
import {getShopInfo} from "@/api/mine/shop.js"
export default {
components: {
......@@ -215,7 +214,6 @@ export default {
previewImageUrl:'',
customerId: '',
canvasType: 'save',
stopInfo:{},
};
},
computed: {
......@@ -393,7 +391,6 @@ export default {
// this.billId = '1554382675614105600'
if (checkToken()) {
this.repairDetail();
this.getShop()
} else {
this.$u.route({
url: 'pages/login/login',
......@@ -454,15 +451,6 @@ export default {
this.loading = false;
});
},
async getShop(){
try{
let res=await getShopInfo()
this.stopInfo=res.data
}catch(e){
//TODO handle the exception
console.log(e)
}
},
updateItem(id, state) {
for (var item of this.lists) {
if (item.id == id) {
......
<template>
<view class="input-view">
<NavbarNormal :title="info.title" titleColor="#191C27" :border-bottom="false" title-bold></NavbarNormal>
<view class="content-view">
<u-input
v-model="value"
:type="info.type"
:height="info.height"
:placeholder="info.placeholder"
:placeholder-style="placeholderStyle"
focus
:border="false"
:custom-style="inputStyle"
:disabled="disabled"
:clearable="false"
@input="handleInput"
/>
<view v-if="!disabled" class="tip-view">{{ tipText }}</view>
<bottom-buttons cancelText='删除' :showCancel="id?true:false" @cancel="handleDelete" @confirm="handleClick"></bottom-buttons>
</view>
<PopNormal title="操作提醒" :visible.sync="visible" @confirm="handleClickConfirm" cancelText="取消" confirmText="确认" :content="info.deleteText" />
</view>
</template>
<script>
import PopNormal from '@/components/pop-normal';
import NavbarNormal from '@/components/navbar-normal';
import BottomButtons from '@/components/common/bottom-buttons.vue';
import { deleteTemplate,deleteClassification } from "@/api/bill/quoted-price.js"
export default {
components: {
PopNormal,
NavbarNormal,
BottomButtons
},
data() {
return {
visible:false,
value: '',
type: '',
deleteType: '',
disabled: false,
deleteStyle: {
marginTop: '24rpx',
'background-color': '#FFFFFF',
height: '104rpx',
'border-radius': '16rpx'
},
id: null,
whiteSpace: false,
inputStyle: {
'border-radius': '8rpx',
'background-color': '#F6F7FA',
padding: '24rpx',
'font-size': '28rpx',
color: '#333333'
}
};
},
computed: {
baseUrl() {
return process.uniEnv.qn_base_url;
},
buttonStyle() {
return {
color: 'transparent',
'background-color': '#02A074',
height: '104rpx',
'border-radius': '16rpx'
};
},
placeholderStyle() {
return 'color: #cccccc;font-size: 28rpx;font-weight: bold;';
},
tipText() {
return `${this.value.length || 0}/${this.info.maxlength}`;
},
info() {
switch (this.type) {
case 'name':
default:
return {
title: '店铺名称',
type: 'textarea',
placeholder: '请输入店铺名称(15个字以内)',
maxlength: 15,
height: 240
};
case 'address':
return {
title: '店铺地址',
type: 'textarea',
placeholder: '请输入店铺地址(30个字以内)',
maxlength: 30,
height: 240
};
case 'phone':
return {
title: '联系电话',
type: 'textarea',
placeholder: '请输入联系电话',
maxlength: 20,
height: 240
};
case 'lister':
return {
title: '制表人',
type: 'textarea',
placeholder: '请输入制表人',
maxlength: 10,
height: 240
};
case 'payments-setting':
return {
title: '类型名称',
type: 'textarea',
placeholder: '请输入类型名称(4个字以内)',
maxlength: 4,
height: 240,
deleteText:'确认删除该类型吗?',
};
case 'user-nickname':
return {
title: '用户昵称',
type: 'textarea',
placeholder: '请输入用户昵称(10个字以内)',
maxlength: 10,
height: 240
};
case 'create-remark':
return {
title: '备注模板',
type: 'textarea',
placeholder: '请输入备注模板(200个字以内)',
maxlength: 100,
height: 240,
deleteText:'确认删除该类型吗?',
};
case 'custom-price':
return {
title: '报价名称',
type: 'textarea',
placeholder: '请输入报价名称(10个字以内)',
maxlength: 10,
height: 240,
};
case 'update-offer-classification':
return {
title: '服务分类',
type: 'textarea',
placeholder: '请输入服务分类(10个字以内)',
maxlength: 10,
height: 240,
deleteText:'确认删除该分类吗?',
deleteFunction:deleteClassification
};
}
}
},
onLoad(options) {
if (options && options.type) {
this.type = options.type;
}
if (options && options.deleteType) {
this.deleteType = options.deleteType;
}
if (options && options.value && options.value != 'null') {
this.value = decodeURIComponent(decodeURIComponent(options.value));
}
if (options && options.disabled) {
this.disabled = options.disabled;
}
if (options && options.id) {
this.id = options.id;
}
if (options && options.whiteSpace) {
this.whiteSpace = options.whiteSpace;
this.inputStyle.whiteSpace='pre-wrap'
}
},
onUnload() {
let notification = `input-sure-${this.type}`;
uni.$off(notification);
},
methods: {
handleInput(event) {
// 直接给input设maxlength输入拼音的时候有影响
if (event.length > this.info.maxlength) {
this.$nextTick(() => {
this.value = event.substring(0, this.info.maxlength);
});
}
},
handleClick() {
if (!this.disabled) {
if (!this.value.trim()) {
this.$u.toast('内容不能为空');
return false;
}
let notification = `input-sure-${this.type}`;
let str = this.value.replace(/[\r\n]/g, '');
uni.$emit(notification, {
content: str
});
}
this.$u.route({
type: 'back'
});
},
handleDelete() {
if (this.id) {
this.visible=true
}
},
async handleClickConfirm(){
if (this.id) {
try{
let res=await this.info.deleteFunction(this.id)
uni.$emit(this.deleteType, {});
this.$u.route({
type: 'back'
});
}catch(e){
console.log(e)
//TODO handle the exception
}
}
}
}
};
</script>
<style scoped lang="scss">
.input-view {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #ffffff;
.content-view {
height: 100%;
overflow: auto;
padding: 24rpx 32rpx;
.tip-view {
margin-top: 20rpx;
color: #333333;
font-size: 28rpx;
text-align: right;
}
}
.bottom-view {
margin: 24rpx 0;
height: 104rpx;
.button-text {
color: #ffffff;
height: 104rpx;
line-height: 104rpx;
font-weight: bold;
font-size: 32rpx;
}
.delete-button {
text-align: center;
color: #fc524d;
}
}
}
</style>
......@@ -131,14 +131,6 @@ export default {
maxlength: 100,
height: 240
};
case 'camp-introduce':
return {
title: '营地介绍',
type: 'textarea',
placeholder: '简单介绍营地给粉丝提供的便利与服务(200个字以内)',
maxlength: 200,
height: 240
};
case 'member-remark':
return {
title: '备注名',
......@@ -147,22 +139,15 @@ export default {
maxlength: 10,
height: 240
};
case 'score':
return {
title: '统计项名称',
type: 'textarea',
placeholder: '请输入统计项名称(10个字以内)',
maxlength: 10,
height: 240
};
case 'season-add':
case 'update-price-template-name':
return {
title: '赛季名称',
title: '报价名称',
type: 'textarea',
placeholder: '请输入赛季名称(10个字以内)',
placeholder: '添加报价名称(10个字以内)',
maxlength: 10,
height: 240
};
}
}
},
......
......@@ -42,7 +42,7 @@
<u-input type="text" v-model="form.name" placeholder="请输入计划标题" :clearable="false" input-align="right" maxlength="100" class="form-input" />
</u-form-item>
<u-form-item label="计划纪要:" prop="content" :border-bottom="false">
<u-input v-model="form.content" type="textarea" :border="true" :height="240" :auto-height="false" :clearable="false" />
<u-input v-model="form.content" type="textarea" :border="true" maxlength='200' :height="240" :auto-height="false" :clearable="false" />
</u-form-item>
<u-form-item prop="attach" :border-bottom="false">
<sound-player ref="sound-player" :path="form.attach" @clear="clearSound" v-if="form.attach"></sound-player>
......
export const version = "1.0.24"
export const version = "1.0.25"
export const baseURL = "/baseapi"
export const token = "TOKEN"
export const PHONENUMBER = "PHONENUMBER"
......
......@@ -58,13 +58,24 @@ export const serviceTypeOptions = [{
export const createCategoryOptions = [{
value: "1",
value: "classificationNumber",
label: "服务分类",
icon: billBaseUrl + "fuwufenleitubiao@3x.png"
},
{
value: "2",
value: "priceNumber",
label: "服务价格",
icon: billBaseUrl + "fuwujiagetubiao@3x.png"
},
]
export const priceTypeOptions = [{
value: "unified",
label: "一口价"
},
{
value: "scope",
label: "范围价"
},
]
\ No newline at end of file
......@@ -89,21 +89,19 @@ export const billCountOptions = [{
]
export const voucherHeadOptions = [{
value: "number",
label: "单号",
},
{
value: "repairTime",
label: "时间",
},
{
value: "customer",
childrenValue:'name',
childrenValue: 'name',
label: "客户",
},
{
value: "repairTime",
label: "时间",
}, {
value: "number",
label: "单号",
}, {
value: "customer",
childrenValue:'phone',
childrenValue: 'phone',
label: "电话",
},
{
......@@ -113,33 +111,30 @@ export const voucherHeadOptions = [{
]
export const voucherFooterOptions = [{
value: "stopInfo",
childrenValue:'lister',
value: "lister",
label: "制表人",
},
{
value: "receivableAmount",
label: "应收金额",
currencySign:'¥',
currencySign: '¥',
},
{
value: "actualAmount",
label: "实收金额",
currencySign:'¥',
currencySign: '¥',
},
{
value: "arearAmount",
label: "欠款",
currencySign:'¥',
currencySign: '¥',
},
{
value: "stopInfo",
childrenValue:'phone',
value: "phone",
label: "电话",
},
{
value: "stopInfo",
childrenValue:'address',
value: "shopAddress",
label: "地址",
},
]
......@@ -147,80 +142,80 @@ export const voucherFooterOptions = [{
export const tableCellOptions = [{
value: "index",
label: "序号",
width:"44rpx",
width: "44rpx",
},
{
value: "name",
label: "商品/服务名称",
width:"154rpx",
width: "154rpx",
},
{
value: "unit",
label: "单位",
width:"60rpx",
width: "60rpx",
},
{
value: "number",
label: "数量",
width:"60rpx",
width: "60rpx",
},
{
value: "unitPrice",
label: "单价",
width:"100rpx",
currencySign:'¥',
width: "100rpx",
currencySign: '¥',
},
{
value: "total",
label: "金额",
width:"100rpx",
currencySign:'¥',
width: "100rpx",
currencySign: '¥',
},
]
export const canvasTableCellOptions = [{
value: "index",
value: "index",
label: "序号",
width:"24px",
width: "24px",
},
{
value: "name",
label: "商品/服务名称",
width:"71px",
width: "71px",
},
{
value: "unit",
label: "单位",
width:"32px",
width: "32px",
},
{
value: "number",
label: "数量",
width:"32px",
width: "32px",
},
{
value: "unitPrice",
label: "单价",
width:"51px",
currencySign:'¥',
width: "51px",
currencySign: '¥',
},
{
value: "total",
label: "金额",
width:"51px",
currencySign:'¥',
width: "51px",
currencySign: '¥',
},
]
export const tableFooterOptions = [{
value: "upperCase",
label: "大写金额:",
width:"70%",
width: "70%",
},
{
value: "lowerCase",
label: "(小写)",
width:"30%",
width: "30%",
},
]
\ No newline at end of file
]
......@@ -173,9 +173,9 @@ function request({
// console.log(res)
store.dispatch("LogOut")
reject(res.data)
// uni.navigateTo({
// url: "/pages/login/login",
// })
uni.navigateTo({
url: "/pages/login/login",
})
} else if (responseWhiteList.findIndex(item => url.indexOf(item) !== -1) !== -
1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment