|
@@ -96,7 +96,7 @@
|
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
|
<!-- </a-col>-->
|
|
<!-- </a-col>-->
|
|
|
<!-- </a-row>-->
|
|
<!-- </a-row>-->
|
|
|
- <div class="content">
|
|
|
|
|
|
|
+ <div class="contentGoods">
|
|
|
<div class="left">
|
|
<div class="left">
|
|
|
<a-spin :spinning="confirmLoading">
|
|
<a-spin :spinning="confirmLoading">
|
|
|
<j-form-container >
|
|
<j-form-container >
|
|
@@ -118,7 +118,7 @@
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
- <a-form-model-item label="消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
|
|
|
|
|
|
|
+ <a-form-model-item label="消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
|
|
|
<a-input-number
|
|
<a-input-number
|
|
|
disabled
|
|
disabled
|
|
|
v-model="model.amount"
|
|
v-model="model.amount"
|
|
@@ -164,7 +164,7 @@
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="9">
|
|
<a-col :span="9">
|
|
|
- <a-form-model-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
|
|
|
|
|
|
|
+ <a-form-model-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
|
|
<a-input
|
|
<a-input
|
|
|
v-model="model.goodsName"
|
|
v-model="model.goodsName"
|
|
|
placeholder="名称"
|
|
placeholder="名称"
|
|
@@ -173,7 +173,7 @@
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="2">
|
|
<a-col :span="2">
|
|
|
- <a-form-model-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
|
|
|
|
|
|
|
+ <a-form-model-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
|
|
<a-button @click="handleSearch()">
|
|
<a-button @click="handleSearch()">
|
|
|
<a-icon type="search" />
|
|
<a-icon type="search" />
|
|
|
</a-button>
|
|
</a-button>
|
|
@@ -208,6 +208,7 @@
|
|
|
v-model="record.sellingPrice"
|
|
v-model="record.sellingPrice"
|
|
|
placeholder="请输入金额"
|
|
placeholder="请输入金额"
|
|
|
style="width: 90%"
|
|
style="width: 90%"
|
|
|
|
|
+ @change="e=>changePrice(e,record)"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template slot="numberSlot" slot-scope="text,record">
|
|
<template slot="numberSlot" slot-scope="text,record">
|
|
@@ -215,6 +216,7 @@
|
|
|
v-model="record.number"
|
|
v-model="record.number"
|
|
|
placeholder="请输入数量"
|
|
placeholder="请输入数量"
|
|
|
style="width: 90%"
|
|
style="width: 90%"
|
|
|
|
|
+ @change="e=>changeNumber(e,record)"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table>
|
|
</a-table>
|
|
@@ -244,7 +246,12 @@
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
|
- model: {},
|
|
|
|
|
|
|
+ model: {
|
|
|
|
|
+ stockType:'',
|
|
|
|
|
+ amount:0,
|
|
|
|
|
+ remarks:'',
|
|
|
|
|
+ childStockType:'',
|
|
|
|
|
+ },
|
|
|
labelCol: {
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
xs: { span: 24 },
|
|
|
sm: { span: 6 },
|
|
sm: { span: 6 },
|
|
@@ -373,19 +380,47 @@
|
|
|
//
|
|
//
|
|
|
// })
|
|
// })
|
|
|
},
|
|
},
|
|
|
|
|
+ changePrice(e,record){
|
|
|
|
|
+ var _amount = 0;
|
|
|
|
|
+ var goodsList = this.dataSource;
|
|
|
|
|
+ if (goodsList){
|
|
|
|
|
+ for (var i = 0; i < goodsList.length; i++) {
|
|
|
|
|
+ var goods = goodsList[i];
|
|
|
|
|
+ if (parseFloat(goods.number) > 0){
|
|
|
|
|
+ var money = parseFloat( goods.sellingPrice )* parseFloat(goods.number)
|
|
|
|
|
+ _amount = _amount+ money;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.model.amount = _amount;
|
|
|
|
|
+ },
|
|
|
|
|
+ changeNumber(e,record){
|
|
|
|
|
+ var _amount = 0;
|
|
|
|
|
+ var goodsList = this.dataSource;
|
|
|
|
|
+ if (goodsList){
|
|
|
|
|
+ for (var i = 0; i < goodsList.length; i++) {
|
|
|
|
|
+ var goods = goodsList[i];
|
|
|
|
|
+ if (parseFloat(goods.number) > 0){
|
|
|
|
|
+ var money = parseFloat( goods.sellingPrice )* parseFloat(goods.number)
|
|
|
|
|
+ _amount = _amount+ money;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.model.amount = _amount;
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
-.content{
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: row;
|
|
|
|
|
-}
|
|
|
|
|
- .left{
|
|
|
|
|
|
|
+ .contentGoods{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ }
|
|
|
|
|
+ .contentGoods .left{
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
}
|
|
}
|
|
|
- .right{
|
|
|
|
|
|
|
+ .contentGoods .right{
|
|
|
flex: 2;
|
|
flex: 2;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|