问题修复
This commit is contained in:
parent
9b4574f9a2
commit
222a0fabb0
|
|
@ -366,8 +366,8 @@
|
|||
.canvas-qrcode {
|
||||
|
||||
margin: auto;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
// display: inline-block;
|
||||
// float: left;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
<view class="flex justify-between padding-bottom align-center solid-bottom">
|
||||
<view class="flex justify-start align-center">
|
||||
<view class="cu-avatar round"
|
||||
:style="'width: 120rpx; height: 120rpx; background-image:url(' + curUserInfo.workerLogoUrl + ');'">
|
||||
:style="'width: 120rpx; height: 120rpx; background-image:url(' + curUserInfo.deptLogoUrl + ');'">
|
||||
</view>
|
||||
<view class="margin-lr-sm">
|
||||
<view class="text-xl margin-bottom-xs">{{curUserInfo.name}}</view>
|
||||
<view class="text-xl margin-bottom-xs">{{curUserInfo.deptName}}</view>
|
||||
<!-- <view class="padding-xs text-sm">
|
||||
<view class='cu-tag bg-white radius'>编辑</view>
|
||||
</view> -->
|
||||
|
|
|
|||
|
|
@ -29,9 +29,12 @@
|
|||
curPageCode: 'indexPage'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
this.loadData();
|
||||
this.bindEvent();
|
||||
if (options && options.menuCode) {
|
||||
this.changeCurPageCode(options.menuCode)
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.offEvent();
|
||||
|
|
@ -62,7 +65,11 @@
|
|||
uni.$off('getCurPageInfo')
|
||||
},
|
||||
changeCurPageCode(targetPageCode) {
|
||||
// #ifdef MP
|
||||
this.$nextTick(() => {
|
||||
this.$refs.moduleBar.navChangeByCode(targetPageCode, true);
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,51 +18,62 @@
|
|||
<view class="solid-top">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">选择类目</view>
|
||||
<picker :mode="'multiSelector'" @change="categoryChange" @columnchange="categoryColChange" :value="categoryMultiIndex" :range-key="'goodsCategoryName'" :range="categoryList">
|
||||
<input disabled class="line-input radius-input" :value="formData.category && formData.category.length ? formData.category[0].goodsCategoryName + '-' + formData.category[1].goodsCategoryName + '-' + formData.category[2].goodsCategoryName : ''"
|
||||
<picker :mode="'multiSelector'" @change="categoryChange" @columnchange="categoryColChange"
|
||||
:value="categoryMultiIndex" :range-key="'goodsCategoryName'" :range="categoryList">
|
||||
<input disabled class="line-input radius-input"
|
||||
:value="formData.category && formData.category.length ? formData.category[0].goodsCategoryName + '-' + formData.category[1].goodsCategoryName + '-' + formData.category[2].goodsCategoryName : ''"
|
||||
placeholder="请选择类目"></input>
|
||||
</picker>
|
||||
</view>
|
||||
<view v-if="formData.specsList && formData.specsList.length > 0">
|
||||
<checkbox-group class="padding-lr bg-white" @change="checkSpecs" :class="isShowAllSpecs ? '' : 'certern-height'">
|
||||
<checkbox-group class="padding-lr bg-white" @change="checkSpecs"
|
||||
:class="isShowAllSpecs ? '' : 'certern-height'">
|
||||
<view v-for="(item, index) in formData.specsList" class="padding-tb-sm">
|
||||
<view class="flex">
|
||||
<view class="flex-sub">
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="index" :checked="item.checked"></checkbox>
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs"
|
||||
:value="index" :checked="item.checked"></checkbox>
|
||||
<text>{{item.goodsCategoryName}}</text>
|
||||
</view>
|
||||
<view class="flex-sub">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'goodsStandardName')" :value="item.goodsStandardName" placeholder="自编辑购买标题"></input>
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'goodsStandardName')"
|
||||
:value="item.goodsStandardName" placeholder="自编辑购买标题"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs">
|
||||
<view class="flex-sub">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'goodsPrice')" :value="item.goodsPrice" placeholder="价格(平6%+¥5销10%+¥18)"></input>
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'goodsPrice')"
|
||||
:value="item.goodsPrice" placeholder="价格(平6%+¥5销10%+¥18)"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex margin-top-xs">
|
||||
<view class="flex-sub">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'deduct')" :value="item.deduct" placeholder="追加提成额"></input>
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'deduct')"
|
||||
:value="item.deduct" placeholder="追加提成额"></input>
|
||||
</view>
|
||||
<view class="flex-sub flex margin-left-xs">
|
||||
<view class="flex-sub">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'groupPrice')" :value="item.groupPrice" placeholder="团购价"></input>
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'groupPrice')"
|
||||
:value="item.groupPrice" placeholder="团购价"></input>
|
||||
</view>
|
||||
<view class="flex-sub margin-left-xs">
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'unit')" :value="item.unit" placeholder="单位"></input>
|
||||
<input class="radius-input" @input="inputSpecs($event, index, 'unit')"
|
||||
:value="item.unit" placeholder="单位"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</checkbox-group>
|
||||
<view class="text-bold text-gray text-lg text-center bg-white padding-tb-sm" @click="showAllSpecs()"><text
|
||||
:class="'cuIcon-' + (isShowAllSpecs ? 'fold' : 'unfold')"></text></view>
|
||||
<view class="text-bold text-gray text-lg text-center bg-white padding-tb-sm"
|
||||
@click="showAllSpecs()"><text :class="'cuIcon-' + (isShowAllSpecs ? 'fold' : 'unfold')"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white">
|
||||
<view class="padding-lr flex align-center">
|
||||
<view class="flex-twice flex justify-start align-center">
|
||||
<view style="width: 20%;">单位</view>
|
||||
<my-uni-combox :candidates="productUnits" placeholder="请选择" v-model="formData.productUnit"></my-uni-combox>
|
||||
<my-uni-combox :candidates="productUnits" placeholder="请选择" v-model="formData.productUnit">
|
||||
</my-uni-combox>
|
||||
</view>
|
||||
<view class="flex-sub margin-left">
|
||||
优惠券+
|
||||
|
|
@ -70,12 +81,14 @@
|
|||
</view>
|
||||
<view class="padding-lr flex align-center padding-tb-xs">
|
||||
<view class="flex-sub">
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="true" :v-model="formData.isGoldenServ" :checked="formData.isGoldenServ"></checkbox>
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="true"
|
||||
:v-model="formData.isGoldenServ" :checked="formData.isGoldenServ"></checkbox>
|
||||
<text>金牌服务</text>
|
||||
</view>
|
||||
<view class="flex-twice flex justify-start align-center">
|
||||
<view style="width: 25%;">质保期</view>
|
||||
<my-uni-combox :candidates="productProtectTimes" placeholder="请选择" v-model="formData.productProtectTime"></my-uni-combox>
|
||||
<my-uni-combox :candidates="productProtectTimes" placeholder="请选择"
|
||||
v-model="formData.productProtectTime"></my-uni-combox>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -83,15 +96,18 @@
|
|||
<view class="solid-top">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">上架区域</view>
|
||||
<picker :mode="'multiSelector'" @change="regionChange" @columnchange="regionColChange" :value="regionMultiIndex" :range-key="'areaName'" :range="regionList">
|
||||
<input disabled class="line-input radius-input" :value="formData.region && formData.region.length ? formData.region[0].areaName + '-' + formData.region[1].areaName : ''"
|
||||
<picker :mode="'multiSelector'" @change="regionChange" @columnchange="regionColChange"
|
||||
:value="regionMultiIndex" :range-key="'areaName'" :range="regionList">
|
||||
<input disabled class="line-input radius-input"
|
||||
:value="formData.region && formData.region.length ? formData.region[0].areaName + '-' + formData.region[1].areaName : ''"
|
||||
placeholder="请选择区域"></input>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="padding-lr bg-white">
|
||||
<checkbox-group @change="checkDistirct" class="grid col-3">
|
||||
<view v-for="(item, index) in formData.districtList" class="margin-tb-xs">
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="index" :checked="item.checked"></checkbox>
|
||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="index"
|
||||
:checked="item.checked"></checkbox>
|
||||
<text>{{item.areaName}}</text>
|
||||
</view>
|
||||
</checkbox-group>
|
||||
|
|
@ -99,11 +115,13 @@
|
|||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">区域描述</view>
|
||||
<input name="areaDesc" :value="formData.areaDesc" :v-model="formData.areaDesc" placeholder="请输入区域描述"></input>
|
||||
<input name="areaDesc" :value="formData.areaDesc" :v-model="formData.areaDesc"
|
||||
placeholder="请输入区域描述"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">上门费</view>
|
||||
<input type="digit" name="doorPrice" :value="formData.doorPrice" :v-model="formData.doorPrice" placeholder="单位:元/次"></input>
|
||||
<input type="digit" name="doorPrice" :value="formData.doorPrice" :v-model="formData.doorPrice"
|
||||
placeholder="单位:元/次"></input>
|
||||
</view>
|
||||
<view class="cu-bar bg-white solid-top">
|
||||
<view class="action text-black">
|
||||
|
|
@ -112,14 +130,16 @@
|
|||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in formData.coverImgList" :key="index" @tap="viewImage($event, formData.coverImgList)"
|
||||
:data-url="item">
|
||||
<view class="bg-img" v-for="(item,index) in formData.coverImgList" :key="index"
|
||||
@tap="viewImage($event, formData.coverImgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, formData.coverImgList)" :data-index="index">
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, formData.coverImgList)"
|
||||
:data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImgList($event, 'coverImgList')" v-if="formData.coverImgList.length === 0">
|
||||
<view class="solids" @tap="chooseImgList($event, 'coverImgList')"
|
||||
v-if="formData.coverImgList.length === 0">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -131,14 +151,16 @@
|
|||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in formData.descImgList" :key="index" @tap="viewImage($event, formData.descImgList)"
|
||||
:data-url="item">
|
||||
<view class="bg-img" v-for="(item,index) in formData.descImgList" :key="index"
|
||||
@tap="viewImage($event, formData.descImgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, formData.descImgList)" :data-index="index">
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, formData.descImgList)"
|
||||
:data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="chooseImgList($event, 'descImgList')" v-if="formData.descImgList.length<9">
|
||||
<view class="solids" @tap="chooseImgList($event, 'descImgList')"
|
||||
v-if="formData.descImgList.length<9">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -150,8 +172,8 @@
|
|||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in formData.imgList" :key="index" @tap="viewImage($event, formData.imgList)"
|
||||
:data-url="item">
|
||||
<view class="bg-img" v-for="(item,index) in formData.imgList" :key="index"
|
||||
@tap="viewImage($event, formData.imgList)" :data-url="item">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, formData.imgList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
|
|
@ -167,13 +189,29 @@
|
|||
视频上传
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white padding-lr padding-bottom-sm">
|
||||
<!-- <view class="bg-white padding-lr padding-bottom-sm">
|
||||
<uni-file-picker limit="1" file-mediatype="video" return-type="object" @select="selectVideo">
|
||||
<button class="cu-btn bg-main-color shadow-blur">选择文件</button>
|
||||
</uni-file-picker>
|
||||
</view> -->
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub" v-if="formData.videoList.length === 0">
|
||||
<view class="solids" @tap="chooseVideo()">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid grid-square flex-sub" v-else>
|
||||
<view class="bg-img" v-for="(item,index) in formData.videoList" :key="index" :data-url="item">
|
||||
<video :src="item" controls></video>
|
||||
<view class="cu-tag bg-red" @tap.stop="delImg($event, formData.videoList)" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-sm bg-white solid-top">
|
||||
<textarea style="width: 100%;" class="solid radius text-left padding-sm" v-model="formData.detailDesc" maxlength="-1" placeholder="请输入详情介绍"></textarea>
|
||||
<textarea style="width: 100%;" class="solid radius text-left padding-sm" v-model="formData.detailDesc"
|
||||
maxlength="-1" placeholder="请输入详情介绍"></textarea>
|
||||
</view>
|
||||
|
||||
<view class="padding-bottom-lg padding-top bg-white text-center">
|
||||
|
|
@ -207,7 +245,7 @@
|
|||
detailDesc: '',
|
||||
descImgList: [],
|
||||
coverImgList: [],
|
||||
video: ''
|
||||
videoList: []
|
||||
},
|
||||
categoryList: [],
|
||||
categoryMultiIndex: [0, 0, 0],
|
||||
|
|
@ -261,10 +299,14 @@
|
|||
let typeList = await this.$request.listByStep();
|
||||
typeList = typeList.data;
|
||||
let col1Id = idArr ? idArr[0] : typeList[0].goodsCategoryId;
|
||||
let subTypeList = await this.$request.listByStep({ goodsCategoryId: col1Id });
|
||||
let subTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: col1Id
|
||||
});
|
||||
subTypeList = subTypeList.data;
|
||||
let col2Id = idArr ? idArr[1] : subTypeList[0].goodsCategoryId;
|
||||
let subSubTypeList = await this.$request.listByStep({ goodsCategoryId: col2Id });
|
||||
let subSubTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: col2Id
|
||||
});
|
||||
subSubTypeList = subSubTypeList.data;
|
||||
this.categoryList.push(typeList);
|
||||
this.categoryList.push(subTypeList);
|
||||
|
|
@ -275,7 +317,9 @@
|
|||
regionList = regionList.data;
|
||||
let subRegionList = [];
|
||||
if (regionList && regionList.length > 0) {
|
||||
subRegionList = await this.$request.areaListByStep({ parentCode: regionList[0].areaCode });
|
||||
subRegionList = await this.$request.areaListByStep({
|
||||
parentCode: regionList[0].areaCode
|
||||
});
|
||||
subRegionList = subRegionList.data;
|
||||
}
|
||||
this.regionList.push(regionList);
|
||||
|
|
@ -284,22 +328,28 @@
|
|||
async categoryChange(e) {
|
||||
this.categoryMultiIndex = e.detail.value;
|
||||
let chosenCategory = [];
|
||||
for(let i = 0; i < this.categoryList.length; i++) {
|
||||
for (let i = 0; i < this.categoryList.length; i++) {
|
||||
chosenCategory.push(this.categoryList[i][this.categoryMultiIndex[i]]);
|
||||
}
|
||||
this.formData.category = chosenCategory;
|
||||
|
||||
// 查询最后一级品类
|
||||
let res = await this.$request.listByStep({goodsCategoryId: chosenCategory[2].goodsCategoryId});
|
||||
let res = await this.$request.listByStep({
|
||||
goodsCategoryId: chosenCategory[2].goodsCategoryId
|
||||
});
|
||||
this.formData.specsList = res.data;
|
||||
},
|
||||
async categoryColChange(e) {
|
||||
let colObj = e.detail;
|
||||
if (colObj.column == 0) {
|
||||
// 通过一级查询二级,通过二级查三级
|
||||
let subTypeList = await this.$request.listByStep({goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId});
|
||||
let subTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: this.categoryList[0][colObj.value].goodsCategoryId
|
||||
});
|
||||
subTypeList = subTypeList.data;
|
||||
let subSubTypeList = await this.$request.listByStep({ goodsCategoryId: subTypeList[0].goodsCategoryId });
|
||||
let subSubTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: subTypeList[0].goodsCategoryId
|
||||
});
|
||||
subSubTypeList = subSubTypeList.data;
|
||||
this.categoryList.pop();
|
||||
this.categoryList.pop();
|
||||
|
|
@ -308,7 +358,9 @@
|
|||
this.categoryMultiIndex = [colObj.value, 0, 0];
|
||||
} else if (colObj.column == 1) {
|
||||
// 通过二级查三级
|
||||
let subSubTypeList = await this.$request.listByStep({ goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId });
|
||||
let subSubTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId
|
||||
});
|
||||
subSubTypeList = subSubTypeList.data;
|
||||
this.categoryList.pop();
|
||||
this.categoryList.push(subSubTypeList);
|
||||
|
|
@ -318,20 +370,24 @@
|
|||
async regionChange(e) {
|
||||
this.regionMultiIndex = e.detail.value;
|
||||
let chosenRegion = [];
|
||||
for(let i = 0; i < this.regionList.length; i++) {
|
||||
for (let i = 0; i < this.regionList.length; i++) {
|
||||
chosenRegion.push(this.regionList[i][this.regionMultiIndex[i]]);
|
||||
}
|
||||
this.formData.region = chosenRegion;
|
||||
|
||||
// 查询最后一级区域
|
||||
let areaList = await this.$request.areaListByStep({parentCode: chosenRegion[1].areaCode});
|
||||
let areaList = await this.$request.areaListByStep({
|
||||
parentCode: chosenRegion[1].areaCode
|
||||
});
|
||||
this.formData.districtList = areaList.data;
|
||||
},
|
||||
async regionColChange(e) {
|
||||
let colObj = e.detail;
|
||||
if (colObj.column == 0) {
|
||||
// 通过一级查二级
|
||||
let subAreaList = await this.$request.areaListByStep({parentCode: this.regionList[0][colObj.value].areaCode});
|
||||
let subAreaList = await this.$request.areaListByStep({
|
||||
parentCode: this.regionList[0][colObj.value].areaCode
|
||||
});
|
||||
subAreaList = subAreaList.data;
|
||||
this.regionList.pop();
|
||||
this.regionList.push(subAreaList);
|
||||
|
|
@ -340,7 +396,7 @@
|
|||
},
|
||||
checkSpecs(e) {
|
||||
let checkedIndexArr = e.detail.value;
|
||||
for(let i = 0; i < this.formData.specsList.length; i++) {
|
||||
for (let i = 0; i < this.formData.specsList.length; i++) {
|
||||
if (checkedIndexArr.indexOf(String(i)) !== -1) {
|
||||
this.formData.specsList[i].checked = true;
|
||||
} else {
|
||||
|
|
@ -356,7 +412,7 @@
|
|||
},
|
||||
checkDistirct(e) {
|
||||
let checkedIndexArr = e.detail.value;
|
||||
for(let i = 0; i < this.formData.districtList.length; i++) {
|
||||
for (let i = 0; i < this.formData.districtList.length; i++) {
|
||||
if (checkedIndexArr.indexOf(String(i)) !== -1) {
|
||||
this.formData.districtList[i].checked = true;
|
||||
} else {
|
||||
|
|
@ -372,7 +428,7 @@
|
|||
success: (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask:true
|
||||
mask: true
|
||||
});
|
||||
res.tempFilePaths.forEach((tmpUrl, index) => {
|
||||
this.$request.uploadFile(tmpUrl).then((url) => {
|
||||
|
|
@ -404,66 +460,81 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
async selectVideo(e) {
|
||||
chooseVideo() {
|
||||
let _this = this;
|
||||
uni.chooseVideo({
|
||||
sourceType: ['camera', 'album'],
|
||||
success: function(res) {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask:true
|
||||
mask: true
|
||||
});
|
||||
this.formData.video = await this.$request.uploadFile(e.tempFilePaths[0]);
|
||||
_this.$request.uploadFile(res.tempFilePath).then((url) => {
|
||||
uni.hideLoading();
|
||||
_this.formData.videoList.push(url);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// async selectVideo(e) {
|
||||
// uni.showLoading({
|
||||
// title: '上传中',
|
||||
// mask: true
|
||||
// });
|
||||
// this.formData.video = await this.$request.uploadFile(e.tempFilePaths[0]);
|
||||
// uni.hideLoading();
|
||||
// },
|
||||
async submit() {
|
||||
console.log(this.formData)
|
||||
let goodsStandardList = this.formData.specsList.filter((item) => {
|
||||
if (item.checked) {
|
||||
return {
|
||||
...item,
|
||||
goodsNum: 99999
|
||||
}
|
||||
}
|
||||
});
|
||||
let goodsAreaList = this.formData.districtList.filter((item) => {
|
||||
if (item.checked) {
|
||||
item.countryAreaId = item.areaId;
|
||||
return item;
|
||||
}
|
||||
});
|
||||
// 0是轮播图,1是详情图
|
||||
let goodsImgsList = [];
|
||||
this.formData.imgList.forEach((url) => {
|
||||
goodsImgsList.push({
|
||||
imgUrl: url,
|
||||
imgType: 0
|
||||
});
|
||||
});
|
||||
this.formData.descImgList.forEach((url) => {
|
||||
goodsImgsList.push({
|
||||
imgUrl: url,
|
||||
imgType: 1
|
||||
});
|
||||
});
|
||||
// let goodsStandardList = this.formData.specsList.filter((item) => {
|
||||
// if (item.checked) {
|
||||
// return {
|
||||
// ...item,
|
||||
// goodsNum: 99999
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// let goodsAreaList = this.formData.districtList.filter((item) => {
|
||||
// if (item.checked) {
|
||||
// item.countryAreaId = item.areaId;
|
||||
// return item;
|
||||
// }
|
||||
// });
|
||||
// // 0是轮播图,1是详情图
|
||||
// let goodsImgsList = [];
|
||||
// this.formData.imgList.forEach((url) => {
|
||||
// goodsImgsList.push({
|
||||
// imgUrl: url,
|
||||
// imgType: 0
|
||||
// });
|
||||
// });
|
||||
// this.formData.descImgList.forEach((url) => {
|
||||
// goodsImgsList.push({
|
||||
// imgUrl: url,
|
||||
// imgType: 1
|
||||
// });
|
||||
// });
|
||||
// let goodsVideoUrl = this.formData.videoList.length ? this.formData.videoList[0] : '';
|
||||
|
||||
let params = {
|
||||
goodsName: this.formData.servName,
|
||||
deptGoodsCategoryId: this.formData.category[2].goodsCategoryId,
|
||||
goodsStandardList: goodsStandardList,
|
||||
goodsAreaList: goodsAreaList,
|
||||
goodsImgUrl: this.formData.coverImgList[0],
|
||||
goodsImgsList: goodsImgsList,
|
||||
goodsVideoUrl: this.formData.video,
|
||||
status: 0,
|
||||
remark: this.formData.detailDesc
|
||||
}
|
||||
console.log("格式化后的请求参数:" + params)
|
||||
let res = await this.$request.addGoods(params);
|
||||
if (res.code === 0) {
|
||||
// let params = {
|
||||
// goodsName: this.formData.servName,
|
||||
// deptGoodsCategoryId: this.formData.category[2].goodsCategoryId,
|
||||
// goodsStandardList: goodsStandardList,
|
||||
// goodsAreaList: goodsAreaList,
|
||||
// goodsImgUrl: this.formData.coverImgList[0],
|
||||
// goodsImgsList: goodsImgsList,
|
||||
// goodsVideoUrl: goodsVideoUrl,
|
||||
// status: 0,
|
||||
// remark: this.formData.detailDesc
|
||||
// }
|
||||
// let res = await this.$request.addGoods(params);
|
||||
// if (res && res.code === 0) {
|
||||
uni.showToast({
|
||||
icon: 'success'
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: -1
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index?menuCode=supplyChainPage'
|
||||
})
|
||||
}
|
||||
// }
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -473,11 +544,13 @@
|
|||
.cu-form-group picker::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.certern-height {
|
||||
max-height: 520rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.long-btn{
|
||||
|
||||
.long-btn {
|
||||
width: 95%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<view class="margin-bottom-xs">
|
||||
<view class="margin-bottom-xs">选择日期:</view>
|
||||
<picker mode="date" :value="date" :start="curDate" @change="dateChange">
|
||||
<input class="radius-input" v-model="date"></input>
|
||||
<input class="radius-input" v-model="date" disabled></input>
|
||||
</picker>
|
||||
</view>
|
||||
<view>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<text class="margin-lr-xs">或</text> -->
|
||||
<picker mode="selector" :value="timeRangeIndex" :range="timeRangeList"
|
||||
@change="timeRangeChange">
|
||||
<input class="radius-input" v-model="timeRange"></input>
|
||||
<input class="radius-input" v-model="timeRange" disabled></input>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<template>
|
||||
<!-- 报价/客户支付模态框 -->
|
||||
<view class="cu-modal" :class="show?'show':''">
|
||||
<view class="cu-dialog">
|
||||
<view class="cu-dialog bg-white">
|
||||
<view class="cu-bar bg-white justify-end">
|
||||
<view class="content">支付宝扫码支付</view>
|
||||
<view class="action" data-modal="showPayQrcodeModal" @click="finishQrPay">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white padding-bottom-xl">
|
||||
<view class="padding-tb-sm" style="width: 300px; margin: 0 auto;">
|
||||
<view class="bg-white">
|
||||
<view class="padding-tb-sm" style="width: 300px; margin: 0 auto;" v-show="modal_qr">
|
||||
<ayQrcode ref="qrcode" :modal="modal_qr" :url="url" @hideQrcode="hideQrcode" :height="300"
|
||||
:width="300" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="text-center padding-bottom-xl">
|
||||
<view class="text-center padding-bottom-xl">
|
||||
<view>请客户扫描码付款后方能提交完单</view>
|
||||
<view class="text-red">必须按二维码生成金额支付</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -51,11 +51,11 @@
|
|||
methods: {
|
||||
finishQrPay(e) {
|
||||
this.$emit('finishQrPay', e);
|
||||
this.hideQrcode();
|
||||
},
|
||||
// 展示二维码
|
||||
showQrcode(url) {
|
||||
this.url = url;
|
||||
console.log(url);
|
||||
let _this = this;
|
||||
this.modal_qr = true;
|
||||
// uni.showLoading()
|
||||
|
|
|
|||
|
|
@ -37,7 +37,11 @@
|
|||
</view>
|
||||
<!-- 状态分类tab -->
|
||||
<view class="cu-list grid no-border col-5 padding-top-sm bg-white">
|
||||
<view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="0" @tap="statusSelect">
|
||||
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect">
|
||||
<view class="margin-bottom-xs">{{item.name}}</view>
|
||||
<view>(0)</view>
|
||||
</view>
|
||||
<!-- <view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="0" @tap="statusSelect">
|
||||
<view class="margin-bottom-xs">超时单</view>
|
||||
<view>({{myOrders.summary.overtimeOrderNum}})</view>
|
||||
</view>
|
||||
|
|
@ -53,10 +57,10 @@
|
|||
<view class="margin-bottom-xs">急报单</view>
|
||||
<view>({{myOrders.summary.urgentMsgOrderNum}})</view>
|
||||
</view>
|
||||
<view class="cu-item" :class="stateCur === 4 ? 'bg-main-color light' : ''" :data-id="4" @tap="statusSelect">
|
||||
<view class="cu-item" :class="stateCur === 0 ? 'bg-main-color light' : ''" :data-id="4" @tap="statusSelect">
|
||||
<view class="margin-bottom-xs">新订单</view>
|
||||
<view>({{myOrders.summary.newOrderNum}})</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 子状态分类tab -->
|
||||
<scroll-view scroll-x class="bg-white nav text-center" :scroll-with-animation="true" :scroll-left="scrollLeft">
|
||||
|
|
@ -143,7 +147,7 @@
|
|||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order.customerPhone)">联系客户</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">重新排期</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="finishOrder(order)">发起完单</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showPayQrcodeModal" @tap="makePayQrcode($event, order)">生成付款码</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showPayQrcodeModal" v-if="order.payStatus === 0" @tap="makePayQrcode($event, order)">生成付款码</button>
|
||||
</view>
|
||||
<!-- <view v-if="order.orderStatus === 4">
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="sendUrgentMsgModal" @tap="showModal($event, order)">师傅急报</button>
|
||||
|
|
@ -264,22 +268,22 @@
|
|||
areaMultiIndex: [0, 0, 0],
|
||||
categoryList: [],
|
||||
categoryMultiIndex: [0, 0, 0],
|
||||
// stateList: [{
|
||||
// code: 1,
|
||||
// name: '超时单'
|
||||
// }, {
|
||||
// code: 2,
|
||||
// name: '今日单'
|
||||
// }, {
|
||||
// code: 3,
|
||||
// name: '明日单'
|
||||
// }, {
|
||||
// code: 4,
|
||||
// name: '急报单'
|
||||
// }, {
|
||||
// code: 5,
|
||||
// name: '新订单'
|
||||
// }],
|
||||
stateList: [{
|
||||
code: 1,
|
||||
name: '超时单'
|
||||
}, {
|
||||
code: 2,
|
||||
name: '今日单'
|
||||
}, {
|
||||
code: 3,
|
||||
name: '明日单'
|
||||
}, {
|
||||
code: 4,
|
||||
name: '急报单'
|
||||
}, {
|
||||
code: 0,
|
||||
name: '新订单'
|
||||
}],
|
||||
subStateList: [{
|
||||
code: 1,
|
||||
name: '未约/未排'
|
||||
|
|
@ -309,7 +313,7 @@
|
|||
scrollLeft: 0,
|
||||
stickyTop: this.CustomBar,
|
||||
tabCur: 0,
|
||||
stateCur: 0,
|
||||
stateCur: null,
|
||||
showTimeArrangeModal: false,
|
||||
showArrangeFailTimeModal: false,
|
||||
showNewServPriceModal: false,
|
||||
|
|
@ -368,9 +372,9 @@
|
|||
this.loadMasterOrderPage();
|
||||
},
|
||||
async loadMasterOrderPage(params = {}) {
|
||||
params.pageNum = this.pageParams[this.tabCur].pageNum;
|
||||
params.pageSize = this.$globalData.initPageSize;
|
||||
params.orderStatus = this.subStateList[this.tabCur].code;
|
||||
params.pageNum = this.pageParams[this.tabCur].pageNum;
|
||||
this.$refs.loadStatusBar.showLoading();
|
||||
try {
|
||||
let res = null;
|
||||
|
|
@ -528,14 +532,16 @@
|
|||
}
|
||||
},
|
||||
tabSelect(e) {
|
||||
this.stateCur = null;
|
||||
this.tabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
// this.reloadMasterOrderPage(this.stateCur, this.subStateList[this.tabCur].code);
|
||||
this.reloadMasterOrderPage();
|
||||
},
|
||||
statusSelect(e) {
|
||||
this.tabCur = null;
|
||||
this.stateCur = e.currentTarget.dataset.id;
|
||||
this.loadData(this.stateCur, this.subStateList[this.tabCur].code);
|
||||
this.reloadMasterOrderPage();
|
||||
},
|
||||
getCurDateAndTime() {
|
||||
let date = new Date();
|
||||
|
|
@ -644,8 +650,8 @@
|
|||
}
|
||||
let res = await this.$request.qrPay(orderInfo);
|
||||
if (res && res.code === 0) {
|
||||
this.$refs.payQrcode.showQrcode(res.data.expend.qrcode_url);
|
||||
this.showModal(e, orderInfo);
|
||||
this.$refs.payQrcode.showQrcode(res.data.expend.qrcode_url);
|
||||
}
|
||||
},
|
||||
showServOrderDetail(order) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue