Commit 38ed417f by 张立顺

feat 功能开发

1 parent eca0021f
......@@ -82,6 +82,10 @@ Component({
type: Boolean,
value: true
},
maskEnable: {
type: Boolean,
value: true
},
// 标题
tapTitle: {
type: String,
......@@ -109,9 +113,10 @@ Component({
},
methods: {
selectMask: function (e) {
this.setData({
show: !this.data.show
})
this.data.maskEnable &&
this.setData({
show: !this.data.show
})
},
// 选中底部的按钮
selectBtn: function (e) {
......@@ -192,7 +197,7 @@ Component({
.translate('-50%', '-50%')
.opacity(currentStatu ? 0.5 : 1)
.step()
// .scale(currentStatu ? 1.05 : 1)
// .scale(currentStatu ? 1.05 : 1)
this.setData({
frameAnimate: frameAnimate.export()
})
......
/* pages/tabRepairOrder/pages/index/index.wxss */
\ No newline at end of file
......@@ -249,7 +249,7 @@ Page({
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport();
if (staffCheck) return false;
if(name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
if (name == 'createOrder' && await wx.$globalDataFunction.inspectionOfProhibitionBill()) return /**禁止提单 */
// 点击的新增工单做下单引导
if (flag == 'new') {
this.setData({
......@@ -286,7 +286,7 @@ Page({
let paymentMethod = payFlag != 2 ? 1 : payType
let { sceneObj } = this.data
if (payFlag == 1 || payType == 3 || payType == 4 || payType == 6) {
let params = {paymentMethod}
let params = { paymentMethod }
if (Object.keys(sceneObj)?.length) {
params.scene = sceneObj
}
......
/* tabRepairOrder/pages/confirmWorkOrder/confirmWorkOrder.wxss */
\ No newline at end of file
/* tabRepairOrder/pages/repairOrderDetail/repairOrderDetail.wxss */
\ No newline at end of file
// packageStoreAssistant/components/Dialog/Dialog.js
Component({
options: {
multipleSlots: true
},
/**
* 组件的属性列表
*/
properties: {
show: Boolean,
confirmText: String,
cancelText: String,
showCancelButton: Boolean,
success: Boolean,
text: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
confirm() {
this.triggerEvent('confirm')
},
cancel() {
this.triggerEvent('cancel')
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
}
}
\ No newline at end of file
.dialog {
display: flex;
flex-direction: column;
align-items: center;
.icon {
color: #292d33;
font-size: 32rpx;
text-align:center;
font-weight: 500;
}
.text {
font-size: 30rpx;
color: #5a5e66;
text-align: center;
max-width: 494rpx;
line-height: 40rpx;
padding: 10rpx 0 54rpx;
}
}
\ No newline at end of file
<van-dialog use-slot use-title-slot show="{{ show }}" show-cancel-button="{{showCancelButton}}" confirm-button-text="{{confirmText}}" cancel-button-text="{{cancelText}}" confirm-button-color="#347BFF" cancel-button-color="#1B233D" bindconfirm="confirm" bindcancel="cancel">
<view class="dialog">
<view class="icon">
温馨提示
</view>
<text class="text">
<block wx:if="{{text}}">
{{text}}
</block>
<block wx:else>
<block wx:if="{{success}}">
<slot name="success"></slot>
</block>
<block wx:else>
<slot name="error"></slot>
</block>
</block>
</text>
</view>
</van-dialog>
\ No newline at end of file
// components/SelectInvoiceModal/SelectInvoiceModal.js
import commonApi from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
visible: {
type: Boolean,
value: false,
observer: function (n, o) {
this.handleOpen()
}
},
orderInfo: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
selectType: 82,
loading: false
},
/**
* 组件的方法列表
*/
methods: {
selectType(e) {
let { type } = e.currentTarget.dataset
this.setData({
selectType: type
})
},
handleOpen() {
wx.$modal(
this,
{
show: true,
tabTitleShow: '选择商品是否需要施工',
success: res => {
// 跳转新增订单页面 并带特定参数
let { selectType, orderInfo, loading } = this.data
if (loading) {
return true
}
console.log(orderInfo, 'orderInfo----')
const params = {
orderCode: orderInfo.orderCode,
invoiceType: selectType
}
wx.$util.showLoading()
this.setData({
loading: true
})
commonApi
.createOrderCode(params)
.then(res => {
wx.$util.hideLoading()
if (res.code == 0) {
// wx.$util.showToast('开票成功')
wx.$router.go('tabWorkOrder.invoiceCode', {
obj: {
orderCode: orderInfo.orderCode,
...res.data
}
})
} else {
wx.$util.showToast(res.message)
}
})
.finally(() => {
this.setData({
loading: false
})
})
},
error: () => {}
},
'#modal'
)
},
handleCancel() {
this.triggerEvent('cancel')
},
handleConfirm() {
this.triggerEvent('confirm')
this.handleCancel()
}
}
})
{
"component": true,
"usingComponents": {
"modal": "/components/modal/modal"
}
}
\ No newline at end of file
/* components/SelectInvoiceModal/SelectInvoiceModal.wxss */
.modatcontent {
box-sizing: border-box;
margin: var(--fontSize48) 0 0;
max-height: 600rpx;
overflow-y: scroll;
.itembox {
box-sizing: border-box;
padding: 0 48rpx;
height: 120rpx;
display: flex;
align-items: center;
.subName {
overflow: hidden; //一定要写
text-overflow: ellipsis; //超出省略号
display: -webkit-box; //一定要写
-webkit-line-clamp: 2; //控制行数
-webkit-box-orient: vertical; //一定要写
width: 300rpx;
height: 90rpx;
}
.checked_img {
display: flex;
align-items: center;
margin-left: 20rpx;
.checked {
display: flex;
align-items: center;
font-size: 28rpx;
color: #292D33;
}
image {
display: inline-block;
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 20rpx;
}
.nocheck {
margin-left: 48rpx;
}
}
}
.itembox+.itembox {
border-top: 1rpx solid #EFF0F2;
}
}
.modal {
.icon {
width: 96rpx;
height: 96rpx;
margin-right: 30rpx;
}
.modalbox {
display: flex;
align-items: center;
box-sizing: border-box;
width: 522rpx;
height: 136rpx;
background: #F7F8FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
padding-left: 24rpx;
margin: 0 auto;
&+.modalbox {
margin-top: 16rpx;
}
.txt {
font-size: 24rpx;
}
}
.act {
background: #347bff1a;
border: 2rpx solid #347BFF;
color: #3582EE;
}
}
.btnbox {
margin-top: 32rpx;
display: flex;
justify-content: center;
.btn {
width: 250rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 12rpx;
font-size: 32rpx;
margin-bottom: 48rpx;
}
.cancel {
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
color: #222222;
}
.confirm {
color: #FFFFFF;
background: #347BFF;
margin-left: 24rpx;
}
}
\ No newline at end of file
<!--components/SelectInvoiceModal/SelectInvoiceModal.wxml-->
<!-- 申请开票 - 选择发票类型弹窗 -->
<!-- btns="{{ ['取消','确定'] }}" -->
<modal id="modal" class="modal" custom="true" btns="{{ [] }}" maskEnable="{{ false }}">
<view class="modatcontent">
<block wx:for="{{ 10 }}">
<view class="itembox">
<view class="subName">强生尊誉版GH7车身强生尊誉版强生尊誉版GH7车身强生尊誉版强生尊誉版GH7车身强生尊誉版22222222222</view>
<view class="checked_img">
<!-- <block wx:if="{{multiple}}"> -->
<view class="checked">
<image src="{{ true ? '/components/images/radio.png' : '/components/images/radio_icon.png' }}" />
是
</view>
<view class="checked nocheck">
<image src="{{ active ? '/components/images/radio.png' : '/components/images/radio_icon.png' }}" />
否
</view>
</view>
</view>
</block>
</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
// tabWorkOrder/pages/createAConstructionOrder/createAConstructionOrder.js
Page({
/**
* 页面的初始数据
*/
data: {
tabList: ['全部', '待报价', '待确认', '待支付', '已支付', '已完成', '战败'],
tabIndex: 0,
showTips: true
},
// 首次进入会触发该方法,因此不需要在attached调getList
tabClick(e) {
let { tabList } = this.data,
orderStatus = ''
const tabIndex = e.detail || 0
if (tabIndex)
orderStatus =
constantData.orderStatusList.find(
item =>
item.confName == tabList[tabIndex].text ||
item.confName == tabList[tabIndex]
)?.confId || ''
// 防止筛选条件回来后多次触发
if (this.filterTag) {
this.filterTag = false
return
}
// 筛选页只会存在订单状态
if (this.screenForm && e.orderStatus && !e.zyPayStatus) {
this.screenForm.orderStatus = e.orderStatus
this.filterTag = true
setTimeout(() => {
this.filterTag = false
}, 500)
} else if (
this.screenForm &&
!e.orderStatus &&
!tabIndex &&
!e.zyPayStatus
) {
this.screenForm.orderStatus = ''
this.filterTag = false
} else if (
this.screenForm &&
!e.orderStatus &&
tabIndex &&
!e.zyPayStatus
) {
this.screenForm.orderStatus = orderStatus
this.filterTag = false
}
// 筛选页只会存在合同协议状态
if (this.screenForm && e.zyPayStatus && !e.orderStatus) {
this.screenForm.zyPayStatus = e.zyPayStatus
this.filterTag = true
setTimeout(() => {
this.filterTag = false
}, 500)
} else if (
this.screenForm &&
e.detail == tabList?.length - 1 &&
!e.zyPayStatus &&
!e.orderStatus
) {
this.screenForm.zyPayStatus = 1
this.filterTag = false
} else if (
this.screenForm &&
e.detail != tabList?.length - 1 &&
!e.zyPayStatus &&
!e.orderStatus
) {
this.screenForm.zyPayStatus = ''
this.filterTag = false
}
this.setData({
tabIndex,
orderStatus,
currentPage: 1,
zyPayStatus:
e.detail == tabList?.length - 1 && !e.zyPayStatus
? 1
: e.zyPayStatus
? e.zyPayStatus
: '', // 当tab选中最后一项或筛选页面存在值
list: []
})
// const thisPage = wx.$router.getPageInstance();
// thisPage.setData({
// orderStatus,
// zyPayStatus: e.detail == (tabList?.length - 1) && !e.zyPayStatus ? 1 : e.zyPayStatus ? e.zyPayStatus : ''
// })
// this.search();
// this.getOrderStatistics();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
{
"navigationBarTitleText": "创建施工订单",
"enablePullDownRefresh": true,
"usingComponents": {}
}
/* tabWorkOrder/pages/createAConstructionOrder/createAConstructionOrder.wxss */
page {
background-color: rgb(246, 247, 247);
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
border-radius: var(--fontSize16);
overflow: hidden;
margin-top: var(--fontSize20);
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80));
}
.btns {
/* position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: var(--fontSize100);
background: #FFFFFF;
box-sizing: border-box;
padding: var(--fontSize10) var(--fontSize32);
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize28);
z-index: 99; */
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: var(--fontSize100);
background: #FFFFFF;
box-sizing: border-box;
/* padding: var(--fontSize10) var(--fontSize32); */
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
z-index: 99;
flex-direction: column;
}
.btns-con view {
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
}
.btns .save,
.confirm {
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
}
.btns .save {
/* width: var(--fontSize186); */
width: 28%;
margin-right: var(--fontSize20);
color: #347BFF;
margin-right: var(--fontSize20);
}
.btns .confirm {
/* width: var(--fontSize480); */
width: 72%;
color: #fff;
background-color: #347BFF;
}
.btns .save.disabled {
border: 1px solid #DCDEE0;
color: #c0c0cc;
}
.isFullSucreen {
// padding-bottom: 702rpx !important;
// padding-bottom: 166px !important;
}
.isFullSucreen.fullSucreen-tips {
padding-bottom: 136px !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
\ No newline at end of file
<!--tabWorkOrder/pages/createAConstructionOrder/createAConstructionOrder.wxml-->
<!-- 确认施工 -->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- wx:if="{{flag}}" -->
<block>
<view class="main {{ sublistVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}">
<view>
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" scroll activeIndex="{{ tabIndex }}" />
</view>
<view class="box">
<view class="userId">
<gl-cell
border
valueAlign="right"
label="{{ pointsMultiRole=='Y'?'销售顾问 /录单员':'销售顾问' }}"
requiredAfter
labelWidth="var(--fontSize140)"
required
haveArrow
bindclick="showPopup"
data-show-name="selesBox"
placeholder="点击选择"
disabled="{{ orderObj.orderSource == 5 }}"
>
<block wx:if="{{ orderObj.merchantName && orderObj.employeeName }}">
<view class="between">
<view class="start text-hide">{{orderObj.merchantName}}</view>
<view class="end text-hide">
<text>|</text>
{{orderObj.employeeName}}
</view>
</view>
</block>
</gl-cell>
</view>
</view>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="tipsadd" wx:if="{{ showTips }}">
<image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">
<view class="tradeNoCon">
<view>交易参考号:</view>
<view class="tradeNo text-hide">{{tradeNo}}</view>
<view>(共{{selectOutTradeNoArr.length}}条)</view>
</view>
<view class="tipsbox">
<view>支付金额:¥{{totalFee/100}}</view>
<view class="tipsbtn" bindtap="tipsEvent">补录订单</view>
</view>
</view>
</view>
<view class="btns-con">
<view class="save text-center {{ isErrorOrder || isAlreadyExistOrder ?'disabled':'' }}" bindtap="submit" data-save>建档</view>
<view class="confirm text-center" bindtap="submit">直接下单</view>
</view>
</view>
</block>
\ No newline at end of file
......@@ -2,9 +2,11 @@
"navigationBarTitleText": "工单详情",
"enablePullDownRefresh": true,
"usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"artificer-select-popup": "/components/ArtificerSelectPopup/artificerSelectPopup",
"film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup",
"select-invoice-modal": "/components/SelectInvoiceModal/SelectInvoiceModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn"
"sublist-modal": "/tabWorkOrder/components/SublistModal/SublistModal",
"apply-refund-btn": "/tabWorkOrder/components/applyRefundBtn/applyRefundBtn",
"dialog": "/tabWorkOrder/components/Dialog/Dialog"
}
}
\ No newline at end of file
......@@ -3,6 +3,10 @@ page {
background-color: rgb(246, 247, 247);
}
.hildden {
height: 100vh;
}
.copyImage,
.iconImage {
width: var(--fontSize32);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!