orderDetail.wxml 16.1 KB
<!-- 确认施工 -->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="嘀加区域助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- wx:if="{{flag}}" -->
<block>
	<!-- {{ sublistVisible||constructionVisible?'hildden':''}}  -->
	<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
		<view class="status-box" wx:if="{{ orderInfo.status!=10&&orderInfo.status!=9 }}">
			<block wx:if="{{ allNoConstruction }}">
				<view class="content">客户已付款</view>
				<view class="tips">订单无需施工,如需要请在本页面工单-更多修改为需要施工</view>
			</block>
			<block wx:else>
				<view class="content">客户已付款</view>
				<view class="tips">{{ confirmFlagObj.btnName == 'sublistVisible' ? '请确认订单是否施工,并选择施工服务项目,将产生施工单':'订单未施工,技师施工完成后该订单自动变更为完成施工'}}</view>
			</block>
		</view>
		<view class="status-box" wx:if="{{ orderInfo.status == 10 }}">
			<view class="content">订单关闭</view>
			<view class="tips">客户支付超过24小时,系统自动关闭订单</view>
		</view>
		<view class="status-box" wx:if="{{ orderInfo.status == 9 }}">
			<view class="content">订单已撤销</view>
		</view>
		<view class="box goodsOrderApplyStatus" wx:if="{{ orderInfo.goodsOrderApplyStatus }}">
			<view class="title" style="display: flex;justify-content: space-between;align-items: center;">
				<text>审批</text>
				<view class="approval-tag {{ orderInfo.goodsOrderApplyStatus==3?'success':orderInfo.goodsOrderApplyStatus==4?'error':'warning' }}">{{orderInfo.goodsOrderApplyStatus==3?'审批通过':orderInfo.goodsOrderApplyStatus==4?'审批驳回':'审批中'}}</view>
			</view>
			<block wx:if="{{ orderInfo.goodsOrderApplyStatus==3 }}">
				<view class="approval-info">
					<view class="label">审批备注</view>
					<text class="value">{{orderInfo.applyRecordRemark || '-'}}</text>
				</view>
			</block>
			<block wx:if="{{ orderInfo.goodsOrderApplyStatus==4 }}">
				<view class="approval-info">
					<view class="label">驳回原因</view>
					<text class="value">{{orderInfo.rejectReason || '-'}}</text>
				</view>
			</block>
			<block wx:if="{{ orderInfo.goodsOrderApplyStatus==1 || orderInfo.goodsOrderApplyStatus==2 }}">
				<view class="timeline">

					<view class="timeline-item">
						<view class="timeline-left">
							<view class="dot-wrapper">
								<view class="dot {{ orderInfo.goodsOrderApplyStatus==2?'step-active':'step-wait' }}"></view>
							</view>
						</view>
						<view class="timeline-content">
							<view>运营</view>
							<view class="status warning" wx:if="{{ orderInfo.goodsOrderApplyStatus==2 }}">审批中</view>
						</view>
					</view>
				</view>
			</block>
		</view>
		<view class="box">
			<!-- <view class="title">礼券信息</view> -->
			<!-- 不升级 -->
			<!-- <block wx:if="{{orderInfo.selectPayType ==0}}">
				<view class="title">商品</view>
				<view class="cell">
					<view class="label">抵用礼券:</view>
					<view class="value">
						{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
					</view>
				</view>
			</block> -->
			<!-- <block wx:if="{{orderInfo.selectPayType != 0 && orderInfo.totalPrice!= 0}}"> -->
			<view class="title">商品</view>
			<view class="meal-box" wx:for="{{ orderInfo.packageGoodsList }}" wx:key="index">
				<view class="meal-hd">
					<view class="goods-name-with-icon">
						<view class="meal-package-name text-hide">{{item.packageName}}</view>
						<image wx:if="{{ item.marketingFlag == 1 }}" class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
					</view>
					<view class="price">¥{{item.finalPrice}}</view>
				</view>
				<view class="meal-bd">
					<view class="meal-bd-box" wx:for="{{ item.packageGoodsOrderList }}" wx:for-item="g">
						<view class="meal-bd-head">
							<view class="dot"></view>
							<view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view>
							<view class="price">¥{{g.finalPrice}}</view>
						</view>
						<view class="meal-bd-bottom">
							{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
							<view class="count">x{{g.number}}</view>
							<view class="artificer {{ filter.subStatus(g.constructionStatus) }}">{{filter.subStatusName(g.constructionStatus)}}</view>
							<!-- <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>
			<view class="goods">
				<block wx:for="{{ orderInfo.subOrderList }}" wx:key="index">
					<view class="item">
						<view class="subItem_box goods_name">
							<view class="goods-name-with-icon">
								<view class="name text-hide">
									{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || ''}}
								</view>
								<image wx:if="{{ item.marketingFlag == 1 }}" class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
							</view>
							<view class="price">¥{{item.finalPrice}}</view>
						</view>
						<view class="subItem_box">
							<view style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}">
								<!-- 太阳膜类展示部位 精品类展示类目名 -->
								<view class="position">
									{{item.positionStr || item.upgradeGoodsTypeName}}
									<text class="type">x{{item.number}}</text>
								</view>
							</view>
							<!-- 设置膜卷号 -->
							<!-- <view wx:if="{{ isUseFilmRoll && item.filmNumberData.length }}" class="film-roll disabled" bindtap="selectfilmRollNo" data-item="{{ item }}" data-index="{{ index }}">
                <text class="{{ !item.filmRollNo ? 'grey_text' : '' }} 'text-hide'">{{item.filmRollNo || '选择膜卷号'}}</text>
                <image src="/components/images/arrow-x.png" mode="" />
              </view> -->
							<!-- 太阳膜类且配置技师 25-8月版本全部放开 -->
							<!-- wx:if="{{ item.upgradeGoodbpsPosition}}" -->
							<!-- <view 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 class="artificer {{ filter.subStatus(item.constructionStatus) }}">{{filter.subStatusName(item.constructionStatus)}}</view>
						</view>
					</view>
				</block>
			</view>
			<view class="cell">
				<view class="label icon">
					<image src="../../images/voucher_icon.png" mode="" />
				</view>
				<view class="value" wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}">
					{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
				</view>
				<view class="value" wx:else>无</view>
			</view>
			<view class="line" />
			<view class="cell total">
				<view class="label">商品总金额:</view>
				<view class="price">¥{{orderInfo.total_price}}</view>
			</view>
			<!-- </block> -->
		</view>
		<view class="box">
			<view class="title order-info-title">工单信息</view>
			<block wx:for="{{ orderObj }}" wx:key="index">
				<view class="cell">
					<view class="label">{{item.label}}</view>
					<block wx:if="{{ item.key == 'status' }}">
						<view class="value" style="color:{{ status[orderInfo.status].color||'' }};">
							<!-- {{ item.constructionFlag == 'Y'? status[orderInfo.status].text: '待施工'}} -->
							{{ status[orderInfo.status].text}}
						</view>
					</block>
					<block wx:else>
						<view class="value">
							<block wx:if="{{ item.key == 'payType' }}">{{payType[orderInfo.selectPayType] || ''}}</block>
							<block wx:else>{{orderInfo[item.key] || ''}}</block>
						</view>
					</block>
					<block wx:if="{{ item.copy }}">
						<view class="copy" bindtap="setCopyData" data-content="{{ orderInfo[item.key] }}">
							<!-- 复制 -->
							<image src="{{ IMG_URL }}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image>
						</view>
					</block>
				</view>
			</block>
			<block wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}">
				<view class="cell">
					<view class="label">付款凭证</view>
					<view class="image-box">
						<view class="value" bindtap="previewImage" wx:for="{{ orderInfo.payVoucherList }}" wx:key="index" data-index="{{ index }}" data-url="{{ orderInfo.payVoucherList }}">
							<view class="image">
								<image src="{{ item.payVoucher }}" />
							</view>
						</view>
					</view>
				</view>
			</block>
			<block wx:if="{{ orderInfo.status == 5||orderInfo.status == 12 }}">
				<view class="cell">
					<view class="label">退款明细</view>
					<view class="value">{{ orderInfo.refundType == 1 ? "退全款":"退部分款"}}¥{{orderInfo.refundAmount}}</view>
				</view>
			</block>
			<view class="paid" wx:if="{{ orderInfo.payOrder&&orderInfo.payOrder.payStatus == 2 }}">
				<image src="../../images/paid.png" />
			</view>
		</view>
		<view class="box customer">
			<view class="title userTitle">
				<text>客户信息</text>
				<!-- 已退款或已开票不可修改客户任何信息 -->
			</view>
			<block wx:for="{{ customerObj }}" wx:key="index">
				<view class="cell">
					<view class="label">{{item.label}}</view>
					<view class="value" style="color:{{ item.color|| '#333' }};" catchtap="item.callBack" data-data="{{ orderInfo[item.key] }}">
						<block wx:if="{{ item.arr }}">
							<block wx:if="{{ orderInfo[item.arr[1]] }}">
								<block wx:for="{{ item.arr }}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
									<view class="value-item text-hide">
										<text wx:if="{{ ind == 1 }}">|</text>
										{{orderInfo[i]}}
									</view>
								</block>
							</block>
						</block>
						<block wx:else>{{item.enum ? item.enum[orderInfo[item.key]] :orderInfo[item.key] || ''}}</block>
						<block wx:if="{{ item.copy }}">
							<view class="copy" catchtap="setCopyData" data-content="{{ orderInfo[item.key] }}">
								<!-- 复制 -->
								<image src="{{ IMG_URL }}copy_icon_gapy.png" class="copyImage" binderror="" bindload=""></image>
							</view>
						</block>
					</view>
				</view>
			</block>
			<block wx:if="{{ orderInfo.selectPayType == 0 }}">
				<view class="cell">
					<view class="label">拒升理由</view>
					<view class="value">{{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}}</view>
				</view>
			</block>
		</view>
		<!-- wx:if="{{warrantyCardList&&warrantyCardList.length}}" -->
		<!-- 没有屏蔽质保卡 就显示 -->
		<!-- wx:if="{{!warrantyCardVisible&&orderInfo.selectPayType==0}}" -->
		<block wx:if="{{ warrantyCardList.length || warrantyCardVisible }}">
			<view class="box warrantyCardList">
				<view class="title">{{orderInfo.selectPayType==0? '客服' :'质保'}}</view>
				<view class="warranty-box">
					<block wx:for="{{ warrantyCardList }}" wx:key="index">
						<view class="warranty-card">
							<view class="name text-hide">{{filter.replaceItemText(item.goodsName)}}</view>
							<view class="value">
								质保期
								<text>{{item.warrantyPeriod}}年</text>
							</view>
							<view class="codeImg-box">
								<image src="{{ item.barCodeUrl }}" class="barCodeImg" />
							</view>
							<!-- <view class="barCode">{{item.carCode}}</view> -->
						</view>
					</block>
				</view>
				<qr-box wx:if="{{ warrantyCardVisible }}" imgSrc="{{ customerService }}" bindrefresh="getWorkWechatLiveQRCode" />
				<!-- <view class="qr-box">
	<view wx:if="{{!customerService}}" class="loader box-center" />
	<image
	       wx:else
		   class="qrImg"
		   webp="{{true}}"
	       bindtap="previewImage"
	       binderror="imageError"
	       bindload="imageLoad"
	       data-url="{{customerService}}"
			src="{{customerService}}"
	        />
