Commit 030cd585 authored by xieyishang's avatar xieyishang

~~

parent c73eeda5
......@@ -74,6 +74,10 @@
<small>数量:</small>{{ totalCount }}<small>金额:</small>{{ totalMoney }}
<small>所需积分:</small>{{ totaljifen }}
</div>
<div class="total">
<small>需付:</small>{{Userprice }}
</div>
<div class="pos_btn">
......@@ -96,6 +100,8 @@
</el-select>
<el-button-group style="margin-left: 10px;">
<el-button type="primary" icon="el-icon-search" @click="upsearch">搜索</el-button>
<el-button type="danger" icon="el-icon-plus" @click="add">添加产品</el-button>
</el-button-group>
</div>
</el-header>
......@@ -111,8 +117,9 @@
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button-group>
<el-button type="primary" @click="addOrderList(scope.row, scope.$index)">添加</el-button>
<el-button type="primary" @click="addOrderList(scope.row, scope.$index)">加购</el-button>
<el-button type="primary" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
</el-button-group>
</template>
</el-table-column>
......@@ -177,6 +184,7 @@
</el-dialog>
<save v-if="dialog.save" ref="saveBox" @success="upsearch" @closed="dialog.save=false" />
</el-main>
</el-container>
</template>
......@@ -185,10 +193,13 @@
import { ElLoading, ElMessage } from "element-plus";
import { ElMessageBox } from 'element-plus'
import qrcode from "@/components/qrcode/qrcode.vue";
import save from '../goods/lists/save.vue';
export default {
name: "ucenter.cashierhome",
components: {
qrcode,
save
},
data() {
return {
......@@ -231,7 +242,7 @@ export default {
mirror: [],
total: 0,
totaljifen:0,//总共所需积分
Userprice:0,//不使用积分的价格
qrcodeurl:"",
......@@ -254,7 +265,7 @@ export default {
newValue.forEach((item) => {
item.content.forEach((cc) => {
total += Number(cc.readyPrice) * Number(cc.num);
total += parseFloat(cc.readyPrice) * Number(cc.num);
totalCount = totalCount + cc.num;
totaljifen += Number(cc.ready_integral) * Number(cc.num)
......@@ -268,11 +279,25 @@ export default {
this.totalCount = totalCount;
this.totaljifen = totaljifen;//积分
this.Userprice = parseFloat(parseFloat(total) + parseInt(this.totaljifen)).toFixed(2);
},
deep: true,
}
},
methods: {
add(){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveBox.open().setData({})
})
},
table_edit(row){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveBox.open('edit').setData(row)
})
},
//---规格加入购物车-------------------------------------------------------------------------
popCloseHandle() {
this.$emit("close");
......
......@@ -19,6 +19,9 @@
<el-form-item label="标签" prop="tags">
<sc-tag-input v-model="form.tags" placeholder="请输入标签"/>
</el-form-item>
<el-form-item label="产品编码" prop="goods_sn">
<el-input type="textarea" v-model="form.goods_sn" placeholder="请输入产品编码" clearable />
</el-form-item>
<el-form-item label="简述" prop="description">
<el-input type="textarea" v-model="form.description" placeholder="请输入简述" clearable />
</el-form-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment