Răsfoiți Sursa

支付方式

shish 5 ani în urmă
părinte
comite
80c2489e38

+ 32 - 5
ghsApp/src/admin/billing/affirm.vue

@@ -73,7 +73,7 @@
             <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">
-            <view class="tui-title">付款方式</view>
+            <view class="tui-title">结算类型</view>
             <button @tap="form.debt = 1" class="admin-button-com mini-btn" :class="form.debt == 1 ? 'blue' : 'default'">
               欠款
             </button>
@@ -82,6 +82,21 @@
             </button>
           </tui-list-cell>
 
+          <tui-list-cell class="line-cell" :arrow="true" v-if="form.debt == 0">
+            <div class="tui-title">付款方式</div>
+            <picker
+              mode="selector"
+              :value="form.payWay"
+              :range="payWayList"
+              range-key="name"
+              @change="payWayChange"
+              class="tui-input"
+            >
+              <input v-model="form.payWay" name="payWay" type="text" hidden />
+              <div>{{payWayList[payWayindex].name}}</div>
+            </picker>
+          </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>
@@ -89,7 +104,8 @@
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-            <view class="tui-title">实收金额</view>
+            <view v-if="form.debt == 1" class="tui-title">应收金额</view>
+            <view v-else class="tui-title">实收金额</view>
             <input style="border: 1px solid #eee;color: #3385FF;width: calc(100%);height:70rpx;" type="number" @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
           </tui-list-cell>
 
@@ -99,7 +115,8 @@
           </tui-list-cell>
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
-						<textarea style="height: 100rpx" v-model="form.remark" placeholder="备注"/>
+            <view class="tui-title">备注</view>
+						<textarea style="height: 100rpx" v-model="form.remark" placeholder="选填"/>
 					</tui-list-cell>
 
           </view>
@@ -157,6 +174,8 @@ export default {
     return {
       autoLoad: false,
       isBilling: true,
+			payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
+			payWayindex:0,
       form: {
         debt: 1, //付款方式 1欠款订单 0正常订单
         shopId: "",
@@ -174,7 +193,8 @@ export default {
         sendCost: "",
         customId: "",
         product: "",
-        remark:""
+        remark:"",
+        payWay:0
       },
       money: "",
       modifyPrice: 0,
@@ -211,11 +231,18 @@ export default {
     init () {
       this._getDet();
     },
+		payWayChange(e){
+			let index = e.detail.value
+			this.payWayindex = index
+      this.form.payWay = this.payWayList[index].id
+		},
     countAllPrices (e) {
       this.allPrices = this.allPrices + Number(this.form.sendCost);
       let allPrices = this.allPrice.toFixed(2)
       this.modifyPrice = (Number(allPrices) + Number(this.form.sendCost)).toFixed(2);
-
+    },
+    setPayWay(payWay){
+      this.form.payWay = payWay
     },
     courier (type) {
       this.form.sendType = type;

+ 14 - 1
ghsApp/src/pagesArrears/details.vue

@@ -64,6 +64,11 @@
 						<view class="flex">金额:{{selectTotalAmount}}</view>
 						<view class="flex">实收:<input @focus="modifyPrice = null" v-model="modifyPrice" type="digit"/></view>
 						<view class="flex">减免:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
+						<view class="flex">方式:
+							<picker @change="payWayChange" :value="payWayindex" range-key="name" :range="payWayList">
+                        		<view class="uni-input" style="height:auto;border:2rpx solid #ccc;width:300rpx;padding:5rpx 0 5rpx 10rpx;">{{payWayList[payWayindex].name}}</view>
+                    		</picker>
+						</view>
 					</view>
 				</view>
 			</template>
@@ -87,7 +92,9 @@ export default {
 			detailsList: [],
 			listLoading: false,
 			isAllCheck: false,
-			isModel: false
+			isModel: false,
+			payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
+			payWayindex:0
 		};
 	},
 	onPullDownRefresh() {
@@ -136,6 +143,10 @@ export default {
     }
   },
 	methods: {
+		payWayChange(e){
+			let index = e.detail.value
+			this.payWayindex = index
+		},
 		isModelFun(){
 			if (this.$util.isEmpty(this.selectList)) {
 				this.$msg("请选择还款订单");
@@ -152,9 +163,11 @@ export default {
 				let ids = this.selectList.map(ele => {
 					return {id:ele.id};
 				});
+				let payWay = this.payWayList[this.payWayindex].id
 				let parameter = {
 					id:JSON.stringify(ids),
 					customId:this.customInfo.id,
+					payWay:payWay
 				}
 				this.paySuccess(parameter)
 				console.log('确认')

+ 4 - 7
ghsApp/src/pagesOrder/detail.vue

@@ -66,6 +66,10 @@
 						<view v-else>-</view>
 					</view>
 				</view>
+				<view class="order-info_box">
+					<view>支付方式:</view>
+					<view>{{ detailInfo.payWay==0?'微信':detailInfo.payWay==1?'支付宝':detailInfo.payWay==4?'现金':detailInfo.payWay==5?'银行卡':'未知' }}</view>
+				</view>
 				<view class="order-info_box">
 					<view>配送方式:</view>
 					<view>{{ detailInfo.sendType==1?'待确认':detailInfo.sendType==2?'自取':detailInfo.sendType==3?'本店送':detailInfo.sendType==4?'快递配送':'未知' }}</view>
@@ -167,13 +171,6 @@
 					打印{{detailInfo.printNum>0?`(${detailInfo.printNum})`:''}}
 				</button>
 			</template>
-<!--			<button-->
-<!--				@click="pageTo({-->
-<!--					url:'/pagesOrder/print'-->
-<!--				})"-->
-<!--				class="admin-button-com default">-->
-<!--				打印-->
-<!--			</button>-->
 		</div>
 		<!-- 免发货弹窗 -->
 		<modal-module