</view> -->
				<view class="warranty-tips" wx:if="{{ warrantyCardVisible }}">{{orderInfo.selectPayType==0? '建议让客户扫码关注客服号领取礼包' :'建议让客户扫码关注客服查询质保'}}</view>
			</view>
		</block>
		<!-- <block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}">
			<view class="box">
				<view class="box-btn" bindtap="showQrBox">
					<image src="{{qrFlag?'../../images/open.png':'../../images/close.png'}}" />
				</view>
				<view class="title">车主评价</view>
				<view class="qr-view" id="qr-view" style="height:{{qrFlag ?0:qrHeight}}px">
					<block wx:if="{{orderInfo.status != 6}}">
						<view class="qr-box">
							<block wx:if="{{qrFlag}}">
								<block wx:if="{{qr}}">
									<image src="{{qr}}" />
								</block>
								<block wx:else>
									<view class="refresh text-center" bindtap="getQrCode">点击刷新</view>
								</block>
							</block>
						</view>
						<view class="qr-tips">请让车主扫码评价</view>
					</block>
					<block wx:else>
						<view class="comment">{{orderInfo.comment.customerComment || '暂无评价'}}</view>
					</block>
				</view>
			</view>
		</block> -->
	</view>
	<!-- 已支付4 战败2  已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 -->
	<!-- <block
		wx:if="{{ (!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length)) }}"
	> -->
	<!-- </block> -->
