shish пре 2 месеци
родитељ
комит
12b379ba02

+ 4 - 7
ghsPad/src/pages/home/components/console.vue

@@ -343,20 +343,17 @@ export default {
 		/** 直接收款 / 计算器提交 */
 		zjGathering(params){
 			uni.showLoading({ mask: true })
+			const xj = uni.getStorageSync('xj')
 			const payload = {
-				orderName: params.name,
-				gatheringPrice: params.price,
-				modifyPrice: params.price,
+				...params,
 				isCashier: 1,
-				cash: params.cash,
 				customId: this.customId,
+				xj: JSON.stringify(xj),
 				version: 3,
 				zjGathering: 1,
 				dealPrice: 1,
-				sendType: 1,
 				getGoods: 1,
-				hasPay: params.hasPay != null ? params.hasPay : 0,
-				payWay: Number(params.hasPay) === 1 ? (params.payWay != null ? params.payWay : 0) : 0
+				payWay: Number(params.hasPay) === 1 ? (params.payWay != null ? params.payWay : 0) : 0,
 			}
 			createOrder(payload).then(res=>{
 				uni.hideLoading()

+ 31 - 4
ghsPad/src/pages/home/components/selectPrice.vue

@@ -238,6 +238,30 @@ const DISCOUNT_CUSTOM_STORAGE_KEY = 'ghsPad_selectPrice_customDiscountZhe'
 const DISCOUNT_SELECTED_STORAGE_KEY = 'ghsPad_selectPrice_discountZhe'
 /** 计算器弹层置顶:须在 console.vue 中使用同名常量 */
 const GATHERING_PIN_TOP_STORAGE_KEY = 'ghsPad_selectPrice_gatheringPinTop'
+/** 与 settlePop.vue data().form 初始值一致,临时收款 createOrder 参数与结算弹框对齐 */
+const SETTLE_FORM_DEFAULTS = {
+    sendType: 1,
+    hasPay: 0,
+    payWay: 0,
+    needPrint: 1,
+    freight: '',
+    groupName: '',
+    remark: '',
+    sendCost: 0,
+    customSendCost: 0,
+    labourCost: 0,
+    modifyPrice: 0,
+    getStaffId: 0,
+    getStaffName: '',
+    shopAdminId: 0,
+    shopAdminName: '',
+    cash: 0,
+    dealPrice: 0,
+    reductionRule: 0,
+    callErrand: 0,
+    weight: 1,
+    deliveryRemark: '',
+}
 export default {
     name: 'selectPrice',
     props: {
@@ -1200,12 +1224,15 @@ export default {
                 source: 'submit',
                 orderOnly: !hasCalc,
             })
+            const orderName = (this.name != null ? String(this.name) : '').trim()
             this.$emit('zjGathering', {
-                price: p,
-                name: this.name,
-                cash: cashSubmit,
+                ...SETTLE_FORM_DEFAULTS,
                 hasPay: emitHasPay,
-                payWay: emitPayWay
+                payWay: emitPayWay,
+                modifyPrice: p,
+                cash: cashSubmit,
+                orderName,
+                gatheringPrice: p,
             })
             this.price = 0
             this.checkType = 3