|
|
@@ -47,7 +47,7 @@
|
|
|
<view class="describe-view">
|
|
|
共{{ selectList.length }}种,
|
|
|
<!-- 共16扎9支, -->
|
|
|
- 合计 ¥<text class="price">{{ allPrice }}</text>
|
|
|
+ 合计 ¥<text class="price">{{ selectAllPrice }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -80,41 +80,49 @@
|
|
|
</tui-list-cell> -->
|
|
|
</view>
|
|
|
<view class="module-com input-line-wrap">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">包装重量</view>
|
|
|
+ <input type="digit" :disabled="!canIEdit" v-model="form.packWeight" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="公斤"/>
|
|
|
+ </tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">打包费</view>
|
|
|
- <input type="digit" :disabled="!canIEdit" v-model="form.packingCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
+ <input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.packingCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">短途运费</view>
|
|
|
- <input type="digit" :disabled="!canIEdit" v-model="form.shortCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
+ <input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.shortCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">长途运费</view>
|
|
|
- <input type="digit" :disabled="!canIEdit" v-model="form.longCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
+ <input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.longCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">提货费</view>
|
|
|
- <input type="digit" :disabled="!canIEdit" v-model="form.pickCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
+ <input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.pickCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">本地运费</view>
|
|
|
- <input type="digit" :disabled="!canIEdit" v-model="form.localCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
+ <input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.localCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
<view class="tui-title ">入库日期</view>
|
|
|
- <!-- <view class="tui-input" v-if="form.province || form.city">
|
|
|
- {{ form.province + "-" + form.city }}
|
|
|
- </view> -->
|
|
|
- <!-- <view class="tui-placeholder" v-else>请选择</view>
|
|
|
- <input v-model="form.province" name="province" hidden /> -->
|
|
|
- <AppDatePicker
|
|
|
- v-if="canIEdit"
|
|
|
- :dateVal="form.entryTime"
|
|
|
- :placeholder="'请选择日期'"
|
|
|
- />
|
|
|
+ <AppDatePicker v-if="canIEdit" :dateVal="form.entryTime" :placeholder="'请选择日期'"/>
|
|
|
<view v-else>{{ form.entryTime || "请选择日期" }}</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">总金额</view>
|
|
|
+ <view>{{totalPrice}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">实付金额</view>
|
|
|
+ <input style="border: 1px solid #eee;color: #3385FF;width: calc(100%);" type="digit" :disabled="!canIEdit" @focus="realMoney=''" v-model="realMoney" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">损耗减免</view>
|
|
|
+ <view>{{totalPrice - realMoney }}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell remark-wrap" :hover="false">
|
|
|
<view class="tui-title">备注</view>
|
|
|
<view class="tui-input">
|
|
|
@@ -132,9 +140,10 @@
|
|
|
</view>
|
|
|
<view class="under-bar">
|
|
|
<view class="price-view">
|
|
|
- <text class="price-title">总金额</text>
|
|
|
+ <text class="price-title">实付金额</text>
|
|
|
<text class="price-number">
|
|
|
- ¥ <text class="large">{{ Number(allPrice) + Number(form.packingCharge) + Number(form.shortCharge) + Number(form.longCharge) + Number(form.pickCharge) + Number(form.localCharge) }}</text>
|
|
|
+ <!--¥ <text class="large">{{ Number(allPrice) + Number(form.packingCharge) + Number(form.shortCharge) + Number(form.longCharge) + Number(form.pickCharge) + Number(form.localCharge) }}</text>-->
|
|
|
+ ¥ <text class="large">{{ realMoney }}</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
<button class="admin-button-com blue middle" v-if="canIEdit" @click="formSubmit">
|
|
|
@@ -188,12 +197,15 @@ export default {
|
|
|
longCharge: "",
|
|
|
pickCharge: "",
|
|
|
localCharge: "",
|
|
|
+ packWeight: "",
|
|
|
|
|
|
entryTime: "",
|
|
|
ghsId: null
|
|
|
},
|
|
|
showCustomer: false,
|
|
|
- detailsInfo: {}
|
|
|
+ detailsInfo: {},
|
|
|
+ totalPrice:0,
|
|
|
+ realMoney:0,
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -203,15 +215,15 @@ export default {
|
|
|
if(!this.$util.isEmpty(uni.getStorageSync("newGhs"))){
|
|
|
this.showCustomer = true;
|
|
|
}
|
|
|
+ this.selectAllPrice();
|
|
|
},
|
|
|
onUnload(){
|
|
|
uni.removeStorageSync('newGhs');
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
|
- allPrice() {
|
|
|
+ selectAllPrice(){
|
|
|
let price = 0;
|
|
|
-
|
|
|
if (this.selectList) {
|
|
|
console.log(this.selectList,'selectList')
|
|
|
for (const item of this.selectList) {
|
|
|
@@ -222,7 +234,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return Math.round(price * 100) / 100;
|
|
|
+ this.realMoney = price.toFixed(2);
|
|
|
+ return price.toFixed(2);
|
|
|
+ },
|
|
|
+ inputFn(e) {
|
|
|
+ let price = Number(this.selectAllPrice);
|
|
|
+ price = price + Number(this.form.packingCharge) + Number(this.form.shortCharge) + Number(this.form.longCharge) + Number(this.form.pickCharge) + Number(this.form.localCharge)
|
|
|
+ this.totalPrice = price.toFixed(2);
|
|
|
+ this.realMoney = price.toFixed(2);
|
|
|
+
|
|
|
+ // return price.toFixed(2);
|
|
|
},
|
|
|
canIEdit() {
|
|
|
const { orderSn } = this.option || {};
|
|
|
@@ -321,7 +342,7 @@ export default {
|
|
|
if (!this.getMerchantInfo) {
|
|
|
await this.initMerchantInfo();
|
|
|
}
|
|
|
- await createPurchaseOrderApi(formData);
|
|
|
+ await createPurchaseOrderApi({...formData,realPrice:this.realMoney});
|
|
|
uni.setStorageSync('flowersItemInfo', itemInfo);
|
|
|
this.resetSelectInfoByType(this.pageType);
|
|
|
uni.navigateTo({url:'/pagesPurchase/components/pageSuccess?title=新增成功'})
|