Commit b04f3bc0 by cen

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents ad2b8ca0 2f9c8944
......@@ -34,6 +34,9 @@
<template v-if="i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)">
<text>「{{ i.goods.positionStr }}」</text>
</template>
<template v-if="!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)">
<text class="no-postion">无部位</text>
</template>
<text class="price">¥{{ i.goods.price }}</text>
</view>
</template>
......@@ -76,17 +79,31 @@ export default {
if (data && data.length) this.updateParams(params, data)
},
handleSearch (searchValue) {
let { isDefeatOrder } = this
if (!searchValue) this.searchStatus = false
else {
let { list } = this,
goodsList = JSON.parse(JSON.stringify(list)),
arr = []
goodsList.map(c => {
goodsList.map(i => {
let name = ''
if (c.goodsFlag == 1 && c.goods) name = c.goods.goodsAlias || c.goods.upgradeGoodsName || c.goods.goodsName || ''
if (isDefeatOrder) {
let upgradeGoodsList = [];
i.upgradeGoodsList.map((c) => {
let name = c.upgradeGoodsAlias || c.upgradeGoodsName || c.goodsInfo.goodsName;
if (name.indexOf(searchValue) != -1) upgradeGoodsList.push(c)
})
if (i.goodsTypeName.indexOf(searchValue) != -1 || upgradeGoodsList.length > 0) {
i.upgradeGoodsList = upgradeGoodsList.length > 0 ? upgradeGoodsList : i.upgradeGoodsList
arr.push(i)
}
} else {
if (i.goodsFlag == 1 && i.goods) name = i.goods.goodsAlias || i.goods.upgradeGoodsName || i.goods.goodsName || ''
if (name.indexOf(searchValue) != -1) {
arr.push(c)
arr.push(i)
}
}
})
this.searchList = arr
this.searchStatus = true
......@@ -197,6 +214,11 @@ export default {
font-size: 32rpx;
box-sizing: border-box;
padding: 0 32rpx;
.no-postion {
color: #f24724;
margin-left: 10rpx;
font-size: 22rpx;
}
.sprite-icon {
display: none;
position: absolute;
......
......@@ -58,7 +58,6 @@
@choose="chooseContent = $event"
@openSkuPopup="openSkuPopup"
@onComplete="componentObject[popupType].loadComplete = true"
@updateCacheData="updateCacheData"
></component>
<template v-if="componentObject[popupType].noData">
<view class="nothing flex">暂无数据</view>
......@@ -190,7 +189,6 @@ export default {
this.initPopupData()
},
cancel () {
console.log()
this.$refs.popup.close()
this.$emit('cancel')
},
......
......@@ -79,11 +79,12 @@ export default {
// if (wx.__HAS_NOTLOGIN_MODAL) return false; //
this.addModalToQueue('日报提醒', '您有未填写的日报,请点击前往。', '前往填写', false, 2, res => {
if (res.confirm) {
console.log(formattedDate)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport')
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport',formattedDate)
else uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport`
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
})
......
......@@ -73,15 +73,16 @@
备注
</view>
<view class="value">
<input
class="input"
type="text"
<textarea
class="textarea"
v-model="orderObj.remark"
placeholder-class="placeholder"
placeholder="请输入 (500字以内)"
placeholder-class="placeholder"
confirm-type="done"
auto-height
:maxlength="500"
:disabled="filterDisabled(isEditReport)"
>
></textarea>
</view>
</view>
</view>
......@@ -636,7 +637,7 @@ export default {
}
.form-item {
height: 96rpx;
min-height: 96rpx;
border-bottom: 2rpx solid #f7f7f6;
padding-right: 32rpx;
font-size: 28rpx;
......@@ -675,7 +676,9 @@ export default {
font-size: 28rpx;
}
.textarea {
width: 100%;
width:calc(100% - 24rpx);
margin-left: 24rpx;
text-align: right;
}
}
}
......
<template>
<view class="detail-box">
<view class="nav-bar">
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
<view
class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
<view class="title">展业工具</view>
</view>
......@@ -10,20 +17,46 @@
<view class="detail-left">
<view class="common-title">展业</view>
<view class="content">
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" />
<uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
</template>
</view>
</view>
<view class="detail-right">
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
<component
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
</view>
</view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
<NoticePopup
ref="notice"
title="重要提示"
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
</view>
</template>
......@@ -53,7 +86,7 @@ export default {
UploadProofOfPayment,
OrderDetail
},
data() {
data () {
return {
toolComponentName: '',
transmissionOfData: null,
......@@ -63,14 +96,16 @@ export default {
selectedDays: []
}
},
onLoad(options) {
onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName
uni.$on('jumpToDailyReport', _ => {
if (options.currentDate) this.currentDate = options.currentDate
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.currentDate = currentDate
})
},
methods: {
async entranceClick(item) {
async entranceClick (item) {
console.log(item)
if (item.name != 'DailyReport' && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 保存当前选择的组件信息,但不立即切换
......@@ -110,11 +145,11 @@ export default {
// 打开弹窗
this.$refs.notice.open()
},
backPage() {
backPage () {
uni.navigateBack()
},
// name:跳转组件名,val:跳转参数
jump(name, val) {
jump (name, val) {
this.toolComponentName = name
console.log(this.toolComponentName, val)
if (val) {
......
......@@ -40,18 +40,23 @@
<picker
mode="date"
:value="date"
:end="endDate"
fields="month"
@change="bindDateChange"
>
<text class="uni-calendar__header-text">{{ (nowDate.year||'') +' / '+( nowDate.month||'')}}</text>
</picker>
<view
class="uni-calendar__header-btn-box"
:class="['uni-calendar__header-btn-box next-btn',{'show-next-btn':showNextBtn}]"
@click.stop="next"
>
<view class="uni-calendar__header-btn uni-calendar--right"></view>
</view>
<!-- <text class="uni-calendar__backtoday" @click="backToday">{{todayText}}</text> -->
<text
class="uni-calendar__backtoday"
@click="backToday"
v-if="!hideTodayBtn"
>{{todayText}}</text>
</view>
<view class="uni-calendar__box">
......@@ -189,9 +194,13 @@ export default {
type: String,
default: '#fff'
},
title:{
title: {
type: String,
default: '选择日期'
},
hideTodayBtn: {
type: Boolean,
default: true
}
},
data () {
......@@ -238,10 +247,14 @@ export default {
SUNText () {
return t("uni-calender.SUN")
},
showNextBtn () {
let { cale, endDate, nowDate} = this,
maxDate = cale.getDate(endDate, -1, 'month')
return cale.dateCompare(`${nowDate.year}/${nowDate.month}`, `${maxDate.year}/${maxDate.month}`)
}
},
watch: {
date (newVal) {
// this.cale.setDate(newVal)
this.init(newVal)
},
startDate (val) {
......@@ -257,6 +270,17 @@ export default {
selected (newVal) {
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
this.weeks = this.cale.weeks
},
nowDate: {
handler (val) {
if (val) {
let { cale, endDate } = this,
maxDate = cale.getDate(endDate, -1, 'month')
cale.dateCompare(`${val.year}/${val.month}`, `${maxDate.year}/${maxDate.month}`)
}
},
deep: true,
immediate: true
}
},
created () {
......@@ -427,6 +451,8 @@ export default {
* 下个月
*/
next () {
let {showNextBtn} = this
if(!showNextBtn) return
const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
this.setDate(nextDate)
this.monthSwitch()
......@@ -567,7 +593,12 @@ $uni-text-color-grey: #999;
width: 50px;
height: 50px;
}
.next-btn{
opacity: 0;
}
.show-next-btn{
opacity: 1;
}
.uni-calendar__header-btn {
width: 10px;
height: 10px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!