Commit 7e5b6cb3 by 李伟康

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

2 parents c47b156c 9e28ebee
...@@ -179,5 +179,53 @@ module.exports = { ...@@ -179,5 +179,53 @@ module.exports = {
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
},
// 根据商户号获取可选商品列表
getSelectOrderGoodsList(data){
return http.post({
method: 'dj.api.smartcarlife.selectOrderGoods.list',
projectName: 'boutique',
...data
})
},
/** 选择支付方式下单 */
createWithPay(data) {
console.log(data)
return http.post({
method: 'dj.api.smartcarlife.order.createWithPay',
projectName: 'boutique',
...data
})
},
/** 订单补录 */
supplementOrder(data) {
return http.post({
method: 'dj.api.smartcarlife.order.supplementOrder',
projectName: 'boutique',
...data
})
},
// 获取精品升级场景 太阳膜类商品部位数据
getPositionList(data) {
return http.post({
method: 'dj.api.smartcarlife.goodsPosition.list',
projectName: 'boutique',
...data
})
},
/** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return http.post({ method: 'dj.api.smartcarlife.staff.daily.report.popup.need', projectName: 'boutique', ...data })
},
/** 校验手机号是否配置打卡和是否打卡 */
clockInConfigPhone(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return http.post({ method: 'dj.api.smartcarlife.clock.in.config.phone', projectName: 'boutique', ...data })
},
/** 获取商户基本信息 */
getServiceBaseInfo(data) {
return http.post({ method: 'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo', projectName: 'boutique', ...data })
} }
} }
...@@ -55,6 +55,12 @@ ...@@ -55,6 +55,12 @@
-webkit-justify-content: center; -webkit-justify-content: center;
justify-content: center; justify-content: center;
} }
.justify-end {
-webkit-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.flex-wrap { .flex-wrap {
-ms-flex-wrap: wrap; -ms-flex-wrap: wrap;
......

2.54 MB | W: | H:

2.54 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<view> <view>
<view v-for="(items, boxIdx) in formList" :key="boxIdx"> <view v-for="(items, boxIdx) in formList" :key="boxIdx">
<view class="cell-box"> <view class="cell-box">
<view v-for="(item, idx) in items" :key="idx" class="cell-row"> <template v-for="(item, idx) in items">
<view v-if="!item.hidden">
<view class="cell-row" :key="idx">
<view class="cell" @click="onCellClick(item)" :class="[ <view class="cell" @click="onCellClick(item)" :class="[
item.noBorder ? '' : 'border', item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '', item.onlyLabel ? 'small-height' : '',
item.class item.class
]"> ]">
<template v-if="!item.hidden">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]"> <view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view> <view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }} {{ item.label }}
...@@ -18,8 +19,10 @@ ...@@ -18,8 +19,10 @@
<!-- 输入框 --> <!-- 输入框 -->
<template v-if="item.type === 'input'"> <template v-if="item.type === 'input'">
<view class="input-box"> <view class="input-box">
<input class="input-value" v-model="formData[item.value]" :type="item.inputType || 'text'" @blur="handleBlur($event, item)" :placeholder="item.placeholder || '请输入'" <input class="input-value" v-model="formData[item.value]" :type="item.inputType || 'text'"
:maxlength="item.maxlength || 500" /> @blur="handleBlur($event, item)" :placeholder="item.placeholder || '请输入'"
:maxlength="item.inputType === 'number' ? false : (item.maxlength || -1)"
@input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]" <view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"></view> @click="onValueClick(item)"></view>
</view> </view>
...@@ -27,7 +30,7 @@ ...@@ -27,7 +30,7 @@
<!-- 下拉选择 --> <!-- 下拉选择 -->
<template v-else-if="item.type === 'select'"> <template v-else-if="item.type === 'select'">
<view class="value"> <view class="value">
<template v-if="formData[item.value] && formData[item.value]"> <template v-if="!item.addHtml && formData[item.value] && formData[item.value]">
<template v-if="item.showText && userInfo && userInfo[item.showText]"> <template v-if="item.showText && userInfo && userInfo[item.showText]">
{{ userInfo[item.showText] }}<text>|</text> {{ userInfo[item.showText] }}<text>|</text>
</template> </template>
...@@ -44,7 +47,8 @@ ...@@ -44,7 +47,8 @@
<radio-group class="radio-group value" @change="onRadioChange($event, item)"> <radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList" <label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value"> :key="radio.value + item.value">
<radio style="transform:scale(0.7)" :value="radio.value" :checked="radio.value == item.current" /> <radio style="transform:scale(0.7)" :value="radio.value" :disabled="radio.disabled"
:checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view> <view class="radio-name">{{ radio.name }}</view>
</label> </label>
</radio-group> </radio-group>
...@@ -56,11 +60,12 @@ ...@@ -56,11 +60,12 @@
:maxlength="item.maxlength"></textarea> :maxlength="item.maxlength"></textarea>
</template> </template>
</view> </view>
</template>
</view> </view>
<slot v-if="item.addHtml" :name="item.addHtml"></slot> <slot v-if="item.addHtml" :name="item.addHtml"></slot>
</view> </view>
</view> </view>
</template>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -124,9 +129,11 @@ export default { ...@@ -124,9 +129,11 @@ export default {
overflow: hidden; overflow: hidden;
margin-bottom: toRpx(18); margin-bottom: toRpx(18);
} }
.cell-row { .cell-row {
padding-left: toRpx(32); padding-left: toRpx(32);
} }
.cell { .cell {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -92,8 +92,11 @@ ...@@ -92,8 +92,11 @@
</template> </template>
<script> <script>
import order_mixins from '../order_mixins.js' import order_mixins from '../order_mixins.js'
import { interceptionMixin } from '@/mixin/index'
import utils from '@/utils/utils' import utils from '@/utils/utils'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
export default { export default {
mixins: [interceptionMixin],
name: 'OrderCard', name: 'OrderCard',
props: { props: {
orderCardDetail: { orderCardDetail: {
...@@ -105,6 +108,8 @@ export default { ...@@ -105,6 +108,8 @@ export default {
return { return {
...order_mixins.data, ...order_mixins.data,
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/', IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/',
isSettingExpiredTraffic: false, // 是否启用流量失效
selectType: 1,
pointsMultiObj: [ pointsMultiObj: [
{ {
label: '销售顾问 /录单员', label: '销售顾问 /录单员',
...@@ -155,7 +160,7 @@ export default { ...@@ -155,7 +160,7 @@ export default {
flag: !this.orderCardDetail.showAllGoodsListFlag flag: !this.orderCardDetail.showAllGoodsListFlag
}) })
}, },
jump(name, item) { async jump(name, item) {
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效 // 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效
// constructionFlag 施工标识(Y:已施工;N||null:未施工) // constructionFlag 施工标识(Y:已施工;N||null:未施工)
// failureFlag 订单失效状态(Y:已失效,N:未失效) // failureFlag 订单失效状态(Y:已失效,N:未失效)
...@@ -171,15 +176,24 @@ export default { ...@@ -171,15 +176,24 @@ export default {
userInfo.merchantType = error userInfo.merchantType = error
} }
} }
let { userType, isSuper, merchantType } = userInfo userInfo.isMake = !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7)
let { userType, isSuper, merchantType, isMake } = userInfo
console.log(item) console.log(item)
if (name == 'createOrder') { if (name == 'createOrder' || name == 'premiumUpgrade') {
if (merchantType && !isSuper) { if (merchantType && !isSuper && isMake) {
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport()
if (staffCheck) return false
if (name == 'createOrder' && (await this.inspectionOfProhibitionBill())) return /**禁止提单 */
// 是微信支付直接跳转确认页面 // 是微信支付直接跳转确认页面
if (userType == 2 && item?.selectPayType == 1) { if (userType == 2 && item?.selectPayType == 1) {
wx.$router.go('confirmOrder', item) wx.$router.go('tabWorkOrder.confirmOrder', item)
} else if (userType == 2) { } else if (userType == 2) {
wx.$router.go(name, item) item
? this.showSelectType({
item
})
: wx.$router.go('tabWorkOrder.' + name, item)
} else { } else {
utils.showNoAccess() utils.showNoAccess()
} }
...@@ -188,10 +202,51 @@ export default { ...@@ -188,10 +202,51 @@ export default {
} }
// 已支付加已施工 // 已支付加已施工
} else if (item.constructionFlag == 'Y' && item.status != 10) { } else if (item.constructionFlag == 'Y' && item.status != 10) {
wx.$router.go('constructionOrderDetail', item) wx.$router.go('tabWorkOrder.constructionOrderDetail', item)
} else { } else {
// console.log(item) wx.$router.go('tabWorkOrder.' + name, item)
wx.$router.go(name, item) }
},
// 确定是否要显示
showSelectType({ scene = '', item = {} }, scan = false) {
this.isScan = scan
// 当切换门店后,不支持录入失效客户工单,将selectType置为1录入工单
if ((!this.isSettingExpiredTraffic || scan) && this.selectType == 3) {
this.selectType = 1
}
uni.showModal({
show: true,
title: '请选择录单入口',
tabTitleShow: false,
success: async res => {
// 跳转新增订单页面 并带特定参数
console.log(item, 'showSelectType')
if (this.selectType == 1) {
if (await this.inspectionOfProhibitionBill()) return
wx.$router.go('tabWorkOrder.createOrder', {
scene,
...item
})
} else {
wx.$router.go('tabWorkOrder.defeatOrder', {
scene,
...item,
isExpiredTraffic: this.selectType == 3
})
}
},
error: () => {}
})
},
// 获取轻改录单配置是否启用流量失效
getCreateOrderSetting() {
let userInfo = uni.$storage.get('userInfo')
let merchantType = userInfo?.merchantAccountList.includes('6') || userInfo?.merchantAccountList.includes('8')
if (merchantType && !userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.userType == 2 && userInfo?.shopMerchantId) {
uni.$api.boutiqueApi.getServiceBaseInfo({ merchantId: userInfo?.shopMerchantId }).then(res => {
this.isSettingExpiredTraffic = res?.data?.trafficExpireFlag == 'Y'
})
} }
} }
} }
......
<template>
<view class="order-confirm">
<view class="common-title">工单确认</view>
<view class="px-48 scroll-y">
<view class="top-tips flex align-center">
<text class="fs-16 fw-7">等待客户付款</text>
<text class="fs-13 ml-12">点击下一步,锁定并生成工单码。</text>
</view>
<!-- 商品信息 -->
<view class="box-shell">
<view class="box-shell-title">商品信息</view>
<view class="good-list">
<view class="good">
<view class="flex justify-between align-center">
<text class="good-name">商品名称:</text>
<text class="good-price">¥1000</text>
</view>
<view class="flex justify-between align-center pt-6">
<text class="good-alias">商品别名:</text>
</view>
<view class="flex align-center pt-12">
<text class="good-sku">天窗玻璃</text>
<text class="good-count">x2</text>
</view>
</view>
</view>
<view class="flex align-center py-8">
<view class="sprite-icon icon-coupon fs-14"></view>
<text class="fs-14 coupon-name">贴膜抵用券GH647-039(系统)</text>
</view>
<view class="flex justify-end align-center">
<text class="good-total-lable">商品总金额:</text>
<text class="good-total-value">
<text class="unit">¥</text>
{{ toPrice(218.98887, 2) }}
</text>
</view>
</view>
<!-- 工单信息 -->
<view class="box-shell">
<view class="box-shell-title">工单信息</view>
<view class="order-info pt-16">
<view v-for="(item, index) in orderObj" :key="index" class="flex align-center pt-8">
<view class="label">{{ item.label }}</view>
<view v-if="item.key == 'status'">
<view class="value" :style="{ color: item.constructionFlag == 'Y' ? status[orderInfo.status].color : '' }">
<!-- {{ item.constructionFlag == 'Y'? status[orderInfo.status].text: '待施工'}} -->
<!-- {{ status[orderInfo.status].text }} -->
</view>
</view>
<view v-else>
<view class="value">
<view v-if="item.key == 'payType'">
{{ payType[orderInfo.selectPayType] || '' }}
</view>
<view v-else>{{ orderInfo[item.key] || '' }}</view>
</view>
</view>
<view v-if="item.copy">
<view class="copy" @click="setCopyData">
<!-- 复制 -->
</view>
</view>
</view>
<view v-if="(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length">
<view class="flex align-center pt-8">
<view class="label">付款凭证</view>
<view class="image-box">
<view class="value" @click="previewImage" v-for="(item, index) in orderInfo.payVoucherList" :key="index">
<view class="image">
<!-- <image src="{{item.payVoucher}}" /> -->
</view>
</view>
</view>
</view>
</view>
<view v-if="orderInfo.status == 5 || orderInfo.status == 12">
<view class="flex align-center pt-8">
<view class="label">退款明细</view>
<view class="value">{{ orderInfo.refundType == 1 ? '退全款' : '退部分款' }}¥{{ orderInfo.refundAmount }}</view>
</view>
</view>
<view class="paid" v-if="orderInfo.payOrder && orderInfo.payOrder.payStatus == 2">
<!-- <image src="../../images/paid.png" /> -->
</view>
</view>
</view>
<!-- 客户信息 -->
<view class="box-shell">
<view class="box-shell-title">客户信息</view>
<view class="order-info pt-16">
<view class="flex align-center pt-8" v-for="(item, index) in customerObj" :key="index">
<view class="label">{{ item.label }}</view>
<view class="value" :style="{ color: item.color || '#333' }">
<view v-if="item.arr">
<view v-if="orderInfo[item.arr[1]]">
<view v-for="(i, ind) in item.arr" :key="ind">
<view class="value-item text-hide">
<text v-if="ind == 1">|</text>
{{ orderInfo[i] }}
</view>
</view>
</view>
</view>
<view v-else>
{{ item.enum ? item.enum[orderInfo[item.key]] : orderInfo[item.key] || '' }}
</view>
<view v-if="item.copy">
<view class="copy" @click="setCopyData">
<!-- 复制 -->
<!-- <image src="{{IMG_URL}}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image> -->
</view>
</view>
</view>
</view>
</view>
<view v-if="orderInfo.selectPayType == 0">
<view class="flex align-center pt-8">
<view class="label">拒升理由</view>
<view class="value">
{{ orderInfo.customer.refusalReason ? orderInfo.customer.refusalReason : '' }}
</view>
</view>
</view>
</view>
<view class="flex align-center footer-box justify-center">
<view class="edit btn">修改</view>
<view class="confirm btn">确认</view>
</view>
</view>
</view>
</template>
<script>
import utils from '@/utils/utils'
import order_mixins from '../../order_mixins.js'
export default {
name: 'OrderConfirm',
props: {
orderInfo: {
type: Object,
default: () => ({})
}
},
data() {
return {
...order_mixins.data
}
},
methods: {
toPrice(val, num) {
return Number(utils.decimal(val, num)).toFixed(2)
}
}
}
</script>
<style scoped lang="scss">
.order-confirm {
position: relative;
height: 100%;
.scroll-y {
height: calc(100% - #{toRpx(296)});
overflow-y: scroll;
&::-webkit-scrollbar {
width: 0;
height: 0;
background: transparent;
}
}
.px-48 {
padding: 0 toRpx(48);
}
.pt-6 {
padding-top: toRpx(6);
}
.pt-8 {
padding-top: toRpx(8);
}
.pt-16 {
padding-top: toRpx(16);
}
.pt-12 {
padding-top: toRpx(12);
}
.fs-14 {
font-size: toRpx(14);
}
.fs-16 {
font-size: toRpx(16);
}
.fw-7 {
font-weight: 700;
}
.fs-13 {
font-size: toRpx(13);
}
.ml-12 {
margin-left: toRpx(12);
}
.py-8 {
padding: toRpx(8) 0;
}
.top-tips {
width: 100%;
height: toRpx(48);
border-radius: toRpx(8);
background: linear-gradient(-90deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 toRpx(20) 0 #ffffff99;
color: #fff;
padding: 0 toRpx(16);
}
.box-shell {
width: 100%;
border-radius: toRpx(16);
background: #ffffff;
padding: toRpx(24) toRpx(32);
margin-top: toRpx(16);
&-title {
font-size: toRpx(28);
color: #333333;
font-weight: 400;
}
.good-list {
margin-top: toRpx(16);
.good {
color: #333333;
font-size: toRpx(28);
border-radius: toRpx(24);
background: #f5f7fa;
padding: toRpx(24);
.good-name {
font-weight: 400;
flex: 4;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.good-price {
font-weight: 500;
flex: 1;
text-align: right;
}
.good-alias {
font-size: toRpx(24);
font-weight: 400;
}
.good-sku {
color: #999999;
font-size: toRpx(24);
font-weight: 400;
}
.good-count {
color: #999999;
font-size: toRpx(24);
font-weight: 400;
}
}
}
.coupon-name {
color: #292d33;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(8);
}
.good-total-lable {
color: #757980;
font-size: toRpx(28);
font-weight: 400;
}
.good-total-value {
color: #4673ff;
font-size: toRpx(40);
font-weight: 700;
}
.order-info {
.label {
width: toRpx(156);
color: #999999;
font-size: toRpx(26);
font-weight: 400;
}
.value {
color: #222222;
font-size: toRpx(26);
font-weight: 400;
}
}
}
.footer-box {
position: absolute;
bottom: toRpx(24);
width: 100%;
left: 0;
.btn {
width: 42%;
height: toRpx(80);
border-radius: toRpx(48);
font-size: toRpx(28);
font-weight: 500;
line-height: toRpx(80);
text-align: center;
}
.confirm {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
margin-left: toRpx(32);
}
.edit {
background: #3b73ff1a;
color: #4673ff;
}
}
}
</style>
<template>
<view>
<view class="package-list">
<view class="package-item">
<view class="header">
<view class="header-left">
<view class="sprite-icon icon-blue-delete"></view>
<view class="name">平步青云套餐</view>
</view>
<view class="price">¥6660.00</view>
</view>
<view class="goods-item">
<view class="goods-name">AITO汽车专享 M5中控屏钢化保护膜</view>
<view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input" type="digit" placeholder="请输入价格" placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
<view class="goods-item">
<view class="goods-name">AITO汽车专享 M5中控屏钢化保护膜</view>
<view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input" type="digit" placeholder="请输入价格" placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'Package'
}
</script>
<style scoped lang="scss">
.front-gear-box {
display: flex;
justify-content: space-between;
margin-top: toRpx(24);
.front-gear-input-box {
display: flex;
align-items: center;
.front-gear-label {
font-size: toRpx(24);
margin-right: toRpx(24);
color: #999999;
}
.front-gear-input {
position: relative;
display: flex;
border: toRpx(2) solid #eff0f2;
background-color: #fff;
font-size: toRpx(28);
height: toRpx(70);
width: toRpx(250);
line-height: toRpx(70);
text-align: right;
.uni-input {
padding: 0 toRpx(32);
height: 100%;
}
.unit {
position: absolute;
top: 50%;
left: toRpx(32);
transform: translateY(-50%);
}
}
}
.control {
display: flex;
align-items: center;
.control-input {
width: toRpx(94);
height: toRpx(74);
background-color: #fff;
border: toRpx(2) solid #eff0f2;
padding: 0 toRpx(10);
text-align: center;
}
.minus,
.add {
width: toRpx(80);
height: toRpx(74);
line-height: toRpx(70);
text-align: center;
background-color: #fff;
border-top: toRpx(2) solid #eff0f2;
border-bottom: toRpx(2) solid #eff0f2;
}
.minus {
border-radius: toRpx(12) 0 0 toRpx(12);
border-left: toRpx(2) solid #eff0f2;
}
.add {
border-radius: 0 toRpx(12) toRpx(12) 0;
border-right: toRpx(2) solid #eff0f2;
}
}
}
.package-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.package-item {
background-color: #f5f7fa;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: toRpx(1.6) solid #dce1e6;
padding: toRpx(24);
&-left {
display: flex;
align-items: center;
font-size: toRpx(28);
.name {
margin-left: toRpx(26);
color: #999;
}
.price {
color: #666;
}
}
}
.goods-item {
padding: toRpx(24);
border-bottom: toRpx(1.6) solid #dce1e6;
&:last-child {
border-bottom: none;
}
.goods-name {
color: #ff781f;
font-size: toRpx(28);
}
.alias-name {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view>
<view class="shop-list">
<view class="shop-item" v-for="(item, index) in list" :key="item.goods.goodsId">
<view class="sprite-icon icon-blue-delete"></view>
<view class="right">
<view class="shop-name">商品名称:{{ item.goods.goodsAlias || item.goods.upgradeGoodsName ||
item.goods.goodsInfo.goodsName }}</view>
<!-- <view class="alias">商品别名:{{ item.goods.goodsAlias }}</view> -->
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label"
v-if="(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition) && (item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1 || item.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.goods.upgradeGoodsType == baseConfigData.selfBuildFilmType)">
{{ formatPosition((item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition),
positionTypeList)}}</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input" type="digit" placeholder="请输入价格" placeholder-style="font-size: 14px" v-model="item.goods.sellPrice" @input="validatePrice($event, item, index)" />
</view>
</view>
<view class="control">
<view class="minus" @click="decreaseNumber(item)">-</view>
<input class="uni-input control-input" type="number" v-model="item.goods.number" @input="validateNumber($event, item)" />
<view class="add" @click="increaseNumber(item)">+</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'Product',
props: {
list: {
type: Array,
default: []
},
positionTypeList: {
type: Array,
default: []
},
baseConfigData: {
type: Object,
default: {}
}
},
created() {
// 初始化商品数量
this.list.forEach(item => {
if (!item.goods.number) {
this.$set(item.goods, 'number', '1')
}
})
},
methods: {
// 格式化位置信息
formatPosition(item, positionTypeList) {
const filterData = positionTypeList.filter(v => v.positionValue == item)
return (filterData.length && filterData[0] && filterData[0].positionName) || ''
},
// 验证价格输入
validatePrice(event, item) {
let value = event.detail.value
// 限制只能输入数字和小数点
value = value.replace(/[^\d.]/g, '')
// 限制只能有一个小数点
if (value.split('.').length > 2) {
value = value.slice(0, value.lastIndexOf('.')) + value.slice(value.lastIndexOf('.') + 1)
}
// 限制最多两位小数
if (value.includes('.')) {
const parts = value.split('.')
if (parts[1].length > 2) {
parts[1] = parts[1].substring(0, 2)
value = parts.join('.')
}
}
// 限制最大值为100000
if (parseFloat(value) > 100000) {
value = '100000'
}
// 限制最小值为0
if (parseFloat(value) < 0) {
value = '0'
}
if (item.goods.validMinSellPrice === 'Y' && item.goods.minSellPrice && parseFloat(value) < parseFloat(item.goods.minSellPrice)) {
console.log('最小值', item.goods.minSellPrice)
value = item.goods.minSellPrice.toString()
}
// 更新值
this.$set(item.goods, 'sellPrice', value)
},
// 验证数量输入
validateNumber(event, item) {
let value = event.detail.value
// 限制只能输入整数
value = value.replace(/[^\d]/g, '')
// 如果为空或0,设置为1
if (!value || parseInt(value) === 0) {
value = '1'
}
// 更新值
this.$set(item.goods, 'number', value)
},
// 增加数量
increaseNumber(item) {
if (!item.goods.number) {
this.$set(item.goods, 'number', '1')
} else {
const newValue = parseInt(item.goods.number) + 1
this.$set(item.goods, 'number', newValue.toString())
}
},
// 减少数量
decreaseNumber(item) {
if (!item.goods.number || parseInt(item.goods.number) <= 1) {
this.$set(item.goods, 'number', '1')
} else {
const newValue = parseInt(item.goods.number) - 1
this.$set(item.goods, 'number', newValue.toString())
}
}
}
}
</script>
<style scoped lang="scss">
.shop-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.shop-item {
display: flex;
align-items: center;
background-color: #f5f7fa;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
padding: toRpx(24);
.right {
flex: 1;
font-size: toRpx(28);
margin-left: toRpx(24);
.shop-name {
color: #ff781f;
}
.alias {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.front-gear-box {
display: flex;
justify-content: space-between;
margin-top: toRpx(24);
.front-gear-input-box {
display: flex;
align-items: center;
.front-gear-label {
font-size: toRpx(24);
margin-right: toRpx(24);
color: #999999;
}
.front-gear-input {
position: relative;
display: flex;
border: toRpx(2) solid #eff0f2;
background-color: #fff;
font-size: toRpx(28);
height: toRpx(70);
width: toRpx(250);
line-height: toRpx(70);
text-align: right;
.uni-input {
padding: 0 toRpx(32);
height: 100%;
}
.unit {
position: absolute;
top: 50%;
left: toRpx(32);
transform: translateY(-50%);
}
}
}
.control {
display: flex;
align-items: center;
.control-input {
width: toRpx(94);
height: toRpx(74);
background-color: #fff;
border: toRpx(2) solid #eff0f2;
padding: 0 toRpx(10);
text-align: center;
}
.minus,
.add {
width: toRpx(80);
height: toRpx(74);
line-height: toRpx(70);
text-align: center;
background-color: #fff;
border-top: toRpx(2) solid #eff0f2;
border-bottom: toRpx(2) solid #eff0f2;
}
.minus {
border-radius: toRpx(12) 0 0 toRpx(12);
border-left: toRpx(2) solid #eff0f2;
}
.add {
border-radius: 0 toRpx(12) toRpx(12) 0;
border-right: toRpx(2) solid #eff0f2;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -90,7 +90,7 @@ const FORM_LIST = [ ...@@ -90,7 +90,7 @@ const FORM_LIST = [
key: 'carInfo', key: 'carInfo',
}, },
{ {
label: '车架号', label: '车架号(VIN)',
value: 'standNo', value: 'standNo',
maxlength: '17', maxlength: '17',
type: 'input' type: 'input'
...@@ -134,59 +134,62 @@ const FORM_LIST = [ ...@@ -134,59 +134,62 @@ const FORM_LIST = [
}, },
{ {
label: '前档', label: '前档',
value: 'user', value: 'frontGear',
type: 'select', type: 'select',
key: 'name', key: 'name',
labellIcon: 'front-gear', labellIcon: 'front-gear',
addHtml: 'product' addHtml: 'frontGear',
hidden: true
}, },
{ {
label: '前侧窗玻璃', label: '前侧窗玻璃',
value: 'user', value: 'frontWindow',
type: 'select', type: 'select',
key: 'name', key: 'name',
labellIcon: 'front-window', labellIcon: 'front-window',
addHtml: 'product' addHtml: 'frontWindow',
hidden: true
}, },
{ {
label: '后侧窗玻璃', label: '后侧窗玻璃',
value: 'user', value: 'rearGear',
type: 'select', type: 'select',
key: 'name', key: 'name',
labellIcon: 'rear-gear', labellIcon: 'rear-gear',
addHtml: 'product' addHtml: 'rearGear',
hidden: true
}, },
{ {
label: '后档', label: '后档',
value: 'user', value: 'rearWindow',
type: 'select', type: 'select',
key: 'name', key: 'name',
labellIcon: 'rear-window', labellIcon: 'rear-window',
addHtml: 'product' addHtml: 'rearWindow',
hidden: true
}, },
{ {
label: '天窗', label: '天窗',
value: 'user', value: 'sunRoof',
type: 'select', type: 'select',
key: 'name', key: 'name',
labellIcon: 'sun-roof', labellIcon: 'sun-roof',
addHtml: 'product' addHtml: 'sunRoof',
hidden: true
}, },
{ {
label: '套餐', label: '套餐',
value: 'couponInfo', value: 'couponInfo',
type: 'select', type: 'select',
key: 'name', key: 'name',
required: true, // addHtml: 'package'
addHtml: 'package'
}, },
{ {
label: '其他精品', label: '其他精品',
value: 'couponInfo', value: 'couponInfo',
type: 'select', type: 'select',
key: 'name', key: 'name',
required: true, // addHtml: ''
addHtml: 'product'
}, },
{ {
label: '收款方式', label: '收款方式',
...@@ -197,11 +200,13 @@ const FORM_LIST = [ ...@@ -197,11 +200,13 @@ const FORM_LIST = [
radioList: [ radioList: [
{ {
value: '0', value: '0',
name: '嘀加收款' name: '嘀加收款',
disabled: false
}, },
{ {
value: '1', value: '1',
name: '4s店收款' name: '4s店收款',
disabled: false
} }
], ],
}, },
...@@ -212,18 +217,18 @@ const FORM_LIST = [ ...@@ -212,18 +217,18 @@ const FORM_LIST = [
key: 'name', key: 'name',
current: '0', current: '0',
radioList: [ radioList: [
{ // {
value: '3', // value: '3',
name: 'POS机' // name: 'POS机'
}, // },
{ // {
value: '6', // value: '6',
name: '对公转账' // name: '对公转账'
}, // },
{ // {
value: '7', // value: '7',
name: '其他收款' // name: '其他收款'
} // }
], ],
addHtml: 'otherPay' addHtml: 'otherPay'
}, },
...@@ -240,14 +245,14 @@ const FORM_LIST = [ ...@@ -240,14 +245,14 @@ const FORM_LIST = [
] ]
] ]
const payType = [ const payTypeList = [
{ {
value: '1', value: '1',
name: '微信支付' name: '微信支付'
}, },
{ {
value: '2', value: '2',
name: '线下收款' name: '门店收款'
}, },
{ {
value: '3', value: '3',
...@@ -311,11 +316,15 @@ const popupTypeEnum = { ...@@ -311,11 +316,15 @@ const popupTypeEnum = {
5: { 5: {
key: 'couponInfo', key: 'couponInfo',
list: '', list: '',
},
6: {
key: 'frontGear',
list: '',
} }
} }
export { export {
FORM_LIST, FORM_LIST,
popupTypeEnum, popupTypeEnum,
payType payTypeList
} }
\ No newline at end of file \ No newline at end of file
...@@ -30,13 +30,15 @@ import CreateOrder from './components/CreateOrder.vue' ...@@ -30,13 +30,15 @@ import CreateOrder from './components/CreateOrder.vue'
import DailyReport from './components/DailyReport.vue' import DailyReport from './components/DailyReport.vue'
import DefeatOrder from './components/DefeatOrder.vue' import DefeatOrder from './components/DefeatOrder.vue'
import OrderManagement from './components/OrderManagement.vue' import OrderManagement from './components/OrderManagement.vue'
import ConfirmOrder from './components/ConfirmOrder.vue'
export default { export default {
components: { components: {
Entrance, Entrance,
CreateOrder, CreateOrder,
DailyReport, DailyReport,
DefeatOrder, DefeatOrder,
OrderManagement OrderManagement,
ConfirmOrder
}, },
data() { data() {
return { return {
......
let modalQueue = []
import api from '@/api/index.js'
let eventRequest = []
export const checkDailyReport = async sceneType => {
let userInfo = uni.$storage.get('userInfo')
// debugger
// 判读是否要填写日报
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6)) {
// 判断员工是否已打卡上班
eventRequest.push(clockedIntoWork())
eventRequest.push(sceneType ? equityStaffDailyReport(userInfo) : staffDailyReport(userInfo))
}
return new Promise(resolve => {
Promise.all(eventRequest).then(results => {
// const [reportStatus] = results;
results = results.slice(-2)
// console.log(reportStatus, results, results.length, results[results.length - 1], 'reportStatus');
let resultFlag = results.some(item => item)
showNextModal()
console.log(resultFlag, 'resultFlag')
resolve(resultFlag)
})
})
}
export const showNextModal = () => {
let _this = this
if (modalQueue.length > 0) {
const modalInfo = modalQueue.pop()
if (uni.__HAS_SHOW_MODAL) return
uni.__HAS_SHOW_MODAL = true
uni.showModal({
title: modalInfo.title,
content: modalInfo.content,
showCancel: modalInfo.showCancel,
cancelColor: '#292D33',
confirmText: modalInfo.confirmText,
confirmColor: '#347BFF',
success: function (res) {
uni.__HAS_SHOW_MODAL = false
// if (res.cancel) _this.showNextModal();
if (res.cancel) showNextModal()
modalInfo.eventCallback(res)
}
})
}
}
const staffDailyReport = userInfo => {
return new Promise((resolve, reject) => {
api.boutiqueApi
.staffDailyReportMerchantValid({
merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid,
sceneType: 1
})
.then(res => {
if (res.data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
if (wx.__HAS_NOTLOGIN_MODAL) return false
addModalToQueue('日报提醒', '您有未填写的日报,请点击前往。', '前往填写', false, 2, res => {
if (res.confirm) {
wx.$router.go('tabWorkOrder.upgradeStaffDaily', {
reportDate: formattedDate
})
}
})
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve()
console.log(err)
})
})
}
const equityStaffDailyReport = userInfo => {
return new Promise((resolve, reject) => {
api.boutiqueApi
.staffDailyReportMerchantValid({
merchantId: userInfo?.shopMerchantId,
yqMerchantId: userInfo?.merchantId,
staffUuid: userInfo?.uuid,
sceneType: 0
})
.then(res => {
if (res.data) {
// 获取当前日期
let currentDate = new Date()
// 获取上一天的日期
let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1)
console.log(previousDate, 'previousDate')
// toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8
previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split('T')[0]
console.log('formattedDate', formattedDate)
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) return false
addModalToQueue('日报提醒', '您有未填写的日报,请点击前往。', '前往填写', false, 4, res => {
if (res.confirm) {
wx.$router.go('tabWorkOrder.staffDaily', {
reportDate: formattedDate
})
}
})
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve(false)
})
})
}
export const clockedIntoWork = userInfo => {
return new Promise((resolve, reject) => {
api.boutiqueApi
.clockInConfigPhone({})
.then(res => {
let { need, clockIn } = res.data
// console.log(res, need == 0 && clockIn == 0, "clockInConfigPhone");
// 已配置未打卡
if (need == 1 && clockIn == 0) {
// 有配置并且没有打卡就提示
addModalToQueue('打卡提醒', '您当前企微未打卡,无法录单,请前往企微打卡后再试,如有异议请联系管理员。', '知道了', false, 4, res => {
if (res.confirm) {
// wx.$router.go("tabWorkOrder.staffDaily", {
// // reportDate: formattedDate,
// });
}
})
resolve(true)
} else {
resolve(false)
}
})
.catch(err => {
resolve(false)
})
})
}
const addModalToQueue = (title, content, confirmText, showCancel, priority, eventCallback) => {
if (modalQueue.findIndex(val => val.content == content) < 0)
modalQueue.push({
title,
content,
confirmText,
showCancel,
priority,
eventCallback
})
modalQueue.sort((a, b) => a.priority - b.priority)
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!