|
@@ -5,7 +5,7 @@
|
|
|
<view @click="resetCustomer">选客户</view>
|
|
<view @click="resetCustomer">选客户</view>
|
|
|
<view @click="clearItemFn">清空花材</view>
|
|
<view @click="clearItemFn">清空花材</view>
|
|
|
<view @click="breakage">报损</view>
|
|
<view @click="breakage">报损</view>
|
|
|
- <view @click="settle">结算 </view>
|
|
|
|
|
|
|
+ <view @click="goToSettle">结算 </view>
|
|
|
|
|
|
|
|
<!-- 清空花材 -->
|
|
<!-- 清空花材 -->
|
|
|
<uni-popup ref="clearItemRef" type="dialog">
|
|
<uni-popup ref="clearItemRef" type="dialog">
|
|
@@ -31,11 +31,16 @@
|
|
|
import settlePop from './settle-pop.vue'
|
|
import settlePop from './settle-pop.vue'
|
|
|
import selectPayWay from '@/components/select-pay-way.vue'
|
|
import selectPayWay from '@/components/select-pay-way.vue'
|
|
|
import { createCreateOrder, wastageCreateOrder } from '@/api/home/index'
|
|
import { createCreateOrder, wastageCreateOrder } from '@/api/home/index'
|
|
|
|
|
+import productMins from "@/mixins/product";
|
|
|
export default {
|
|
export default {
|
|
|
name:'middleButton',
|
|
name:'middleButton',
|
|
|
- mixins:{},
|
|
|
|
|
|
|
+ mixins: [productMins],
|
|
|
components:{ settlePop,selectPayWay },
|
|
components:{ settlePop,selectPayWay },
|
|
|
props: {
|
|
props: {
|
|
|
|
|
+ customId: {
|
|
|
|
|
+ type: Number,
|
|
|
|
|
+ default: 0
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
@@ -59,7 +64,7 @@ export default {
|
|
|
let arr = this.itemList.map(i=>({ productId:i.id, unitType: i.unitType, num: i.currentNum, property: i.property, unitPrice: i.currentUnitPrice }))
|
|
let arr = this.itemList.map(i=>({ productId:i.id, unitType: i.unitType, num: i.currentNum, property: i.property, unitPrice: i.currentUnitPrice }))
|
|
|
const {settleId,payId,payUserId,isPrint,proceeds,freight} = this.$refs.settlePop
|
|
const {settleId,payId,payUserId,isPrint,proceeds,freight} = this.$refs.settlePop
|
|
|
await createCreateOrder({
|
|
await createCreateOrder({
|
|
|
- customId: this.selectItemUser.id,
|
|
|
|
|
|
|
+ customId: this.customId,
|
|
|
product: JSON.stringify(arr),
|
|
product: JSON.stringify(arr),
|
|
|
modifyPrice: proceeds,
|
|
modifyPrice: proceeds,
|
|
|
sendType: 1,
|
|
sendType: 1,
|
|
@@ -91,7 +96,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
breakage(){
|
|
breakage(){
|
|
|
this.$util.hitRemind()
|
|
this.$util.hitRemind()
|
|
|
- if(this.$util.isEmpty(this.itemList)) {
|
|
|
|
|
|
|
+ if(this.$util.isEmpty(this.selectList)) {
|
|
|
this.$msg('请选择报损花材')
|
|
this.$msg('请选择报损花材')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
@@ -112,13 +117,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- settle(){
|
|
|
|
|
|
|
+ goToSettle(){
|
|
|
this.$util.hitRemind()
|
|
this.$util.hitRemind()
|
|
|
- if(this.$util.isEmpty(this.itemList)) {
|
|
|
|
|
|
|
+ if(this.$util.isEmpty(this.selectList)) {
|
|
|
this.$msg('请选择结算花材')
|
|
this.$msg('请选择结算花材')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- if(this.$util.isEmpty(this.selectItemUser)) {
|
|
|
|
|
|
|
+ if(this.$util.isEmpty(this.customId)) {
|
|
|
this.$msg('请选择客户')
|
|
this.$msg('请选择客户')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|