Browse Source

零售增加金额备注

feat-230721
张家华 2 years ago
parent
commit
c8112a3797
  1. 4
      src/js/api.js
  2. 2
      src/manifest.json
  3. 6
      src/subpackage/retail/components/store_card_select/store_card_select.vue
  4. 110
      src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
  5. 6
      src/subpackage/retail/pages/confirm_order/confirm_order.vue

4
src/js/api.js

@ -1,5 +1,5 @@
// export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试
export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式
export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试
// export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式
// export const ORIGIN = `http://192.168.1.135:9090`; // 20210927 测试 // export const ORIGIN = `http://192.168.1.135:9090`; // 20210927 测试

2
src/manifest.json

@ -55,7 +55,7 @@
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
/* */ /* */
"appid" : "wxf1294b279ad1b845",
"appid" : "wx7106e84614cf0060",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : true "minified" : true

6
src/subpackage/retail/components/store_card_select/store_card_select.vue

@ -9,7 +9,7 @@
<view class="win-card"> <view class="win-card">
<view class="win-card-search"> <view class="win-card-search">
<image v-if="searchCardValue?false:true" mode="aspectFit" src="/static/images/icon/retail/search.png"></image> <image v-if="searchCardValue?false:true" mode="aspectFit" src="/static/images/icon/retail/search.png"></image>
<input v-model="searchCardValue" @confirm="searchCardList" placeholder="请输入微信昵称/手机号码/储值卡号搜索" placeholder-style="win-card-search-input-placeholder">
<input v-model="searchCardValue" @change="searchCardList" placeholder="请输入微信昵称/手机号码/储值卡号搜索" placeholder-style="win-card-search-input-placeholder">
</view> </view>
<view class="win-card-list"> <view class="win-card-list">
<view class="win-card-list-item" v-for="(item, index) in cardList" :key="index" @click="onCardClick(item)" :style="{borderColor:item.mark===choosePath?'#009874':'#979797'}"> <view class="win-card-list-item" v-for="(item, index) in cardList" :key="index" @click="onCardClick(item)" :style="{borderColor:item.mark===choosePath?'#009874':'#979797'}">
@ -61,7 +61,9 @@
// //
searchCardList() { searchCardList() {
if (!this.searchCardValue) { if (!this.searchCardValue) {
util.showNone("请输入微信昵称/手机号码/储值卡号搜索");
this.cardList = [];
this.curCardChoose = null;
// util.showNone("//");
return; return;
} }

110
src/subpackage/retail/pages/confirm_goods/confirm_goods.vue

@ -28,6 +28,19 @@
</view> </view>
</view> </view>
</view> </view>
<view class="content-price">
<view>商品合计金额<text></text><text>{{ totalPrice }}</text></view>
</view>
<view class="content-mark">
<view>
<text>收取金额</text>
<input v-model="realPrice" type="digit" @change="onRealPriceChange" />
</view>
<view>
<text>备注</text>
<textarea v-model="mark" auto-height />
</view>
</view>
</scroll-view> </scroll-view>
</view> </view>
@ -35,7 +48,7 @@
<view> <view>
<view class="cg-footer-price"> <view class="cg-footer-price">
<view>实付款</view> <view>实付款</view>
<view><text></text>{{ totalPrice }}</view>
<view><text></text>{{ realPrice }}</view>
</view> </view>
<view class="cg-footer-btn"> <view class="cg-footer-btn">
@ -61,6 +74,8 @@
cartListScroll: false, // cartListScroll: false, //
cartListFinalHeight: "0rpx", // cartListFinalHeight: "0rpx", //
cartListFinalPaddingBottom: "0rpx", // cartListFinalPaddingBottom: "0rpx", //
realPrice: 0,
mark: ''
} }
}, },
onLoad(option) { onLoad(option) {
@ -68,15 +83,25 @@
this.curStore = data.curStore; this.curStore = data.curStore;
this.cartListFinal = data.cartListFinal; this.cartListFinal = data.cartListFinal;
this.totalPrice = data.totalPrice; this.totalPrice = data.totalPrice;
this.realPrice = data.totalPrice;
this.fixMainHeight(); // this.fixMainHeight(); //
util.showLoad(); util.showLoad();
setTimeout(util.hideLoad, 500); setTimeout(util.hideLoad, 500);
}, },
methods: { methods: {
onRealPriceChange() {
let price = parseFloat(this.realPrice || this.totalPrice);
this.realPrice = `${price}` != "NaN" ? price.toFixed(2) : this.totalPrice;
},
// //
cartConfirm() { cartConfirm() {
let data = { cartListFinal: this.cartListFinal, curStore: this.curStore, totalPrice: this.totalPrice };
let data = {
cartListFinal: this.cartListFinal,
curStore: this.curStore,
totalPrice: this.realPrice,
mark: this.mark
};
uni.navigateTo({ uni.navigateTo({
url: `/subpackage/retail/pages/confirm_order/confirm_order?data=${encodeURIComponent(JSON.stringify(data))}` url: `/subpackage/retail/pages/confirm_order/confirm_order?data=${encodeURIComponent(JSON.stringify(data))}`
}); });
@ -92,18 +117,19 @@
// //
let query = uni.createSelectorQuery().select(".cg-footer"); let query = uni.createSelectorQuery().select(".cg-footer");
query.boundingClientRect(data => { query.boundingClientRect(data => {
sumHeight = sumHeight - data.height - uni.upx2px(100); // footer
sumHeight = sumHeight - data.height - uni.upx2px(100); // footer 100
let contentHeight = sumHeight; let contentHeight = sumHeight;
query = uni.createSelectorQuery().select(".main-list"); query = uni.createSelectorQuery().select(".main-list");
query.boundingClientRect(data => { query.boundingClientRect(data => {
let itemSize = data.height; let itemSize = data.height;
let limitCount = Math.floor(contentHeight / itemSize); let limitCount = Math.floor(contentHeight / itemSize);
let height = _this.cartListFinal.length >= limitCount ? contentHeight : _this.cartListFinal.length * itemSize;
let height = _this.cartListFinal.length >= limitCount ? contentHeight : _this.cartListFinal.length * itemSize + 120; // 120
height = contentHeight;
_this.cartListFinalHeight = `${tools.px2rpx(height)}rpx`; _this.cartListFinalHeight = `${tools.px2rpx(height)}rpx`;
// safeArea,44iphoneX
if (height >= contentHeight) { if (height >= contentHeight) {
// safeArea,44iphoneX
_this.cartListScroll = true; _this.cartListScroll = true;
_this.cartListFinalPaddingBottom = `${res.safeArea.top >= 44 ? tools.px2rpx(res.safeArea.top) : 0}rpx`; _this.cartListFinalPaddingBottom = `${res.safeArea.top >= 44 ? tools.px2rpx(res.safeArea.top) : 0}rpx`;
} }
@ -163,13 +189,83 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: flex-start; align-items: flex-start;
padding: 0 24rpx;
// padding: 0 24rpx;
// background-color: white;
.content-mark {
width: 100%;
margin-top: 20rpx;
background-color: white; background-color: white;
padding: 0 24rpx;
@include centerFlex(flex-start);
flex-direction: column;
>view {
@include centerFlex(flex-start);
&:first-child {
width: 100%;
// height: 130rpx;
padding: 20rpx 0rpx;
>input {
width: 458rpx;
border-radius: 10rpx;
padding: 24rpx 20rpx;
margin: 0rpx 20rpx;
background-color: #F2F2F7;
font-size: 32rpx;
}
}
&:nth-child(2) {
align-items: flex-start;
width: 100%;
border-top: 1px solid rgba(216, 216, 216, 0.3);
padding: 20rpx 0rpx;
>textarea {
width: 448rpx;
min-height: 164rpx;
border-radius: 10rpx;
padding: 24rpx 20rpx;
margin: 0rpx 20rpx;
background-color: #F2F2F7;
font-size: 32rpx;
}
}
>text {
width: 140rpx;
text-align: left;
font-size: 32rpx;
}
}
}
.content-price {
width: 100%;
// height: 120rpx;
background-color: white;
padding: 0rpx 24rpx;
@include centerFlex(center);
>view {
width: 100%;
height: 100%;
text-align: right;
padding: 30rpx 0rpx;
border-top: 1px solid rgba(216, 216, 216, 0.3);
font-size: 28rpx;
>text {
color: $orange;
&:first-child {
font-size: 28rpx;
}
&:nth-child(2) {
font-size: 40rpx;
}
}
}
}
.main-list { .main-list {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 23rpx 0;
padding: 23rpx 24rpx;
background-color: white;
.item-left { .item-left {
width: 140rpx; width: 140rpx;

6
src/subpackage/retail/pages/confirm_order/confirm_order.vue

@ -77,7 +77,8 @@
curChoose: {}, curChoose: {},
storeCardSelectShow: false, storeCardSelectShow: false,
curStoreInfo: {}
curStoreInfo: {},
mark: ''
} }
}, },
onLoad(option) { onLoad(option) {
@ -85,6 +86,7 @@
this.curStore = data.curStore; this.curStore = data.curStore;
this.cartListFinal = data.cartListFinal; this.cartListFinal = data.cartListFinal;
this.totalPrice = data.totalPrice; this.totalPrice = data.totalPrice;
this.mark = data.mark;
this.fixMainHeight(); // this.fixMainHeight(); //
this.createPayWayList(); // this.createPayWayList(); //
@ -135,7 +137,7 @@
amount: parseFloat(_this.totalPrice), pay_type: info.type, amount: parseFloat(_this.totalPrice), pay_type: info.type,
other_pay_type: info.inputValue, other_pay_type: info.inputValue,
card_no: info.cardNo, card_no: info.cardNo,
mark: ''
mark: this.mark
}, },
isDefaultGet: false, isDefaultGet: false,
failMsg: '出库失败!' failMsg: '出库失败!'

Loading…
Cancel
Save