|
|
@@ -61,101 +61,64 @@
|
|
|
</view>
|
|
|
<!-- 登录信息 -->
|
|
|
<view class="module-com input-line-wrap">
|
|
|
- <tui-list-cell
|
|
|
- class="line-cell"
|
|
|
- :hover="false"
|
|
|
- :arrow="true"
|
|
|
- @click="showCustomer = true"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="showCustomer = true">
|
|
|
<view class="tui-title">客户</view>
|
|
|
- <view
|
|
|
- class="tui-input"
|
|
|
- v-if="form.customId"
|
|
|
- >{{
|
|
|
- form.customName
|
|
|
- }}</view>
|
|
|
- <view
|
|
|
- class="tui-placeholder"
|
|
|
- style="width: 100%"
|
|
|
- v-else
|
|
|
- >请选择客户</view>
|
|
|
+ <view class="tui-input" v-if="form.customId" >{{ form.customName }}</view>
|
|
|
+ <view class="tui-placeholder" style="width: 100%" v-else >请选择客户</view>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell
|
|
|
- class="line-cell"
|
|
|
- :hover="false"
|
|
|
- :arrow="false"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">送货</view>
|
|
|
- <button
|
|
|
- @tap="courier(2)"
|
|
|
- class="admin-button-com mini-btn"
|
|
|
- :class="form.sendType == 2 ? 'blue' : 'default'"
|
|
|
- >
|
|
|
+ <button @tap="courier(2)" class="admin-button-com mini-btn" :class="form.sendType == 2 ? 'blue' : 'default'">
|
|
|
自取
|
|
|
</button>
|
|
|
- <button
|
|
|
- @click="courier(1)"
|
|
|
- class="admin-button-com mini-btn"
|
|
|
- :class="form.sendType == 1 ? 'blue' : 'default'"
|
|
|
- >
|
|
|
+ <button @click="courier(1)" class="admin-button-com mini-btn" :class="form.sendType == 1 ? 'blue' : 'default'">
|
|
|
配送
|
|
|
</button>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell
|
|
|
- class="line-cell"
|
|
|
- :hover="false"
|
|
|
- :arrow="false"
|
|
|
- v-show="form.sendType == 1"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="form.sendType == 1" >
|
|
|
<view class="tui-title">运费</view>
|
|
|
- <input
|
|
|
- @blur="sendCostBlur"
|
|
|
- type="number"
|
|
|
- placeholder="留空表示免运费"
|
|
|
- @input="countAllPrices"
|
|
|
- v-model="form.sendCost"
|
|
|
- placeholder-class="tui-placeholder"
|
|
|
- />
|
|
|
+ <input @blur="sendCostBlur" type="number" placeholder="留空表示免运费" @input="countAllPrices" v-model="form.sendCost" placeholder-class="tui-placeholder"/>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell
|
|
|
- class="line-cell"
|
|
|
- :hover="false"
|
|
|
- :arrow="false"
|
|
|
- >
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">付款方式</view>
|
|
|
- <button
|
|
|
- @tap="form.debt = 1"
|
|
|
- class="admin-button-com mini-btn"
|
|
|
- :class="form.debt == 1 ? 'blue' : 'default'"
|
|
|
- >
|
|
|
+ <button @tap="form.debt = 1" class="admin-button-com mini-btn" :class="form.debt == 1 ? 'blue' : 'default'">
|
|
|
欠款
|
|
|
</button>
|
|
|
- <button
|
|
|
- @click="form.debt = 0"
|
|
|
- class="admin-button-com mini-btn"
|
|
|
- :class="form.debt == 0 ? 'blue' : 'default'"
|
|
|
- >
|
|
|
+ <button @click="form.debt = 0" class="admin-button-com mini-btn" :class="form.debt == 0 ? 'blue' : 'default'">
|
|
|
已收款
|
|
|
</button>
|
|
|
</tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
+ <view class="tui-title">总金额</view>
|
|
|
+ <text style="color: #3385FF" v-if="form.sendType == 1">{{ (allPrice + Number(form.sendCost)).toFixed(2) }}</text>
|
|
|
+ <text style="color: #3385FF" v-else >{{ allPrice.toFixed(2) }}</text>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
+ <view class="tui-title">实收金额</view>
|
|
|
+ <input style="border: 1px solid #eee;color: #3385FF;width: calc(100%);" type="number" v-model="realMoney" placeholder-class="tui-placeholder"/>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
+ <view class="tui-title">优惠</view>
|
|
|
+ <text style="color: #3385FF">{{ (allPrice.toFixed(2) - realMoney + Number(this.form.sendCost)).toFixed(2) }}</text>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
</view>
|
|
|
</form>
|
|
|
</view>
|
|
|
<view class="under-bar">
|
|
|
<view class="price-view">
|
|
|
- <text class="price-title">{{
|
|
|
- form.debt == 1 ? "欠款" : "已收款"
|
|
|
- }}</text>
|
|
|
+ <text class="price-title">{{form.debt == 1 ? "欠款" : "已收款"}}</text>
|
|
|
<text class="price-number">
|
|
|
¥
|
|
|
- <text class="large" v-if="form.sendType == 1">{{ (allPrice + Number(form.sendCost)).toFixed(2) }}</text>
|
|
|
- <text class="large" v-else >{{ allPrice.toFixed(2) }}</text>
|
|
|
+ <!--<text class="large" v-if="form.sendType == 1">{{ (allPrice + Number(form.sendCost)).toFixed(2) }}</text>-->
|
|
|
+ <!--<text class="large" v-else >{{ allPrice.toFixed(2) }}</text>-->
|
|
|
+ <text class="large" >{{ realMoney?realMoney:0 }}</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
- <button
|
|
|
- class="admin-button-com blue middle"
|
|
|
- @click="affirmFormSubmit"
|
|
|
- >
|
|
|
+ <button class="admin-button-com blue middle" @click="affirmFormSubmit">
|
|
|
开单
|
|
|
</button>
|
|
|
</view>
|
|
|
@@ -217,6 +180,7 @@ export default {
|
|
|
product: "",
|
|
|
},
|
|
|
money: "",
|
|
|
+ realMoney: 0,
|
|
|
showCustomer: false,
|
|
|
};
|
|
|
},
|
|
|
@@ -232,6 +196,7 @@ export default {
|
|
|
title: this.getMerchantInfo.name,
|
|
|
});
|
|
|
}
|
|
|
+ this.realMoney = this.allPrice.toFixed(2);
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
|
@@ -243,6 +208,9 @@ export default {
|
|
|
},
|
|
|
countAllPrices (e) {
|
|
|
this.allPrices = this.allPrices + Number(this.form.sendCost);
|
|
|
+ let allPrices = this.allPrice.toFixed(2)
|
|
|
+ this.realMoney = (Number(allPrices) + Number(this.form.sendCost)).toFixed(2);
|
|
|
+
|
|
|
},
|
|
|
courier (type) {
|
|
|
this.form.sendType = type;
|
|
|
@@ -296,7 +264,8 @@ export default {
|
|
|
if (options.sendType == 2) {
|
|
|
options.sendCost = "";
|
|
|
}
|
|
|
- createOrder(options).then((res) => {
|
|
|
+
|
|
|
+ createOrder({...options,realPrice: this.realMoney,}).then((res) => {
|
|
|
this.resetSelectInfoByType(this.pageType);
|
|
|
const {
|
|
|
data: { id, orderSn },
|