|
|
@@ -39,8 +39,8 @@
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <view class="tui-title">金额</view>
|
|
|
- <input type="digit" @focus="modifyPrice=''" :focus="true" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
|
|
|
+ <view class="tui-title">单价</view>
|
|
|
+ <input type="digit" @focus="goodsPrice=''" :focus="true" v-model="goodsPrice" placeholder-class="tui-placeholder"/>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
</view>
|
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
remark:'',
|
|
|
flowerNum:''
|
|
|
},
|
|
|
- modifyPrice:'',
|
|
|
+ goodsPrice:'',
|
|
|
payWayindex:0,
|
|
|
payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
plantClassData:[],
|
|
|
@@ -169,22 +169,26 @@ export default {
|
|
|
confirmToSubmit () {
|
|
|
let that = this
|
|
|
|
|
|
- if(this.$util.isEmpty(this.modifyPrice) || Number(this.modifyPrice)<=0){
|
|
|
- this.$msg("请输入金额")
|
|
|
+ if(this.$util.isEmpty(this.goodsPrice) || Number(this.goodsPrice)<=0){
|
|
|
+ this.$msg("请输入单价")
|
|
|
return false
|
|
|
}
|
|
|
- if (this.$util.isEmpty(this.form.cover)) {
|
|
|
- this.$msg("请上传图片")
|
|
|
- return false
|
|
|
+ //允许不传图片
|
|
|
+ if (!this.$util.isEmpty(this.form.cover)) {
|
|
|
+ if(Array.isArray(this.form.cover)){
|
|
|
+ this.form.cover = this.form.cover[0]
|
|
|
+ }
|
|
|
}
|
|
|
- if(Array.isArray(this.form.cover)){
|
|
|
- this.form.cover = this.form.cover[0]
|
|
|
+ if(this.$util.isEmpty(this.form.num) || Number(this.form.num)<0){
|
|
|
+ this.$msg('请填写数量')
|
|
|
+ return false
|
|
|
}
|
|
|
-
|
|
|
+ let modifyPrice = Number(this.goodsPrice)*Number(this.form.num)
|
|
|
+ modifyPrice = modifyPrice.toFixed(2)
|
|
|
that.form = {...that.$refs.appDelivery.form,...that.form}
|
|
|
that.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
- createOrder({...that.form,lsGoodsPrice:this.modifyPrice,modifyPrice:this.modifyPrice}).then((res) => {
|
|
|
- that.pageTo({url: '/admin/order/addOrderResult',type:2,query:{id:res.data.id}})
|
|
|
+ createOrder({...that.form,unitGoodsPrice:this.goodsPrice,modifyPrice:modifyPrice}).then((res) => {
|
|
|
+ that.pageTo({url: '/admin/order/workOrderResult',type:2,query:{id:res.data.id}})
|
|
|
})
|
|
|
})
|
|
|
}
|