Commit 19bca09a by 李伟康

Merge branch 'SAAS+V5.1.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into SAAS+V5.1.0
2 parents 2ba36f52 9707ec7d
Showing 70 changed files with 1207 additions and 530 deletions
......@@ -18,12 +18,12 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 0
let index = 4;
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion
//手动控制体验版环境的请求 true就依据下面index false就默认2
const manual = false
const manual = true
const release = false
// 判断小程序环境
......
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
module.exports = {
btnPermissions: btnPermissions
}
// tabDate/pages/index/index.js
import api from "../api";
import commonApi from '~/api/api'
const app = getApp();
const TABLIST = ["全部", "已预约", "待预约"];
const IMG_URL =
......@@ -13,6 +14,7 @@ Page({
tabIndex: 0,
activeIndex: 0,
phoneShow: false,
userPermissions: [], // 权限数组
inviteObj: {
dayInvited: 0,
overdue: 0,
......@@ -54,7 +56,7 @@ Page({
},
{
label: '流量有效性',
single_key:'trafficEffectivenessName'
single_key: 'trafficEffectivenessName'
}
],
// 邀约状态(1待邀约;2已邀约;3取消预约)
......@@ -315,6 +317,21 @@ Page({
});
wx.hideTabBar();
},
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
jump(e) {
// console.log(e)
// return
......@@ -331,6 +348,7 @@ Page({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
});
// this.getStatByPeriod()
// this.getiIviteRecord()
},
......@@ -437,8 +455,8 @@ Page({
e.yqMerchantName = e.merchantCoupon.yqMerchantName;
}
e.trafficEffectivenessName = {
1:'有效客户',
2:'无效客户'
1: '有效客户',
2: '无效客户'
}[e.trafficEffectiveness] || '-'
});
const userType =
......@@ -535,6 +553,7 @@ Page({
}
);
}
this.getStaffPermissions()
},
/**
* 生命周期函数--监听页面初次渲染完成
......
......@@ -15,5 +15,10 @@ module.exports = {
return api.post('dj.api.smartcarlife.construction.summary.status', {
...params
})
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
}
}
\ No newline at end of file
// pages/tabRepairOrder/components/Screening/index.js
import api from '~/api/api'
import api from '../../api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
......@@ -89,7 +89,7 @@ Component({
})
wx.showLoading()
// 获取技师数据
api.getQYTechnicianList({
api.getTechnicianList({
yqMerchantId: wx.$util.getUserInfo()?.isSuper ? '' : wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
}).then(respone => {
wx.hideLoading()
......
/* pages/tabRepairOrder/components/Screening/index.wxss */
@keyframes show-confirm-box {
0%{
0% {
right: -100%;
}
100%{
100% {
right: 0;
}
}
.confirm-box {
position: fixed;
top: 0;
......@@ -16,11 +18,14 @@
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
.main{
.main {
box-sizing: border-box;
}
.box {
margin: 0 var(--fontSize32);
.title {
display: flex;
align-items: center;
......@@ -34,23 +39,28 @@
top: 0;
background: #fff;
z-index: 2;
.title-left{
.title-left {
display: flex;
align-items: flex-end;
}
.collapse-btn{
.collapse-btn {
width: var(--fontSize48);
height: var(--fontSize48);
&.rotate-180{
&.rotate-180 {
transform: rotate(180deg);
}
}
}
.list-box {
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: var(--fontSize20);
.item {
width: calc(234 / 750 * 100%);
min-height: var(--fontSize68);
......@@ -65,44 +75,57 @@
color: #292D33;
transition: all .2s;
margin: 0 calc(20 / 750 * 100%) calc(20 / 750 * 100%) 0;
.text-item{
.text-item {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.inline-block{
.inline-block {
display: inline-block;
}
&:nth-of-type(3n+3) {
margin-right: 0;
}
}
.active {
background: rgba(53, 130, 238, 0.08);
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
}
.grey{
.grey {
color: #999EA8;
}
.custom-time{
.custom-time {
width: calc(316 / 750 * 100%);
margin-bottom: 0;
&:last-child{
&:last-child {
margin-right: 0;
margin-left: var(--fontSize20);
}
}
.calendar {
.item {
margin-right: 0;
}
}
}
.endbox {
border: none;
}
}
}
.btn-box {
position: sticky;
padding: var(--fontSize10) var(--fontSize32);
......@@ -116,31 +139,37 @@
box-sizing: border-box;
z-index: 9;
background-color: #fff;
.btn {
border-radius: var(--fontSize12);
border: var(--fontSize2) solid #0075F9;
box-sizing: border-box;
height: var(--fontSize80);
}
.clear {
border: var(--fontSize2) solid #DEE0E3;
width: var(--fontSize186);
color: #292D33;
}
.done {
background: #347BFF;
color: #fff;
width: var(--fontSize480);
}
}
.isFullSucreen-btn {
padding-bottom: var(--fontSize68);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
......
......@@ -58,11 +58,11 @@
</block>
</view>
</view>
<view class="box">
<view class="box ">
<view class="title">
施工状态
</view>
<view class="list-box">
<view class="list-box endbox">
<block wx:for="{{form.statusList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="statusList" data-index="{{index}}">{{item.name}}</view>
</block>
......
......@@ -174,9 +174,9 @@ Page({
data?.list?.forEach((val, index) => {
if (val.startTime) val.startTime = new Date(val.startTime).format("yyyy-MM-dd hh:mm:ss");
if (val.successTime) val.successTime = new Date(val.successTime).format("yyyy-MM-dd hh:mm:ss");
val.statuscolor = val.constructionStatus == 1 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : ''
val.statuscolor = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : val.constructionStatus == 2 ? '客户返工' : ''
val.customerName = val.customer?.customerName
val.mainTechnicianName = val.mainTechnicianList?.find(v => v.technicianType == 0)?.technicianName // 主技师
const [subTechnicianName_1 = '', subTechnicianName_2 = ''] =
......
......@@ -158,7 +158,7 @@ page {
background: #35C376;
color: #FFFFFF;
font-weight: 500;
font-size: var(--fontSize24);
font-size: var(--fontSize22);
border-radius: var(--fontSize4);
margin-right: var(--fontSize16);
}
......@@ -169,9 +169,12 @@ page {
margin-bottom: var(--fontSize16);
position: relative;
min-width: 0;
&:last-child{
margin-bottom: 0;
}
.goods-name {
display: inline-block;
max-width: calc(100% - var(--fontSize190));
max-width: calc(100% - var(--fontSize184));
}
.materials {
display: inline-block;
......@@ -198,7 +201,7 @@ page {
background: #347BFF;
color: #FFFFFF;
font-weight: 500;
font-size: var(--fontSize24);
font-size: var(--fontSize22);
border-radius: var(--fontSize4);
margin-right: var(--fontSize16);
}
......
......@@ -58,7 +58,7 @@
<view class="goods-list">
<block wx:if="{{ li.subOrderList.length }}">
<view class="goods-tag">商品</view>
<view style="flex: 1;">
<view style="flex: 1;width: calc(100% - var(--fontSize76));">
<block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="goods" hidden="{{ li.showAllGoodsListFlag ? false : sindex > 2 }}">
<view class="goods-name text-hide">
......
var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g')
// return item.replace(reg, ' ')
return item ? item.replace(reg, ' ') : null
......@@ -11,13 +10,28 @@ var isIncludesItem = function (list, item) {
// var flag = list.indexOf(item)
return list.indexOf(item) != -1
}
var subStatus = function (item) {
var staus = {
"Y": 'constructionFlaged',
"N": 'constructionFlaging',
"Z": ''
var subStatus = function (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return 'constructionFlaged'
case 0:
return 'constructionFlaging'
case 3:
return ''
default:
return ''
}
// return 'constructionFlaging';
}
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return staus[item.constructionFlaged] || ''
return false
}
/*
* 导出
......@@ -25,5 +39,6 @@ var subStatus = function (item) {
module.exports = {
replaceItemText: replaceItemText,
isIncludesItem: isIncludesItem,
subStatus: subStatus
subStatus: subStatus,
btnPermissions: btnPermissions
}
......@@ -272,8 +272,8 @@ Page({
} else {
wx.$util.showNoAccess()
}
// 已支付加已施工
} else if (item.constructionFlag == 'Y' && item.status != 10) {
// 已支付加已施工 全部子订单都已施工才能确认施工详情跳转
} else if (item.allConstructionFlag && item.status != 10) {
wx.$router.go('tabWorkOrder.constructionOrderDetail', item)
} else {
wx.$router.go('tabWorkOrder.' + name, item)
......@@ -620,7 +620,13 @@ Page({
data.list.map(e => {
if (e.orderTime)
e.orderTime = new Date(e.orderTime).format('yyyy-MM-dd hh:mm:ss')
// 判断一下是否所有子订单都已经施工,是就跳转 施工完成
e.allConstructionFlag = true
e.subOrderList.map(i => {
// 判断一下是否所有子订单都已经施工
if (![1, 2, 3].includes(i.constructionStatus)) {
e.allConstructionFlag = false
}
i.totalPrice = Number(wx.$util.decimal(i.totalPrice, 2)).toFixed(2)
})
e.total_price = e.totalPrice
......@@ -644,6 +650,10 @@ Page({
g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice
// 判断一下是否所有子订单都已经施工
if (![1, 2, 3].includes(g.constructionStatus)) {
e.allConstructionFlag = false
}
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
......@@ -665,12 +675,12 @@ Page({
let text = status[e.status].text
let color = status[e.status].color
let background = status[e.status].background
// 不是订单失效状态优先显示已施工
if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
text = '已施工'
color = '#347BFF'
background = '#F3F7FC'
}
// 不是订单失效状态优先显示已施工 现在不施工
// if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
// text = '已施工'
// color = '#347BFF'
// background = '#F3F7FC'
// }
e.statusText = text
e.statuscolor = color
e.statusbackground = background
......
......@@ -236,6 +236,7 @@ page {
.list .item .goods-list .constructionFlaging::after {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: -10rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaging.png);
background-size: 100%;
}
......@@ -243,10 +244,33 @@ page {
.list .item .goods-list .constructionFlaged::after {
width: var(--fontSize32);
height: var(--fontSize32);
margin-left: -10rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/constructionFlaged.png);
background-size: 100%;
}
.list .item .goods-list .pullDownArrow::after {
width: var(--fontSize32);
height: var(--fontSize32);
-webkit-transition: all 0.4s;
transition: all 0.4s;
margin-left: -8rpx;
background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pullDownArrow.png);
background-size: 100%;
}
.list .item .goods-list .showAllGoodsListFlag::after {
// width: var(--fontSize32);
transform: rotate(180deg);
// height: var(--fontSize32);
// -webkit-transition: all 0.4s;
transition: all 0.4s;
margin-top: -15rpx;
margin-left: -8rpx;
// background: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/pullDownArrow.png);
// background-size: 100%;
}
.list .item .goods-list .goods .goods-name {
font-size: var(--fontSize28);
// color: #292D33;
......
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
module.exports = {
btnPermissions: btnPermissions
}
import api from "../../api";
// tabDate/pages/detail/detail.js
import CONSTANTDATA from "../userPortrait/constant/data";
import commonApi from '~/api/api'
import {
checkDailyReport
} from "~/store/ModalToQueueControl";
const app = getApp();
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
detail: {},
userPermissions: [], // 权限数组
orderObj: {
customer: {
customerName: "",
......@@ -24,71 +29,71 @@ Page({
selectPayType: 2,
},
customerObj: [{
label: "客户姓名",
key: "customerName",
},
{
label: "手机号",
key: "customerPhone",
color: "#347BFF",
callBack: "makePhoneCall",
copy: true,
},
{
label: "客户车型",
key: "carName",
},
{
label: "礼券名称",
key: "couponName",
e_key: "employeeName",
},
{
label: "领券时间",
key: "time",
},
{
label: "销售顾问",
key: "employeeName",
},
{
label: "客户画像",
key: "userPortrait",
portrait: true,
},
label: "客户姓名",
key: "customerName",
},
{
label: "手机号",
key: "customerPhone",
color: "#347BFF",
callBack: "makePhoneCall",
copy: true,
},
{
label: "客户车型",
key: "carName",
},
{
label: "礼券名称",
key: "couponName",
e_key: "employeeName",
},
{
label: "领券时间",
key: "time",
},
{
label: "销售顾问",
key: "employeeName",
},
{
label: "客户画像",
key: "userPortrait",
portrait: true,
},
],
recordObj: [{
label: "跟进人",
key: "userName",
},
{
label: ["事", "件"],
key: "eventType",
enum: {
1: "车主领券",
2: "车主预约",
3: "预约时间",
4: "修改时间",
5: "取消预约",
},
},
{
label: ["备", "注"],
key: "remark",
label: "跟进人",
key: "userName",
},
{
label: ["事", "件"],
key: "eventType",
enum: {
1: "车主领券",
2: "车主预约",
3: "预约时间",
4: "修改时间",
5: "取消预约",
},
},
{
label: ["备", "注"],
key: "remark",
},
],
remark: "",
isOrder: true,
selectType: 1,
sceneObj: {},
trafficEffectivenessList: [{
name: '有效客户',
value: '1'
},
{
name: '无效客户',
value: '2'
}
name: '有效客户',
value: '1'
},
{
name: '无效客户',
value: '2'
}
]
},
......@@ -99,35 +104,35 @@ Page({
}) {
wx.$modal(
this, {
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
selectType
} = this.data;
if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", {
// scene,
// ...item,
// });
this.setData({
showPromptDialog: true,
sceneObj: item
})
} else {
console.log({
...item
}, "item");
wx.$router.go("tabWorkOrder.defeatOrder", {
scene,
...item,
});
}
},
error: () => {},
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let {
selectType
} = this.data;
if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", {
// scene,
// ...item,
// });
this.setData({
showPromptDialog: true,
sceneObj: item
})
} else {
console.log({
...item
}, "item");
wx.$router.go("tabWorkOrder.defeatOrder", {
scene,
...item,
});
}
},
error: () => { },
},
"#modal2"
);
},
......@@ -200,6 +205,21 @@ Page({
phoneNumber: data,
});
},
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
onRoute(options) {
console.log(options);
if (options.id) {
......@@ -226,6 +246,7 @@ Page({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6 || userInfo?.loginRole == 7),
});
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
this.getStaffPermissions()
},
checkPhoneShow(config) {
console.log("config", config);
......@@ -349,14 +370,14 @@ Page({
detail.trafficEffectivenessName = {
1: '有效客户',
2: '无效客户'
} [detail.trafficEffectiveness]
}[detail.trafficEffectiveness]
}
let {
userInfo,
isOrder
} = this.data,
//已支付4、已失效11、已撤销9、已评价6、已关闭10、战败2 不支持编辑
trafficEffectivenessDisabled = (userInfo.isSuper && !userInfo.merchantType && userInfo.userType != 2 && !isOrder) || (detail.inviteStatus == 4 || detail.inviteStatus == 6 || detail.inviteStatus == 7) || ([4, 11, 9, 6, 10, 2].includes(detail.orderStatus))
} = this.data,
//已支付4、已失效11、已撤销9、已评价6、已关闭10、战败2 不支持编辑
trafficEffectivenessDisabled = (userInfo.isSuper && !userInfo.merchantType && userInfo.userType != 2 && !isOrder) || (detail.inviteStatus == 4 || detail.inviteStatus == 6 || detail.inviteStatus == 7) || ([4, 11, 9, 6, 10, 2].includes(detail.orderStatus))
this.setData({
trafficEffectivenessDisabled,
detail,
......@@ -500,11 +521,11 @@ Page({
let {
value
} = e.detail, {
trafficEffectivenessList,
detail: {
id
}
} = this.data,
trafficEffectivenessList,
detail: {
id
}
} = this.data,
trafficEffectiveness = trafficEffectivenessList[value].value,
trafficEffectivenessName = trafficEffectivenessList[value].name,
data = await api.updateTrafficEffectiveness({
......@@ -522,7 +543,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
onReady: function () { },
/**
* 生命周期函数--监听页面显示
......@@ -539,25 +560,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
onHide: function () { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
onUnload: function () { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
onPullDownRefresh: function () { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
onReachBottom: function () { },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
onShareAppMessage: function () { },
});
\ No newline at end of file
......@@ -53,15 +53,22 @@ page {
margin-left: auto;
color: #347BFF;
flex-shrink: 0;
.iconImage {
width: var(--fontSize32);
height: var(--fontSize32);
vertical-align: bottom;
}
}
.box .customer-list .item .label {
width: var(--fontSize140);
flex-shrink: 0;
color: #999EA8;
}
.box .customer-list .item .value {
color: #888888;
color: #292D33;
}
.box .icon {
......@@ -199,6 +206,10 @@ page {
color: #999999;
}
.boxend {
margin-bottom: 130rpx;
}
.fixed-box {
position: fixed;
top: 0;
......@@ -331,6 +342,7 @@ page {
min-height: var(--fontSize100);
background: #FFFFFF;
padding-bottom: var(--fontSize10);
padding-top: 20rpx;
}
.btns .btn {
......
<!-- tabDate/pages/detail/detail.wxml -->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{ flag }}">
<view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}">
......@@ -8,7 +9,7 @@
<block wx:for="{{ customerObj }}" wx:key="index">
<view class="item">
<view class="label">{{item.label}}</view>
<view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}">
<view class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}" style="color:{{ item.color||'#292D33' }};" catchtap="item.callBack" data-data="{{ detail[item.key] }}">
<!-- <view>{{item.key}}</view> -->
<block wx:if="{{ item.key=='carName' }}">
<block wx:if="{{ detail.customer.carSeriesName }}">
......@@ -27,10 +28,14 @@
<block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block>
</view>
<block wx:if="{{ item.copy }}">
<view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">复制</view>
<view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">
<image src="{{ IMG_URL }}miniProgram/copyblue.png" class="iconImage"></image>
</view>
</block>
<block wx:if="{{ item.portrait&&isOrder }}">
<view class="copy" catchtap="editProtrait">编辑</view>
<view class="copy" catchtap="editProtrait">
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
</view>
</block>
</view>
</block>
......@@ -55,7 +60,7 @@
</picker>
</view>
<view class="box">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder }}">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder&&filter.btnPermissions(userPermissions, 'YUYUEKEHU') }}">
<!-- 已施工/已撤销/已支付 不显示 -->
<view wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}" class="icon date-icon" bindtap="showPopup" data-name="showDate">
<image src="../../images/date.png" />
......@@ -68,7 +73,7 @@
<view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}">
{{detail.inviteDate}}
<!-- 已施工/已支付/已撤销 不显示 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder }}">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder &&filter.btnPermissions(userPermissions, 'YUYUEKEHU')}}">
<view class="cancel y-center" bindtap="cancelInvite">取消预约</view>
</block>
</view>
......@@ -79,7 +84,7 @@
<view class="nothing text-center">暂无记录</view>
</block>
</view>
<view class="box">
<view class="box boxend">
<view class="title">客户跟进记录</view>
<block wx:if="{{ detail.remarks.length > 0 }}">
<view class="record-box">
......@@ -119,7 +124,7 @@
<view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view>
</view>
</block>
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder }}">
<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder&&filter.btnPermissions(userPermissions, 'YUYUEKEHU') }}">
<view class="icon" bindtap="showPopup" data-name="showRemark">
<image src="../../images/edit.png" />
</view>
......
......@@ -39,5 +39,10 @@ module.exports = {
// 施工单返工
reworkAPI(data) {
return api.post('dj.api.smartcarlife.construction.rework', data)
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
}
}
......@@ -15,23 +15,18 @@ Component({
this.setData({
scrollTop: 0
})
let { infoData } = this.data
if (infoData) {
this.getDetailInfo(infoData)
}
let { detailInfo } = this.data
this.setData({
infoData: wx.$util.deepClone(detailInfo)
}, () => {
this.getDetailInfo(this.data.infoData)
})
}
}
},
title: String,
detailInfo: {
type: Object,
observer: function(n) {
if (n) {
this.setData({
infoData: wx.$util.deepClone(n)
})
}
}
type: Object
},
userPermissions: Array
},
......@@ -52,7 +47,7 @@ Component({
methods: {
async getDetailInfo(data) {
let oParams = {}
oParams.appId = 'wx570d9331f9ace0bd'
oParams.appId = wx.getAccountInfoSync().miniProgram.appId
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'tabRepairOrder/pages/repairOrderDetail/repairOrderDetail'
oParams.scene = `merchantId=${data.merchantId}&yqMerchantId=${data.sellerMerchantId}&id=${data.id}&constructionCode=${data.constructionCode}&orderCode=${data.orderCode}`
......
// tabRepairOrder/components/relateGoodsPop/index.js
Component({
/**
* 组件的属性列表
*/
......@@ -10,15 +9,18 @@ Component({
baseConfigData: Object,
show: {
type: Boolean,
observer: function(n) {
observer: function (n) {
if (n) {
let {goodsList, selected} = this.data
let { goodsList, selected } = this.data
goodsList?.map(val => {
val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true
if (
selected?.findIndex(v => v.subOrderCode == val.subOrderCode) > -1
)
val.active = true
return val
})
this.setData({goodsList})
this.setData({ goodsList })
}
}
}
......@@ -27,9 +29,7 @@ Component({
/**
* 组件的初始数据
*/
data: {
},
data: {},
/**
* 组件的方法列表
......@@ -39,7 +39,7 @@ Component({
let { item } = e.currentTarget.dataset
let { goodsList } = this.data
goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active
if (val.subOrderCode == item.subOrderCode) val.active = !val.active
})
this.setData({
goodsList
......@@ -55,4 +55,4 @@ Component({
this.triggerEvent('confirm', arr)
}
}
})
\ No newline at end of file
})
......@@ -20,7 +20,6 @@
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84);
display: flex;
align-items: center;
......
// tabRepairOrder/components/reviewPopup/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 审核通过
confirm() {
this.triggerEvent('confirm')
},
// 不通过
cancel() {
this.triggerEvent('cancel')
},
// 关闭
close() {
this.triggerEvent('close')
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* tabRepairOrder/components/reviewPopup/index.wxss */
.popclass {
font-size: var(--fontSize32);
color: #292D33;
.title {
margin-top: var(--fontSize32);
text-align: center;
font-weight: 500;
}
.content {
margin: var(--fontSize32) var(--fontSize48) var(--fontSize48);
padding: 0 var(--fontSize30);
text-align: center;
font-size: var(--fontSize30);
color: #5A5E66;
}
.popup-footer {
height: var(--fontSize100);
display: flex;
align-items: center;
justify-content: center;
border-top: var(--fontSize1) solid #EBEDF0;
.btn {
flex: 1;
height: 100%;
text-align: center;
line-height: var(--fontSize100);
}
.cancel {
border-right: var(--fontSize1) solid #EBEDF0;
}
.confirm {
font-weight: 500;
color: #347BFF;
}
}
}
\ No newline at end of file
<!--tabRepairOrder/components/reviewPopup/index.wxml-->
<van-popup lock-scroll catchtouchmove="noScroll" custom-style="width:var(--fontSize622);" round z-index="999999" custom-class="popclass" closeable show="{{ show }}" bind:close="close">
<view class="title">审核施工单</view>
<view class="content">
驻店零售/区域经理可审核每笔技师施工单的施工结果
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">不通过</view>
<view class="confirm btn text-center" bind:tap="confirm">审核通过</view>
</view>
</van-popup>
\ No newline at end of file
<!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<van-popup
show="{{ show }}"
position="bottom"
custom-style="height: 90%;"
round
closeable
close-on-click-overlay="{{ false }}"
bind:close="cancel"
>
<view class="outbound-popup-box">
<view class="sub-title">
<view class="text-center">{{title}}</view>
</view>
<view class="tips">返工是否产生退料返库,请与库管确认后提交返工</view>
<view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{ true }}" scroll-top="{{ scrollTop }}" show-scrollbar="{{ false }}">
<!-- <view class="qrcode-box">
<van-popup show="{{ show }}" position="bottom" custom-style="height: 90%;" round closeable close-on-click-overlay="{{ false }}" bind:close="cancel">
<view class="outbound-popup-box">
<view class="sub-title">
<view class="text-center">{{title}}</view>
</view>
<view class="tips">返工是否产生退料返库,请与库管确认后提交返工</view>
<view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{ true }}" scroll-top="{{ scrollTop }}" show-scrollbar="{{ false }}">
<!-- <view class="qrcode-box">
<image src="{{ weappQrcode }}" mode="" />
<view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view>
</view> -->
<block wx:for="{{ infoData.subOrderList }}" wx:key="index">
<view class="box">
<view class="title infoTitle">
<view class="text-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
<view class="box-item">
<view class="label">产品膜卷号</view>
<view class="value-box" bindtap="handleRollNumber" data-target="{{ item }}" data-index="{{ index }}">
<view class="value text-hide">
<block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block>
<block wx:else>
<view class="placeholder">请选择</view>
</block>
</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" />
</view>
</view>
<view class="box-item input-box">
<view class="label">
产品实际用料(米/件)
<text class="required">*</text>
</view>
<view class="value">
<input
class="input {{ false ? 'disabled' : '' }}"
bindinput="handleInput"
value="{{ item.materialsUsed }}"
data-index="{{ index }}"
type="digit"
placeholder-style="color: #BEC1C7;"
placeholder="输入数字"
/>
</view>
</view>
</view>
</block>
<!-- <view class="box">
<block wx:for="{{ infoData.subOrderList }}" wx:key="index">
<view class="box">
<view class="title infoTitle">
<view class="text-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
<view class="box-item">
<view class="label">产品膜卷号</view>
<view class="value-box" bindtap="handleRollNumber" data-target="{{ item }}" data-index="{{ index }}">
<view class="value text-hide">
<block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block>
<block wx:else>
-
<!-- <view class="placeholder">请选择</view> -->
</block>
</view>
<!-- <image class="pickerArrow" src="/components/images/arrow-x.png" /> -->
</view>
</view>
<view class="box-item input-box">
<view class="label">
产品实际用料(米/件)
<text class="required">*</text>
</view>
<view class="value">
<input class="input {{ false ? 'disabled' : '' }}" bindinput="handleInput" value="{{ item.materialsUsed }}" data-index="{{ index }}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字" />
</view>
</view>
</view>
</block>
<!-- <view class="box">
<view class="title infoTitle">出库时间</view>
<view class="box-item time-box">
<view class="label">产品出库时间</view>
......@@ -73,26 +58,13 @@
</view>
</view>
</view> -->
</scroll-view>
</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认返工</view>
</view>
</scroll-view>
</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认返工</view>
</view>
</van-popup>
<film-roll-no-popup
show="{{ filmRollNoVisible }}"
title="产品膜卷号"
copyfilmRollNoList="{{ filmRollNoList }}"
filmSelectedItem="{{ filmSelectedItem }}"
bindconfirm="changefilmRollNo"
bindcancel="handelCancelRollPopup"
/>
<time-select
show="{{ timeVisible }}"
title="产品出库时间"
defaultTime="{{ infoData.outBoundTime }}"
bind:confirm="onTimeConfirm"
bindcancel="onClosePicker"
/>
\ No newline at end of file
<film-roll-no-popup show="{{ filmRollNoVisible }}" title="产品膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" bindcancel="handelCancelRollPopup" />
<time-select show="{{ timeVisible }}" title="产品出库时间" defaultTime="{{ infoData.outBoundTime }}" bind:confirm="onTimeConfirm" bindcancel="onClosePicker" />
\ No newline at end of file
......@@ -11,7 +11,11 @@ Component({
type: Boolean,
observer: function(n) {
if (n) {
this.getList()
this.setData({
searchValue: ''
}, () => {
this.getList(true)
})
}
}
},
......@@ -33,6 +37,7 @@ Component({
data: {
IMG_URL,
servicesList: [],
copyServicesList: [],
selectedData: []
},
......@@ -46,7 +51,7 @@ Component({
})
},
// 获取服务项目数据
getList() {
getList(firstFlag) {
let { searchValue } = this.data
api.getServiceItemList({serviceItemsName: searchValue}).then(res => {
let { code, data, message } = res
......@@ -60,12 +65,18 @@ Component({
val.title = `${val.categoryName}-${val.itemName}`
val.detailList = val.serviceItemList?.map(item => ({
...item,
serviceItemsId: item.id,
active: selectedIds.has(item.id)
}))
})
this.setData({
servicesList: res.data
})
if (firstFlag) {
this.setData({
copyServicesList: res.data || []
})
}
} else {
wx.$util.showToast(message)
}
......@@ -77,7 +88,7 @@ Component({
// 服务项目选择
handleChecked(e) {
let { target } = e.currentTarget.dataset
let { servicesList } = this.data
let { servicesList, copyServicesList } = this.data
servicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
......@@ -85,6 +96,13 @@ Component({
})
return val
})
copyServicesList?.map(val => {
val?.detailList?.map(v => {
if (v.id == target.id) v.active = !v.active
return v
})
return val
})
const filteredServicesList = servicesList?.map(val => {
if (!val?.detailList) return null
return {
......@@ -94,6 +112,7 @@ Component({
}).filter(val => val && val.detailList.length > 0) || []
this.setData({
servicesList,
copyServicesList,
selectedData: filteredServicesList
})
},
......@@ -109,8 +128,8 @@ Component({
this.triggerEvent('cancel')
},
confirm() {
let {servicesList} = this.data
const result = servicesList.map(item => ({
let {servicesList, copyServicesList} = this.data
const result = copyServicesList.map(item => ({
...item,
detailList: item?.detailList.filter(child => child.active)
})).filter(item => item.detailList?.length > 0)
......
......@@ -38,6 +38,6 @@
</block>
</scroll-view>
</view>
<view class="bottom">共选项目<text>{{filter.activeNum(servicesList, 'detailList')}}</text>个</view>
<view class="bottom">共选项目<text>{{filter.activeNum(copyServicesList, 'detailList')}}</text>个</view>
</view>
</popup>
\ No newline at end of file
......@@ -74,7 +74,7 @@ Component({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds(),
dateStr: date.format('yyyy/MM/dd')?.replace(/\//g, '-')
dateStr: date.format('yyyy-MM-dd')?.replace(/\//g, '-')
}
} catch (error) {
return this.getCurrentTimeData()
......@@ -91,7 +91,7 @@ Component({
hour: today.getHours(),
minute: today.getMinutes(),
second: today.getSeconds(),
dateStr: today.format('yyyy/MM/dd')?.replace(/\//g, '-')
dateStr: today.format('yyyy-MM-dd')?.replace(/\//g, '-')
}
},
......@@ -126,9 +126,8 @@ Component({
const hours = []
// 根据是否是当前日期决定小时范围
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-')
const hourLimit = isToday ? defaultTime.hour + 1 : 24
const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const hourLimit = isToday ? today.getHours() + 1 : 24
for (let hour = 0; hour < hourLimit; hour++) {
hours.push(hour.toString().padStart(2, '0'));
}
......@@ -140,18 +139,17 @@ Component({
const minutes = []
const seconds = []
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-')
const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const isCurrentHour = defaultTime.hour === today.getHours()
// 分钟范围
const minuteLimit = (isToday && isCurrentHour) ? defaultTime.minute + 1 : 60
const minuteLimit = (isToday && isCurrentHour) ? today.getMinutes() + 1 : 60
for (let minute = 0; minute < minuteLimit; minute++) {
minutes.push(minute.toString().padStart(2, '0'));
}
// 秒范围
const isCurrentMinute = (isToday && isCurrentHour && defaultTime.minute === today.getMinutes())
const secondLimit = isCurrentMinute ? defaultTime.second + 1 : 60
const secondLimit = isCurrentMinute ? today.getSeconds() + 1 : 60
for (let second = 0; second < secondLimit; second++) {
seconds.push(second.toString().padStart(2, '0'));
}
......@@ -201,10 +199,7 @@ Component({
const index = value[0]
this.currentDate = days[index]
// 验证时间有效性
if (!this.validateTime()) return
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-')
const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTime(timeType)
},
......@@ -214,11 +209,7 @@ Component({
const { value } = e.detail
const index = value[0]
this.currentHour = hours[index]
// 验证时间有效性
if (!this.validateTime()) return
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-')
const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTimeMinute(timeType)
},
......@@ -228,10 +219,6 @@ Component({
const { value } = e.detail
const index = value[0]
this.currentMinute = minutes[index]
// 验证时间有效性
if (!this.validateTime()) return
this.updateSecondsByMinute()
},
......@@ -240,9 +227,6 @@ Component({
const { value } = e.detail
const index = value[0]
this.currentSecond = seconds[index]
// 验证时间有效性
this.validateTime()
},
// 新增方法:验证时间有效性
......@@ -282,7 +266,7 @@ Component({
}
const str = `${this.currentDate} ${this.currentHour}:${this.currentMinute}:${this.currentSecond}`
const result = new Date(str.replace(/-/g, '/')).format('yyyy/MM/dd hh:mm:ss')?.replace(/\//g, '-')
const result = new Date(str.replace(/-/g, '/')).format('yyyy-MM-dd hh:mm:ss')?.replace(/\//g, '-')
this.triggerEvent('confirm', result)
this.setData({ errorMsg: '' })
},
......@@ -344,7 +328,7 @@ Component({
const seconds = []
let second_len = 60
const currentDateStr = today.format('yyyy/MM/dd')?.replace(/\//g, '-')
const currentDateStr = today.format('yyyy-MM-dd')?.replace(/\//g, '-')
if (this.currentDate === currentDateStr &&
this.currentHour === today.getHours().toString().padStart(2, '0') &&
this.currentMinute === today.getMinutes().toString().padStart(2, '0')) {
......
......@@ -11,8 +11,9 @@
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize30);
color: #292D33;
font-size: var(--fontSize32);
font-weight: 500;
color: #222222;
}
}
.picker_max{
......
......@@ -12,21 +12,21 @@
<picker-view class="picker" value="{{hourValues}}" indicator-class="indicator" bindchange="changeHour">
<picker-view-column>
<block wx:for="{{hours}}" wx:key="index">
<view class="view">{{item}}</view>
<view class="view">{{item}}时</view>
</block>
</picker-view-column>
</picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{minuteValues}}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view-column>
<block wx:for="{{minutes}}" wx:key="index">
<view class="view">{{item}}</view>
<view class="view">{{item}}分</view>
</block>
</picker-view-column>
</picker-view>
<picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view wx:if="{{!loading}}" class="picker" value="{{secondValues}}" indicator-class="indicator" bindchange="changeSeconds">
<picker-view-column>
<block wx:for="{{seconds}}" wx:key="index">
<view class="view">{{item}}</view>
<view class="view">{{item}}秒</view>
</block>
</picker-view-column>
</picker-view>
......
......@@ -4,16 +4,18 @@
<view class="item goods">
<view class="title">
<view class="box">商品信息</view>
<block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelGoodsCancel">取消</view>
<view bindtap="handelGoodsConfirm">完成</view>
</view>
<block wx:if="{{confirmInfo.reworkFlag != 1 && filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelGoodsCancel">取消</view>
<view bindtap="handelGoodsConfirm">完成</view>
</view>
</block>
</block>
</view>
<view class="box">
......@@ -68,14 +70,16 @@
<view class="item service">
<view class="title">
<view class="box">施工单信息</view>
<block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelServicesCancel">取消</view>
<view bindtap="handelServicesConfirm">完成</view>
</view>
<block wx:if="{{filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelServicesCancel">取消</view>
<view bindtap="handelServicesConfirm">完成</view>
</view>
</block>
</block>
</view>
<view class="service-box">
......
......@@ -2,7 +2,8 @@
"usingComponents": {
"time-select": "../../components/timeSelect/index",
"outbound-popup": "../../components/outboundPopup/index",
"rework-popup": "../../components/reworkPopup/index"
"rework-popup": "../../components/reworkPopup/index",
"review-popup": "../../components/reviewPopup/index"
},
"navigationBarTitleText": "施工单详情"
}
......@@ -14,22 +14,26 @@ page {
color: #FFFFFF;
padding: var(--fontSize48) var(--fontSize40) var(--fontSize48) var(--fontSize60);
box-sizing: border-box;
.user-info {
display: flex;
align-items: flex-end;
.hide-text {
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.car {
font-size: var(--fontSize40);
font-weight: 600;
margin-right: var(--fontSize8);
max-width: var(--fontSize400);
image {
width: var(--fontSize40);
height: var(--fontSize40);
......@@ -37,44 +41,52 @@ page {
margin-top: var(--fontSize8);
}
}
.staff-name {
position: relative;
background: none;
max-width: var(--fontSize242);
&::before {
content: "(";
position: absolute;
left: 0;
top: 0;
}
&::after {
content: ")";
position: absolute;
right: 0;
bottom: 0;
}
.name {
padding-right: 1.2em;
text-indent: 1.2em;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 限制显示两行 */
-webkit-line-clamp: 2;
/* 限制显示两行 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
}
margin-bottom: var(--fontSize32);
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
.tips {
font-size: var(--fontSize24);
margin-right: var(--fontSize50);
}
.btn {
flex-shrink: 0;
padding: var(--fontSize8) var(--fontSize28);
......@@ -83,6 +95,7 @@ page {
}
}
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
......@@ -90,12 +103,14 @@ page {
padding: var(--fontSize40) var(--fontSize40) var(--fontSize2);
position: relative;
margin: var(--fontSize20) var(--fontSize20) 0;
.title {
font-size: var(--fontSize32);
color: #292D33;
margin-bottom: var(--fontSize20);
position: relative;
font-weight: 600;
&::after {
position: absolute;
content: '';
......@@ -107,38 +122,47 @@ page {
transform: translateY(-50%);
}
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
.example {
font-weight: 400;
color: #347BFF;
font-size: var(--fontSize26);
}
}
.cell {
font-size: var(--fontSize28);
color: #999EA8;
display: flex;
align-items: flex-start;
margin-bottom: var(--fontSize32);
.label {
flex-shrink: 0;
width: var(--fontSize208);
}
.value {
color: #292D33;
display: flex;
flex-flow: wrap;
align-items: center;
}
.placeholder {
color: #BEC1C7;
}
.copy,.edit {
.copy,
.edit {
color: #347BFF;
margin-left: auto;
.image {
width: var(--fontSize32);
height: var(--fontSize32);
......@@ -146,10 +170,12 @@ page {
}
}
}
.image-box {
display: flex;
flex-wrap: wrap;
margin-bottom: var(--fontSize32);
.tire-block {
width: var(--fontSize196);
height: var(--fontSize196);
......@@ -161,20 +187,25 @@ page {
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
&:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
&:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
.tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize12);
......@@ -183,29 +214,35 @@ page {
height: var(--fontSize40);
}
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
}
.plus-text {
color: #999EA8;
font-size: var(--fontSize28);
}
}
}
.service {
padding-bottom: var(--fontSize16);
.category {
padding-bottom: var(--fontSize8);
font-size: var(--fontSize28);
color: #292D33;
}
.service-item {
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24);
font-size: var(--fontSize26);
margin: var(--fontSize16) calc(-1 * var(--fontSize8));
.name {
color: #EA6612;
margin-bottom: var(--fontSize12);
......@@ -216,19 +253,23 @@ page {
text-overflow: ellipsis;
word-break: break-all;
}
.bott {
display: flex;
font-size: var(--fontSize24);
color: #5A5E66;
.split {
margin: 0 var(--fontSize6);
}
}
}
.edit-item {
display: flex;
align-items: center;
image {
width: var(--fontSize32);
height: var(--fontSize32);
......@@ -237,6 +278,7 @@ page {
}
}
}
.empty-box {
width: 100%;
font-size: var(--fontSize24);
......@@ -244,27 +286,32 @@ page {
display: flex;
align-items: center;
justify-content: center;
image {
width: var(--fontSize86);
height: var(--fontSize86);
margin-right: var(--fontSize16);
}
}
.goods {
margin: 0 calc(-1 * var(--fontSize8));
font-size: var(--fontSize28);
color: #292D33;
padding-bottom: var(--fontSize32);
.goods-item {
padding: var(--fontSize24);
background: #F7F8FA;
border-radius: var(--fontSize12);
margin-bottom: var(--fontSize16);
position: relative;
.goods-name {
width: calc(100% - var(--fontSize52));
padding-left: var(--fontSize28);
}
&::after {
position: absolute;
width: var(--fontSize12);
......@@ -276,24 +323,29 @@ page {
background: #347BFF;
border-radius: 100%;
}
&:last-child {
margin-bottom: 0;
}
}
.bott {
margin-top: var(--fontSize12);
padding-left: var(--fontSize28);
font-size: var(--fontSize24);
color: #999EA8;
.split {
margin: 0 var(--fontSize6);
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.btns {
position: fixed;
left: 0;
......@@ -309,6 +361,7 @@ page {
font-weight: 500;
z-index: 99;
flex-direction: column;
.tips_box {
display: flex;
align-items: center;
......@@ -320,28 +373,33 @@ page {
font-size: var(--fontSize24);
color: #FF9D0A;
background: #FEF5E7;
.tipsIcon {
flex-shrink: 0;
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
}
.contentText {
margin-right: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.close-image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80));
.confirm {
border-radius: var(--fontSize12);
height: var(--fontSize80);
......
......@@ -5,7 +5,9 @@
<view class="main" style="padding-bottom: {{'var(--fontSize290)'}};">
<view class="status-box">
<view class="user-info">
<view class="car hide-text"><image wx:if="{{detailInfo.constructionStatus == 1}}" src="{{IMG_URL}}repair-order/complete.png" mode=""/>{{detailInfo.customer.carSeriesName || '无车型客户'}}</view>
<view class="car hide-text">
<image wx:if="{{detailInfo.constructionStatus != 0}}" src="{{IMG_URL}}repair-order/complete.png" mode="" />{{detailInfo.customer.carSeriesName || '无车型客户'}}
</view>
<view class="staff-name">
<text class="name">{{detailInfo.customer.customerName || '-'}}</text>
</view>
......@@ -16,13 +18,13 @@
<view class="btn text-center" wx:if="{{detailInfo.outboundStatus != 1}}" bindtap="handleOutbound">物料出库</view>
</view>
</block>
<block wx:elif="{{detailInfo.constructionStatus == 1}}">
<block wx:else>
<view class="content">
<view class="tips">
<view>完成施工,如客户返工请点击</view>
<view wx:if="{{detailInfo.approvalStatus}}">{{detailInfo.approvalName}}已审核{{detailInfo.approvalStatus == 1 ? '通过' : '不通过'}}</view>
</view>
<view class="btn text-center" bindtap="handleRedo" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')}}">客户返工</view>
<view class="btn text-center" bindtap="handleRedo" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')&&detailInfo.effectiveFlag == 0}}">客户返工</view>
</view>
</block>
</view>
......@@ -30,7 +32,7 @@
<view class="title infoTitle">
<view class="flex">施工单信息</view>
</view>
<block wx:for="{{ detailInfo.constructionStatus == 1 ? constructionOrderObj : orderObj }}" wx:key="index">
<block wx:for="{{ detailInfo.constructionStatus != 0 ? constructionOrderObj : orderObj }}" wx:key="index">
<view class="cell">
<view class="label">{{item.label}}</view>
<block wx:if="{{ item.key == 'status' }}">
......@@ -85,9 +87,9 @@
</view>
</view>
</block>
<block wx:elif="{{detailInfo.constructionStatus == 1}}">
<block wx:elif="{{detailInfo.constructionStatus != 0}}">
<view class="empty-box">
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/>
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode="" />
暂无数据
</view>
</block>
......@@ -121,7 +123,7 @@
</block>
<block wx:else>
<view class="empty-box">
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode=""/>
<image src="{{IMG_URL}}repair-order/repair-order-empty.png" mode="" />
暂无数据
</view>
</block>
......@@ -164,7 +166,7 @@
</view>
</view>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{(detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')) || (detailInfo.constructionStatus == 1 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN'))}}">
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{(detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')) || (detailInfo.constructionStatus != 0 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN'))}}">
<!-- 未施工 技师可操作 -->
<block wx:if="{{detailInfo.constructionStatus == 0 && filter.btnPermissions(userPermissions, 'WANCHENGSHIGONG')}}">
<view class="tips_box" wx:if="{{!hideOutTips && detailInfo.outboundStatus == 0}}">
......@@ -186,7 +188,7 @@
</view>
</block>
<!-- 已施工/未审核 区域运营/驻店销售可操作 -->
<block wx:if="{{detailInfo.constructionStatus == 1 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN')}}">
<block wx:if="{{detailInfo.constructionStatus != 0 && detailInfo.approvalStatus == 0 && filter.btnPermissions(userPermissions, 'SHENHESHIGONGDAN')}}">
<view class="btns-con">
<view class="confirm text-center" bindtap="checkOrder">审核施工单</view>
</view>
......@@ -194,13 +196,8 @@
</view>
</view>
</block>
<time-select show="{{startTimeVisible}}" title="开始施工时间" defaultTime="{{detailInfo.startTime}}" isStartTime="{{true}}" endTime="{{detailInfo.endTime}}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker"/>
<time-select show="{{endTimeVisible}}" title="结束施工时间" defaultTime="{{detailInfo.endTime}}" isStartTime="{{false}}" startTime="{{detailInfo.startTime}}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" />
<outbound-popup show="{{outboundVisible}}" title="物料出库" detailInfo="{{detailInfo}}" bindcancel="handleOutboundCancel" bindconfirm="handleOutboundConfirm" userPermissions="{{userPermissions}}"></outbound-popup>
<rework-popup
show="{{ reworkVisible }}"
title="返工确认"
detailInfo="{{ detailInfo }}"
bindcancel="handleReworkCancel"
bindconfirm="handleReworkConfirm"
></rework-popup>
<time-select show="{{ startTimeVisible }}" title="开始施工时间" defaultTime="{{ detailInfo.startTime }}" isStartTime="{{ true }}" endTime="{{ detailInfo.endTime }}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker" />
<time-select show="{{ endTimeVisible }}" title="结束施工时间" defaultTime="{{ detailInfo.endTime }}" isStartTime="{{ false }}" startTime="{{ detailInfo.startTime }}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" />
<outbound-popup show="{{ outboundVisible }}" title="物料出库" detailInfo="{{ detailInfo }}" bindcancel="handleOutboundCancel" bindconfirm="handleOutboundConfirm" userPermissions="{{ userPermissions }}"></outbound-popup>
<rework-popup show="{{ reworkVisible }}" title="返工确认" detailInfo="{{ detailInfo }}" bindcancel="handleReworkCancel" bindconfirm="handleReworkConfirm"></rework-popup>
<review-popup show="{{reviewVisible}}" bindcancel="reviewCancel" bindconfirm="reviewConfirm" bindclose="reviewClose"></review-popup>
\ No newline at end of file
......@@ -361,5 +361,9 @@ module.exports = {
// 根据主订单查询施工单列表
listConstruction(data) {
return api.post('dj.api.smartcarlife.construction.list.construction', data)
},
// 获取园区店下角色名包含技师员工有效列表
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', data)
}
}
......@@ -43,6 +43,15 @@ Component({
* 组件的方法列表
*/
methods: {
navto(e) {
let { item } = e.currentTarget.dataset
console.log(item, 'item')
let path = item.electronicFlag == 1 ? 'tabRepairOrder.repairOrderDetail' : 'tabRepairOrder.confirmWorkOrder'
wx.$router.go(path, {
...item
})
this.handleCancel()
},
selectType(e) {
let { type } = e.currentTarget.dataset
this.setData({
......@@ -78,8 +87,8 @@ Component({
show: true,
tabTitleShow: true,
tapTitle: '查看客户施工单',
success: res => {},
error: () => {}
success: res => { },
error: () => { }
},
'#modal'
)
......
<!--components/SelectInvoiceModal/SelectInvoiceModal.wxml-->
<!-- btns="{{ ['取消','确定'] }}" -->
<modal id="modal" class="modal" custom="true" btns="{{ [] }}" maskEnable="{{ false }}" tapTitle="查看客户施工单">
<view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" -->
<view class="itembox">
<view class="subName">{{item.subGoodsName}}</view>
<view class="part">
<view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 0 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 1 }}">待施工</view>
</view>
</view>
<view class="right">
<image class="arrow" src="/components/images/arrow-x.png"></image>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">关闭</view>
<!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> -->
</view>
<view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" -->
<view class="itembox" bind:tap="navto" data-item="{{item}}">
<view class="subName">{{item.subGoodsName}}</view>
<view class="part">
<view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 1||item.constructionStatus ==2 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 0 }}">待施工</view>
</view>
</view>
<view class="right">
<image class="arrow" src="/components/images/arrow-x.png"></image>
</view>
</view>
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">关闭</view>
<!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> -->
</view>
</modal>
\ No newline at end of file
......@@ -29,7 +29,8 @@ Component({
data: {
// selectType: 82,
constructionList: [],
loading: false
loading: false,
first: true
},
/**
......@@ -46,15 +47,18 @@ Component({
// let {constructionList} = this.data
let { index, value } = e.currentTarget.dataset
this.setData({
first: false,
['constructionList[' + index + '].constructionFlag']: value
})
},
handleOpen() {
let { orderCode } = this.data
let { orderCode, first } = this.data
api.listSubOrder({ orderCode }).then(res => {
console.log(res.data, 'constructionList')
first = res.data.every(item => ['1', '2', 1, 2].includes(item.constructionFlag))
this.setData({
constructionList: res.data
constructionList: res.data,
first: !first
})
})
wx.$modal(
......@@ -99,7 +103,7 @@ Component({
})
})
},
error: () => {}
error: () => { }
},
'#modal'
)
......@@ -108,13 +112,60 @@ Component({
this.triggerEvent('cancel')
},
handleConfirm() {
let { constructionList, orderCode } = this.data
let { constructionList, orderCode, first, requesting } = this.data
if (constructionList.length == 0 || first) return false
if (constructionList.length > 0) {
let flag = constructionList.some(item => item.constructionFlag == 1)
let flag = constructionList.every(item => {
// console.log(item);
return ['1', '2', 1, 2].includes(item.constructionFlag)
})
// console.log(flag, 'constructionFlag');
if (!flag) {
wx.$util.showToast('请最少选择一个施工商品')
wx.$util.showToast('需要勾选全部施工商品')
return
}
// 如果全部不施工,直接调用接口
let no = constructionList.every(item => {
return item.constructionFlag == 2
})
if (no) {
const constructionInfoList = constructionList.map(val => {
return {
subOrderCode: val.subOrderCode,
upgradeGoodsId: val.upgradeGoodsId,
upgradeGoodsName: val.upgradeGoodsName,
constructionFlag: val.constructionFlag
}
})
let params = {
subOrderRelationList: constructionInfoList,
orderCode
// subOrderRelationList: []
}
if (requesting) return false
this.setData({
requesting: true
})
api.batchAdd(params).then(res => {
let { code, message } = res
if (code == 0) {
wx.$util.showToast('提交成功')
this.handleCancel()
let thisPage = wx.$router.getPageInstance()
thisPage.onRoute({ orderCode })
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
return false
}
}
this.handleCancel()
// this.triggerEvent('confirm', constructionList)
......
......@@ -123,4 +123,8 @@
background: #347BFF;
margin-left: 24rpx;
}
.disabled {
background: #D0D2D6;
color: #FFFFFF;
}
}
\ No newline at end of file
......@@ -22,6 +22,6 @@
</view>
<view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">取消</view>
<view class="btn confirm" bind:tap="handleConfirm">下一步</view>
<view class="btn confirm {{constructionList.length == '0' || first? 'disabled' : '' }}" bind:tap="handleConfirm">下一步</view>
</view>
</modal>
\ No newline at end of file
// tabWorkOrder/components/applyRefundBtn/applyRefundBtn.js
import api from "~/api/api"
import api from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
orderInfo: Object
orderInfo: Object,
showRefundBtn: Boolean,
updateFlag: Boolean
},
/**
......@@ -27,12 +28,15 @@ Component({
selectTap() {
let { orderInfo } = this.data
// 查询订单可展示按钮
api.getMoreBtnAPI({orderCode: orderInfo.orderCode}).then(res => {
api.getMoreBtnAPI({ orderCode: orderInfo.orderCode }).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({
moreSelectData: this.filterMoreSelectData(data.refundApplyButton, data.refundApplyDetailButton),
showSelect: !this.data.showSelect,
moreSelectData: this.filterMoreSelectData(
data.refundApplyButton,
data.refundApplyDetailButton
),
showSelect: !this.data.showSelect
})
}
})
......@@ -41,8 +45,8 @@ Component({
filterMoreSelectData(refundApplyButton, refundApplyDetailButton) {
const allOptions = ['申请退款', '退款详情']
const conditions = {
'申请退款': refundApplyButton === 'Y',
'退款详情': refundApplyDetailButton === 'Y'
申请退款: refundApplyButton === 'Y',
退款详情: refundApplyDetailButton === 'Y'
}
return allOptions.filter(option => conditions[option])
},
......@@ -53,7 +57,13 @@ Component({
moreSelectIndex: null
})
},
tapConstruction() {
this.closeSelect()
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
sublistVisible: true
})
},
optionTap(e) {
let { index, item } = e.currentTarget.dataset
let { orderInfo } = this.data
......@@ -62,47 +72,54 @@ Component({
// 申请退款点击埋点
wx.$track.setTrackData(0, 'apply_refund_page', {}, '', 1)
// 退款申请时区域运营查询
api.areaSupervisionExistsAPI({merchantId: userInfo.shopMerchantId, sceneType: userInfo.sceneType}).then(res => {
let { code, data, message} = res
if (code == 0) {
if (!data) {
return this.setData({
areaOperationsFlag: true,
showSelect: !this.data.showSelect
})
api
.areaSupervisionExistsAPI({
merchantId: userInfo.shopMerchantId,
sceneType: userInfo.sceneType
})
.then(res => {
let { code, data, message } = res
if (code == 0) {
if (!data) {
return this.setData({
areaOperationsFlag: true,
showSelect: !this.data.showSelect
})
} else {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`
})
this.closeSelect()
}
} else {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?orderCode=${orderInfo.orderCode}&shopMerchantName=${orderInfo.merchantName}&shopMerchantId=${orderInfo.merchantId}`,
})
this.closeSelect()
return wx.$util.showToast(message)
}
} else {
return wx.$util.showToast(message)
}
})
})
} else {
// 退款详情点击埋点
wx.$track.setTrackData(0, 'refund_detail_page', {}, '', 1)
// 点击退款详情,判断是否存在多条退款申请记录,存在跳转列表页,不存在直接跳转详情页
api.getRefundDetailListAPI({orderCode: orderInfo.orderCode}).then(res => {
let { code, data } = res
if (code == 0) {
if (data?.length > 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`,
})
} else if (data.length == 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`,
})
api
.getRefundDetailListAPI({ orderCode: orderInfo.orderCode })
.then(res => {
let { code, data } = res
if (code == 0) {
if (data?.length > 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundDetailList/refundDetailList?orderCode=${orderInfo.orderCode}`
})
} else if (data.length == 1) {
wx.navigateTo({
url: `/tabWorkOrder/pages/refundApply/refundApply?applyCode=${data[0].applyCode}`
})
}
}
}
this.closeSelect()
})
this.closeSelect()
})
}
this.setData({
moreSelectIndex: index,
moreSelectIndex: index
// showSelect: !this.data.showSelect
})
},
......@@ -112,4 +129,4 @@ Component({
})
}
}
})
\ No newline at end of file
})
/* tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxss */
.select_box {
position: relative;
.select {
display: flex;
align-items: center;
}
.icon {
width: 32rpx;
height: 32rpx;
// margin-right: 7rpx;
}
.more-btn {
position: relative;
font-size: var(--fontSize28);
color: #347BFF;
font-weight: 400;
}
.option_box{
.option_box {
position: absolute;
z-index: 1005;
top: var(--fontSize60);
right: calc(-1 * var(--fontSize24));
right: calc(-1 * var(--fontSize24));
width: var(--fontSize194);
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize12) #0000000d;
border-radius: var(--fontSize16);
overflow: hidden;
.option{
.option {
display: block;
height: var(--fontSize88);
line-height: var(--fontSize88);
......@@ -28,18 +42,22 @@
font-weight: 400;
font-size: var(--fontSize28);
}
.option:first-child{
.option:first-child {
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
}
.option:last-child{
.option:last-child {
border-radius: 0 0 var(--fontSize16) var(--fontSize16);
}
.option.active{
.option.active {
background: #347bff1a;
color: #347BFF;
}
}
.option_box::after{
.option_box::after {
height: 0;
width: 0;
content: '';
......@@ -52,20 +70,22 @@
transform: rotate(90deg);
filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d)
}
.option_box::before{
.option_box::before {
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
border-right: var(--fontSize14) solid #FFFFFF;
border-right: var(--fontSize14) solid #FFFFFF;
top: calc(-1 * var(--fontSize28));
left: var(--fontSize88);
z-index: 1;
transform: rotate(90deg);
filter: drop-shadow(0 var(--fontSize4) var(--fontSize8) #0000000d)
}
.mask_class{
.mask_class {
width: 100vw;
height: 100vh;
background: transparent;
......
<!--tabWorkOrder/components/applyRefundBtn/applyRefundBtn.wxml-->
<view class='select_box' >
<view class='select' catchtap='selectTap'>
<view class='more-btn'>更多</view>
</view>
<view class='option_box' wx:if="{{showSelect}}">
<view class='option {{moreSelectIndex == index ? "active" : ""}}' wx:for='{{moreSelectData}}' wx:key='this' data-index='{{index}}' data-item="{{item}}" catchtap='optionTap'>{{item}}</view>
</view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
<view class="select_box">
<view class="select" catchtap="selectTap">
<gl-image class="icon" src="/miniProgram/more.png"></gl-image>
<view class="more-btn">更多</view>
</view>
<view class="option_box" wx:if="{{ showSelect }}">
<view class="option" wx:if="{{ updateFlag }}" catchtap="tapConstruction">修改施工</view>
<block wx:if="{{ showRefundBtn }}">
<view
class="option {{ moreSelectIndex == index ?'active' : '' }}"
wx:for="{{ moreSelectData }}"
wx:key="this"
data-index="{{ index }}"
data-item="{{ item }}"
catchtap="optionTap"
>{{item}}</view>
</block>
</view>
<view class="mask_class" wx:if="{{ showSelect }}" bindtap="closeSelect"></view>
</view>
<area-operations-modal wx:if="{{areaOperationsFlag}}" isShow="{{areaOperationsFlag}}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file
<area-operations-modal wx:if="{{ areaOperationsFlag }}" isShow="{{ areaOperationsFlag }}" bindclose="closeModal"></area-operations-modal>
\ No newline at end of file
// tabRepairOrder/components/relateGoodsPop/index.js
Component({
/**
* 组件的属性列表
*/
......@@ -10,15 +9,18 @@ Component({
baseConfigData: Object,
show: {
type: Boolean,
observer: function(n) {
observer: function (n) {
if (n) {
let {goodsList, selected} = this.data
let { goodsList, selected } = this.data
goodsList?.map(val => {
val.active = false
if (selected?.findIndex(v => v.upgradeGoodsId == val.upgradeGoodsId) > -1) val.active = true
if (
selected?.findIndex(v => v.subOrderCode == val.subOrderCode) > -1
)
val.active = true
return val
})
this.setData({goodsList})
this.setData({ goodsList })
}
}
}
......@@ -27,9 +29,7 @@ Component({
/**
* 组件的初始数据
*/
data: {
},
data: {},
/**
* 组件的方法列表
......@@ -39,7 +39,7 @@ Component({
let { item } = e.currentTarget.dataset
let { goodsList } = this.data
goodsList?.forEach(val => {
if (val.upgradeGoodsId == item.upgradeGoodsId) val.active = !val.active
if (val.subOrderCode == item.subOrderCode) val.active = !val.active
})
this.setData({
goodsList
......@@ -55,4 +55,4 @@ Component({
this.triggerEvent('confirm', arr)
}
}
})
\ No newline at end of file
})
/* tabRepairOrder/components/relateGoodsPop/index.wxss */
.tips {
background: #FDECE9;
font-size: 28rpx;
color: #F24724;
line-height: 40rpx;
padding: 16rpx 40rpx;
margin-left: calc(-1 * var(--fontSize32));
width: 100%;
}
.goods-content {
width: calc(100% + var(--fontSize64));
height: 100%;
height: calc(100% - var(--fontSize90));
margin-left: calc(-1 * var(--fontSize32));
.content {
height: calc(100% - var(--fontSize104));
.box {
border-bottom: var(--fontSize2) solid #EBEDF0;
.itemBox {
display: flex;
align-items: center;
.choose {
width: var(--fontSize32);
height: var(--fontSize32);
margin: 0 var(--fontSize32);
}
.item {
flex: 1;
justify-content: space-between;
......@@ -27,17 +42,22 @@
font-size: var(--fontSize28);
color: #888888;
position: relative;
.labelWidth {
width: calc(100% - var(--fontSize180));
}
.value {
width: 100%;
display: flex;
justify-content: space-between;
.name {
max-width: 85%;
width:calc(100vw - var(--fontSize100))
width: calc(100vw - var(--fontSize100));
color: #292D33;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
......@@ -48,13 +68,21 @@
}
}
}
.selected-box {
text-align: center;
font-size: var(--fontSize28);
color: #888888;
margin-top: var(--fontSize30);
text {
color: #347BFF;
}
}
}
.nothing {
text-align: center;
margin-top: 30rpx;
}
\ No newline at end of file
<!--tabRepairOrder/components/relateGoodsPop/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="50%" bindcancel="cancel">
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="60%" bindcancel="cancel">
<view class="tips">
选定当前施工单的商品,未选的商品将自动创建第二笔施工单,可由不同技师负责施工
</view>
<view class="goods-content">
<scroll-view class="content" scroll-y show-scrollbar="{{false}}">
<block wx:if="{{goodsList.length > 0}}">
......
......@@ -150,7 +150,43 @@ var techicianName = function (array) {
}
return result
}
var subStatus = function (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return 'constructionFlaged'
case 0:
return 'constructionFlaging'
case 3:
return ''
default:
return ''
}
// return 'constructionFlaging';
}
var subStatusName = function (constructionStatus) {
console.log(constructionStatus)
switch (constructionStatus) {
case 1:
case 2:
return '已施工'
case 0:
return '待施工'
case 3:
return ''
default:
return ''
}
}
var btnPermissions = function (permissionsArr, key) {
for (var i = 0; i < permissionsArr.length; i++) {
if (permissionsArr[i] && permissionsArr[i].code == key) {
return true
}
}
return false
}
/*
* 导出
*/
......@@ -165,5 +201,8 @@ module.exports = {
filterOrderStatus: filterOrderStatus,
filterRefundDisabled: filterRefundDisabled,
activeNum: activeNum,
techicianName: techicianName
techicianName: techicianName,
subStatus: subStatus,
subStatusName: subStatusName,
btnPermissions: btnPermissions
}
......@@ -50,10 +50,10 @@
</view>
<view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
<view class="artificer" bindtap="selectArtificer" data-item="{{g}}">
<!-- <view class="artificer" bindtap="selectArtificer" data-item="{{g}}">
<text class="{{!g.technicianName ? 'grey_text' : ''}} 'text-hide'">{{g.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</view>
......@@ -73,10 +73,10 @@
<view class="type">x{{item.number}}</view>
</view>
<!-- 太阳膜类且配置技师 不需要限制是太阳膜 && item.upgradeGoodsPosition-->
<view wx:if="{{orderInfo.isOpenArtificer }}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<!-- <view wx:if="{{orderInfo.isOpenArtificer }}" class="artificer" bindtap="selectArtificer" data-item="{{item}}">
<text class="{{!item.technicianName ? 'grey_text' : ''}} 'text-hide'">{{item.technicianName || '选择技师'}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</block>
......
......@@ -6,6 +6,7 @@
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn",
"order-prompt-popup": "/components/orderPromptPop/orderPromptPop",
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal"
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal",
"sublist-modal": "/tabWorkOrder/components/SublistModal/SublistModal"
}
}
......@@ -4,7 +4,8 @@ page {
}
.main {
padding-bottom: var(--fontSize160);
padding-bottom: var(--fontSize210);
overflow: scroll;
}
.status-box {
......@@ -236,17 +237,43 @@ page {
font-size: var(--fontSize24);
}
.constructionFlaged {
width: var(--fontSize62);
height: var(--fontSize26);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize18);
color: #35C376;
border: 1px solid #35C376;
line-height: var(--fontSize26);
text-align: center;
border-radius: var(--fontSize4);
}
.constructionFlaging {
width: var(--fontSize62);
height: var(--fontSize26);
line-height: var(--fontSize26);
text-align: center;
border: 1px solid #FF9D0A;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 18rpx;
color: #FF9D0A;
border-radius: var(--fontSize4);
}
.artificer {
height: var(--fontSize48);
background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3;
border-radius: var(--fontSize26);
display: flex;
align-items: center;
justify-content: center;
padding: 0 var(--fontSize24);
color: #292D33;
font-size: var(--fontSize24);
// height: var(--fontSize48);
// background: #FFFFFF;
// border: var(--fontSize1) solid #DEE0E3;
// border-radius: var(--fontSize26);
// display: flex;
// align-items: center;
// justify-content: center;
// padding: 0 var(--fontSize24);
// color: #292D33;
// font-size: var(--fontSize24);
margin-left: auto;
}
......@@ -436,8 +463,9 @@ page {
.isFullSucreen {
padding-bottom: var(--fontSize228) !important;
page .isFullSucreen {
box-sizing: border-box;
padding-bottom: var(--fontSize310) !important;
}
.isFullSucreen-btn {
......@@ -731,8 +759,17 @@ page {
box-sizing: border-box;
/* min-height: var(--fontSize100); */
background-color: #fff;
padding-bottom: var(--fontSize10);
padding-top: 24rpx;
padding: 0 var(--fontSize32);
.btn {
height: var(--fontSize80);
background: #347BFF;
border-radius: var(--fontSize12);
font-size: var(--fontSize28);
color: #FFFFFF;
margin: 0 var(--fontSize32);
}
}
......@@ -745,6 +782,7 @@ page {
color: #347BFF;
font-size: var(--fontSize24);
font-weight: 600;
justify-content: center;
}
.btn-box .checkBtn {
......
......@@ -5,16 +5,16 @@
<block wx:if="{{ flag }}">
<view
class="main {{ isFullSucreen?'isFullSucreen':'' }}"
style="{{ showRatingPopup ? 'overflow: hidden;height:100vh;' : '' }}"
style="{{ sublistVisible||constructionVisible ? 'overflow: hidden;height:100vh;' : '' }}"
>
<view class="status-box">
<view class="userInfo" hover-class="none" hover-stop-propagation="false">
<image class="" src="../../images/activeIcon.png" />
<view class="customerName">客户{{orderInfo.customerName}}</view>
<!-- wx:if="{{ orderInfo.constructionFlag !='Y' }}" -->
<block>
<!-- <block>
<view class="signBtn text-center" bindtap="RatingPopupSetting">查看签名/施工图</view>
</block>
</block> -->
</view>
<view class="orderContainer">
<!-- 已微信通知客户前往取车, -->
......@@ -57,10 +57,11 @@
<view class="meal-bd-bottom">
{{g.positionStr || g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
<view wx:if="{{ g.technicianName }}" class="artificer disabled">
<view class="artificer {{ filter.subStatus(g.constructionStatus) }}">{{filter.subStatusName(g.constructionStatus)}}</view>
<!-- <view wx:if="{{ g.technicianName }}" class="artificer disabled">
<text class="{{ !g.technicianName ? 'grey_text' : '' }} 'text-hide'">{{g.technicianName }}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</view>
......@@ -88,11 +89,12 @@
<text class="'text-hide'">{{item.filmRollNo}}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
<view class="artificer {{ filter.subStatus(item.constructionStatus) }}">{{filter.subStatusName(item.constructionStatus)}}</view>
<!-- 技师 -->
<view wx:if="{{ item.technicianName }}" class="artificer disabled" data-item="{{ item }}">
<!-- <view wx:if="{{ item.technicianName }}" class="artificer disabled" data-item="{{ item }}">
<text class="{{ !item.technicianName ? 'grey_text' : '' }} 'text-hide'">{{item.technicianName }}</text>
<image src="/components/images/arrow-x.png" mode="" />
</view>
</view> -->
</view>
</view>
</block>
......@@ -125,8 +127,12 @@
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
<view wx:if="{{ isStaff && showMoreBtn }}">
<apply-refund-btn orderInfo="{{ orderInfo }}"></apply-refund-btn>
<view>
<apply-refund-btn
updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}"
orderInfo="{{ orderInfo }}"
showRefundBtn="{{ isStaff && showMoreBtn }}"
></apply-refund-btn>
</view>
</view>
</view>
......@@ -311,16 +317,33 @@
</view>
</block>
</view>
<block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}">
<!-- <view class="btn text-center" bindtap="showAgain">继续下单</view> -->
<view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<!-- <block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}"> -->
<!-- <view class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
</view> -->
<!-- </block> -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<block wx:if="{{ orderInfo.failureFlag == 'Y'&&isMake && orderInfo.associatedOrderCode }}">
<view class="tips">
<image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">该订单录入信息有误,点击跳转正确工单页面。</view>
<view class="checkBtn" bindtap="redirectOrder">去查看</view>
</view>
</view>
</block>
</block>
<!-- <view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> -->
<view
wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
<view
wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
</view>
</block>
<modal id="modal3" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent">
......@@ -396,4 +419,16 @@
height="var(--fontSize540);"
includesChildHeight="var(--fontSize1020);"
sceneObj="{{ orderInfo }}"
></order-prompt-popup>
\ No newline at end of file
></order-prompt-popup>
<ConstructionDetailModal
visible="{{ constructionVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderInfo.orderCode }}"
bindcancel="constructionCancel"
></ConstructionDetailModal>
<sublist-modal
visible="{{ sublistVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderInfo.orderCode }}"
bindcancel="sublistCancel"
></sublist-modal>
\ No newline at end of file
......@@ -4,7 +4,6 @@ const IMG_URL =
import commonApi from '~/api/api'
import { setConfigInfo, getPositionList } from '~/store/index'
import api from '~/tabWorkOrder/api'
import { deepClone } from '../../../miniprogram_npm/glsk-applet-component/utils'
const app = getApp()
Page({
/**
......@@ -231,7 +230,8 @@ Page({
copySubOrderRelationList,
orderCode,
confirmInfo,
subOrderRelationList
subOrderRelationList,
requesting
} = this.data
console.log(subOrderRelationList, 'copySubOrderRelationList')
subOrderRelationList = wx.$util.deepClone(subOrderRelationList)
......@@ -282,11 +282,45 @@ Page({
delete item.confirmInfo
return item
})
let params = {
constructionInfoList: subOrderRelationList,
orderCode,
subOrderRelationList: copySubOrderRelationList
}
let checkFlag = false
for (let index = 0; index < subOrderRelationList.length; index++) {
const item = subOrderRelationList[index]
// Check if the sub-order has associated products
if (!item.subOrderList.length) {
wx.$util.showToast(`施工单${index + 1}关联商品不能为空`)
checkFlag = true
break // Move to the next index
}
// Check if the sub-order has a main technician
if (!item.mainTechnicianList.length) {
wx.$util.showToast(`施工单${index + 1}主技师不能为空`)
checkFlag = true
break // Move to the next index
}
// Check if the sub-order has service items
if (!item.serviceItemsList.length) {
wx.$util.showToast(`施工单${index + 1}服务项目不能为空`)
checkFlag = true
break // Move to the next index
}
}
console.log(params, 'params')
if (requesting || checkFlag) return false
this.setData({
requesting: true
})
console.log(params, 'confirmInfo')
api.batchAdd(params).then(res => {
let { code, data, message } = res
......@@ -298,6 +332,11 @@ Page({
} else {
wx.$util.showToast(message)
}
setTimeout(() => {
this.setData({
requesting: false
})
}, 1000)
})
},
backup() {
......@@ -344,7 +383,7 @@ Page({
if (goodsList.length > 0) {
tabList.push('施工单' + (tabList.length + 1))
let obj = {
servicesList: copyServicesList,
servicesList: wx.$util.deepClone(copyServicesList),
mainSelected: [],
deputySelected: []
}
......@@ -594,7 +633,8 @@ Page({
return
}
// 切换tab 重新赋值刷新数据
const currentTabIndex = e?.detail || 0
const currentTabIndex =
e?.detail !== undefined && e?.detail !== null ? e.detail : tabIndex
console.log(tabIndex, currentTabIndex, 'tabIndex')
subOrderRelationList[tabIndex] = wx.$util.deepClone({
...subOrderRelationList[tabIndex],
......@@ -624,7 +664,7 @@ Page({
getTechnicianList() {
let { userInfo } = this.data
// 获取技师数据
commonApi
api
.getQYTechnicianList({
yqMerchantId: !userInfo?.isSuper
? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
......
......@@ -21,6 +21,12 @@ page {
overflow: hidden;
margin-top: var(--fontSize20);
}
.techic-value {
display: flex;
align-items: center;
justify-content: flex-end;
}
}
......@@ -292,6 +298,7 @@ page {
}
.item-box {
box-sizing: border-box;
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24) var(--fontSize32) var(--fontSize24) var(--fontSize24);
......@@ -300,9 +307,10 @@ page {
justify-content: space-between;
margin-bottom: var(--fontSize16);
&:last-child {
margin-bottom: 0;
}
// &:last-child {
// margin-bottom: 0;
// }
.cellBox {
width: calc(100% - var(--fontSize56));
......@@ -322,6 +330,9 @@ page {
.other {
color: #5A5E66;
font-size: var(--fontSize24);
.split {
margin: 0 var(--fontSize6);
}
}
}
......@@ -344,6 +355,11 @@ page {
}
}
}
.active {
border: 2rpx solid #347BFF;
background: #347bff14;
}
}
.bottom {
......
......@@ -87,12 +87,12 @@
</view>
<block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view hidden="{{ !item.showItemFlag }}" class="mt">
<view class="item-box">
<view class="item-box {{i.active?'active':''}}">
<view class="cellBox">
<view class="ser-name text-hide">{{i.serviceItemsName}}</view>
<view class="other">
<text>用料标准{{i.materialStandard}}米/件</text>
|
<text class="split">|</text>
<text>施工标准{{i.timeStandard}}min</text>
</view>
</view>
......
......@@ -17,6 +17,8 @@ Page({
data: {
IMG_URL,
...order_mixins.data,
allNoConstruction: true,
userPermissions: [], // 权限数组
showTips: true,
isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff,
......@@ -176,7 +178,24 @@ Page({
phoneNumber: data
})
},
// 获取人员权限
getStaffPermissions() {
let { userInfo } = this.data
commonApi.staffPermissions({ phone: userInfo?.phone }).then(res => {
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
userPermissions: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
async onRoute(options) {
let { orderCode } = this.data
options.orderCode = options.orderCode || orderCode
if (options.orderCode) {
// 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData)
......@@ -223,6 +242,7 @@ Page({
userInfo.loginRole == 7
)
})
this.getStaffPermissions()
},
showFlag(orderCode) {
const confirmFlagObj = {
......@@ -247,10 +267,11 @@ Page({
.then(res => {
console.log(res)
let { code, message, data } = res
console.log('showFlag', res);
console.log('showFlag', res)
if (code == 0) {
this.setData({
confirmFlagObj: confirmFlagObj[data.confirmFlag]
confirmFlagObj: confirmFlagObj[data.confirmFlag],
updateFlag: data.updateFlag
})
}
})
......@@ -270,7 +291,8 @@ Page({
},
async getOrderDetail(orderCode) {
let _this = this
let { signatureSwitch, baseConfigData } = _this.data
let { signatureSwitch, baseConfigData, allNoConstruction } = _this.data
const positionTypeList = (await getPositionList()) || []
wx.$util.showLoading('加载中...')
......@@ -322,7 +344,14 @@ Page({
let total_price = 0
let warrantyCardList = []
for (var i = 0; i < data?.subOrderList?.length; i++) {
if (true) {
}
let e = data?.subOrderList[i]
// 判断是否全为无需施工
if (e.constructionStatus != 3) {
allNoConstruction = false
}
total_price += e.totalPrice
e.price = Number(
wx.$util.decimal(Number(e.totalPrice / e.number), 2)
......@@ -364,6 +393,10 @@ Page({
g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice
// 判断是否全为无需施工
if (g.constructionStatus != 3) {
allNoConstruction = false
}
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
......@@ -405,6 +438,7 @@ Page({
}
this.setData({
allNoConstruction,
orderInfo: data,
flag: true,
warrantyCardList,
......
......@@ -5,6 +5,7 @@ page {
.hildden {
height: 100vh;
overflow: hidden;
}
.copyImage,
......@@ -140,17 +141,44 @@ page {
}
.artificer {
height: var(--fontSize48);
background: #FFFFFF;
border: var(--fontSize1) solid #DEE0E3;
border-radius: var(--fontSize26);
display: flex;
align-items: center;
justify-content: center;
padding: 0 var(--fontSize24);
color: #292D33;
font-size: var(--fontSize24);
// height: var(--fontSize48);
// background: #FFFFFF;
// border: var(--fontSize1) solid #DEE0E3;
// border-radius: var(--fontSize26);
// display: flex;
// align-items: center;
// justify-content: center;
// padding: 0 var(--fontSize24);
// color: #292D33;
// font-size: var(--fontSize24);
margin-left: auto;
}
.constructionFlaged {
width: var(--fontSize62);
height: var(--fontSize26);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize18);
color: #35C376;
border: 1px solid #35C376;
line-height: var(--fontSize26);
text-align: center;
border-radius: var(--fontSize4);
}
.constructionFlaging {
width: var(--fontSize62);
height: var(--fontSize26);
line-height: var(--fontSize26);
text-align: center;
border: 1px solid #FF9D0A;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 18rpx;
color: #FF9D0A;
border-radius: var(--fontSize4);
}
.artificer text {
......@@ -335,6 +363,7 @@ page {
min-height: var(--fontSize100);
background: #FFFFFF;
padding-bottom: var(--fontSize10);
padding-top: 24rpx;
}
.btn-box .tips {
......@@ -730,4 +759,8 @@ page {
.meal-bd-bottom .count {
margin-left: var(--fontSize12);
}
.warrantyCardList {
margin-bottom: 120rpx;
}
\ No newline at end of file
......@@ -15,8 +15,9 @@
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="mainheader">
<!-- catchtap="showStaffPicker" -->
<view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker">
<view class="navigation-title templateNameTitle">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || isHmStore}}">
<view class="picker">
<view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view>
......@@ -93,7 +94,7 @@
<block wx:if="{{ item.brandType == 0 }}">
<view class="mainheader">
<view class="title">问界</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......@@ -119,7 +120,7 @@
<block wx:if="{{ item.brandType == 1 }}">
<view class="mainheader">
<view class="title">鸿蒙</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......@@ -145,7 +146,7 @@
<block wx:if="{{ item.brandType == 2 }}">
<view class="mainheader">
<view class="title">{{ item.brandType == 1? '非问界': item.firstBrandName}}</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......
......@@ -340,7 +340,7 @@ Page({
type: 'number',
required: true,
min: 0,
max: 1000,
max: 3000,
inputPlaceholder: ''
},
{
......@@ -349,7 +349,7 @@ Page({
type: 'number',
required: true,
min: 0,
max: 1000,
max: 3000,
inputPlaceholder: ''
},
{
......@@ -393,23 +393,23 @@ Page({
},
showStorePicker() {
let { userInfo } = this.data
;(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'merchant'
})
; (userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'merchant'
})
},
showStaffPicker() {
let { userInfo } = this.data
;(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'staff'
})
; (userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'staff'
})
},
navbarReady(e) {
let navBarHeight = e.detail.height
......@@ -533,7 +533,7 @@ Page({
showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) {}
success(res) { }
})
} else {
wx.$util.showToast(message)
......@@ -651,7 +651,7 @@ Page({
showCancel: false,
confirmText: '确定',
confirmColor: '#347BFF',
success(res) {}
success(res) { }
})
} else {
wx.$util.showToast(message)
......@@ -759,11 +759,9 @@ Page({
0: '问界',
1: '鸿蒙'
}
context += `【${
bandType[el.brandType] || item.firstBrandName
}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${
item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n`
context += `【${bandType[el.brandType] || item.firstBrandName
}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n`
el.deliveryCountinputError = true
el.equityToShopCountinputError = true
el.notDeliveryCountinputError = true
......@@ -927,7 +925,7 @@ Page({
hwOhterObjArray[hwohterIndex]
const min = currentConfig.min || 0 // 默认最小值 0
const max = currentConfig.max || 9999999 // 默认最大值
// console.log(currentConfig, 'currentConfig')
console.log(currentConfig, 'currentConfig')
if (currentConfig.type == 'digit') {
let [number, decimal] = value.toString().split('.')
// console.log(value, '222')
......@@ -1353,7 +1351,7 @@ Page({
wx.$util.message(message)
}
})
.catch(err => {})
.catch(err => { })
},
inputSearch(e) {
let { pickerType } = this.data
......@@ -1560,7 +1558,7 @@ Page({
}
// }
})
.catch(err => {})
.catch(err => { })
},
/**
* 生命周期函数--监听页面加载
......@@ -1682,5 +1680,5 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {}
onReady: function () { }
})
......@@ -61,9 +61,9 @@ const domain_items = {
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.104:8292',//范富荣
dj: 'http://192.168.1.104:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭
dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!