Commit d582cfb0 by 张立顺

feat 12月功能开发

1 parent 8fbcd91d
......@@ -2,6 +2,9 @@
import api from "../../api/api";
// import util from '../../utils/util.js'
Component({
// options: {
// styleIsolation: 'shared'
// },
/**
* 组件的属性列表
*/
......@@ -46,6 +49,7 @@ Component({
this.getMerchantList();
this.setData({
sellerUserId: id,
keyWord: ''
});
}
},
......@@ -61,12 +65,25 @@ Component({
isFirst: true,
sellerUserId: "",
orderSellerInfo: "",
keyWord: ''
},
/**
* 组件的方法列表
*/
methods: {
search(e) {
let { detail: { value } } = e
this.setData({
keyWord: value
})
let { orderObj } = this.data
this.getConversionEmployeeList(orderObj.merchantId, true);
},
changSelectList(e) {
// let {value:text} = e.currentTarget
// let {selesList} =
},
showMoreMerchant() {
this.setData({
moreMerchant: !this.data.moreMerchant,
......@@ -84,7 +101,6 @@ Component({
let { orderObj } = thisPage.data;
let isSellerInfo, orderSellerInfo;
// console.log('orderObj', orderObj)
let callBackName =
type == 1 ? "getSceneMerchantRefStoreList" : "getYQList";
// debugger
......@@ -95,10 +111,10 @@ Component({
api[callBackName](
type == 1
? {
merchantId: userInfo.merchantId,
scene,
staffUUID: orderObj.sellerUserId,
}
merchantId: userInfo.merchantId,
scene,
staffUUID: orderObj.sellerUserId,
}
: {}
).then(async (res) => {
// let userInfo = wx.$util.getUserInfo()
......@@ -198,6 +214,7 @@ Component({
orderObj: comOrderObj,
orderSellerInfo,
scene,
keyWord
} = this.data;
let thisPage = wx.$router.getPageInstance();
......@@ -206,6 +223,7 @@ Component({
.getConversionEmployeeList({
merchantId,
sceneList: type == 1 ? [scene] : "",
filterStaffName: keyWord
})
.then(async (res) => {
wx.$util.hideLoading();
......@@ -324,9 +342,9 @@ Component({
// 还要订单不是回显的
console.log(
type == 1 &&
merchantList.length == 1 &&
!orderObj.merchantId &&
!orderObj.merchantName
merchantList.length == 1 &&
!orderObj.merchantId &&
!orderObj.merchantName
);
if (
type == 1 &&
......@@ -348,11 +366,11 @@ Component({
selesList = selesList.length
? selesList
: [
{
uuid: -1,
staffName: "系统",
},
];
{
uuid: -1,
staffName: "系统",
},
];
selesList.forEach((element, index) => {
if (index == 0) {
element.active = true;
......
......@@ -4,8 +4,7 @@
<view class="sub-title">{{title}}</view>
<view class="merchant-box" style="max-height:{{moreMerchant?merchantList.length * 100 :''}}rpx">
<block wx:for="{{merchantList}}" wx:key="index">
<view class="merchantList {{item.active?'active':''}}" bindtap="changeMerchant" data-item="{{item}}"
data-index="{{index}}">
<view class="merchantList {{item.active?'active':''}}" bindtap="changeMerchant" data-item="{{item}}" data-index="{{index}}">
<view class="text-hide">{{item.merchantName}}</view>
</view>
</block>
......@@ -15,11 +14,12 @@
<image src="../images/open.png" class="icon {{moreMerchant ? 'hide':''}}"></image>
</view>
</block>
<view class="sub-title">{{subTitle}}</view>
<view class="sub-title">{{subTitle}}
</view>
<search-input styleValue=" border-bottom:none" wx:if="{{type == 1 }}" value="{{keyWord}}" bindsearch="search" placeholder="请输入" />
<view class="seles-list">
<block wx:for="{{selesList}}" wx:key="index">
<view class="seles text-center {{item.active?'active':''}}" bindtap="changeSelesMan" data-index="{{index}}"
data-item="{{item}}">
<view class="seles text-center {{item.active?'active':''}}" bindtap="changeSelesMan" data-index="{{index}}" data-item="{{item}}">
{{item.staffName}}
</view>
</block>
......
/* components/Merchant-Seles/Merchant-Seles.wxss */
.text-hide {
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-center{
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.seles-box{
.seles-box {
height: 100%;
width: calc(100% + var(--fontSize64));
transform: translateX(calc(-1 * var(--fontSize32)));
}
.box{
.box {
padding: 0 var(--fontSize32);
}
.merchant-box{
.merchant-box {
max-height: var(--fontSize300);
overflow: hidden;
transition: all .25s;
}
.merchantList {
width: calc(100% - var(--fontSize50));
height: var(--fontSize98);
......@@ -55,12 +60,14 @@
text-align: center;
margin: var(--fontSize28) auto 0;
}
.more .icon{
.more .icon {
width: var(--fontSize24);
height: var(--fontSize22);
transition: all .25s;
}
.more .icon.hide{
.more .icon.hide {
transform: rotate(-180deg);
}
......@@ -81,7 +88,7 @@
display: flex;
flex-wrap: wrap;
flex-direction: row;
padding-bottom: var(--fontSize40);
}
......@@ -94,8 +101,13 @@
height: var(--fontSize60);
margin: 0 var(--fontSize40) var(--fontSize20) 0;
}
.seles.active{
background: rgba(53,130,238,0.08);
.seles.active {
background: rgba(53, 130, 238, 0.08);
color: #347BFF;
border-color: #347BFF;
}
.search-input search-input {
border: none;
}
\ No newline at end of file
// components/SearchInput/SearchInput.js
Component({
// options: {
// styleIsolation: 'shared'
// },
/**
* 组件的属性列表
*/
......@@ -14,6 +17,10 @@ Component({
filterEmoji: {
type: Boolean,
value: true
},
styleValue: {
type: String,
value: ''
}
},
......@@ -60,7 +67,7 @@ Component({
},
emit(e) {
let {
detail:{
detail: {
value
},
type
......
<view class="search-box">
<view class="search-box" style="{{styleValue}}">
<view class="search-input">
<block wx:if="{{!edit}}">
<view class="input {{value?'':'placeholder'}}" bindtap="open">
......@@ -12,7 +12,7 @@
</view>
</block>
<block wx:else>
<input type="text" maxlength="{{maxlength}}" class="input" value='{{value}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/>
<input type="text" maxlength="{{maxlength}}" class="input" value='{{value}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm" />
</block>
</view>
</view>
\ No newline at end of file
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 2;
let index = 1;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -650,7 +650,7 @@ const secondObj = {
maxlength: '100'
}
],
retrofitList:[{
retrofitList: [{
label: ' ',
name: 'upload',
type: 'slot',
......
......@@ -372,6 +372,17 @@ export const getPositionList = options => {
api.getPositionList({}).then(res => {
let { code, data } = res
if (code == 0) {
const namReplaceobj = {
2: '前侧窗玻璃',
3: '后侧窗玻璃',
4: '后挡'
}
data = data.map(item => {
if (namReplaceobj[item.positionValue]) {
item.positionName = namReplaceobj[item.positionValue]
}
return item;
})
app.globalData.positionTypeList = data
}
resolve(app.globalData.positionTypeList)
......
......@@ -97,6 +97,8 @@ Page({
frontGearArr: [], // 前挡
sideRearGearArr: [], // 侧后挡
skylightArr: [], // 天窗
sideBeforeRearGearArr: [], // 前侧窗玻璃
sideAfterRearGearArr: [], // 后档
baseConfigData: {},
showSource: false,
Sourcecolumns: [
......@@ -213,7 +215,8 @@ Page({
orderObj: { selectPayType },
baseConfigData,
} = this.data;
let { showName, type } = e.currentTarget.dataset;
let { showName, type, positionnnum: positionNum } = e.currentTarget.dataset;
console.log(positionNum, 'positionNum');
let arr = [];
if (showName == "goodsBox") {
// type 产品类型 1前挡 2侧后挡 3天窗 4其它精品 根据类型过滤显示商品弹窗数据
......@@ -248,9 +251,10 @@ Page({
)
arr[i].upgradeGoodsList = arr2;
}
console.log([positionNum], [positionNum].includes(subVal.merchantGoodsPosition));
if (
type == 2 &&
[2, 3, 4].includes(subVal.merchantGoodsPosition)
[Number(positionNum)].includes(subVal.merchantGoodsPosition)
) {
arr2.push(subVal);
if (
......@@ -1020,7 +1024,9 @@ Page({
first,
orderObj,
frontGearArr, // 前挡
sideBeforeRearGearArr, // 前侧窗玻璃
sideRearGearArr, // 侧后挡
sideAfterRearGearArr, // 后档
skylightArr, // 天窗
} = this.data;
let { subOrderList } = orderObj;
......@@ -1040,7 +1046,7 @@ Page({
})
.then((res) => {
let { code, data, message } = res;
console.log(subOrderList, 'subOrderList')
console.log(subOrderList, res, 'subOrderList')
if (code == 0) {
wx.hideLoading();
data?.forEach((val) => {
......@@ -1049,9 +1055,16 @@ Page({
if ([1].includes(subVal.merchantGoodsPosition)) {
frontGearArr.push(subVal);
}
if ([2, 3, 4].includes(subVal.merchantGoodsPosition)) {
if ([2].includes(subVal.merchantGoodsPosition)) {
sideBeforeRearGearArr.push(subVal);
}
if ([3,].includes(subVal.merchantGoodsPosition)) {
sideRearGearArr.push(subVal);
}
if ([4].includes(subVal.merchantGoodsPosition)) {
sideAfterRearGearArr.push(subVal);
}
if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) {
skylightArr.push(subVal);
}
......@@ -1063,8 +1076,10 @@ Page({
subV.upgradeGoodsPosition &&
subVal.merchantGoodsPosition != subV.upgradeGoodsPosition &&
subVal.upgradeGoodsId == subV.upgradeGoodsId
)
) {
debugger
subV.upgradeGoodsPosition = subVal.merchantGoodsPosition;
}
});
}
});
......@@ -1124,6 +1139,8 @@ Page({
copyGoodsData: goodsData,
goodsList: subOrderList,
frontGearArr,
sideBeforeRearGearArr,
sideAfterRearGearArr,
sideRearGearArr,
skylightArr,
// orderObj
......
......@@ -111,7 +111,7 @@
<gl-cell border valueAlign="right" label="精品礼券" labelWidth="var(--fontSize140)" haveArrow requiredAfter required value="{{ (orderObj.couponName || '') + (orderObj.customerCouponCode || '') }}" placeholder="点击选择" bindclick="showPopup" data-show-name="couponBox" disabled="{{ orderObj.orderSource == 5 }}" />
<!-- class="{{orderObj.selectPayType ==0?'item-disabled':''}}" -->
<view class="goods_box">
<view class="label" style="margin-bottom: {{ !frontGearArr.length && !sideRearGearArr.length && !skylightArr.length ? 'var(--fontSize40)' : '' }};">
<view class="label" style="margin-bottom: {{ !frontGearArr.length && !sideRearGearArr.length && !skylightArr.length&&!sideBeforeRearGearArr.length&&!sideAfterRearGearArr.length ? 'var(--fontSize40)' : '' }};">
请选择产品
<text class="required">*</text>
</view>
......@@ -148,13 +148,79 @@
</view>
</block>
</block>
<block wx:if="{{ sideBeforeRearGearArr.length }}">
<gl-cell border valueAlign="right" label="前侧窗玻璃" logoSrc="{{ tricorn }}" labelWidth="var(--fontSize180)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" data-positionnnum="2" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 前侧窗玻璃 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [2]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
</view>
</view>
<view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}">无部位属性</view>
<view class="position" wx:else></view>
<view class="price_count">
<view class="price">
<text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" />
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ sideRearGearArr.length }}">
<gl-cell border valueAlign="right" label="侧后挡" logoSrc="{{ tricorn }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" />
<gl-cell border valueAlign="right" label="后侧窗玻璃" logoSrc="{{ sideIcorn }}" labelWidth="var(--fontSize180)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" data-positionnnum="3" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 后侧窗玻璃 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [3]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
</view>
</view>
<view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}">无部位属性</view>
<view class="position" wx:else></view>
<view class="price_count">
<view class="price">
<text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" />
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ sideAfterRearGearArr.length }}">
<gl-cell border valueAlign="right" label="后档" logoSrc="{{ afterIcorn }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" data-positionnnum="4" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 侧后挡 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [2, 3, 4]) }}">
<!-- 后档 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [4]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!