Commit a02d0b87 by 前端

Merge branch 'saas+v5.8.1' into 'master'

上线合并

See merge request !89
2 parents 87dd4e81 8a94ee4d
......@@ -9,7 +9,7 @@
</view>
<template v-if="componentObject[popupType] && !componentObject[popupType].hideSearch">
<view class="popup-search">
<input class="input" type="text" :placeholder="(componentObject[popupType] && componentObject[popupType].placeholder) || '请输入'" placeholder-class="placeholder" v-model="componentObject[popupType].searchValue" confirm-type="search" @confirm="handleSearch" />
<input class="input" type="text" :placeholder="(componentObject[popupType] && componentObject[popupType].placeholder) || '请输入'" placeholder-class="placeholder" v-model="componentObject[popupType].searchValue" confirm-type="search" @input="onSearchValueInput" @confirm="handleSearch" />
<view class="clear flex" @click="clear">
<uni-icons type="closeempty" size="16" v-if="componentObject[popupType] && componentObject[popupType].searchValue"></uni-icons>
</view>
......@@ -256,6 +256,15 @@ export default {
popupType: 12
}, true)
},
onSearchValueInput (e) {
const filtered = (e.detail.value || '').replace(
/(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|(\ud83e[\udd00-\uddff])|[\u2600-\u26FF]|[\u2700-\u27BF]|[\uFE0F]/gi,
''
)
this.$nextTick(() => {
this.$set(this.componentObject[this.popupType], 'searchValue', filtered)
})
},
clear () {
this.componentObject[this.popupType].searchValue = ''
this.handleSearch()
......
......@@ -2,8 +2,8 @@
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "2.25.1",
"versionCode" : 2251,
"versionName" : "2.25.2",
"versionCode" : 2252,
"transformPx" : false,
"sassImplementationName" : "node-sass",
/* 5+App特有相关 */
......
<template>
<view class="order-management">
<view class="search-box">
<input class="search-input" placeholder-class="placeholder" v-model="keyword" confirm-type="search" @confirm="search" placeholder="输入客户姓名/商品名称/订单编号/手机号搜索" />
<input class="search-input" placeholder-class="placeholder" v-model="keyword" confirm-type="search" @input="onKeywordInput" @confirm="search" placeholder="输入客户姓名/商品名称/订单编号/手机号搜索" />
<view class="clear flex" @click="clear">
<uni-icons type="closeempty" size="16" v-if="keyword"></uni-icons>
</view>
......@@ -237,6 +237,15 @@ export default {
this.clearWaitOrderPolling()
},
methods: {
onKeywordInput(e) {
const filtered = (e.detail.value || '').replace(
/(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|(\ud83e[\udd00-\uddff])|[\u2600-\u26FF]|[\u2700-\u27BF]|[\uFE0F]/gi,
''
)
this.$nextTick(() => {
this.keyword = filtered
})
},
clear() {
this.keyword = ''
this.search()
......
<template>
<view class="form-container formCell">
<view class="form-item flex align-center justify-between" :class="{ 'full-width': field.fullWidth, 'form-item-textarea': field.type === 'textarea' }" v-for="field in formFields" :key="field.key" @click.stop="handleCell(field)">
<view class="from-label" v-if="field.type !== 'pdf'">
<view
class="form-item flex align-center justify-between"
:class="{
'full-width': field.fullWidth,
'form-item-textarea': field.type === 'textarea',
'form-item-switchInput': field.type === 'switchInput'
}"
v-for="field in formFields"
:key="field.key"
@click.stop="handleCell(field)"
>
<view class="from-label" v-if="field.type !== 'pdf' && field.type !== 'switchInput'">
{{ field.label }}
<text class="requiredLabel" v-if="field.required">*</text>
<text class="requiredLabel" v-if="field.required || isSwitchInputRequired(field)">*</text>
</view>
<template v-if="field.type === 'input'" class="flex align-center">
<template v-if="field.type === 'input'">
<input class="formInput" :class="{ formInputDisabled: field.disabled, autolabel: field.placeholder == '自动计算' }" :min="field.min" :max="field.max" v-if="field.targetObj" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" :maxlength="field.maxlength || 100" v-model="formData[field.targetObj][field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input class="formInput" :class="{ formInputDisabled: field.disabled, autolabel: field.placeholder == '自动计算' }" :min="field.min" :max="field.max" v-else type="text" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input class="formInput" :class="{ formInputDisabled: field.disabled, autolabel: field.placeholder == '自动计算' }" :min="field.min" :max="field.max" v-else :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<view v-if="field.isScan" class="flex align-center scanBtn justify-center" @click.stop="scan('vinOcr')">
<view class="sprite-icon icon-scanIconX"></view>
</view>
......@@ -55,7 +65,7 @@
</template>
<template v-if="field.type === 'radio'">
<radio-group class="radio-group flex align-center" @change="e => radioChange(e, field)">
<label class="uni-list-cell uni-list-cell-pd align-center flex ml-48" v-for="(item, index) in field.radioList" :key="item.value">
<label class="uni-list-cell uni-list-cell-pd align-center flex ml-48" v-for="item in field.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="getRadioChecked(item.value, field)" />
<view class="radio-name">{{ item.name }}</view>
</label>
......@@ -74,6 +84,25 @@
</view>
</picker>
</template>
<view v-if="field.type === 'switchInput'" class="switch-input" @click.stop="">
<view class="switch-input__header flex align-center justify-between">
<view class="from-label">
{{ field.label }}
<text class="requiredLabel" v-if="field.required || isSwitchInputRequired(field)">*</text>
</view>
<switch :checked="Number(formData[field.switchKey]) === 1" color="#4673FF" @change="e => handleSwitchChange(e, field)" />
</view>
<view v-if="Number(formData[field.switchKey]) === 1" class="switch-input__body">
<input
class="switch-input__input"
type="text"
:placeholder="field.placeholder || '请输入'"
v-model="formData[field.remarkKey]"
:maxlength="field.maxlength || 100"
@blur="e => handleBlur(e, { ...field, targetKey: field.remarkKey })"
/>
</view>
</view>
<template v-if="field.type === 'textarea'">
<textarea v-if="field.targetObj" :placeholder="'请输入 (' + (field.maxlength || 100) + '字以内)'" v-model="formData[field.targetObj][field.targetKey]" :maxlength="field.maxlength || 100" />
<textarea v-else :placeholder="'请输入 (' + (field.maxlength || 100) + '字以内)'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" />
......@@ -135,7 +164,21 @@ export default {
},
computed: {},
methods: {
isSwitchInputRequired(field) {
return field.type === 'switchInput' && Number(this.formData[field.switchKey]) === 1
},
handleSwitchChange(e, field) {
const switchValue = e.detail.value ? 1 : 0
this.$set(this.formData, field.switchKey, switchValue)
if (switchValue === 0 && field.clearRemarkOnSwitchOff !== false) {
this.$set(this.formData, field.remarkKey, '')
}
this.$emit('switchChange', switchValue, field)
},
handleCell(field) {
if (field.type === 'switchInput') {
return
}
this.$emit('handleCell', field)
},
radioChange(e, field) {
......@@ -431,5 +474,48 @@ export default {
.scanBtn {
margin-left: toRpx(16);
}
.switch-input {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
gap: toRpx(16);
}
.switch-input__header {
width: 100%;
}
.switch-input__body {
border-radius: toRpx(16);
border: toRpx(2) solid #eff0f2;
background: #f4f5f7;
padding: toRpx(18) toRpx(24);
box-sizing: border-box;
}
.switch-input__input {
width: 100%;
height: toRpx(44);
font-size: toRpx(28);
color: #333333;
padding: 0;
text-align: left;
outline: none;
border: 0;
background: transparent;
}
switch {
transform: scale(0.85);
}
.form-item-switchInput {
flex-direction: column;
align-items: stretch;
justify-content: flex-start;
gap: toRpx(16);
}
}
</style>
......@@ -238,7 +238,7 @@
<view class="tab-panel-title">收款人信息</view>
<view class="gridBoxNoPadding">
<template v-for="(item, index) in payeeItems">
<view v-if="formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
<view v-if="item.alwaysShow || formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
<view class="title-label-see mr-16">{{ item.label }}</view>
<view v-if="item.type == 'image'">
<image :src="getImageDisplayUrl(formatValue(item, detailsInfo))" @click.stop="previewMedia(formatValue(item, detailsInfo), 1)"></image>
......@@ -631,7 +631,8 @@ export default {
payeeItems: [
{ label: '收款人姓名', key: 'signingInfo.saleContract.payeeName' },
{ label: '银行卡账号', key: 'signingInfo.saleContract.bankCardNumber' },
{ label: '开户行', key: 'signingInfo.saleContract.bankOfDeposit', fullWidth: true },
{ label: '开户行', key: 'signingInfo.saleContract.bankOfDeposit' },
{ label: '回单摘要', key: 'signingInfo.saleContract.returnSummaryRemark', alwaysShow: true },
{ label: '身份证国徽面', key: 'signingInfo.saleContract.payerIdCardFrontUrl', type: 'image' },
{ label: '身份证人像面', key: 'signingInfo.saleContract.payerIdCardBackUrl', type: 'image' },
{ label: '银行卡', key: 'signingInfo.saleContract.payerBankCardUrl', type: 'image' }
......
......@@ -130,6 +130,10 @@
<text class="popup-cell-title">开户行</text>
<text class="popup-cell-value">{{ payPopupObj.bankOfDeposit }}</text>
</view>
<view class="flex align-center mb-16">
<text class="popup-cell-title">回单摘要</text>
<text class="popup-cell-value">{{ payPopupObj.returnSummaryRemark }}</text>
</view>
<view class="flex align-center">
<text class="popup-cell-title">付款方式</text>
<radio-group class="radio-group flex align-center" @change="e => radioChange(e)">
......@@ -205,7 +209,8 @@ export default {
evalPrice: '',
paymentType: '',
status: '',
paymentMethod: 1
paymentMethod: 1,
returnSummaryRemark: '',
},
signAgreementObj: {
evalOrderNo: '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!