</block>
<modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
	<view class="modatcontent">
		<view class="modalbox {{ selectType == 1?'act': '' }} com" bindtap="selectType" data-type="1">
			<gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
			新增工单
		</view>
		<view class="modalbox cancle {{ selectType == 2?'act': '' }}" bindtap="selectType" data-type="2">
			<gl-image class="icon" src="/miniProgram/order2.png"></gl-image>
			无需补单
		</view>
	</view>
</modal>
<modal id="modal" class="modal" custom="true" btns="{{ ['返回','确定'] }}">
	<view class="modatcontentOrder">
		<view class="orderCode">
			<text class="code">订单编号:</text>
			<text>{{orderInfo.orderCode}}</text>
		</view>
		<view class="tips">
			若工单信息有误,确认操作可标记为
			<text class="color">已失效</text>
			,并补录新工单以提供线下核对。
		</view>
	</view>
</modal>
<modal id="modal5" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
	<view class="modatcontentOrder">
		<view class="orderCode">该订单下有待施工单,标记错误后将清除待施工单,是否确认?</view>
	</view>
</modal>
<order-popup orderType="4" show="{{ showPopup }}" />
<artificer-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" orderInfo="{{ orderInfo }}" artificerSelectObj="{{ artificerSelectObj }}" bindconfirm="changeArtificer" />
<!-- <wxs src="../../../utils/index.wxs" module="common" /> -->
<film-roll-no-popup show="{{ filmRollNoPopup }}" title="选择膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" />
<ConstructionDetailModal visible="{{ constructionVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="constructionCancel" bind:openInventory="openInventory"></ConstructionDetailModal>
<!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog> -->
<study-permission-modal id="customModal" />
<inventory-info show="{{showInventory}}" inventory-data="{{inventoryData}}" title="库存信息" bind:close="onInventoryClose" />