|
|
@@ -166,6 +166,16 @@
|
|
|
</picker>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="false" v-if="form.hasPay == 0">
|
|
|
+ <view class="tui-title">待付款</view>
|
|
|
+ <view class="tui-input" style="color:#3385ff;">扫码付款、微信邀请付款 选待付款</view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :arrow="false" v-if="form.hasPay == 2">
|
|
|
+ <view class="tui-title">赊账</view>
|
|
|
+ <view class="tui-input" style="color:#3385ff;">客户要欠款挂账的 选赊账</view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="displayPackCost == true">
|
|
|
<view class="tui-title">打包费</view>
|
|
|
<input type="digit" placeholder="请填写打包费" v-model="form.packCost" placeholder-class="tui-placeholder" />
|
|
|
@@ -324,10 +334,10 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">运费</view>
|
|
|
<view v-if="form.reductionRule == 1 && isHcMapRule()">
|
|
|
- <input type="digit" placeholder="请填写运费" v-model="form.customSendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:300upx;height:70upx;text-align:center;"/>
|
|
|
+ <input type="digit" placeholder="请填写运费" v-model="form.customSendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:320upx;height:70upx;text-align:center;"/>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:300upx;height:70upx;text-align:center;"/>
|
|
|
+ <input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:320upx;height:70upx;text-align:center;"/>
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
@@ -363,7 +373,7 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">打印小票</view>
|
|
|
- <button @click="form.needPrint = 1" class="admin-button-com big" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
|
|
|
+ <button @click="form.needPrint = 1" class="admin-button-com big" :class="form.needPrint == 1 ? 'blue' : 'default'" style="width:140upx;">打印</button>
|
|
|
<button @tap="form.needPrint = 2" class="admin-button-com big" :class="form.needPrint == 2 ? 'blue' : 'default'">不打印</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
@@ -371,122 +381,35 @@
|
|
|
<view class="tui-title">
|
|
|
<text>合计金额</text>
|
|
|
</view>
|
|
|
- <text style="color: #3385ff; width: 140upx">¥{{ parseFloat(finalPrice) }}</text>
|
|
|
- <button @tap="showDiscount()" class="admin-button-com middle default" style="margin-left: 0upx">点击打折</button>
|
|
|
+ <text style="color: #3385ff; width: 170upx">¥{{ parseFloat(finalPrice) }}</text>
|
|
|
+ <button @tap="showDiscount()" class="admin-button-com middle default" style="margin-left: 0upx;width:140upx;">打折</button>
|
|
|
<text v-if="discountValue > 0 && discountValue < 1">{{ Number(discountValue) * 10 }}折</text>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view v-if="form.hasPay == 2" class="tui-title">应收金额</view>
|
|
|
<view v-else class="tui-title">实收金额</view>
|
|
|
- <input
|
|
|
- style="border: 1upx solid #eee; color: #3385ff; width: 300upx; height: 70upx;text-align: center;"
|
|
|
- type="digit"
|
|
|
- @focus="modifyPrice = ''"
|
|
|
- v-model="modifyPrice"
|
|
|
- placeholder-class="tui-placeholder"
|
|
|
- />
|
|
|
- <text v-if="modifyPrice > 0 && modifyPrice > finalPrice" style="font-size: 25upx; margin-left: 20upx; color: red"
|
|
|
- >人工资材费 ¥{{ parseFloat((modifyPrice - finalPrice).toFixed(2)) }}</text
|
|
|
- >
|
|
|
- <text v-if="modifyPrice > 0 && modifyPrice < finalPrice" style="font-size: 25upx; margin-left: 20upx; color: green"
|
|
|
- >优惠 ¥{{ parseFloat((finalPrice - modifyPrice).toFixed(2)) }}</text
|
|
|
- >
|
|
|
+ <input style="border: 1upx solid #eee; color: #3385ff; width: 170upx; height: 70upx;text-align: center;" type="digit" @focus="modifyPrice = ''" v-model="modifyPrice" placeholder-class="tui-placeholder" />
|
|
|
+ <text v-if="modifyPrice > 0 && modifyPrice > finalPrice" style="font-size: 28upx; margin-left: 20upx; color: red" >人工资材费 ¥{{ parseFloat((modifyPrice - finalPrice).toFixed(2)) }}</text>
|
|
|
+ <text v-if="modifyPrice > 0 && modifyPrice < finalPrice" style="font-size: 28upx; margin-left: 20upx; color: green">优惠 ¥{{ parseFloat((finalPrice - modifyPrice).toFixed(2)) }}</text>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
- <view class="tui-title">送货日期</view>
|
|
|
- <view class="uni-input" v-if="form.sendTimeWant == ''" style="color: #cccccc; width: 400upx; font-size: 34upx" @click="bindDateChange"
|
|
|
- >默认当天</view
|
|
|
- >
|
|
|
- <view class="uni-input" @click="bindDateChange" v-else style="width: 400upx; font-size: 34upx">{{ form.sendTimeWant }}</view>
|
|
|
+ <view class="tui-title">账单日期</view>
|
|
|
+ <view class="uni-input" v-if="form.historyDate == ''" style="color: #cccccc; width: 400upx; font-size: 32upx" @click="bindHistoryDateChange" >默认当天</view >
|
|
|
+ <view class="uni-input" @click="bindHistoryDateChange" v-else style="width: 400upx; font-size: 32upx">{{ form.historyDate }}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="true">
|
|
|
<div class="tui-title">开单人</div>
|
|
|
- <view class="uni-input" v-if="form.getStaffId == 0" style="color: #cccccc; width: 400upx; font-size: 34upx" @click="changeStaff()"
|
|
|
- >默认本人</view
|
|
|
- >
|
|
|
- <view class="uni-input" v-else @click="changeStaff()" style="width: 400upx; font-size: 34upx">{{
|
|
|
- form.getStaffName ? form.getStaffName : '请选择'
|
|
|
- }}</view>
|
|
|
+ <view class="uni-input" v-if="form.getStaffId == 0" style="color: #cccccc; width: 400upx; font-size: 32upx" @click="changeStaff()" >默认本人</view >
|
|
|
+ <view class="uni-input" v-else @click="changeStaff()" style="width: 400upx; font-size: 32upx">{{ form.getStaffName ? form.getStaffName : '请选择' }}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
- <view style="max-height: 80vh; overflow: scroll">
|
|
|
- <view style="margin-left: 30upx; margin-top: 19upx; font-size: 27upx; font-weight: bold">请选择:</view>
|
|
|
- <view
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- padding: 20upx;
|
|
|
- height: auto;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
- flex-wrap: wrap;
|
|
|
- max-height: 100vh;
|
|
|
- overflow: auto;
|
|
|
- "
|
|
|
- >
|
|
|
- <view v-for="(item, index) in staffList" :key="index" style="margin-bottom: 20upx; margin-left: 3upx">
|
|
|
- <button
|
|
|
- class="admin-button-com staff-btn"
|
|
|
- @click.stop="getCurrentStaff(item)"
|
|
|
- :class="{ selected: form.getStaffId === item.id }"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view style="text-align: center; padding: 10upx 0 10upx 0"
|
|
|
- ><button class="admin-button-com big blue" @click="cancelCurrentStaff()">取消</button></view
|
|
|
- >
|
|
|
- </view>
|
|
|
- </uni-popup>
|
|
|
-
|
|
|
- <uni-popup ref="wlRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
- <view style="max-height: 80vh; overflow: scroll">
|
|
|
- <view style="margin-left: 30upx; margin-top: 19upx; font-size: 27upx; font-weight: bold">请选择物流:</view>
|
|
|
- <view
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- padding: 20upx;
|
|
|
- height: auto;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
- flex-wrap: wrap;
|
|
|
- max-height: 100vh;
|
|
|
- overflow: auto;
|
|
|
- "
|
|
|
- >
|
|
|
- <view v-for="(item, index) in wlList" :key="index" style="margin-bottom: 20upx; margin-left: 3upx">
|
|
|
- <button
|
|
|
- class="admin-button-com staff-btn"
|
|
|
- @click.stop="selectWl(item)"
|
|
|
- :class="{ selected: form.wlName === item.name }"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view style="text-align: center; padding: 10upx 0 10upx 0"
|
|
|
- >
|
|
|
-<button class="admin-button-com big blue" @click="addWlItem()">新增</button>
|
|
|
-<button class="admin-button-com big blue" @click="cancelWlSelect()">取消</button>
|
|
|
-</view
|
|
|
- >
|
|
|
- </view>
|
|
|
- </uni-popup>
|
|
|
-
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
- <view class="tui-title">账单日期</view>
|
|
|
- <view
|
|
|
- class="uni-input"
|
|
|
- v-if="form.historyDate == ''"
|
|
|
- style="color: #cccccc; width: 400upx; font-size: 34upx"
|
|
|
- @click="bindHistoryDateChange"
|
|
|
- >默认当天</view
|
|
|
- >
|
|
|
- <view class="uni-input" @click="bindHistoryDateChange" v-else style="width: 400upx; font-size: 34upx">{{ form.historyDate }}</view>
|
|
|
+ <view class="tui-title">送货日期</view>
|
|
|
+ <view class="uni-input" v-if="form.sendTimeWant == ''" style="color: #cccccc; width: 400upx; font-size: 32upx" @click="bindDateChange" >默认当天</view >
|
|
|
+ <view class="uni-input" @click="bindDateChange" v-else style="width: 400upx; font-size: 32upx">{{ form.sendTimeWant }}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
@@ -503,14 +426,11 @@
|
|
|
<text class="price-title">
|
|
|
<text></text>
|
|
|
</text>
|
|
|
- <text class="price-number"
|
|
|
- ><text class="large">¥{{ modifyPrice }}</text></text
|
|
|
- >
|
|
|
+ <text class="price-number"><text class="large">¥{{ modifyPrice }}</text></text>
|
|
|
</view>
|
|
|
<text style="font-size: 30upx; right: 100upx">
|
|
|
当前在
|
|
|
- <text style="font-weight: bold; color: red; margin-left: 5upx; font-size: 32upx">{{ currentShop.shopName }}</text></text
|
|
|
- >
|
|
|
+ <text style="font-weight: bold; color: red; margin-left: 5upx; font-size: 32upx">{{ currentShop.shopName }}</text></text>
|
|
|
<button class="admin-button-com blue big" @click="confirmSubmit">提交</button>
|
|
|
</view>
|
|
|
|
|
|
@@ -565,39 +485,78 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
<uni-popup ref="discountRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
- <view style="display: flex; padding: 20upx; min-height: 25vh; justify-content: space-between; align-items: center; flex-wrap: wrap">
|
|
|
- <text
|
|
|
- v-for="(item, index) in discountList"
|
|
|
- :key="index"
|
|
|
- @click="setDiscount(item.value)"
|
|
|
- style="
|
|
|
- margin-left: 25upx;
|
|
|
- border: 1upx solid #999999;
|
|
|
- width: 100upx;
|
|
|
- height: 100upx;
|
|
|
- border-radius: 20upx;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- display: flex;
|
|
|
- "
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </text>
|
|
|
+ <view class="discount-popup-container">
|
|
|
+ <!-- 标题 -->
|
|
|
+ <view class="discount-popup-title">选择打折</view>
|
|
|
+
|
|
|
+ <!-- 快捷折扣按钮 -->
|
|
|
+ <view class="discount-quick-buttons">
|
|
|
+ <button
|
|
|
+ v-for="(item, index) in discountList"
|
|
|
+ :key="index"
|
|
|
+ @click="setDiscount(item.value)"
|
|
|
+ :class="['discount-quick-btn', { active: discountValue === item.value }]"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 分割线 -->
|
|
|
+ <view class="discount-divider"></view>
|
|
|
+
|
|
|
+ <!-- 自定义输入 -->
|
|
|
+ <view class="discount-custom-section">
|
|
|
+ <view class="discount-custom-label">自定义折扣</view>
|
|
|
+ <view class="discount-custom-input-group">
|
|
|
+ <input v-model="customDiscount" type="digit" placeholder="输入折扣(输0.85表示85折)" class="discount-custom-input" />
|
|
|
+ <button class="admin-button-com middle blue" @click="setCustomDiscount" > 应用 </button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <view class="discount-action-buttons">
|
|
|
+ <button class="admin-button-com middle default" @click="cancelDiscount" > 取消 </button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="max-height: 80vh; overflow: scroll">
|
|
|
+ <view style="margin-left: 30upx; margin-top: 19upx; font-size: 27upx; font-weight: bold">请选择:</view>
|
|
|
+ <view style=" display: flex; padding: 20upx; height: auto; justify-content: flex-start; align-items: center; flex-wrap: wrap; max-height: 100vh; overflow: auto; " >
|
|
|
+ <view v-for="(item, index) in staffList" :key="index" style="margin-bottom: 20upx; margin-left: 3upx">
|
|
|
+ <button class="admin-button-com staff-btn" @click.stop="getCurrentStaff(item)" :class="{ selected: form.getStaffId === item.id }" >
|
|
|
+ {{ item.name }}
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="text-align: center; padding: 10upx 0 10upx 0">
|
|
|
+ <button class="admin-button-com big blue" style="width:180upx;" @click="cancelCurrentStaff()">取消</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <uni-popup ref="wlRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="max-height: 80vh; overflow: scroll">
|
|
|
+ <view style="margin-left: 30upx; margin-top: 19upx; font-size: 27upx; font-weight: bold">请选择物流:</view>
|
|
|
+ <view style=" display: flex; padding: 20upx; height: auto; justify-content: flex-start; align-items: center; flex-wrap: wrap; max-height: 100vh; overflow: auto; " >
|
|
|
+ <view v-for="(item, index) in wlList" :key="index" style="margin-bottom: 20upx; margin-left: 3upx">
|
|
|
+ <button class="admin-button-com staff-btn" @click.stop="selectWl(item)" :class="{ selected: form.wlName === item.name }" >
|
|
|
+ {{ item.name }}
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="text-align: center; padding: 10upx 0 10upx 0">
|
|
|
+ <button class="admin-button-com big blue" style="width:180upx;" @click="addWlItem()">新增</button>
|
|
|
+ <button class="admin-button-com big blue" style="width:180upx;" @click="cancelWlSelect()">取消</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
<!-- 蒙板 -->
|
|
|
<view v-if="showPicker" class="date-picker-mask" @click="showPicker = false"></view>
|
|
|
|
|
|
- <mx-date-picker
|
|
|
- :show="showPicker"
|
|
|
- format="yyyy-mm-dd"
|
|
|
- type="date"
|
|
|
- :value="defaultPickerDate"
|
|
|
- :show-tips="true"
|
|
|
- @confirm="confirmPicker"
|
|
|
- @cancel="showPicker = false"
|
|
|
- />
|
|
|
+ <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
|
|
|
|
|
|
<!-- 取件时间选择器 -->
|
|
|
<TimePicker ref="timePicker" :bottomOffset="80" @confirm="handleTimeConfirm" />
|
|
|
@@ -658,9 +617,10 @@ export default {
|
|
|
{ name: '7折', value: 0.7 },
|
|
|
{ name: '8折', value: 0.8 },
|
|
|
{ name: '9折', value: 0.9 },
|
|
|
- { name: '不打折', value: 1 }
|
|
|
+ { name: '不打', value: 1 }
|
|
|
],
|
|
|
discountValue: 0,
|
|
|
+ customDiscount: '',
|
|
|
staffList: [],
|
|
|
wlList: [],
|
|
|
payWayList: [
|
|
|
@@ -957,6 +917,19 @@ export default {
|
|
|
let price = Number(this.finalPrice) * Number(num);
|
|
|
price = parseFloat(price.toFixed(2));
|
|
|
this.modifyPrice = price;
|
|
|
+ this.customDiscount = '';
|
|
|
+ this.$refs.discountRef.close();
|
|
|
+ },
|
|
|
+ setCustomDiscount() {
|
|
|
+ const value = parseFloat(this.customDiscount);
|
|
|
+ if (isNaN(value) || value < 0 || value > 1) {
|
|
|
+ this.$msg('请输入0到1之间的有效折扣值');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.setDiscount(value);
|
|
|
+ },
|
|
|
+ cancelDiscount() {
|
|
|
+ this.customDiscount = '';
|
|
|
this.$refs.discountRef.close();
|
|
|
},
|
|
|
beginScan() {
|
|
|
@@ -1589,10 +1562,6 @@ export default {
|
|
|
margin-top: 10upx;
|
|
|
}
|
|
|
|
|
|
-.delivery-quotes-scroll {
|
|
|
- /* 滚动已移除 */
|
|
|
-}
|
|
|
-
|
|
|
.delivery-quotes-grid {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
@@ -1723,6 +1692,92 @@ export default {
|
|
|
border: 1upx solid #3385ff !important;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.discount-quick-btn {
|
|
|
+ width: 120upx;
|
|
|
+ height: 120upx;
|
|
|
+ border-radius: 12upx;
|
|
|
+ border: 2upx solid #ddd;
|
|
|
+ background-color: #f9f9f9;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ transition: all 0.2s ease;
|
|
|
+ padding: 0;
|
|
|
+ line-height: 1;
|
|
|
+ white-space: nowrap;
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ border-color: #3385ff;
|
|
|
+ background-color: #3385ff;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.discount-popup-container {
|
|
|
+ width: 600upx;
|
|
|
+ padding: 30upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-popup-title {
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 30upx;
|
|
|
+ text-align: center;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-quick-buttons {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 15upx;
|
|
|
+ margin-bottom: 30upx;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-divider {
|
|
|
+ height: 1upx;
|
|
|
+ background-color: #f0f0f0;
|
|
|
+ margin: 20upx 0;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-custom-section {
|
|
|
+ margin-bottom: 30upx;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-custom-label {
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-bottom: 15upx;
|
|
|
+ color: #333;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-custom-input-group {
|
|
|
+ display: flex;
|
|
|
+ gap: 10upx;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-custom-input {
|
|
|
+ flex: 1;
|
|
|
+ border: 1upx solid #ddd;
|
|
|
+ border-radius: 8upx;
|
|
|
+ padding: 12upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ min-height: 70upx;
|
|
|
+ line-height: 45upx;
|
|
|
+}
|
|
|
+
|
|
|
+.discount-action-buttons {
|
|
|
+ display: flex;
|
|
|
+ gap: 15upx;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
.strike-through {
|
|
|
text-decoration: line-through;
|
|
|
}
|